6 #ifndef CT_REACTORBASE_H
7 #define CT_REACTORBASE_H
17 const int ReservoirType = 1;
18 const int ReactorType = 2;
19 const int FlowReactorType = 3;
20 const int ConstPressureReactorType = 4;
38 virtual int type()
const {
41 std::string name()
const {
44 void setName(std::string name) {
84 return m_inlet.size();
87 return m_outlet.size();
93 void addWall(Wall& w,
int lr);
114 virtual double step(doublereal
time) {
118 virtual void start() {}
133 doublereal residenceTime();
156 doublereal density()
const {
159 doublereal temperature()
const {
162 doublereal enthalpy_mass()
const {
165 doublereal intEnergy_mass()
const {
168 doublereal pressure()
const {
171 doublereal mass()
const {
172 return m_vol * density();
174 const doublereal* massFractions()
const {
177 doublereal massFraction(
size_t k)
const {
183 int error(std::string msg)
const {
195 doublereal m_vol, m_vol0;
197 size_t m_nInlets, m_nOutlets;
199 doublereal m_enthalpy;
200 doublereal m_intEnergy;
201 doublereal m_pressure;
203 std::vector<FlowDevice*> m_inlet, m_outlet;
204 std::vector<Wall*> m_wall;
212 void tilt(std::string method=
"")
const {
214 "ReactorBase method called!");