COxidationKineticDiffusionLimitedRate.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
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  Foam::COxidationKineticDiffusionLimitedRate
26 
27 Description
28  Kinetic/diffusion limited rate surface reaction model for coal parcels.
29  Limited to:
30 
31  C(s) + Sb*O2 -> CO2
32 
33  where Sb is the stoichiometry of the reaction
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef COxidationKineticDiffusionLimitedRate_H
38 #define COxidationKineticDiffusionLimitedRate_H
39 
40 #include "SurfaceReactionModel.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward class declarations
48 template<class CloudType>
50 
51 /*---------------------------------------------------------------------------*\
52  Class COxidationKineticDiffusionLimitedRate Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class CloudType>
57 :
58  public SurfaceReactionModel<CloudType>
59 {
60  // Private Data
61 
62  // Model constants
63 
64  //- Stoichiometry of reaction
65  const scalar Sb_;
66 
67  //- Mass diffusion limited rate constant, C1
68  const scalar C1_;
69 
70  //- Kinetics limited rate pre-exponential constant, C2
71  const scalar C2_;
72 
73  //- Kinetics limited rate activation energy
74  const scalar E_;
75 
76 
77  // Addressing
78 
79  //- Cs positions in global/local lists
80  label CsLocalId_;
81 
82  //- O2 position in global list
83  label O2GlobalId_;
84 
85  //- CO2 positions in global list
86  label CO2GlobalId_;
87 
88 
89  // Local copies of thermo properties
90 
91  //- Molecular weight of C [kg/kmol]
92  scalar WC_;
93 
94  //- Molecular weight of O2 [kg/kmol]
95  scalar WO2_;
96 
97  //- Formation enthalpy for CO2 [J/kg]
98  scalar HcCO2_;
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("COxidationKineticDiffusionLimitedRate");
105 
106 
107  // Constructors
108 
109  //- Construct from dictionary
111  (
112  const dictionary& dict,
114  );
115 
116  //- Construct copy
118  (
120  );
121 
122  //- Construct and return a clone
124  {
126  (
128  );
129  }
130 
131 
132  //- Destructor
134 
135 
136  // Member Functions
137 
138  //- Update surface reactions
139  virtual scalar calculate
140  (
141  const scalar dt,
142  const label celli,
143  const scalar d,
144  const scalar T,
145  const scalar Tc,
146  const scalar pc,
147  const scalar rhoc,
148  const scalar mass,
149  const scalarField& YGas,
150  const scalarField& YLiquid,
151  const scalarField& YSolid,
152  const scalarField& YMixture,
153  const scalar N,
154  scalarField& dMassGas,
155  scalarField& dMassLiquid,
156  scalarField& dMassSolid,
157  scalarField& dMassSRCarrier
158  ) const;
159 };
160 
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 } // End namespace Foam
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #ifdef NoRepository
170 #endif
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #endif
175 
176 // ************************************************************************* //
TypeName("COxidationKineticDiffusionLimitedRate")
Runtime type information.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const CloudType & owner() const
Return const access to the owner cloud.
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
COxidationKineticDiffusionLimitedRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
label N
Definition: createFields.H:9
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Templated surface reaction model class.
virtual scalar calculate(const scalar dt, const label celli, const scalar d, const scalar T, const scalar Tc, const scalar pc, const scalar rhoc, const scalar mass, const scalarField &YGas, const scalarField &YLiquid, const scalarField &YSolid, const scalarField &YMixture, const scalar N, scalarField &dMassGas, scalarField &dMassLiquid, scalarField &dMassSolid, scalarField &dMassSRCarrier) const
Update surface reactions.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Kinetic/diffusion limited rate surface reaction model for coal parcels. Limited to: ...
Namespace for OpenFOAM.