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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::ORourkeCollision
28
29Description
30 Collision model by P.J. O'Rourke.
31
32
33\*---------------------------------------------------------------------------*/
34
35#ifndef ORourkeCollision_H
36#define ORourkeCollision_H
37
40
41// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43namespace Foam
44{
45/*---------------------------------------------------------------------------*\
46 Class ORourkeCollision Declaration
47\*---------------------------------------------------------------------------*/
48
49template<class CloudType>
51:
52 public StochasticCollisionModel<CloudType>
53{
54protected:
55
56 // Protected Data
57
58 //- Convenience typedef to the cloud's parcel type
59 typedef typename CloudType::parcelType parcelType;
62
63 //- Coalescence activated?
64 bool coalescence_;
65
66
67 // Protected Member Functions
68
69 //- Main collision routine
70 virtual void collide
71 (
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
97public:
98
99 //- Runtime type information
100 TypeName("ORourke");
101
102
103 // Constructors
104
105 //- Construct from dictionary
107 (
108 const dictionary& dict,
110 const word& modelName = typeName
111 );
112
113 //- Construct copy
115
116 //- Construct and return a clone
118 {
120 (
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// ************************************************************************* //
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Collision model by P.J. O'Rourke.
virtual bool collideParcels(const scalar dt, parcelType &p1, parcelType &p2, scalar &m1, scalar &m2)
Collide parcels and return true if mass has changed.
bool coalescence_
Coalescence activated?
virtual bool collideSorted(const scalar dt, parcelType &p1, parcelType &p2, scalar &m1, scalar &m2)
TypeName("ORourke")
Runtime type information.
const liquidMixtureProperties & liquids_
virtual void collide(typename CloudType::parcelType::trackingData &td, const scalar dt)
Main collision routine.
virtual autoPtr< StochasticCollisionModel< CloudType > > clone() const
Construct and return a clone.
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
virtual ~ORourkeCollision()
Destructor.
Templated stochastic collision model class.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:60
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Class used to pass data into container.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:107
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73