Cantera  2.0
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
FlowDevice Class Reference

Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors. More...

#include <FlowDevice.h>

Inheritance diagram for FlowDevice:
[legend]
Collaboration diagram for FlowDevice:
[legend]

Public Member Functions

 FlowDevice ()
 Constructor.
 
virtual ~FlowDevice ()
 Destructor (does nothing)
 
int type ()
 
doublereal massFlowRate (double time=-999.0)
 Mass flow rate (kg/s).
 
virtual void updateMassFlowRate (doublereal time)
 
doublereal outletSpeciesMassFlowRate (size_t k)
 Mass flow rate of outlet species k.
 
doublereal enthalpy_mass ()
 
bool install (ReactorBase &in, ReactorBase &out)
 Setpoint.
 
virtual bool ready ()
 
ReactorBasein () const
 Return a reference to the upstream reactor.
 
const ReactorBaseout () const
 Return a const reference to the downstream reactor.
 
virtual void setParameters (int n, doublereal *coeffs)
 set parameters
 
void setFunction (Cantera::Func1 *f)
 
void setMassFlowRate (doublereal mdot)
 

Protected Attributes

doublereal m_mdot
 
Cantera::Func1m_func
 
vector_fp m_coeffs
 
int m_type
 

Private Member Functions

void warn (std::string meth)
 

Private Attributes

size_t m_nspin
 
size_t m_nspout
 
ReactorBasem_in
 
ReactorBasem_out
 
std::vector< size_t > m_in2out
 
std::vector< size_t > m_out2in
 

Detailed Description

Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors.

Allowance is made for devices that are closed-loop controllers. Several methods for these are defined here that do nothing but may be overloaded to set or get the setpoint, gains, etc. The behavior of overloaded methods should be consistent with the behavior described here. The base-class versions of these methods print a warning if called.

Definition at line 34 of file FlowDevice.h.

Constructor & Destructor Documentation

FlowDevice ( )
inline

Constructor.

Definition at line 40 of file FlowDevice.h.

virtual ~FlowDevice ( )
inlinevirtual

Destructor (does nothing)

Definition at line 45 of file FlowDevice.h.

Member Function Documentation

doublereal massFlowRate ( double  time = -999.0)
inline

Mass flow rate (kg/s).

Definition at line 65 of file FlowDevice.h.

doublereal outletSpeciesMassFlowRate ( size_t  k)

Mass flow rate of outlet species k.

Returns zero if this species is not present in the upstream mixture.

Definition at line 56 of file FlowDevice.cpp.

References Cantera::npos.

bool install ( ReactorBase in,
ReactorBase out 
)

Setpoint.

Default = 0.0. Set the setpoint. May be changed at any time. By default, this does nothing. Set the controller gains. Returns false if the number of gains is too small, or if an illegal value is specified. Get the controller gains. Returns false if the 'gains' array is too small. Maximum difference between input and setpoint since last call to 'reset'. Install a flow device between two reactors.

Parameters
inUpstream reactor.
outDownstream reactor.

Definition at line 12 of file FlowDevice.cpp.

References Phase::nSpecies(), Phase::speciesIndex(), and Phase::speciesName().

ReactorBase& in ( ) const
inline

Return a reference to the upstream reactor.

Definition at line 143 of file FlowDevice.h.

Referenced by Valve::updateMassFlowRate().

const ReactorBase& out ( ) const
inline

Return a const reference to the downstream reactor.

Definition at line 148 of file FlowDevice.h.

Referenced by Valve::updateMassFlowRate().

virtual void setParameters ( int  n,
doublereal *  coeffs 
)
inlinevirtual

set parameters

Definition at line 153 of file FlowDevice.h.


The documentation for this class was generated from the following files: