TITLE 'Plane Wave in Two Different Media, B' { sim166.pde } SELECT errlim=1e-6 spectral_colors COORDINATES cartesian1 VARIABLES Ezr Ezi DEFINITIONS Lx=1.0 Ly=0.05 eps0=8.85e-12 eps mu0=4*pi*1e-7 mu sigma c0=3.00e8 omega=3e9 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 } Byr=dx( Ezi)/omega Byi=-dx(Ezr)/omega EQUATIONS Ezr: dxx( Ezr)+ mu*eps*omega^2*Ezr+ mu*sigma*omega*Ezi=0 Ezi: dxx( Ezi)+ mu*eps*omega^2*Ezi- mu*sigma*omega*Ezr=0 BOUNDARIES region 'vacuum' eps=eps0 mu=mu0 sigma=0 start(0) point value(Ezr)=Ez_in point value(Ezi)=0 line to (Lx) point value(Ezr)=0 point value(Ezi)=0 region 'hypo' eps=4*eps0 mu=mu0 sigma=1e-2 start(Lx/2) line to (Lx) to (Lx) to (Lx/2) PLOTS elevation( Ezr, Ezi) from (0,Ly/2) to (Lx,Ly/2) elevation( Byr, Byi) from (0,Ly/2) to (Lx,Ly/2) END