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.

16 {
21  isSuperquadricSpecies_ = false;
22 #ifdef DEBUG_CONSTRUCTOR
23  std::cout<<"SlidingFrictionSpecies::SlidingFrictionSpecies() finished"<<std::endl;
24 #endif
25 }
Mdouble slidingStiffness_
tangential stiffness.
Definition: SlidingFrictionSpecies.h:92
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
Definition: SlidingFrictionSpecies.h:108
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Definition: SlidingFrictionSpecies.h:105
Mdouble slidingDissipation_
tangential dissipation coefficient.
Definition: SlidingFrictionSpecies.h:102
bool isSuperquadricSpecies_
Definition: SlidingFrictionSpecies.h:110

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
31 {
32  slidingStiffness_ = s.slidingStiffness_;
33  slidingDissipation_ = s.slidingDissipation_;
34  slidingFrictionCoefficient_ = s.slidingFrictionCoefficient_;
35  slidingFrictionCoefficientStatic_ = s.slidingFrictionCoefficientStatic_;
36  isSuperquadricSpecies_ = s.isSuperquadricSpecies_;
37 #ifdef DEBUG_CONSTRUCTOR
38  std::cout<<"SlidingFrictionSpecies::SlidingFrictionSpecies(const SlidingFrictionSpecies &p) finished"<<std::endl;
39 #endif
40 }
RealScalar s
Definition: level1_cplx_impl.h:130

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

◆ ~SlidingFrictionSpecies()

SlidingFrictionSpecies::~SlidingFrictionSpecies ( )

The default destructor.

43 {
44 #ifdef DEBUG_DESTRUCTOR
45  std::cout<<"SlidingFrictionSpecies::~SlidingFrictionSpecies() finished"<<std::endl;
46 #endif
47 }

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.

78 {
79  return "SlidingFriction";
80 }

◆ getIsSuperquadricSpecies()

bool SlidingFrictionSpecies::getIsSuperquadricSpecies ( ) const

◆ getSlidingDissipation()

Mdouble SlidingFrictionSpecies::getSlidingDissipation ( ) const

Allows the tangential viscosity to be accessed.

114 {
115  return slidingDissipation_;
116 }

References slidingDissipation_.

Referenced by SlidingFrictionInteraction::computeFrictionForce(), and Slide::create_rough_wall().

◆ getSlidingFrictionCoefficient()

Mdouble SlidingFrictionSpecies::getSlidingFrictionCoefficient ( ) const

◆ getSlidingFrictionCoefficientStatic()

Mdouble SlidingFrictionSpecies::getSlidingFrictionCoefficientStatic ( ) const

Allows the static Coulomb friction coefficient to be accessed.

154 {
156 }

References slidingFrictionCoefficientStatic_.

Referenced by SlidingFrictionInteraction::computeFrictionForce().

◆ 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< LinearViscoelasticNormalSpecies, FrictionSpecies >, Species< LinearPlasticViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >, and Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >.

165 {
166  return true;
167 }

◆ 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
176 {
177  slidingStiffness_ = BaseSpecies::average(S->getSlidingStiffness(), T->getSlidingStiffness());
178  slidingDissipation_ = BaseSpecies::average(S->getSlidingDissipation(), T->getSlidingDissipation());
179  slidingFrictionCoefficient_ = BaseSpecies::average(S->getSlidingFrictionCoefficient(),
180  T->getSlidingFrictionCoefficient());
181  slidingFrictionCoefficientStatic_ = BaseSpecies::average(S->getSlidingFrictionCoefficientStatic(),
182  T->getSlidingFrictionCoefficientStatic());
183 }
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:89
@ S
Definition: quadtree.h:62

References BaseSpecies::average(), oomph::QuadTreeNames::S, slidingDissipation_, slidingFrictionCoefficient_, slidingFrictionCoefficientStatic_, and slidingStiffness_.

Referenced by FrictionSpecies::mix().

◆ read()

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

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)
65 {
66  //BaseSpecies::read(is);
67  std::string dummy;
68  is >> dummy >> slidingStiffness_;
69  is >> dummy >> slidingDissipation_;
70  is >> dummy >> slidingFrictionCoefficient_;
71  is >> dummy >> slidingFrictionCoefficientStatic_;
72 }
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

References slidingDissipation_, slidingFrictionCoefficient_, slidingFrictionCoefficientStatic_, slidingStiffness_, and oomph::Global_string_for_annotation::string().

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.

188 {
189  Mdouble stiffness;
190  //the dynamic cast is needed to check if the normal force species is LinearViscoelasticSpecies; otherwise this function cannot be used
192  if (species != nullptr)
193  {
195  stiffness = species->getStiffness();
196  }
197  else
198  {
200  if (species2 != nullptr)
201  {
202  species2->setDissipation(-mass / tc * std::log(eps));
203  species2->setLoadingStiffness(.5 * mass * (mathsFunc::square(constants::pi / tc) +
204  mathsFunc::square(species2->getDissipation()) / mass));
205  stiffness = species2->getLoadingStiffness();
206  }
207  else
208  {
209  logger(ERROR,
210  "SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient only works for "
211  "LinearViscoelasticSlidingFrictionSpecies or LinearPlasticViscoelasticSlidingFrictionSpecies");
212  }
213  }
214 
215  // from: N. G. Deen et. al. https://doi.org/10.1016/j.ces.2006.08.014
216  // eq. 43 and 30
219  if (beta != 0.0)
220  setSlidingDissipation(-2 * log(beta) * sqrt(1.0 / 7.0 * mass * getSlidingStiffness() /
222  else
223  setSlidingDissipation(2. * sqrt(1.0 / 7.0 * mass * getSlidingStiffness()));
224 }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
double Mdouble
Definition: GeneralDefine.h:13
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:20
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
Definition: LinearPlasticViscoelasticNormalSpecies.cc:131
void setLoadingStiffness(Mdouble loadingStiffness)
Sets the loading stiffness of the linear plastic-viscoelastic normal force.
Definition: LinearPlasticViscoelasticNormalSpecies.cc:163
void setDissipation(Mdouble dissipation)
Sets the linear dissipation coefficient of the linear plastic-viscoelastic normal force.
Definition: LinearPlasticViscoelasticNormalSpecies.cc:208
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Definition: LinearPlasticViscoelasticNormalSpecies.cc:226
LinearViscoelasticNormalSpecies contains the parameters used to describe a linear elastic-dissipative...
Definition: LinearViscoelasticNormalSpecies.h:18
Mdouble getStiffness() const
Allows the spring constant to be accessed.
Definition: LinearViscoelasticNormalSpecies.cc:83
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:191
void setSlidingStiffness(Mdouble new_kt)
Allows the spring constant to be changed.
Definition: SlidingFrictionSpecies.cc:83
Mdouble getSlidingStiffness() const
Allows the spring constant to be accessed.
Definition: SlidingFrictionSpecies.cc:96
void setSlidingDissipation(Mdouble new_dispt)
Allows the tangential viscosity to be changed.
Definition: SlidingFrictionSpecies.cc:102
Scalar beta
Definition: level2_cplx_impl.h:36
double eps
Definition: crbond_bessel.cc:24
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
const Mdouble pi
Definition: ExtendedMath.h:23
T square(const T val)
squares a number
Definition: ExtendedMath.h:86

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

Referenced by Siegen::Siegen().

◆ 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.

230 {
231  //the dynamic cast is needed to check if the normal force species is LinearViscoelasticSpecies; otherwise this function cannot be used
233  if (species == nullptr)
234  {
235  logger(ERROR, "SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient only "
236  "works for LinearViscoelasticSlidingFrictionSpecies");
237  }
239  // from: V. Becker et. al. https://doi.org/10.1103/PhysRevE.77.011304
240  // eq. 56
243 }
AnnoyingScalar acos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:138

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

◆ setIsSuperquadricSpecies()

void SlidingFrictionSpecies::setIsSuperquadricSpecies ( bool  isSuperquadricSpecies)
246 {
247  SlidingFrictionSpecies::isSuperquadricSpecies_ = isSuperquadricSpecies;
248 }

References isSuperquadricSpecies_.

◆ setSlidingDissipation()

◆ setSlidingFrictionCoefficient()

◆ 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.

141 {
142  if (new_mu >= 0)
143  {
145  }
146  else
147  {
148  logger(ERROR, "Error in setSlidingFrictionCoefficientStatic");
149  }
150 }

References ERROR, logger, and slidingFrictionCoefficientStatic_.

◆ setSlidingStiffness()

◆ write()

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

Writes the species properties to an output stream.

Parameters
[out]osoutput stream (typically the restart file)
53 {
54  //BaseSpecies::write(os);
55  os << " slidingStiffness " << slidingStiffness_;
56  os << " slidingDissipation " << slidingDissipation_;
57  os << " slidingFrictionCoefficient " << slidingFrictionCoefficient_;
58  os << " slidingFrictionCoefficientStatic " << slidingFrictionCoefficientStatic_;
59 }

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: