OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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