PairSpringSliderDashpot.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-2020 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::PairSpringSliderDashpot
26 
27 Description
28  Pair forces between particles colliding with a spring, slider, damper model
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef PairSpringSliderDashpot_H
33 #define PairSpringSliderDashpot_H
34 
35 #include "PairModel.H"
36 #include "CollisionRecordList.H"
37 #include "mathematicalConstants.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 /*---------------------------------------------------------------------------*\
44  Class PairSpringSliderDashpot Declaration
45 \*---------------------------------------------------------------------------*/
46 
47 template<class CloudType>
49 :
50  public PairModel<CloudType>
51 {
52  // Private Data
53 
54  //- Effective Young's modulus value, assuming both particles have
55  // the same E value
56  scalar Estar_;
57 
58  //- Effective shear modulus value, assuming both particles have
59  // the same Poisson's ratio and Young's modulus
60  scalar Gstar_;
61 
62  //- alpha-coefficient, related to coefficient of restitution
63  scalar alpha_;
64 
65  //- Spring power (b = 1 for linear, b = 3/2 for Hertzian)
66  scalar b_;
67 
68  //- Coefficient of friction in for tangential sliding
69  scalar mu_;
70 
71  //- Cohesion energy density [J/m^3]
72  scalar cohesionEnergyDensity_;
73 
74  // Switch cohesion on and off
75  bool cohesion_;
76 
77  //- The number of steps over which to resolve the minimum
78  // harmonic approximation of the collision period
79  scalar collisionResolutionSteps_;
80 
81  //- Volume factor for determining the equivalent size of a
82  // parcel where nParticles is not 1. The equivalent size of
83  // the parcel is
84  // parcelEquivVolume = volumeFactor*nParticles*p.volume()
85  // so
86  // parcelEquivD = cbrt(volumeFactor*nParticles)*p.d()
87  // + When volumeFactor = 1, the particles are compressed
88  // together so that the equivalent volume of the parcel is
89  // the sum of the constitutent particles
90  // + When volumeFactor = 3*sqrt(2)/pi, the particles are
91  // close packed, but uncompressed.
92  // + When volumeFactor > 3*sqrt(2)/pi, the particles loosely
93  // grouped.
94  // 3*sqrt(2)/pi = 1.350474 is the volume factor for close
95  // packing, i.e pi/(3*sqrt(2)) is the maximum close packing
96  // factor
97  scalar volumeFactor_;
98 
99  //- Switch to control use of equivalent size particles. Used
100  // because the calculation can be very expensive.
101  bool useEquivalentSize_;
102 
103 
104  // Private Member Functions
105 
106  //- Find the appropriate properties for determining the minimum
107  //- Allowable timestep
108  void findMinMaxProperties
109  (
110  scalar& RMin,
111  scalar& rhoMax,
112  scalar& vMagMax
113  ) const;
114 
115 public:
116 
117  //- Runtime type information
118  TypeName("pairSpringSliderDashpot");
119 
120 
121  // Constructors
122 
123  //- Construct from dictionary
125 
126 
127  //- Destructor
128  virtual ~PairSpringSliderDashpot();
129 
130 
131  // Member Functions
132 
133  //- Return the volumeFactor
134  inline scalar volumeFactor() const
135  {
136  return volumeFactor_;
137  }
138 
139  // Return the area of overlap between two spheres of radii rA and rB,
140  // centres separated by a distance rAB. Assumes rAB < (rA + rB).
141  inline scalar overlapArea(scalar rA, scalar rB, scalar rAB) const
142  {
143  // Reference:
144  // http://mathworld.wolfram.com/Sphere-SphereIntersection.html
145  return
146  mathematical::pi/4.0
147  /sqr(rAB)
148  *(
149  (-rAB + rA - rB)
150  *(-rAB - rA + rB)
151  *(-rAB + rA + rB)
152  *( rAB + rA + rB)
153  );
154  }
155 
156  //- Whether the PairModel has a timestep limit that will
157  // require subCycling
158  virtual bool controlsTimestep() const;
159 
160  //- For PairModels that control the timestep, calculate the
161  // number of subCycles needed to satisfy the minimum
162  // allowable timestep
163  virtual label nSubCycles() const;
164 
165  //- Calculate the pair interaction between parcels
166  virtual void evaluatePair
167  (
168  typename CloudType::parcelType& pA,
169  typename CloudType::parcelType& pB
170  ) const;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #ifdef NoRepository
181  #include "PairSpringSliderDashpot.C"
182 #endif
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #endif
187 
188 // ************************************************************************* //
const dictionary & dict() const
Return the dictionary.
Definition: PairModel.C:62
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
scalar overlapArea(scalar rA, scalar rB, scalar rAB) const
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Pair forces between particles colliding with a spring, slider, damper model.
PairSpringSliderDashpot(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
TypeName("pairSpringSliderDashpot")
Runtime type information.
virtual void evaluatePair(typename CloudType::parcelType &pA, typename CloudType::parcelType &pB) const
Calculate the pair interaction between parcels.
virtual bool controlsTimestep() const
Whether the PairModel has a timestep limit that will.
A cloud is a collection of lagrangian particles.
Definition: cloud.H:51
Templated pair interaction class.
Definition: PairCollision.H:48
scalar volumeFactor() const
Return the volumeFactor.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:221
virtual ~PairSpringSliderDashpot()
Destructor.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
virtual label nSubCycles() const
For PairModels that control the timestep, calculate the.
Namespace for OpenFOAM.