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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2018-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::COxidationDiffusionLimitedRate
29 
30 Group
31  grpLagrangianIntermediateSurfaceReactionSubModels
32 
33 Description
34  Diffusion limited rate surface reaction model for coal parcels. Limited to:
35 
36  C(s) + Sb*O2 -> CO2
37 
38  where Sb is the stoichiometry of the reaction
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef COxidationDiffusionLimitedRate_H
43 #define COxidationDiffusionLimitedRate_H
44 
45 #include "SurfaceReactionModel.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 // Forward declarations
55 template<class CloudType>
57 
58 /*---------------------------------------------------------------------------*\
59  Class COxidationDiffusionLimitedRate Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class CloudType>
64 :
65  public SurfaceReactionModel<CloudType>
66 {
67  // Private data
68 
69  // Model constants
70 
71  //- Stoichiometry of reaction
72  const scalar Sb_;
73 
74  //- Diffusion coefficient of oxidants [m2/s]
75  const scalar D_;
76 
77 
78  // Addressing
79 
80  //- Cs positions in global/local lists
81  label CsLocalId_;
82 
83  //- O2 position in global list
84  label O2GlobalId_;
85 
86  //- CO2 positions in global list
87  label CO2GlobalId_;
88 
89 
90  // Local copies of thermo properties
91 
92  //- Molecular weight of C [kg/kmol]
93  scalar WC_;
94 
95  //- Molecular weight of O2 [kg/kmol]
96  scalar WO2_;
97 
98  //- Formation enthalpy for CO2 [J/kg]
99  scalar HcCO2_;
100 
101 
102 public:
103 
104  //- Runtime type information
105  TypeName("COxidationDiffusionLimitedRate");
106 
107 
108  // Constructors
109 
110  //- Construct from dictionary
112  (
113  const dictionary& dict,
114  CloudType& owner
115  );
116 
117  //- Construct copy
119  (
121  );
122 
123  //- Construct and return a clone
125  {
127  (
129  );
130  }
131 
132 
133  //- Destructor
134  virtual ~COxidationDiffusionLimitedRate() = default;
135 
136 
137  // Member Functions
138 
139  //- Update surface reactions
140  virtual scalar calculate
141  (
142  const scalar dt,
143  const scalar Re,
144  const scalar nu,
145  const label celli,
146  const scalar d,
147  const scalar T,
148  const scalar Tc,
149  const scalar pc,
150  const scalar rhoc,
151  const scalar mass,
152  const scalarField& YGas,
153  const scalarField& YLiquid,
154  const scalarField& YSolid,
155  const scalarField& YMixture,
156  const scalar N,
157  scalarField& dMassGas,
158  scalarField& dMassLiquid,
159  scalarField& dMassSolid,
160  scalarField& dMassSRCarrier
161  ) const;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #ifdef NoRepository
173 #endif
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
Foam::SurfaceReactionModel
Templated surface reaction model class.
Definition: ReactingMultiphaseCloud.H:61
Foam::COxidationDiffusionLimitedRate::COxidationDiffusionLimitedRate
COxidationDiffusionLimitedRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Definition: COxidationDiffusionLimitedRate.C:38
Foam::COxidationDiffusionLimitedRate::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: COxidationDiffusionLimitedRate.C:99
Foam::COxidationDiffusionLimitedRate::clone
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
Definition: COxidationDiffusionLimitedRate.H:123
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
COxidationDiffusionLimitedRate.C
Foam::Field< scalar >
SurfaceReactionModel.H
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::COxidationDiffusionLimitedRate::TypeName
TypeName("COxidationDiffusionLimitedRate")
Runtime type information.
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
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::COxidationDiffusionLimitedRate
Diffusion limited rate surface reaction model for coal parcels. Limited to:
Definition: COxidationDiffusionLimitedRate.H:55
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::COxidationDiffusionLimitedRate::~COxidationDiffusionLimitedRate
virtual ~COxidationDiffusionLimitedRate()=default
Destructor.
Foam::Re
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
N
const Vector< label > N(dict.get< Vector< label >>("N"))