solidIsothermalReactionRate.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2021-2022 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::solidIsothermalReactionRate
28 
29 Description
30  Isothermal reaction rate for solids
31 
32 Usage
33  Minimal example:
34  \verbatim
35  {
36  // Mandatory entries
37  C <scalar>;
38  Cp <scalar>;
39  Tpc <scalar>;
40  Elat <scalar>;
41  }
42  \endverbatim
43 
44  where the entries mean:
45  \table
46  Property | Description | Type | Reqd | Deflt
47  C | Model constant | scalar | yes | -
48  Cp | Specific heat of solid material (assumed constant) | scalar | yes | -
49  Tpc | Phase change temperature | scalar | yes | -
50  Elat | Latent heat of phase change | scalar | yes | -
51  \endtable
52 
53 Note
54  - \c Elat, the latent energy is defined in the present
55  implementation as a negative value (using the convention
56  endothermic process has negative enthalpy.)
57 
58 SourceFiles
59  solidIsothermalReactionRateI.H
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef Foam_solidIsothermalReactionRate_H
64 #define Foam_solidIsothermalReactionRate_H
65 
66 #include "scalarField.H"
67 #include "typeInfo.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 
74 // Forward Declarations
75 class solidIsothermalReactionRate;
76 
77 Ostream& operator<<(Ostream&, const solidIsothermalReactionRate&);
78 
79 
80 /*---------------------------------------------------------------------------*\
81  Class solidIsothermalReactionRate Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 class solidIsothermalReactionRate
85 {
86  // Private Data
87 
88  //- Model constant
89  scalar C_;
90 
91  //- Specific heat of solid material (assumed constant)
92  scalar Cp_;
93 
94  //- Phase change temperature
95  scalar Tpc_;
96 
97  //- Latent heat of phase change
98  scalar Elat_;
99 
100 
101 public:
102 
103  // Constructors
104 
105  //- Construct from components
107  (
108  const scalar C,
109  const scalar Cp,
110  const scalar Tpc,
111  const scalar Elat
112  );
113 
114 
115  //- Construct from dictionary
117  (
118  const speciesTable& species,
119  const dictionary& dict
120  );
121 
122 
123  //- Destructor
124  virtual ~solidIsothermalReactionRate() = default;
125 
126 
127  // Member Functions
128 
129  //- Return the type name
130  static word type()
131  {
132  return "Isothermal";
133  }
134 
135  //- Return reaction rate constant
136  // frequency of collisions resulting in a reaction
137  inline scalar operator()
138  (
139  const scalar p,
140  const scalar T,
141  const scalarField& c
142  ) const;
143 
144  //- Write to stream
145  inline void write(Ostream& os) const;
146 
147 
148  // Ostream Operator
149 
150  inline friend Ostream& operator<<
151  (
152  Ostream&,
154  );
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Isothermal reaction rate for solids.
virtual ~solidIsothermalReactionRate()=default
Destructor.
static word type()
Return the type name.
A class for handling words, derived from Foam::string.
Definition: word.H:63
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
const volScalarField & Cp
Definition: EEqn.H:7
OBJstream os(runTime.globalPath()/outputName)
volScalarField & C
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:77
void write(Ostream &os) const
Write to stream.
solidIsothermalReactionRate(const scalar C, const scalar Cp, const scalar Tpc, const scalar Elat)
Construct from components.
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
const dimensionedScalar c
Speed of light in a vacuum.
volScalarField & p
Namespace for OpenFOAM.