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_
IrreversibleReaction
IrreversibleReaction.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/IrreversibleReaction.H
>
29
30
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31
32
namespace
Foam
33
{
34
35
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
36
37
// Construct from components
38
template
<
class
ReactionThermo,
class
ReactionRate>
39
IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
40
(
41
const
Reaction<ReactionThermo>
& reaction,
42
const
ReactionRate&
k
43
)
44
:
45
Reaction<ReactionThermo>
(reaction),
46
k_(k)
47
{}
48
49
50
// Construct from components
51
template
<
class
ReactionThermo,
class
ReactionRate>
52
IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
53
(
54
const
speciesTable
& species,
55
const
HashPtrTable<ReactionThermo>
& thermoDatabase,
56
Istream
& is
57
)
58
:
59
Reaction<ReactionThermo>
(species, thermoDatabase, is),
60
k_(species, is)
61
{}
62
63
64
// Construct as copy given new speciesTable
65
template
<
class
ReactionThermo,
class
ReactionRate>
66
IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
67
(
68
const
IrreversibleReaction<ReactionThermo, ReactionRate>
& irr,
69
const
speciesTable
& species
70
)
71
:
72
Reaction<ReactionThermo>
(irr, species),
73
k_(irr.k_)
74
{}
75
76
77
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78
79
template
<
class
ReactionThermo,
class
ReactionRate>
80
scalar
IrreversibleReaction<ReactionThermo, ReactionRate>::kf
81
(
82
const
scalar
T
,
83
const
scalar
p
,
84
const
scalarField
& c
85
)
const
86
{
87
return
k_(T, p, c);
88
}
89
90
91
template
<
class
ReactionThermo,
class
ReactionRate>
92
void
IrreversibleReaction<ReactionThermo, ReactionRate>::write
93
(
94
Ostream
& os
95
)
const
96
{
97
Reaction<ReactionThermo>::write
(os);
98
os <<
token::SPACE
<< k_;
99
}
100
101
102
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103
104
}
// End namespace Foam
105
106
// ************************ vim: set sw=4 sts=4 et: ************************ //