SlidingFrictionSpecies Class Reference

SlidingFrictionSpecies contains the parameters used to describe sliding friction. More...

#include <SlidingFrictionSpecies.h>

+ Inheritance diagram for SlidingFrictionSpecies:

Public Types

typedef SlidingFrictionInteraction InteractionType
 The correct Interaction type for this FrictionForceSpecies. More...
 

Public Member Functions

 SlidingFrictionSpecies ()
 The default constructor. More...
 
 SlidingFrictionSpecies (const SlidingFrictionSpecies &s)
 The default copy constructor. More...
 
 ~SlidingFrictionSpecies ()
 The default destructor. More...
 
void read (std::istream &is)
 Reads the species properties from an input stream. More...
 
void write (std::ostream &os) const
 Writes the species properties to an output stream. More...
 
virtual std::string getBaseName () const
 Used in Species::getName to obtain a unique name for each Species. More...
 
void setSlidingStiffness (Mdouble new_kt)
 Allows the spring constant to be changed. More...
 
Mdouble getSlidingStiffness () const
 Allows the spring constant to be accessed. More...
 
void setSlidingDissipation (Mdouble new_dispt)
 Allows the tangential viscosity to be changed. More...
 
Mdouble getSlidingDissipation () const
 Allows the tangential viscosity to be accessed. More...
 
void setSlidingFrictionCoefficient (Mdouble new_mu)
 Allows the (dynamic) Coulomb friction coefficient to be changed; also sets mu_s by default. More...
 
Mdouble getSlidingFrictionCoefficient () const
 Allows the (dynamic) Coulomb friction coefficient to be accessed. More...
 
void setSlidingFrictionCoefficientStatic (Mdouble new_mu)
 Allows the static Coulomb friction coefficient to be changed. More...
 
Mdouble getSlidingFrictionCoefficientStatic () const
 Allows the static Coulomb friction coefficient to be accessed. More...
 
bool getUseAngularDOFs () const override
 Returns true if torques have to be calculated. More...
 
void mix (SlidingFrictionSpecies *S, SlidingFrictionSpecies *T)
 creates default values for mixed species More...
 
void setCollisionTimeAndNormalAndTangentialRestitutionCoefficient (Mdouble tc, Mdouble eps, Mdouble beta, Mdouble mass)
 Sets k, disp, kt, dispt such that it matches a given tc and eps for a collision of two particles of masses m0,m1. More...
 
void setCollisionTimeAndNormalAndTangentialRestitutionCoefficientNoDispt (Mdouble tc, Mdouble eps, Mdouble beta, Mdouble mass)
 Sets k, disp, kt (with dispt=0) such that it matches a given tc and eps for a collision of two particles of mass m. More...
 
void setIsSuperquadricSpecies (bool isSuperquadricSpecies)
 
bool getIsSuperquadricSpecies () const
 
- Public Member Functions inherited from BaseForce
BaseSpeciesgetBaseSpecies () const
 
void setBaseSpecies (BaseSpecies *baseSpecies)
 

Private Attributes

Mdouble slidingStiffness_
 tangential stiffness. More...
 
Mdouble slidingDissipation_
 tangential dissipation coefficient. More...
 
Mdouble slidingFrictionCoefficient_
 (dynamic) Coulomb friction coefficient More...
 
Mdouble slidingFrictionCoefficientStatic_
 static Coulomb friction coefficient (by default set equal to mu) More...
 
bool isSuperquadricSpecies_
 

Detailed Description

SlidingFrictionSpecies contains the parameters used to describe sliding friction.

See SlidingFrictionInteraction::computeForce for a description of the force law.

Member Typedef Documentation

◆ InteractionType

The correct Interaction type for this FrictionForceSpecies.

Constructor & Destructor Documentation

◆ SlidingFrictionSpecies() [1/2]

SlidingFrictionSpecies::SlidingFrictionSpecies ( )

The default constructor.

37 {
42  isSuperquadricSpecies_ = false;
43 #ifdef DEBUG_CONSTRUCTOR
44  std::cout<<"SlidingFrictionSpecies::SlidingFrictionSpecies() finished"<<std::endl;
45 #endif
46 }
Mdouble slidingStiffness_
tangential stiffness.
Definition: SlidingFrictionSpecies.h:113
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
Definition: SlidingFrictionSpecies.h:129
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Definition: SlidingFrictionSpecies.h:126
Mdouble slidingDissipation_
tangential dissipation coefficient.
Definition: SlidingFrictionSpecies.h:123
bool isSuperquadricSpecies_
Definition: SlidingFrictionSpecies.h:131

References isSuperquadricSpecies_, slidingDissipation_, slidingFrictionCoefficient_, slidingFrictionCoefficientStatic_, and slidingStiffness_.

◆ SlidingFrictionSpecies() [2/2]

SlidingFrictionSpecies::SlidingFrictionSpecies ( const SlidingFrictionSpecies s)

The default copy constructor.

Parameters
[in]sthe species that is copied
52 {
58 #ifdef DEBUG_CONSTRUCTOR
59  std::cout<<"SlidingFrictionSpecies::SlidingFrictionSpecies(const SlidingFrictionSpecies &p) finished"<<std::endl;
60 #endif
61 }

References isSuperquadricSpecies_, slidingDissipation_, slidingFrictionCoefficient_, slidingFrictionCoefficientStatic_, and slidingStiffness_.

◆ ~SlidingFrictionSpecies()

SlidingFrictionSpecies::~SlidingFrictionSpecies ( )

The default destructor.

64 {
65 #ifdef DEBUG_DESTRUCTOR
66  std::cout<<"SlidingFrictionSpecies::~SlidingFrictionSpecies() finished"<<std::endl;
67 #endif
68 }

Member Function Documentation

◆ getBaseName()

std::string SlidingFrictionSpecies::getBaseName ( ) const
virtual

Used in Species::getName to obtain a unique name for each Species.

Returns
a string containing the name of the species (minus the word "Species")

Reimplemented in FrictionSpecies.

99 {
100  return "SlidingFriction";
101 }

◆ getIsSuperquadricSpecies()

bool SlidingFrictionSpecies::getIsSuperquadricSpecies ( ) const

◆ getSlidingDissipation()

Mdouble SlidingFrictionSpecies::getSlidingDissipation ( ) const

Allows the tangential viscosity to be accessed.

135 {
136  return slidingDissipation_;
137 }

References slidingDissipation_.

Referenced by SlidingFrictionInteraction::computeFrictionForce(), and mix().

◆ getSlidingFrictionCoefficient()

Mdouble SlidingFrictionSpecies::getSlidingFrictionCoefficient ( ) const

Allows the (dynamic) Coulomb friction coefficient to be accessed.

156 {
158 }

References slidingFrictionCoefficient_.

Referenced by SlidingFrictionInteraction::computeFrictionForce(), and mix().

◆ getSlidingFrictionCoefficientStatic()

Mdouble SlidingFrictionSpecies::getSlidingFrictionCoefficientStatic ( ) const

Allows the static Coulomb friction coefficient to be accessed.

175 {
177 }

References slidingFrictionCoefficientStatic_.

Referenced by SlidingFrictionInteraction::computeFrictionForce(), and mix().

◆ getSlidingStiffness()

Mdouble SlidingFrictionSpecies::getSlidingStiffness ( ) const

◆ getUseAngularDOFs()

bool SlidingFrictionSpecies::getUseAngularDOFs ( ) const
overridevirtual

Returns true if torques have to be calculated.

Returns true for any FrictionForceSpecies except EmptyFrictionSpecies, because for spherical particles, torques are only caused by tangential forces. See SpeciesHandler::useAngularDOFs for more details

Returns
true

Implements BaseFrictionForce.

Reimplemented in Species< LinearPlasticViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >, and Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >.

186 {
187  return true;
188 }

◆ mix()

void SlidingFrictionSpecies::mix ( SlidingFrictionSpecies S,
SlidingFrictionSpecies T 
)

creates default values for mixed species

For all parameters we assume that the harmonic mean of the parameters of the original two species is a sensible default.

Parameters
[in]SFrictionalthe first species whose properties are mixed to create the new species
[in]TFrictionalthe second species whose properties are mixed to create the new species
197 {
204 }
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble getSlidingFrictionCoefficientStatic() const
Allows the static Coulomb friction coefficient to be accessed.
Definition: SlidingFrictionSpecies.cc:174
Mdouble getSlidingFrictionCoefficient() const
Allows the (dynamic) Coulomb friction coefficient to be accessed.
Definition: SlidingFrictionSpecies.cc:155
Mdouble getSlidingStiffness() const
Allows the spring constant to be accessed.
Definition: SlidingFrictionSpecies.cc:117
Mdouble getSlidingDissipation() const
Allows the tangential viscosity to be accessed.
Definition: SlidingFrictionSpecies.cc:134

References BaseSpecies::average(), getSlidingDissipation(), getSlidingFrictionCoefficient(), getSlidingFrictionCoefficientStatic(), getSlidingStiffness(), slidingDissipation_, slidingFrictionCoefficient_, slidingFrictionCoefficientStatic_, and slidingStiffness_.

◆ read()

void SlidingFrictionSpecies::read ( std::istream &  is)

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)
86 {
87  //BaseSpecies::read(is);
88  std::string dummy;
89  is >> dummy >> slidingStiffness_;
90  is >> dummy >> slidingDissipation_;
91  is >> dummy >> slidingFrictionCoefficient_;
92  is >> dummy >> slidingFrictionCoefficientStatic_;
93 }

References slidingDissipation_, slidingFrictionCoefficient_, slidingFrictionCoefficientStatic_, and slidingStiffness_.

Referenced by FrictionSpecies::read().

◆ setCollisionTimeAndNormalAndTangentialRestitutionCoefficient()

void SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient ( Mdouble  tc,
Mdouble  eps,
Mdouble  beta,
Mdouble  mass 
)

Sets k, disp, kt, dispt such that it matches a given tc and eps for a collision of two particles of masses m0,m1.

209 {
210  Mdouble stiffness;
211  //the dynamic cast is needed to check if the normal force species is LinearViscoelasticSpecies; otherwise this function cannot be used
213  if (species != nullptr)
214  {
215  species->setCollisionTimeAndRestitutionCoefficient(tc, eps, mass);
216  stiffness = species->getStiffness();
217  }
218  else
219  {
221  if (species2 != nullptr)
222  {
223  species2->setDissipation(-mass / tc * std::log(eps));
224  species2->setLoadingStiffness(.5 * mass * (mathsFunc::square(constants::pi / tc) +
225  mathsFunc::square(species2->getDissipation()) / mass));
226  stiffness = species2->getLoadingStiffness();
227  }
228  else
229  {
230  logger(ERROR,
231  "SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient only works for "
232  "LinearViscoelasticSlidingFrictionSpecies or LinearPlasticViscoelasticSlidingFrictionSpecies");
233  }
234  }
235 
236  // from: N. G. Deen et. al. https://doi.org/10.1016/j.ces.2006.08.014
237  // eq. 43 and 30
240  if (beta != 0.0)
241  setSlidingDissipation(-2 * log(beta) * sqrt(1.0 / 7.0 * mass * getSlidingStiffness() /
243  else
244  setSlidingDissipation(2. * sqrt(1.0 / 7.0 * mass * getSlidingStiffness()));
245 }
double Mdouble
Definition: GeneralDefine.h:34
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ ERROR
LinearPlasticViscoelasticNormalSpecies contains the parameters used to describe a plastic-cohesive no...
Definition: LinearPlasticViscoelasticNormalSpecies.h:41
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
Definition: LinearPlasticViscoelasticNormalSpecies.cc:153
void setLoadingStiffness(Mdouble loadingStiffness)
Sets the loading stiffness of the linear plastic-viscoelastic normal force.
Definition: LinearPlasticViscoelasticNormalSpecies.cc:185
void setDissipation(Mdouble dissipation)
Sets the linear dissipation coefficient of the linear plastic-viscoelastic normal force.
Definition: LinearPlasticViscoelasticNormalSpecies.cc:230
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Definition: LinearPlasticViscoelasticNormalSpecies.cc:248
LinearViscoelasticNormalSpecies contains the parameters used to describe a linear elastic-dissipative...
Definition: LinearViscoelasticNormalSpecies.h:39
Mdouble getStiffness() const
Allows the spring constant to be accessed.
Definition: LinearViscoelasticNormalSpecies.cc:104
void setCollisionTimeAndRestitutionCoefficient(Mdouble tc, Mdouble eps, BaseParticle *p)
Sets k, disp such that it matches a given tc and eps for a collision of two copies of particle p.
Definition: LinearViscoelasticNormalSpecies.cc:212
void setSlidingStiffness(Mdouble new_kt)
Allows the spring constant to be changed.
Definition: SlidingFrictionSpecies.cc:104
void setSlidingDissipation(Mdouble new_dispt)
Allows the tangential viscosity to be changed.
Definition: SlidingFrictionSpecies.cc:123
const Mdouble pi
Definition: ExtendedMath.h:45
Mdouble log(Mdouble Power)
Definition: ExtendedMath.cc:104
Mdouble beta(Mdouble z, Mdouble w)
This is the beta function, returns the approximation based on cmath's implementation of ln(gamma)
Definition: ExtendedMath.cc:164
T square(const T val)
squares a number
Definition: ExtendedMath.h:106

References mathsFunc::beta(), ERROR, LinearPlasticViscoelasticNormalSpecies::getDissipation(), LinearPlasticViscoelasticNormalSpecies::getLoadingStiffness(), getSlidingStiffness(), LinearViscoelasticNormalSpecies::getStiffness(), mathsFunc::log(), logger, constants::pi, LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient(), LinearPlasticViscoelasticNormalSpecies::setDissipation(), LinearPlasticViscoelasticNormalSpecies::setLoadingStiffness(), setSlidingDissipation(), setSlidingStiffness(), and mathsFunc::square().

◆ setCollisionTimeAndNormalAndTangentialRestitutionCoefficientNoDispt()

void SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficientNoDispt ( Mdouble  tc,
Mdouble  eps,
Mdouble  beta,
Mdouble  mass 
)

Sets k, disp, kt (with dispt=0) such that it matches a given tc and eps for a collision of two particles of mass m.

Sets k, disp, kt, dispt such that it matches a given tc and eps for a collision of two particles of masses m0,m1.

251 {
252  //the dynamic cast is needed to check if the normal force species is LinearViscoelasticSpecies; otherwise this function cannot be used
254  if (species == nullptr)
255  {
256  logger(ERROR, "SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient only "
257  "works for LinearViscoelasticSlidingFrictionSpecies");
258  }
259  species->setCollisionTimeAndRestitutionCoefficient(tc, eps, mass);
260  // from: V. Becker et. al. https://doi.org/10.1103/PhysRevE.77.011304
261  // eq. 56
262  setSlidingStiffness(2.0 / 7.0 * species->getStiffness() * mathsFunc::square(acos(-beta) / constants::pi));
264 }

References mathsFunc::beta(), ERROR, LinearViscoelasticNormalSpecies::getStiffness(), logger, constants::pi, LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient(), setSlidingDissipation(), setSlidingStiffness(), and mathsFunc::square().

◆ setIsSuperquadricSpecies()

void SlidingFrictionSpecies::setIsSuperquadricSpecies ( bool  isSuperquadricSpecies)
267 {
268  SlidingFrictionSpecies::isSuperquadricSpecies_ = isSuperquadricSpecies;
269 }

References isSuperquadricSpecies_.

◆ setSlidingDissipation()

void SlidingFrictionSpecies::setSlidingDissipation ( Mdouble  new_dispt)

Allows the tangential viscosity to be changed.

124 {
125  if (new_dispt >= 0)
126  slidingDissipation_ = new_dispt;
127  else
128  {
129  logger(ERROR, "Error in setSlidingDissipation");
130  }
131 }

References ERROR, logger, and slidingDissipation_.

Referenced by setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), and setCollisionTimeAndNormalAndTangentialRestitutionCoefficientNoDispt().

◆ setSlidingFrictionCoefficient()

void SlidingFrictionSpecies::setSlidingFrictionCoefficient ( Mdouble  new_mu)

Allows the (dynamic) Coulomb friction coefficient to be changed; also sets mu_s by default.

142 {
143  if (new_mu >= 0)
144  {
147  }
148  else
149  {
150  logger(ERROR, "Error in setSlidingFrictionCoefficient");
151  }
152 }

References ERROR, logger, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

Referenced by ChuteBottom::makeRoughBottom(), ParticleParticleInteraction::setupInitialConditions(), ParticleParticleInteractionWithPlasticForces::setupInitialConditions(), and ParticleWallInteraction::setupInitialConditions().

◆ setSlidingFrictionCoefficientStatic()

void SlidingFrictionSpecies::setSlidingFrictionCoefficientStatic ( Mdouble  new_mu)

Allows the static Coulomb friction coefficient to be changed.

Allows the static Coulomb friction coefficient to be changed; also sets mu_s by default.

162 {
163  if (new_mu >= 0)
164  {
166  }
167  else
168  {
169  logger(ERROR, "Error in setSlidingFrictionCoefficientStatic");
170  }
171 }

References ERROR, logger, and slidingFrictionCoefficientStatic_.

◆ setSlidingStiffness()

void SlidingFrictionSpecies::setSlidingStiffness ( Mdouble  new_kt)

◆ write()

void SlidingFrictionSpecies::write ( std::ostream &  os) const

Writes the species properties to an output stream.

Parameters
[out]osoutput stream (typically the restart file)
74 {
75  //BaseSpecies::write(os);
76  os << " slidingStiffness " << slidingStiffness_;
77  os << " slidingDissipation " << slidingDissipation_;
78  os << " slidingFrictionCoefficient " << slidingFrictionCoefficient_;
79  os << " slidingFrictionCoefficientStatic " << slidingFrictionCoefficientStatic_;
80 }

References slidingDissipation_, slidingFrictionCoefficient_, slidingFrictionCoefficientStatic_, and slidingStiffness_.

Referenced by FrictionSpecies::write().

Member Data Documentation

◆ isSuperquadricSpecies_

bool SlidingFrictionSpecies::isSuperquadricSpecies_
private

◆ slidingDissipation_

Mdouble SlidingFrictionSpecies::slidingDissipation_
private

tangential dissipation coefficient.

Typically set to 2/7 of the normal force dissipation, as both the tangential and the normal spring have the same restitution coefficients (if the tangential and normal stiffnesses also have a ratio of 2/7). should always satisfy \(4*dispt*dt<mass, dispt \approx disp\), otherwise the restitution is zero and the particles stick.

Referenced by getSlidingDissipation(), mix(), read(), setSlidingDissipation(), SlidingFrictionSpecies(), and write().

◆ slidingFrictionCoefficient_

Mdouble SlidingFrictionSpecies::slidingFrictionCoefficient_
private

(dynamic) Coulomb friction coefficient

Referenced by getSlidingFrictionCoefficient(), mix(), read(), setSlidingFrictionCoefficient(), SlidingFrictionSpecies(), and write().

◆ slidingFrictionCoefficientStatic_

Mdouble SlidingFrictionSpecies::slidingFrictionCoefficientStatic_
private

static Coulomb friction coefficient (by default set equal to mu)

Referenced by getSlidingFrictionCoefficientStatic(), mix(), read(), setSlidingFrictionCoefficient(), setSlidingFrictionCoefficientStatic(), SlidingFrictionSpecies(), and write().

◆ slidingStiffness_

Mdouble SlidingFrictionSpecies::slidingStiffness_
private

tangential stiffness.

Typically set to 2/7 of the stiffness of the normal force, as
both the tangential and the normal spring have the same oscillation
frequency (and thus require the same timeStep)in this case.

Referenced by getSlidingStiffness(), mix(), read(), setSlidingStiffness(), SlidingFrictionSpecies(), and write().


The documentation for this class was generated from the following files: