1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::PairSpringSliderDashpot
28 Pair forces between particles colliding with a spring, slider, damper model
30 \*---------------------------------------------------------------------------*/
32 #ifndef PairSpringSliderDashpot_H
33 #define PairSpringSliderDashpot_H
35 #include "PairModel.H"
36 #include "CollisionRecordList.H"
37 #include "mathematicalConstants.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 /*---------------------------------------------------------------------------*\
44 Class PairSpringSliderDashpot Declaration
45 \*---------------------------------------------------------------------------*/
47 template<class CloudType>
48 class PairSpringSliderDashpot
50 public PairModel<CloudType>
54 //- Effective Young's modulus value, assuming both particles have
58 //- Effective shear modulus value, assuming both particles have
59 // the same Poisson's ratio and Young's modulus
62 //- alpha-coefficient, related to coefficient of restitution
65 //- Spring power (b = 1 for linear, b = 3/2 for Hertzian)
68 //- Coefficient of friction in for tangential sliding
71 //- Cohesion energy density [J/m^3]
72 scalar cohesionEnergyDensity_;
74 // Switch cohesion on and off
77 //- The number of steps over which to resolve the minimum
78 // harmonic approximation of the collision period
79 scalar collisionResolutionSteps_;
81 //- Volume factor for determining the equivalent size of a
82 // parcel where nParticles is not 1. The equivalent size of
84 // parcelEquivVolume = volumeFactor*nParticles*p.volume()
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
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
99 //- Switch to control use of equivalent size particles. Used
100 // because the calculation can be very expensive.
101 bool useEquivalentSize_;
104 // Private Member Functions
106 //- Find the appropriate properties for determining the minimum
107 //- allowable timestep
108 void findMinMaxProperties
117 //- Runtime type information
118 TypeName("pairSpringSliderDashpot");
123 //- Construct from dictionary
124 PairSpringSliderDashpot(const dictionary& dict, CloudType& cloud);
128 virtual ~PairSpringSliderDashpot();
133 //- Return the volumeFactor
134 inline scalar volumeFactor() const
136 return volumeFactor_;
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
144 // http://mathworld.wolfram.com/Sphere-SphereIntersection.html
156 //- Whether the PairModel has a timestep limit that will
157 // require subCycling
158 virtual bool controlsTimestep() const;
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;
165 //- Calculate the pair interaction between parcels
166 virtual void evaluatePair
168 typename CloudType::parcelType& pA,
169 typename CloudType::parcelType& pB
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 # include "PairSpringSliderDashpot.C"
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 // ************************************************************************* //