All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
COxidationDiffusionLimitedRate.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-2019 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::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 
39 #include "SurfaceReactionModel.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 // Forward class declarations
49 template<class CloudType>
51 
52 /*---------------------------------------------------------------------------*\
53  Class COxidationDiffusionLimitedRate Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class CloudType>
58 :
59  public SurfaceReactionModel<CloudType>
60 {
61  // Private Data
62 
63  // Model constants
64 
65  //- Stoichiometry of reaction
66  const scalar Sb_;
67 
68  //- Diffusion coefficient of oxidants [m^2/s]
69  const scalar D_;
70 
71 
72  // Addressing
73 
74  //- Cs positions in global/local lists
75  label CsLocalId_;
76 
77  //- O2 position in global list
78  label O2GlobalId_;
79 
80  //- CO2 positions in global list
81  label CO2GlobalId_;
82 
83 
84  // Local copies of thermo properties
85 
86  //- Molecular weight of C [kg/kmol]
87  scalar WC_;
88 
89  //- Molecular weight of O2 [kg/kmol]
90  scalar WO2_;
91 
92  //- Formation enthalpy for CO2 [J/kg]
93  scalar HcCO2_;
94 
95 
96 public:
97 
98  //- Runtime type information
99  TypeName("COxidationDiffusionLimitedRate");
100 
101 
102  // Constructors
103 
104  //- Construct from dictionary
106  (
107  const dictionary& dict,
109  );
110 
111  //- Construct copy
113  (
115  );
116 
117  //- Construct and return a clone
119  {
121  (
123  );
124  }
125 
126 
127  //- Destructor
129 
130 
131  // Member Functions
132 
133  //- Update surface reactions
134  virtual scalar calculate
135  (
136  const scalar dt,
137  const label celli,
138  const scalar d,
139  const scalar T,
140  const scalar Tc,
141  const scalar pc,
142  const scalar rhoc,
143  const scalar mass,
144  const scalarField& YGas,
145  const scalarField& YLiquid,
146  const scalarField& YSolid,
147  const scalarField& YMixture,
148  const scalar N,
149  scalarField& dMassGas,
150  scalarField& dMassLiquid,
151  scalarField& dMassSolid,
152  scalarField& dMassSRCarrier
153  ) const;
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #ifdef NoRepository
165 #endif
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
TypeName("COxidationDiffusionLimitedRate")
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
COxidationDiffusionLimitedRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
Diffusion limited rate surface reaction model for coal parcels. Limited to:
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.
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.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label N
Definition: createFields.H:22
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.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
Namespace for OpenFOAM.