next up previous contents
Next: GNU Archimedes Commands Syntax Up: Coupling between Monte Carlo Previous: Numerical Resolution of the   Contents

Electric Field Calculation

The electric field is easily computed once we have the solution of the static Poisson equation or the NSP equation. The definition of the electric field is as follows

$\displaystyle {\bf E} (x,y) = - \nabla \phi (x,y)$ (6.10)

So, in the context of finite-difference approximations, we compute the electric field in the various cells of the grid as follows
$\displaystyle {E_x}_{i,j}$ $\displaystyle =$ $\displaystyle - \frac{\phi_{i+1,j}- \phi_{i-1,j}}{2 \Delta x}$ (6.11)
$\displaystyle {E_y}_{i,j}$ $\displaystyle =$ $\displaystyle - \frac{\phi_{i,j+1}- \phi_{i,j-1}}{2 \Delta y}$ (6.12)

These simple expressions are used in GNU Archimedes and, even if very simple, they are accurated and robust.



Didier Link 2007-05-18