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