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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::COxidationDiffusionLimitedRate
29
30Group
31 grpLagrangianIntermediateSurfaceReactionSubModels
32
33Description
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
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54// Forward declarations
55template<class CloudType>
56class COxidationDiffusionLimitedRate;
57
58/*---------------------------------------------------------------------------*\
59 Class COxidationDiffusionLimitedRate Declaration
60\*---------------------------------------------------------------------------*/
61
62template<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
102public:
103
104 //- Runtime type information
105 TypeName("COxidationDiffusionLimitedRate");
106
107
108 // Constructors
109
110 //- Construct from dictionary
112 (
113 const dictionary& dict,
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// ************************************************************************* //
Diffusion limited rate surface reaction model for coal parcels. Limited to:
virtual ~COxidationDiffusionLimitedRate()=default
Destructor.
TypeName("COxidationDiffusionLimitedRate")
Runtime type information.
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
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.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Templated surface reaction model class.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
const volScalarField & T
Namespace for OpenFOAM.
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
volScalarField & nu
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73
const Vector< label > N(dict.get< Vector< label > >("N"))