surfaceArrheniusReactionRate.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) 2019-2023 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 Class
25  Foam::surfaceArrheniusReactionRate
26 
27 Description
28  A modified Arrhenius reaction rate given by:
29 
30  k = (A * T^beta * exp(-Ta/T))*a
31 
32  Where a is the surface area per unit volume, the name of which is
33  specified by the user.
34 
35 SourceFiles
36  surfaceArrheniusReactionRateI.H
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef surfaceArrheniusReactionRate_H
41 #define surfaceArrheniusReactionRate_H
42 
43 #include "ArrheniusReactionRate.H"
44 #include "speciesTable.H"
45 #include "volFields.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // Forward declaration of friend functions and operators
53 
54 class surfaceArrheniusReactionRate;
55 
56 Ostream& operator<<(Ostream&, const surfaceArrheniusReactionRate&);
57 
58 /*---------------------------------------------------------------------------*\
59  Class surfaceArrheniusReactionRate Declaration
60 \*---------------------------------------------------------------------------*/
61 
63 :
65 {
66  // Private Data
67 
68  //- Name of the surface area per unit volume field
69  const word AvName_;
70 
71  //- Reference to the object registry
72  const objectRegistry& ob_;
73 
74  //- The surface area per unit volume field
75  mutable tmp<volScalarField::Internal> tAv_;
76 
77 
78 public:
79 
80  // Constructors
81 
82  //- Construct from dictionary
84  (
85  const speciesTable& species,
86  const objectRegistry& ob,
87  const dictionary& dict
88  );
89 
90 
91  // Member Functions
92 
93  //- Return the type name
94  static word type()
95  {
96  return "surfaceArrhenius";
97  }
98 
99  //- Pre-evaluation hook
100  inline void preEvaluate() const;
101 
102  //- Post-evaluation hook
103  inline void postEvaluate() const;
104 
105  //- Evaluate the rate
106  inline scalar operator()
107  (
108  const scalar p,
109  const scalar T,
110  const scalarField& c,
111  const label li
112  ) const;
113 
114  //- Evaluate the derivative
115  inline scalar ddT
116  (
117  const scalar p,
118  const scalar T,
119  const scalarField& c,
120  const label li
121  ) const;
122 
123  //- Write to stream
124  inline void write(Ostream& os) const;
125 
126 
127  // Ostream Operator
128 
129  inline friend Ostream& operator<<
130  (
131  Ostream&,
133  );
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
Arrhenius reaction rate given by:
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
A wordList with hashed indices for faster lookup by name.
Registry of regIOobjects.
A modified Arrhenius reaction rate given by:
void preEvaluate() const
Pre-evaluation hook.
void postEvaluate() const
Post-evaluation hook.
static word type()
Return the type name.
void write(Ostream &os) const
Write to stream.
surfaceArrheniusReactionRate(const speciesTable &species, const objectRegistry &ob, const dictionary &dict)
Construct from dictionary.
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
Evaluate the derivative.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
const dimensionedScalar c
Speed of light in a vacuum.
Namespace for OpenFOAM.
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
Ostream & operator<<(Ostream &, const ensightPart &)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict
volScalarField & p