BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / lagrangian / coalCombustion / submodels / surfaceReactionModel / COxidationMurphyShaddix / COxidationMurphyShaddix.H
blob319178dd47a26039cbfdc90c80c7beb70b30c888
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     COxidationMurphyShaddix
27 Description
28     Limited to C(s) + O2 -> CO2
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
35 \*---------------------------------------------------------------------------*/
37 #ifndef COxidationMurphyShaddix_H
38 #define COxidationMurphyShaddix_H
40 #include "SurfaceReactionModel.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Forward class declarations
48 template<class CloudType>
49 class COxidationMurphyShaddix;
51 /*---------------------------------------------------------------------------*\
52                   Class COxidationMurphyShaddix Declaration
53 \*---------------------------------------------------------------------------*/
55 template<class CloudType>
56 class COxidationMurphyShaddix
58     public SurfaceReactionModel<CloudType>
60     // Private data
62         // Model constants
64             //- Reference diffusion constant
65             const scalar D0_;
67             //- Reference density for reference diffusion constant
68             const scalar rho0_;
70             //- Reference temperature for reference diffusion constant
71             const scalar T0_;
73             //- Exponent for diffusion equation
74             const scalar Dn_;
76             //- Kinetic rate coefficient
77             const scalar A_;
79             //- Kinetic rate activation energy
80             const scalar E_;
82             //- Reaction order
83             const scalar n_;
85             //- Effective molecular weight of gaseous volatiles
86             const scalar WVol_;
89         // Static constants
91             //- Maximum number of iterations
92             static label maxIters_;
94             //- Tolerance used in inner iterations
95             static scalar tolerance_;
98         // Addressing
100             //- Cs positions in global/local lists
101             label CsLocalId_;
103             //- O2 position in global list
104             label O2GlobalId_;
106             //- CO2 positions in global list
107             label CO2GlobalId_;
110         // Local copies of thermo properties
112             //- Molecular weight of C [kg/kmol]
113             scalar WC_;
115             //- Molecular weight of O2 [kg/kmol]
116             scalar WO2_;
118             //- Formation enthalpy for CO2 [J/kg]
119             scalar HcCO2_;
122 public:
124     //- Runtime type information
125     TypeName("COxidationMurphyShaddix");
128     // Constructors
130         //- Construct from dictionary
131         COxidationMurphyShaddix
132         (
133             const dictionary& dict,
134             CloudType& owner
135         );
137         //- Construct copy
138         COxidationMurphyShaddix
139         (
140             const COxidationMurphyShaddix<CloudType>& srm
141         );
143         //- Construct and return a clone
144         virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
145         {
146             return autoPtr<SurfaceReactionModel<CloudType> >
147             (
148                 new COxidationMurphyShaddix<CloudType>(*this)
149             );
150         }
153     //- Destructor
154     virtual ~COxidationMurphyShaddix();
157     // Member Functions
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;
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 #ifdef NoRepository
190     #include "COxidationMurphyShaddix.C"
191 #endif
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 #endif
197 // ************************************************************************* //