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-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 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 "volFields.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward declaration of friend functions and operators
52 
53 class surfaceArrheniusReactionRate;
54 
55 Ostream& operator<<(Ostream&, const surfaceArrheniusReactionRate&);
56 
57 /*---------------------------------------------------------------------------*\
58  Class surfaceArrheniusReactionRate Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 :
64 {
65  // Private Data
66 
67  //- Name of the surface area per unit volume field
68  const word aName_;
69 
70  //- The surface area per unit volume field
71  const scalarField& aField_;
72 
73 
74 public:
75 
76  // Constructors
77 
78  //- Construct from dictionary
80  (
81  const speciesTable& species,
82  const objectRegistry& ob,
83  const dictionary& dict
84  );
85 
86 
87  // Member Functions
88 
89  //- Return the type name
90  static word type()
91  {
92  return "surfaceArrhenius";
93  }
94 
95  //- Pre-evaluation hook
96  inline void preEvaluate() const;
97 
98  //- Post-evaluation hook
99  inline void postEvaluate() const;
100 
101  //- Evaluate the rate
102  inline scalar operator()
103  (
104  const scalar p,
105  const scalar T,
106  const scalarField& c,
107  const label li
108  ) const;
109 
110  //- Evaluate the derivative
111  inline scalar ddT
112  (
113  const scalar p,
114  const scalar T,
115  const scalarField& c,
116  const label li
117  ) const;
118 
119  //- Write to stream
120  inline void write(Ostream& os) const;
121 
122 
123  // Ostream Operator
124 
125  inline friend Ostream& operator<<
126  (
127  Ostream&,
129  );
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
dictionary dict
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 write(Ostream &os) const
Write to stream.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
void postEvaluate() const
Post-evaluation hook.
void preEvaluate() const
Pre-evaluation hook.
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
Evaluate the derivative.
const dimensionedScalar c
Speed of light in a vacuum.
surfaceArrheniusReactionRate(const speciesTable &species, const objectRegistry &ob, const dictionary &dict)
Construct from dictionary.
A modified Arrhenius reaction rate given by:
A class for handling words, derived from string.
Definition: word.H:59
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)
A wordList with hashed indices for faster lookup by name.
Ostream & operator<<(Ostream &, const ensightPart &)
Arrhenius reaction rate given by:
volScalarField & p
Registry of regIOobjects.
static word type()
Return the type name.
Namespace for OpenFOAM.