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 | Copyright (C) 2011-2016 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::TrajectoryCollision
26 
27 Description
28  Trajectory collision model by N. Nordin, based on O'Rourke's collision
29  model
30 
31 \*---------------------------------------------------------------------------*/
32 
33 #ifndef TrajectoryCollision_H
34 #define TrajectoryCollision_H
35 
36 #include "ORourkeCollision.H"
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 namespace Foam
41 {
42 /*---------------------------------------------------------------------------*\
43  Class TrajectoryCollision Declaration
44 \*---------------------------------------------------------------------------*/
45 
46 template<class CloudType>
48 :
49  public ORourkeCollision<CloudType>
50 {
51 protected:
52 
53  // Protected Data
54 
55  //- Convenience typedef to the cloud's parcel type
56  typedef typename CloudType::parcelType parcelType;
57 
58  //- Space coefficient
59  scalar cSpace_;
60 
61  //- Time coefficient
62  scalar cTime_;
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 
81 public:
82 
83  //- Runtime type information
84  TypeName("trajectory");
85 
86 
87  // Constructors
88 
89  //- Construct from dictionary
91 
92  //- Construct copy
94 
95  //- Construct and return a clone
97  {
99  (
101  );
102  }
103 
104 
105  //- Destructor
106  virtual ~TrajectoryCollision();
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #ifdef NoRepository
117  #include "TrajectoryCollision.C"
118 #endif
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
virtual ~TrajectoryCollision()
Destructor.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
scalar cSpace_
Space coefficient.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName("trajectory")
Runtime type information.
A cloud is a collection of lagrangian particles.
Definition: cloud.H:51
virtual bool collideParcels(const scalar dt, parcelType &p1, parcelType &p2, scalar &m1, scalar &m2)
Collide parcels and return true if mass has changed.
CloudType::parcelType parcelType
Convenience typedef to the cloud&#39;s parcel type.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
Trajectory collision model by N. Nordin, based on O&#39;Rourke&#39;s collision model.
Collision model by P.J. O&#39;Rourke.
virtual void collide(const scalar dt)
Main collision routine.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
virtual autoPtr< StochasticCollisionModel< CloudType > > clone() const
Construct and return a clone.
scalar cTime_
Time coefficient.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
TrajectoryCollision(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
Namespace for OpenFOAM.