Skip to content
Projects

Neutral gas 2D

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

couple_neutrals

functionsource

The plasma and the neutral gas iterated to a common steady state.

pass
Nk+1=steady NeutralFluid2D(plasmak),plasmak+1=steady Fluid2D(rNk+1+(1−r)Nk, ⟨Tg⟩)N^{k+1} = \text{steady } \texttt{NeutralFluid2D}(\text{plasma}^k), \qquad \text{plasma}^{k+1} = \text{steady } \texttt{Fluid2D}\big(r N^{k+1} + (1 - r) N^k,\ \langle T_g\rangle\big)
mean free path
λi←λi ⟨N⟩start⟨N⟩\lambda_i \leftarrow \lambda_i\,\frac{\langle N\rangle_\mathrm{start}}{\langle N\rangle}
stop
max⁡smax⁡∣Δns∣max⁡ns<tolerance (10−3),at most 30 passes\max_s \frac{\max|\Delta n_s|}{\max n_s} < \text{tolerance} \ (10^{-3}), \quad \text{at most 30 passes}
Assumes
  • the plasma model has one gas temperature: the density-weighted mean of the neutrals'
  • each plasma solve from the last state with Δt=10−7\Delta t = 10^{-7} s, retried with the default; a failed solve stops the passes
Built from

half_maxwellian_fluxes

functionsource

The particle and energy flux of a drifting Maxwellian through a plane.

particles
Γ=n ueff=nvp2π(e−s2+π s (1+erf s)),vp=2eTm,s=uvp\Gamma = n\, u_\mathrm{eff} = \frac{n v_p}{2\sqrt\pi}\left(e^{-s^2} + \sqrt\pi\, s\,(1 + \mathrm{erf}\, s)\right), \qquad v_p = \sqrt{\frac{2eT}{m}}, \quad s = \frac{u}{v_p}
energy
Q=nmvp34π e((1+s2)e−s2+π s (1+erf s)(32+s2))+(1+z2)T ΓQ = \frac{n m v_p^3}{4\sqrt\pi\, e}\left((1 + s^2) e^{-s^2} + \sqrt\pi\, s\,(1 + \mathrm{erf}\, s)\left(\tfrac32 + s^2\right)\right) + \left(1 + \frac{z}{2}\right) T\,\Gamma
Assumes
  • the particles of a drifting Maxwellian that cross a plane along its normal; without drift nvˉ/4n\bar v/4 and (2+z/2)T(2 + z/2)T each
  • zz internal degrees of freedom carrying z/2 Tz/2\,T per particle; TT floored at 10−410^{-4} eV
References

hard_sphere

functionsource

K(T) = sigma sqrt(8 k T / (pi mu)): hard spheres of sigma [m^2].

rate
K(T)=σ8eTπμ,μ=mambma+mbK(T) = \sigma\sqrt{\frac{8 e T}{\pi\mu}}, \qquad \mu = \frac{m_a m_b}{m_a + m_b}
Assumes
  • the mean relative speed of a Maxwellian pair; TT in eV, floored at 10−410^{-4} eV

NeutralFluid2D

classsource

The neutral gas on the cells of a grid; see the module docstring.

continuity
∂tn+∇⋅(nu)=Rn\partial_t n + \nabla\cdot(n\mathbf u) = R_n
momentum
∂t(mnu)+∇⋅(mnuu)=−∇(neT)+μ(∇2u+13∇∇⋅u)−∑jμnjnνnj(u−uj)+SR\partial_t(m n\mathbf u) + \nabla\cdot(m n\mathbf u\mathbf u) = -\nabla(n e T) + \mu\left(\nabla^2\mathbf u + \tfrac13\nabla\nabla\cdot\mathbf u\right) - \sum_j \mu_{nj} n\nu_{nj}(\mathbf u - \mathbf u_j) + \mathbf S_R
energy
∂t(3+z2nT)+∇⋅Q=P,Q=5+z2Tnu−κ∇T\partial_t\left(\tfrac{3 + z}{2} n T\right) + \nabla\cdot\mathbf Q = P, \qquad \mathbf Q = \tfrac{5 + z}{2} T n\mathbf u - \kappa\nabla T
transport
μ=23mneT∑jμnjνnj,κ=5+z2neT∑jμnjνnj,μnj=mmjm+mj,νnj=njKnj\mu = \frac{\tfrac23 m n e T}{\sum_j\mu_{nj}\nu_{nj}}, \qquad \kappa = \frac{\tfrac{5 + z}{2} n e T}{\sum_j\mu_{nj}\nu_{nj}}, \qquad \mu_{nj} = \frac{m m_j}{m + m_j}, \quad \nu_{nj} = n_j K_{nj}
exchange
Pnj=μnjnνnjm+mj(3(Tj−T)+mj∣u−uj∣2e)P_{nj} = \frac{\mu_{nj} n\nu_{nj}}{m + m_j}\left(3(T_j - T) + \frac{m_j|\mathbf u - \mathbf u_j|^2}{e}\right)
walls
Γout=nueff,back: (1−∑γ)Γout+products+ion wall products,(1−α) incident+α(2+z/2)Twall\Gamma_\mathrm{out} = n u_\mathrm{eff}, \qquad \text{back: } (1 - \textstyle\sum\gamma)\Gamma_\mathrm{out} + \text{products} + \text{ion wall products}, \quad (1 - \alpha)\,\text{incident} + \alpha(2 + z/2)T_\mathrm{wall}
rhie chow
Γf=nf(uˉf−(∇p)f−∇p‾faP)⋅n^\Gamma_f = n_f\left(\bar{\mathbf u}_f - \frac{(\nabla p)_f - \overline{\nabla p}_f}{a_P}\right)\cdot\hat{\mathbf n}
Assumes
  • KnjK_{nj} at the pair temperature (mjT+mTj)/(m+mj)(m_j T + m T_j)/(m + m_j); jj includes the species itself in the denominators only
  • products born at the heavy reactants' centre-of-mass velocity and mass-weighted temperature; r–z keeps −μur/r2-\mu u_r/r^2, ∇μ\nabla\mu is dropped
  • cell-centred velocities and temperatures, Rhie–Chow face fluxes, no-slip walls with the kinetic fluxes; backward Euler, Newton in ln⁡n\ln n, ln⁡T\ln T
  • the continuum limit at Knudsen numbers 0.1–0.3: no kinetic check yet; collision rates and wall data are placeholders
References
Built from