COxidationIntrinsicRate.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) 2014-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::COxidationIntrinsicRate
29 
30 Group
31  grpLagrangianIntermediateSurfaceReactionSubModels
32 
33 Description
34  Intrinsic char surface reaction mndel
35 
36  C(s) + Sb*O2 -> CO2
37 
38  where Sb is the stoichiometry of the reaction
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef COxidationIntrinsicRate_H
43 #define COxidationIntrinsicRate_H
44 
45 #include "SurfaceReactionModel.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 // Forward class declarations
55 template<class CloudType>
57 
58 /*---------------------------------------------------------------------------*\
59  Class COxidationIntrinsicRate 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  //- Mass diffusion limited rate constant
75  const scalar C1_;
76 
77  //- Mean pore radius [m]
78  const scalar rMean_;
79 
80  //- Char porosity [] = 1 - rho_apparent/rho_true
81  const scalar theta_;
82 
83  //- Pre-exponential factor
84  const scalar Ai_;
85 
86  //- Activation energy
87  const scalar Ei_;
88 
89  //- Char specific internal area [m2/kg]
90  const scalar Ag_;
91 
92  //- Pore tortuosity []; default to sqrt(2)
93  const scalar tau_;
94 
95 
96  // Addressing
97 
98  //- Cs positions in global/local lists
99  label CsLocalId_;
100 
101  //- O2 position in global list
102  label O2GlobalId_;
103 
104  //- CO2 positions in global list
105  label CO2GlobalId_;
106 
107 
108  // Local copies of thermo properties
109 
110  //- Molecular weight of C [kg/kmol]
111  scalar WC_;
112 
113  //- Molecular weight of O2 [kg/kmol]
114  scalar WO2_;
115 
116  //- Formation enthalpy for CO2 [J/kg]
117  scalar HcCO2_;
118 
119 
120 public:
121 
122  //- Runtime type information
123  TypeName("COxidationIntrinsicRate");
124 
125 
126  // Constructors
127 
128  //- Construct from dictionary
130  (
131  const dictionary& dict,
132  CloudType& owner
133  );
134 
135  //- Construct copy
137  (
139  );
140 
141  //- Construct and return a clone
143  {
145  (
147  );
148  }
149 
150 
151  //- Destructor
152  virtual ~COxidationIntrinsicRate() = default;
153 
154 
155  // Member Functions
156 
157  //- Update surface reactions
158  virtual scalar calculate
159  (
160  const scalar dt,
161  const scalar Re,
162  const scalar nu,
163  const label celli,
164  const scalar d,
165  const scalar T,
166  const scalar Tc,
167  const scalar pc,
168  const scalar rhoc,
169  const scalar mass,
170  const scalarField& YGas,
171  const scalarField& YLiquid,
172  const scalarField& YSolid,
173  const scalarField& YMixture,
174  const scalar N,
175  scalarField& dMassGas,
176  scalarField& dMassLiquid,
177  scalarField& dMassSolid,
178  scalarField& dMassSRCarrier
179  ) const;
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace Foam
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #ifdef NoRepository
190  #include "COxidationIntrinsicRate.C"
191 #endif
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
Foam::SurfaceReactionModel
Templated surface reaction model class.
Definition: ReactingMultiphaseCloud.H:61
Foam::COxidationIntrinsicRate
Intrinsic char surface reaction mndel.
Definition: COxidationIntrinsicRate.H:55
Foam::COxidationIntrinsicRate::clone
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
Definition: COxidationIntrinsicRate.H:141
Foam::COxidationIntrinsicRate::TypeName
TypeName("COxidationIntrinsicRate")
Runtime type information.
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
Foam::Field< scalar >
SurfaceReactionModel.H
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::COxidationIntrinsicRate::COxidationIntrinsicRate
COxidationIntrinsicRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Definition: COxidationIntrinsicRate.C:38
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
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::COxidationIntrinsicRate::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: COxidationIntrinsicRate.C:111
Foam::Re
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
COxidationIntrinsicRate.C
N
const Vector< label > N(dict.get< Vector< label >>("N"))
Foam::COxidationIntrinsicRate::~COxidationIntrinsicRate
virtual ~COxidationIntrinsicRate()=default
Destructor.