phaseSurfaceArrheniusReactionRate.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) 2021-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::phaseSurfaceArrheniusReactionRate
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 phase surface area per unit volume. The name of the phase is
33  specified by the user.
34 
35 SourceFiles
36  phaseSurfaceArrheniusReactionRateI.H
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef phaseSurfaceArrheniusReactionRate_H
41 #define phaseSurfaceArrheniusReactionRate_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 phaseSurfaceArrheniusReactionRate;
55 
56 Ostream& operator<<(Ostream&, const phaseSurfaceArrheniusReactionRate&);
57 
58 /*---------------------------------------------------------------------------*\
59  Class phaseSurfaceArrheniusReactionRate Declaration
60 \*---------------------------------------------------------------------------*/
61 
63 :
65 {
66  // Private Data
67 
68  //- Name of the phase
69  const word phaseName_;
70 
71  //- Reference to the object registry
72  const objectRegistry& ob_;
73 
74  //- Surface area per unit volume field
75  mutable tmp<volScalarField> tAv_;
76 
77 
78 public:
79 
80  // Constructors
81 
82  //- Construct from dictionary
84  (
85  const speciesTable& species,
86  const objectRegistry& ob,
87  const dimensionSet& dims,
88  const dictionary& dict
89  );
90 
91 
92  // Member Functions
93 
94  //- Return the type name
95  static word type()
96  {
97  return "phaseSurfaceArrhenius";
98  }
99 
100  //- Pre-evaluation hook
101  inline void preEvaluate() const;
102 
103  //- Post-evaluation hook
104  inline void postEvaluate() const;
105 
106  //- Evaluate the rate
107  inline scalar operator()
108  (
109  const scalar p,
110  const scalar T,
111  const scalarField& c,
112  const label li
113  ) const;
114 
115  //- Evaluate the derivative
116  inline scalar ddT
117  (
118  const scalar p,
119  const scalar T,
120  const scalarField& c,
121  const label li
122  ) const;
123 
124  //- Write to stream
125  inline void write(Ostream& os) const;
126 
127 
128  // Ostream Operator
129 
130  inline friend Ostream& operator<<
131  (
132  Ostream&,
134  );
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
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:162
Dimension set for the base types.
Definition: dimensionSet.H:125
A wordList with hashed indices for faster lookup by name.
Registry of regIOobjects.
A modified Arrhenius reaction rate given by:
void write(Ostream &os) const
Write to stream.
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
Evaluate the derivative.
phaseSurfaceArrheniusReactionRate(const speciesTable &species, const objectRegistry &ob, const dimensionSet &dims, const dictionary &dict)
Construct from dictionary.
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 &os, const fvConstraints &constraints)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict
volScalarField & p