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_
NonEquilibriumReversibleReaction
NonEquilibriumReversibleReaction.C
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
Description
25
26
\*---------------------------------------------------------------------------*/
27
28
#include <
specie/NonEquilibriumReversibleReaction.H
>
29
30
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31
32
namespace
Foam
33
{
34
35
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
36
37
// Construct from components
38
template
<
class
ReactionThermo,
class
ReactionRate>
39
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
40
NonEquilibriumReversibleReaction
41
(
42
const
Reaction<ReactionThermo>
& reaction,
43
const
ReactionRate& forwardReactionRate,
44
const
ReactionRate& reverseReactionRate
45
)
46
:
47
Reaction<ReactionThermo>
(reaction),
48
fk_(forwardReactionRate),
49
rk_(reverseReactionRate)
50
{}
51
52
53
// Construct from components
54
template
<
class
ReactionThermo,
class
ReactionRate>
55
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
56
NonEquilibriumReversibleReaction
57
(
58
const
speciesTable
& species,
59
const
HashPtrTable<ReactionThermo>
& thermoDatabase,
60
Istream
& is
61
)
62
:
63
Reaction<ReactionThermo>
(species, thermoDatabase, is),
64
fk_(species, is),
65
rk_(species, is)
66
{}
67
68
// Construct as copy given new speciesTable
69
template
<
class
ReactionThermo,
class
ReactionRate>
70
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
71
NonEquilibriumReversibleReaction
72
(
73
const
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>
& nerr,
74
const
speciesTable
& species
75
)
76
:
77
Reaction<ReactionThermo>
(nerr, species),
78
fk_(nerr.fk_),
79
rk_(nerr.rk_)
80
{}
81
82
83
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
84
85
template
<
class
ReactionThermo,
class
ReactionRate>
86
scalar
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kf
87
(
88
const
scalar
T
,
89
const
scalar
p
,
90
const
scalarField
& c
91
)
const
92
{
93
return
fk_(T, p, c);
94
}
95
96
97
template
<
class
ReactionThermo,
class
ReactionRate>
98
scalar
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
99
(
100
const
scalar,
101
const
scalar T,
102
const
scalar p,
103
const
scalarField
& c
104
)
const
105
{
106
return
rk_(T, p, c);
107
}
108
109
110
template
<
class
ReactionThermo,
class
ReactionRate>
111
scalar
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
112
(
113
const
scalar T,
114
const
scalar p,
115
const
scalarField
& c
116
)
const
117
{
118
return
rk_(T, p, c);
119
}
120
121
122
template
<
class
ReactionThermo,
class
ReactionRate>
123
void
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::write
124
(
125
Ostream
& os
126
)
const
127
{
128
Reaction<ReactionThermo>::write
(os);
129
os <<
token::SPACE
<< fk_ <<
token::SPACE
<< rk_;
130
}
131
132
133
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135
}
// End namespace Foam
136
137
// ************************ vim: set sw=4 sts=4 et: ************************ //