FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

COxidationKineticDiffusionLimitedRate.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2008-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     COxidationKineticDiffusionLimitedRate
00026 
00027 Description
00028     Kinetic/diffusion limited rate surface reaction model for coal parcels.
00029     Limited to:
00030 
00031         C(s) + Sb*O2 -> CO2
00032 
00033     where Sb is the stoichiometry of the reaction
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef COxidationKineticDiffusionLimitedRate_H
00038 #define COxidationKineticDiffusionLimitedRate_H
00039 
00040 #include <lagrangianIntermediate/SurfaceReactionModel.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // Forward class declarations
00048 template<class CloudType>
00049 class COxidationKineticDiffusionLimitedRate;
00050 
00051 /*---------------------------------------------------------------------------*\
00052             Class COxidationKineticDiffusionLimitedRate Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 template<class CloudType>
00056 class COxidationKineticDiffusionLimitedRate
00057 :
00058     public SurfaceReactionModel<CloudType>
00059 {
00060     // Private data
00061 
00062         // Model constants
00063 
00064             //- Stoichiometry of reaction
00065             const scalar Sb_;
00066 
00067             //- Mass diffusion limited rate constant, C1
00068             const scalar C1_;
00069 
00070             //- Kinetics limited rate pre-exponential constant, C2
00071             const scalar C2_;
00072 
00073             //- Kinetics limited rate activation energy
00074             const scalar E_;
00075 
00076 
00077         // Addressing
00078 
00079             //- Cs positions in global/local lists
00080             label CsLocalId_;
00081 
00082             //- O2 position in global list
00083             label O2GlobalId_;
00084 
00085             //- CO2 positions in global list
00086             label CO2GlobalId_;
00087 
00088 
00089         // Local copies of thermo properties
00090 
00091             //- Molecular weight of C [kg/kmol]
00092             scalar WC_;
00093 
00094             //- Molecular weight of O2 [kg/kmol]
00095             scalar WO2_;
00096 
00097             //- Chemical enthalpy of CO2 [J/kg]
00098             scalar HcCO2_;
00099 
00100 
00101 public:
00102 
00103     //- Runtime type information
00104     TypeName("COxidationKineticDiffusionLimitedRate");
00105 
00106 
00107     // Constructors
00108 
00109         //- Construct from dictionary
00110         COxidationKineticDiffusionLimitedRate
00111         (
00112             const dictionary& dict,
00113             CloudType& owner
00114         );
00115 
00116 
00117     //- Destructor
00118     virtual ~COxidationKineticDiffusionLimitedRate();
00119 
00120 
00121     // Member Functions
00122 
00123         //- Flag to indicate whether model activates surface reaction model
00124         virtual bool active() const;
00125 
00126         //- Update surface reactions
00127         virtual scalar calculate
00128         (
00129             const scalar dt,
00130             const label cellI,
00131             const scalar d,
00132             const scalar T,
00133             const scalar Tc,
00134             const scalar pc,
00135             const scalar rhoc,
00136             const scalar mass,
00137             const scalarField& YGas,
00138             const scalarField& YLiquid,
00139             const scalarField& YSolid,
00140             const scalarField& YMixture,
00141             const scalar N,
00142             scalarField& dMassGas,
00143             scalarField& dMassLiquid,
00144             scalarField& dMassSolid,
00145             scalarField& dMassSRCarrier
00146         ) const;
00147 };
00148 
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 } // End namespace Foam
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 #ifdef NoRepository
00157     #include "COxidationKineticDiffusionLimitedRate.C"
00158 #endif
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 #endif
00163 
00164 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines