MercuryDPM  Alpha
 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...
 
virtual ~MindlinSpecies ()
 The default destructor. More...
 
void read (std::istream &is) override
 Reads the species properties from an input stream. More...
 
void write (std::ostream &os) const override
 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...
 
void setShearModulus (Mdouble new_G)
 
Mdouble getShearModulus () const
 
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 (MindlinSpecies *const S, MindlinSpecies *const T)
 creates default values for mixed species More...
 
- Public Member Functions inherited from BaseSpecies
 BaseSpecies ()
 The default constructor. More...
 
 BaseSpecies (const BaseSpecies &p)
 The copy constructor. More...
 
virtual ~BaseSpecies ()
 The default destructor. More...
 
virtual BaseSpeciescopy () const =0
 Creates a deep copy of the object from which it is called. More...
 
void setHandler (SpeciesHandler *handler)
 Sets the pointer to the handler to which this species belongs. More...
 
SpeciesHandlergetHandler () const
 Returns the pointer to the handler to which this species belongs. More...
 
Mdouble average (Mdouble a, Mdouble b)
 defines the average of two variables by the harmonic mean. More...
 
virtual void mixAll (BaseSpecies *const S, BaseSpecies *const T)=0
 creates default values for mixed species More...
 
virtual Mdouble getInteractionDistance () const =0
 returns the largest separation distance at which adhesive short-range forces can occur. More...
 
virtual BaseInteractiongetNewInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp) const =0
 returns new Interaction object. More...
 
- Public Member Functions inherited from BaseObject
 BaseObject ()
 Default constructor. More...
 
 BaseObject (const BaseObject &p)
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()
 virtual destructor More...
 
virtual std::string getName () const =0
 A purely virtual function. More...
 
virtual void moveInHandler (const unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (const unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (const unsigned int id)
 Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More...
 
unsigned int getIndex () const
 Returns the index of the object in the handler. More...
 
unsigned int getId () const
 Returns the unique identifier of any particular object. More...
 

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_
 

Detailed Description

MindlinSpecies contains the parameters used to describe sliding friction.

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

Definition at line 36 of file MindlinSpecies.h.

Member Typedef Documentation

The correct Interaction type for this FrictionForceSpecies.

Definition at line 40 of file MindlinSpecies.h.

Constructor & Destructor Documentation

MindlinSpecies::MindlinSpecies ( )

The default constructor.

Definition at line 35 of file MindlinSpecies.cc.

References shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

36 {
40  //k_edit
41  //setting the shear modulus to have a default value of zero, in-keeping with the other parameters...
42  shearModulus_ = 0;
43  //...and the same for K_t0
44 #ifdef DEBUG_CONSTRUCTOR
45  std::cout<<"MindlinSpecies::MindlinSpecies() finished"<<std::endl;
46 #endif
47 }
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_
MindlinSpecies::MindlinSpecies ( const MindlinSpecies s)

The default copy constructor.

Parameters
[in]sthe species that is copied

Definition at line 52 of file MindlinSpecies.cc.

References shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

53 {
57  //k_edit
58  //setting the shear modulus to the value of 's', in-keeping with the other parameters...
60 #ifdef DEBUG_CONSTRUCTOR
61  std::cout<<"MindlinSpecies::MindlinSpecies(const MindlinSpecies &p) finished"<<std::endl;
62 #endif
63 }
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_
MindlinSpecies::~MindlinSpecies ( )
virtual

The default destructor.

Definition at line 65 of file MindlinSpecies.cc.

66 {
67 #ifdef DEBUG_DESTRUCTOR
68  std::cout<<"MindlinSpecies::~MindlinSpecies() finished"<<std::endl;
69 #endif
70 }

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 101 of file MindlinSpecies.cc.

102 {
103  return "Mindlin";
104 }
Mdouble MindlinSpecies::getShearModulus ( ) const

Definition at line 177 of file MindlinSpecies.cc.

References shearModulus_.

Referenced by MindlinInteraction::computeFrictionForce().

177  {
178  return shearModulus_;
179 }
Mdouble shearModulus_
Mdouble MindlinSpecies::getSlidingDissipation ( ) const

Allows the tangential viscosity to be accessed.

Definition at line 120 of file MindlinSpecies.cc.

References slidingDissipation_.

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

121 {
122  return slidingDissipation_;
123 }
Mdouble slidingDissipation_
tangential dissipation coefficient.
Mdouble MindlinSpecies::getSlidingFrictionCoefficient ( ) const

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

Definition at line 142 of file MindlinSpecies.cc.

References slidingFrictionCoefficient_.

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

143 {
145 }
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Mdouble MindlinSpecies::getSlidingFrictionCoefficientStatic ( ) const

Allows the static Coulomb friction coefficient to be accessed.

Definition at line 182 of file MindlinSpecies.cc.

References slidingFrictionCoefficientStatic_.

Referenced by mix().

183 {
185 }
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 BaseSpecies.

Definition at line 193 of file MindlinSpecies.cc.

194 {
195  return true;
196 }
void MindlinSpecies::mix ( MindlinSpecies *const  SFrictional,
MindlinSpecies *const  TFrictional 
)

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
Todo:
KWY: Add a 'mix' property for shear modulus

Definition at line 205 of file MindlinSpecies.cc.

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

206 {
210 }
Mdouble getSlidingDissipation() const
Allows the tangential viscosity to be accessed.
Mdouble slidingDissipation_
tangential dissipation coefficient.
Mdouble getSlidingFrictionCoefficient() const
Allows the (dynamic) Coulomb friction coefficient to be accessed.
Mdouble getSlidingFrictionCoefficientStatic() const
Allows the static Coulomb friction coefficient to be accessed.
Mdouble slidingFrictionCoefficient_
(dynamic) Coulomb friction coefficient
Mdouble average(Mdouble a, Mdouble b)
defines the average of two variables by the harmonic mean.
Definition: BaseSpecies.cc:85
Mdouble slidingFrictionCoefficientStatic_
static Coulomb friction coefficient (by default set equal to mu)
void MindlinSpecies::read ( std::istream &  is)
overridevirtual

Reads the species properties from an input stream.

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

Implements BaseObject.

Definition at line 88 of file MindlinSpecies.cc.

References shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

Referenced by MindlinRollingTorsionSpecies::read().

89 {
90  //BaseSpecies::read(is);
91  std::string dummy;
92  is >> dummy >> shearModulus_;
93  is >> dummy >> slidingDissipation_;
94  is >> dummy >> slidingFrictionCoefficient_;
95  is >> dummy >> slidingFrictionCoefficientStatic_;
96 }
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_
void MindlinSpecies::setShearModulus ( Mdouble  new_G)

Definition at line 162 of file MindlinSpecies.cc.

References shearModulus_.

162  {
163  //sanity check to ensure that a negative shear modulus cannot be set!
164  if (new_G >= 0)
165  {
166  shearModulus_ = new_G;
167  }
168  else
169  {
170  std::cerr << "Error in setShearModulus" << std::endl;
171  exit(-1);
172  }
173 }
Mdouble shearModulus_
void MindlinSpecies::setSlidingDissipation ( Mdouble  new_dispt)

Allows the tangential viscosity to be changed.

Definition at line 109 of file MindlinSpecies.cc.

References slidingDissipation_.

110 {
111  if (new_dispt >= 0)
112  slidingDissipation_ = new_dispt;
113  else
114  {
115  std::cerr << "Error in setSlidingDissipation" << std::endl;
116  exit(-1);
117  }
118 }
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 127 of file MindlinSpecies.cc.

References slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

128 {
129  if (new_mu >= 0)
130  {
133  }
134  else
135  {
136  std::cerr << "Error in setSlidingFrictionCoefficient" << std::endl;
137  exit(-1);
138  }
139 }
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.

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

Definition at line 148 of file MindlinSpecies.cc.

References slidingFrictionCoefficientStatic_.

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

Writes the species properties to an output stream.

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

Implements BaseObject.

Definition at line 76 of file MindlinSpecies.cc.

References shearModulus_, slidingDissipation_, slidingFrictionCoefficient_, and slidingFrictionCoefficientStatic_.

Referenced by MindlinRollingTorsionSpecies::write().

77  {
78  //BaseSpecies::write(os);
79  os << " shearModulus " << shearModulus_;
80  os << " slidingDissipation " << slidingDissipation_;
81  os << " slidingFrictionCoefficient " << slidingFrictionCoefficient_;
82  os << " slidingFrictionCoefficientStatic " << slidingFrictionCoefficientStatic_;
83 }
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_

Member Data Documentation

Mdouble MindlinSpecies::shearModulus_
private

Definition at line 117 of file MindlinSpecies.h.

Referenced by getShearModulus(), MindlinSpecies(), read(), setShearModulus(), 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.

Bug:
not used currently

Definition at line 107 of file MindlinSpecies.h.

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

Mdouble MindlinSpecies::slidingFrictionCoefficient_
private

(dynamic) Coulomb friction coefficient

Definition at line 110 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 113 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: