{Epot_PL_0.5el.PDE - Electric POTential assuming PLanar surface D.Bakewell 16:45 9/10/2000 } SELECT regrid=on {enable adaptive grid - warning can take too long} { regrid=off } !errlim=8e-5 COORDINATES cartesian(x,y) VARIABLES Phi {Electric potential} Ex {Flux in X direction} Ey {Flux in X direction} E2 {mgde} grdE2x {grad E^2 in X dirn} grdE2y {grad E^2 inY dirn} !LgrdE2x ! logE2 {PhiAbs PhiLog} DEFINITIONS om=1*10^(-6) W=10*om {electrode boundary Width} He=0.1*om {electrode boundary Height} Gap=W {boundary - gap between electrodes} Hx=10*om {External height} a=0*om b=0*om {External rectangular boundary horizontal & vertical origin} c=a+Gap/2 d=b+He e=c+W/2 f=b+Hx V=1E1 Vo=V Mxgrde2x=GLOBALMAX(grdE2x) xh=pi*x/(2*W)+(pi/4) yh=pi*y/(2*W) { h = 'hat' } Exi=(2.*Vo/(pi*W))*(ARCTAN(sin(xh)/sinh(yh))-ARCTAN(cos(xh)/sinh(yh))) Eyi=(Vo/(pi*W))*(LN(cosh(yh)+cos(xh))-LN(cosh(yh)-cos(xh))+ LN(cosh(yh)+sin(xh))-LN(cosh(yh)-sin(xh))) Dpos=cosh(2*yh)+cos(2*xh) Dneg=cosh(2*yh)-cos(2*xh) Exyi=2.*Vo*cosh(yh)/(W^2)*(cos(xh)/Dpos-sin(xh)/Dneg) Eyxi=Exyi Exxi=2.*Vo*sinh(yh)/(W^2)*(cos(xh)/Dneg+sin(xh)/Dpos) Eyyi=-Exxi E2i=Exi*Exi+Eyi*Eyi grdE2xi=2*(Exi*Exxi+Eyi*Eyxi) grdE2yi=2*(Exi*Exyi+Eyi*Eyyi) {logE2i=LOG10(E2i+10^(-20))} EQUATIONS div[grad(Phi)]=0 {2D Laplace's equation } !PhiAbs=ABS(Phi) {doesn't work very well!!} !PhiLog=LOG10(PhiAbs) dx(Phi)=-Ex {for monitoring Electric field in X direction} dy(Phi)=-Ey {for monitoring Electric field in Y direction} E2=Ex*Ex+Ey*Ey {logE2=LOG10(E2)} 2*(Ex*dx(Ex)+Ey*dx(Ey))=grdE2x {grad E^2 in X dirctn} ! Mxgrde2x=GLOBALMAX(grdE2x) Ex*dy(Ex)+Ey*dy(Ey)=grdE2y {grad E^2 in Y dirctn} { LgrdE2x=SIGN(grdE2x)*LOG10(ABS(grdE2x))} BOUNDARIES Region 1 { define region 2 RECTANGLE boundary on horizontal plane } start (a,b) Neumann(Phi)=0 line to (c,b) Value(Phi)=V line to (c,d) to (e,d) Neumann(Phi)=0 line to (e,f) {Value(Phi)=0} Neumann(Phi)=0 line to (a,f) Value(Phi)=0 line to finish MONITORS for cycle=10 {contour(LgrdE2x)} contour(Phi) contour(Ex) contour(Ey) contour(Exi) contour(Eyi) {contour(grdE2x) report(MxgrdE2x)} contour(E2) contour(E2i) contour(grdE2xi) contour(grdE2yi) elevation(Phi) from (a,d) to (c,d) elevation(Ex) from (a,d) to (e,d) elevation(Ey) from (a,d) to (e,d) PLOTS elevation(Phi) from (a,b) to (c,b) elevation(Phi) from (e,d) to (e,f) contour(Ex) contour(Exi) contour(Ey) Contour(Eyi) contour(grdE2x) report(MxgrdE2x) contour(grdE2xi) contour(grdE2y) contour(grdE2yi) elevation(Ex) from (a,d) to (e,d) elevation(Ey) from (a,d) to (e,d) { plot prints a tag-delimited data list to the file "filename.TXT":} contour(Phi) {table(Phi)} export format {"#t#b#"} "#x#b#y#b#" file="c:\windows\desktop\Phi.dat" transfer(Phi) file="c:\windows\desktop\PhiTrans.dat" END 63577