COxidationMurphyShaddix.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-2020 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::COxidationMurphyShaddix
26 
27 Description
28  Limited to C(s) + O2 -> CO2
29 
30  Loosely based on the reference:
31  Murphy, J. J., Shaddix, C. R., Combustion kinetics of coal chars
32  in oxygen-enriched environments, Combustion and Flame 144,
33  pp710-729, 2006
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef COxidationMurphyShaddix_H
38 #define COxidationMurphyShaddix_H
39 
40 #include "SurfaceReactionModel.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward class declarations
48 template<class CloudType>
50 
51 /*---------------------------------------------------------------------------*\
52  Class COxidationMurphyShaddix Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class CloudType>
57 :
58  public SurfaceReactionModel<CloudType>
59 {
60  // Private Data
61 
62  // Model constants
63 
64  //- Reference diffusion constant
65  const scalar D0_;
66 
67  //- Reference density for reference diffusion constant
68  const scalar rho0_;
69 
70  //- Reference temperature for reference diffusion constant
71  const scalar T0_;
72 
73  //- Exponent for diffusion equation
74  const scalar Dn_;
75 
76  //- Kinetic rate coefficient
77  const scalar A_;
78 
79  //- Kinetic rate activation energy
80  const scalar E_;
81 
82  //- Reaction order
83  const scalar n_;
84 
85  //- Effective molecular weight of gaseous volatiles
86  const scalar WVol_;
87 
88 
89  // Static constants
90 
91  //- Maximum number of iterations
92  static label maxIters_;
93 
94  //- Tolerance used in inner iterations
95  static scalar tolerance_;
96 
97 
98  // Addressing
99 
100  //- Cs positions in global/local lists
101  label CsLocalId_;
102 
103  //- O2 position in global list
104  label O2GlobalId_;
105 
106  //- CO2 positions in global list
107  label CO2GlobalId_;
108 
109 
110  // Local copies of thermo properties
111 
112  //- Molecular weight of C [kg/kmol]
113  scalar WC_;
114 
115  //- Molecular weight of O2 [kg/kmol]
116  scalar WO2_;
117 
118  //- Formation enthalpy for CO2 [J/kg]
119  scalar HcCO2_;
120 
121 
122 public:
123 
124  //- Runtime type information
125  TypeName("COxidationMurphyShaddix");
126 
127 
128  // Constructors
129 
130  //- Construct from dictionary
132  (
133  const dictionary& dict,
135  );
136 
137  //- Construct copy
139  (
141  );
142 
143  //- Construct and return a clone
145  {
147  (
149  );
150  }
151 
152 
153  //- Destructor
154  virtual ~COxidationMurphyShaddix();
155 
156 
157  // Member Functions
158 
159  //- Update surface reactions
160  virtual scalar calculate
161  (
162  const scalar dt,
163  const label celli,
164  const scalar d,
165  const scalar T,
166  const scalar Tc,
167  const scalar pc,
168  const scalar rhoc,
169  const scalar mass,
170  const scalarField& YGas,
171  const scalarField& YLiquid,
172  const scalarField& YSolid,
173  const scalarField& YMixture,
174  const scalar N,
175  scalarField& dMassGas,
176  scalarField& dMassLiquid,
177  scalarField& dMassSolid,
178  scalarField& dMassSRCarrier
179  ) const;
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace Foam
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #ifdef NoRepository
190  #include "COxidationMurphyShaddix.C"
191 #endif
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
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
TypeName("COxidationMurphyShaddix")
Runtime type information.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const CloudType & owner() const
Return const access to the owner cloud.
Limited to C(s) + O2 -> CO2.
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
COxidationMurphyShaddix(const dictionary &dict, CloudType &owner)
Construct from dictionary.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label N
Definition: createFields.H:9
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual ~COxidationMurphyShaddix()
Destructor.
Templated surface reaction model class.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
virtual scalar calculate(const scalar dt, const label celli, const scalar d, const scalar T, const scalar Tc, const scalar pc, const scalar rhoc, const scalar mass, const scalarField &YGas, const scalarField &YLiquid, const scalarField &YSolid, const scalarField &YMixture, const scalar N, scalarField &dMassGas, scalarField &dMassLiquid, scalarField &dMassSolid, scalarField &dMassSRCarrier) const
Update surface reactions.
Namespace for OpenFOAM.