{Epot_2D_3el.PDE - Electric POTential D.Bakewell 17:00 We/15/8/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)} DEFINITIONS om=10^(0) W=10*om {electrode width/gap} He=0.1*om {electrode boundary Height} x0=-W*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=c+2*W f=c+3*W g=c+4*W h=c+5*W j=5*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(dxE2^2 + dyE2^2)=mgrdE2 BOUNDARIES Region 1 { define region 2 RECTANGLE boundary on horizontal plane } start (x0,y0) Neumann(Phi)=0 line to (c,y0) Value(Phi)=V line to (c,b) to (d,b) to (d,y0) Neumann(Phi)=0 line to (e,y0) Value(Phi)=-V line to (e,b) to (f,b) to (f,y0) Neumann(Phi)=0 line to (g,y0) Value(Phi)=V line to (g,b) to (h,b) to (h,y0) Neumann(Phi) = 0 line to (j,y0) Value(Phi)=0 line to (j,Hx) Neumann(Phi)=0 line to (x0,Hx) Value(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) {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)} END 8745