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::BinaryCollisionModel
29 Templated DSMC particle collision class
32 BinaryCollisionModel.C
33 NewBinaryCollisionModel.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef BinaryCollisionModel_H
38 #define BinaryCollisionModel_H
40 #include "IOdictionary.H"
42 #include "runTimeSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class BinaryCollisionModel Declaration
51 \*---------------------------------------------------------------------------*/
53 template<class CloudType>
54 class BinaryCollisionModel
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("BinaryCollisionModel");
73 //- Declare runtime constructor selection table
74 declareRunTimeSelectionTable
80 const dictionary& dict,
89 //- Construct from components
92 const dictionary& dict,
99 virtual ~BinaryCollisionModel();
103 static autoPtr<BinaryCollisionModel<CloudType> > New
105 const dictionary& dict,
112 //- Return the owner cloud object
113 const CloudType& owner() const;
115 //- Return non-const access to the owner cloud object
118 //- Return the dictionary
119 const dictionary& dict() const;
121 //- Return the coefficients dictionary
122 const dictionary& coeffDict() const;
127 //- Return the collision cross section * relative velocity product
128 virtual scalar sigmaTcR
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 #define makeBinaryCollisionModel(CloudType) \
157 defineNamedTemplateTypeNameAndDebug \
159 BinaryCollisionModel<CloudType>, \
163 defineTemplateRunTimeSelectionTable \
165 BinaryCollisionModel<CloudType>, \
170 #define makeBinaryCollisionModelType(SS, CloudType, ParcelType) \
172 defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
174 BinaryCollisionModel<CloudType<ParcelType> >:: \
175 adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
176 add##SS##CloudType##ParcelType##ConstructorToTable_;
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 # include "BinaryCollisionModel.C"
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 // ************************************************************************* //