TrajectoryCollision.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::TrajectoryCollision
28
29Description
30 Trajectory collision model by N. Nordin, based on O'Rourke's collision
31 model
32
33\*---------------------------------------------------------------------------*/
34
35#ifndef TrajectoryCollision_H
36#define TrajectoryCollision_H
37
38#include "ORourkeCollision.H"
39
40// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42namespace Foam
43{
44/*---------------------------------------------------------------------------*\
45 Class TrajectoryCollision Declaration
46\*---------------------------------------------------------------------------*/
47
48template<class CloudType>
50:
51 public ORourkeCollision<CloudType>
52{
53protected:
54
55 // Protected Data
56
57 //- Convenience typedef to the cloud's parcel type
58 typedef typename CloudType::parcelType parcelType;
59
60 //- Space coefficient
61 scalar cSpace_;
62
63 //- Time coefficient
64 scalar cTime_;
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
87public:
88
89 //- Runtime type information
90 TypeName("trajectory");
91
92
93 // Constructors
94
95 //- Construct from dictionary
97
98 //- Construct copy
100
101 //- Construct and return a clone
103 {
105 (
107 );
108 }
109
110
111 //- Destructor
112 virtual ~TrajectoryCollision();
113};
114
115
116// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117
118} // End namespace Foam
119
120// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122#ifdef NoRepository
123 #include "TrajectoryCollision.C"
124#endif
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128#endif
129
130// ************************************************************************* //
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.
Trajectory collision model by N. Nordin, based on O'Rourke's collision model.
TypeName("trajectory")
Runtime type information.
scalar cSpace_
Space coefficient.
virtual ~TrajectoryCollision()
Destructor.
virtual bool collideParcels(const scalar dt, parcelType &p1, parcelType &p2, scalar &m1, scalar &m2)
Collide parcels and return true if mass has changed.
scalar cTime_
Time coefficient.
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.
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.
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73