Euler Struct ReferenceΒΆ
|
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
|
2D compressible Euler for an ideal gas: HYPERBOLIC brick (HyperbolicModel concept). More...
#include <euler.hpp>
Collaboration diagram for pops::Euler:Public Types | |
| using | State = StateVec< 4 > |
| conservative variables (rho, rho u, rho v, E) | |
| using | Prim = StateVec< 4 > |
| primitive variables (rho, u, v, p) | |
| using | Aux = pops::Aux |
| auxiliary fields (unused in pure Euler) | |
Public Member Functions | |
| POPS_HD Real | pressure (const State &u) const |
| Ideal-gas pressure p = (gamma-1)(E - 1/2 rho |v|^2). | |
| POPS_HD Real | sound_speed (const State &u) const |
| Sound speed c = sqrt(gamma p / rho). | |
| POPS_HD Prim | to_primitive (const State &u) const |
| Conservative -> primitive: (rho, rho u, rho v, E) -> (rho, u, v, p). | |
| POPS_HD State | to_conservative (const Prim &p) const |
| Primitive -> conservative: (rho, u, v, p) -> (rho, rho u, rho v, E). | |
| POPS_HD void | wave_speeds (const State &u, const Aux &, int dir, Real &smin, Real &smax) const |
| Extreme signed wave speeds in direction dir: v_dir - c and v_dir + c. | |
| POPS_HD State | flux (const State &u, const Aux &, int dir) const |
| Compressible convective flux in direction dir. | |
| POPS_HD State | eigenvalues (const State &u, const Aux &, int dir) const |
| Full spectrum in direction dir: (v_dir - c, v_dir, v_dir, v_dir + c). | |
| POPS_HD Real | max_wave_speed (const State &u, const Aux &, int dir) const |
| Maximum wave speed |v_dir| + c (Rusanov estimate), computed in primitive variables. | |
Static Public Member Functions | |
| static VariableSet | conservative_vars () |
| Variable descriptor (hyperbolic model contract; host introspection metadata). | |
| static VariableSet | primitive_vars () |
Public Attributes | |
| Real | gamma = 1.4 |
| adiabatic index of the ideal gas | |
Static Public Attributes | |
| static constexpr int | n_vars = 4 |
| number of conserved variables | |
Detailed Description
2D compressible Euler for an ideal gas: HYPERBOLIC brick (HyperbolicModel concept).
Conservative variables U = (rho, rho u, rho v, E), with E = p/(gamma-1) + 1/2 rho (u^2 + v^2) and p = (gamma-1)(E - 1/2 rho |v|^2). The directional flux is F_x = (rho u, rho u^2 + p, rho u v, (E+p) u) and symmetrically in y; the maximum wave speed is |v_dir| + c with c = sqrt(gamma p/rho).
Pure HYPERBOLIC brick: variables (cons U, prim P) + conversions + flux + wave speeds. NO source or elliptic right-hand side here: those are SEPARATE bricks, assembled by CompositeModel. The aux argument is present for the contract (a drift transport reads grad phi) but does not enter the Euler flux.
- Note
- Everything is device-callable (POPS_HD): StateVec over a C array, std::sqrt (device intrinsic under nvcc), manual abs. Compatible with a GPU kernel like the scalar transport model.
Member Typedef Documentation
◆ Aux
| using pops::Euler::Aux = pops::Aux |
auxiliary fields (unused in pure Euler)
◆ Prim
| using pops::Euler::Prim = StateVec<4> |
primitive variables (rho, u, v, p)
◆ State
| using pops::Euler::State = StateVec<4> |
conservative variables (rho, rho u, rho v, E)
Member Function Documentation
◆ conservative_vars()
|
inlinestatic |
Variable descriptor (hyperbolic model contract; host introspection metadata).
◆ eigenvalues()
Full spectrum in direction dir: (v_dir - c, v_dir, v_dir, v_dir + c).
Vector counterpart of wave_speeds (which only gives the signed extremes); useful for spectrum schemes (Roe).
Here is the call graph for this function:◆ flux()
Compressible convective flux in direction dir.
Here is the call graph for this function:◆ max_wave_speed()
Maximum wave speed |v_dir| + c (Rusanov estimate), computed in primitive variables.
Here is the call graph for this function:◆ pressure()
Ideal-gas pressure p = (gamma-1)(E - 1/2 rho |v|^2).
Here is the caller graph for this function:◆ primitive_vars()
|
inlinestatic |
◆ sound_speed()
Sound speed c = sqrt(gamma p / rho).
Here is the call graph for this function:◆ to_conservative()
Primitive -> conservative: (rho, u, v, p) -> (rho, rho u, rho v, E).
◆ to_primitive()
Conservative -> primitive: (rho, rho u, rho v, E) -> (rho, u, v, p).
Here is the call graph for this function:
Here is the caller graph for this function:◆ wave_speeds()
|
inline |
Extreme signed wave speeds in direction dir: v_dir - c and v_dir + c.
Required by the HLL/HLLC fluxes, beyond the single max_wave_speed that Rusanov needs.
- Parameters
-
u conservative state dir face direction (0 = x, 1 = y) [out] smin leftmost wave speed v_dir - c [out] smax rightmost wave speed v_dir + c
Here is the call graph for this function:Member Data Documentation
◆ gamma
| Real pops::Euler::gamma = 1.4 |
adiabatic index of the ideal gas
◆ n_vars
|
staticconstexpr |
number of conserved variables
The documentation for this struct was generated from the following file:
- include/pops/physics/fluids/euler.hpp
Generated by