StFlow.h Source File#
StFlow.h
Go to the documentation of this file.
31};
Header file for class Cantera::Array2D.
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Definition Array.h:32
double prevSoln(size_t n, size_t j) const
Value of component n at point j in the previous solution.
Definition Domain1D.h:441
virtual void getNetProductionRates(double *wdot)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
Definition Kinetics.cpp:363
A container class holding arrays of state information.
Definition SolutionArray.h:33
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
Definition StFlow.h:45
void eval(size_t jGlobal, double *xGlobal, double *rsdGlobal, integer *diagGlobal, double rdt) override
Evaluate the residual functions for axisymmetric stagnation flow.
Definition StFlow.cpp:296
void setTemperature(size_t j, double t)
Set the temperature fixed point at grid point j, and disable the energy equation so that the solution...
Definition StFlow.h:137
size_t m_kExcessLeft
Index of species with a large mass fraction at each boundary, for which the mass fraction may be calc...
Definition StFlow.h:657
void setTransport(shared_ptr< Transport > trans) override
Set transport model to existing instance.
Definition StFlow.cpp:140
void setUnstrainedFlow()
Set flow configuration for burner-stabilized flames, using specified inlet mass fluxes.
Definition StFlow.h:180
void setKinetics(shared_ptr< Kinetics > kin) override
Set the kinetics manager.
Definition StFlow.cpp:134
void resetBadValues(double *xg) override
When called, this function should reset "bad" values in the state vector such as negative species con...
Definition StFlow.cpp:201
size_t rightExcessSpecies() const
Index of the species on the right boundary with the largest mass fraction.
Definition StFlow.h:311
virtual void evalMomentum(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
Evaluate the momentum equation residual.
Definition StFlow.cpp:462
void updateThermo(const double *x, size_t j0, size_t j1)
Update the thermodynamic properties from point j0 to point j1 (inclusive), based on solution x.
Definition StFlow.h:483
void resize(size_t components, size_t points) override
Change the grid size. Called after grid refinement.
Definition StFlow.cpp:160
void enableSoret(bool withSoret)
Enable thermal diffusion, also known as Soret diffusion.
Definition StFlow.h:102
void setFixedTempProfile(vector< double > &zfixed, vector< double > &tfixed)
Sometimes it is desired to carry out the simulation using a specified temperature profile,...
Definition StFlow.h:128
virtual void evalContinuity(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
Evaluate the continuity equation residual.
Definition StFlow.cpp:405
void setBoundaryEmissivities(double e_left, double e_right)
Set the emissivities for the boundary values.
Definition StFlow.cpp:979
virtual void evalEnergy(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
Evaluate the energy equation residual.
Definition StFlow.cpp:522
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
Definition StFlow.cpp:805
size_t componentIndex(const string &name) const override
index of component with name name.
Definition StFlow.cpp:719
void setGas(const double *x, size_t j)
Set the gas object state to be consistent with the solution at point j.
Definition StFlow.cpp:229
bool radiationEnabled() const
Returns true if the radiation term in the energy equation is enabled.
Definition StFlow.h:214
virtual bool componentActive(size_t n) const
Returns true if the specified component is an active part of the solver state.
Definition StFlow.cpp:742
void setFreeFlow()
Set flow configuration for freely-propagating flames, using an internal point with a fixed temperatur...
Definition StFlow.h:164
virtual bool doElectricField(size_t j) const
Retrieve flag indicating whether electric field is solved or not (used by IonFlow specialization)
Definition StFlow.cpp:973
virtual void evalSpecies(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
Evaluate the species equations' residuals.
Definition StFlow.cpp:560
void setupGrid(size_t n, const double *z) override
called to set up initial grid, and after grid refinement
Definition StFlow.cpp:186
size_t leftExcessSpecies() const
Index of the species on the left boundary with the largest mass fraction.
Definition StFlow.h:306
Array2D m_dhk_dz
Array of size m_nsp by m_points-1 for saving enthalpy fluxes.
Definition StFlow.h:618
virtual void evalElectricField(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
Evaluate the electric field equation residual to be zero everywhere.
Definition StFlow.cpp:599
double radiativeHeatLoss(size_t j) const
Return radiative heat loss at grid point j.
Definition StFlow.h:219
void _finalize(const double *x) override
In some cases, a domain may need to set parameters that depend on the initial solution estimate.
Definition StFlow.cpp:249
virtual size_t getSolvingStage() const
Get the solving stage (used by IonFlow specialization)
Definition StFlow.cpp:949
virtual void evalLambda(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
Evaluate the lambda equation residual.
Definition StFlow.cpp:494
void fromArray(SolutionArray &arr, double *soln) override
Restore the solution for this domain from a SolutionArray.
Definition StFlow.cpp:839
virtual void updateDiffFluxes(const double *x, size_t j0, size_t j1)
Update the diffusive mass fluxes.
Definition StFlow.cpp:655
string componentName(size_t n) const override
Name of the nth component. May be overloaded.
Definition StFlow.cpp:697
bool isFree() const
Retrieve flag indicating whether flow is freely propagating.
Definition StFlow.h:263
void setGasAtMidpoint(const double *x, size_t j)
Set the gas state to be consistent with the solution at the midpoint between j and j + 1.
Definition StFlow.cpp:237
virtual void grad_hk(const double *x, size_t j)
Get the gradient of species specific molar enthalpies.
Definition StFlow.cpp:1017
bool isStrained() const
Retrieve flag indicating whether flow uses radial momentum.
Definition StFlow.h:274
void computeRadiation(double *x, size_t jmin, size_t jmax)
Computes the radiative heat loss vector over points jmin to jmax and stores the data in the qdotRadia...
Definition StFlow.cpp:358
virtual void updateProperties(size_t jg, double *x, size_t jmin, size_t jmax)
Update the properties (thermo, transport, and diffusion flux).
Definition StFlow.cpp:334
virtual void setSolvingStage(const size_t stage)
Solving stage mode for handling ionized species (used by IonFlow specialization)
Definition StFlow.cpp:955
virtual void fixElectricField(size_t j=npos)
Set to fix voltage in a point (used by IonFlow specialization)
Definition StFlow.cpp:967
void setAxisymmetricFlow()
Set flow configuration for axisymmetric counterflow flames, using specified inlet mass fluxes.
Definition StFlow.h:172
virtual void updateTransport(double *x, size_t j0, size_t j1)
Update the transport properties at grid points in the range from j0 to j1, based on solution x.
Definition StFlow.cpp:608
virtual void solveElectricField(size_t j=npos)
Set to solve electric field in a point (used by IonFlow specialization)
Definition StFlow.cpp:961
void _getInitialSoln(double *x) override
Write the initial solution estimate into array x.
Definition StFlow.cpp:220
vector< size_t > m_kRadiating
Indices within the ThermoPhase of the radiating species.
Definition StFlow.h:635
Base class for a phase with thermodynamic properties.
Definition ThermoPhase.h:390
virtual void getPartialMolarEnthalpies(double *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
Definition ThermoPhase.h:801
double cp_mass() const
Specific heat at constant pressure. Units: J/kg/K.
Definition ThermoPhase.h:1048
const double Undef
Fairly random number to be used to initialize variables against to see if they are subsequently defin...
Definition ct_defs.h:164
Generated by