WallSpringSliderDashpot.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::WallSpringSliderDashpot
26 
27 Description
28  Forces between particles and walls, interacting with a spring,
29  slider, damper model
30 
31 \*---------------------------------------------------------------------------*/
32 
33 #ifndef WallSpringSliderDashpot_H
34 #define WallSpringSliderDashpot_H
35 
36 #include "WallModel.H"
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 namespace Foam
41 {
42 /*---------------------------------------------------------------------------*\
43  Class WallSpringSliderDashpot Declaration
44 \*---------------------------------------------------------------------------*/
45 
46 template<class CloudType>
48 :
49  public WallModel<CloudType>
50 {
51  // Private data
52 
53  //- Effective Young's modulus value
54  scalar Estar_;
55 
56  //- Effective shear modulus value
57  scalar Gstar_;
58 
59  //- alpha-coefficient, related to coefficient of restitution
60  scalar alpha_;
61 
62  //- Spring power (b = 1 for linear, b = 3/2 for Hertzian)
63  scalar b_;
64 
65  //- Coefficient of friction in for tangential sliding
66  scalar mu_;
67 
68  //- Cohesion energy density [J/m^3]
69  scalar cohesionEnergyDensity_;
70 
71  // Switch cohesion on and off
72  bool cohesion_;
73 
74  //- The number of steps over which to resolve the minimum
75  // harmonic approximation of the collision period
76  scalar collisionResolutionSteps_;
77 
78  //- Volume factor for determining the equivalent size of a
79  // parcel where nParticles is not 1. The equivalent size of
80  // the parcel is
81  // parcelEquivVolume = volumeFactor*nParticles*p.volume()
82  // so
83  // parcelEquivD = cbrt(volumeFactor*nParticles)*p.d()
84  // + When volumeFactor = 1, the particles are compressed
85  // together so that the equivalent volume of the parcel is
86  // the sum of the constituent particles
87  // + When volumeFactor = 3*sqrt(2)/pi, the particles are
88  // close packed, but uncompressed.
89  // + When volumeFactor > 3*sqrt(2)/pi, the particles loosely
90  // grouped.
91  // 3*sqrt(2)/pi = 1.350474 is the volume factor for close
92  // packing, i.e pi/(3*sqrt(2)) is the maximum close packing
93  // factor
94  scalar volumeFactor_;
95 
96  //- Switch to control use of equivalent size particles. Used
97  // because the calculation can be very expensive.
98  bool useEquivalentSize_;
99 
100 
101  // Private Member Functions
102 
103  //- Find the appropriate properties for determining the minimum
104  //- Allowable timestep
105  void findMinMaxProperties
106  (
107  scalar& rMin,
108  scalar& rhoMax,
109  scalar& vMagMax
110  ) const;
111 
112  //- Calculate the wall interaction for a parcel at a given site
113  void evaluateWall
114  (
115  typename CloudType::parcelType& p,
116  const point& site,
117  const WallSiteData<vector>& data,
118  scalar pREff,
119  scalar kN,
120  bool cohesion
121  ) const;
122 
123 
124 public:
125 
126  //- Runtime type information
127  TypeName("wallSpringSliderDashpot");
128 
129 
130  // Constructors
131 
132  //- Construct from dictionary
134 
135 
136  //- Destructor
137  virtual ~WallSpringSliderDashpot();
138 
139 
140  // Member Functions
141 
142  //- Return the volumeFactor
143  inline scalar volumeFactor() const
144  {
145  return volumeFactor_;
146  }
147 
148  //- Return the effective radius for a particle for the model
149  virtual scalar pREff(const typename CloudType::parcelType& p) const;
150 
151  //- Whether the WallModel has a timestep limit that will
152  // require subCycling
153  virtual bool controlsTimestep() const;
154 
155  //- For WallModels that control the timestep, calculate the
156  // number of subCycles needed to satisfy the minimum
157  // allowable timestep
158  virtual label nSubCycles() const;
159 
160  //- Calculate the wall interaction for a parcel
161  virtual void evaluateWall
162  (
163  typename CloudType::parcelType& p,
164  const List<point>& flatSitePoints,
165  const List<WallSiteData<vector>>& flatSiteData,
166  const List<point>& sharpSitePoints,
167  const List<WallSiteData<vector>>& sharpSiteData
168  ) const;
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #ifdef NoRepository
179  #include "WallSpringSliderDashpot.C"
180 #endif
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:60
Forces between particles and walls, interacting with a spring, slider, damper model.
virtual label nSubCycles() const
For WallModels that control the timestep, calculate the.
scalar volumeFactor() const
Return the volumeFactor.
virtual ~WallSpringSliderDashpot()
Destructor.
A cloud is a collection of lagrangian particles.
Definition: cloud.H:51
TypeName("wallSpringSliderDashpot")
Runtime type information.
Templated wall interaction class.
Definition: PairCollision.H:51
Stores the patch ID and templated data to represent a collision with a wall to be passed to the wall ...
Definition: WallSiteData.H:50
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:218
Database for solution data, solver performance and other reduced data.
Definition: data.H:52
const dictionary & dict() const
Return the dictionary.
Definition: WallModel.C:70
WallSpringSliderDashpot(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
volScalarField & p
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
virtual scalar pREff(const typename CloudType::parcelType &p) const
Return the effective radius for a particle for the model.
virtual bool controlsTimestep() const
Whether the WallModel has a timestep limit that will.
Namespace for OpenFOAM.