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
LangmuirHinshelwood
LangmuirHinshelwoodReactionRateI.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
inline
LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
35
(
36
const
scalar
A
[],
37
const
scalar Ta[],
38
const
label co,
39
const
label c3h6,
40
const
label no
41
)
42
:
43
co_(co),
44
c3h6_(c3h6),
45
no_(no)
46
{
47
for
(
int
i=0; i<n_; i++)
48
{
49
A_[i] = A[i];
50
Ta_[i] = Ta[i];
51
}
52
}
53
54
55
//- Construct from Istream
56
inline
LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
57
(
58
const
speciesTable
& st,
59
Istream
& is
60
)
61
:
62
co_(st[
"CO"
]),
63
c3h6_(st[
"C3H6"
]),
64
no_(st[
"NO"
])
65
{
66
is.
readBegin
(
"LangmuirHinshelwoodReactionRate(Istream&)"
);
67
68
for
(
int
i=0; i<n_; i++)
69
{
70
is >> A_[i] >> Ta_[i];
71
}
72
73
is.
readEnd
(
"LangmuirHinshelwoodReactionRate(Istream&)"
);
74
}
75
76
77
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78
79
inline
scalar LangmuirHinshelwoodReactionRate::operator()
80
(
81
const
scalar
T
,
82
const
scalar,
83
const
scalarField
& c
84
)
const
85
{
86
return
A_[0]*
exp
(-Ta_[0]/
T
)/
87
(
88
T
89
*
sqr
(1 + A_[1]*
exp
(-Ta_[1]/
T
)*c[co_] + A_[2]*
exp
(-Ta_[2]/
T
)*c[c3h6_])
90
*(1 + A_[3]*
exp
(-Ta_[3]/
T
)*
sqr
(c[co_])*
sqr
(c[c3h6_]))
91
*(1 + A_[4]*
exp
(-Ta_[4]/
T
)*
pow
(c[no_], 0.7))
92
);
93
}
94
95
96
inline
Ostream
&
operator
<<
97
(
98
Ostream
& os,
99
const
LangmuirHinshelwoodReactionRate
& lhrr
100
)
101
{
102
os <<
token::BEGIN_LIST
;
103
104
for
(
int
i=0; i<LangmuirHinshelwoodReactionRate::n_; i++)
105
{
106
os <<
token::SPACE
<< lhrr.A_[i] <<
token::SPACE
<< lhrr.Ta_[i];
107
}
108
109
os <<
token::END_LIST
;
110
111
return
os;
112
}
113
114
115
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116
117
}
// End namespace Foam
118
119
// ************************ vim: set sw=4 sts=4 et: ************************ //