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::SurfaceReactionModel
30 Templated surface reaction model class
33 SurfaceReactionModel.C
34 NewSurfaceReactionModel.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef SurfaceReactionModel_H
39 #define SurfaceReactionModel_H
41 #include "IOdictionary.H"
43 #include "runTimeSelectionTables.H"
45 #include "scalarField.H"
46 #include "scalarList.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 /*---------------------------------------------------------------------------*\
54 Class SurfaceReactionModel Declaration
55 \*---------------------------------------------------------------------------*/
57 template<class CloudType>
58 class SurfaceReactionModel
63 //- The cloud dictionary
64 const dictionary& dict_;
66 // reference to the owner cloud class
69 //- The coefficients dictionary
70 const dictionary coeffDict_;
75 //-Runtime type information
76 TypeName("SurfaceReactionModel");
79 //- Declare runtime constructor selection table
80 declareRunTimeSelectionTable
86 const dictionary& dict,
95 //- Construct from dictionary
98 const dictionary& dict,
106 virtual ~SurfaceReactionModel();
111 static autoPtr<SurfaceReactionModel<CloudType> > New
113 const dictionary& dict,
120 //- Return the owner cloud object
121 const CloudType& owner() const;
123 //- Return the cloud dictionary
124 const dictionary& dict() const;
126 //- Return the coefficients dictionary
127 const dictionary& coeffDict() const;
132 //- Flag to indicate whether model activates devolatisation model
133 virtual bool active() const = 0;
135 //- Update surface reactions
136 virtual void calculate
147 scalarField& YLiquid,
149 scalarField& YMixture,
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 } // End namespace Foam
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 #define makeSurfaceReactionModel(CloudType) \
164 defineNamedTemplateTypeNameAndDebug(SurfaceReactionModel<CloudType>, 0); \
166 defineTemplateRunTimeSelectionTable \
168 SurfaceReactionModel<CloudType>, \
173 #define makeSurfaceReactionModelType(SS, CloudType, ParcelType) \
175 defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
177 SurfaceReactionModel<CloudType<ParcelType> >:: \
178 adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
179 add##SS##CloudType##ParcelType##ConstructorToTable_;
182 #define makeSurfaceReactionModelTypeInstance(SS, CloudType, ParcelType) \
184 defineNamedTemplateTypeNameAndDebug(SS, 0); \
186 SurfaceReactionModel<CloudType<ParcelType> >:: \
187 adddictionaryConstructorToTable<SS> \
188 add##SS##CloudType##ParcelType##ConstructorToTable_;
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 # include "SurfaceReactionModel.C"
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 // ************************************************************************* //