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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::ORourkeCollision
28 
29 Description
30  Collision model by P.J. O'Rourke.
31 
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef ORourkeCollision_H
36 #define ORourkeCollision_H
37 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 /*---------------------------------------------------------------------------*\
46  Class ORourkeCollision Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class CloudType>
50 class ORourkeCollision
51 :
52  public StochasticCollisionModel<CloudType>
53 {
54 protected:
55 
56  // Protected Data
57 
58  //- Convenience typedef to the cloud's parcel type
59  typedef typename CloudType::parcelType parcelType;
60 
62 
63  //- Coalescence activated?
64  bool coalescence_;
65 
66 
67  // Protected Member Functions
68 
69  //- Main collision routine
70  virtual void collide
71  (
72  typename CloudType::parcelType::trackingData& td,
73  const scalar dt
74  );
75 
76  //- Collide parcels and return true if mass has changed
77  virtual bool collideParcels
78  (
79  const scalar dt,
80  parcelType& p1,
81  parcelType& p2,
82  scalar& m1,
83  scalar& m2
84  );
85 
86  // 1 is the larger drop and 2 is the smaller
87  virtual bool collideSorted
88  (
89  const scalar dt,
90  parcelType& p1,
91  parcelType& p2,
92  scalar& m1,
93  scalar& m2
94  );
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("ORourke");
101 
102 
103  // Constructors
104 
105  //- Construct from dictionary
107  (
108  const dictionary& dict,
109  CloudType& cloud,
110  const word& modelName = typeName
111  );
112 
113  //- Construct copy
115 
116  //- Construct and return a clone
118  {
120  (
121  new ORourkeCollision<CloudType>(*this)
122  );
123  }
124 
125 
126  //- Destructor
127  virtual ~ORourkeCollision();
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #ifdef NoRepository
138  #include "ORourkeCollision.C"
139 #endif
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::ORourkeCollision::TypeName
TypeName("ORourke")
Runtime type information.
ORourkeCollision.C
Foam::ORourkeCollision::~ORourkeCollision
virtual ~ORourkeCollision()
Destructor.
Definition: ORourkeCollision.C:326
Foam::ORourkeCollision
Collision model by P.J. O'Rourke.
Definition: ORourkeCollision.H:49
Foam::StochasticCollisionModel
Templated stochastic collision model class.
Definition: KinematicCloud.H:95
Foam::ORourkeCollision::ORourkeCollision
ORourkeCollision(const dictionary &dict, CloudType &cloud, const word &modelName=typeName)
Construct from dictionary.
Definition: ORourkeCollision.C:293
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::ORourkeCollision::parcelType
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Definition: ORourkeCollision.H:58
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::cloud
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:57
Foam::ORourkeCollision::collideSorted
virtual bool collideSorted(const scalar dt, parcelType &p1, parcelType &p2, scalar &m1, scalar &m2)
Definition: ORourkeCollision.C:171
Foam::liquidMixtureProperties
A mixture of liquids.
Definition: liquidMixtureProperties.H:68
StochasticCollisionModel.H
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
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:126
Foam::ORourkeCollision::collide
virtual void collide(typename CloudType::parcelType::trackingData &td, const scalar dt)
Main collision routine.
Definition: ORourkeCollision.C:40
liquidMixtureProperties.H
Foam::ORourkeCollision::liquids_
const liquidMixtureProperties & liquids_
Definition: ORourkeCollision.H:60
Foam::ORourkeCollision::clone
virtual autoPtr< StochasticCollisionModel< CloudType > > clone() const
Construct and return a clone.
Definition: ORourkeCollision.H:116
Foam::ORourkeCollision::coalescence_
bool coalescence_
Coalescence activated?
Definition: ORourkeCollision.H:63