thirdBodyArrheniusReactionRateI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2021 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  const dictionary& dict
45 )
46 :
48  (
49  species,
50  dict
51  ),
52  thirdBodyEfficiencies_(species, dict)
53 {}
54 
55 
56 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
57 
59 {
61 }
62 
63 
65 {
67 }
68 
69 
70 inline Foam::scalar Foam::thirdBodyArrheniusReactionRate::operator()
71 (
72  const scalar p,
73  const scalar T,
74  const scalarField& c,
75  const label li
76 ) const
77 {
78  return
79  thirdBodyEfficiencies_.M(c)
81 }
82 
83 
85 (
86  const scalar p,
87  const scalar T,
88  const scalarField& c,
89  const label li
90 ) const
91 {
92  return
93  thirdBodyEfficiencies_.M(c)
94  *ArrheniusReactionRate::ddT(p, T, c, li);
95 }
96 
97 
99 {
100  return true;
101 }
102 
103 
105 (
106  const scalar p,
107  const scalar T,
108  const scalarField& c,
109  const label li,
110  scalarField& ddc
111 ) const
112 {
113  const scalar k = ArrheniusReactionRate::operator()(p, T, c, li);
114 
115  ddc = thirdBodyEfficiencies_.dMdc(c);
116  ddc *= k;
117 }
118 
119 
121 {
123  thirdBodyEfficiencies_.write(os);
124 }
125 
126 
127 inline Foam::Ostream& Foam::operator<<
128 (
129  Ostream& os,
131 )
132 {
133  arr.write(os);
134  return os;
135 }
136 
137 
138 // ************************************************************************* //
void postEvaluate() const
Post-evaluation hook.
dictionary dict
virtual Ostream & write(const char)=0
Write character.
scalar M(const scalarField &c) const
Calculate and return M, the concentration of the third-bodies.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
The derivative of the rate w.r.t. temperature.
void preEvaluate() const
Pre-evaluation hook.
void preEvaluate() const
Pre-evaluation hook.
label k
Boltzmann constant.
tmp< scalarField > dMdc(const scalarField &c) const
Calculate and return the derivative of M, w.r.t. the species.
const dimensionedScalar c
Speed of light in a vacuum.
void postEvaluate() const
Post-evaluation hook.
void write(Ostream &os) const
Write to stream.
scalar operator()(const scalar p, const scalar T, const scalarField &c, const label li) const
Return the rate.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Arrhenius reaction rate enhanced by third-body interaction.
A wordList with hashed indices for faster lookup by name.
bool hasDdc() const
Is the rate a function of concentration?
Arrhenius reaction rate given by:
thirdBodyArrheniusReactionRate(const scalar A, const scalar beta, const scalar Ta, const thirdBodyEfficiencies &tbes)
Construct from components.
void write(Ostream &os) const
Write to stream.
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
The derivative of the rate w.r.t. temperature.
volScalarField & p
void write(Ostream &os) const
Write to stream.
Third body efficiencies.
void ddc(const scalar p, const scalar T, const scalarField &c, const label li, scalarField &ddc) const
The derivative of the rate w.r.t. concentration.