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-2024 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 
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
31 (
32  const scalar A,
33  const scalar beta,
34  const scalar Ta,
35  const thirdBodyEfficiencies& tbes
36 )
37 :
38  ArrheniusReactionRate(A, beta, Ta),
39  thirdBodyEfficiencies_(tbes)
40 {}
41 
42 
44 (
45  const speciesTable& species,
46  const dimensionSet& dims,
47  const dictionary& dict
48 )
49 :
50  ArrheniusReactionRate(species, dims, dict),
51  thirdBodyEfficiencies_(species, dict)
52 {}
53 
54 
55 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
56 
58 {
60 }
61 
62 
64 {
66 }
67 
68 
69 inline Foam::scalar Foam::thirdBodyArrheniusReactionRate::operator()
70 (
71  const scalar p,
72  const scalar T,
73  const scalarField& c,
74  const label li
75 ) const
76 {
77  return
78  thirdBodyEfficiencies_.M(c)
80 }
81 
82 
84 (
85  const scalar p,
86  const scalar T,
87  const scalarField& c,
88  const label li
89 ) const
90 {
91  return
92  thirdBodyEfficiencies_.M(c)
94 }
95 
96 
98 {
99  return true;
100 }
101 
102 
104 (
105  const scalar p,
106  const scalar T,
107  const scalarField& c,
108  const label li,
109  scalarField& ddc
110 ) const
111 {
112  const scalar k = ArrheniusReactionRate::operator()(p, T, c, li);
113 
114  ddc = thirdBodyEfficiencies_.dMdc(c);
115  ddc *= k;
116 }
117 
118 
120 {
122  thirdBodyEfficiencies_.write(os);
123 }
124 
125 
126 inline Foam::Ostream& Foam::operator<<
127 (
128  Ostream& os,
130 )
131 {
132  arr.write(os);
133  return os;
134 }
135 
136 
137 // ************************************************************************* //
static const Foam::dimensionedScalar A("A", Foam::dimPressure, 611.21)
label k
Arrhenius reaction rate given by:
scalar operator()(const scalar p, const scalar T, const scalarField &c, const label li) const
Return the rate.
void preEvaluate() const
Pre-evaluation hook.
void postEvaluate() const
Post-evaluation hook.
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.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
virtual Ostream & write(const char)=0
Write character.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Dimension set for the base types.
Definition: dimensionSet.H:125
A wordList with hashed indices for faster lookup by name.
Arrhenius reaction rate enhanced by third-body interaction.
void postEvaluate() const
Post-evaluation hook.
void write(Ostream &os) const
Write to stream.
thirdBodyArrheniusReactionRate(const scalar A, const scalar beta, const scalar Ta, const thirdBodyEfficiencies &tbes)
Construct from components.
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.
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
The derivative of the rate w.r.t. temperature.
bool hasDdc() const
Is the rate a function of concentration?
Third body efficiencies.
const dimensionedScalar c
Speed of light in a vacuum.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict
volScalarField & p