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