TrajectoryCollision.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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
69  (
70  typename CloudType::parcelType::trackingData& td,
71  const scalar dt
72  );
73 
74  //- Collide parcels and return true if mass has changed
75  virtual bool collideParcels
76  (
77  const scalar dt,
78  parcelType& p1,
79  parcelType& p2,
80  scalar& m1,
81  scalar& m2
82  );
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("trajectory");
89 
90 
91  // Constructors
92 
93  //- Construct from dictionary
95 
96  //- Construct copy
98 
99  //- Construct and return a clone
101  {
103  (
105  );
106  }
107 
108 
109  //- Destructor
110  virtual ~TrajectoryCollision();
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #ifdef NoRepository
121  #include "TrajectoryCollision.C"
122 #endif
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
virtual ~TrajectoryCollision()
Destructor.
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.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
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:218
Trajectory collision model by N. Nordin, based on O&#39;Rourke&#39;s collision model.
Collision model by P.J. O&#39;Rourke.
virtual autoPtr< StochasticCollisionModel< CloudType > > clone() const
Construct and return a clone.
virtual void collide(typename CloudType::parcelType::trackingData &td, 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:52
scalar cTime_
Time coefficient.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
TrajectoryCollision(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
Namespace for OpenFOAM.