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
reactionRate
FallOffReactionRate
FallOffReactionRateI.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
\*---------------------------------------------------------------------------*/
25
26
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
27
28
namespace
Foam
29
{
30
31
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32
33
// Construct from components
34
template
<
class
ReactionRate,
class
FallOffFunction>
35
inline
FallOffReactionRate<ReactionRate, FallOffFunction>::FallOffReactionRate
36
(
37
const
ReactionRate& k0,
38
const
ReactionRate& kInf,
39
const
FallOffFunction& F,
40
const
thirdBodyEfficiencies
& tbes
41
)
42
:
43
k0_(k0),
44
kInf_(kInf),
45
F_(F),
46
thirdBodyEfficiencies_(tbes)
47
{}
48
49
50
//- Construct from Istream
51
template
<
class
ReactionRate,
class
FallOffFunction>
52
inline
FallOffReactionRate<ReactionRate, FallOffFunction>::FallOffReactionRate
53
(
54
const
speciesTable
& species,
55
Istream
& is
56
)
57
:
58
k0_(species, is.
readBegin
(
"FallOffReactionRate(Istream&)"
)),
59
kInf_(species, is),
60
F_(is),
61
thirdBodyEfficiencies_(species, is)
62
{
63
is.
readEnd
(
"FallOffReactionRate(Istream&)"
);
64
}
65
66
67
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
68
69
template
<
class
ReactionRate,
class
FallOffFunction>
70
inline
scalar
FallOffReactionRate<ReactionRate, FallOffFunction>::operator
()
71
(
72
const
scalar
T
,
73
const
scalar
p
,
74
const
scalarField
& c
75
)
const
76
{
77
scalar k0 = k0_(
T
,
p
, c);
78
scalar kInf = kInf_(
T
,
p
, c);
79
80
scalar
Pr
= k0*thirdBodyEfficiencies_.M(c)/kInf;
81
82
return
kInf*(Pr/(1 +
Pr
))*F_(
T
, Pr);
83
}
84
85
86
template
<
class
ReactionRate,
class
FallOffFunction>
87
inline
Ostream
&
operator
<<
88
(
89
Ostream
& os,
90
const
FallOffReactionRate<ReactionRate, FallOffFunction>
& forr
91
)
92
{
93
os <<
token::BEGIN_LIST
94
<< forr.k0_ <<
token::SPACE
95
<< forr.kInf_ <<
token::SPACE
96
<< forr.F_ <<
token::SPACE
97
<< forr.thirdBodyEfficiencies_
98
<<
token::END_LIST
;
99
return
os;
100
}
101
102
103
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104
105
}
// End namespace Foam
106
107
// ************************ vim: set sw=4 sts=4 et: ************************ //