PairSpringSliderDashpot.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-2015 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]
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
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 constituent 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
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  // From:
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 // ************************************************************************* //
Foam::PairSpringSliderDashpot::nSubCycles
virtual label nSubCycles() const
For PairModels that control the timestep, calculate the.
Definition: PairSpringSliderDashpot.C:143
mathematicalConstants.H
Foam::PairSpringSliderDashpot::findMinMaxProperties
void findMinMaxProperties(scalar &RMin, scalar &rhoMax, scalar &vMagMax) const
Find the appropriate properties for determining the minimum.
Definition: PairSpringSliderDashpot.C:32
Foam::PairSpringSliderDashpot::Estar_
scalar Estar_
Effective Young's modulus value, assuming both particles have.
Definition: PairSpringSliderDashpot.H:55
Foam::PairModel< CloudType >::dict
const dictionary & dict() const
Return the dictionary.
Definition: PairModel.C:62
Foam::PairSpringSliderDashpot::cohesion_
bool cohesion_
Switch cohesion on and off.
Definition: PairSpringSliderDashpot.H:74
PairSpringSliderDashpot.C
Foam::PairSpringSliderDashpot::collisionResolutionSteps_
scalar collisionResolutionSteps_
The number of steps over which to resolve the minimum.
Definition: PairSpringSliderDashpot.H:78
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
Foam::PairSpringSliderDashpot::PairSpringSliderDashpot
PairSpringSliderDashpot(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
Definition: PairSpringSliderDashpot.C:84
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
CollisionRecordList.H
Foam::PairSpringSliderDashpot::b_
scalar b_
Spring power (b = 1 for linear, b = 3/2 for Hertzian)
Definition: PairSpringSliderDashpot.H:65
Foam::cloud
A cloud is a collection of lagrangian particles.
Definition: cloud.H:51
Foam::sqr
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Definition: dimensionedSymmTensor.C:49
Foam::PairSpringSliderDashpot::mu_
scalar mu_
Coefficient of friction in for tangential sliding.
Definition: PairSpringSliderDashpot.H:68
Foam::PairSpringSliderDashpot::overlapArea
scalar overlapArea(scalar rA, scalar rB, scalar rAB) const
Return the area of overlap between two spheres of radii rA and rB,.
Definition: PairSpringSliderDashpot.H:140
Foam::PairModel
Templated pair interaction class.
Definition: PairCollision.H:48
Foam::PairSpringSliderDashpot::cohesionEnergyDensity_
scalar cohesionEnergyDensity_
Cohesion energy density [J/m^3].
Definition: PairSpringSliderDashpot.H:71
Foam::PairSpringSliderDashpot::controlsTimestep
virtual bool controlsTimestep() const
Whether the PairModel has a timestep limit that will.
Definition: PairSpringSliderDashpot.C:136
Foam::PairSpringSliderDashpot::TypeName
TypeName("pairSpringSliderDashpot")
Runtime type information.
Foam::PairSpringSliderDashpot::evaluatePair
virtual void evaluatePair(typename CloudType::parcelType &pA, typename CloudType::parcelType &pB) const
Calculate the pair interaction between parcels.
Definition: PairSpringSliderDashpot.C:169
Foam::constant::mathematical::pi
const scalar pi(M_PI)
Foam::PairSpringSliderDashpot::alpha_
scalar alpha_
alpha-coefficient, related to coefficient of restitution
Definition: PairSpringSliderDashpot.H:62
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
rhoMax
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
Foam::PairSpringSliderDashpot::Gstar_
scalar Gstar_
Effective shear modulus value, assuming both particles have.
Definition: PairSpringSliderDashpot.H:59
Foam::PairSpringSliderDashpot
Pair forces between particles colliding with a spring, slider, damper model.
Definition: PairSpringSliderDashpot.H:47
PairModel.H
Foam::PairSpringSliderDashpot::useEquivalentSize_
bool useEquivalentSize_
Switch to control use of equivalent size particles. Used.
Definition: PairSpringSliderDashpot.H:100
Foam::PairSpringSliderDashpot::volumeFactor
scalar volumeFactor() const
Return the volumeFactor.
Definition: PairSpringSliderDashpot.H:133
Foam::PairSpringSliderDashpot::~PairSpringSliderDashpot
virtual ~PairSpringSliderDashpot()
Destructor.
Definition: PairSpringSliderDashpot.C:129
Foam::PairSpringSliderDashpot::volumeFactor_
scalar volumeFactor_
Volume factor for determining the equivalent size of a.
Definition: PairSpringSliderDashpot.H:96