WallSpringSliderDashpot.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::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]
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
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
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 // ************************************************************************* //
Foam::WallSpringSliderDashpot::~WallSpringSliderDashpot
virtual ~WallSpringSliderDashpot()
Destructor.
Definition: WallSpringSliderDashpot.C:212
Foam::WallSpringSliderDashpot::Estar_
scalar Estar_
Effective Young's modulus value.
Definition: WallSpringSliderDashpot.H:53
p
p
Definition: pEqn.H:62
WallModel.H
Foam::WallSpringSliderDashpot::controlsTimestep
virtual bool controlsTimestep() const
Whether the WallModel has a timestep limit that will.
Definition: WallSpringSliderDashpot.C:236
WallSpringSliderDashpot.C
Foam::WallSpringSliderDashpot::alpha_
scalar alpha_
alpha-coefficient, related to coefficient of restitution
Definition: WallSpringSliderDashpot.H:59
Foam::WallSpringSliderDashpot::b_
scalar b_
Spring power (b = 1 for linear, b = 3/2 for Hertzian)
Definition: WallSpringSliderDashpot.H:62
Foam::WallSpringSliderDashpot::Gstar_
scalar Gstar_
Effective shear modulus value.
Definition: WallSpringSliderDashpot.H:56
Foam::WallSpringSliderDashpot::collisionResolutionSteps_
scalar collisionResolutionSteps_
The number of steps over which to resolve the minimum.
Definition: WallSpringSliderDashpot.H:75
Foam::WallSpringSliderDashpot::evaluateWall
void evaluateWall(typename CloudType::parcelType &p, const point &site, const WallSiteData< vector > &data, scalar pREff, scalar kN, bool cohesion) const
Calculate the wall interaction for a parcel at a given site.
Definition: WallSpringSliderDashpot.C:75
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::WallSpringSliderDashpot::mu_
scalar mu_
Coefficient of friction in for tangential sliding.
Definition: WallSpringSliderDashpot.H:65
Foam::WallSpringSliderDashpot::volumeFactor_
scalar volumeFactor_
Volume factor for determining the equivalent size of a.
Definition: WallSpringSliderDashpot.H:93
Foam::WallSpringSliderDashpot::useEquivalentSize_
bool useEquivalentSize_
Switch to control use of equivalent size particles. Used.
Definition: WallSpringSliderDashpot.H:97
Foam::WallSpringSliderDashpot::pREff
virtual scalar pREff(const typename CloudType::parcelType &p) const
Return the effective radius for a particle for the model.
Definition: WallSpringSliderDashpot.C:220
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
Foam::WallSpringSliderDashpot::nSubCycles
virtual label nSubCycles() const
For WallModels that control the timestep, calculate the.
Definition: WallSpringSliderDashpot.C:243
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::WallSpringSliderDashpot::TypeName
TypeName("wallSpringSliderDashpot")
Runtime type information.
Foam::cloud
A cloud is a collection of lagrangian particles.
Definition: cloud.H:51
Foam::WallSpringSliderDashpot
Forces between particles and walls, interacting with a spring, slider, damper model.
Definition: WallSpringSliderDashpot.H:46
Foam::Vector< scalar >
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::WallSpringSliderDashpot::cohesionEnergyDensity_
scalar cohesionEnergyDensity_
Cohesion energy density [J/m^3].
Definition: WallSpringSliderDashpot.H:68
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::WallSpringSliderDashpot::WallSpringSliderDashpot
WallSpringSliderDashpot(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
Definition: WallSpringSliderDashpot.C:162
Foam::WallSpringSliderDashpot::volumeFactor
scalar volumeFactor() const
Return the volumeFactor.
Definition: WallSpringSliderDashpot.H:142
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:52
Foam::WallSpringSliderDashpot::findMinMaxProperties
void findMinMaxProperties(scalar &rMin, scalar &rhoMax, scalar &vMagMax) const
Find the appropriate properties for determining the minimum.
Definition: WallSpringSliderDashpot.C:32
Foam::WallSpringSliderDashpot::cohesion_
bool cohesion_
Definition: WallSpringSliderDashpot.H:71