1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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::MassTransferModel
30 Templated mass transfer model class
34 NewMassTransferModel.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef MassTransferModel_H
39 #define MassTransferModel_H
41 #include "IOdictionary.H"
43 #include "runTimeSelectionTables.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class MassTransferModel Declaration
52 \*---------------------------------------------------------------------------*/
54 template<class CloudType>
55 class MassTransferModel
62 //- The cloud dictionary
63 const dictionary& dict_;
65 //- Reference to the owner cloud class
68 //- The coefficient dictionary
69 const dictionary coeffDict_;
74 //- Runtime type information
75 TypeName("MassTransferModel");
77 //- Declare runtime constructor selection table
78 declareRunTimeSelectionTable
84 const dictionary& dict,
93 //- Construct from dictionary
96 const dictionary& dict,
104 virtual ~MassTransferModel();
109 static autoPtr<MassTransferModel<CloudType> > New
111 const dictionary& dict,
118 //- Return the owner cloud object
119 const CloudType& owner() const;
121 //- Return the cloud dictionary
122 const dictionary& dict() const;
124 //- Return the coefficient dictionary
125 const dictionary& coeffDict() const;
130 //- Flag to indicate whether model activates mass transfer model
131 virtual bool active() const = 0;
133 //- Flag to indicate whether model changes particle volume
134 virtual bool changesVolume() const = 0;
137 virtual scalar calculate
142 const scalarField& YMixture0,
143 const scalarField& YMixture,
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 #define makeMassTransferModel(CloudType) \
158 defineNamedTemplateTypeNameAndDebug(MassTransferModel<CloudType>, 0); \
160 defineTemplateRunTimeSelectionTable \
162 MassTransferModel<CloudType>, \
167 #define makeMassTransferModelType(SS, CloudType, ParcelType) \
169 defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
171 MassTransferModel<CloudType<ParcelType> >:: \
172 adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
173 add##SS##CloudType##ParcelType##ConstructorToTable_;
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 # include "MassTransferModel.C"
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 // ************************************************************************* //