24 const int LeftInlet = 1;
25 const int RightInlet = -1;
63 err(
"setMoleFractions");
68 err(
"setMoleFractions");
83 virtual doublereal
mdot() {
88 writelog(
"Bdry1D::_getInitialSoln called!\n");
91 virtual void setupGrid(
size_t n,
const doublereal* z) {}
97 StFlow* m_flow_left, *m_flow_right;
98 size_t m_ilr, m_left_nv, m_right_nv;
99 size_t m_left_loc, m_right_loc;
100 size_t m_left_points;
101 size_t m_nv, m_left_nsp, m_right_nsp;
102 size_t m_sp_left, m_sp_right;
103 size_t m_start_left, m_start_right;
104 ThermoPhase* m_phase_left, *m_phase_right;
105 doublereal m_temp, m_mdot;
108 void err(std::string method) {
109 throw CanteraError(
"Bdry1D::"+method,
110 "attempt to call base class method "+method);
148 sprintf(buf,
" Mass Flux: %10.4g kg/m^2/s \n", m_mdot);
150 sprintf(buf,
" Temperature: %10.4g K \n", m_temp);
154 for (
size_t k = 0; k < m_flow->phase().
nSpecies(); k++) {
155 if (m_yin[k] != 0.0) {
156 sprintf(buf,
" %16s %10.4g \n",
179 virtual void eval(
size_t jg, doublereal* xg, doublereal* rg,
180 integer* diagg, doublereal rdt);
181 virtual void save(
XML_Node& o,
const doublereal*
const soln);
182 virtual void restore(
const XML_Node& dom, doublereal* soln);
213 virtual void eval(
size_t jg, doublereal* xg, doublereal* rg,
214 integer* diagg, doublereal rdt);
216 virtual void save(
XML_Node& o,
const doublereal*
const soln);
217 virtual void restore(
const XML_Node& dom, doublereal* soln);
245 virtual void eval(
size_t jg, doublereal* xg, doublereal* rg,
246 integer* diagg, doublereal rdt);
248 virtual void save(
XML_Node& o,
const doublereal*
const soln);
249 virtual void restore(
const XML_Node& dom, doublereal* soln);
264 class Outlet1D :
public Bdry1D
269 Outlet1D() : Bdry1D() {
270 m_type = cOutletType;
272 virtual ~Outlet1D() {}
274 virtual std::string componentName(
size_t n)
const;
278 virtual void eval(
size_t jg, doublereal* xg, doublereal* rg,
279 integer* diagg, doublereal rdt);
281 virtual void save(XML_Node& o,
const doublereal*
const soln);
282 virtual void restore(
const XML_Node& dom, doublereal* soln);
283 virtual void _finalize(
const doublereal* x) {
286 virtual void _getInitialSoln(doublereal* x) {
307 m_type = cOutletResType;
329 virtual void eval(
size_t jg, doublereal* xg, doublereal* rg,
330 integer* diagg, doublereal rdt);
331 virtual void save(
XML_Node& o,
const doublereal*
const soln);
332 virtual void restore(
const XML_Node& dom, doublereal* soln);
363 virtual void eval(
size_t jg, doublereal* xg, doublereal* rg,
364 integer* diagg, doublereal rdt);
366 virtual void save(
XML_Node& o,
const doublereal*
const soln);
367 virtual void restore(
const XML_Node& dom, doublereal* soln);
377 virtual void showSolution_s(std::ostream& s,
const doublereal* x) {
378 s <<
"------------------- Surface " <<
domainIndex() <<
" ------------------- " << std::endl;
379 s <<
" temperature: " << m_temp <<
" K" <<
" " << x[0] << std::endl;
384 sprintf(buf,
" Temperature: %10.4g K \n", m_temp);
404 m_kin(0), m_surfindex(0), m_nsp(0) {
416 void enableCoverageEquations(
bool docov) {
426 virtual void eval(
size_t jg, doublereal* xg, doublereal* rg,
427 integer* diagg, doublereal rdt);
429 virtual void save(
XML_Node& o,
const doublereal*
const soln);
430 virtual void restore(
const XML_Node& dom, doublereal* soln);
439 std::copy(x+1,x+1+m_nsp,m_fixed_cov.begin());
444 sprintf(buf,
" Temperature: %10.4g K \n", x[0]);
447 for (
size_t k = 0; k < m_nsp; k++) {
448 sprintf(buf,
" %20s %10.4g \n", m_sphase->
speciesName(k).c_str(),
459 size_t m_surfindex, m_nsp;