rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Loading...
Searching...
No Matches
rizer::HydroStepConfig Struct Reference

Geometry, boundary treatment and stepping controls for one call. More...

#include <HydroStep.h>

Public Attributes

std::vector< double > r_node
 Node radii [m], length N, ascending.
std::vector< double > r_face
 Face radii [m], length N+1, ascending.
std::vector< double > V_cell
 Cell "volumes", cross-sectional area per unit axial length [m^2], length N.
bool cylindrical_source = true
 Apply the cylindrical geometric source p_i*dr_i/V_i of equation (13).
OuterBc outer_bc_mode = OuterBc::AmbientGhost
double p_amb = -1.0
 Ambient pressure [Pa] and temperature [K].
double T_amb = -1.0
std::vector< double > Y_amb
 Ambient composition [-], length K.
double dt_total = 0.0
 Total interval this call covers [s] – one Strang half-step.
std::size_t n_subcycles = 0
 Fixed number of equal sub-cycles of dt_total / n_subcycles; 0 means CFL-limited instead.
bool refuse_above_cfl = false
 With n_subcycles set, refuse a sub-cycle longer than dt_CFL instead of taking it.
double cfl = 0.9
 Courant number applied to the CFL bound [-], in (0, 1].
double t0 = 0.0
 Time at the start of the call [s], passed to the thermo accessor and the ghost-state callback.
int electron_index = -1
 Index of the electron species in Y, or -1 for none.
const ThermoAccessor * thermo = nullptr
 Injected equation of state; must outlive the call.
GhostStateFn ghost_state
 Optional test-only ghost fill; overrides outer_bc_mode when set.

Detailed Description

Geometry, boundary treatment and stepping controls for one call.

Definition at line 93 of file HydroStep.h.

Member Data Documentation

◆ cfl

double rizer::HydroStepConfig::cfl = 0.9

Courant number applied to the CFL bound [-], in (0, 1].

Definition at line 149 of file HydroStep.h.

◆ cylindrical_source

bool rizer::HydroStepConfig::cylindrical_source = true

Apply the cylindrical geometric source p_i*dr_i/V_i of equation (13).

MUST be false in planar mode: the face radii alone do not disable it, because with V_i = dr_i the source is exactly p_i while the flux difference p*(1-1)/V_i no longer cancels it, so a planar run would accelerate gas out of a state at rest.

Definition at line 124 of file HydroStep.h.

◆ dt_total

double rizer::HydroStepConfig::dt_total = 0.0

Total interval this call covers [s] – one Strang half-step.

Definition at line 136 of file HydroStep.h.

◆ electron_index

int rizer::HydroStepConfig::electron_index = -1

Index of the electron species in Y, or -1 for none.

With -1 the electron energy row is skipped entirely.

Definition at line 156 of file HydroStep.h.

◆ ghost_state

GhostStateFn rizer::HydroStepConfig::ghost_state

Optional test-only ghost fill; overrides outer_bc_mode when set.

Definition at line 161 of file HydroStep.h.

◆ n_subcycles

std::size_t rizer::HydroStepConfig::n_subcycles = 0

Fixed number of equal sub-cycles of dt_total / n_subcycles; 0 means CFL-limited instead.

Then every sub-cycle takes cfl * dt_CFL, with dt_CFL = min_i dr_i / S_i and S_i the larger of the maxWaveSpeed() values at cell i's two faces (ghosts included), re-derived from the current state each sub-cycle; the last one is clipped to the time left, so the count taken is not known in advance.

Definition at line 143 of file HydroStep.h.

◆ outer_bc_mode

OuterBc rizer::HydroStepConfig::outer_bc_mode = OuterBc::AmbientGhost

Definition at line 126 of file HydroStep.h.

◆ p_amb

double rizer::HydroStepConfig::p_amb = -1.0

Ambient pressure [Pa] and temperature [K].

Both outer modes need them, and a zero is a physically meaningful-looking vacuum rather than an obvious mistake, so they carry a "caller must choose" sentinel instead of a default that silently validates.

Definition at line 131 of file HydroStep.h.

◆ r_face

std::vector<double> rizer::HydroStepConfig::r_face

Face radii [m], length N+1, ascending.

r_face[0] = 0 at the axis makes the inner face area vanish, which IS the symmetry condition; r_face = 1 everywhere is the planar entry point of NUMERICS.md section "Full system, planar - Sod shock tube".

Definition at line 115 of file HydroStep.h.

◆ r_node

std::vector<double> rizer::HydroStepConfig::r_node

Node radii [m], length N, ascending.

This, not the cell midpoint, is the coordinate handed to the thermo accessor: on a stretched grid 0.5*(r_face[i] + r_face[i+1]) is not r_node[i], and at the axis cell of a uniform grid it is h/2 rather than 0 – which would silently shift the prescribed field of validation cases 1-2 by half a cell.

It also fixes where the two GHOST cells sit: each one's radius is the adjacent interior node reflected across its boundary, 2*r_node[0] - r_node[1] and 2*r_node[N-1] - r_node[N-2], i.e. one of THAT end's own spacings beyond the end node (the axis ghost excepted, since the axis cell's node reflects onto itself). The reflection is taken from this array rather than from r_face because r_face is an area factor, not a position, in the planar entry point. Both the thermo accessor and ghost_state see that radius, so a prescribed field fills a ghost at the place the ghost actually occupies.

Definition at line 110 of file HydroStep.h.

◆ refuse_above_cfl

bool rizer::HydroStepConfig::refuse_above_cfl = false

With n_subcycles set, refuse a sub-cycle longer than dt_CFL instead of taking it.

Off for the hydro-only test cases, which pin a step on purpose; the channel solver turns it on for its hydro_substep.

Definition at line 147 of file HydroStep.h.

◆ t0

double rizer::HydroStepConfig::t0 = 0.0

Time at the start of the call [s], passed to the thermo accessor and the ghost-state callback.

Definition at line 152 of file HydroStep.h.

◆ T_amb

double rizer::HydroStepConfig::T_amb = -1.0

Definition at line 132 of file HydroStep.h.

◆ thermo

const ThermoAccessor* rizer::HydroStepConfig::thermo = nullptr

Injected equation of state; must outlive the call.

Definition at line 159 of file HydroStep.h.

◆ V_cell

std::vector<double> rizer::HydroStepConfig::V_cell

Cell "volumes", cross-sectional area per unit axial length [m^2], length N.

Cylindrical: 0.5*(r_east^2 - r_west^2). Planar: dr.

Definition at line 118 of file HydroStep.h.

◆ Y_amb

std::vector<double> rizer::HydroStepConfig::Y_amb

Ambient composition [-], length K.

Definition at line 133 of file HydroStep.h.


The documentation for this struct was generated from the following file:
  • /home/runner/work/rizer/rizer/rizer/cantera_ext/models/nrp/HydroStep.h