Formulation { // Electric field formulation { Name getdpMicrowaves_formulation ; Type FemEquation; Quantity { { Name e; Type Local; NameOfSpace Hcurl_e; } { Name hs; Type Local; NameOfSpace Hcurl_hs; } { Name voltage_port; Type Local; NameOfSpace Hgrad_port;} { Name U_port; Type Global; NameOfSpace Hgrad_port[U_port];} { Name G_port; Type Global; NameOfSpace Hgrad_port[G_port];} } Equation { Galerkin { [ nu[] * nu0 * Dof{d e} , {d e} ]; In Region[{non_conducting_domain, open_air_domain}]; Integration I1; Jacobian JVol; } Galerkin { [- (2*Pi* $Time*FreqFactor)^2 * epsilon[] * Complex[1, -tan_delta[]] * eps0 * Dof{e} , {e} ]; In Region[{non_conducting_domain, open_air_domain}]; Integration I1; Jacobian JVol; } // Conductive Boundary // roughness of copper represented by a factor of sigma : 1+( 2/Pi )*Atan( 1.4(height/skin_depth])^2 ) // skin_depth = Sqrt(1/(2*Pi*sigma[]*Freq*Pi*mu0)), usign vacuum permeability for usual materials. Galerkin { [ - Complex[0,1] * (2*Pi* $Time*FreqFactor) * Complex[1,1] * Sqrt[ 2 * (1+(2/Pi)*Atan[1.4*(height[]/Sqrt[1/(2*Pi*sigma[]*$Time*Pi*mu0)])^2])* sigma[] * nu[] * nu0 / (2*Pi* $Time*FreqFactor)] * ( Normal[] /\ Dof{e} ) /\ Normal[] , {e} ]; In Sur_CONDUCTOR; Integration I1; Jacobian JSur; } // Silver Muller condition Galerkin { [ Complex[0,1] * (2*Pi* $Time*FreqFactor) * Sqrt[eps0*nu0] * ( Normal[] /\ Dof{e} ) /\ Normal[] , {e} ]; In Sur_RB; Integration I1; Jacobian JSur; } // port Galerkin { [ - Complex[0,1] * (2*Pi* $Time*FreqFactor) *2*volt[]*gap[]/area[] /impedance[] *( Normal[] /\ Vector[eDirX[], eDirY[], eDirZ[]]) /\ Normal[] , {e} ]; In Region[{Sur_UNIFPORT}] ; Integration I1; Jacobian JSur; } Galerkin { [ Complex[0,1] * (2*Pi* $Time*FreqFactor) * gap[]^2/area[] /impedance[] * ( Normal[] /\ Dof{e} ) /\ Normal[] , {e} ]; In Region[{Sur_UNIFPORT}] ; Integration I1; Jacobian JSur; } Galerkin { [ - Complex[0,1] * (2*Pi* $Time*FreqFactor) * 2*volt[] / (2 * Pi * impedance[]) / ( Norm[XYZ[] - Vector[centroidX[], centroidY[], centroidZ[]]] ) * (Normal[] /\ Unit[XYZ[] - Vector[centroidX[], centroidY[], centroidZ[]]]) /\ Normal[] , {e} ]; In Sur_COAXPORT; Integration I1; Jacobian JSur; } Galerkin { [ Complex[0,1] * (2*Pi* $Time*FreqFactor) * Log[radius_out[]/radius_in[]]/ (2 * Pi * impedance[])* ( Normal[] /\ Dof{e} ) /\ Normal[] , {e} ]; In Sur_COAXPORT; Integration I1; Jacobian JSur; } // magnetic field on surfaces Galerkin { [ Dof{hs} , {hs} ]; In ElementsOf[{non_conducting_domain, open_air_domain}, OnOneSideOf {Sur_UNIFPORT, Sur_COAXPORT, Sur_CONDUCTOR, Sur_PEC, Sur_INTERFACE}]; Integration I2; Jacobian JVol; } Galerkin { [ - Complex[0,1]*nu[]*nu0*Dof{d e}/(2*Pi*$Time*FreqFactor), {hs} ] ; In ElementsOf[{non_conducting_domain, open_air_domain}, OnOneSideOf {Sur_UNIFPORT, Sur_COAXPORT, Sur_CONDUCTOR, Sur_PEC, Sur_INTERFACE}]; Integration I2; Jacobian JVol; } //global voltage on port from electric field Galerkin { [- Dof{e} * Vector[eDirX[], eDirY[], eDirZ[]] * gap[] / area[] , {voltage_port}]; In Region[{Sur_UNIFPORT}]; Integration I1; Jacobian JSur; } Galerkin { [- Dof{e} * CrossProduct[Normal[], CrossProduct[Unit[XYZ[] - Vector[centroidX[], centroidY[], centroidZ[]]], Normal[] ] ] / (2 * Pi * Norm[XYZ[] - Vector[centroidX[], centroidY[], centroidZ[]]]) , {voltage_port} ]; In Sur_COAXPORT; Integration I1; Jacobian JSur; } //calutaing load voltage GlobalTerm { [Dof{U_port}, {U_port}]; In Region[{Sur_UNIFPORT, Sur_COAXPORT}];} // calcualting gamma GlobalTerm { [(Dof{G_port})/volt[], {G_port}]; In Region[{Sur_UNIFPORT, Sur_COAXPORT}];} GlobalTerm { [1, {G_port}]; In Region[{Sur_UNIFPORT, Sur_COAXPORT}];} } } }