{Epot2D1gapThesis.PDE - Electric POTential D.Bakewell 17:00 Th/1/2/2000 } title 'time-dependent 2D electric potential' SELECT ! regrid=off { use fixed grid for 2D problems } regrid=on {enable adaptive grid - warning can take too long} COORDINATES cartesian(x,y) VARIABLES Phi {Electric potential} Ex {Flux in X direction} Ey {Flux in X direction} dxE2 {dy(E^2)} {d1yE2} dyE2 {dy(E^2)} { mgrdE2} {magnitude grad(E^2)} EMod DEFINITIONS om=10^(0) W=10*om {electrode width/gap} He=0.1*om {electrode boundary Height} x0=0*om y0=0*om { horizontal & vertical origin} Hx=30*om {External height} {a=arbitrary} b=y0+He c=x0+W/2. d=c+W e=2*W V=1 EQUATIONS div[grad(Phi)]=0 {2D Laplace's equation } dx(Phi)=-Ex {for monitoring Electric field in X direction} dy(Phi)=-Ey {for monitoring Electric field in Y direction} dx(Ex*Ex + Ey*Ey)=dxE2 dy(Ex*Ex + Ey*Ey)=dyE2 {d1yE2=-1.*USTEP(-dyE2-1.)} {d1yE2=-1.*USTEP(-dyE2-1)+dyE2*(1-USTEP(-dyE2-1))} sqrt(Ex^2 + Ey^2)=EMod BOUNDARIES Region 1 { define region 2 RECTANGLE boundary on horizontal plane } start (x0,b) Value(Phi)=V line to (c,b) to (c,y0) Neumann(Phi)=0 line to (d,y0) Value(Phi)=-V line to (d,b) to (e,b) Neumann(Phi)=0 line to (e,Hx) Neumann(Phi)=0 line to (x0,Hx) Neumann(Phi)=0 line to finish { time 0 to 0.05 by 0.01} { establish time range and initial timestep } MONITORS for cycle=1 contour(Phi) contour(Ex) contour(Ey) elevation(Phi) from (x0,y0) to (e,y0) elevation(Phi) from (x0,b) to (e,b) contour(EMod) {contour(mgrdE2)} { contour(grdEy2) elevation(Phi) from (a,j) to (h,j) elevation(Ex) from (a,j) to (h,j) elevation(Ey) from (a,j) to (h,j) elevation(dxE2) from (a,j) to (h,j) elevation(dyE2) from (a,j) to (h,j) elevation(d1yE2) from (a,j) to (h,j)} HISTORIES {history(Phi) at (20*om,20*om)} PLOTS contour(Phi) contour(EMod) elevation(Phi) from (x0,y0) to (e,y0) export format {"#t#b#"} "#x#b#y#b#" file="c:\windows\desktop\Phi.dat" END 8745