All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConstantRateDevolatilisation.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) 2011-2019 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::ConstantRateDevolatilisation
26 
27 Description
28  Constant rate devolatisation model
29  - need to set vapourisation temperature to 600 K
30 
31 \*---------------------------------------------------------------------------*/
32 
33 #ifndef ConstantRateDevolatilisation_H
34 #define ConstantRateDevolatilisation_H
35 
36 #include "DevolatilisationModel.H"
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 namespace Foam
41 {
42 /*---------------------------------------------------------------------------*\
43  Class ConstantRateDevolatilisation Declaration
44 \*---------------------------------------------------------------------------*/
45 
46 template<class CloudType>
48 :
49  public DevolatilisationModel<CloudType>
50 {
51  // Private Data
52 
53  // Model constants
54 
55  //- List of volatile data - (name A0)
56  List<Tuple2<word, scalar>> volatileData_;
57 
58  //- List of initial volatile mass fractions
59  List<scalar> YVolatile0_;
60 
61  //- Mapping between local and cloud gaseous species
62  List<label> volatileToGasMap_;
63 
64  //- Volatile residual coefficient (0-1)
65  // When the fraction of volatiles are depleted below this
66  // threshold, combustion can occur
67  const scalar residualCoeff_;
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("constantRateDevolatilisation");
74 
75 
76  // Constructors
77 
78  //- Construct from dictionary
80 
81  //- Construct copy
83  (
85  );
86 
87  //- Construct and return a clone
89  {
91  (
93  );
94  }
95 
96 
97  //- Destructor
99 
100 
101  // Member Functions
102 
103  //- Update model
104  virtual void calculate
105  (
106  const scalar dt,
107  const scalar age,
108  const scalar mass0,
109  const scalar mass,
110  const scalar T,
111  const scalarField& YGasEff,
112  const scalarField& YLiquidEff,
113  const scalarField& YSolidEff,
114  label& canCombust,
115  scalarField& dMassDV
116  ) const;
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #ifdef NoRepository
128 #endif
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
virtual void calculate(const scalar dt, const scalar age, const scalar mass0, const scalar mass, const scalar T, const scalarField &YGasEff, const scalarField &YLiquidEff, const scalarField &YSolidEff, label &canCombust, scalarField &dMassDV) const
Update model.
TypeName("constantRateDevolatilisation")
Runtime type information.
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:158
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
ConstantRateDevolatilisation(const dictionary &dict, CloudType &owner)
Construct from dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
Constant rate devolatisation model.
const CloudType & owner() const
Return const access to the owner cloud.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual autoPtr< DevolatilisationModel< CloudType > > clone() const
Construct and return a clone.
Templated devolatilisation model class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
Namespace for OpenFOAM.