1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::DevolatilisationModel
29 Templated devolatilisation model class
32 DevolatilisationModel.C
33 NewDevolatilisationModel.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef DevolatilisationModel_H
38 #define DevolatilisationModel_H
40 #include "IOdictionary.H"
42 #include "runTimeSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class DevolatilisationModel Declaration
51 \*---------------------------------------------------------------------------*/
53 template<class CloudType>
54 class DevolatilisationModel
60 //- The cloud dictionary
61 const dictionary& dict_;
63 //- Reference to the owner cloud class
66 //- The coefficient dictionary
67 const dictionary coeffDict_;
72 //- Runtime type information
73 TypeName("DevolatilisationModel");
75 //- Declare runtime constructor selection table
76 declareRunTimeSelectionTable
79 DevolatilisationModel,
82 const dictionary& dict,
91 //- Construct null from owner
92 DevolatilisationModel(CloudType& owner);
94 //- Construct from dictionary
97 const dictionary& dict,
104 virtual ~DevolatilisationModel();
108 static autoPtr<DevolatilisationModel<CloudType> > New
110 const dictionary& dict,
117 //- Return the owner cloud object
118 const CloudType& owner() const;
120 //- Return the cloud dictionary
121 const dictionary& dict() const;
123 //- Return the coefficient dictionary
124 const dictionary& coeffDict() const;
129 //- Flag to indicate whether model activates devolatilisation model
130 virtual bool active() const = 0;
133 virtual scalar calculate
139 const scalar YVolatile0,
140 const scalar YVolatile,
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #define makeDevolatilisationModel(CloudType) \
154 defineNamedTemplateTypeNameAndDebug(DevolatilisationModel<CloudType>, 0); \
156 defineTemplateRunTimeSelectionTable \
158 DevolatilisationModel<CloudType>, \
163 #define makeDevolatilisationModelThermoType(SS, CloudType, ParcelType, ThermoType)\
165 defineNamedTemplateTypeNameAndDebug \
167 SS<CloudType<ParcelType<ThermoType> > >, \
171 DevolatilisationModel<CloudType<ParcelType<ThermoType> > >:: \
172 adddictionaryConstructorToTable \
173 <SS<CloudType<ParcelType<ThermoType> > > > \
174 add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_;
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 # include "DevolatilisationModel.C"
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 // ************************************************************************* //