ConstantRateDevolatilisation.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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::ConstantRateDevolatilisation
28 
29 Group
30  grpLagrangianIntermediateDevolatilisationSubModels
31 
32 Description
33  Constant rate devolatisation model
34  - need to set vapourisation temperature to 600 K
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef ConstantRateDevolatilisation_H
39 #define ConstantRateDevolatilisation_H
40 
41 #include "DevolatilisationModel.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 /*---------------------------------------------------------------------------*\
48  Class ConstantRateDevolatilisation Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class CloudType>
53 :
54  public DevolatilisationModel<CloudType>
55 {
56  // Private data
57 
58  // Model constants
59 
60  //- List of volatile data - (name A0)
61  List<Tuple2<word, scalar>> volatileData_;
62 
63  //- List of initial volatile mass fractions
64  List<scalar> YVolatile0_;
65 
66  //- Mapping between local and cloud gaseous species
67  List<label> volatileToGasMap_;
68 
69  //- Volatile residual coefficient (0-1)
70  // When the fraction of volatiles are depleted below this
71  // threshold, combustion can occur
72  const scalar residualCoeff_;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("constantRateDevolatilisation");
79 
80 
81  // Constructors
82 
83  //- Construct from dictionary
85 
86  //- Construct copy
88  (
90  );
91 
92  //- Construct and return a clone
94  {
96  (
98  );
99  }
100 
101 
102  //- Destructor
104 
105 
106  // Member Functions
107 
108  //- Update model
109  virtual void calculate
110  (
111  const scalar dt,
112  const scalar age,
113  const scalar mass0,
114  const scalar mass,
115  const scalar T,
116  const scalarField& YGasEff,
117  const scalarField& YLiquidEff,
118  const scalarField& YSolidEff,
119  label& canCombust,
120  scalarField& dMassDV
121  ) const;
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #ifdef NoRepository
133 #endif
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
DevolatilisationModel.H
Foam::ConstantRateDevolatilisation::calculate
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.
Definition: ConstantRateDevolatilisation.C:98
Foam::ConstantRateDevolatilisation::clone
virtual autoPtr< DevolatilisationModel< CloudType > > clone() const
Construct and return a clone.
Definition: ConstantRateDevolatilisation.H:92
Foam::Field< scalar >
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::DevolatilisationModel
Templated devolatilisation model class.
Definition: ReactingMultiphaseCloud.H:58
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::ConstantRateDevolatilisation::TypeName
TypeName("constantRateDevolatilisation")
Runtime type information.
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:63
Foam::ConstantRateDevolatilisation
Constant rate devolatisation model.
Definition: ConstantRateDevolatilisation.H:51
ConstantRateDevolatilisation.C
Foam::ConstantRateDevolatilisation::ConstantRateDevolatilisation
ConstantRateDevolatilisation(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Definition: ConstantRateDevolatilisation.C:34
Foam::ConstantRateDevolatilisation::~ConstantRateDevolatilisation
virtual ~ConstantRateDevolatilisation()
Destructor.
Definition: ConstantRateDevolatilisation.C:90