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 COxidationDiffusionLimitedRate 00026 00027 Description 00028 Diffusion limited rate surface reaction model for coal parcels. Limited to: 00029 00030 C(s) + Sb*O2 -> CO2 00031 00032 where Sb is the stoichiometry of the reaction 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef COxidationDiffusionLimitedRate_H 00037 #define COxidationDiffusionLimitedRate_H 00038 00039 #include <lagrangianIntermediate/SurfaceReactionModel.H> 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 // Forward class declarations 00044 template<class CloudType> 00045 class COxidationDiffusionLimitedRate; 00046 00047 namespace Foam 00048 { 00049 /*---------------------------------------------------------------------------*\ 00050 Class COxidationDiffusionLimitedRate Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 template<class CloudType> 00054 class COxidationDiffusionLimitedRate 00055 : 00056 public SurfaceReactionModel<CloudType> 00057 { 00058 // Private data 00059 00060 // Model constants 00061 00062 //- Stoichiometry of reaction 00063 const scalar Sb_; 00064 00065 //- Diffusion coefficient of oxidants [m2/s] 00066 const scalar D_; 00067 00068 00069 // Addressing 00070 00071 //- Cs positions in global/local lists 00072 label CsLocalId_; 00073 00074 //- O2 position in global list 00075 label O2GlobalId_; 00076 00077 //- CO2 positions in global list 00078 label CO2GlobalId_; 00079 00080 00081 // Local copies of thermo properties 00082 00083 //- Molecular weight of C [kg/kmol] 00084 scalar WC_; 00085 00086 //- Molecular weight of O2 [kg/kmol] 00087 scalar WO2_; 00088 00089 //- Chemical enthalpy of CO2 [J/kg] 00090 scalar HcCO2_; 00091 00092 00093 public: 00094 00095 //- Runtime type information 00096 TypeName("COxidationDiffusionLimitedRate"); 00097 00098 00099 // Constructors 00100 00101 //- Construct from dictionary 00102 COxidationDiffusionLimitedRate 00103 ( 00104 const dictionary& dict, 00105 CloudType& owner 00106 ); 00107 00108 00109 //- Destructor 00110 virtual ~COxidationDiffusionLimitedRate(); 00111 00112 00113 // Member Functions 00114 00115 //- Flag to indicate whether model activates surface reaction model 00116 virtual bool active() const; 00117 00118 //- Update surface reactions 00119 virtual scalar calculate 00120 ( 00121 const scalar dt, 00122 const label cellI, 00123 const scalar d, 00124 const scalar T, 00125 const scalar Tc, 00126 const scalar pc, 00127 const scalar rhoc, 00128 const scalar mass, 00129 const scalarField& YGas, 00130 const scalarField& YLiquid, 00131 const scalarField& YSolid, 00132 const scalarField& YMixture, 00133 const scalar N, 00134 scalarField& dMassGas, 00135 scalarField& dMassLiquid, 00136 scalarField& dMassSolid, 00137 scalarField& dMassSRCarrier 00138 ) const; 00139 }; 00140 00141 00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00143 00144 } // End namespace Foam 00145 00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00147 00148 #ifdef NoRepository 00149 #include "COxidationDiffusionLimitedRate.C" 00150 #endif 00151 00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00153 00154 #endif 00155 00156 // ************************ vim: set sw=4 sts=4 et: ************************ //