COxidationIntrinsicRate.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) 2014-2018 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::COxidationIntrinsicRate
26 
27 Description
28  Intrinsic char surface reaction mndel
29 
30  C(s) + Sb*O2 -> CO2
31 
32  where Sb is the stoichiometry of the reaction
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef COxidationIntrinsicRate_H
37 #define COxidationIntrinsicRate_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 COxidationIntrinsicRate 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  //- Mass diffusion limited rate constant
69  const scalar C1_;
70 
71  //- Mean pore radius [m]
72  const scalar rMean_;
73 
74  //- Char porosity [] = 1 - rho_apparent/rho_true
75  const scalar theta_;
76 
77  //- Pre-exponential factor
78  const scalar Ai_;
79 
80  //- Activation energy
81  const scalar Ei_;
82 
83  //- Char specific internal area [m2/kg]
84  const scalar Ag_;
85 
86  //- Pore tortuosity []; default to sqrt(2)
87  const scalar tau_;
88 
89 
90  // Addressing
91 
92  //- Cs positions in global/local lists
93  label CsLocalId_;
94 
95  //- O2 position in global list
96  label O2GlobalId_;
97 
98  //- CO2 positions in global list
99  label CO2GlobalId_;
100 
101 
102  // Local copies of thermo properties
103 
104  //- Molecular weight of C [kg/kmol]
105  scalar WC_;
106 
107  //- Molecular weight of O2 [kg/kmol]
108  scalar WO2_;
109 
110  //- Formation enthalpy for CO2 [J/kg]
111  scalar HcCO2_;
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("COxidationIntrinsicRate");
118 
119 
120  // Constructors
121 
122  //- Construct from dictionary
124  (
125  const dictionary& dict,
127  );
128 
129  //- Construct copy
131  (
133  );
134 
135  //- Construct and return a clone
137  {
139  (
141  );
142  }
143 
144 
145  //- Destructor
146  virtual ~COxidationIntrinsicRate();
147 
148 
149  // Member Functions
150 
151  //- Update surface reactions
152  virtual scalar calculate
153  (
154  const scalar dt,
155  const label celli,
156  const scalar d,
157  const scalar T,
158  const scalar Tc,
159  const scalar pc,
160  const scalar rhoc,
161  const scalar mass,
162  const scalarField& YGas,
163  const scalarField& YLiquid,
164  const scalarField& YSolid,
165  const scalarField& YMixture,
166  const scalar N,
167  scalarField& dMassGas,
168  scalarField& dMassLiquid,
169  scalarField& dMassSolid,
170  scalarField& dMassSRCarrier
171  ) const;
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #ifdef NoRepository
182  #include "COxidationIntrinsicRate.C"
183 #endif
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
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.
virtual ~COxidationIntrinsicRate()
Destructor.
virtual autoPtr< SurfaceReactionModel< CloudType > > clone() const
Construct and return a clone.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
COxidationIntrinsicRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Intrinsic char surface reaction mndel.
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
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.
Templated surface reaction model class.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
TypeName("COxidationIntrinsicRate")
Runtime type information.
Namespace for OpenFOAM.