Skip to content
Projects

Global model

The equations of carafe.global_model, declared on the code that implements them and checked by the tests.

ion_area

functionsource

Return the effective area in m^2 through which an ion leaves at u_B.

area
Ai=h Aloss+Lc w(Te,Tg,Mi)A_i = h\, A_\mathrm{loss} + L_c\, w(T_e, T_g, M_i)
Assumes
  • h∈(0,1]h \in (0, 1] the edge-to-centre density ratio, an input
  • AlossA_\mathrm{loss} the unconfined area, the whole wall by default; the cusp area depends on the ion's mass, so each ion has its own AiA_i
References
  • Lieberman and Lichtenberg, Principles of Plasma Discharges and Materials Processing, 2nd ed. (2005), ch. 10
Built from

leak_width

functionsource

Return the leak width in m.

leak width
w=4ρeρi,ρ=m eTeBw = 4\sqrt{\rho_e \rho_i}, \qquad \rho = \frac{\sqrt{m\, e T}}{e B}
area
Acusp=Lc wA_\mathrm{cusp} = L_c\, w
Assumes
  • the gyroradius at the thermal speed eT/m\sqrt{eT/m}: TeT_e for ρe\rho_e, TgT_g for ρi\rho_i
  • BB the cusp field at the wall, LcL_c the total length of the cusp lines
References
  • Bosch and Merlino (1986), the hybrid leak width

GasTemperature

classsource

The gas temperature as a balance: heating by the reactions against conduction.

balance
c N dTgdt=∑reactionsR εg−κ (Tg−Tw)Λ2 1kBc\, N\, \frac{dT_g}{dt} = \sum_\mathrm{reactions} R\,\varepsilon_g - \frac{\kappa\,(T_g - T_w)}{\Lambda^2}\,\frac{1}{k_B}
Assumes
  • NN the total neutral density, fixed species included; cc the heat capacity per particle in kBk_B
  • conduction to the walls over the diffusion length Λ\Lambda; the eV difference converted with e/kBe/k_B
  • cc only sets the time scale of TgT_g: the steady state does not depend on it

GlobalModel

classsource

The balances of a plasma in a chamber; see the module docstring.

particles
dnsdt=∑reactionsνsR+∑sourcescsS−Γsw+∑walls(products)+FsV−nsSpV\frac{dn_s}{dt} = \sum_\mathrm{reactions} \nu_s R + \sum_\mathrm{sources} c_s S - \Gamma^w_s + \sum_\mathrm{walls} (\text{products}) + \frac{F_s}{V} - \frac{n_s S_p}{V}
sources
S=rate(Te,Tg [,n])∏pern,ne=∑sZsnsS = \text{rate}(T_e, T_g\,[, n]) \prod_\mathrm{per} n, \qquad n_e = \sum_s Z_s n_s
ion wall loss
Γiw=nieTeMi AiV\Gamma^w_i = n_i \sqrt{\frac{e T_e}{M_i}}\, \frac{A_i}{V}
neutral wall loss
Γnw=γ vˉ4 n AwV,vˉ=8eTgπm\Gamma^w_n = \gamma\, \frac{\bar v}{4}\, n\, \frac{A_w}{V}, \qquad \bar v = \sqrt{\frac{8 e T_g}{\pi m}}
electron wall loss
Γe=Γ++q˙−,Γ+=∑iZiΓiw,q˙−=−∑sources∑sZscsS\Gamma_e = \Gamma_+ + \dot q_-, \qquad \Gamma_+ = \sum_i Z_i \Gamma^w_i, \qquad \dot q_- = -\sum_\mathrm{sources} \sum_s Z_s c_s S
energy
ddt(32neTe)=PabseV−∑R εe+∑S εsrc−Pw\frac{d}{dt}\left(\tfrac32 n_e T_e\right) = \frac{P_\mathrm{abs}}{eV} - \sum R\,\varepsilon_e + \sum S\,\varepsilon_\mathrm{src} - P_w
wall energy
Pw=2TeΓe+12Te∑iΓiw+Γ+Δϕ+(Γe−Γ+)(12Te+Δϕ)P_w = 2 T_e \Gamma_e + \tfrac12 T_e \sum_i \Gamma^w_i + \Gamma_+ \Delta\phi + (\Gamma_e - \Gamma_+)\left(\tfrac12 T_e + \Delta\phi\right)
sheath
Δϕ=∑iZiΓiwVf,iΓ+−Teln⁡ΓeΓ+,Vf,i=Teln⁡Mi2πme\Delta\phi = \frac{\sum_i Z_i \Gamma^w_i V_{f,i}}{\Gamma_+} - T_e \ln\frac{\Gamma_e}{\Gamma_+}, \qquad V_{f,i} = T_e \ln\sqrt{\frac{M_i}{2\pi m_e}}
Assumes
  • a uniform plasma with Maxwellian electrons; Bohm losses need λD≪\lambda_D \ll the chamber
  • νs\nu_s the stoichiometric change, csc_s the change per source event, FsF_s the feed (1/s), SpS_p the pumping speed (unknown neutrals only)
  • negative ions do not reach the walls; the Bohm speed carries no factor ZZ
  • the presheath 12Te\tfrac12 T_e is per ion and the sheath drop per charge, the same only for Z=1Z = 1
  • nen_e floored at 1 m−3^{-3} in the energy equation; a fixed species' dn/dtdn/dt is reported, not integrated
References
  • Lieberman and Lichtenberg, Principles of Plasma Discharges and Materials Processing, 2nd ed. (2005), ch. 10
Built from

steady_state

functionsource

Return the steady state.

unknowns
u=(ln⁡ns, ln⁡Te, [ln⁡Tg]),dln⁡udt=u˙uu = (\ln n_s,\ \ln T_e,\ [\ln T_g]), \qquad \frac{d \ln u}{dt} = \frac{\dot u}{u}
pseudo time
BDF from t=0 to tmax until max⁡∣dln⁡udt∣<10−6 σ,σ=max⁡(max⁡sgrosssns, 1)\text{BDF from } t = 0 \text{ to } t_\mathrm{max} \text{ until } \max\left|\frac{d\ln u}{dt}\right| < 10^{-6}\, \sigma, \qquad \sigma = \max\left(\max_s \frac{\text{gross}_s}{n_s},\ 1\right)
polish
Powell’s hybrid root finder on dln⁡udt=0 (tol 10−13)\text{Powell's hybrid root finder on } \frac{d\ln u}{dt} = 0 \ (\text{tol } 10^{-13})
converged
max⁡∣dln⁡udt∣<tolerance⋅σ\max\left|\frac{d\ln u}{dt}\right| < \text{tolerance}\cdot\sigma
Assumes
  • solve_ivp(method='BDF', rtol=1e-6, atol=1e-9); the BDF end point is kept if the root finder fails
  • start: given densities, else positive ions 10−410^{-4}, negative ions 10−610^{-6}, neutrals 10−210^{-2} of the fixed gas density, Te=3T_e = 3 eV
  • the log state clipped to ±600\pm 600 (densities) and ±100\pm 100 (temperatures)
  • thermalize_electrons pulls ln⁡Te\ln T_e up to ln⁡Tg\ln T_g on 10−810^{-8} s