LangmuirHinshelwoodReactionRate.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 Class
25  Foam::LangmuirHinshelwoodReactionRate
26 
27 Description
28  Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces.
29 
30  Reference:
31  \verbatim
32  Hinshelwood, C.N. (1940).
33  The Kinetics of Chemical Change.
34  Oxford Clarendon Press
35  \endverbatim
36 
37 SourceFiles
38  LangmuirHinshelwoodReactionRateI.H
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef LangmuirHinshelwoodReactionRate_H
43 #define LangmuirHinshelwoodReactionRate_H
44 
45 #include "speciesTable.H"
46 #include "scalarField.H"
47 #include "typeInfo.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 // Forward declaration of friend functions and operators
55 
56 class LangmuirHinshelwoodReactionRate;
57 
58 Ostream& operator<<(Ostream&, const LangmuirHinshelwoodReactionRate&);
59 
60 
61 /*---------------------------------------------------------------------------*\
62  Class LangmuirHinshelwoodReactionRate Declaration
63 \*---------------------------------------------------------------------------*/
64 
66 {
67  // Private Data
68 
69  //- Reactant names
70  FixedList<word, 2> reactantNames_;
71 
72  //- Reactant indices
74 
75  scalar a_;
80 
81 
82 public:
83 
84  // Constructors
85 
86  //- Construct from dictionary
88  (
89  const speciesTable& species,
90  const dimensionSet& dims,
91  const dictionary& dict
92  );
93 
94 
95  // Member Functions
96 
97  //- Return the type name
98  static word type()
99  {
100  return "LangmuirHinshelwood";
101  }
102 
103  //- Pre-evaluation hook
104  inline void preEvaluate() const;
105 
106  //- Post-evaluation hook
107  inline void postEvaluate() const;
108 
109  //- Return the rate
110  inline scalar operator()
111  (
112  const scalar p,
113  const scalar T,
114  const scalarField& c,
115  const label li
116  ) const;
117 
118  //- The derivative of the rate w.r.t. temperature
119  inline scalar ddT
120  (
121  const scalar p,
122  const scalar T,
123  const scalarField& c,
124  const label li
125  ) const;
126 
127  //- Is the rate a function of concentration?
128  inline bool hasDdc() const;
129 
130  //- The derivative of the rate w.r.t. concentration
131  inline void ddc
132  (
133  const scalar p,
134  const scalar T,
135  const scalarField& c,
136  const label li,
138  ) const;
139 
140  //- Write to stream
141  inline void write(Ostream& os) const;
142 
143 
144  // Ostream Operator
145 
146  inline friend Ostream& operator<<
147  (
148  Ostream&,
150  );
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
A 1D vector of objects of type <T> with a fixed size <Size>.
Definition: FixedList.H:78
Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces.
LangmuirHinshelwoodReactionRate(const speciesTable &species, const dimensionSet &dims, const dictionary &dict)
Construct from dictionary.
void write(Ostream &os) const
Write to stream.
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?
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
A wordList with hashed indices for faster lookup by name.
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 &os, const fvConstraints &constraints)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict
volScalarField & p
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...