COxidationKineticDiffusionLimitedRate.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::COxidationKineticDiffusionLimitedRate
29 
30 Group
31  grpLagrangianIntermediateSurfaceReactionSubModels
32 
33 Description
34  Kinetic/diffusion limited rate surface reaction model for coal parcels.
35  Limited to:
36 
37  C(s) + Sb*O2 -> CO2
38 
39  where Sb is the stoichiometry of the reaction
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef COxidationKineticDiffusionLimitedRate_H
44 #define COxidationKineticDiffusionLimitedRate_H
45 
46 #include "SurfaceReactionModel.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // Forward class declarations
54 template<class CloudType>
56 
57 /*---------------------------------------------------------------------------*\
58  Class COxidationKineticDiffusionLimitedRate Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 template<class CloudType>
63 :
64  public SurfaceReactionModel<CloudType>
65 {
66  // Private data
67 
68  // Model constants
69 
70  //- Stoichiometry of reaction
71  const scalar Sb_;
72 
73  //- Mass diffusion limited rate constant, C1
74  const scalar C1_;
75 
76  //- Kinetics limited rate pre-exponential constant, C2
77  const scalar C2_;
78 
79  //- Kinetics limited rate activation energy
80  const scalar E_;
81 
82 
83  // Addressing
84 
85  //- Cs positions in global/local lists
86  label CsLocalId_;
87 
88  //- O2 position in global list
89  label O2GlobalId_;
90 
91  //- CO2 positions in global list
92  label CO2GlobalId_;
93 
94 
95  // Local copies of thermo properties
96 
97  //- Molecular weight of C [kg/kmol]
98  scalar WC_;
99 
100  //- Molecular weight of O2 [kg/kmol]
101  scalar WO2_;
102 
103  //- Formation enthalpy for CO2 [J/kg]
104  scalar HcCO2_;
105 
106 
107 public:
108 
109  //- Runtime type information
110  TypeName("COxidationKineticDiffusionLimitedRate");
111 
112 
113  // Constructors
114 
115  //- Construct from dictionary
117  (
118  const dictionary& dict,
119  CloudType& owner
120  );
121 
122  //- Construct copy
124  (
126  );
127 
128  //- Construct and return a clone
130  {
132  (
134  );
135  }
136 
137 
138  //- Destructor
139  virtual ~COxidationKineticDiffusionLimitedRate() = default;
140 
141 
142  // Member Functions
143 
144  //- Update surface reactions
145  virtual scalar calculate
146  (
147  const scalar dt,
148  const scalar Re,
149  const scalar nu,
150  const label celli,
151  const scalar d,
152  const scalar T,
153  const scalar Tc,
154  const scalar pc,
155  const scalar rhoc,
156  const scalar mass,
157  const scalarField& YGas,
158  const scalarField& YLiquid,
159  const scalarField& YSolid,
160  const scalarField& YMixture,
161  const scalar N,
162  scalarField& dMassGas,
163  scalarField& dMassLiquid,
164  scalarField& dMassSolid,
165  scalarField& dMassSRCarrier
166  ) const;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #ifdef NoRepository
178 #endif
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
Foam::SurfaceReactionModel
Templated surface reaction model class.
Definition: ReactingMultiphaseCloud.H:61
COxidationKineticDiffusionLimitedRate.C
Foam::COxidationKineticDiffusionLimitedRate
Kinetic/diffusion limited rate surface reaction model for coal parcels. Limited to:
Definition: COxidationKineticDiffusionLimitedRate.H:54
Foam::COxidationKineticDiffusionLimitedRate::clone
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
Definition: COxidationKineticDiffusionLimitedRate.H:128
Foam::COxidationKineticDiffusionLimitedRate::calculate
virtual scalar calculate(const scalar dt, const scalar Re, const scalar nu, 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.
Definition: COxidationKineticDiffusionLimitedRate.C:96
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
Foam::COxidationKineticDiffusionLimitedRate::COxidationKineticDiffusionLimitedRate
COxidationKineticDiffusionLimitedRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Definition: COxidationKineticDiffusionLimitedRate.C:37
Foam::Field< scalar >
SurfaceReactionModel.H
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
Foam::COxidationKineticDiffusionLimitedRate::~COxidationKineticDiffusionLimitedRate
virtual ~COxidationKineticDiffusionLimitedRate()=default
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::Re
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
Foam::COxidationKineticDiffusionLimitedRate::TypeName
TypeName("COxidationKineticDiffusionLimitedRate")
Runtime type information.
N
const Vector< label > N(dict.get< Vector< label >>("N"))