Cantera  2.3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Bdry1D Class Reference

The base class for boundaries between one-dimensional spatial domains. More...

#include <Inlet1D.h>

Inheritance diagram for Bdry1D:
[legend]
Collaboration diagram for Bdry1D:
[legend]

Public Member Functions

virtual void init ()
 
virtual void setTemperature (doublereal t)
 Set the temperature. More...
 
virtual doublereal temperature ()
 Temperature [K]. More...
 
virtual size_t nSpecies ()
 
virtual void setMoleFractions (const std::string &xin)
 Set the mole fractions by specifying a std::string. More...
 
virtual void setMoleFractions (const doublereal *xin)
 Set the mole fractions by specifying an array. More...
 
virtual doublereal massFraction (size_t k)
 Mass fraction of species k. More...
 
virtual void setMdot (doublereal mdot)
 Set the total mass flow rate. More...
 
virtual doublereal mdot ()
 The total mass flow rate [kg/m2/s]. More...
 
virtual void setupGrid (size_t n, const doublereal *z)
 called to set up initial grid, and after grid refinement More...
 
- Public Member Functions inherited from Domain1D
 Domain1D (size_t nv=1, size_t points=1, double 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 OneDimcontainer () const
 The container holding this domain. More...
 
void setContainer (OneDim *c, size_t index)
 Specify the container object for this domain, and the position of this domain in the list. More...
 
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)
 
virtual void setState (size_t point, const doublereal *state, doublereal *x)
 
virtual void resetBadValues (double *xg)
 
virtual void resize (size_t nv, size_t np)
 
Refinerrefiner ()
 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. More...
 
void checkComponentArraySize (size_t nn) const
 Check that an array size is at least 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. More...
 
void checkPointArraySize (size_t nn) const
 Check that an array size is at least nPoints(). More...
 
virtual std::string componentName (size_t n) const
 Name of the nth component. May be overloaded. 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 n, doublereal lower, doublereal upper)
 
void setTransientTolerances (doublereal rtol, doublereal atol, size_t n=npos)
 Set tolerances for time-stepping mode. More...
 
void setSteadyTolerances (doublereal rtol, doublereal atol, size_t n=npos)
 Set tolerances for steady-state mode. More...
 
doublereal rtol (size_t n)
 Relative tolerance of the nth component. More...
 
doublereal atol (size_t n)
 Absolute tolerance of the nth component. More...
 
double steady_rtol (size_t n)
 Steady relative tolerance of the nth component. More...
 
double steady_atol (size_t n)
 Steady absolute tolerance of the nth component. More...
 
double transient_rtol (size_t n)
 Transient relative tolerance of the nth component. More...
 
double transient_atol (size_t n)
 Transient 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)
 Prepare to do time stepping with time step dt. More...
 
void setSteadyMode ()
 Prepare to solve the steady-state problem. More...
 
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 void eval (size_t j, doublereal *x, doublereal *r, integer *mask, doublereal rdt=0.0)
 Evaluate the residual function at point j. More...
 
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
 
virtual void setJac (MultiJac *jac)
 
virtual XML_Nodesave (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...
 
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...
 
Domain1Dleft () const
 Return a pointer to the left neighbor. More...
 
Domain1Dright () 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)
 
virtual void showSolution (const doublereal *x)
 Print the solution. More...
 
doublereal z (size_t jlocal) const
 
doublereal zmin () const
 
doublereal zmax () const
 
void setProfile (const std::string &name, double *values, double *soln)
 
vector_fpgrid ()
 
const vector_fpgrid () const
 
doublereal grid (size_t point) const
 
virtual void _getInitialSoln (doublereal *x)
 Writes some or all initial solution values into the global solution array, beginning at the location pointed to by x. More...
 
virtual doublereal initialValue (size_t n, size_t j)
 Initial value of solution component n at grid point j. 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 forceFullUpdate (bool update)
 In some cases, for computational efficiency some properties (e.g. More...
 

Protected Member Functions

void _init (size_t n)
 

Protected Attributes

StFlowm_flow_left
 
StFlowm_flow_right
 
size_t m_ilr
 
size_t m_left_nv
 
size_t m_right_nv
 
size_t m_left_loc
 
size_t m_right_loc
 
size_t m_left_points
 
size_t m_left_nsp
 
size_t m_right_nsp
 
size_t m_sp_left
 
size_t m_sp_right
 
size_t m_start_left
 
size_t m_start_right
 
ThermoPhasem_phase_left
 
ThermoPhasem_phase_right
 
doublereal m_temp
 
doublereal m_mdot
 
- 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
 
OneDimm_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
 
Domain1Dm_left
 
Domain1Dm_right
 
std::string m_id
 Identity tag for the domain. More...
 
std::string m_desc
 
std::unique_ptr< Refinerm_refiner
 
vector_int m_td
 
std::vector< std::string > m_name
 
int m_bw
 
bool m_force_full_update
 

Detailed Description

The base class for boundaries between one-dimensional spatial domains.

The boundary may have its own internal variables, such as surface species coverages.

The boundary types are an inlet, an outlet, a symmetry plane, and a surface.

The public methods are all virtual, and the base class implementations throw exceptions.

Definition at line 35 of file Inlet1D.h.

Member Function Documentation

◆ init()

virtual void init ( )
inlinevirtual

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 Domain1D.

Reimplemented in ReactingSurf1D, Surf1D, OutletRes1D, Outlet1D, Symm1D, Empty1D, and Inlet1D.

Definition at line 40 of file Inlet1D.h.

◆ setTemperature()

virtual void setTemperature ( doublereal  t)
inlinevirtual

Set the temperature.

Definition at line 45 of file Inlet1D.h.

◆ temperature()

virtual doublereal temperature ( )
inlinevirtual

Temperature [K].

Definition at line 50 of file Inlet1D.h.

◆ setMoleFractions() [1/2]

virtual void setMoleFractions ( const std::string &  xin)
inlinevirtual

Set the mole fractions by specifying a std::string.

Reimplemented in OutletRes1D, and Inlet1D.

Definition at line 59 of file Inlet1D.h.

◆ setMoleFractions() [2/2]

virtual void setMoleFractions ( const doublereal *  xin)
inlinevirtual

Set the mole fractions by specifying an array.

Reimplemented in OutletRes1D, and Inlet1D.

Definition at line 64 of file Inlet1D.h.

◆ massFraction()

virtual doublereal massFraction ( size_t  k)
inlinevirtual

Mass fraction of species k.

Reimplemented in OutletRes1D, and Inlet1D.

Definition at line 69 of file Inlet1D.h.

◆ setMdot()

virtual void setMdot ( doublereal  mdot)
inlinevirtual

Set the total mass flow rate.

Definition at line 74 of file Inlet1D.h.

References Bdry1D::mdot().

◆ mdot()

virtual doublereal mdot ( )
inlinevirtual

The total mass flow rate [kg/m2/s].

Definition at line 79 of file Inlet1D.h.

Referenced by Bdry1D::setMdot().

◆ setupGrid()

virtual void setupGrid ( size_t  n,
const doublereal *  z 
)
inlinevirtual

called to set up initial grid, and after grid refinement

Reimplemented from Domain1D.

Definition at line 83 of file Inlet1D.h.


The documentation for this class was generated from the following files: