{ Box.PDE } { This problem computes the field in a metal box, with the lid at a fixed potential relative to the remaining sides. (See example 4-7 in Cheng) } Title 'Box Capacitor' Variables V ! The electrostatic potential Definitions a=2 ! Box width b=1 ! Box Height V0=1 ! Lid Voltage eps0=8.854e-12 ! Free-space permittivity eps=eps0 ! permittivity variable used in calculations { Here we find the charge and capacitance } Qt=eps*LINE_INTEGRAL(Normal(grad(V)),'lid') Cbox =Qt/V0 Equations DIV(-eps*GRAD(V)) = 0 ! Laplace's equation Boundaries REGION 1 'box' eps=eps0 Start(0,b) Value(V)=0 Line to (0,0) to (a,0) to (a,b) ! The grounded sides Value(V)=1 Line to Finish ! The lid { Now define a path across the lid, used to find the charge} START "lid" (0,b) LINE TO (a,b) FINISH Plots Contour(V) Report(Cbox) End