This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemically-reacting, axisymmetric flows.
More...
|
| StFlow (ThermoPhase *ph=0, size_t nsp=1, size_t points=1) |
| Create a new flow domain.
|
|
| StFlow (shared_ptr< ThermoPhase > th, size_t nsp=1, size_t points=1) |
| Delegating constructor.
|
|
| StFlow (shared_ptr< Solution > sol, const string &id="", size_t points=1) |
| Create a new flow domain.
|
|
string | type () const override |
| String indicating the domain implemented.
|
|
string | componentName (size_t n) const override |
| Name of the nth component. May be overloaded.
|
|
size_t | componentIndex (const string &name) const override |
| index of component with name name.
|
|
virtual bool | componentActive (size_t n) const |
| Returns true if the specified component is an active part of the solver state.
|
|
void | show (const double *x) override |
| Print the solution.
|
|
shared_ptr< SolutionArray > | asArray (const double *soln) const override |
| Save the state of this domain as a SolutionArray.
|
|
void | fromArray (SolutionArray &arr, double *soln) override |
| Restore the solution for this domain from a SolutionArray.
|
|
void | setFreeFlow () |
| Set flow configuration for freely-propagating flames, using an internal point with a fixed temperature as the condition to determine the inlet mass flux.
|
|
void | setAxisymmetricFlow () |
| Set flow configuration for axisymmetric counterflow flames, using specified inlet mass fluxes.
|
|
void | setUnstrainedFlow () |
| Set flow configuration for burner-stabilized flames, using specified inlet mass fluxes.
|
|
virtual string | flowType () const |
| Return the type of flow domain being represented, either "Free Flame" or "Axisymmetric Stagnation".
|
|
void | solveEnergyEqn (size_t j=npos) |
|
virtual size_t | getSolvingStage () const |
| Get the solving stage (used by IonFlow specialization)
|
|
virtual void | setSolvingStage (const size_t stage) |
| Solving stage mode for handling ionized species (used by IonFlow specialization)
|
|
virtual void | solveElectricField (size_t j=npos) |
| Set to solve electric field in a point (used by IonFlow specialization)
|
|
virtual void | fixElectricField (size_t j=npos) |
| Set to fix voltage in a point (used by IonFlow specialization)
|
|
virtual bool | doElectricField (size_t j) const |
| Retrieve flag indicating whether electric field is solved or not (used by IonFlow specialization)
|
|
void | enableRadiation (bool doRadiation) |
| Turn radiation on / off.
|
|
bool | radiationEnabled () const |
| Returns true if the radiation term in the energy equation is enabled.
|
|
double | radiativeHeatLoss (size_t j) const |
| Return radiative heat loss at grid point j.
|
|
void | setBoundaryEmissivities (double e_left, double e_right) |
| Set the emissivities for the boundary values.
|
|
double | leftEmissivity () const |
| Return emissivity at left boundary.
|
|
double | rightEmissivity () const |
| Return emissivity at right boundary.
|
|
void | fixTemperature (size_t j=npos) |
|
bool | doEnergy (size_t j) |
|
void | resize (size_t components, size_t points) override |
| Change the grid size. Called after grid refinement.
|
|
void | setGas (const double *x, size_t j) |
| Set the gas object state to be consistent with the solution at point j.
|
|
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.
|
|
double | density (size_t j) const |
|
virtual bool | fixed_mdot () |
|
bool | isFree () const |
| Retrieve flag indicating whether flow is freely propagating.
|
|
bool | isStrained () const |
| Retrieve flag indicating whether flow uses radial momentum.
|
|
void | setViscosityFlag (bool dovisc) |
|
void | eval (size_t j, double *x, double *r, integer *mask, double rdt) override |
| Evaluate the residual function for axisymmetric stagnation flow.
|
|
virtual void | evalRightBoundary (double *x, double *res, int *diag, double rdt) |
| Evaluate all residual components at the right boundary.
|
|
virtual void | evalContinuity (size_t j, double *x, double *r, int *diag, double rdt) |
| Evaluate the residual corresponding to the continuity equation at all interior grid points.
|
|
size_t | leftExcessSpecies () const |
| Index of the species on the left boundary with the largest mass fraction.
|
|
size_t | rightExcessSpecies () const |
| Index of the species on the right boundary with the largest mass fraction.
|
|
|
void | setupGrid (size_t n, const double *z) override |
| called to set up initial grid, and after grid refinement
|
|
void | resetBadValues (double *xg) override |
| When called, this function should reset "bad" values in the state vector such as negative species concentrations.
|
|
ThermoPhase & | phase () |
|
Kinetics & | kinetics () |
|
void | setThermo (ThermoPhase &th) |
| Set the thermo manager.
|
|
void | setKinetics (shared_ptr< Kinetics > kin) override |
| Set the kinetics manager.
|
|
void | setKinetics (Kinetics &kin) |
| Set the kinetics manager.
|
|
void | setTransport (shared_ptr< Transport > trans) override |
| Set transport model to existing instance.
|
|
void | setTransport (Transport &trans) |
| Set transport model to existing instance.
|
|
void | setTransportModel (const string &trans) |
| Set the transport model.
|
|
string | transportModel () const |
| Retrieve transport model.
|
|
void | enableSoret (bool withSoret) |
| Enable thermal diffusion, also known as Soret diffusion.
|
|
bool | withSoret () const |
|
void | setPressure (double p) |
| Set the pressure.
|
|
double | pressure () const |
| The current pressure [Pa].
|
|
void | _getInitialSoln (double *x) override |
| Write the initial solution estimate into array x.
|
|
void | _finalize (const double *x) override |
| In some cases, a domain may need to set parameters that depend on the initial solution estimate.
|
|
void | setFixedTempProfile (vector< double > &zfixed, vector< double > &tfixed) |
| Sometimes it is desired to carry out the simulation using a specified temperature profile, rather than computing it by solving the energy equation.
|
|
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 will be held to this value.
|
|
double | T_fixed (size_t j) const |
| The fixed temperature value at point j.
|
|
Public Member Functions inherited from Domain1D |
| Domain1D (size_t nv=1, size_t points=1, double time=0.0) |
| Constructor.
|
|
| Domain1D (const Domain1D &)=delete |
|
Domain1D & | operator= (const Domain1D &)=delete |
|
int | domainType () |
| Domain type flag.
|
|
virtual string | type () const |
| String indicating the domain implemented.
|
|
size_t | domainIndex () |
| The left-to-right location of this domain.
|
|
virtual bool | isConnector () |
| True if the domain is a connector domain.
|
|
void | setSolution (shared_ptr< Solution > sol) |
| Set the solution manager.
|
|
virtual void | setKinetics (shared_ptr< Kinetics > kin) |
| Set the kinetics manager.
|
|
virtual void | setTransport (shared_ptr< Transport > trans) |
| Set transport model to existing instance.
|
|
const OneDim & | container () const |
| The container holding this domain.
|
|
void | setContainer (OneDim *c, size_t index) |
| Specify the container object for this domain, and the position of this domain in the list.
|
|
void | setBandwidth (int bw=-1) |
| Set the Jacobian bandwidth. See the discussion of method bandwidth().
|
|
size_t | bandwidth () |
| Set the Jacobian bandwidth for this domain.
|
|
virtual void | init () |
| Initialize.
|
|
virtual void | setInitialState (double *xlocal=0) |
|
virtual void | setState (size_t point, const double *state, double *x) |
|
virtual void | resetBadValues (double *xg) |
| When called, this function should reset "bad" values in the state vector such as negative species concentrations.
|
|
virtual void | resize (size_t nv, size_t np) |
| Resize the domain to have nv components and np grid points.
|
|
Refiner & | refiner () |
| Return a reference to the grid refiner.
|
|
size_t | nComponents () const |
| Number of components at each grid point.
|
|
void | checkComponentIndex (size_t n) const |
| Check that the specified component index is in range.
|
|
void | checkComponentArraySize (size_t nn) const |
| Check that an array size is at least nComponents().
|
|
size_t | nPoints () const |
| Number of grid points in this domain.
|
|
void | checkPointIndex (size_t n) const |
| Check that the specified point index is in range.
|
|
void | checkPointArraySize (size_t nn) const |
| Check that an array size is at least nPoints().
|
|
virtual string | componentName (size_t n) const |
| Name of the nth component. May be overloaded.
|
|
void | setComponentName (size_t n, const string &name) |
|
virtual size_t | componentIndex (const string &name) const |
| index of component with name name.
|
|
void | setBounds (size_t n, double lower, double upper) |
|
void | setTransientTolerances (double rtol, double atol, size_t n=npos) |
| Set tolerances for time-stepping mode.
|
|
void | setSteadyTolerances (double rtol, double atol, size_t n=npos) |
| Set tolerances for steady-state mode.
|
|
double | rtol (size_t n) |
| Relative tolerance of the nth component.
|
|
double | atol (size_t n) |
| Absolute tolerance of the nth component.
|
|
double | steady_rtol (size_t n) |
| Steady relative tolerance of the nth component.
|
|
double | steady_atol (size_t n) |
| Steady absolute tolerance of the nth component.
|
|
double | transient_rtol (size_t n) |
| Transient relative tolerance of the nth component.
|
|
double | transient_atol (size_t n) |
| Transient absolute tolerance of the nth component.
|
|
double | upperBound (size_t n) const |
| Upper bound on the nth component.
|
|
double | lowerBound (size_t n) const |
| Lower bound on the nth component.
|
|
void | initTimeInteg (double dt, const double *x0) |
| Prepare to do time stepping with time step dt.
|
|
void | setSteadyMode () |
| Prepare to solve the steady-state problem.
|
|
bool | steady () |
| True if in steady-state mode.
|
|
bool | transient () |
| True if not in steady-state mode.
|
|
void | needJacUpdate () |
| Set this if something has changed in the governing equations (for example, the value of a constant has been changed, so that the last-computed Jacobian is no longer valid.
|
|
virtual void | eval (size_t j, double *x, double *r, integer *mask, double rdt=0.0) |
| Evaluate the residual function at point j.
|
|
size_t | index (size_t n, size_t j) const |
|
double | value (const double *x, size_t n, size_t j) const |
|
virtual void | setJac (MultiJac *jac) |
|
AnyMap | serialize (const double *soln) const |
| Save the state of this domain as an AnyMap.
|
|
virtual shared_ptr< SolutionArray > | asArray (const double *soln) const |
| Save the state of this domain as a SolutionArray.
|
|
shared_ptr< SolutionArray > | toArray (bool normalize=false) const |
| Save the state of this domain to a SolutionArray.
|
|
void | restore (const AnyMap &state, double *soln, int loglevel) |
| Restore the solution for this domain from an AnyMap.
|
|
virtual void | fromArray (SolutionArray &arr, double *soln) |
| Restore the solution for this domain from a SolutionArray.
|
|
void | fromArray (const shared_ptr< SolutionArray > &arr) |
| Restore the solution for this domain from a SolutionArray.
|
|
shared_ptr< Solution > | solution () const |
| Return thermo/kinetics/transport manager used in the domain.
|
|
size_t | size () const |
|
void | locate () |
| Find the index of the first grid point in this domain, and the start of its variables in the global solution vector.
|
|
virtual size_t | loc (size_t j=0) const |
| Location of the start of the local solution vector in the global solution vector,.
|
|
size_t | firstPoint () const |
| The index of the first (that is, left-most) grid point belonging to this domain.
|
|
size_t | lastPoint () const |
| The index of the last (that is, right-most) grid point belonging to this domain.
|
|
void | linkLeft (Domain1D *left) |
| Set the left neighbor to domain 'left.
|
|
void | linkRight (Domain1D *right) |
| Set the right neighbor to domain 'right.'.
|
|
void | append (Domain1D *right) |
| Append domain 'right' to this one, and update all links.
|
|
Domain1D * | left () const |
| Return a pointer to the left neighbor.
|
|
Domain1D * | right () const |
| Return a pointer to the right neighbor.
|
|
double | prevSoln (size_t n, size_t j) const |
| Value of component n at point j in the previous solution.
|
|
void | setID (const string &s) |
| Specify an identifying tag for this domain.
|
|
string | id () const |
|
virtual void | showSolution_s (std::ostream &s, const double *x) |
|
virtual void | showSolution (const double *x) |
| Print the solution.
|
|
virtual void | show (std::ostream &s, const double *x) |
| Print the solution.
|
|
virtual void | show (const double *x) |
| Print the solution.
|
|
double | z (size_t jlocal) const |
|
double | zmin () const |
|
double | zmax () const |
|
void | setProfile (const string &name, double *values, double *soln) |
|
vector< double > & | grid () |
|
const vector< double > & | grid () const |
|
double | grid (size_t point) const |
|
virtual void | setupGrid (size_t n, const double *z) |
| called to set up initial grid, and after grid refinement
|
|
virtual void | _getInitialSoln (double *x) |
| Writes some or all initial solution values into the global solution array, beginning at the location pointed to by x.
|
|
virtual double | initialValue (size_t n, size_t j) |
| Initial value of solution component n at grid point j.
|
|
virtual void | _finalize (const double *x) |
| In some cases, a domain may need to set parameters that depend on the initial solution estimate.
|
|
void | forceFullUpdate (bool update) |
| In some cases, for computational efficiency some properties (such as transport coefficients) may not be updated during Jacobian evaluations.
|
|
void | setData (shared_ptr< vector< double > > &data) |
| Set shared data pointer.
|
|
|
AnyMap | getMeta () const override |
| Retrieve meta data.
|
|
void | setMeta (const AnyMap &state) override |
| Retrieve meta data.
|
|
double | wdot (size_t k, size_t j) const |
|
void | getWdot (double *x, size_t j) |
| Write the net production rates at point j into array m_wdot
|
|
virtual void | updateProperties (size_t jg, double *x, size_t jmin, size_t jmax) |
| Update the properties (thermo, transport, and diffusion flux).
|
|
virtual void | evalResidual (double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax) |
| Evaluate the residual function.
|
|
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.
|
|
double | shear (const double *x, size_t j) const |
|
double | divHeatFlux (const double *x, size_t j) const |
|
size_t | mindex (size_t k, size_t j, size_t m) |
|
virtual void | updateDiffFluxes (const double *x, size_t j0, size_t j1) |
| Update the diffusive mass fluxes.
|
|
virtual void | grad_hk (const double *x, size_t j) |
| Get the gradient of species specific molar enthalpies.
|
|
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 .
|
|
|
double | T (const double *x, size_t j) const |
|
double & | T (double *x, size_t j) |
|
double | T_prev (size_t j) const |
|
double | rho_u (const double *x, size_t j) const |
|
double | u (const double *x, size_t j) const |
|
double | V (const double *x, size_t j) const |
|
double | V_prev (size_t j) const |
|
double | lambda (const double *x, size_t j) const |
|
double | Y (const double *x, size_t k, size_t j) const |
|
double & | Y (double *x, size_t k, size_t j) |
|
double | Y_prev (size_t k, size_t j) const |
|
double | X (const double *x, size_t k, size_t j) const |
|
double | flux (size_t k, size_t j) const |
|
|
These use upwind differencing, assuming u(z) is negative
|
double | dVdz (const double *x, size_t j) const |
|
double | dYdz (const double *x, size_t k, size_t j) const |
|
double | dTdz (const double *x, size_t j) const |
|
virtual AnyMap | getMeta () const |
| Retrieve meta data.
|
|
virtual void | setMeta (const AnyMap &meta) |
| Retrieve meta data.
|
|