Cantera 2.6.0

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 class Reservoir : public ReactorBase
18{
19 public:
20 Reservoir() {}
21
22 virtual std::string typeStr() const {
23 warn_deprecated("Reservoir::typeStr",
24 "To be removed after Cantera 2.6. Use type() instead.");
25 return "Reservoir";
26 }
27
28 virtual std::string type() const {
29 return "Reservoir";
30 }
31
32 virtual void initialize(doublereal t0 = 0.0) {}
33
34 void insert(ThermoPhase& contents) {
35 setThermoMgr(contents);
36 }
37
38 void insert(shared_ptr<Solution> sol) {
39 setThermoMgr(*sol->thermo());
40 }
41};
42
43}
44
45#endif
ReactorBase.h
Solution.h
Cantera::ReactorBase
Base class for stirred reactors.
Definition: ReactorBase.h:49
Cantera::ReactorBase::setThermoMgr
virtual void setThermoMgr(ThermoPhase &thermo)
Specify the mixture contained in the reactor.
Definition: ReactorBase.cpp:27
Cantera::ReactorBase::contents
ThermoPhase & contents()
return a reference to the contents.
Definition: ReactorBase.h:175
Cantera::Reservoir
A source or sink whose state remains constant regardless of any flows or other interactions with othe...
Definition: Reservoir.h:18
Cantera::Reservoir::typeStr
virtual std::string typeStr() const
String indicating the reactor model implemented.
Definition: Reservoir.h:22
Cantera::Reservoir::initialize
virtual void initialize(doublereal t0=0.0)
Initialize the reactor.
Definition: Reservoir.h:32
Cantera::Reservoir::type
virtual std::string type() const
String indicating the reactor model implemented.
Definition: Reservoir.h:28
Cantera::ThermoPhase
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:102
Cantera
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:557
Cantera::warn_deprecated
void warn_deprecated(const std::string &source, const AnyBase &node, const std::string &message)
A deprecation warning for syntax in an input file.
Definition: AnyMap.cpp:1901