WallLocalSpringSliderDashpot.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::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
55 
56  //- Effective shear modulus value
58 
59  //- alpha-coefficient, related to coefficient of restitution
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
67 
68  //- Cohesion energy density [J/m^3]
70 
71  //- Switch cohesion on and off
73 
74  //- Mapping the patch index to the model data
76 
77  //- Index of the maximum value of Estar_
79 
80  //- The number of steps over which to resolve the minimum
81  // harmonic approximation of the collision period
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 constituent 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
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 // ************************************************************************* //
Foam::WallLocalSpringSliderDashpot::nSubCycles
virtual label nSubCycles() const
For WallModels that control the timestep, calculate the.
Definition: WallLocalSpringSliderDashpot.C:311
Foam::WallLocalSpringSliderDashpot::~WallLocalSpringSliderDashpot
virtual ~WallLocalSpringSliderDashpot()
Destructor.
Definition: WallLocalSpringSliderDashpot.C:280
Foam::WallLocalSpringSliderDashpot::Estar_
scalarList Estar_
Effective Young's modulus value.
Definition: WallLocalSpringSliderDashpot.H:53
p
p
Definition: pEqn.H:62
WallModel.H
Foam::WallLocalSpringSliderDashpot::evaluateWall
void evaluateWall(typename CloudType::parcelType &p, const point &site, const WallSiteData< vector > &data, scalar pREff, bool cohesion) const
Calculate the wall interaction for a parcel at a given site.
Definition: WallLocalSpringSliderDashpot.C:75
Foam::WallLocalSpringSliderDashpot::volumeFactor_
scalar volumeFactor_
Volume factor for determining the equivalent size of a.
Definition: WallLocalSpringSliderDashpot.H:99
Foam::WallLocalSpringSliderDashpot::Gstar_
scalarList Gstar_
Effective shear modulus value.
Definition: WallLocalSpringSliderDashpot.H:56
Foam::WallLocalSpringSliderDashpot::cohesionEnergyDensity_
scalarList cohesionEnergyDensity_
Cohesion energy density [J/m^3].
Definition: WallLocalSpringSliderDashpot.H:68
WallLocalSpringSliderDashpot.C
Foam::WallLocalSpringSliderDashpot::collisionResolutionSteps_
scalar collisionResolutionSteps_
The number of steps over which to resolve the minimum.
Definition: WallLocalSpringSliderDashpot.H:81
Foam::WallLocalSpringSliderDashpot::findMinMaxProperties
void findMinMaxProperties(scalar &rMin, scalar &rhoMax, scalar &vMagMax) const
Find the appropriate properties for determining the minimum.
Definition: WallLocalSpringSliderDashpot.C:32
Foam::WallLocalSpringSliderDashpot::maxEstarIndex_
label maxEstarIndex_
Index of the maximum value of Estar_.
Definition: WallLocalSpringSliderDashpot.H:77
Foam::WallLocalSpringSliderDashpot::mu_
scalarList mu_
Coefficient of friction in for tangential sliding.
Definition: WallLocalSpringSliderDashpot.H:65
Foam::WallLocalSpringSliderDashpot::alpha_
scalarList alpha_
alpha-coefficient, related to coefficient of restitution
Definition: WallLocalSpringSliderDashpot.H:59
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::WallLocalSpringSliderDashpot::cohesion_
boolList cohesion_
Switch cohesion on and off.
Definition: WallLocalSpringSliderDashpot.H:71
Foam::WallLocalSpringSliderDashpot
Forces between particles and walls, interacting with a spring, slider, damper model.
Definition: WallLocalSpringSliderDashpot.H:46
Foam::WallLocalSpringSliderDashpot::b_
scalarList b_
Spring power (b = 1 for linear, b = 3/2 for Hertzian)
Definition: WallLocalSpringSliderDashpot.H:62
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
Foam::WallLocalSpringSliderDashpot::patchMap_
labelList patchMap_
Mapping the patch index to the model data.
Definition: WallLocalSpringSliderDashpot.H:74
Foam::WallLocalSpringSliderDashpot::WallLocalSpringSliderDashpot
WallLocalSpringSliderDashpot(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
Definition: WallLocalSpringSliderDashpot.C:175
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
Foam::WallModel
Templated wall interaction class.
Definition: PairCollision.H:51
Foam::WallSiteData
Stores the patch ID and templated data to represent a collision with a wall to be passed to the wall ...
Definition: WallSiteData.H:50
Foam::cloud
A cloud is a collection of lagrangian particles.
Definition: cloud.H:51
Foam::WallLocalSpringSliderDashpot::TypeName
TypeName("wallLocalSpringSliderDashpot")
Runtime type information.
Foam::Vector< scalar >
Foam::WallLocalSpringSliderDashpot::controlsTimestep
virtual bool controlsTimestep() const
Whether the WallModel has a timestep limit that will.
Definition: WallLocalSpringSliderDashpot.C:304
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::WallLocalSpringSliderDashpot::useEquivalentSize_
bool useEquivalentSize_
Switch to control use of equivalent size particles. Used.
Definition: WallLocalSpringSliderDashpot.H:103
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
rhoMax
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
Foam::WallModel< CloudType >::dict
const dictionary & dict() const
Return the dictionary.
Definition: WallModel.C:70
Foam::WallLocalSpringSliderDashpot::volumeFactor
scalar volumeFactor() const
Return the volumeFactor.
Definition: WallLocalSpringSliderDashpot.H:147
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:52
Foam::WallLocalSpringSliderDashpot::pREff
virtual scalar pREff(const typename CloudType::parcelType &p) const
Return the effective radius for a particle for the model.
Definition: WallLocalSpringSliderDashpot.C:288