COxidationMurphyShaddix.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 | Copyright (C) 2011-2015 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
102 
103  //- O2 position in global list
105 
106  //- CO2 positions in global list
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,
134  CloudType& owner
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 // ************************************************************************* //
Foam::COxidationMurphyShaddix::CsLocalId_
label CsLocalId_
Cs positions in global/local lists.
Definition: COxidationMurphyShaddix.H:100
Foam::SurfaceReactionModel
Templated surface reaction model class.
Definition: ReactingMultiphaseCloud.H:56
Foam::COxidationMurphyShaddix::WVol_
const scalar WVol_
Effective molecular weight of gaseous volatiles.
Definition: COxidationMurphyShaddix.H:85
Foam::COxidationMurphyShaddix::E_
const scalar E_
Kinetic rate activation energy.
Definition: COxidationMurphyShaddix.H:79
Foam::COxidationMurphyShaddix::WC_
scalar WC_
Molecular weight of C [kg/kmol].
Definition: COxidationMurphyShaddix.H:112
Foam::COxidationMurphyShaddix::T0_
const scalar T0_
Reference temperature for reference diffusion constant.
Definition: COxidationMurphyShaddix.H:70
Foam::COxidationMurphyShaddix::HcCO2_
scalar HcCO2_
Formation enthalpy for CO2 [J/kg].
Definition: COxidationMurphyShaddix.H:118
Foam::COxidationMurphyShaddix::D0_
const scalar D0_
Reference diffusion constant.
Definition: COxidationMurphyShaddix.H:64
Foam::COxidationMurphyShaddix::clone
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
Definition: COxidationMurphyShaddix.H:143
Foam::COxidationMurphyShaddix::tolerance_
static scalar tolerance_
Tolerance used in inner iterations.
Definition: COxidationMurphyShaddix.H:94
Foam::COxidationMurphyShaddix::rho0_
const scalar rho0_
Reference density for reference diffusion constant.
Definition: COxidationMurphyShaddix.H:67
COxidationMurphyShaddix.C
Foam::COxidationMurphyShaddix::calculate
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.
Definition: COxidationMurphyShaddix.C:115
Foam::label
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
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::COxidationMurphyShaddix::maxIters_
static label maxIters_
Maximum number of iterations.
Definition: COxidationMurphyShaddix.H:91
SurfaceReactionModel.H
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::COxidationMurphyShaddix::~COxidationMurphyShaddix
virtual ~COxidationMurphyShaddix()
Destructor.
Definition: COxidationMurphyShaddix.C:107
Foam::COxidationMurphyShaddix::CO2GlobalId_
label CO2GlobalId_
CO2 positions in global list.
Definition: COxidationMurphyShaddix.H:106
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
Foam::COxidationMurphyShaddix::O2GlobalId_
label O2GlobalId_
O2 position in global list.
Definition: COxidationMurphyShaddix.H:103
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::COxidationMurphyShaddix::n_
const scalar n_
Reaction order.
Definition: COxidationMurphyShaddix.H:82
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::COxidationMurphyShaddix::COxidationMurphyShaddix
COxidationMurphyShaddix(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Definition: COxidationMurphyShaddix.C:42
Foam::COxidationMurphyShaddix::WO2_
scalar WO2_
Molecular weight of O2 [kg/kmol].
Definition: COxidationMurphyShaddix.H:115
Foam::COxidationMurphyShaddix
Limited to C(s) + O2 -> CO2.
Definition: COxidationMurphyShaddix.H:48
Foam::COxidationMurphyShaddix::TypeName
TypeName("COxidationMurphyShaddix")
Runtime type information.
Foam::COxidationMurphyShaddix::A_
const scalar A_
Kinetic rate coefficient.
Definition: COxidationMurphyShaddix.H:76
Foam::COxidationMurphyShaddix::Dn_
const scalar Dn_
Exponent for diffusion equation.
Definition: COxidationMurphyShaddix.H:73
N
label N
Definition: createFields.H:22