Cantera
Install
User Guide
Examples
Reference
Develop
Community
4.0.0a2
Toggle main menu visibility
Loading...
Searching...
No Matches
Interface.h
Go to the documentation of this file.
1
//! @file Interface.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_INTERFACE_H
7
#define CT_INTERFACE_H
8
9
#include "
cantera/base/Solution.h
"
10
#include "
cantera/thermo/SurfPhase.h
"
11
#include "
cantera/kinetics/InterfaceKinetics.h
"
12
13
namespace
Cantera
14
{
15
16
//! A container class for chemically-reacting interfaces.
17
/*!
18
* Instances of class Interface represent reacting 2D surfaces between bulk 3D phases,
19
* or 1D edges where multiple surfaces (and bulk phases) meet.
20
* @ingroup solnGroup
21
*/
22
class
Interface :
public
Solution
23
{
24
private
:
25
Interface() =
default
;
26
27
public
:
28
~Interface() {}
29
Interface(
const
Interface&) =
delete
;
30
Interface& operator=(
const
Interface&) =
delete
;
31
32
//! Create an empty Interface object
33
static
shared_ptr<Interface>
create
() {
34
return
shared_ptr<Interface>(
new
Interface());
35
}
36
37
//! Set the reacting phase thermo object
38
void
setThermo
(shared_ptr<ThermoPhase>
thermo
)
override
;
39
40
//! Set the Kinetics object
41
void
setKinetics
(shared_ptr<Kinetics>
kinetics
)
override
;
42
43
//! Get the surface phase thermo object
44
shared_ptr<SurfPhase>
thermo
() {
45
return
m_surf
;
46
}
47
48
//! Get the surface phase Kinetics object
49
shared_ptr<InterfaceKinetics>
kinetics
() {
50
return
m_surfkin
;
51
}
52
53
protected
:
54
shared_ptr<SurfPhase>
m_surf
;
//!< Surface phase ThermoPhase manager
55
shared_ptr<InterfaceKinetics>
m_surfkin
;
//!< Kinetics manager
56
};
57
58
//! Create and initialize a new Interface from an input file
59
/*!
60
* This constructor wraps newThermo() and newKinetics()
61
*
62
* @param infile name of the input file
63
* @param name name of the surface phase in the file.
64
* If this is blank, the first phase in the file is used.
65
* @param adjacent vector containing names of adjacent phases that participate in this
66
* phases kinetics. If empty, adjacent phases will be instantiated based
67
* on the phase definition.
68
* @returns an initialized Interface object.
69
* @ingroup solnGroup
70
*/
71
shared_ptr<Interface>
newInterface
(
const
string
& infile,
72
const
string
& name=
""
,
const
vector<string>& adjacent={});
73
74
75
//! Create and initialize a new Interface from an input file
76
/*!
77
* This constructor wraps newThermo() and newKinetics()
78
*
79
* @param infile name of the input file
80
* @param name name of the phase in the file. If this is the empty string, the first
81
* phase in the file is used.
82
* @param adjacent vector containing adjacent Solution objects. If empty, adjacent
83
* phases will be instantiated based on the phase definition.
84
* @returns an initialized Interface object.
85
* @ingroup solnGroup
86
*/
87
shared_ptr<Interface>
newInterface
(
const
string
& infile,
88
const
string
& name,
const
vector<shared_ptr<Solution>>& adjacent);
89
90
//! Create and initialize a new Interface from AnyMap objects
91
/*!
92
* This constructor wraps newThermo() and newKinetics()
93
*
94
* @param phaseNode the node containing the phase definition (that is, thermo model,
95
* list of species, and initial state)
96
* @param rootNode the root node of the tree containing the phase definition, which
97
* will be used as the default location from which to read species definitions.
98
* @param adjacent vector containing adjacent Solution objects. If empty, adjacent
99
* phases will be instantiated based on the phase definition.
100
* @returns an initialized Interface object.
101
* @ingroup solnGroup
102
*/
103
shared_ptr<Interface>
newInterface
(AnyMap& phaseNode,
const
AnyMap& rootNode=AnyMap(),
104
const
vector<shared_ptr<Solution>>& adjacent={});
105
}
106
107
#endif
InterfaceKinetics.h
Solution.h
SurfPhase.h
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase,...
Cantera::Interface::m_surfkin
shared_ptr< InterfaceKinetics > m_surfkin
Kinetics manager.
Definition
Interface.h:55
Cantera::Interface::create
static shared_ptr< Interface > create()
Create an empty Interface object.
Definition
Interface.h:33
Cantera::Interface::setThermo
void setThermo(shared_ptr< ThermoPhase > thermo) override
Set the reacting phase thermo object.
Definition
Interface.cpp:13
Cantera::Interface::kinetics
shared_ptr< InterfaceKinetics > kinetics()
Get the surface phase Kinetics object.
Definition
Interface.h:49
Cantera::Interface::thermo
shared_ptr< SurfPhase > thermo()
Get the surface phase thermo object.
Definition
Interface.h:44
Cantera::Interface::setKinetics
void setKinetics(shared_ptr< Kinetics > kinetics) override
Set the Kinetics object.
Definition
Interface.cpp:24
Cantera::Interface::m_surf
shared_ptr< SurfPhase > m_surf
Surface phase ThermoPhase manager.
Definition
Interface.h:54
Cantera::newInterface
shared_ptr< Interface > newInterface(const string &infile, const string &name, const vector< string > &adjacent)
Create and initialize a new Interface from an input file.
Definition
Interface.cpp:35
Cantera
Namespace for the Cantera kernel.
Definition
AnyMap.cpp:595
include
cantera
base
Interface.h
Generated by
1.17.0