15 ReactorBase::ReactorBase(
const string& name) : m_nsp(0),
44 m_inlet.push_back(&inlet);
51 m_outlet.push_back(&outlet);
78 "Reactor is not part of a ReactorNet");
89 int nout =
static_cast<int>(m_outlet.size());
90 doublereal mout = 0.0;
91 for (
int i = 0; i < nout; i++) {
92 mout += m_outlet[i]->massFlowRate();
A class representing a network of connected reactors.
Header file for class Wall.
Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors.
ReactorNet * m_net
The ReactorNet that this reactor is part of.
ReactorNet & network()
The ReactorNet that this reactor belongs to.
void addOutlet(FlowDevice &outlet)
Connect an outlet FlowDevice to this reactor.
void addInlet(FlowDevice &inlet)
Connect an inlet FlowDevice to this reactor.
doublereal intEnergy_mass() const
Specific internal energy.
Base class for a phase with thermodynamic properties.
Wall & wall(size_t n)
Return a reference to the n-th Wall connected to this reactor.
Represents a wall between between two ReactorBase objects.
Base class for exceptions thrown by Cantera classes.
void addWall(Wall &w, int lr)
Insert a Wall between this reactor and another reactor.
virtual void setThermoMgr(thermo_t &thermo)
Specify the mixture contained in the reactor.
std::string name() const
Return the name of this reactor.
FlowDevice & inlet(size_t n=0)
Return a reference to the n-th inlet FlowDevice connected to this reactor.
void setNetwork(ReactorNet *net)
Set the ReactorNet that this reactor belongs to.
size_t nSpecies() const
Returns the number of species in the phase.
doublereal residenceTime()
Return the residence time (s) of the contents of this reactor, based on the outlet mass flow rates an...
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
doublereal mass() const
Returns the mass (kg) of the reactor's contents.
doublereal enthalpy_mass() const
Specific enthalpy.
size_t m_nsp
Number of homogeneous species in the mixture.
void saveState(vector_fp &state) const
Save the current internal state of the phase Write to vector 'state' the current internal state...
FlowDevice & outlet(size_t n=0)
Return a reference to the n-th outlet FlowDevice connected to this reactor.