MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MindlinSpecies Class Reference

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

#include <MindlinSpecies.h>

+ Inheritance diagram for MindlinSpecies:

Public Types

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

Public Member Functions

 MindlinSpecies ()
 The default constructor. More...
 
 MindlinSpecies (const MindlinSpecies &s)
 The default copy constructor. More...
 
 ~MindlinSpecies ()
 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 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...
 
MERCURY_DEPRECATED void setPoissonRatio (Mdouble poissonRatio)
 Allows the poisson ratio to be changed. More...
 
void setEffectiveShearModulus (Mdouble shearModulus)
 allows the shear modulus to be changed More...
 
Mdouble getEffectiveShearModulus () const
 Allows the shear modulus to be accessed. More...
 
bool getUseAngularDOFs () const override
 Returns true if torques have to be calculated. More...
 
void mix (MindlinSpecies *S, MindlinSpecies *T)
 creates default values for mixed species More...
 
- Public Member Functions inherited from BaseForce
BaseSpeciesgetBaseSpecies () const
 
void setBaseSpecies (BaseSpecies *baseSpecies)
 

Private Attributes

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...
 
Mdouble shearModulus_
 tangential spring constant More...
 

Detailed Description

MindlinSpecies contains the parameters used to describe sliding friction.

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

Definition at line 37 of file MindlinSpecies.h.

Member Typedef Documentation

The correct Interaction type for this FrictionForceSpecies.

Definition at line 41 of file MindlinSpecies.h.

Constructor & Destructor Documentation

MindlinSpecies::MindlinSpecies ( )

The default constructor.

Definition at line 37 of file MindlinSpecies.cc.

References shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

38 {
42  shearModulus_ = 0;
43 #ifdef DEBUG_CONSTRUCTOR
44  std::cout<<"MindlinSpecies::MindlinSpecies() finished"<<std::endl;
45 #endif
46 }
Mdouble slidingDissipation_
tangential dissipation coefficient.
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
Mdouble shearModulus_
tangential spring constant
MindlinSpecies::MindlinSpecies ( const MindlinSpecies s)

The default copy constructor.

Parameters
[in]sthe species that is copied

Definition at line 51 of file MindlinSpecies.cc.

References shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

52 {
57 #ifdef DEBUG_CONSTRUCTOR
58  std::cout<<"MindlinSpecies::MindlinSpecies(const MindlinSpecies &p) finished"<<std::endl;
59 #endif
60 }
Mdouble slidingDissipation_
tangential dissipation coefficient.
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
Mdouble shearModulus_
tangential spring constant
MindlinSpecies::~MindlinSpecies ( )

The default destructor.

Definition at line 62 of file MindlinSpecies.cc.

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

Member Function Documentation

std::string MindlinSpecies::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 MindlinRollingTorsionSpecies.

Definition at line 98 of file MindlinSpecies.cc.

99 {
100  return "Mindlin";
101 }
Mdouble MindlinSpecies::getEffectiveShearModulus ( ) const

Allows the shear modulus to be accessed.

Definition at line 186 of file MindlinSpecies.cc.

References shearModulus_.

Referenced by MindlinInteraction::computeFrictionForce(), mix(), and setPoissonRatio().

187 {
188  return shearModulus_;
189 }
Mdouble shearModulus_
tangential spring constant
Mdouble MindlinSpecies::getSlidingDissipation ( ) const

Allows the tangential viscosity to be accessed.

Definition at line 117 of file MindlinSpecies.cc.

References slidingDissipation_.

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

118 {
119  return slidingDissipation_;
120 }
Mdouble slidingDissipation_
tangential dissipation coefficient.
Mdouble MindlinSpecies::getSlidingFrictionCoefficient ( ) const

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

Definition at line 139 of file MindlinSpecies.cc.

References slidingFrictionCoefficient_.

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

140 {
142 }
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Mdouble MindlinSpecies::getSlidingFrictionCoefficientStatic ( ) const

Allows the static Coulomb friction coefficient to be accessed.

Definition at line 192 of file MindlinSpecies.cc.

References slidingFrictionCoefficientStatic_.

Referenced by mix().

193 {
195 }
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
bool MindlinSpecies::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.

Definition at line 203 of file MindlinSpecies.cc.

204 {
205  return true;
206 }
void MindlinSpecies::mix ( MindlinSpecies S,
MindlinSpecies 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

Definition at line 214 of file MindlinSpecies.cc.

References BaseSpecies::average(), getEffectiveShearModulus(), getSlidingDissipation(), getSlidingFrictionCoefficient(), getSlidingFrictionCoefficientStatic(), shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

215 {
216  slidingDissipation_ = BaseSpecies::average(SFrictional->getSlidingDissipation(),TFrictional->getSlidingDissipation());
217  slidingFrictionCoefficient_ = BaseSpecies::average(SFrictional->getSlidingFrictionCoefficient(),TFrictional->getSlidingFrictionCoefficient());
218  slidingFrictionCoefficientStatic_ = BaseSpecies::average(SFrictional->getSlidingFrictionCoefficientStatic(),TFrictional->getSlidingFrictionCoefficientStatic());
219  shearModulus_ = BaseSpecies::average(SFrictional->getEffectiveShearModulus(), TFrictional->getEffectiveShearModulus());
220 }
Mdouble slidingDissipation_
tangential dissipation coefficient.
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
Mdouble shearModulus_
tangential spring constant
void MindlinSpecies::read ( std::istream &  is)

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)

Definition at line 85 of file MindlinSpecies.cc.

References shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

Referenced by MindlinRollingTorsionSpecies::read().

86 {
87  //BaseSpecies::read(is);
88  std::string dummy;
89  is >> dummy >> slidingDissipation_;
90  is >> dummy >> slidingFrictionCoefficient_;
91  is >> dummy >> slidingFrictionCoefficientStatic_;
92  is >> dummy >> shearModulus_;
93 }
Mdouble slidingDissipation_
tangential dissipation coefficient.
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
Mdouble shearModulus_
tangential spring constant
void MindlinSpecies::setEffectiveShearModulus ( Mdouble  shearModulus)

allows the shear modulus to be changed

Allows the shear modulus to be changed.

Definition at line 178 of file MindlinSpecies.cc.

References logger, and shearModulus_.

179 {
180  logger.assert(shearModulus > 0,
181  "setEffectiveShearModulus(%): value needs to be positive",shearModulus);
182  shearModulus_ = shearModulus;
183 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Mdouble shearModulus_
tangential spring constant
void MindlinSpecies::setPoissonRatio ( Mdouble  poissonRatio)

Allows the poisson ratio to be changed.

Definition at line 159 of file MindlinSpecies.cc.

References BaseForce::getBaseSpecies(), getEffectiveShearModulus(), INFO, logger, and shearModulus_.

160 {
161  auto hertz = dynamic_cast<HertzianViscoelasticNormalSpecies*>(getBaseSpecies());
162  logger.assert(hertz, "setPoissonRatio only works with HertzianViscoelastic*Species.");
163  shearModulus_ = hertz->getEffectiveElasticModulus() / 2 * (1 + poissonRatio);
164  logger(INFO, "Effective shear modulus set to %, based on effective elastic modulus % and Poisson's ratio %",
166  hertz->getEffectiveElasticModulus(), poissonRatio);
167 }
Mdouble getEffectiveShearModulus() const
Allows the shear modulus to be accessed.
BaseSpecies * getBaseSpecies() const
Definition: BaseForce.h:35
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Mdouble shearModulus_
tangential spring constant
HertzianViscoelasticNormalSpecies contains the parameters used to describe a Hertzian normal force (T...
void MindlinSpecies::setSlidingDissipation ( Mdouble  new_dispt)

Allows the tangential viscosity to be changed.

Definition at line 105 of file MindlinSpecies.cc.

References slidingDissipation_.

106 {
107  if (new_dispt >= 0)
108  slidingDissipation_ = new_dispt;
109  else
110  {
111  std::cerr << "Error in setSlidingDissipation" << std::endl;
112  exit(-1);
113  }
114 }
Mdouble slidingDissipation_
tangential dissipation coefficient.
void MindlinSpecies::setSlidingFrictionCoefficient ( Mdouble  new_mu)

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

Definition at line 124 of file MindlinSpecies.cc.

References slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

125 {
126  if (new_mu >= 0)
127  {
130  }
131  else
132  {
133  std::cerr << "Error in setSlidingFrictionCoefficient" << std::endl;
134  exit(-1);
135  }
136 }
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
void MindlinSpecies::setSlidingFrictionCoefficientStatic ( Mdouble  new_mu)

Allows the static Coulomb friction coefficient to be changed.

Definition at line 145 of file MindlinSpecies.cc.

References slidingFrictionCoefficientStatic_.

146 {
147  if (new_mu >= 0)
148  {
150  }
151  else
152  {
153  std::cerr << "Error in setSlidingFrictionCoefficientStatic" << std::endl;
154  exit(-1);
155  }
156 }
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
void MindlinSpecies::write ( std::ostream &  os) const

Writes the species properties to an output stream.

Parameters
[out]osoutput stream (typically the restart file)

Definition at line 73 of file MindlinSpecies.cc.

References shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

Referenced by MindlinRollingTorsionSpecies::write().

74 {
75  //BaseSpecies::write(os);
76  os << " slidingDissipation " << slidingDissipation_;
77  os << " slidingFrictionCoefficient " << slidingFrictionCoefficient_;
78  os << " slidingFrictionCoefficientStatic " << slidingFrictionCoefficientStatic_;
79  os << " shearModulus " << shearModulus_;
80 }
Mdouble slidingDissipation_
tangential dissipation coefficient.
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
Mdouble shearModulus_
tangential spring constant

Member Data Documentation

Mdouble MindlinSpecies::shearModulus_
private

tangential spring constant

Definition at line 118 of file MindlinSpecies.h.

Referenced by getEffectiveShearModulus(), MindlinSpecies(), mix(), read(), setEffectiveShearModulus(), setPoissonRatio(), and write().

Mdouble MindlinSpecies::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.

Definition at line 109 of file MindlinSpecies.h.

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

Mdouble MindlinSpecies::slidingFrictionCoefficient_
private

(dynamic) Coulomb friction coefficient

Definition at line 112 of file MindlinSpecies.h.

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

Mdouble MindlinSpecies::slidingFrictionCoefficientStatic_
private

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

Definition at line 115 of file MindlinSpecies.h.

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


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