Skip to content
Projects

Gas dynamics

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

binary_diffusion

functionsource

The binary diffusion coefficient of hard spheres (Chapman-Cowling, first approximation).

diffusion
D=316 n πd22πkTμ,n=pkT,μ=mambma+mbD = \frac{3}{16\, n\, \pi d^2}\sqrt{\frac{2\pi k T}{\mu}}, \qquad n = \frac{p}{kT}, \qquad \mu = \frac{m_a m_b}{m_a + m_b}
Assumes
  • hard spheres, the first Chapman–Cowling approximation; dd the mean of the two diameters; good to tens of percent
References
  • Chapman and Cowling, The Mathematical Theory of Non-Uniform Gases (hard spheres, first approximation)

GasDynamics

classsource

Two-species compressible gas in 1D or 2D; see the module docstring.

species
∂tρg,m+∇⋅(ρg,mu)=∓∇⋅Jm+Sg,m,Jm=−ρD∇Y,Y=ρmρ\partial_t\rho_{g,m} + \nabla\cdot(\rho_{g,m}\mathbf u) = \mp\nabla\cdot\mathbf J_m + S_{g,m}, \qquad \mathbf J_m = -\rho D\nabla Y, \qquad Y = \frac{\rho_m}{\rho}
momentum
∂t(ρu)+∇⋅(ρuu+p)=Su\partial_t(\rho\mathbf u) + \nabla\cdot(\rho\mathbf u\mathbf u + p) = \mathbf S_u
energy
∂tE+∇⋅((E+p)u)=−∇⋅(Jm(hm−hg))+∇⋅(κ∇T)+SE,hs=γkT(γ−1)ms\partial_t E + \nabla\cdot\big((E + p)\mathbf u\big) = -\nabla\cdot\big(\mathbf J_m(h_m - h_g)\big) + \nabla\cdot(\kappa\nabla T) + S_E, \qquad h_s = \frac{\gamma k T}{(\gamma - 1) m_s}
state
p=nkT,n=ρgmg+ρmmm,E=pγ−1+12ρ∣u∣2,γ=53p = n k T, \qquad n = \frac{\rho_g}{m_g} + \frac{\rho_m}{m_m}, \qquad E = \frac{p}{\gamma - 1} + \tfrac12\rho|\mathbf u|^2, \qquad \gamma = \tfrac53
wall
emitted at Ts: Φm,  ΦmπkTs2m,  2kTsΦ;sticking s nmvˉ4;heat α nvˉ4 2k(T−Tw)\text{emitted at } T_s:\ \Phi m,\ \ \Phi m\sqrt{\frac{\pi k T_s}{2m}},\ \ 2kT_s\Phi; \qquad \text{sticking } s\,\frac{n_m\bar v}{4}; \qquad \text{heat } \alpha\,\frac{n\bar v}{4}\, 2k(T - T_w)
ion exchange
Su=ρsν(ui−u),SE=u⋅Su+12ρsν∣ui−u∣2+32nskν(Ti−T)\mathbf S_u = \rho_s\nu(\mathbf u_i - \mathbf u), \qquad S_E = \mathbf u\cdot\mathbf S_u + \tfrac12\rho_s\nu|\mathbf u_i - \mathbf u|^2 + \tfrac32 n_s k\nu(T_i - T)
Order
2
Assumes
  • argon and sputtered metal as one compressible gas with one velocity and temperature, in 1D or 2D (yy periodic); no viscosity
  • MUSCL on the primitives (van Leer by default; minmod, MC, none), HLLC with the species as passive fractions, SSP-RK3 at CFL 0.4
  • diffusion and conduction after each step by backward Euler, tridiagonal axis by axis; sputtered atoms at Ts=Em/2kT_s = E_m/2k
  • the continuum limit at Knudsen numbers 0.1–1; the order is that of a smooth wave with the unlimited reconstruction
References
  • Hecimovic and von Keudell, J. Phys. D 51, 453001 (2018)
  • Toro, Riemann Solvers and Numerical Methods for Fluid Dynamics (HLLC; not cited by the code)
Built from