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-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::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 "volFields.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 
58 // Forward declaration of friend functions and operators
59 
60 class fluxLimitedLangmuirHinshelwoodReactionRate;
61 
62 Ostream& operator<<
63 (
64  Ostream&,
65  const fluxLimitedLangmuirHinshelwoodReactionRate&
66 );
67 
68 
69 /*---------------------------------------------------------------------------*\
70  Class fluxLimitedLangmuirHinshelwoodReactionRate Declaration
71 \*---------------------------------------------------------------------------*/
72 
74 {
75  // Private data
76 
77  //- Number reactants (1 or 2)
78  label nReactants_;
79 
80  //- Additional adsorbable specie names
81  wordList additionalAdsorbableSpecieNames_;
82 
83  //- Reactant and additional adsorbable specie indices
84  labelList ra_;
85 
86  //- ?
87  scalar a_;
88 
89  //- Pre-exponential factor
90  scalarList A_;
91 
92  //- Activation temperature
93  scalarList Ta_;
94 
95  //- Temperature exponent
96  scalarList beta_;
97 
98  //- ?
99  scalarList m_;
100 
101  //- Is the reaction limited?
102  bool limited_;
103 
104  //- Is the surface area per unit volume a uniform value?
105  bool AvUniform_;
106 
107  //- Surface area per unit volume uniform value
108  scalar Av_;
109 
110  //- Surface area per unit volume field name
111  const word AvName_;
112 
113  //- ?
114  scalarList nu_;
115 
116  //- ?
117  scalarList exp_;
118 
119  //- ?
120  scalarList s_;
121 
122  //- ?
123  scalarList W_;
124 
125  //- Reference to the object registry
126  const objectRegistry& ob_;
127 
128  //- Surface area per unit volume field
129  mutable tmp<volScalarField::Internal> tAv_;
130 
131 
132  // Private Member Functions
133 
134  //- Return either the uniform Av value or the field element
135  inline scalar Av(const label li) const;
136 
137 
138 public:
139 
140  // Constructors
141 
142  //- Construct from dictionary
144  (
145  const speciesTable& species,
146  const objectRegistry& ob,
147  const dictionary& dict
148  );
149 
150 
151  // Member Functions
152 
153  //- Return the type name
154  static word type()
155  {
156  return "fluxLimitedLangmuirHinshelwood";
157  }
158 
159  //- Pre-evaluation hook
160  inline void preEvaluate() const;
161 
162  //- Post-evaluation hook
163  inline void postEvaluate() const;
164 
165  inline scalar operator()
166  (
167  const scalar p,
168  const scalar T,
169  const scalarField& c,
170  const label li
171  ) const;
172 
173  inline scalar ddT
174  (
175  const scalar p,
176  const scalar T,
177  const scalarField& c,
178  const label li
179  ) const;
180 
181  inline bool hasDdc() const;
182 
183  inline void ddc
184  (
185  const scalar p,
186  const scalar T,
187  const scalarField& c,
188  const label li,
190  ) const;
191 
192  //- Write to stream
193  inline void write(Ostream& os) const;
194 
195 
196  // Ostream Operator
197 
198  inline friend Ostream& operator<<
199  (
200  Ostream&,
202  );
203 };
204 
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 } // End namespace Foam
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 #endif
217 
218 // ************************************************************************* //
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
Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces including the optional flux limi...
fluxLimitedLangmuirHinshelwoodReactionRate(const speciesTable &species, const objectRegistry &ob, const dictionary &dict)
Construct from dictionary.
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
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