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 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> tA_;
76 
77 
78 public:
79 
80  // Constructors
81 
82  //- Construct from dictionary
84  (
85  const speciesTable& species,
86  const objectRegistry& ob,
87  const dictionary& dict
88  );
89 
90 
91  // Member Functions
92 
93  //- Return the type name
94  static word type()
95  {
96  return "phaseSurfaceArrhenius";
97  }
98 
99  //- Pre-evaluation hook
100  inline void preEvaluate() const;
101 
102  //- Post-evaluation hook
103  inline void postEvaluate() const;
104 
105  //- Evaluate the rate
106  inline scalar operator()
107  (
108  const scalar p,
109  const scalar T,
110  const scalarField& c,
111  const label li
112  ) const;
113 
114  //- Evaluate the derivative
115  inline scalar ddT
116  (
117  const scalar p,
118  const scalar T,
119  const scalarField& c,
120  const label li
121  ) const;
122 
123  //- Write to stream
124  inline void write(Ostream& os) const;
125 
126 
127  // Ostream Operator
128 
129  inline friend Ostream& operator<<
130  (
131  Ostream&,
133  );
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
phaseSurfaceArrheniusReactionRate(const speciesTable &species, const objectRegistry &ob, const dictionary &dict)
Construct from dictionary.
const dimensionedScalar c
Speed of light in a vacuum.
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:
A modified Arrhenius reaction rate given by:
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:53
Registry of regIOobjects.
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
Evaluate the derivative.
Namespace for OpenFOAM.
void write(Ostream &os) const
Write to stream.