Cantera
2.1.2
|
A class for freely-propagating premixed flames. More...
#include <StFlow.h>
Public Member Functions | |
FreeFlame (IdealGasPhase *ph=0, size_t nsp=1, size_t points=1) | |
virtual void | evalRightBoundary (doublereal *x, doublereal *res, integer *diag, doublereal rdt) |
Evaluate all residual components at the right boundary. More... | |
virtual void | evalContinuity (size_t j, doublereal *x, doublereal *r, integer *diag, doublereal rdt) |
Evaluate the residual corresponding to the continuity equation at all interior grid points. More... | |
virtual std::string | flowType () |
virtual bool | fixed_mdot () |
Public Member Functions inherited from StFlow | |
StFlow (IdealGasPhase *ph=0, size_t nsp=1, size_t points=1) | |
Create a new flow domain. More... | |
virtual std::string | componentName (size_t n) const |
Name of the nth component. May be overloaded. More... | |
virtual size_t | componentIndex (const std::string &name) const |
virtual void | showSolution (const doublereal *x) |
Print the solution. More... | |
virtual XML_Node & | save (XML_Node &o, const doublereal *const sol) |
Save the current solution for this domain into an XML_Node. More... | |
virtual void | restore (const XML_Node &dom, doublereal *soln, int loglevel) |
Restore the solution for this domain from an XML_Node. More... | |
void | solveEnergyEqn (size_t j=npos) |
void | fixTemperature (size_t j=npos) |
bool | doSpecies (size_t k) |
bool | doEnergy (size_t j) |
void | solveSpecies (size_t k=npos) |
void | fixSpecies (size_t k=npos) |
void | integrateChem (doublereal *x, doublereal dt) |
void | resize (size_t components, size_t points) |
Change the grid size. Called after grid refinement. More... | |
virtual void | setFixedPoint (int j0, doublereal t0) |
void | setJac (MultiJac *jac) |
void | setGas (const doublereal *x, size_t j) |
Set the gas object state to be consistent with the solution at point j. More... | |
void | setGasAtMidpoint (const doublereal *x, size_t j) |
Set the gas state to be consistent with the solution at the midpoint between j and j + 1. More... | |
doublereal | density (size_t j) const |
void | setViscosityFlag (bool dovisc) |
virtual void | eval (size_t j, doublereal *x, doublereal *r, integer *mask, doublereal rdt) |
virtual void | setupGrid (size_t n, const doublereal *z) |
called to set up initial grid, and after grid refinement More... | |
thermo_t & | phase () |
Kinetics & | kinetics () |
virtual void | init () |
void | setThermo (IdealGasPhase &th) |
Set the thermo manager. More... | |
void | setKinetics (Kinetics &kin) |
Set the kinetics manager. The kinetics manager must. More... | |
void | setTransport (Transport &trans, bool withSoret=false) |
set the transport manager More... | |
void | enableSoret (bool withSoret) |
bool | withSoret () const |
void | setPressure (doublereal p) |
Set the pressure. More... | |
doublereal | pressure () const |
The current pressure [Pa]. More... | |
virtual void | setState (size_t point, const doublereal *state, doublereal *x) |
virtual void | _getInitialSoln (doublereal *x) |
Write the initial solution estimate into array x. More... | |
virtual void | _finalize (const doublereal *x) |
In some cases, a domain may need to set parameters that depend on the initial solution estimate. More... | |
void | setFixedTempProfile (vector_fp &zfixed, vector_fp &tfixed) |
Sometimes it is desired to carry out the simulation using a specified temperature profile, rather than computing it by solving the energy equation. More... | |
void | setTemperature (size_t j, doublereal t) |
void | setMassFraction (size_t j, size_t k, doublereal y) |
doublereal | T_fixed (size_t j) const |
The fixed temperature value at point j. More... | |
doublereal | Y_fixed (size_t k, size_t j) const |
The fixed mass fraction value of species k at point j. More... | |
Public Member Functions inherited from Domain1D | |
Domain1D (size_t nv=1, size_t points=1, doublereal time=0.0) | |
Constructor. More... | |
int | domainType () |
Domain type flag. More... | |
size_t | domainIndex () |
The left-to-right location of this domain. More... | |
bool | isConnector () |
True if the domain is a connector domain. More... | |
const OneDim & | container () const |
The container holding this domain. More... | |
void | setContainer (OneDim *c, size_t index) |
void | setBandwidth (int bw=-1) |
Set the Jacobian bandwidth. See the discussion of method bandwidth(). More... | |
size_t | bandwidth () |
Set the Jacobian bandwidth for this domain. More... | |
virtual void | setInitialState (doublereal *xlocal=0) |
Refiner & | refiner () |
Return a reference to the grid refiner. More... | |
size_t | nComponents () const |
Number of components at each grid point. More... | |
void | checkComponentIndex (size_t n) const |
Check that the specified component index is in range Throws an exception if n is greater than nComponents()-1. More... | |
void | checkComponentArraySize (size_t nn) const |
Check that an array size is at least nComponents() Throws an exception if nn is less than nComponents(). More... | |
size_t | nPoints () const |
Number of grid points in this domain. More... | |
void | checkPointIndex (size_t n) const |
Check that the specified point index is in range Throws an exception if n is greater than nPoints()-1. More... | |
void | checkPointArraySize (size_t nn) const |
Check that an array size is at least nPoints() Throws an exception if nn is less than nPoints(). More... | |
void | setComponentName (size_t n, const std::string &name) |
void | setComponentType (size_t n, int ctype) |
size_t | componentIndex (const std::string &name) const |
index of component with name name. More... | |
void | setBounds (size_t nl, const doublereal *lower, size_t nu, const doublereal *upper) |
Set the lower and upper bounds for each solution component. More... | |
void | setBounds (size_t n, doublereal lower, doublereal upper) |
void | setTolerances (size_t nr, const doublereal *rtol, size_t na, const doublereal *atol, int ts=0) |
set the error tolerances for all solution components. More... | |
void | setTolerances (size_t n, doublereal rtol, doublereal atol, int ts=0) |
set the error tolerances for solution component n. More... | |
void | setTolerances (doublereal rtol, doublereal atol, int ts=0) |
set scalar error tolerances. More... | |
void | setTransientTolerances (doublereal rtol, doublereal atol, size_t n=npos) |
Set tolerances for time-stepping mode. More... | |
void | setTolerancesTS (doublereal rtol, doublereal atol, size_t n=npos) |
void | setSteadyTolerances (doublereal rtol, doublereal atol, size_t n=npos) |
Set tolerances for steady-state mode. More... | |
void | setTolerancesSS (doublereal rtol, doublereal atol, size_t n=npos) |
doublereal | rtol (size_t n) |
Relative tolerance of the nth component. More... | |
doublereal | atol (size_t n) |
Absolute tolerance of the nth component. More... | |
doublereal | upperBound (size_t n) const |
Upper bound on the nth component. More... | |
doublereal | lowerBound (size_t n) const |
Lower bound on the nth component. More... | |
void | initTimeInteg (doublereal dt, const doublereal *x0) |
void | setSteadyMode () |
bool | steady () |
True if in steady-state mode. More... | |
bool | transient () |
True if not in steady-state mode. More... | |
void | needJacUpdate () |
void | evalss (doublereal *x, doublereal *r, integer *mask) |
virtual doublereal | residual (doublereal *x, size_t n, size_t j) |
int | timeDerivativeFlag (size_t n) |
void | setAlgebraic (size_t n) |
virtual void | update (doublereal *x) |
doublereal | time () const |
void | incrementTime (doublereal dt) |
size_t | index (size_t n, size_t j) const |
doublereal | value (const doublereal *x, size_t n, size_t j) const |
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. More... | |
virtual size_t | loc (size_t j=0) const |
Location of the start of the local solution vector in the global solution vector,. More... | |
size_t | firstPoint () const |
The index of the first (i.e., left-most) grid point belonging to this domain. More... | |
size_t | lastPoint () const |
The index of the last (i.e., right-most) grid point belonging to this domain. More... | |
void | linkLeft (Domain1D *left) |
Set the left neighbor to domain 'left. More... | |
void | linkRight (Domain1D *right) |
Set the right neighbor to domain 'right.'. More... | |
void | append (Domain1D *right) |
Append domain 'right' to this one, and update all links. More... | |
Domain1D * | left () const |
Return a pointer to the left neighbor. More... | |
Domain1D * | right () const |
Return a pointer to the right neighbor. More... | |
double | prevSoln (size_t n, size_t j) const |
Value of component n at point j in the previous solution. More... | |
void | setID (const std::string &s) |
Specify an identifying tag for this domain. More... | |
std::string | id () const |
void | setDesc (const std::string &s) |
Specify descriptive text for this domain. More... | |
const std::string & | desc () |
virtual void | getTransientMask (integer *mask) |
virtual void | showSolution_s (std::ostream &s, const doublereal *x) |
doublereal | z (size_t jlocal) const |
doublereal | zmin () const |
doublereal | zmax () const |
void | setProfile (const std::string &name, doublereal *values, doublereal *soln) |
vector_fp & | grid () |
const vector_fp & | grid () const |
doublereal | grid (size_t point) |
void | setGrid (size_t n, const doublereal *z) |
virtual doublereal | initialValue (size_t n, size_t j) |
Initial value of solution component n at grid point j. More... | |
Additional Inherited Members | |
Public Attributes inherited from Domain1D | |
doublereal | m_zfixed |
doublereal | m_tfixed |
bool | m_adiabatic |
Protected Member Functions inherited from StFlow | |
doublereal | component (const doublereal *x, size_t i, size_t j) const |
doublereal | conc (const doublereal *x, size_t k, size_t j) const |
doublereal | cbar (const doublereal *x, size_t k, size_t j) const |
doublereal | wdot (size_t k, size_t j) const |
void | getWdot (doublereal *x, size_t j) |
Write the net production rates at point j into array m_wdot More... | |
void | updateThermo (const doublereal *x, size_t j0, size_t j1) |
Update the thermodynamic properties from point j0 to point j1 (inclusive), based on solution x. More... | |
doublereal | cdif2 (const doublereal *x, size_t n, size_t j, const doublereal *f) const |
doublereal | shear (const doublereal *x, size_t j) const |
doublereal | divHeatFlux (const doublereal *x, size_t j) const |
size_t | mindex (size_t k, size_t j, size_t m) |
void | updateDiffFluxes (const doublereal *x, size_t j0, size_t j1) |
Update the diffusive mass fluxes. More... | |
void | updateTransport (doublereal *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 . More... | |
doublereal | T (const doublereal *x, size_t j) const |
doublereal & | T (doublereal *x, size_t j) |
doublereal | T_prev (size_t j) const |
doublereal | rho_u (const doublereal *x, size_t j) const |
doublereal | u (const doublereal *x, size_t j) const |
doublereal | V (const doublereal *x, size_t j) const |
doublereal | V_prev (size_t j) const |
doublereal | lambda (const doublereal *x, size_t j) const |
doublereal | Y (const doublereal *x, size_t k, size_t j) const |
doublereal & | Y (doublereal *x, size_t k, size_t j) |
doublereal | Y_prev (size_t k, size_t j) const |
doublereal | X (const doublereal *x, size_t k, size_t j) const |
doublereal | flux (size_t k, size_t j) const |
doublereal | dVdz (const doublereal *x, size_t j) const |
doublereal | dYdz (const doublereal *x, size_t k, size_t j) const |
doublereal | dTdz (const doublereal *x, size_t j) const |
Protected Attributes inherited from StFlow | |
doublereal | m_inlet_u |
doublereal | m_inlet_V |
doublereal | m_inlet_T |
doublereal | m_rho_inlet |
vector_fp | m_yin |
doublereal | m_surface_T |
doublereal | m_press |
vector_fp | m_dz |
vector_fp | m_rho |
vector_fp | m_wtm |
vector_fp | m_wt |
vector_fp | m_cp |
vector_fp | m_enth |
vector_fp | m_visc |
vector_fp | m_tcon |
vector_fp | m_diff |
vector_fp | m_multidiff |
Array2D | m_dthermal |
Array2D | m_flux |
Array2D | m_wdot |
vector_fp | m_surfdot |
size_t | m_nsp |
IdealGasPhase * | m_thermo |
Kinetics * | m_kin |
Transport * | m_trans |
MultiJac * | m_jac |
bool | m_ok |
std::vector< bool > | m_do_energy |
bool | m_do_soret |
std::vector< bool > | m_do_species |
int | m_transport_option |
Array2D | m_fixedy |
vector_fp | m_fixedtemp |
vector_fp | m_zfix |
vector_fp | m_tfix |
bool | m_dovisc |
Protected Attributes inherited from Domain1D | |
doublereal | m_rdt |
size_t | m_nv |
size_t | m_points |
vector_fp | m_slast |
doublereal | m_time |
vector_fp | m_max |
vector_fp | m_min |
vector_fp | m_rtol_ss |
vector_fp | m_rtol_ts |
vector_fp | m_atol_ss |
vector_fp | m_atol_ts |
vector_fp | m_z |
OneDim * | m_container |
size_t | m_index |
int | m_type |
size_t | m_iloc |
Starting location within the solution vector for unknowns that correspond to this domain. More... | |
size_t | m_jstart |
Domain1D * | m_left |
Domain1D * | m_right |
std::string | m_id |
Identity tag for the domain. More... | |
std::string | m_desc |
Refiner * | m_refiner |
vector_int | m_td |
std::vector< std::string > | m_name |
int | m_bw |
|
virtual |
Evaluate all residual components at the right boundary.
Implements StFlow.
Definition at line 959 of file StFlow.cpp.
|
virtual |
Evaluate the residual corresponding to the continuity equation at all interior grid points.
Implements StFlow.
Definition at line 983 of file StFlow.cpp.