Cantera  3.1.0a1
Reservoir.h
Go to the documentation of this file.
1 //! @file Reservoir.h
2 
3 // This file is part of Cantera. See License.txt in the top-level directory or
4 // at https://cantera.org/license.txt for license and copyright information.
5 
6 #ifndef CT_RESERVOIR_H
7 #define CT_RESERVOIR_H
8 
9 #include "ReactorBase.h"
10 #include "cantera/base/Solution.h"
11 
12 namespace Cantera
13 {
14 
15 //! A source or sink whose state remains constant regardless of any flows or other
16 //! interactions with other Reactor objects.
17 //! @ingroup reactorGroup
18 class Reservoir : public ReactorBase
19 {
20 public:
21  Reservoir() {}
22 
23  string type() const override {
24  return "Reservoir";
25  }
26 
27  void initialize(double t0=0.0) override {}
28 
29  void insert(ThermoPhase& contents) {
31  }
32 
33  void insert(shared_ptr<Solution> sol) {
34  setThermoMgr(*sol->thermo());
35  }
36 };
37 
38 }
39 
40 #endif
Base class for stirred reactors.
Definition: ReactorBase.h:50
virtual void setThermoMgr(ThermoPhase &thermo)
Specify the mixture contained in the reactor.
Definition: ReactorBase.cpp:20
ThermoPhase & contents()
return a reference to the contents.
Definition: ReactorBase.h:172
A source or sink whose state remains constant regardless of any flows or other interactions with othe...
Definition: Reservoir.h:19
string type() const override
String indicating the reactor model implemented.
Definition: Reservoir.h:23
void initialize(double t0=0.0) override
Initialize the reactor.
Definition: Reservoir.h:27
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:390
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:564