Skip to content
Projects

Poisson's equation

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

BoltzmannElectrons

classsource

Boltzmann plasma electrons for positive-ion extraction.

density
ρe=−ρe0exp⁡(ϕ−UpTe)\rho_e = -\rho_{e0} \exp\left(\frac{\phi - U_p}{T_e}\right)
neutral
ρe0=∑beamsJv0,v0=2Eem\rho_{e0} = \sum_\mathrm{beams} \frac{J}{v_0}, \qquad v_0 = \sqrt{\frac{2 E e}{m}}
Assumes
  • isothermal electrons in equilibrium with the potential: no inertia, flow or sheath beyond the Boltzmann factor
  • ρe0\rho_{e0} given, or by default the charge density of the beams at their start, so the plasma is neutral there (ParticleBeams add nothing)
  • TeT_e and UpU_p in eV and V; the species has the sign s=−1s = -1

BoltzmannIons

classsource

Thermal positive plasma ions for negative-ion extraction.

density
ρp=ρp0exp⁡(−ϕ−UpTp)\rho_p = \rho_{p0} \exp\left(-\frac{\phi - U_p}{T_p}\right)
neutral
ρp0=∑beamsJv0,v0=2Eem\rho_{p0} = \sum_\mathrm{beams} \frac{J}{v_0}, \qquad v_0 = \sqrt{\frac{2 E e}{m}}
both signs
ρ=s ρ0 e−s(ϕ−Up)/T,s=+1 (ions), −1 (electrons)\rho = s\, \rho_0\, e^{-s (\phi - U_p) / T}, \qquad s = +1 \text{ (ions)}, \ -1 \text{ (electrons)}
Assumes
  • the plasma's positive ions, repelled by the extraction field; the negative ions and the co-extracted electrons are traced beams
  • isothermal ions in equilibrium with the potential, Tp>0T_p > 0
  • ρp0\rho_{p0} given, or by default the negative charge density of the beams at their start

IonOpticsPoisson

classsource

Solve laplace(phi) = -rho / epsilon_0 (plus a Boltzmann plasma species) on a mesh.

poisson
∇2ϕ=−ρb+ρpε0,∇2=∂x2+1r∂r(r ∂r) (cylindrical, ∂θ=0)\nabla^2 \phi = -\frac{\rho_b + \rho_p}{\varepsilon_0}, \qquad \nabla^2 = \partial_x^2 + \frac{1}{r}\partial_r (r\, \partial_r) \text{ (cylindrical, } \partial_\theta = 0)
shortley weller
h2∂x2ϕ≈2 ϕ−(α+β)α+2 ϕ+(α+β)β−2 ϕ0αβh^2 \partial_x^2 \phi \approx \frac{2\, \phi_-}{(\alpha + \beta)\alpha} + \frac{2\, \phi_+}{(\alpha + \beta)\beta} - \frac{2\, \phi_0}{\alpha \beta}
radial
h21r∂r(r ∂rϕ)≈2/α−1/jα+β ϕ−+2/β+1/jα+β ϕ+−2αβ ϕ0,j≥1h^2 \frac{1}{r}\partial_r (r\, \partial_r \phi) \approx \frac{2/\alpha - 1/j}{\alpha + \beta}\, \phi_- + \frac{2/\beta + 1/j}{\alpha + \beta}\, \phi_+ - \frac{2}{\alpha \beta}\, \phi_0, \quad j \ge 1
axis
h21r∂r(r ∂rϕ)∣r=0≈4(ϕ1−ϕ0)h^2 \frac{1}{r}\partial_r (r\, \partial_r \phi)\Big|_{r = 0} \approx 4 (\phi_1 - \phi_0)
neumann
ϕ−1=ϕ1+2hg:h2∂x2ϕ≈2(ϕ1−ϕ0)β2+2hgβ\phi_{-1} = \phi_1 + 2 h g: \qquad h^2 \partial_x^2 \phi \approx \frac{2 (\phi_1 - \phi_0)}{\beta^2} + \frac{2 h g}{\beta}
rhs
b=−h2ρε0−∑fixed neighboursw ϕfixedb = -\frac{h^2 \rho}{\varepsilon_0} - \sum_\text{fixed neighbours} w\, \phi_\text{fixed}
Order
2
Assumes
  • α\alpha, β\beta the distances to the lower and upper neighbour or electrode surface in units of hh (1 away from electrodes); for α=β=1\alpha = \beta = 1 the 5-point stencil
  • gg the outward normal derivative of a Neumann face [V/m]
  • the linear system solved by SuperLU (scipy.sparse.linalg.splu), its factorisation cached per set of fixed nodes
  • the order is in hh, for a smooth potential away from electrode corners
References
  • G. H. Shortley and R. Weller, J. Appl. Phys. 9, 334 (1938)

solve

functionsource

Return the potential (nx, ny) for the charge density rho [C/m^3].

residual
R(u)=Au−b+s a e−s(u−Up)/T,a=ρ0h2ε0R(u) = A u - b + s\, a\, e^{-s (u - U_p) / T}, \qquad a = \frac{\rho_0 h^2}{\varepsilon_0}
newton
(A−diag⁡a e−s(u−Up)/TT)δu=−R(u),u←u+δu\left(A - \operatorname{diag}\frac{a\, e^{-s (u - U_p) / T}}{T}\right) \delta u = -R(u), \qquad u \leftarrow u + \delta u
stop
max⁡∣δu∣<10−6max⁡(ptp⁡(ϕfixed), T, 1 V)\max |\delta u| < 10^{-6} \max\left(\operatorname{ptp}(\phi_\text{fixed}),\ T,\ 1\ \mathrm{V}\right)
Assumes
  • s=±1s = \pm 1 the sign of the Boltzmann species; the exponent capped at 50 to keep a bad first guess finite
  • started from the vacuum solution or the previous potential; undamped, at most 100 steps, the last iterate returned without a warning
  • without a plasma species one linear solve; an initial plasma region is held at UpU_p as extra fixed nodes
Built from