Exercise 25

As with all of the exercises you will complete in this course, you will be expected to turn your *.nb file in to the course TA before the next lecture.  Please do so by e-mailing your completed exercise file to Lan Yu (ece329.uiuc@gmail.com), make sure you name the file using the following notation: “Exn_Last_First.nb”, where n is the Exercise number (in this case, 25), and First and Last would be your first and last name.  So my submission to Lan for this exercise would be titled “Ex25_Wasserman_Dan.nb”.  You will receive full credit for your exercise if it turned in before the next lecture (Lecture n+1).  No late submissions will be accepted.

Objective/Overview:

Today in class we began to discuss what happens to an E&M wave when it is incident on an interface.  Not surprisingly, this exercise will aim to give us a better understanding, and visualization of this process.

Incident Wave

We are going to want to visualize a wave incident on a surface, so let’s start with our incident wave.  We are going to try to use real numbers in our model, so lets assume that our wave is incident on a surface at z=0, and is traveling in the +(OverHat[z]) direction, with a frequency ω=2π*(10^14)rad/s in vacuum with (Subscript[μ, 1])=(Subscript[μ, o]) and (Subscript[ϵ, 1])=(Subscript[ϵ, o]) and amplitude (Subscript[E, i])=(OverHat[x])1V/m.  To get an idea of the range of z’s and t’s we should be looking at, let’s first calculate wavelength and period:

w=2*Pi*10^14; c=2.9979*10^8;muo=4*Pi*10^-7;epso=1/(muo*c^2);bo=w*Sqrt[muo*epso];etao=Sqrt[muo/epso];lam=2*Pi/bo
per=2*Pi/w

So this corresponds to light with a free-space wavelength of about 3μm...which would be in the mid-infrared.

ei={If[z<0,Re[Exp[-I*bo*z]*Exp[I*w*t]],0],0,0}

hi={0,(1/etao)*ei,0}

Animate[Plot[ei[[1]]/.{t->to},{z,-10*10^-6,10*10^-6}],{to,0,10^-13}]

We can also plot this as a plane wave, which looks pretty cool:

Animate[DensityPlot[ei[[1]]/.{t->to},{z,-10*10^-6,10*10^-6},{x,-10*10^-6,10*10^-6},ColorFunction->"RedBlueTones", PlotPoints->100],{to,0,10^-13},AnimationRate->.1]

Cool!  Now you will need to add the transmitted and reflected waves!  But we know how to do this, if we are given (Subscript[ϵ, 2]), (Subscript[σ, 2]) and (Subscript[μ, 2]). We’ll start assuming that σ=0, you can add conductivity in later...
So the first thing I am going to do is write a function that calculates the total electric field as a function of two inputs ((Subscript[μ, 2]),(Subscript[ϵ, 2])), this gives me the Electric field as a function of position at time t=0.

etot[mu2_,eps2_]:=(b2=w*Sqrt[muo*epso*mu2*eps2]; (*beta for z>0*)
eta2=etao*Sqrt[mu2/eps2];(*eta for z>0*)
gamma=(eta2-etao)/(etao+eta2); (*reflection coefficient*)
tau=1+gamma;(*transmission coefficient*)
etx=If[z>0,tau*Re[Exp[-I*b2*z]*Exp[I*w*t]],0];(*transmitted electric field*)
erx=If[z<0,Re[gamma*Exp[I*bo*z]*Exp[I*w*t]],0];(*reflected electric field*)
eix=If[z<0,Re[Exp[-I*bo*z]*Exp[I*w*t]],0];(*incident electric field*)Plot[eix+etx+erx/.{t->0},{z,-10*10^-6,10*10^-6}])

etot[1,2]

You can note a couple of things here:
1) The spacing between peaks (wavelength) for z>0 is smaller than for z<0, as long as you choose an (Subscript[ϵ, 2])≠(Subscript[ϵ, 1]).
2)  The amplitude of the wave is constant at the interface...but this makes sense, because we know from our boundary conditions, that tangential E field is constant across an interface!
3)  Right now it looks like the amplitudes of both waves (z>0 and z<0) are the same...but this is simply because we have frozen the wave at one point in time...
OK, let’s create a similar function that animates the wave:

etotvt[mu2_,eps2_]:=(b2=w*Sqrt[muo*epso*mu2*eps2];eta2=etao*Sqrt[mu2/eps2];gamma=(eta2-etao)/(etao+eta2);tau=1+gamma;etx=If[z>0,Re[tau*Exp[-I*b2*z]*Exp[I*w*t]],0];
erx=If[z<0,Re[gamma*Exp[I*bo*z]*Exp[I*w*t]],0];
eix=If[z<0,Re[Exp[-I*bo*z]*Exp[I*w*t]],0];Animate[Plot[eix+etx+erx/.{t->to},{z,-10*10^-6,10*10^-6}, PlotRange->{-1.5,1.5}],{to,0,10^-13}])

etotvt[1,5]

You will notice that the wave in the z<0 portion of the plot is bouncing around a lot.  That is because this wave is actually two waves,  the forward propagating incident wave, and the backward propagating reflected wave.  These waves are going to interfere, and that causes the ‘bouncing’ you see...
We can plot all three seperately if you like:

eirtvt[mu2_,eps2_]:=(b2=w*Sqrt[muo*epso*mu2*eps2];eta2=etao*Sqrt[mu2/eps2];gamma=(eta2-etao)/(etao+eta2);tau=1+gamma;etx=If[z>0,Re[tau*Exp[-I*b2*z]*Exp[I*w*t]],0];
erx=If[z<0,Re[gamma*Exp[I*bo*z]*Exp[I*w*t]],0];
eix=If[z<0,Re[Exp[-I*bo*z]*Exp[I*w*t]],0];Animate[Plot[{eix,etx,erx}/.{t->to},{z,-10*10^-6,10*10^-6}, PlotRange->{-1.5,1.5}],{to,0,10^-13}])

eirtvt[1,7]

This is actually pretty cool!
OK, now it’s your turn, use the same approach as above, but include conductivity ((Subscript[σ, 2]))

eirtvtsigma[mu2_,eps2_,sigma2_]:=(g=;
eta2s=;
gammas=;
taus=;
etxs=;
erxs=;
eixs=;Animate[Plot[{eixs,etxs,erxs}/.{t->to},{z,-10*10^-6,10*10^-6}, PlotRange->{-1.5,1.5},PlotLabel->{gammas,taus,etao,eta2s}],{to,0,10^-13}])

eirtvtsigma[1,1,100000000000]

This is very cool!  Try playing around with sigma and see what happens to the wave in both regions z<0 and z>0.  Writing the function this way also makes it easy to run the manipulate command, which would allow us that change inputs in real time...You might also want to plot the sum of the waves (instead of the waves individually).  You’ll notice something cool as sigma gets large...

Manipulate[eirtvtsigma[mu2,eps2,sigma2],{mu2,1},{eps2,1},{sigma2,0},ControlType->InputField]

eirtvtsigma2[mu2_,eps2_,sigma2_]:=(g=;
eta2s=;
gammas=;
taus=;
etxs=;
erxs=;
eixs=;Animate[Plot[(eixs+etxs+erxs)/.{t->to},{z,-10*10^-6,10*10^-6}, PlotRange->{-1.5,1.5},PlotLabel->{gammas,taus,etao,eta2s}],{to,0,10^-13}])

Manipulate[eirtvtsigma2[mu2,eps2,sigma2],{mu2,1},{eps2,1},{sigma2,0},ControlType->InputField]