1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2009-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::PhaseChangeModel
29 Templated phase change model class
35 \*---------------------------------------------------------------------------*/
37 #ifndef PhaseChangeModel_H
38 #define PhaseChangeModel_H
40 #include "IOdictionary.H"
42 #include "runTimeSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class PhaseChangeModel Declaration
51 \*---------------------------------------------------------------------------*/
53 template<class CloudType>
54 class PhaseChangeModel
60 //- The cloud dictionary
61 const dictionary& dict_;
63 //- Reference to the owner cloud class
66 //- The coefficient dictionary
67 const dictionary coeffDict_;
70 // Protected member functions
78 //- Runtime type information
79 TypeName("PhaseChangeModel");
81 //- Declare runtime constructor selection table
82 declareRunTimeSelectionTable
88 const dictionary& dict,
97 //- Construct null from owner
98 PhaseChangeModel(CloudType& owner);
100 //- Construct from dictionary
103 const dictionary& dict,
110 virtual ~PhaseChangeModel();
114 static autoPtr<PhaseChangeModel<CloudType> > New
116 const dictionary& dict,
123 //- Return the owner cloud object
124 const CloudType& owner() const;
126 //- Return the cloud dictionary
127 const dictionary& dict() const;
129 //- Return the coefficient dictionary
130 const dictionary& coeffDict() const;
135 //- Flag to indicate whether model activates phase change model
136 virtual bool active() const = 0;
139 virtual void calculate
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 #define makePhaseChangeModel(CloudType) \
162 defineNamedTemplateTypeNameAndDebug(PhaseChangeModel<CloudType>, 0); \
164 defineTemplateRunTimeSelectionTable \
166 PhaseChangeModel<CloudType>, \
171 #define makePhaseChangeModelThermoType(SS, CloudType, ParcelType, ThermoType) \
173 defineNamedTemplateTypeNameAndDebug \
175 SS<CloudType<ParcelType<ThermoType> > >, \
179 PhaseChangeModel<CloudType<ParcelType<ThermoType> > >:: \
180 adddictionaryConstructorToTable \
181 <SS<CloudType<ParcelType<ThermoType> > > > \
182 add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_;
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 # include "PhaseChangeModel.C"
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 // ************************************************************************* //