{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Fo nt 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 128 0 128 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 11 0 128 128 1 2 1 2 0 0 0 0 0 0 } 0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "slosh.mws" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 73 "7/15/96 solve for a p article sloshing around in a double potential well" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 112 "This is a program to fin d the lowest solutions of a double well problem so that an animation c an be done of the " }}{PARA 0 "" 0 "" {TEXT -1 67 "electron tunneling \+ back and forth between the sides of the barrier." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 122 "The 'radius' is the valu e where we run into the infinite well wall. The width is the barrier w idth and the height is that " }}{PARA 0 "" 0 "" {TEXT -1 15 "of the ba rrier." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "restart;with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "const:=(6.626E-34*1E9/(2*Pi))^2 /(2*9.1E-31 * 1.602E-19);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "ck:=37645/(100000*Pi^2);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "V := a*Heaviside(x-b);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "Decimals:=15;" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 32 "width:=5; height:=1; radius:= 6;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "plot(subs(a=height,b=width,V),x=0..radius ); # half of the double well" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "eq1:=-ck*diff(y(x),x,x) +subs(a=height,b=width,V)*y(x) = eV*y(x) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 87 "The origin of coordinates for the following calcs is in the corner of an infinite well." }}{PARA 0 "" 0 "" {TEXT -1 41 "The wave functio n starts off as sin (kx)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 69 "for j from 0.0139445*height to 0.013945*heig ht by 0.0000001*height do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "k:=sqr t(j/ck): j:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 96 "Y_even:=dsolve(\{sub s(eV=j,eq1),D(y)(width)=k*cos(k*width),y(width)=sin(k*width)\},y(x),nu meric): " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "rhs(Y_even(radius)[2]); od;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 89 "The following lines of code were revised repeatedly to obtain a solution close to y=0 at " }}{PARA 0 "" 0 "" {TEXT -1 26 "the center \+ of the barrier." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "Energy:=13944793 *height/1000000000; k:=sqrt(Energy/ck); # solve for y=0" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 102 " Y_even:=dsolve(\{subs(eV=Energy,e q1),D(y)(width)=k*cos(k*width),y(width)=sin(k*width)\},y(x),numeric): \+ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 " odeplot(Y_even,[x,y(x) ],0..radius);Y_even(radius);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 119 "The following lines of code were revis ed repeatedly to obtain a solution close to dy/dx=0 at the center of t he barrier." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "Energy1:=139446326*h eight/10000000000; k1:=sqrt(Energy1/ck); # solve for dydx=0" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 105 "Y_even:=dsolve(\{subs(eV=En ergy1,eq1),D(y)(width)=k1*cos(k1*width),y(width)=sin(k1*width)\},y(x), numeric): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "odeplot(Y_eve n,[x,y(x)],0..radius);Y_even(radius);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 " x:=Energy-Energy1; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 " freq:=x*1.602E-19/6.63 6E-34; # difference between frequencies" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 79 "get wave function for sym metric mode: cos (kx + c), cosh kappa x, kR+c = Pi/2" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "kappa1:=sqrt(( height-Energy1)/ck);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "eq1 := cos(Pi/2 - k1*width) = B*cosh(kappa1*(radius-width));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "B1:=solve(eq1,B);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "psi1:=-cos(Pi/2-k1*(y-radius))*Heaviside (y-(radius-width))+B1*cosh(kappa1*y)*Heaviside(radius-width-y);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "plot(psi1,y=0..radius); # sy mmetric wave function" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "pl ot(subs(y=abs(z),psi1),z=-radius..radius,title=`symmetric wave fxn`); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 83 "get wave function for antisymmetric mode: cos (kx + c), sinh kapp a x, kR+c = Pi/2" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 32 "kappa:=sqrt((height-Energy)/ck);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "eq1:= cos(Pi/2 - k*width) = D*sinh(kappa* (radius-width));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "D1:=sol ve(eq1,D);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 96 "psi2:=-sin(k* (y-radius))*Heaviside(y-(radius-width))+D1*sinh(kappa*y)*Heaviside(rad ius-width-y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "plot(psi2, y=0..radius); # antisymmetric wave function" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "psiasm:=(Heaviside(z)-Heaviside(-z))*subs(y=abs(z) ,psi2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "plot(psiasm,z=-r adius..radius,title=`anti-symm. wave fxn`);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 48 "Add symmetric and antisymm functions and animate" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "psitot:=psiasm+subs(y=abs(z),psi1); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "plot(psitot,z=-radius.. radius);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "f1:=Energy1*1.602E-19/6.626E-34;" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 30 "f:=Energy*1.602E-19/6.626E-34;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "psitime:=psiasm*cos(f*t)+subs(y=abs (z),psi1)*cos(f1*t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "plo t(subs(t=0,psitime),z=-radius..radius);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "plot(subs(t=5E-8,psitime^2),z=-radius..radius);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "animate(psitime^2,z=-radius. .radius,t=0..1.466666667E-7,frames=21,numpoints=150,color=blue);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "well:=Heaviside(1-abs(z));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "plot(well,z=-radius..radius);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "animate(\{psitime^2,well\},z=-radius..radius,t=0..1.4 66666667E-7,frames=21,numpoints=150,color=blue);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 8 }{VIEWOPTS 1 1 0 1 1 1803 }