1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-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::HeatTransferModel
29 Templated heat transfer model class
33 NewHeatTransferModel.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef HeatTransferModel_H
38 #define HeatTransferModel_H
40 #include "IOdictionary.H"
42 #include "runTimeSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class HeatTransferModel Declaration
51 \*---------------------------------------------------------------------------*/
53 template<class CloudType>
54 class HeatTransferModel
58 //- The cloud dictionary
59 const dictionary& dict_;
61 //- Reference to the owner cloud class
64 //- The coefficients dictionary
65 const dictionary coeffDict_;
70 //- Runtime type information
71 TypeName("HeatTransferModel");
73 //- Declare runtime constructor selection table
74 declareRunTimeSelectionTable
80 const dictionary& dict,
89 //- Construct null from owner
90 HeatTransferModel(CloudType& owner);
92 //- Construct from dictionary
95 const dictionary& dict,
102 virtual ~HeatTransferModel();
106 static autoPtr<HeatTransferModel<CloudType> > New
108 const dictionary& dict,
115 //- Return the cloud dictionary
116 const dictionary& dict() const;
118 //- Return the coefficients dictionary
119 const dictionary& coeffDict() const;
121 //- Return the owner cloud object
122 const CloudType& owner() const;
127 //- Flag to indicate whether model activates heat transfer model
128 virtual bool active() const = 0;
138 virtual scalar Pr() const = 0;
140 //- Return heat transfer coefficient
152 //- Return linearised coefficient for temperature equation
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 } // End namespace Foam
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 #define makeHeatTransferModel(CloudType) \
174 defineNamedTemplateTypeNameAndDebug(HeatTransferModel<CloudType>, 0); \
176 defineTemplateRunTimeSelectionTable \
178 HeatTransferModel<CloudType>, \
183 #define makeHeatTransferModelType(SS, CloudType, ParcelType) \
185 defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
187 HeatTransferModel<CloudType<ParcelType> >:: \
188 adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
189 add##SS##CloudType##ParcelType##ConstructorToTable_;
192 #define makeHeatTransferModelThermoType(SS, CloudType, ParcelType, ThermoType)\
194 defineNamedTemplateTypeNameAndDebug \
196 SS<CloudType<ParcelType<ThermoType> > >, \
200 HeatTransferModel<CloudType<ParcelType<ThermoType> > >:: \
201 adddictionaryConstructorToTable \
202 <SS<CloudType<ParcelType<ThermoType> > > > \
203 add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_;
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 # include "HeatTransferModel.C"
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 // ************************************************************************* //