An outlet with specified composition. More...
#include <Boundary1D.h>
An outlet with specified composition.
Flow is assumed to be from left to right.
Definition at line 262 of file Boundary1D.h.
Public Member Functions | |
OutletRes1D (shared_ptr< Solution > solution, const string &id="") | |
string | domainType () const override |
Domain type flag. | |
void | show (const double *x) override |
Print the solution. | |
size_t | nSpecies () override |
void | setMoleFractions (const string &xin) override |
Set the mole fractions by specifying a string. | |
void | setMoleFractions (const double *xin) override |
Set the mole fractions by specifying an array. | |
double | massFraction (size_t k) override |
Mass fraction of species k. | |
void | init () override |
Initialize. | |
void | eval (size_t jg, double *xg, double *rg, integer *diagg, double rdt) override |
Evaluate the residual function at point j. | |
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. | |
Public Member Functions inherited from Boundary1D | |
void | init () override |
Initialize. | |
string | domainType () const override |
Domain type flag. | |
bool | isConnector () override |
True if the domain is a connector domain. | |
virtual void | setTemperature (double t) |
Set the temperature. | |
virtual double | temperature () |
Temperature [K]. | |
virtual size_t | nSpecies () |
virtual void | setMoleFractions (const string &xin) |
Set the mole fractions by specifying a string. | |
virtual void | setMoleFractions (const double *xin) |
Set the mole fractions by specifying an array. | |
virtual double | massFraction (size_t k) |
Mass fraction of species k. | |
virtual void | setMdot (double mdot) |
Set the total mass flow rate. | |
virtual void | setSpreadRate (double V0) |
Set tangential velocity gradient [1/s] at this boundary. | |
virtual double | spreadRate () |
Tangential velocity gradient [1/s] at this boundary. | |
virtual double | mdot () |
The total mass flow rate [kg/m2/s]. | |
void | setupGrid (size_t n, const double *z) override |
called to set up initial grid, and after grid refinement | |
void | fromArray (SolutionArray &arr, double *soln) override |
Restore the solution for this domain from a SolutionArray. | |
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 |
virtual string | domainType () const |
Domain type flag. | |
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) |
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. | |
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 | 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. | |
Protected Attributes | |
size_t | m_nsp = 0 |
vector< double > | m_yres |
string | m_xstr |
StFlow * | m_flow = nullptr |
Protected Attributes inherited from Boundary1D | |
StFlow * | m_flow_left = nullptr |
StFlow * | m_flow_right = nullptr |
size_t | m_ilr = 0 |
size_t | m_left_nv = 0 |
size_t | m_right_nv = 0 |
size_t | m_left_loc = 0 |
size_t | m_right_loc = 0 |
size_t | m_left_points = 0 |
size_t | m_left_nsp = 0 |
size_t | m_right_nsp = 0 |
size_t | m_sp_left = 0 |
size_t | m_sp_right = 0 |
size_t | m_start_left = 0 |
size_t | m_start_right = 0 |
ThermoPhase * | m_phase_left = nullptr |
ThermoPhase * | m_phase_right = nullptr |
double | m_temp = 0.0 |
double | m_mdot = 0.0 |
Protected Attributes inherited from Domain1D | |
shared_ptr< vector< double > > | m_state |
data pointer shared from OneDim | |
double | m_rdt = 0.0 |
size_t | m_nv = 0 |
size_t | m_points |
Number of grid points. | |
vector< double > | m_slast |
vector< double > | m_max |
vector< double > | m_min |
vector< double > | m_rtol_ss |
vector< double > | m_rtol_ts |
vector< double > | m_atol_ss |
vector< double > | m_atol_ts |
vector< double > | m_z |
OneDim * | m_container = nullptr |
size_t | m_index |
size_t | m_iloc = 0 |
Starting location within the solution vector for unknowns that correspond to this domain. | |
size_t | m_jstart = 0 |
Domain1D * | m_left = nullptr |
Domain1D * | m_right = nullptr |
string | m_id |
Identity tag for the domain. | |
unique_ptr< Refiner > | m_refiner |
vector< string > | m_name |
int | m_bw = -1 |
bool | m_force_full_update = false |
shared_ptr< Solution > | m_solution |
Composite thermo/kinetics/transport handler. | |
Additional Inherited Members | |
Protected Member Functions inherited from Boundary1D | |
void | _init (size_t n) |
Protected Member Functions inherited from Domain1D | |
virtual AnyMap | getMeta () const |
Retrieve meta data. | |
virtual void | setMeta (const AnyMap &meta) |
Retrieve meta data. | |
OutletRes1D | ( | ) |
Definition at line 347 of file Boundary1D.cpp.
OutletRes1D | ( | shared_ptr< Solution > | solution, |
const string & | id = "" |
||
) |
Definition at line 351 of file Boundary1D.cpp.
|
inlineoverridevirtual |
Domain type flag.
string
. Reimplemented from Boundary1D.
Definition at line 269 of file Boundary1D.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Reimplemented from Boundary1D.
Definition at line 275 of file Boundary1D.h.
|
overridevirtual |
Set the mole fractions by specifying a string.
Reimplemented from Boundary1D.
Definition at line 414 of file Boundary1D.cpp.
|
overridevirtual |
Set the mole fractions by specifying an array.
Reimplemented from Boundary1D.
Definition at line 424 of file Boundary1D.cpp.
|
inlineoverridevirtual |
Mass fraction of species k.
Reimplemented from Boundary1D.
Definition at line 281 of file Boundary1D.h.
|
overridevirtual |
Initialize.
This method is called by OneDim::init() for each domain once at the beginning of a simulation. Base class method does nothing, but may be overloaded.
Reimplemented from Boundary1D.
Definition at line 433 of file Boundary1D.cpp.
|
overridevirtual |
Evaluate the residual function at point j.
If j == npos, evaluate the residual function at all points.
This function must be implemented in classes derived from Domain1D.
j | Grid point at which to update the residual | |
[in] | x | State vector |
[out] | r | residual vector |
[out] | mask | Boolean mask indicating whether each solution component has a time derivative (1) or not (0). |
[in] | rdt | Reciprocal of the timestep (rdt=0 implies steady- state.) |
Reimplemented from Domain1D.
Definition at line 456 of file Boundary1D.cpp.
|
overridevirtual |
Save the state of this domain as a SolutionArray.
soln | local solution vector for this domain |
Reimplemented from Domain1D.
Definition at line 488 of file Boundary1D.cpp.
|
overridevirtual |
Restore the solution for this domain from a SolutionArray.
[in] | arr | SolutionArray defining the state of this domain |
[out] | soln | Value of the solution vector, local to this domain |
Reimplemented from Boundary1D.
Definition at line 505 of file Boundary1D.cpp.
|
protected |
Definition at line 291 of file Boundary1D.h.
|
protected |
Definition at line 292 of file Boundary1D.h.
|
protected |
Definition at line 293 of file Boundary1D.h.
|
protected |
Definition at line 294 of file Boundary1D.h.