10 #ifndef CT_BOUNDARY1D_H
11 #define CT_BOUNDARY1D_H
21 const int LeftInlet = 1;
22 const 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;
109 "To be removed after Cantera 2.5. "
110 "Class renamed to Boundary1D.");
137 virtual size_t nSpecies() {
147 virtual void eval(
size_t jg,
double* xg,
double* rg,
148 integer* diagg,
double rdt);
176 virtual void eval(
size_t jg,
double* xg,
double* rg,
177 integer* diagg,
double rdt);
197 virtual void eval(
size_t jg,
double* xg,
double* rg,
198 integer* diagg,
double rdt);
213 m_type = cOutletType;
218 virtual void eval(
size_t jg,
double* xg,
double* rg,
219 integer* diagg,
double rdt);
237 virtual size_t nSpecies() {
247 virtual void eval(
size_t jg,
double* xg,
double* rg,
248 integer* diagg,
double rdt);
274 virtual void eval(
size_t jg,
double* xg,
double* rg,
275 integer* diagg,
double rdt);
280 virtual void showSolution_s(std::ostream& s,
const double* x);
283 writelog(
" Temperature: {:10.4g} K \n\n", m_temp);
298 void enableCoverageEquations(
bool docov) {
302 bool coverageEnabled() {
311 virtual void eval(
size_t jg,
double* xg,
double* rg,
312 integer* diagg,
double rdt);
322 std::copy(x, x+m_nsp, m_fixed_cov.begin());
330 size_t m_surfindex, m_nsp;
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase,...
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 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 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 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 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 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 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 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.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
void writelog(const std::string &fmt, const Args &... args)
Write a formatted message to the screen.
Namespace for the Cantera kernel.