Cantera  2.0
Public Member Functions | Public Attributes | Protected Attributes | List of all members
AxiStagnFlow Class Reference

A class for axisymmetric stagnation flows. More...

#include <StFlow.h>

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

Public Member Functions

 AxiStagnFlow (IdealGasPhase *ph=0, size_t nsp=1, size_t points=1)
 
virtual void eval (size_t j, doublereal *x, doublereal *r, integer *mask, doublereal rdt)
 Evaluate the residual function for axisymmetric stagnation flow.
 
virtual std::string flowType ()
 
int domainType ()
 Domain type flag.
 
size_t domainIndex ()
 The left-to-right location of this domain.
 
bool isConnector ()
 True if the domain is a connector domain.
 
const OneDimcontainer () 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)
 
size_t bandwidth ()
 Set the Jacobian bandwidth for this domain.
 
virtual void setInitialState (doublereal *xlocal=0)
 
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 Throws an exception if n is greater than nComponents()-1.
 
void checkComponentArraySize (size_t nn) const
 Check that an array size is at least nComponents() Throws an exception if nn is less than 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 Throws an exception if n is greater than nPoints()-1.
 
void checkPointArraySize (size_t nn) const
 Check that an array size is at least nPoints() Throws an exception if nn is less than nPoints().
 
void setComponentName (size_t n, std::string name)
 
void setComponentType (size_t n, int ctype)
 
void setBounds (size_t nl, const doublereal *lower, size_t nu, const doublereal *upper)
 Set the lower and upper bounds for each solution component.
 
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.
 
void setTolerances (size_t n, doublereal rtol, doublereal atol, int ts=0)
 set the error tolerances for solution component n.
 
void setTolerances (doublereal rtol, doublereal atol, int ts=0)
 set scalar error tolerances.
 
void setTolerancesTS (doublereal rtol, doublereal atol)
 
void setTolerancesSS (doublereal rtol, doublereal atol)
 
doublereal rtol (size_t n)
 Relative tolerance of the nth component.
 
doublereal atol (size_t n)
 Absolute tolerance of the nth component.
 
doublereal upperBound (size_t n) const
 Upper bound on the nth component.
 
doublereal lowerBound (size_t n) const
 Lower bound on the nth component.
 
void initTimeInteg (doublereal dt, const doublereal *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 (e.g.
 
void evalss (doublereal *x, doublereal *r, integer *mask)
 Evaluate the steady-state residual at all points, even if in transient mode.
 
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)
 Does nothing.
 
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.
 
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 (i.e., left-most) grid point belonging to this domain.
 
size_t lastPoint () const
 The index of the last (i.e., 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.
 
Domain1Dleft () const
 Return a pointer to the left neighbor.
 
Domain1Dright () 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 std::string &s)
 Specify an identifying tag for this domain.
 
std::string id () const
 
void setDesc (const std::string &s)
 Specify descriptive text for this domain.
 
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 (std::string name, doublereal *values, doublereal *soln)
 
vector_fpgrid ()
 
const vector_fpgrid () 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.
 

Public Attributes

doublereal m_zfixed
 
doublereal m_tfixed
 
bool m_adiabatic
 

Protected Attributes

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.
 
size_t m_jstart
 
Domain1Dm_left
 
Domain1Dm_right
 
std::string m_id
 Identity tag for the domain.
 
std::string m_desc
 
Refiner * m_refiner
 
vector_int m_td
 
std::vector< std::string > m_name
 
int m_bw
 

Problem Specification

virtual void setupGrid (size_t n, const doublereal *z)
 
thermo_tphase ()
 
Kineticskinetics ()
 
virtual void init ()
 Initialize.
 
void setThermo (IdealGasPhase &th)
 Set the thermo manager.
 
void setKinetics (Kinetics &kin)
 Set the kinetics manager. The kinetics manager must.
 
void setTransport (Transport &trans, bool withSoret=false)
 set the transport manager
 
void enableSoret (bool withSoret)
 
bool withSoret () const
 
void setPressure (doublereal p)
 Set the pressure.
 
virtual void setState (size_t point, const doublereal *state, doublereal *x)
 
virtual void _getInitialSoln (doublereal *x)
 Write the initial solution estimate into array x.
 
virtual void _finalize (const doublereal *x)
 In some cases, a domain may need to set parameters that depend on the initial solution estimate.
 
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.
 
void setTemperature (size_t j, doublereal 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.
 
void setMassFraction (size_t j, size_t k, doublereal y)
 Set the mass fraction fixed point for species k at grid point j, and disable the species equation so that the solution will be held to this value.
 
doublereal T_fixed (size_t j) const
 The fixed temperature value at point j.
 
doublereal Y_fixed (size_t k, size_t j) const
 The fixed mass fraction value of species k at point j.
 
virtual std::string componentName (size_t n) const
 Name of the nth component. May be overloaded.
 
size_t componentIndex (std::string name) const
 
virtual void showSolution (const doublereal *x)
 Print the solution.
 
virtual void save (XML_Node &o, const doublereal *const sol)
 Save the current solution for this domain into an XML_Node.
 
virtual void restore (const XML_Node &dom, doublereal *soln)
 
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.
 
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.
 
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.
 
doublereal density (size_t j) const
 
virtual bool fixed_mdot ()
 
void setViscosityFlag (bool dovisc)
 
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
 
IdealGasPhasem_thermo
 
Kineticsm_kin
 
Transportm_trans
 
MultiJacm_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
 
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
 
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.
 
doublereal cdif2 (const doublereal *x, size_t n, size_t j, const doublereal *f) const
 
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
 
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.
 
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.
 

Detailed Description

A class for axisymmetric stagnation flows.

Definition at line 507 of file StFlow.h.

Member Function Documentation

void eval ( size_t  jg,
doublereal *  xg,
doublereal *  rg,
integer *  diagg,
doublereal  rdt 
)
virtual

Evaluate the residual function for axisymmetric stagnation flow.

If jpt is less than zero, the residual function is evaluated at all grid points. If jpt >= 0, then the residual function is only evaluated at grid points jpt-1, jpt, and jpt+1. This option is used to efficiently evaluate the Jacobian numerically.

Reimplemented from Domain1D.

Definition at line 342 of file StFlow.cpp.

References IdealGasPhase::cp_R_ref(), IdealGasPhase::enthalpy_RT_ref(), Domain1D::firstPoint(), Cantera::GasConstant, StFlow::getWdot(), Domain1D::lastPoint(), Domain1D::loc(), ckr::min(), Cantera::npos, StFlow::setGas(), StFlow::T_fixed(), StFlow::updateDiffFluxes(), StFlow::updateThermo(), and StFlow::updateTransport().

virtual void init ( )
inlinevirtualinherited

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.

Definition at line 82 of file StFlow.h.

void setThermo ( IdealGasPhase th)
inlineinherited

Set the thermo manager.

Note that the flow equations assume the ideal gas equation.

Definition at line 89 of file StFlow.h.

void setKinetics ( Kinetics kin)
inlineinherited

Set the kinetics manager. The kinetics manager must.

Definition at line 94 of file StFlow.h.

void setTransport ( Transport trans,
bool  withSoret = false 
)
inherited

set the transport manager

Install a transport manager.

Definition at line 242 of file StFlow.cpp.

References Transport::model(), and Array2D::resize().

void setPressure ( doublereal  p)
inlineinherited

Set the pressure.

Since the flow equations are for the limit of small Mach number, the pressure is very nearly constant throughout the flow.

Definition at line 108 of file StFlow.h.

virtual void setState ( size_t  point,
const doublereal *  state,
doublereal *  x 
)
inlinevirtualinherited
Todo:
remove? may be unused

Reimplemented from Domain1D.

Definition at line 114 of file StFlow.h.

References StFlow::setMassFraction(), and StFlow::setTemperature().

virtual void _getInitialSoln ( doublereal *  x)
inlinevirtualinherited

Write the initial solution estimate into array x.

Reimplemented from Domain1D.

Definition at line 125 of file StFlow.h.

References StFlow::T_fixed(), and StFlow::Y_fixed().

void _finalize ( const doublereal *  x)
virtualinherited

In some cases, a domain may need to set parameters that depend on the initial solution estimate.

In such cases, the parameters may be set in method _finalize. This method is called just before the Newton solver is called, and the x array is guaranteed to be the local solution vector for this domain that will be used as the initial guess. If no such parameters need to be set, then method _finalize does not need to be overloaded.

Reimplemented from Domain1D.

Definition at line 306 of file StFlow.cpp.

References Cantera::linearInterp(), StFlow::setMassFraction(), and StFlow::setTemperature().

void setFixedTempProfile ( vector_fp zfixed,
vector_fp tfixed 
)
inlineinherited

Sometimes it is desired to carry out the simulation using a specified temperature profile, rather than computing it by solving the energy equation.

This method specifies this profile.

Definition at line 141 of file StFlow.h.

void setTemperature ( size_t  j,
doublereal  t 
)
inlineinherited

Set the temperature fixed point at grid point j, and disable the energy equation so that the solution will be held to this value.

Definition at line 151 of file StFlow.h.

Referenced by StFlow::_finalize(), and StFlow::setState().

void setMassFraction ( size_t  j,
size_t  k,
doublereal  y 
)
inlineinherited

Set the mass fraction fixed point for species k at grid point j, and disable the species equation so that the solution will be held to this value.

note: in practice, the species are hardly ever held fixed.

Definition at line 162 of file StFlow.h.

Referenced by StFlow::_finalize(), and StFlow::setState().

doublereal T_fixed ( size_t  j) const
inlineinherited

The fixed temperature value at point j.

Definition at line 169 of file StFlow.h.

Referenced by StFlow::_getInitialSoln(), AxiStagnFlow::eval(), and FreeFlame::eval().

doublereal Y_fixed ( size_t  k,
size_t  j 
) const
inlineinherited

The fixed mass fraction value of species k at point j.

Definition at line 175 of file StFlow.h.

Referenced by StFlow::_getInitialSoln().

string componentName ( size_t  n) const
virtualinherited

Name of the nth component. May be overloaded.

Reimplemented from Domain1D.

Definition at line 985 of file StFlow.cpp.

References Phase::speciesName().

Referenced by StFlow::showSolution().

void showSolution ( const doublereal *  x)
virtualinherited

Print the solution.

Reimplemented from Domain1D.

Definition at line 887 of file StFlow.cpp.

References StFlow::componentName(), StFlow::updateThermo(), and Cantera::writelog().

void save ( XML_Node o,
const doublereal *const  sol 
)
virtualinherited

Save the current solution for this domain into an XML_Node.

Parameters
oXML_Node to save the solution to.
solCurrent value of the solution vector. The object will pick out which part of the solution vector pertains to this object.

Reimplemented from Domain1D.

Definition at line 1170 of file StFlow.cpp.

References XML_Node::addAttribute(), ctml::addFloat(), ctml::addFloatArray(), ctml::addString(), DATA_PTR, Array2D::getRow(), Domain1D::loc(), Domain1D::m_id, Array2D::nColumns(), and Phase::speciesName().

void resize ( size_t  ncomponents,
size_t  points 
)
virtualinherited

Change the grid size.

Called after grid refinement.

Reimplemented from Domain1D.

Definition at line 197 of file StFlow.cpp.

References Array2D::resize(), and Domain1D::resize().

void setGas ( const doublereal *  x,
size_t  j 
)
inherited

Set the gas object state to be consistent with the solution at point j.

Definition at line 280 of file StFlow.cpp.

References Phase::setMassFractions_NoNorm(), IdealGasPhase::setPressure(), and Phase::setTemperature().

Referenced by ReactingSurf1D::eval(), AxiStagnFlow::eval(), FreeFlame::eval(), StFlow::getWdot(), and StFlow::updateThermo().

void setGasAtMidpoint ( const doublereal *  x,
size_t  j 
)
inherited

Set the gas state to be consistent with the solution at the midpoint between j and j + 1.

Definition at line 293 of file StFlow.cpp.

References DATA_PTR, Phase::setMassFractions_NoNorm(), IdealGasPhase::setPressure(), and Phase::setTemperature().

Referenced by StFlow::updateTransport().

void getWdot ( doublereal *  x,
size_t  j 
)
inlineprotectedinherited

write the net production rates at point j into array m_wdot

Definition at line 303 of file StFlow.h.

References Kinetics::getNetProductionRates(), and StFlow::setGas().

Referenced by AxiStagnFlow::eval(), and FreeFlame::eval().

void updateThermo ( const doublereal *  x,
size_t  j0,
size_t  j1 
)
inlineprotectedinherited

update the thermodynamic properties from point j0 to point j1 (inclusive), based on solution x.

Definition at line 312 of file StFlow.h.

References ThermoPhase::cp_mass(), Phase::density(), Phase::meanMolecularWeight(), and StFlow::setGas().

Referenced by AxiStagnFlow::eval(), FreeFlame::eval(), and StFlow::showSolution().

void updateDiffFluxes ( const doublereal *  x,
size_t  j0,
size_t  j1 
)
protectedinherited

Update the diffusive mass fluxes.

Definition at line 942 of file StFlow.cpp.

Referenced by AxiStagnFlow::eval(), and FreeFlame::eval().

void updateTransport ( doublereal *  x,
size_t  j0,
size_t  j1 
)
protectedinherited
int domainType ( )
inlineinherited

Domain type flag.

Definition at line 71 of file Domain1D.h.

size_t domainIndex ( )
inlineinherited

The left-to-right location of this domain.

Definition at line 78 of file Domain1D.h.

Referenced by Cantera::bound_step().

bool isConnector ( )
inlineinherited

True if the domain is a connector domain.

Definition at line 85 of file Domain1D.h.

const OneDim& container ( ) const
inlineinherited

The container holding this domain.

Definition at line 92 of file Domain1D.h.

void setContainer ( OneDim c,
size_t  index 
)
inlineinherited

Specify the container object for this domain, and the position of this domain in the list.

Definition at line 100 of file Domain1D.h.

Referenced by OneDim::addDomain().

size_t bandwidth ( )
inlineinherited

Set the Jacobian bandwidth for this domain.

When class OneDim computes the bandwidth of the overall multi-domain problem (in OneDim::resize()), it calls this method for the bandwidth of each domain. If setBandwidth has not been called, then a negative bandwidth is returned, in which case OneDim assumes that this domain is dense – that is, at each point, all components depend on the value of all other components at that point. In this case, the bandwidth is bw = 2*nComponents() - 1. However, if this domain contains some components that are uncoupled from other components at the same point, then this default bandwidth may greatly overestimate the true bandwidth, with a substantial penalty in performance. For such domains, use method setBandwidth to specify the bandwidth before passing this domain to the Sim1D or OneDim constructor.

Definition at line 129 of file Domain1D.h.

Referenced by OneDim::resize().

Refiner& refiner ( )
inlineinherited

Return a reference to the grid refiner.

Definition at line 172 of file Domain1D.h.

Referenced by Sim1D::refine(), Sim1D::setGridMin(), and Sim1D::setRefineCriteria().

size_t nComponents ( ) const
inlineinherited
void checkComponentIndex ( size_t  n) const
inlineinherited

Check that the specified component index is in range Throws an exception if n is greater than nComponents()-1.

Definition at line 183 of file Domain1D.h.

void checkComponentArraySize ( size_t  nn) const
inlineinherited

Check that an array size is at least nComponents() Throws an exception if nn is less than nComponents().

Used before calls which take an array pointer.

Definition at line 192 of file Domain1D.h.

size_t nPoints ( ) const
inlineinherited
void checkPointIndex ( size_t  n) const
inlineinherited

Check that the specified point index is in range Throws an exception if n is greater than nPoints()-1.

Definition at line 205 of file Domain1D.h.

void checkPointArraySize ( size_t  nn) const
inlineinherited

Check that an array size is at least nPoints() Throws an exception if nn is less than nPoints().

Used before calls which take an array pointer.

Definition at line 214 of file Domain1D.h.

void setBounds ( size_t  nl,
const doublereal *  lower,
size_t  nu,
const doublereal *  upper 
)
inlineinherited

Set the lower and upper bounds for each solution component.

Definition at line 254 of file Domain1D.h.

References Cantera::int2str().

Referenced by Inlet1D::init(), Empty1D::init(), Symm1D::init(), OutletRes1D::init(), Surf1D::init(), ReactingSurf1D::init(), and StFlow::StFlow().

void setTolerances ( size_t  nr,
const doublereal *  rtol,
size_t  na,
const doublereal *  atol,
int  ts = 0 
)
inherited

set the error tolerances for all solution components.

Definition at line 16 of file Domain1D.cpp.

References Cantera::int2str().

Referenced by Inlet1D::init(), Empty1D::init(), Symm1D::init(), OutletRes1D::init(), Surf1D::init(), ReactingSurf1D::init(), and StFlow::StFlow().

void setTolerances ( size_t  n,
doublereal  rtol,
doublereal  atol,
int  ts = 0 
)
inherited

set the error tolerances for solution component n.

Definition at line 34 of file Domain1D.cpp.

void setTolerances ( doublereal  rtol,
doublereal  atol,
int  ts = 0 
)
inherited

set scalar error tolerances.

All solution components will have the same relative and absolute error tolerances.

Definition at line 47 of file Domain1D.cpp.

doublereal rtol ( size_t  n)
inlineinherited

Relative tolerance of the nth component.

Definition at line 285 of file Domain1D.h.

Referenced by Inlet1D::init(), Empty1D::init(), Symm1D::init(), ReactingSurf1D::init(), Cantera::norm_square(), and StFlow::StFlow().

doublereal atol ( size_t  n)
inlineinherited

Absolute tolerance of the nth component.

Definition at line 290 of file Domain1D.h.

Referenced by Inlet1D::init(), Empty1D::init(), Symm1D::init(), ReactingSurf1D::init(), Cantera::norm_square(), and StFlow::StFlow().

doublereal upperBound ( size_t  n) const
inlineinherited

Upper bound on the nth component.

Definition at line 295 of file Domain1D.h.

Referenced by Cantera::bound_step(), and Inlet1D::save().

doublereal lowerBound ( size_t  n) const
inlineinherited

Lower bound on the nth component.

Definition at line 300 of file Domain1D.h.

Referenced by Cantera::bound_step(), and Inlet1D::save().

void initTimeInteg ( doublereal  dt,
const doublereal *  x0 
)
inlineinherited

Prepare to do time stepping with time step dt.

Copy the internally-stored solution at the last time step to array x0.

Definition at line 310 of file Domain1D.h.

References Domain1D::loc().

Referenced by OneDim::initTimeInteg().

void setSteadyMode ( )
inlineinherited

Prepare to solve the steady-state problem.

Set the internally-stored reciprocal of the time step to 0,0

Definition at line 319 of file Domain1D.h.

Referenced by OneDim::setSteadyMode().

bool steady ( )
inlineinherited

True if in steady-state mode.

Definition at line 324 of file Domain1D.h.

bool transient ( )
inlineinherited

True if not in steady-state mode.

Definition at line 329 of file Domain1D.h.

void needJacUpdate ( )
inherited

Set this if something has changed in the governing equations (e.g.

Signal that the current Jacobian is no longer valid.

the value of a constant has been changed, so that the last-computed Jacobian is no longer valid. Note: see file OneDim.cpp for the implementation of this method.

Definition at line 391 of file OneDim.cpp.

References OneDim::jacobian(), OneDim::saveStats(), and MultiJac::setAge().

Referenced by Inlet1D::setMoleFractions(), OutletRes1D::setMoleFractions(), and Inlet1D::setSpreadRate().

void evalss ( doublereal *  x,
doublereal *  r,
integer *  mask 
)
inlineinherited

Evaluate the steady-state residual at all points, even if in transient mode.

Used only to print diagnostic output.

Definition at line 345 of file Domain1D.h.

References Domain1D::eval(), and Cantera::npos.

virtual void update ( doublereal *  x)
inlinevirtualinherited

Does nothing.

Definition at line 373 of file Domain1D.h.

void locate ( )
inlineinherited

Find the index of the first grid point in this domain, and the start of its variables in the global solution vector.

Definition at line 413 of file Domain1D.h.

References Domain1D::lastPoint(), Domain1D::loc(), Domain1D::locate(), and Domain1D::m_iloc.

Referenced by Domain1D::linkLeft(), Domain1D::locate(), and Domain1D::resize().

virtual size_t loc ( size_t  j = 0) const
inlinevirtualinherited
size_t firstPoint ( ) const
inlineinherited

The index of the first (i.e., left-most) grid point belonging to this domain.

Definition at line 446 of file Domain1D.h.

Referenced by Inlet1D::eval(), Empty1D::eval(), Symm1D::eval(), OutletRes1D::eval(), Surf1D::eval(), ReactingSurf1D::eval(), AxiStagnFlow::eval(), and FreeFlame::eval().

size_t lastPoint ( ) const
inlineinherited

The index of the last (i.e., right-most) grid point belonging to this domain.

Definition at line 454 of file Domain1D.h.

Referenced by Inlet1D::eval(), Empty1D::eval(), Symm1D::eval(), OutletRes1D::eval(), Surf1D::eval(), ReactingSurf1D::eval(), AxiStagnFlow::eval(), FreeFlame::eval(), and Domain1D::locate().

void linkLeft ( Domain1D left)
inlineinherited

Set the left neighbor to domain 'left.

' Method 'locate' is called to update the global positions of this domain and all those to its right.

Definition at line 463 of file Domain1D.h.

References Domain1D::left(), and Domain1D::locate().

Referenced by Domain1D::append().

void linkRight ( Domain1D right)
inlineinherited

Set the right neighbor to domain 'right.

'

Definition at line 471 of file Domain1D.h.

References Domain1D::right().

Referenced by Domain1D::append().

void append ( Domain1D right)
inlineinherited

Append domain 'right' to this one, and update all links.

Definition at line 478 of file Domain1D.h.

References Domain1D::linkLeft(), and Domain1D::linkRight().

Domain1D* left ( ) const
inlineinherited

Return a pointer to the left neighbor.

Definition at line 486 of file Domain1D.h.

Referenced by Domain1D::linkLeft(), and OneDim::pointDomain().

Domain1D* right ( ) const
inlineinherited

Return a pointer to the right neighbor.

Definition at line 493 of file Domain1D.h.

Referenced by OneDim::init(), OneDim::initTimeInteg(), Domain1D::linkRight(), and OneDim::setSteadyMode().

double prevSoln ( size_t  n,
size_t  j 
) const
inlineinherited

Value of component n at point j in the previous solution.

Definition at line 500 of file Domain1D.h.

Referenced by ReactingSurf1D::eval().

void setID ( const std::string &  s)
inlineinherited

Specify an identifying tag for this domain.

Definition at line 507 of file Domain1D.h.

References Domain1D::m_id.

Referenced by StFlow::StFlow().

void setDesc ( const std::string &  s)
inlineinherited

Specify descriptive text for this domain.

Definition at line 522 of file Domain1D.h.

doublereal initialValue ( size_t  n,
size_t  j 
)
virtualinherited

Initial value of solution component n at grid point j.

Definition at line 207 of file Domain1D.cpp.

Member Data Documentation

size_t m_iloc
protectedinherited

Starting location within the solution vector for unknowns that correspond to this domain.

Remember there may be multiple domains associated with this problem

Definition at line 628 of file Domain1D.h.

Referenced by Domain1D::loc(), and Domain1D::locate().

std::string m_id
protectedinherited

Identity tag for the domain.

Definition at line 635 of file Domain1D.h.

Referenced by StFlow::save(), and Domain1D::setID().


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