16 throw CanteraError(
"FlowDevice::install",
"Already installed");
31 for (ki = 0; ki < m_nspin; ki++) {
34 m_in2out.push_back(ko);
36 for (ko = 0; ko < m_nspout; ko++) {
39 m_out2in.push_back(ki);
54 size_t ki = m_out2in[k];
size_t speciesIndex(const std::string &name) const
Returns the index of a species named 'name' within the Phase object.
const size_t npos
index returned by functions to indicate "no position"
doublereal enthalpy_mass()
specific enthalpy
size_t nSpecies() const
Returns the number of species in the phase.
const ReactorBase & out() const
Return a const reference to the downstream reactor.
void addOutlet(FlowDevice &outlet)
Connect an outlet FlowDevice to this reactor.
void addInlet(FlowDevice &inlet)
Connect an inlet FlowDevice to this reactor.
Base class for a phase with thermodynamic properties.
std::string speciesName(size_t k) const
Name of the species with index k.
Base class for 'functor' classes that evaluate a function of one variable.
Base class for exceptions thrown by Cantera classes.
Base class for stirred reactors.
doublereal outletSpeciesMassFlowRate(size_t k)
Mass flow rate (kg/s) of outlet species k.
bool install(ReactorBase &in, ReactorBase &out)
Install a flow device between two reactors.
doublereal massFraction(size_t k) const
Return the mass fraction of the k-th species.
thermo_t & contents()
return a reference to the contents.
void setFunction(Func1 *f)
Set a function of a single variable that is used in determining the mass flow rate through the device...
ReactorBase & in() const
Return a reference to the upstream reactor.
Namespace for the Cantera kernel.
doublereal enthalpy_mass() const
Returns the current enthalpy (J/kg) of the reactor's contents.