TITLE 'Plane Wave in a Conductor' { sim161.pde } SELECT errlim=1e-5 ngrid=1 spectral_colors VARIABLES Ezr Ezi { Real and imaginary parts } DEFINITIONS { SI units throughout } Lx=1.0 Ly=0.05 eps0=8.85e-12 eps { Permittivity } mu0=4*pi*1e-7 mu { Permeability } sigma { Electric conductivity } omega=5e9 { Angular frequency } Ez_in=1.0 { Input field Ezr+i*Ezi } Ezp=sqrt(Ezr^2+ Ezi^2) { Modulus of Ez } phase=sign( Ezi)*arccos( Ezr/Ezp)/pi*180 { Phase angle } EQUATIONS { Tagged by dominant variable } Ezr: del2( Ezr)+ mu*eps*omega^2*Ezr+ mu*sigma*omega*Ezi=0 Ezi: del2( Ezi)+ mu*eps*omega^2*Ezi- mu*sigma*omega*Ezr=0 BOUNDARIES region 'conductor' eps=eps0 mu=mu0 sigma=1e-1 start 'outer' (0,0) natural(Ezr)=0 natural(Ezi)=0 line to (Lx,0) value(Ezr)=0 value(Ezi)=0 line to (Lx,Ly) { Superconducting } natural(Ezr)=0 natural(Ezi)=0 line to (0,Ly) value(Ezr)=Ez_in value(Ezi)=0 line to close { Input field } PLOTS elevation( Ezr, Ezi, Ezp) from (0,Ly/2) to (Lx,Ly/2) elevation( Ezp) log from (0,Ly/2) to (0.9*Lx, Ly/2) { Avoid zero } elevation( phase) from (0,Ly/2) to (0.9*Lx,Ly/2) elevation( Ezr, Ezi, Ezp) on 'outer' contour( Ezr) contour( Ezi) END