IsothermalFluxPolar Struct ReferenceΒΆ

adc_cpp: pops::IsothermalFluxPolar 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
pops::IsothermalFluxPolar Struct Reference

ISOTHERMAL Euler flux in POLAR geometry (ring r, theta), 3 variables (rho, rho v_r, rho v_theta) – "polar fluid grid" effort, Path A step 1. More...

#include <hyperbolic.hpp>

+ Inheritance diagram for pops::IsothermalFluxPolar:
+ Collaboration diagram for pops::IsothermalFluxPolar:

Public Member Functions

POPS_HD StateVec< 3 > polar_geom_source (const StateVec< 3 > &u, Real r) const
 
- Public Member Functions inherited from pops::IsothermalFlux
POPS_HD Real velocity_rho (Real rho) const
 rho clamped from below by vacuum_floor for the velocity division ONLY.
 
POPS_HD StateVec< 3 > flux (const StateVec< 3 > &u, const Aux &, int dir) const
 
POPS_HD Prim to_primitive (const StateVec< 3 > &u) const
 Conservative -> primitive: (rho, rho u, rho v) -> (rho, u, v).
 
POPS_HD StateVec< 3 > to_conservative (const Prim &p) const
 Primitive -> conservative: (rho, u, v) -> (rho, rho u, rho v).
 
POPS_HD Real max_wave_speed (const StateVec< 3 > &u, const Aux &, int dir) const
 
POPS_HD StateVec< 3 > eigenvalues (const StateVec< 3 > &u, const Aux &, int dir) const
 Full spectrum: (v_dir - c, v_dir, v_dir + c), c = sqrt(cs2).
 
POPS_HD void wave_speeds (const StateVec< 3 > &u, const Aux &, int dir, Real &smin, Real &smax) const
 Signed speeds (HLL/HLLC): v_dir -+ c_s.
 

Additional Inherited Members

- Public Types inherited from pops::IsothermalFlux
using State = StateVec< 3 >
 conservative variables (rho, rho u, rho v)
 
using Prim = StateVec< 3 >
 primitive variables (rho, u, v)
 
- Static Public Member Functions inherited from pops::IsothermalFlux
static VariableSet conservative_vars ()
 
static VariableSet primitive_vars ()
 
- Public Attributes inherited from pops::IsothermalFlux
Real cs2 = 1
 
Real vacuum_floor = 0
 Quasi-vacuum density floor (ADC-77).
 
- Static Public Attributes inherited from pops::IsothermalFlux
static constexpr int n_vars = 3
 

Detailed Description

ISOTHERMAL Euler flux in POLAR geometry (ring r, theta), 3 variables (rho, rho v_r, rho v_theta) – "polar fluid grid" effort, Path A step 1.

This is a brick SEPARATE from IsothermalFlux (Cartesian): the PHYSICAL flux and the conversions are IDENTICAL (the components 1, 2 are the momentum in the LOCAL ORTHONORMAL BASIS (e_r, e_theta); dir 0 = radial, dir 1 = azimuthal), but this brick adds the GEOMETRIC CURVATURE TERM carried by the polar metric. We inherit IsothermalFlux to NOT duplicate flux / conversions / wave speeds (Cartesian strictly intact, bit-identical) and add ONLY the polar_geom_source method.

WHY AN EXPLICIT GEOMETRIC TERM (and not a plain conservative divergence): the vector momentum equation d_t(rho v) + div(rho v (x) v) + grad p = 0, projected onto the LOCAL polar basis (e_r, e_theta) which ROTATES with theta, gives for the PHYSICAL components m_r = rho v_r, m_theta = rho v_theta: d_t m_r + (1/r) d_r(r (rho v_r^2 + p)) + (1/r) d_theta(rho v_r v_theta)

  • (rho v_theta^2 + p)/r = 0 (CENTRIFUGAL + pressure term) d_t m_theta + (1/r) d_r(r rho v_r v_theta) + (1/r) d_theta(rho v_theta^2 + p)
  • (rho v_r v_theta)/r = 0 (cross CURVATURE term) The assemble_rhs_polar operator computes EXACTLY -(1/r) d_r(r F_r) - (1/r) d_theta(F_theta) with F_r, F_theta = IsothermalFlux::flux: it thus reproduces the divergences, but NOT the algebraic terms -(rho v_theta^2 + p)/r and +(rho v_r v_theta)/r. These terms are NOT captured by the conservative divergence (proof: on the cell (rho, v_r=0, v_theta(r)) in rotational equilibrium d_r p = rho v_theta^2/r, the radial divergence alone would yield d_t m_r = -(d_r p + p/r) != 0, breaking the equilibrium). An explicit GEOMETRIC SOURCE is therefore REQUIRED, provided here and added per cell by assemble_rhs_polar (which alone knows r): S_geom = ( 0 , (rho v_theta^2 + p)/r , -(rho v_r v_theta)/r ). With this source the rotational equilibrium is preserved to the scheme order (cf. test_polar_fluid_equilibrium). r > 0 (ring, r_min > 0): no axis singularity.

CONTRACT: pointwise PHYSICAL brick, device-callable (POPS_HD), no box, no allocation. polar_geom_source takes ONLY the state and r (no aux): it is pure metric.

Member Function Documentation

◆ polar_geom_source()

POPS_HD StateVec< 3 > pops::IsothermalFluxPolar::polar_geom_source ( const StateVec< 3 > &  u,
Real  r 
) const
inline
+ Here is the call graph for this function:

The documentation for this struct was generated from the following file: