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

COxidationMurphyShaddix.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     COxidationMurphyShaddix
00026 
00027 Description
00028     Limited to C(s) + O2 -> CO2
00029 
00030 \*---------------------------------------------------------------------------*/
00031 
00032 #ifndef COxidationMurphyShaddix_H
00033 #define COxidationMurphyShaddix_H
00034 
00035 #include <lagrangianIntermediate/SurfaceReactionModel.H>
00036 
00037 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00038 
00039 namespace Foam
00040 {
00041 
00042 // Forward class declarations
00043 template<class CloudType>
00044 class COxidationMurphyShaddix;
00045 
00046 /*---------------------------------------------------------------------------*\
00047                   Class COxidationMurphyShaddix Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 template<class CloudType>
00051 class COxidationMurphyShaddix
00052 :
00053     public SurfaceReactionModel<CloudType>
00054 {
00055     // Private data
00056 
00057         // Model constants
00058 
00059             //- Reference diffusion constant
00060             const scalar D0_;
00061 
00062             //- Reference density for reference diffusion constant
00063             const scalar rho0_;
00064 
00065             //- Reference temperature for reference diffusion constant
00066             const scalar T0_;
00067 
00068             //- Exponent for diffusion equation
00069             const scalar Dn_;
00070 
00071             //- Kinetic rate coefficient
00072             const scalar A_;
00073 
00074             //- Kinetic rate activation energy
00075             const scalar E_;
00076 
00077             //- Reaction order
00078             const scalar n_;
00079 
00080             //- Effective molecular weight of gaseous volatiles
00081             const scalar WVol_;
00082 
00083 
00084         // Static constants
00085 
00086             //- Maximum number of iterations
00087             static label maxIters_;
00088 
00089             //- Tolerance used in inner iterations
00090             static scalar tolerance_;
00091 
00092 
00093         // Addressing
00094 
00095             //- Cs positions in global/local lists
00096             label CsLocalId_;
00097 
00098             //- O2 position in global list
00099             label O2GlobalId_;
00100 
00101             //- CO2 positions in global list
00102             label CO2GlobalId_;
00103 
00104 
00105         // Local copies of thermo properties
00106 
00107             //- Molecular weight of C [kg/kmol]
00108             scalar WC_;
00109 
00110             //- Molecular weight of O2 [kg/kmol]
00111             scalar WO2_;
00112 
00113 
00114 public:
00115 
00116     //- Runtime type information
00117     TypeName("COxidationMurphyShaddix");
00118 
00119 
00120     // Constructors
00121 
00122         //- Construct from dictionary
00123         COxidationMurphyShaddix
00124         (
00125             const dictionary& dict,
00126             CloudType& owner
00127         );
00128 
00129 
00130     //- Destructor
00131     virtual ~COxidationMurphyShaddix();
00132 
00133 
00134     // Member Functions
00135 
00136         //- Flag to indicate whether model activates surface reaction model
00137         virtual bool active() const;
00138 
00139         //- Update surface reactions
00140         virtual scalar calculate
00141         (
00142             const scalar dt,
00143             const label cellI,
00144             const scalar d,
00145             const scalar T,
00146             const scalar Tc,
00147             const scalar pc,
00148             const scalar rhoc,
00149             const scalar mass,
00150             const scalarField& YGas,
00151             const scalarField& YLiquid,
00152             const scalarField& YSolid,
00153             const scalarField& YMixture,
00154             const scalar N,
00155             scalarField& dMassGas,
00156             scalarField& dMassLiquid,
00157             scalarField& dMassSolid,
00158             scalarField& dMassSRCarrier
00159         ) const;
00160 };
00161 
00162 
00163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00164 
00165 } // End namespace Foam
00166 
00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00168 
00169 #ifdef NoRepository
00170     #include "COxidationMurphyShaddix.C"
00171 #endif
00172 
00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00174 
00175 #endif
00176 
00177 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines