Skip to content
Projects

Mesh

The equations of beamtracer.solver.mesh, declared on the code that implements them and checked by the tests.

IonOpticsMesh

classsource

A uniform 2D node mesh with electrodes, in planar or cylindrical geometry.

nodes
xi=x0+ih,yj=y0+jh(y=r in cylindrical geometry)x_i = x_0 + i h, \qquad y_j = y_0 + j h \quad (y = r \text{ in cylindrical geometry})
classes
solid  (ϕ=Velectrode),Dirichlet face,near solid  (a solid neighbour along ±x,±y),free\text{solid} \;(\phi = V_\mathrm{electrode}), \quad \text{Dirichlet face}, \quad \text{near solid} \;(\text{a solid neighbour along } \pm x, \pm y), \quad \text{free}
distance
d=s255 h,s∈{1,…,255},s bracketed by 8 bisection steps of the electrode’s inside testd = \frac{s}{255}\, h, \quad s \in \{1, \dots, 255\}, \qquad s \text{ bracketed by 8 bisection steps of the electrode's inside test}
Assumes
  • equal spacing hh on both axes; at least 3 nodes per axis
  • cylindrical: the mesh starts on the axis r=0r = 0, whose face is Neumann 0
  • where electrodes overlap the first in the list owns the node; a Dirichlet face fixes only its non-solid nodes