ORourkeCollision.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::ORourkeCollision
26 
27 Description
28  Collision model by P.J. O'Rourke.
29 
30 
31 \*---------------------------------------------------------------------------*/
32 
33 #ifndef ORourkeCollision_H
34 #define ORourkeCollision_H
35 
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 /*---------------------------------------------------------------------------*\
44  Class ORourkeCollision Declaration
45 \*---------------------------------------------------------------------------*/
46 
47 template<class CloudType>
48 class ORourkeCollision
49 :
50  public StochasticCollisionModel<CloudType>
51 {
52 protected:
53 
54  // Protected Data
55 
56  //- Convenience typedef to the cloud's parcel type
57  typedef typename CloudType::parcelType parcelType;
58 
60 
61  //- Coalescence activation switch
63 
64 
65  // Protected Member Functions
66 
67  //- Main collision routine
68  virtual void collide(const scalar dt);
69 
70  //- Collide parcels and return true if mass has changed
71  virtual bool collideParcels
72  (
73  const scalar dt,
74  parcelType& p1,
75  parcelType& p2,
76  scalar& m1,
77  scalar& m2
78  );
79 
80  // 1 is the larger drop and 2 is the smaller
81  virtual bool collideSorted
82  (
83  const scalar dt,
84  parcelType& p1,
85  parcelType& p2,
86  scalar& m1,
87  scalar& m2
88  );
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("ORourke");
95 
96 
97  // Constructors
98 
99  //- Construct from dictionary
101  (
102  const dictionary& dict,
103  CloudType& cloud,
104  const word& modelName = typeName
105  );
106 
107  //- Construct copy
109 
110  //- Construct and return a clone
112  {
114  (
115  new ORourkeCollision<CloudType>(*this)
116  );
117  }
118 
119 
120  //- Destructor
121  virtual ~ORourkeCollision();
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #ifdef NoRepository
132 # include "ORourkeCollision.C"
133 #endif
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
Foam::ORourkeCollision::collide
virtual void collide(const scalar dt)
Main collision routine.
Definition: ORourkeCollision.C:35
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::ORourkeCollision::TypeName
TypeName("ORourke")
Runtime type information.
ORourkeCollision.C
Foam::ORourkeCollision::~ORourkeCollision
virtual ~ORourkeCollision()
Destructor.
Definition: ORourkeCollision.C:297
Foam::ORourkeCollision
Collision model by P.J. O'Rourke.
Definition: ORourkeCollision.H:47
Foam::StochasticCollisionModel
Templated stochastic collision model class.
Definition: KinematicCloud.H:88
Foam::ORourkeCollision::ORourkeCollision
ORourkeCollision(const dictionary &dict, CloudType &cloud, const word &modelName=typeName)
Construct from dictionary.
Definition: ORourkeCollision.C:267
Foam::ORourkeCollision::coalescence_
Switch coalescence_
Coalescence activation switch.
Definition: ORourkeCollision.H:61
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::ORourkeCollision::parcelType
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Definition: ORourkeCollision.H:56
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::cloud
A cloud is a collection of lagrangian particles.
Definition: cloud.H:51
Foam::ORourkeCollision::collideSorted
virtual bool collideSorted(const scalar dt, parcelType &p1, parcelType &p2, scalar &m1, scalar &m2)
Definition: ORourkeCollision.C:147
Foam::liquidMixtureProperties
A mixture of liquids.
Definition: liquidMixtureProperties.H:74
StochasticCollisionModel.H
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
Foam::ORourkeCollision::collideParcels
virtual bool collideParcels(const scalar dt, parcelType &p1, parcelType &p2, scalar &m1, scalar &m2)
Collide parcels and return true if mass has changed.
Definition: ORourkeCollision.C:97
liquidMixtureProperties.H
Foam::ORourkeCollision::liquids_
const liquidMixtureProperties & liquids_
Definition: ORourkeCollision.H:58
Foam::ORourkeCollision::clone
virtual autoPtr< StochasticCollisionModel< CloudType > > clone() const
Construct and return a clone.
Definition: ORourkeCollision.H:110