include/pops/validation/physics/langmuir.hpp Source FileΒΆ

adc_cpp: include/pops/validation/physics/langmuir.hpp Source File
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
langmuir.hpp
Go to the documentation of this file.
1#pragma once
2
11
13
14#include <cmath>
15
16namespace pops::validation {
17
41 Real omega_p = 1.0;
42 Real cs2k2 = 0.0;
43
51 POPS_HD void explicit_step(Real& a, Real& b, Real dt) const { b += dt * (-cs2k2 * a); }
52
62 POPS_HD void implicit_solve(Real& a, Real& b, Real dt) const {
63 const Real as = a, bs = b, w2 = omega_p * omega_p;
64 a = (as + dt * bs) / (1 + dt * dt * w2);
65 b = bs - dt * w2 * a;
66 }
67
69 Real omega() const { return std::sqrt(omega_p * omega_p + cs2k2); }
70};
71
72} // namespace pops::validation
Definition advection_diffusion.hpp:22
double Real
Definition types.hpp:30
Linearized Langmuir mode: 0D kernel of the asymptotic-preserving two-fluid scheme.
Definition langmuir.hpp:40
Real omega_p
plasma frequency (stiff term)
Definition langmuir.hpp:41
POPS_HD void explicit_step(Real &a, Real &b, Real dt) const
Explicit step (slow acoustic term) in place: (a,b) <- (a,b) + dt T.
Definition langmuir.hpp:51
Real cs2k2
c_s^2 k^2 (acoustic correction, slow)
Definition langmuir.hpp:42
Real omega() const
Eigenfrequency of the mode, omega = sqrt(omega_p^2 + c_s^2 k^2) (isothermal Bohm-Gross).
Definition langmuir.hpp:69
POPS_HD void implicit_solve(Real &a, Real &b, Real dt) const
Implicit step (stiff plasma term) in place: solves (a,b) = (a*, b*) + dt S.
Definition langmuir.hpp:62
Base scalar types and the POPS_HD macro (host+device portability).
#define POPS_HD
Definition types.hpp:25