FreeFOAM The Cross-Platform CFD Toolkit
COxidationDiffusionLimitedRate.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  COxidationDiffusionLimitedRate
26 
27 Description
28  Diffusion limited rate surface reaction model for coal parcels. Limited to:
29 
30  C(s) + Sb*O2 -> CO2
31 
32  where Sb is the stoichiometry of the reaction
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef COxidationDiffusionLimitedRate_H
37 #define COxidationDiffusionLimitedRate_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 // Forward class declarations
44 template<class CloudType>
46 
47 namespace Foam
48 {
49 /*---------------------------------------------------------------------------*\
50  Class COxidationDiffusionLimitedRate Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class CloudType>
55 :
56  public SurfaceReactionModel<CloudType>
57 {
58  // Private data
59 
60  // Model constants
61 
62  //- Stoichiometry of reaction
63  const scalar Sb_;
64 
65  //- Diffusion coefficient of oxidants [m2/s]
66  const scalar D_;
67 
68 
69  // Addressing
70 
71  //- Cs positions in global/local lists
72  label CsLocalId_;
73 
74  //- O2 position in global list
75  label O2GlobalId_;
76 
77  //- CO2 positions in global list
78  label CO2GlobalId_;
79 
80 
81  // Local copies of thermo properties
82 
83  //- Molecular weight of C [kg/kmol]
84  scalar WC_;
85 
86  //- Molecular weight of O2 [kg/kmol]
87  scalar WO2_;
88 
89  //- Chemical enthalpy of CO2 [J/kg]
90  scalar HcCO2_;
91 
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("COxidationDiffusionLimitedRate");
97 
98 
99  // Constructors
100 
101  //- Construct from dictionary
103  (
104  const dictionary& dict,
105  CloudType& owner
106  );
107 
108 
109  //- Destructor
111 
112 
113  // Member Functions
114 
115  //- Flag to indicate whether model activates surface reaction model
116  virtual bool active() const;
117 
118  //- Update surface reactions
119  virtual scalar calculate
120  (
121  const scalar dt,
122  const label cellI,
123  const scalar d,
124  const scalar T,
125  const scalar Tc,
126  const scalar pc,
127  const scalar rhoc,
128  const scalar mass,
129  const scalarField& YGas,
130  const scalarField& YLiquid,
131  const scalarField& YSolid,
132  const scalarField& YMixture,
133  const scalar N,
134  scalarField& dMassGas,
135  scalarField& dMassLiquid,
136  scalarField& dMassSolid,
137  scalarField& dMassSRCarrier
138  ) const;
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #ifdef NoRepository
150 #endif
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************ vim: set sw=4 sts=4 et: ************************ //