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"
11
12namespace Cantera
13{
14
15//! A source or sink whose state remains constant regardless of any flows or other
16//! interactions with other Reactor objects.
17class Reservoir : public ReactorBase
18{
19public:
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) {
36 }
37
38 void insert(shared_ptr<Solution> sol) {
39 setThermoMgr(*sol->thermo());
40 }
41};
42
43}
44
45#endif
Base class for stirred reactors.
Definition: ReactorBase.h:49
virtual void setThermoMgr(ThermoPhase &thermo)
Specify the mixture contained in the reactor.
Definition: ReactorBase.cpp:27
ThermoPhase & contents()
return a reference to the contents.
Definition: ReactorBase.h:175
A source or sink whose state remains constant regardless of any flows or other interactions with othe...
Definition: Reservoir.h:18
virtual std::string typeStr() const
String indicating the reactor model implemented.
Definition: Reservoir.h:22
virtual void initialize(doublereal t0=0.0)
Initialize the reactor.
Definition: Reservoir.h:32
virtual std::string type() const
String indicating the reactor model implemented.
Definition: Reservoir.h:28
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:102
Namespace for the Cantera kernel.
Definition: AnyMap.h:29
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