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-2021 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 typename CloudType::parcelType& p,
107  const typename CloudType::parcelType::trackingData& td,
108  const scalar dt,
109  const scalar mass0,
110  const scalar mass,
111  const scalar T,
112  const scalarField& YGasEff,
113  const scalarField& YLiquidEff,
114  const scalarField& YSolidEff,
115  label& canCombust,
116  scalarField& dMassDV
117  ) const;
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #ifdef NoRepository
129 #endif
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
TypeName("constantRateDevolatilisation")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
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.
virtual void calculate(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, 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.
const CloudType & owner() const
Return const access to the owner cloud.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:221
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
volScalarField & p
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Namespace for OpenFOAM.