initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / coalCombustion / submodels / surfaceReactionModel / COxidationKineticDiffusionLimitedRate / COxidationKineticDiffusionLimitedRate.H
blob6500b24c4ffd82f89501bbaf350e433ceb79ac1f
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     COxidationKineticDiffusionLimitedRate
28 Description
29     Kinetic/diffusion limited rate surface reaction model for coal parcels.
30     Limited to:
32         C(s) + Sb*O2 -> CO2
34     where Sb is the stoichiometry of the reaction
36 \*---------------------------------------------------------------------------*/
38 #ifndef COxidationKineticDiffusionLimitedRate_H
39 #define COxidationKineticDiffusionLimitedRate_H
41 #include "SurfaceReactionModel.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 // Forward class declarations
49 template<class CloudType>
50 class COxidationKineticDiffusionLimitedRate;
52 /*---------------------------------------------------------------------------*\
53             Class COxidationKineticDiffusionLimitedRate Declaration
54 \*---------------------------------------------------------------------------*/
56 template<class CloudType>
57 class COxidationKineticDiffusionLimitedRate
59     public SurfaceReactionModel<CloudType>
61     // Private data
63         // Model constants
65             //- Stoichiometry of reaction
66             const scalar Sb_;
68             //- Mass diffusion limited rate constant, C1
69             const scalar C1_;
71             //- Kinetics limited rate pre-exponential constant, C2
72             const scalar C2_;
74             //- Kinetics limited rate activation energy
75             const scalar E_;
78         // Addressing
80             //- Cs positions in global/local lists
81             label CsLocalId_;
83             //- O2 position in global list
84             label O2GlobalId_;
86             //- CO2 positions in global list
87             label CO2GlobalId_;
90         // Local copies of thermo properties
92             //- Molecular weight of C [kg/kmol]
93             scalar WC_;
95             //- Molecular weight of O2 [kg/kmol]
96             scalar WO2_;
98             //- Chemical enthalpy of CO2 [J/kg]
99             scalar HcCO2_;
102 public:
104     //- Runtime type information
105     TypeName("COxidationKineticDiffusionLimitedRate");
108     // Constructors
110         //- Construct from dictionary
111         COxidationKineticDiffusionLimitedRate
112         (
113             const dictionary& dict,
114             CloudType& owner
115         );
118     //- Destructor
119     virtual ~COxidationKineticDiffusionLimitedRate();
122     // Member Functions
124         //- Flag to indicate whether model activates surface reaction model
125         virtual bool active() const;
127         //- Update surface reactions
128         virtual scalar calculate
129         (
130             const scalar dt,
131             const label cellI,
132             const scalar d,
133             const scalar T,
134             const scalar Tc,
135             const scalar pc,
136             const scalar rhoc,
137             const scalar mass,
138             const scalarField& YGas,
139             const scalarField& YLiquid,
140             const scalarField& YSolid,
141             const scalarField& YMixture,
142             const scalarField& dMassVolatile,
143             scalarField& dMassGas,
144             scalarField& dMassLiquid,
145             scalarField& dMassSolid,
146             scalarField& dMassSRCarrier
147         ) const;
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 } // End namespace Foam
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 #ifdef NoRepository
158     #include "COxidationKineticDiffusionLimitedRate.C"
159 #endif
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 #endif
165 // ************************************************************************* //