thirdBodyArrheniusReactionRateI.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) 2011-2012 OpenFOAM Foundation
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 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
27 
29 (
30  const scalar A,
31  const scalar beta,
32  const scalar Ta,
33  const thirdBodyEfficiencies& tbes
34 )
35 :
36  ArrheniusReactionRate(A, beta, Ta),
37  thirdBodyEfficiencies_(tbes)
38 {}
39 
40 
42 (
43  const speciesTable& species,
44  Istream& is
45 )
46 :
48  (
49  species,
50  is.readBegin("thirdBodyArrheniusReactionRate(Istream&)")
51  ),
52  thirdBodyEfficiencies_(species, is)
53 {
54  is.readEnd("thirdBodyArrheniusReactionRate(Istream&)");
55 }
56 
57 
59 (
60  const speciesTable& species,
61  const dictionary& dict
62 )
63 :
65  (
66  species,
67  dict
68  ),
69  thirdBodyEfficiencies_(species, dict)
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74 
75 inline Foam::scalar Foam::thirdBodyArrheniusReactionRate::operator()
76 (
77  const scalar p,
78  const scalar T,
79  const scalarField& c
80 ) const
81 {
82  return
83  thirdBodyEfficiencies_.M(c)
84  *ArrheniusReactionRate::operator()(p, T, c);
85 }
86 
87 
89 {
91  thirdBodyEfficiencies_.write(os);
92 }
93 
94 
95 inline Foam::Ostream& Foam::operator<<
96 (
97  Ostream& os,
99 )
100 {
101  os << token::BEGIN_LIST
102  << static_cast<const ArrheniusReactionRate&>(arr)
103  << token::SPACE << arr.thirdBodyEfficiencies_
104  << token::END_LIST;
105  return os;
106 }
107 
108 
109 // ************************************************************************* //
Istream & readBegin(const char *funcName)
Definition: Istream.C:86
void write(Ostream &os) const
Write to stream.
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Istream & readEnd(const char *funcName)
Definition: Istream.C:103
void write(Ostream &os) const
Write to stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
const volScalarField & T
Arrhenius reaction rate enhanced by third-body interation.
A wordList with hashed indices for faster lookup by name.
const dimensionedScalar c
Speed of light in a vacuum.
Arrhenius reaction rate given by:
thirdBodyArrheniusReactionRate(const scalar A, const scalar beta, const scalar Ta, const thirdBodyEfficiencies &tbes)
Construct from components.
volScalarField & p
Third body efficiencies.
void write(Ostream &os) const
Write to stream.