initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / coalCombustion / submodels / surfaceReactionModel / COxidationDiffusionLimitedRate / COxidationDiffusionLimitedRate.H
blob9ab6a5c0f940450b350f8100b6217c387ecc5afe
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     COxidationDiffusionLimitedRate
28 Description
29     Diffusion limited rate surface reaction model for coal parcels. Limited to:
31         C(s) + Sb*O2 -> CO2
33     where Sb is the stoichiometry of the reaction
35 \*---------------------------------------------------------------------------*/
37 #ifndef COxidationDiffusionLimitedRate_H
38 #define COxidationDiffusionLimitedRate_H
40 #include "SurfaceReactionModel.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 // Forward class declarations
45 template<class CloudType>
46 class COxidationDiffusionLimitedRate;
48 namespace Foam
50 /*---------------------------------------------------------------------------*\
51               Class COxidationDiffusionLimitedRate Declaration
52 \*---------------------------------------------------------------------------*/
54 template<class CloudType>
55 class COxidationDiffusionLimitedRate
57     public SurfaceReactionModel<CloudType>
59     // Private data
61         // Model constants
63             //- Stoichiometry of reaction
64             const scalar Sb_;
66             //- Diffusion coefficient of oxidants [m2/s]
67             const scalar D_;
70         // Addressing
72             //- Cs positions in global/local lists
73             label CsLocalId_;
75             //- O2 position in global list
76             label O2GlobalId_;
78             //- CO2 positions in global list
79             label CO2GlobalId_;
82         // Local copies of thermo properties
84             //- Molecular weight of C [kg/kmol]
85             scalar WC_;
87             //- Molecular weight of O2 [kg/kmol]
88             scalar WO2_;
90             //- Chemical enthalpy of CO2 [J/kg]
91             scalar HcCO2_;
94 public:
96     //- Runtime type information
97     TypeName("COxidationDiffusionLimitedRate");
100     // Constructors
102         //- Construct from dictionary
103         COxidationDiffusionLimitedRate
104         (
105             const dictionary& dict,
106             CloudType& owner
107         );
110     //- Destructor
111     virtual ~COxidationDiffusionLimitedRate();
114     // Member Functions
116         //- Flag to indicate whether model activates surface reaction model
117         virtual bool active() const;
119         //- Update surface reactions
120         virtual scalar calculate
121         (
122             const scalar dt,
123             const label cellI,
124             const scalar d,
125             const scalar T,
126             const scalar Tc,
127             const scalar pc,
128             const scalar rhoc,
129             const scalar mass,
130             const scalarField& YGas,
131             const scalarField& YLiquid,
132             const scalarField& YSolid,
133             const scalarField& YMixture,
134             const scalarField& dMassVolatile,
135             scalarField& dMassGas,
136             scalarField& dMassLiquid,
137             scalarField& dMassSolid,
138             scalarField& dMassSRCarrier
139         ) const;
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 } // End namespace Foam
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 #ifdef NoRepository
150     #include "COxidationDiffusionLimitedRate.C"
151 #endif
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 #endif
157 // ************************************************************************* //