14FlowDevice::FlowDevice() : m_mdot(
Undef), m_pfunc(0), m_tfunc(0),
15 m_coeff(1.0), m_nspin(0), m_nspout(0),
21 throw CanteraError(
"FlowDevice::install",
"Already installed");
26 m_out->addInlet(*
this);
36 for (ki = 0; ki < m_nspin; ki++) {
39 m_in2out.push_back(ko);
41 for (ko = 0; ko < m_nspout; ko++) {
44 m_out2in.push_back(ki);
49void FlowDevice::setPressureFunction(
Func1* f)
54void FlowDevice::setTimeFunction(
Func1* g)
59double FlowDevice::outletSpeciesMassFlowRate(
size_t k)
64 size_t ki = m_out2in[k];
68 return m_mdot * m_in->massFraction(ki);
71double FlowDevice::enthalpy_mass()
73 return m_in->enthalpy_mass();
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
Base class for exceptions thrown by Cantera classes.
Base class for 'functor' classes that evaluate a function of one variable.
size_t nSpecies() const
Returns the number of species in the phase.
std::string speciesName(size_t k) const
Name of the species with index k.
size_t speciesIndex(const std::string &name) const
Returns the index of a species named 'name' within the Phase object.
Base class for stirred reactors.
void addOutlet(FlowDevice &outlet)
Connect an outlet FlowDevice to this reactor.
Base class for a phase with thermodynamic properties.
Namespace for the Cantera kernel.
const size_t npos
index returned by functions to indicate "no position"
const double Undef
Fairly random number to be used to initialize variables against to see if they are subsequently defin...