FreeFOAM The Cross-Platform CFD Toolkit
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) 2008-2010 OpenCFD Ltd.
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  COxidationMurphyShaddix
26 
27 Description
28  Limited to C(s) + O2 -> CO2
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef COxidationMurphyShaddix_H
33 #define COxidationMurphyShaddix_H
34 
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace Foam
40 {
41 
42 // Forward class declarations
43 template<class CloudType>
45 
46 /*---------------------------------------------------------------------------*\
47  Class COxidationMurphyShaddix Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class CloudType>
52 :
53  public SurfaceReactionModel<CloudType>
54 {
55  // Private data
56 
57  // Model constants
58 
59  //- Reference diffusion constant
60  const scalar D0_;
61 
62  //- Reference density for reference diffusion constant
63  const scalar rho0_;
64 
65  //- Reference temperature for reference diffusion constant
66  const scalar T0_;
67 
68  //- Exponent for diffusion equation
69  const scalar Dn_;
70 
71  //- Kinetic rate coefficient
72  const scalar A_;
73 
74  //- Kinetic rate activation energy
75  const scalar E_;
76 
77  //- Reaction order
78  const scalar n_;
79 
80  //- Effective molecular weight of gaseous volatiles
81  const scalar WVol_;
82 
83 
84  // Static constants
85 
86  //- Maximum number of iterations
87  static label maxIters_;
88 
89  //- Tolerance used in inner iterations
90  static scalar tolerance_;
91 
92 
93  // Addressing
94 
95  //- Cs positions in global/local lists
96  label CsLocalId_;
97 
98  //- O2 position in global list
99  label O2GlobalId_;
100 
101  //- CO2 positions in global list
102  label CO2GlobalId_;
103 
104 
105  // Local copies of thermo properties
106 
107  //- Molecular weight of C [kg/kmol]
108  scalar WC_;
109 
110  //- Molecular weight of O2 [kg/kmol]
111  scalar WO2_;
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("COxidationMurphyShaddix");
118 
119 
120  // Constructors
121 
122  //- Construct from dictionary
124  (
125  const dictionary& dict,
126  CloudType& owner
127  );
128 
129 
130  //- Destructor
131  virtual ~COxidationMurphyShaddix();
132 
133 
134  // Member Functions
135 
136  //- Flag to indicate whether model activates surface reaction model
137  virtual bool active() const;
138 
139  //- Update surface reactions
140  virtual scalar calculate
141  (
142  const scalar dt,
143  const label cellI,
144  const scalar d,
145  const scalar T,
146  const scalar Tc,
147  const scalar pc,
148  const scalar rhoc,
149  const scalar mass,
150  const scalarField& YGas,
151  const scalarField& YLiquid,
152  const scalarField& YSolid,
153  const scalarField& YMixture,
154  const scalar N,
155  scalarField& dMassGas,
156  scalarField& dMassLiquid,
157  scalarField& dMassSolid,
158  scalarField& dMassSRCarrier
159  ) const;
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #ifdef NoRepository
170  #include "COxidationMurphyShaddix.C"
171 #endif
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************ vim: set sw=4 sts=4 et: ************************ //