Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
thermophysicalModels
specie
reaction
Reactions_
ReversibleReaction
ReversibleReaction.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Class
25
Foam::ReversibleReaction
26
27
Description
28
Simple extension of Reaction to handle reversible reactions using
29
equilibrium thermodynamics.
30
31
SourceFiles
32
ReversibleReaction.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef ReversibleReaction_H
37
#define ReversibleReaction_H
38
39
#include <
specie/Reaction.H
>
40
41
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43
namespace
Foam
44
{
45
46
/*---------------------------------------------------------------------------*\
47
Class ReversibleReaction Declaration
48
\*---------------------------------------------------------------------------*/
49
50
template
<
class
ReactionThermo,
class
ReactionRate>
51
class
ReversibleReaction
52
:
53
public
Reaction
<ReactionThermo>
54
{
55
// Private data
56
57
ReactionRate k_;
58
59
60
// Private Member Functions
61
62
//- Disallow default bitwise assignment
63
void
operator=(
const
ReversibleReaction<ReactionThermo, ReactionRate>
&);
64
65
66
public
:
67
68
//- Runtime type information
69
TypeName
(
"reversible"
);
70
71
72
// Constructors
73
74
//- Construct from components
75
ReversibleReaction
76
(
77
const
Reaction<ReactionThermo>
& reaction,
78
const
ReactionRate&
k
79
);
80
81
//- Construct as copy given new speciesTable
82
ReversibleReaction
83
(
84
const
ReversibleReaction<ReactionThermo, ReactionRate>
&,
85
const
speciesTable
& species
86
);
87
88
//- Construct from Istream
89
ReversibleReaction
90
(
91
const
speciesTable
& species,
92
const
HashPtrTable<ReactionThermo>
& thermoDatabase,
93
Istream
& is
94
);
95
96
//- Construct and return a clone
97
virtual
autoPtr<Reaction<ReactionThermo>
>
clone
()
const
98
{
99
return
autoPtr<Reaction<ReactionThermo>
>
100
(
101
new
ReversibleReaction<ReactionThermo, ReactionRate>
(*this)
102
);
103
}
104
105
//- Construct and return a clone with new speciesTable
106
virtual
autoPtr<Reaction<ReactionThermo>
>
clone
107
(
108
const
speciesTable
& species
109
)
const
110
{
111
return
autoPtr<Reaction<ReactionThermo>
>
112
(
113
new
ReversibleReaction<ReactionThermo, ReactionRate>
114
(
115
*
this
,
116
species
117
)
118
);
119
}
120
121
122
// Destructor
123
124
virtual
~ReversibleReaction
()
125
{}
126
127
128
// Member Functions
129
130
// ReversibleReaction rate coefficients
131
132
//- Forward rate constant
133
virtual
scalar
kf
134
(
135
const
scalar
T
,
136
const
scalar
p
,
137
const
scalarField
& c
138
)
const
;
139
140
//- Reverse rate constant from the given formard rate constant
141
virtual
scalar
kr
142
(
143
const
scalar kfwd,
144
const
scalar
T
,
145
const
scalar
p
,
146
const
scalarField
& c
147
)
const
;
148
149
//- Reverse rate constant.
150
// Note this evaluates the forward rate constant and divides by the
151
// equilibrium constant
152
virtual
scalar
kr
153
(
154
const
scalar
T
,
155
const
scalar
p
,
156
const
scalarField
& c
157
)
const
;
158
159
160
//- Write
161
virtual
void
write
(
Ostream
&)
const
;
162
};
163
164
165
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167
}
// End namespace Foam
168
169
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170
171
#ifdef NoRepository
172
# include <
specie/ReversibleReaction.C
>
173
#endif
174
175
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176
177
#endif
178
179
// ************************ vim: set sw=4 sts=4 et: ************************ //