27.12.2012 Views

Wave Propagation in Linear Media | re-examined

Wave Propagation in Linear Media | re-examined

Wave Propagation in Linear Media | re-examined

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8.3 Implementation of the quadratu<strong>re</strong> modules<br />

8 Application of the quadratu<strong>re</strong> rout<strong>in</strong>e<br />

Now that we have formulated all <strong>in</strong>tegrals <strong>in</strong> a way that suits our needs, we can write the<br />

quadratu<strong>re</strong> modules. S<strong>in</strong>ce they a<strong>re</strong> all based on the same structu<strong>re</strong>, we shall discuss he<strong>re</strong><br />

only the example of the <strong>re</strong>ctangular wave packet and a few functions that a<strong>re</strong> <strong>re</strong>lated to it. All<br />

other modules a<strong>re</strong> very similar <strong>in</strong> their structu<strong>re</strong> and can be understood without di culties<br />

from the list<strong>in</strong>g of the package <strong>in</strong> the appendix.<br />

The atomic function modules we use to de ne the <strong>in</strong>tegrands a<strong>re</strong> the transmission and <strong>re</strong>ection<br />

coe cients and the oscillatory factors of the <strong>in</strong>tegrands with<strong>in</strong> (TunOsc) and outside<br />

(OutOsc) the tunnel. In addition, we need the argument function of the oscillation <strong>in</strong>side<br />

the tunnel for the optional exact determ<strong>in</strong>ation of the <strong>in</strong>tegrand's zeros. These functions a<strong>re</strong><br />

<strong>in</strong>dependent of the waveform.<br />

TunCoeff[xi_] := 2 xi/(xi + Sqrt[xi^2-1]);<br />

RefCoeff[xi_] := (xi - Sqrt[xi^2-1])/(xi + Sqrt[xi^2-1]);<br />

TunOsc[a_,b_,c_,d_,xi_] := Exp[I (a xi^2 + b xi + c Sqrt[xi^2 - 1] + d)];<br />

OutOsc[a_,b_,c_,d_,xi_] := Exp[I (a xi^2 + (b+c) xi + d)];<br />

PhiArg[a_,b_,c_,d_][xi_] := a xi^2 + b xi + c Sqrt[xi^2 - 1] + d;<br />

Other basic functions like those describ<strong>in</strong>g the shape of the spectrum a<strong>re</strong> di e<strong>re</strong>nt for each<br />

waveform. Note that <strong>in</strong> the implementation we use the variable w for the parameter .<br />

RectConst[w_,k_] := I / (Sqrt[w] 2 Pi);<br />

RectShapePos[w_,xi_] := 1/(1-xi/Sqrt[w]);<br />

RectShapeNeg[w_,xi_] := 1/(1+xi/Sqrt[w]);<br />

With these build<strong>in</strong>g blocks we de ne the actual <strong>in</strong>tegrands that a<strong>re</strong> to be used <strong>in</strong>side the<br />

quadratu<strong>re</strong> rout<strong>in</strong>es. As we saw while formulat<strong>in</strong>g the <strong>re</strong>spective equations, we need two<br />

dist<strong>in</strong>ct functions for the positive and negative <strong>in</strong>de nite <strong>in</strong>tegrals. The <strong>in</strong>tegrand for the<br />

evanescent <strong>re</strong>gion is augmented by the coe cients and oscillatory factors that stem from the<br />

shape of the spectrum. The<strong>re</strong>fo<strong>re</strong> we can compute the <strong>in</strong>tegral with only one s<strong>in</strong>gle quadratu<strong>re</strong><br />

call. Ow<strong>in</strong>g to the particular structu<strong>re</strong> of the oscillatory factors, we need to pass only values<br />

for the parameters a and b to the quadratu<strong>re</strong> rout<strong>in</strong>e and must set b and d to zero <strong>in</strong> this<br />

case.<br />

RectTransPos[a_,b_,c_,d_,w_,k_][xi_] :=<br />

TunCoeff[xi] * RectShapePos[w,xi] * TunOsc[a,b,c,d,xi];<br />

RectTransNeg[a_,b_,c_,d_,w_,k_][xi_] :=<br />

TunCoeff[xi] * RectShapeNeg[w,xi] * TunOsc[a,b,c,d,xi];<br />

RectEvan[a_,b_,c_,d_,w_,k_][xi_] :=<br />

RectTransPos[a,b,c,d,w,k][xi] *<br />

(-1 + Exp[I 2 (Pi k/Sqrt[w] xi - Pi k)]);<br />

The constant RectConst is not part of the <strong>in</strong>tegrand because it is useless to compute it<br />

with each function evaluation. Instead, the constant is multiplied to the <strong>re</strong>sult of the enti<strong>re</strong><br />

200

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!