10#ifndef CT_BOUNDARY1D_H
11#define CT_BOUNDARY1D_H
21const int LeftInlet = 1;
22const int RightInlet = -1;
54 virtual size_t nSpecies() {
83 virtual void setupGrid(
size_t n,
const double* z) {}
88 StFlow* m_flow_left, *m_flow_right;
89 size_t m_ilr, m_left_nv, m_right_nv;
90 size_t m_left_loc, m_right_loc;
92 size_t m_left_nsp, m_right_nsp;
93 size_t m_sp_left, m_sp_right;
94 size_t m_start_left, m_start_right;
96 double m_temp, m_mdot;
122 virtual size_t nSpecies() {
132 virtual void eval(
size_t jg,
double* xg,
double* rg,
133 integer* diagg,
double rdt);
137 virtual void restore(
const AnyMap& state,
double* soln,
int loglevel);
163 virtual void eval(
size_t jg,
double* xg,
double* rg,
164 integer* diagg,
double rdt);
185 virtual void eval(
size_t jg,
double* xg,
double* rg,
186 integer* diagg,
double rdt);
202 m_type = cOutletType;
207 virtual void eval(
size_t jg,
double* xg,
double* rg,
208 integer* diagg,
double rdt);
227 virtual size_t nSpecies() {
237 virtual void eval(
size_t jg,
double* xg,
double* rg,
238 integer* diagg,
double rdt);
242 virtual void restore(
const AnyMap& state,
double* soln,
int loglevel);
266 virtual void eval(
size_t jg,
double* xg,
double* rg,
267 integer* diagg,
double rdt);
272 virtual void restore(
const AnyMap& state,
double* soln,
int loglevel);
274 virtual void showSolution_s(std::ostream& s,
const double* x);
290 void enableCoverageEquations(
bool docov) {
294 bool coverageEnabled() {
303 virtual void eval(
size_t jg,
double* xg,
double* rg,
304 integer* diagg,
double rdt);
309 virtual void restore(
const AnyMap& state,
double* soln,
int loglevel);
316 std::copy(x, x+m_nsp, m_fixed_cov.begin());
324 size_t m_surfindex, m_nsp;
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase,...
A map of string keys to values whose type can vary at runtime.
The base class for boundaries between one-dimensional spatial domains.
virtual void setMdot(double mdot)
Set the total mass flow rate.
virtual void setupGrid(size_t n, const double *z)
called to set up initial grid, and after grid refinement
virtual void setMoleFractions(const std::string &xin)
Set the mole fractions by specifying a std::string.
virtual double temperature()
Temperature [K].
virtual void setTemperature(double t)
Set the temperature.
virtual void setMoleFractions(const double *xin)
Set the mole fractions by specifying an array.
virtual double mdot()
The total mass flow rate [kg/m2/s].
virtual double massFraction(size_t k)
Mass fraction of species k.
Base class for one-dimensional domains.
A terminator that does nothing.
virtual AnyMap serialize(const double *soln) const
Save the state of this domain as an AnyMap.
virtual XML_Node & save(XML_Node &o, const double *const soln)
Save the current solution for this domain into an XML_Node.
virtual void showSolution(const double *x)
Print the solution.
virtual void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt)
Evaluate the residual function at point j.
virtual void restore(const XML_Node &dom, double *soln, int loglevel)
Restore the solution for this domain from an XML_Node.
virtual void setMoleFractions(const std::string &xin)
Set the mole fractions by specifying a std::string.
virtual AnyMap serialize(const double *soln) const
Save the state of this domain as an AnyMap.
virtual XML_Node & save(XML_Node &o, const double *const soln)
Save the current solution for this domain into an XML_Node.
virtual void showSolution(const double *x)
Print the solution.
virtual void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt)
Evaluate the residual function at point j.
virtual void setSpreadRate(double V0)
set spreading rate
virtual double massFraction(size_t k)
Mass fraction of species k.
virtual void restore(const XML_Node &dom, double *soln, int loglevel)
Restore the solution for this domain from an XML_Node.
virtual double spreadRate()
spreading rate
A kinetics manager for heterogeneous reaction mechanisms.
An error indicating that an unimplemented function has been called.
virtual AnyMap serialize(const double *soln) const
Save the state of this domain as an AnyMap.
virtual XML_Node & save(XML_Node &o, const double *const soln)
Save the current solution for this domain into an XML_Node.
virtual void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt)
Evaluate the residual function at point j.
virtual void restore(const XML_Node &dom, double *soln, int loglevel)
Restore the solution for this domain from an XML_Node.
An outlet with specified composition.
virtual void setMoleFractions(const std::string &xin)
Set the mole fractions by specifying a std::string.
virtual AnyMap serialize(const double *soln) const
Save the state of this domain as an AnyMap.
virtual XML_Node & save(XML_Node &o, const double *const soln)
Save the current solution for this domain into an XML_Node.
virtual void showSolution(const double *x)
Print the solution.
virtual void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt)
Evaluate the residual function at point j.
virtual double massFraction(size_t k)
Mass fraction of species k.
virtual void restore(const XML_Node &dom, double *soln, int loglevel)
Restore the solution for this domain from an XML_Node.
virtual AnyMap serialize(const double *soln) const
Save the state of this domain as an AnyMap.
virtual XML_Node & save(XML_Node &o, const double *const soln)
Save the current solution for this domain into an XML_Node.
virtual void _finalize(const double *x)
In some cases, a domain may need to set parameters that depend on the initial solution estimate.
virtual std::string componentName(size_t n) const
Name of the nth component. May be overloaded.
virtual void showSolution(const double *x)
Print the solution.
virtual void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt)
Evaluate the residual function at point j.
virtual void resetBadValues(double *xg)
virtual void _getInitialSoln(double *x)
Writes some or all initial solution values into the global solution array, beginning at the location ...
virtual void restore(const XML_Node &dom, double *soln, int loglevel)
Restore the solution for this domain from an XML_Node.
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
virtual AnyMap serialize(const double *soln) const
Save the state of this domain as an AnyMap.
virtual XML_Node & save(XML_Node &o, const double *const soln)
Save the current solution for this domain into an XML_Node.
virtual void showSolution(const double *x)
Print the solution.
virtual void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt)
Evaluate the residual function at point j.
virtual void restore(const XML_Node &dom, double *soln, int loglevel)
Restore the solution for this domain from an XML_Node.
A simple thermodynamic model for a surface phase, assuming an ideal solution model.
void getCoverages(doublereal *theta) const
Return a vector of surface coverages.
virtual AnyMap serialize(const double *soln) const
Save the state of this domain as an AnyMap.
virtual XML_Node & save(XML_Node &o, const double *const soln)
Save the current solution for this domain into an XML_Node.
virtual void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt)
Evaluate the residual function at point j.
virtual void restore(const XML_Node &dom, double *soln, int loglevel)
Restore the solution for this domain from an XML_Node.
Base class for a phase with thermodynamic properties.
Class XML_Node is a tree-based representation of the contents of an XML file.
Namespace for the Cantera kernel.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.