Go to the documentation of this file.
13 FlowDevice::FlowDevice() : m_mdot(
Undef), m_pfunc(0), m_tfunc(0),
14 m_coeff(1.0), m_type(0),
15 m_nspin(0), m_nspout(0),
21 throw CanteraError(
"FlowDevice::install",
"Already installed");
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);
64 size_t ki = m_out2in[k];
double outletSpeciesMassFlowRate(size_t k)
Mass flow rate (kg/s) of outlet species k.
void addOutlet(FlowDevice &outlet)
Connect an outlet FlowDevice to this reactor.
Base class for stirred reactors.
Func1 * m_tfunc
Function set by setTimeFunction; used by updateMassFlowRate.
bool install(ReactorBase &in, ReactorBase &out)
Install a flow device between two reactors.
doublereal enthalpy_mass() const
Returns the current enthalpy (J/kg) of the reactor's contents.
doublereal massFraction(size_t k) const
Return the mass fraction of the k-th species.
virtual void setTimeFunction(Func1 *g)
Set a function of time that is used in determining the mass flow rate through the device.
ReactorBase & in() const
Return a reference to the upstream reactor.
thermo_t & contents()
return a reference to the contents.
const double Undef
Fairly random number to be used to initialize variables against to see if they are subsequently defin...
size_t speciesIndex(const std::string &name) const
Returns the index of a species named 'name' within the Phase object.
Base class for a phase with thermodynamic properties.
size_t nSpecies() const
Returns the number of species in the phase.
Base class for 'functor' classes that evaluate a function of one variable.
Base class for exceptions thrown by Cantera classes.
Func1 * m_pfunc
Function set by setPressureFunction; used by updateMassFlowRate.
virtual void setPressureFunction(Func1 *f)
Set a function of pressure that is used in determining the mass flow rate through the device.
const size_t npos
index returned by functions to indicate "no position"
Namespace for the Cantera kernel.
const ReactorBase & out() const
Return a const reference to the downstream reactor.
std::string speciesName(size_t k) const
Name of the species with index k.
double enthalpy_mass()
specific enthalpy
void addInlet(FlowDevice &inlet)
Connect an inlet FlowDevice to this reactor.