MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MindlinInteraction Class Reference

Computes the forces corresponding to sliding friction. More...

#include <MindlinInteraction.h>

+ Inheritance diagram for MindlinInteraction:

Public Types

typedef MindlinSpecies SpeciesType
 An alias name for MindlinSpecies data type. More...
 

Public Member Functions

 MindlinInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
 Constructor. More...
 
 MindlinInteraction (const MindlinInteraction &p)
 Copy constructor. More...
 
 MindlinInteraction ()
 Empty constructor. More...
 
virtual ~MindlinInteraction ()
 Destructor. More...
 
void computeFrictionForce ()
 Computes the tangential force generated due to compression in the sliding spring. Does take into account if the interaction is between particle-particle or particle-wall. More...
 
void read (std::istream &is) override
 Interaction read function, which accepts an std::istream as input. More...
 
void write (std::ostream &os) const override
 Interaction write function, which accepts an std::ostream as input. More...
 
void integrate (Mdouble timeStep) override
 Increments the amount of compression in sliding spring. More...
 
Mdouble getElasticEnergy () const override
 Returns the amount of elastic energy stored in sliding spring. More...
 
Mdouble getTangentialOverlap () const override
 Returns the amount of tangential overlap which is needed by BaseInteraction::writeToFstat(). More...
 
std::string getBaseName () const
 Returns the type/name of interaction (sliding friction interaction) More...
 
const Vec3D getTangentialForce () const override
 Returns the sliding friction force vector. More...
 
const Mdouble getTangentialForceDirection () const
 
Mdouble getAbsoluteNormalForcePrevious () const
 Returns the absolute value of the norm (length) of the previous Normal force vector. More...
 
void setAbsoluteNormalForcePrevious (Mdouble absoluteNormalForcePrevious)
 allows the previous normal force to be (re)set from external classes More...
 
const MindlinSpeciesgetSpecies () const
 Returns a const pointer of type MindlinSpecies*. More...
 
void reverseHistory () override
 A useful feature if one wants to return to the initial state of the spring. However, reverse history decrements the current state to the state corresponding to previous time step. Decrements the value of slidingSpring_. More...
 
void rotateHistory (Matrix3D &rotationMatrix) override
 When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that. More...
 
void setTangentialStiffnessZero (Mdouble newKt0)
 
Mdouble getTangentialStiffnessZero ()
 
Mdouble getTangentialStiffness ()
 
void updateTangentialStiffnessZero (Mdouble rad, double shearMod)
 
void updateTangentialStiffnessInitial (Mdouble fric)
 
void updateTangentialStiffnessInitial2 (const Mdouble fric, const Vec3D direction)
 
void updateTangentialStiffnessUnloading (const Mdouble fric, const Vec3D direction)
 
void updateTangentialStiffnessReloading (const Mdouble fric, const Vec3D direction)
 
void updateTangentialStiffnessReloadingTanUp (const Mdouble fric, const Vec3D direction)
 
void updateTangentialStiffnessUnloadingTanDown (const Mdouble fric, const Vec3D direction)
 
void updateK_t (const Mdouble fric, const Vec3D direction, const bool useTurningPoint, const bool isLoading)
 
- Public Member Functions inherited from BaseInteraction
 BaseInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
 A constructor takes the BaseInteractable objects which are interacting (come into contact) and time the interaction starts. More...
 
 BaseInteraction (const BaseInteraction &p)
 Copy constructor. More...
 
 BaseInteraction ()
 Empty constructor. More...
 
virtual ~BaseInteraction ()
 The default destructor. More...
 
virtual void actionsOnErase ()
 If an interaction needs to do something before it gets erased, add it here. E.g. Liquid bridges rupture at the end of their lifetime, and the liquid bridge volume has to be redistributed. The reason this action is not done in the destructor is that this action should not be taken when erasing ghost interactions. More...
 
virtual void computeForce ()
 Virtual function that contains the force law between the two objects interacting. More...
 
void writeToFStat (std::ostream &os) const
 Writes forces data to the FStat file. More...
 
virtual std::string getName () const
 Virtual function which allows interactions to be named. More...
 
void setDistance (Mdouble distance)
 Sets the interaction distance between the two interacting objects. More...
 
void setNormal (Vec3D normal)
 Sets the normal vector between the two interacting objects. More...
 
void setOverlap (Mdouble overlap)
 Set the overlap between the two interacting object. More...
 
void setContactPoint (Vec3D contactPoint)
 Set the location of the contact point between the two interacting objects. More...
 
void setTimeStamp (Mdouble timeStamp)
 Updates the time step of the interacting. Note, timesteps used to find completed interactions. More...
 
void setSpecies (BaseSpecies *species)
 Set the Species of the interaction; note this can either be a Species or MixedSpecies. More...
 
void setP (BaseInteractable *P)
 Sets the first object involved in the interaction (normally a particle). More...
 
void setI (BaseInteractable *I)
 Sets the second object involved in the interaction (often particle or wall). More...
 
void setHandler (InteractionHandler *handler)
 Sets the pointer to the interaction hander which is storing this interaction. More...
 
InteractionHandlergetHandler () const
 Gets a point to the interaction handlers to which this interaction belongs. More...
 
const Vec3DgetForce () const
 Gets the current force (vector) between the two interacting objects. More...
 
const Vec3DgetTorque () const
 Gets the current torque (vector) between the two interacting objects. More...
 
const Vec3DgetNormal () const
 Gets the normal vector between the two interacting objects. More...
 
const Vec3DgetContactPoint () const
 Gets constant reference to contact point (vector). More...
 
Mdouble getOverlap () const
 Returns a Mdouble with the current overlap between the two interacting objects. More...
 
Mdouble getContactRadius () const
 Returns a Mdouble with the current contact between the two interacting objects. More...
 
void removeFromHandler ()
 Removes this interaction from its interaction hander. More...
 
void copySwitchPointer (const BaseInteractable *original, BaseInteractable *ghost) const
 This copies the interactions of the original particle and replaces the original with the ghost copy. More...
 
void gatherContactStatistics ()
 
BaseInteractablegetP ()
 Returns a pointer to first object involved in the interaction (normally a particle). More...
 
BaseInteractablegetI ()
 
const BaseInteractablegetP () const
 
const BaseInteractablegetI () const
 Returns a constant pointer to the second object involved in the interaction. More...
 
Mdouble getTimeStamp () const
 Returns an Mdouble which is the time stamp of the interaction. More...
 
Mdouble getDistance () const
 Returns an Mdouble which is the norm (length) of distance vector. More...
 
const Vec3DgetRelativeVelocity () const
 Returns a constant reference to a vector of relative velocity. More...
 
Mdouble getNormalRelativeVelocity () const
 Returns a double which is the norm (length) of the relative velocity vector. More...
 
Mdouble getAbsoluteNormalForce () const
 Returns the absolute value of the norm (length) of the Normal force vector. More...
 
virtual BaseInteractioncopy () const =0
 Makes a copy of the interaction and returns a pointer to the copy. More...
 
unsigned int getMultiContactIdentifier () const
 
void setMultiContactIdentifier (unsigned int multiContactIdentifier_)
 
virtual void actionsAfterTimeStep ()
 
virtual unsigned getNumberOfFieldsVTK () const
 
virtual std::string getTypeVTK (unsigned i) const
 
virtual std::string getNameVTK (unsigned i) const
 
virtual std::vector< MdoublegetFieldVTK (unsigned i) const
 
void setForce (Vec3D force)
 set total force (this is used by the normal force, tangential forces are added use addForce) 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 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...
 

Protected Attributes

Vec3D slidingSpring_
 Stores the amount of sliding spring ( $\delta$) compression from the expression $f_t=-k*\delta-\nu*relVel$. Set in the member function integrate(), used in computeFrictionForce(). More...
 
Vec3D slidingSpringPrevious_
 
Vec3D slidingSpringVelocity_
 Stores the rate at which the sliding spring compressed or relaxed. Set in the member function computeFrictionForce() and used in integrate(). More...
 
Vec3D tangentialForce_
 Computes the tangential force such that $|f_t|=\mu*|f_n|$. Set and computed in computeFrictionForce(). More...
 
Vec3D tangentialForcePrevious_
 
Mdouble tangentialForceDirection_
 
Vec3D tangentialForceTurningPointLU_
 
Vec3D tangentialForceTurningPointUL_
 
Vec3D tangentialForceTurningPointLUTemp_
 
Vec3D tangentialForceTurningPointULTemp_
 
Vec3D tangentialDisplacementTurningPointUL_
 
Vec3D tangentialDisplacementTurningPointLU_
 
Mdouble tangentialStiffnessZero_
 
Mdouble tangentialStiffnessZeroPrevious_
 
Mdouble tangentialStiffness_
 
bool priorLoadingFlag_
 
Vec3D tangentialForceTemp_
 
Vec3D tangentialDisplacementTemp_
 
Vec3D tangentialForceTemp2_
 
Vec3D tangentialDisplacementTemp2_
 
Mdouble tangentialDisplacementSL_
 
Vec3D initialTangentialVelocity_
 
Mdouble absoluteNormalForcePrevious_
 

Additional Inherited Members

- Protected Member Functions inherited from BaseInteraction
Mdouble getEffectiveRadius () const
 Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More...
 
Mdouble getEffectiveMass () const
 Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More...
 
Mdouble getEffectiveCorrectedRadius ()
 Returns a Mdouble to the effective radius corrected for the overlaps of the particles. More...
 
void addForce (Vec3D force)
 add an force increment to the total force. More...
 
void addTorque (Vec3D torque)
 
void setTorque (Vec3D torque)
 set the total force (this is used by the normal force, tangential torques are added use addTorque) More...
 
void setRelativeVelocity (Vec3D relativeVelocity)
 set the relative velocity of the current of the interactions. More...
 
void setNormalRelativeVelocity (Mdouble normalRelativeVelocit)
 set the normal component of the relative velocity. More...
 
void setAbsoluteNormalForce (Mdouble absoluteNormalForce)
 the absolute values of the norm (length) of the normal force More...
 
const BaseSpeciesgetBaseSpecies () const
 Return a constant point to BaseSpecies of the interaction. More...
 
virtual Mdouble getElasticEnergyAtEquilibrium (Mdouble adhesiveForce) const
 

Detailed Description

Computes the forces corresponding to sliding friction.

Definition at line 39 of file MindlinInteraction.h.

Member Typedef Documentation

An alias name for MindlinSpecies data type.

Definition at line 45 of file MindlinInteraction.h.

Constructor & Destructor Documentation

MindlinInteraction::MindlinInteraction ( BaseInteractable P,
BaseInteractable I,
unsigned  timeStamp 
)

Constructor.

Parameters
[in]P
[in]I
[in]timeStamp

Definition at line 39 of file MindlinInteraction.cc.

References absoluteNormalForcePrevious_, initialTangentialVelocity_, priorLoadingFlag_, Vec3D::setZero(), slidingSpring_, slidingSpringPrevious_, tangentialDisplacementSL_, tangentialDisplacementTemp2_, tangentialDisplacementTemp_, tangentialDisplacementTurningPointLU_, tangentialDisplacementTurningPointUL_, tangentialForceDirection_, tangentialForceTemp2_, tangentialForceTemp_, tangentialForceTurningPointLU_, tangentialForceTurningPointLUTemp_, tangentialForceTurningPointUL_, tangentialForceTurningPointULTemp_, tangentialStiffness_, tangentialStiffnessZero_, and tangentialStiffnessZeroPrevious_.

40  : BaseInteraction(P, I, timeStamp)
41 {
43  //k_edit
44  //setting the "previousSlidingSpring_" initially to zero, as before a contact
45  //this parameter should (obviously) not carry a value.
47  //similarly, setting the turning point tangential forces to zero, as a "new"
48  //interaction will clearly have no such history
51  //k_edit
52  //setting the K_t0 parameter by default to zero...
54  //...and its previous value...
56 
58  //k_edit
59  //...and, similarly, the "normal" tangential stiffness, K_t
61  //k_edit
62  //setting the tangential force direction by default to -1 (i.e. acting against the motion!)
64  //k_edit
65  //setting to zero the temporary 'holders' which store intermediate values of tangential force
66  //and displacement during multiple-step force calculations
71  //Similarly for temporary turning point force values...
74  //...and the turning point displacement values
77  //k_edit
78  //setting the variable which stores the minimum displacement for simple loading to zero
80  //k_edit
81  //setting the priorLoadingFlag to zero as, when an interaction is created for the first time,
82  //there will, by definition, have been no prior loading
84  //ensuring that the initial tangential velocity of a new interaction is zero until updated
86 
87 #ifdef DEBUG_CONSTRUCTOR
88  std::cout<<"MindlinInteraction::MindlinInteraction() finished"<<std::endl;
89 #endif
90 }
Vec3D tangentialForceTurningPointULTemp_
Vec3D tangentialDisplacementTurningPointLU_
Mdouble absoluteNormalForcePrevious_
void setZero()
Sets all elements to zero.
Definition: Vector.cc:52
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
BaseInteraction()
Empty constructor.
Mdouble tangentialStiffnessZeroPrevious_
Vec3D tangentialDisplacementTurningPointUL_
Vec3D tangentialForceTurningPointLUTemp_
MindlinInteraction::MindlinInteraction ( const MindlinInteraction p)

Copy constructor.

Parameters
[in]p

Definition at line 94 of file MindlinInteraction.cc.

References absoluteNormalForcePrevious_, initialTangentialVelocity_, priorLoadingFlag_, slidingSpring_, tangentialDisplacementSL_, tangentialDisplacementTemp2_, tangentialDisplacementTemp_, tangentialDisplacementTurningPointLU_, tangentialDisplacementTurningPointUL_, tangentialForceDirection_, tangentialForceTemp2_, tangentialForceTemp_, tangentialForceTurningPointLU_, tangentialForceTurningPointLUTemp_, tangentialForceTurningPointUL_, tangentialForceTurningPointULTemp_, tangentialStiffness_, tangentialStiffnessZero_, and tangentialStiffnessZeroPrevious_.

95  : BaseInteraction(p)
96 {
98  //k_edit
99  //setting the K_t0 parameter to that possessed by the interaction
100  //to be copied....
102  //...and its previous value...
104  //...and the same for the "normal" tangential stiffness parameter
106  //k_edit
107  //allowing turning point forces to be copied when an interaction is copied
110  //k_edit
111  //allowing the direction of the tangential force to be "remembered" also
112  //by the copied interaction
114  //k_edit
115  //copying the temporary 'holders' which store intermediate values of tangential force
116  //and displacement during multiple-step force calculations
121  //and similarly for the temporary turning point variables
124  //...and the displacement equivalents
127  //k_edit
128  //copying the variable which stores the minimum displacement for simple loading
130  //k_edit
132  //copying the initial tangential velocity
134 
136 #ifdef DEBUG_CONSTRUCTOR
137  std::cout<<"MindlinInteraction::MindlinInteraction(const MindlinInteraction& p) finished"<<std::endl;
138 #endif
139 }
Vec3D tangentialForceTurningPointULTemp_
Vec3D tangentialDisplacementTurningPointLU_
Mdouble absoluteNormalForcePrevious_
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
BaseInteraction()
Empty constructor.
Mdouble tangentialStiffnessZeroPrevious_
Vec3D tangentialDisplacementTurningPointUL_
Vec3D tangentialForceTurningPointLUTemp_
MindlinInteraction::MindlinInteraction ( )

Empty constructor.

Definition at line 143 of file MindlinInteraction.cc.

References FATAL, and logger.

144 {
145 #ifdef MERCURY_USE_MPI
146  logger(FATAL,"MindlinInteractions are currently not implemented in parallel MercuryDPM");
147 #endif
148 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
MindlinInteraction::~MindlinInteraction ( )
virtual

Destructor.

Definition at line 152 of file MindlinInteraction.cc.

153 {
154 #ifdef DEBUG_DESTRUCTOR
155  std::cout<<"MindlinInteraction::~MindlinInteraction() finished"<<std::endl;
156 #endif
157 }

Member Function Documentation

void MindlinInteraction::computeFrictionForce ( )

Computes the tangential force generated due to compression in the sliding spring. Does take into account if the interaction is between particle-particle or particle-wall.

Definition at line 262 of file MindlinInteraction.cc.

References BaseInteraction::addForce(), Vec3D::dot(), BaseInteraction::getAbsoluteNormalForce(), BaseInteraction::getDistance(), BaseHandler< T >::getDPMBase(), BaseInteraction::getEffectiveMass(), BaseInteraction::getEffectiveRadius(), BaseInteraction::getHandler(), BaseInteraction::getI(), Vec3D::getLength(), BaseInteraction::getNormal(), BaseInteraction::getNormalRelativeVelocity(), BaseInteraction::getP(), BaseInteraction::getRelativeVelocity(), MindlinSpecies::getShearModulus(), MindlinSpecies::getSlidingDissipation(), MindlinSpecies::getSlidingFrictionCoefficient(), getSpecies(), DPMBase::getTimeStep(), slidingSpring_, slidingSpringPrevious_, slidingSpringVelocity_, tangentialForce_, tangentialStiffnessZero_, and updateTangentialStiffnessZero().

Referenced by MindlinRollingTorsionInteraction::computeFrictionForce().

262  {
263  //If tangential forces are absent
264  if (getAbsoluteNormalForce() == 0.0) return;
265 
266  const MindlinSpecies *species = getSpecies();//dynamic_cast
267 
268  //Checking if the relevant particle species has a non-zero friction coefficient
269  if (species->getSlidingFrictionCoefficient() != 0.0) {
270  //Compute the tangential component of relativeVelocity_
271  Vec3D tangentialRelativeVelocity = getRelativeVelocity() - getNormal() * getNormalRelativeVelocity();
272  {
273  // *************************************************************************************************************************
274  // **********************************************GENERAL CALCULATIONS*******************************************************
275  // *************************************************************************************************************************
276  //used to Integrate the spring
277  //if particle-wall
278  if (dynamic_cast<BaseParticle *>(getI()) == 0) {
279  slidingSpringVelocity_ = tangentialRelativeVelocity;
280  }
281  //if particle-particle
282  else {
283  slidingSpringVelocity_ = (tangentialRelativeVelocity -
284  Vec3D::dot(slidingSpring_, getP()->getVelocity() - getI()->getVelocity()) *
285  getNormal() / getDistance());
286  }
287  //integrate(getHandler()->timeStep_);
289 
290  //1) Calculating the current value of K_t0
291  //This is identical for both unloading and loading (under constant normal force) and hence can
292  //potentially later be moved for neatness/efficiency
293  Mdouble r1 = 1.0 * getEffectiveRadius();
295 
296  //2) Calculating the relevant tangential dissipation constant based on the current stiffness (and other relevant parameters)
297  Mdouble slidingDissipationCoefficient = species->getSlidingDissipation()*sqrt(8.0*getEffectiveMass()*tangentialStiffnessZero_);
298 
299  //3) Using the parameters determined above, calculating the tangential force as per Di Maio and Di Renzo eqn. (37)
300  tangentialForce_ = - tangentialStiffnessZero_ * slidingSpring_ - slidingDissipationCoefficient * tangentialRelativeVelocity;
301 
302  //applying the Coulomb criterion (Di Maio and Di Renzo eqn. (36)) to ensure falsely large tangential forces are avoided
303  //if all is OK, i.e. if tangential force is smaller than mu*f_n, we simply add the tangential force calculated.
306  }
307  //otherwise, we take the force as mu*f_n and recalculate the spring length accordingly
308  else {
309 
311  //adding the force as mu*f_n
313  //updating the spring length accordingly
314  slidingSpring_ = -(tangentialForce_ + slidingDissipationCoefficient * tangentialRelativeVelocity) / tangentialStiffnessZero_;
315  }
316  }
317  }
319 }
Mdouble getSlidingDissipation() const
Allows the tangential viscosity to be accessed.
Mdouble getEffectiveRadius() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) ...
void updateTangentialStiffnessZero(Mdouble rad, double shearMod)
Mdouble getSlidingFrictionCoefficient() const
Allows the (dynamic) Coulomb friction coefficient to be accessed.
InteractionHandler * getHandler() const
Gets a point to the interaction handlers to which this interaction belongs.
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
const Vec3D & getRelativeVelocity() const
Returns a constant reference to a vector of relative velocity.
double Mdouble
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:167
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
MindlinSpecies contains the parameters used to describe sliding friction.
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Definition: Vector.cc:414
Mdouble getNormalRelativeVelocity() const
Returns a double which is the norm (length) of the relative velocity vector.
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Mdouble getShearModulus() const
void addForce(Vec3D force)
add an force increment to the total force.
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
BaseInteractable * getI()
Mdouble getDistance() const
Returns an Mdouble which is the norm (length) of distance vector.
const MindlinSpecies * getSpecies() const
Returns a const pointer of type MindlinSpecies*.
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Definition: BaseHandler.h:543
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
Definition: DPMBase.cc:465
Mdouble getEffectiveMass() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) ...
Mdouble getAbsoluteNormalForce() const
Returns the absolute value of the norm (length) of the Normal force vector.
Mdouble MindlinInteraction::getAbsoluteNormalForcePrevious ( ) const

Returns the absolute value of the norm (length) of the previous Normal force vector.

Return the absolve normal force. This is the magnitude of the normal force.

Todo:
Ant: Check this comment.
Returns
Mdouble that contains the absolute norm (length) of the normal force.

Definition at line 406 of file MindlinInteraction.cc.

References absoluteNormalForcePrevious_.

407 {
409 }
Mdouble absoluteNormalForcePrevious_
std::string MindlinInteraction::getBaseName ( ) const

Returns the type/name of interaction (sliding friction interaction)

Returns
std::string

Definition at line 377 of file MindlinInteraction.cc.

378 {
379  return "Mindlin";
380 }
Mdouble MindlinInteraction::getElasticEnergy ( ) const
overridevirtual

Returns the amount of elastic energy stored in sliding spring.

Returns
Mdouble

Reimplemented from BaseInteraction.

Reimplemented in MindlinRollingTorsionInteraction.

Definition at line 331 of file MindlinInteraction.cc.

References Vec3D::getLengthSquared(), slidingSpring_, and tangentialStiffness_.

Referenced by MindlinRollingTorsionInteraction::getElasticEnergy().

332 {
333 
334  //new_edit replacing outdated 'getSlidingStiffness()'
335  //return 0.5 * getSpecies()->getSlidingStiffness() * slidingSpring_.getLengthSquared();
337 }
static Mdouble getLengthSquared(const Vec3D &a)
Calculates the squared length of a Vec3D: .
Definition: Vector.cc:291
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
const MindlinSpecies * MindlinInteraction::getSpecies ( ) const

Returns a const pointer of type MindlinSpecies*.

Returns
const MindlinSpecies*

Definition at line 370 of file MindlinInteraction.cc.

References BaseInteraction::getBaseSpecies().

Referenced by computeFrictionForce().

371 {
372  return dynamic_cast<const MindlinSpecies*>(getBaseSpecies());
373 }
MindlinSpecies contains the parameters used to describe sliding friction.
const BaseSpecies * getBaseSpecies() const
Return a constant point to BaseSpecies of the interaction.
const Vec3D MindlinInteraction::getTangentialForce ( ) const
overridevirtual

Returns the sliding friction force vector.

Returns
const Vec3D

Reimplemented from BaseInteraction.

Definition at line 353 of file MindlinInteraction.cc.

References tangentialForce_.

354 {
355  return tangentialForce_;
356 }
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
const Mdouble MindlinInteraction::getTangentialForceDirection ( ) const

Definition at line 363 of file MindlinInteraction.cc.

References tangentialForceDirection_.

364 {
366 }
Mdouble MindlinInteraction::getTangentialOverlap ( ) const
overridevirtual

Returns the amount of tangential overlap which is needed by BaseInteraction::writeToFstat().

Returns
Mdouble
Todo:
TWnow this should be positive

Reimplemented from BaseInteraction.

Definition at line 341 of file MindlinInteraction.cc.

References Vec3D::dot(), Vec3D::getLength(), Vec3D::getUnitVector(), and slidingSpring_.

342 {
344  //k_edit Indeed it should - todo done :)
345  //k_edit
346  //Updating sliding spring to give positive / negative values dependent on the direction of the extension
348 }
static Vec3D getUnitVector(const Vec3D &a)
Returns a unit Vec3D based on a.
Definition: Vector.cc:428
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:167
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Definition: Vector.cc:414
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45
Mdouble MindlinInteraction::getTangentialStiffness ( )

Definition at line 193 of file MindlinInteraction.cc.

References tangentialStiffness_.

193  {
194  return tangentialStiffness_;
195 }
Mdouble MindlinInteraction::getTangentialStiffnessZero ( )

Definition at line 187 of file MindlinInteraction.cc.

References tangentialStiffnessZero_.

187  {
189 }
void MindlinInteraction::integrate ( Mdouble timeStep  )
overridevirtual

Increments the amount of compression in sliding spring.

Parameters
[in]timeStepthe dt

Reimplemented from BaseInteraction.

Reimplemented in MindlinRollingTorsionInteraction.

Definition at line 324 of file MindlinInteraction.cc.

References slidingSpring_, and slidingSpringVelocity_.

Referenced by MindlinRollingTorsionInteraction::integrate().

325 {
327 }
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
void MindlinInteraction::read ( std::istream &  is)
overridevirtual

Interaction read function, which accepts an std::istream as input.

Parameters
[in,out]is

Reimplemented from BaseInteraction.

Reimplemented in MindlinRollingTorsionInteraction.

Definition at line 169 of file MindlinInteraction.cc.

References slidingSpring_.

Referenced by MindlinRollingTorsionInteraction::read().

170 {
171  //BaseInteraction::read(is);
172  std::string dummy;
173  is >> dummy >> slidingSpring_;
174 }
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
void MindlinInteraction::reverseHistory ( )
overridevirtual

A useful feature if one wants to return to the initial state of the spring. However, reverse history decrements the current state to the state corresponding to previous time step. Decrements the value of slidingSpring_.

Reimplemented from BaseInteraction.

Reimplemented in MindlinRollingTorsionInteraction.

Definition at line 384 of file MindlinInteraction.cc.

References slidingSpring_, slidingSpringVelocity_, and tangentialForce_.

Referenced by MindlinRollingTorsionInteraction::reverseHistory().

385 {
389 }
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
void MindlinInteraction::rotateHistory ( Matrix3D rotationMatrix)
overridevirtual

When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that.

Todo:
some of these might be unneccesary

Reimplemented from BaseInteraction.

Reimplemented in MindlinRollingTorsionInteraction.

Definition at line 391 of file MindlinInteraction.cc.

References slidingSpring_, slidingSpringVelocity_, and tangentialForce_.

Referenced by MindlinRollingTorsionInteraction::rotateHistory().

392 {
393  slidingSpring_=rotationMatrix*slidingSpring_;
395  tangentialForce_=rotationMatrix*tangentialForce_;
396 }
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
void MindlinInteraction::setAbsoluteNormalForcePrevious ( Mdouble  absoluteNormalForcePrevious)

allows the previous normal force to be (re)set from external classes

set absolute normal force.

Parameters
[in]absoluteNormalForceMdouble contain the value of the absolute normal force.

Definition at line 417 of file MindlinInteraction.cc.

References absoluteNormalForcePrevious_.

418 {
419  absoluteNormalForcePrevious_ = absoluteNormalForcePrevious;
420 }
Mdouble absoluteNormalForcePrevious_
void MindlinInteraction::setTangentialStiffnessZero ( Mdouble  newKt0)

Definition at line 181 of file MindlinInteraction.cc.

References tangentialStiffnessZero_.

181  {
182  tangentialStiffnessZero_ = newKt0;
183 }
void MindlinInteraction::updateK_t ( const Mdouble  fric,
const Vec3D  direction,
const bool  useTurningPoint,
const bool  isLoading 
)

Definition at line 215 of file MindlinInteraction.cc.

References Vec3D::dot(), BaseInteraction::getAbsoluteNormalForce(), Vec3D::getLength(), Vec3D::getUnitVector(), tangentialForceTemp_, tangentialForceTurningPointLU_, tangentialForceTurningPointUL_, tangentialStiffness_, and tangentialStiffnessZero_.

215  {
216  //creating a simple positive or negative integer 'multiplier', m, whose values are either +1 or -1
217  //that can be used to alter the relevant equations depending on if we are loading or unloading
218  Mdouble m;
219  //A parameter to temporarily hold the relevant turning point so that this function can work both for
220  //loading and loading.
221  Vec3D turningPoint;
222  //Changing the directions and turning points used in calculation depending on if we are loading or unloading
223  if (isLoading) {
224  m = 1;
225  turningPoint = tangentialForceTurningPointUL_;
226  }
227  else {
228  m = -1;
229  turningPoint = tangentialForceTurningPointLU_;
230  }
231  //if the current part of the interaction can be treated as a virgin loading
232  //(i.e. the turning point can be ignored), we simply update K_t in the 'standard' manner
233  if (!useTurningPoint) {
234  //determining the direction of the current tangential force relative to the
235  //current direction of motion
236  Mdouble forceDirection = Vec3D::dot(Vec3D::getUnitVector(tangentialForceTemp_),direction);
237  //finding the scalar ratio f_t1 / (mu f_n1)
238  //(note for a first loading f_t1 is simply equal to f_t, and similarly f_n1 f_n = const
239  Mdouble forceRatio = tangentialForceTemp_.getLength() / (fric * getAbsoluteNormalForce());
240  //changing the direction of the force ratio, if necessary, based on its relative orientation
241  //with respect to the current tangential motion.
242  if (forceDirection<0)
243  forceRatio = -forceRatio;
244  //using the scalar ratio to update tangential stiffness
245  tangentialStiffness_ = tangentialStiffnessZero_* cbrt(1 - forceRatio);
246  }
247  //alternatively, if we are reloading and within the limits where the turning point force must be considered
248  else {
249  Vec3D resultantForce = m*(tangentialForceTemp_ - turningPoint);
250  //QUESTION: Does it make sense to use the total force here? Or should I just use the tangentialForceTemp?
251  Mdouble forceDirection = Vec3D::dot(Vec3D::getUnitVector(resultantForce),direction);
252  Mdouble forceRatio = resultantForce.getLength() / (2 * fric * getAbsoluteNormalForce());
253  //changing the direction of the force ratio, if necessary, based on its relative orientation
254  //with respect to the current tangential motion.
255  if (forceDirection<0)
256  forceRatio = -forceRatio;
257  //using the scalar ratio to update tangential stiffness
258  tangentialStiffness_ = tangentialStiffnessZero_* cbrt(1 - m*forceRatio);
259  }
260 }
static Vec3D getUnitVector(const Vec3D &a)
Returns a unit Vec3D based on a.
Definition: Vector.cc:428
double Mdouble
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:167
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Definition: Vector.cc:414
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45
Mdouble getAbsoluteNormalForce() const
Returns the absolute value of the norm (length) of the Normal force vector.
void MindlinInteraction::updateTangentialStiffnessInitial ( Mdouble  fric)
void MindlinInteraction::updateTangentialStiffnessInitial2 ( const Mdouble  fric,
const Vec3D  direction 
)
void MindlinInteraction::updateTangentialStiffnessReloading ( const Mdouble  fric,
const Vec3D  direction 
)
void MindlinInteraction::updateTangentialStiffnessReloadingTanUp ( const Mdouble  fric,
const Vec3D  direction 
)
void MindlinInteraction::updateTangentialStiffnessUnloading ( const Mdouble  fric,
const Vec3D  direction 
)
void MindlinInteraction::updateTangentialStiffnessUnloadingTanDown ( const Mdouble  fric,
const Vec3D  direction 
)
void MindlinInteraction::updateTangentialStiffnessZero ( Mdouble  rad,
double  shearMod 
)

Definition at line 202 of file MindlinInteraction.cc.

References BaseInteraction::getOverlap(), and tangentialStiffnessZero_.

Referenced by computeFrictionForce().

202  {
203  //K_t0 = 8G_eq * sqrt(R_eq * delta_n) (Di Renzo and Di Maio)
204  tangentialStiffnessZero_ = 8 * shearMod * sqrt(rad * getOverlap());
205 }
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
void MindlinInteraction::write ( std::ostream &  os) const
overridevirtual

Interaction write function, which accepts an std::ostream as input.

Parameters
[in,out]os

Reimplemented from BaseInteraction.

Reimplemented in MindlinRollingTorsionInteraction.

Definition at line 161 of file MindlinInteraction.cc.

References slidingSpring_.

Referenced by MindlinRollingTorsionInteraction::write().

162 {
163  //BaseInteraction::write(os);
164  os << " slidingSpring " << slidingSpring_;
165 }
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...

Member Data Documentation

Mdouble MindlinInteraction::absoluteNormalForcePrevious_
protected
Vec3D MindlinInteraction::initialTangentialVelocity_
protected

Definition at line 236 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

bool MindlinInteraction::priorLoadingFlag_
protected

Definition at line 215 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Vec3D MindlinInteraction::slidingSpring_
protected

Stores the amount of sliding spring ( $\delta$) compression from the expression $f_t=-k*\delta-\nu*relVel$. Set in the member function integrate(), used in computeFrictionForce().

Definition at line 170 of file MindlinInteraction.h.

Referenced by computeFrictionForce(), getElasticEnergy(), getTangentialOverlap(), integrate(), MindlinInteraction(), read(), reverseHistory(), rotateHistory(), and write().

Vec3D MindlinInteraction::slidingSpringPrevious_
protected

Definition at line 173 of file MindlinInteraction.h.

Referenced by computeFrictionForce(), and MindlinInteraction().

Vec3D MindlinInteraction::slidingSpringVelocity_
protected

Stores the rate at which the sliding spring compressed or relaxed. Set in the member function computeFrictionForce() and used in integrate().

Definition at line 178 of file MindlinInteraction.h.

Referenced by computeFrictionForce(), integrate(), reverseHistory(), and rotateHistory().

Mdouble MindlinInteraction::tangentialDisplacementSL_
protected

Definition at line 233 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Vec3D MindlinInteraction::tangentialDisplacementTemp2_
protected

Definition at line 228 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Vec3D MindlinInteraction::tangentialDisplacementTemp_
protected

Definition at line 222 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Vec3D MindlinInteraction::tangentialDisplacementTurningPointLU_
protected

Definition at line 201 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Vec3D MindlinInteraction::tangentialDisplacementTurningPointUL_
protected

Definition at line 200 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Vec3D MindlinInteraction::tangentialForce_
protected

Computes the tangential force such that $|f_t|=\mu*|f_n|$. Set and computed in computeFrictionForce().

Definition at line 182 of file MindlinInteraction.h.

Referenced by computeFrictionForce(), getTangentialForce(), reverseHistory(), and rotateHistory().

Mdouble MindlinInteraction::tangentialForceDirection_
protected

Definition at line 187 of file MindlinInteraction.h.

Referenced by getTangentialForceDirection(), and MindlinInteraction().

Vec3D MindlinInteraction::tangentialForcePrevious_
protected

Definition at line 185 of file MindlinInteraction.h.

Vec3D MindlinInteraction::tangentialForceTemp2_
protected

Definition at line 227 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Vec3D MindlinInteraction::tangentialForceTemp_
protected

Definition at line 221 of file MindlinInteraction.h.

Referenced by MindlinInteraction(), and updateK_t().

Vec3D MindlinInteraction::tangentialForceTurningPointLU_
protected

Definition at line 193 of file MindlinInteraction.h.

Referenced by MindlinInteraction(), and updateK_t().

Vec3D MindlinInteraction::tangentialForceTurningPointLUTemp_
protected

Definition at line 197 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Vec3D MindlinInteraction::tangentialForceTurningPointUL_
protected

Definition at line 194 of file MindlinInteraction.h.

Referenced by MindlinInteraction(), and updateK_t().

Vec3D MindlinInteraction::tangentialForceTurningPointULTemp_
protected

Definition at line 198 of file MindlinInteraction.h.

Referenced by MindlinInteraction().

Mdouble MindlinInteraction::tangentialStiffness_
protected
Mdouble MindlinInteraction::tangentialStiffnessZeroPrevious_
protected

Definition at line 209 of file MindlinInteraction.h.

Referenced by MindlinInteraction().


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