rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Loading...
Searching...
No Matches
HydroStep.h
Go to the documentation of this file.
1
79
80#ifndef RIZER_HYDRO_STEP_H
81#define RIZER_HYDRO_STEP_H
82
85
86#include <cstddef>
87#include <vector>
88
89namespace rizer
90{
91
94 {
110 std::vector<double> r_node;
115 std::vector<double> r_face;
118 std::vector<double> V_cell;
125
131 double p_amb = -1.0;
132 double T_amb = -1.0;
133 std::vector<double> Y_amb;
134
136 double dt_total = 0.0;
143 std::size_t n_subcycles = 0;
147 bool refuse_above_cfl = false;
149 double cfl = 0.9;
152 double t0 = 0.0;
153
157
159 const ThermoAccessor *thermo = nullptr;
162 };
163
166 {
167 std::vector<double> rho;
168 std::vector<double> u_r;
169 std::vector<double> Tg;
170 std::vector<double> Te;
171 std::vector<double> Y;
172 std::size_t n_species = 0;
173 };
174
179 {
180 std::size_t n_subcycles_used = 0;
181 double dt_cfl = 0.0;
184 double rho_min = 0.0;
185 double p_min = 0.0;
186
203 double boundary_mass_out = 0.0;
205 std::vector<double> boundary_species_mass_out;
206
219
234
245 };
246
271
272} // namespace rizer
273
274#endif // RIZER_HYDRO_STEP_H
Outer-boundary vocabulary for the 1D radial channel: which treatment is applied, the primitive state ...
The equation-of-state seam of the hydrodynamic sub-step: the abstract accessor hydroStep() closes its...
Equation-of-state and caloric accessor injected into hydroStep().
std::function< NodeState( double r_ghost, double t, bool is_inner_face, const NodeState &interior)> GhostStateFn
Fill the outer ghost cell from a closed-form solution, a fixed end state, or a mirror of the interior...
OuterBc
Outer-boundary treatment (NUMERICS.md section 7).
@ AmbientGhost
Fix rho, u_r, p, T and Y_s to ambient.
HydroStepResult hydroStep(const HydroStepConfig &cfg, HydroStepState &state)
Advance state over one Strang half-step of cfg.dt_total.
Geometry, boundary treatment and stepping controls for one call.
Definition HydroStep.h:94
const ThermoAccessor * thermo
Injected equation of state; must outlive the call.
Definition HydroStep.h:159
bool refuse_above_cfl
With n_subcycles set, refuse a sub-cycle longer than dt_CFL instead of taking it.
Definition HydroStep.h:147
std::vector< double > r_node
Node radii [m], length N, ascending.
Definition HydroStep.h:110
int electron_index
Index of the electron species in Y, or -1 for none.
Definition HydroStep.h:156
std::vector< double > r_face
Face radii [m], length N+1, ascending.
Definition HydroStep.h:115
double t0
Time at the start of the call [s], passed to the thermo accessor and the ghost-state callback.
Definition HydroStep.h:152
double cfl
Courant number applied to the CFL bound [-], in (0, 1].
Definition HydroStep.h:149
double dt_total
Total interval this call covers [s] – one Strang half-step.
Definition HydroStep.h:136
double p_amb
Ambient pressure [Pa] and temperature [K].
Definition HydroStep.h:131
GhostStateFn ghost_state
Optional test-only ghost fill; overrides outer_bc_mode when set.
Definition HydroStep.h:161
std::vector< double > V_cell
Cell "volumes", cross-sectional area per unit axial length [m^2], length N.
Definition HydroStep.h:118
std::vector< double > Y_amb
Ambient composition [-], length K.
Definition HydroStep.h:133
std::size_t n_subcycles
Fixed number of equal sub-cycles of dt_total / n_subcycles; 0 means CFL-limited instead.
Definition HydroStep.h:143
bool cylindrical_source
Apply the cylindrical geometric source p_i*dr_i/V_i of equation (13).
Definition HydroStep.h:124
Diagnostics from one call, enough to assert NUMERICS.md section "Positivity under a strong rarefactio...
Definition HydroStep.h:179
std::size_t n_subcycles_used
M actually taken [-].
Definition HydroStep.h:180
double rho_min
Min rho over every node and sub-cycle [kg/m^3].
Definition HydroStep.h:184
double boundary_mass_out
Mass that left the domain across both boundary faces over the whole call, per unit axial length and p...
Definition HydroStep.h:203
double boundary_total_energy_out
TOTAL energy that left the domain across both boundary faces over the whole call, per unit axial leng...
Definition HydroStep.h:218
std::vector< double > boundary_species_mass_out
The same, per species [kg/m/rad], length K.
Definition HydroStep.h:205
double boundary_electron_energy_out
Electron-pool INTERNAL energy that left the domain across both boundary faces over the whole call,...
Definition HydroStep.h:233
double dt_cfl
CFL bound at the initial state [s].
Definition HydroStep.h:181
double p_min
Min total p over every node and sub-cycle [Pa].
Definition HydroStep.h:185
double pressure_work_electron
Compression work done BY the electron pool over the whole call, per unit axial length and per radian ...
Definition HydroStep.h:244
Per-node primitive state, advanced in place.
Definition HydroStep.h:166
std::vector< double > rho
Mass density [kg/m^3], length N.
Definition HydroStep.h:167
std::vector< double > u_r
Radial velocity [m/s], length N.
Definition HydroStep.h:168
std::size_t n_species
K [-].
Definition HydroStep.h:172
std::vector< double > Te
Electron temperature [K], length N.
Definition HydroStep.h:170
std::vector< double > Y
Mass fractions [-], row-major [N, K].
Definition HydroStep.h:171
std::vector< double > Tg
Heavy-pool temperature [K], length N.
Definition HydroStep.h:169