fluxLimitedLangmuirHinshelwoodReactionRate.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-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 Class
25  Foam::fluxLimitedLangmuirHinshelwoodReactionRate
26 
27 Description
28  Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces
29  including the optional flux limiter of Waletzko and Schmidt.
30 
31  References:
32  \verbatim
33  Hinshelwood, C.N. (1940).
34  The Kinetics of Chemical Change.
35  Oxford Clarendon Press
36 
37  Waletzko, N., & Schmidt, L. D. (1988).
38  Modeling catalytic gauze reactors: HCN synthesis.
39  AIChE journal, 34(7), 1146-1156.
40  \endverbatim
41 
42 SourceFiles
43  fluxLimitedLangmuirHinshelwoodReactionRateI.H
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef fluxLimitedLangmuirHinshelwoodReactionRate_H
48 #define fluxLimitedLangmuirHinshelwoodReactionRate_H
49 
50 #include "speciesTable.H"
51 #include "specieCoeffs.H"
52 #include "scalarField.H"
53 #include "dictionary.H"
54 #include "objectRegistry.H"
55 #include "volFields.H"
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 
62 // Forward declaration of friend functions and operators
63 
64 class fluxLimitedLangmuirHinshelwoodReactionRate;
65 
66 Ostream& operator<<
67 (
68  Ostream&,
69  const fluxLimitedLangmuirHinshelwoodReactionRate&
70 );
71 
72 
73 /*---------------------------------------------------------------------------*\
74  Class fluxLimitedLangmuirHinshelwoodReactionRate Declaration
75 \*---------------------------------------------------------------------------*/
76 
78 {
79  // Private data
80 
81  //- Number reactants (1 or 2)
82  label nReactants_;
83 
84  //- Additional adsorbable specie names
85  wordList additionalAdsorbableSpecieNames_;
86 
87  //- Reactant and additional adsorbable specie indices
88  labelList ra_;
89 
90  //- ?
91  scalar a_;
92 
93  //- Pre-exponential factor
94  scalarList A_;
95 
96  //- Activation temperature
97  scalarList Ta_;
98 
99  //- Temperature exponent
100  scalarList beta_;
101 
102  //- ?
103  scalarList m_;
104 
105  //- Is the reaction limited?
106  bool limited_;
107 
108  //- Is the surface area per unit volume a uniform value?
109  bool AvUniform_;
110 
111  //- Surface area per unit volume uniform value
112  scalar Av_;
113 
114  //- Surface area per unit volume field name
115  const word AvName_;
116 
117  //- ?
118  scalarList nu_;
119 
120  //- ?
121  scalarList exp_;
122 
123  //- ?
124  scalarList s_;
125 
126  //- ?
127  scalarList W_;
128 
129  //- Reference to the object registry
130  const objectRegistry& ob_;
131 
132  //- Surface area per unit volume field
133  mutable tmp<volScalarField::Internal> tAv_;
134 
135 
136  // Private Member Functions
137 
138  //- Return either the uniform Av value or the field element
139  inline scalar Av(const label li) const;
140 
141 
142 public:
143 
144  // Constructors
145 
146  //- Construct from dictionary
148  (
149  const speciesTable& species,
150  const objectRegistry& ob,
151  const dimensionSet& dims,
152  const dictionary& dict
153  );
154 
155 
156  // Member Functions
157 
158  //- Return the type name
159  static word type()
160  {
161  return "fluxLimitedLangmuirHinshelwood";
162  }
163 
164  //- Pre-evaluation hook
165  inline void preEvaluate() const;
166 
167  //- Post-evaluation hook
168  inline void postEvaluate() const;
169 
170  inline scalar operator()
171  (
172  const scalar p,
173  const scalar T,
174  const scalarField& c,
175  const label li
176  ) const;
177 
178  inline scalar ddT
179  (
180  const scalar p,
181  const scalar T,
182  const scalarField& c,
183  const label li
184  ) const;
185 
186  inline bool hasDdc() const;
187 
188  inline void ddc
189  (
190  const scalar p,
191  const scalar T,
192  const scalarField& c,
193  const label li,
195  ) const;
196 
197  //- Write to stream
198  inline void write(Ostream& os) const;
199 
200 
201  // Ostream Operator
202 
203  inline friend Ostream& operator<<
204  (
205  Ostream&,
207  );
208 };
209 
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 } // End namespace Foam
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
218 
219 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220 
221 #endif
222 
223 // ************************************************************************* //
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:162
Dimension set for the base types.
Definition: dimensionSet.H:125
Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces including the optional flux limi...
void ddc(const scalar p, const scalar T, const scalarField &c, const label li, scalarField &ddc) const
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
fluxLimitedLangmuirHinshelwoodReactionRate(const speciesTable &species, const objectRegistry &ob, const dimensionSet &dims, const dictionary &dict)
Construct from dictionary.
A wordList with hashed indices for faster lookup by name.
Registry of regIOobjects.
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
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict
volScalarField & p