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...
 
 ~MindlinInteraction () override
 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 (Mdouble fric, Vec3D direction)
 
void updateTangentialStiffnessUnloading (Mdouble fric, Vec3D direction)
 
void updateTangentialStiffnessReloading (Mdouble fric, Vec3D direction)
 
void updateTangentialStiffnessReloadingTanUp (Mdouble fric, Vec3D direction)
 
void updateTangentialStiffnessUnloadingTanDown (Mdouble fric, Vec3D direction)
 
void updateK_t (Mdouble fric, Vec3D direction, bool useTurningPoint, bool isLoading)
 
- Public Member Functions inherited from BaseInteraction
 BaseInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
 A constructor takes the BaseInteractable objects which are interacting (come into contact) and time the interaction starts. More...
 
 BaseInteraction ()
 
 BaseInteraction (const BaseInteraction &p)
 Copy constructor. More...
 
 ~BaseInteraction () override
 The destructor. It removes this interactions from the objects that were interacting, and writes the time to a file when needed. 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, Mdouble time) const
 Writes forces data to the FStat file. More...
 
std::string getName () const override
 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 (unsigned timeStamp)
 Updates the time step of the interacting. Note, time steps used to find completed interactions. More...
 
void setSpecies (const 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 importP (BaseInteractable *P)
 Sets the first object involved in the interaction (normally a particle). More...
 
void importI (BaseInteractable *I)
 Sets the second object involved in the interaction (often particle or wall). More...
 
Vec3D getIP () const
 
Vec3D getIC () const
 
Vec3D getCP () const
 
void setLagrangeMultiplier (Mdouble multiplier)
 
Mdouble getLagrangeMultiplier ()
 
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 getOverlapVolume () const
 Returns the overlap volume between 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 ()
 Returns a pointer to the second object involved in the interaction (often a wall or a particle). More...
 
const BaseInteractablegetP () const
 Returns a constant pointer to the first object involved in the interaction. More...
 
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...
 
void setFStatData (std::fstream &fstat, BaseParticle *P, BaseWall *I)
 
void setFStatData (std::fstream &fstat, BaseParticle *P, BaseParticle *I)
 
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 addForce (Vec3D force)
 add an force increment to the total force. More...
 
void addTorque (Vec3D torque)
 add a torque increment to the total torque. More...
 
void setForce (Vec3D force)
 set total force (this is used by the normal force, tangential forces are added use addForce) More...
 
void setTorque (Vec3D torque)
 set the total force (this is used by the normal force, tangential torques are added use addTorque) More...
 
const BaseSpeciesgetBaseSpecies () const
 Return a constant point to BaseSpecies of the interaction. More...
 
virtual void createMPIType ()
 
virtual void * createMPIInteractionDataArray (unsigned int numberOfInteractions) const
 
virtual void deleteMPIInteractionDataArray (void *dataArray)
 
virtual void getMPIInteraction (void *historyDataArray, unsigned int index) const
 copies the history interactions into the data array More...
 
virtual void getInteractionDetails (void *interactionDataArray, unsigned int index, unsigned int &identificationP, unsigned int &identificationI, bool &isWallInteraction, unsigned &timeStamp)
 
virtual void setMPIInteraction (void *interactionDataArray, unsigned int index, bool resetPointers)
 
void setBasicMPIInteractionValues (int P, int I, unsigned timeStamp, Vec3D force, Vec3D torque, bool isWallInteraction, bool resetPointers)
 
void setIdentificationP (unsigned int identification)
 
void setIdentificationI (int identification)
 
void setWallInteraction (bool flag)
 
unsigned int getIdentificationP ()
 
int getIdentificationI ()
 
bool isWallInteraction ()
 
virtual bool isBonded () const
 
- Public Member Functions inherited from BaseObject
 BaseObject ()=default
 Default constructor. More...
 
 BaseObject (const BaseObject &p)=default
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()=default
 virtual destructor More...
 
virtual void moveInHandler (unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (unsigned long 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...
 
void setGroupId (unsigned groupId)
 
unsigned getGroupId () const
 

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...
 
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...
 
virtual Mdouble getElasticEnergyAtEquilibrium (Mdouble adhesiveForce) const
 
void writeInteraction (std::ostream &os, bool created) const
 Writes information about a interaction to the interaction file. More...
 

Detailed Description

Computes the forces corresponding to sliding friction.

Member Typedef Documentation

◆ SpeciesType

An alias name for MindlinSpecies data type.

Constructor & Destructor Documentation

◆ MindlinInteraction() [1/3]

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

Constructor.

Parameters
[in]P
[in]I
[in]timeStamp
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
83  priorLoadingFlag_ = false;
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 }
BaseInteraction()
Definition: BaseInteraction.cc:65
Vec3D tangentialForceTurningPointULTemp_
Definition: MindlinInteraction.h:219
Vec3D tangentialDisplacementTurningPointLU_
Definition: MindlinInteraction.h:222
Mdouble tangentialForceDirection_
Definition: MindlinInteraction.h:208
Mdouble tangentialStiffnessZero_
Definition: MindlinInteraction.h:228
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
Definition: MindlinInteraction.h:191
Mdouble tangentialStiffness_
Definition: MindlinInteraction.h:232
Vec3D initialTangentialVelocity_
Definition: MindlinInteraction.h:257
Vec3D slidingSpringPrevious_
Definition: MindlinInteraction.h:194
Vec3D tangentialDisplacementTemp_
Definition: MindlinInteraction.h:243
Mdouble tangentialStiffnessZeroPrevious_
Definition: MindlinInteraction.h:230
Vec3D tangentialForceTemp_
Definition: MindlinInteraction.h:242
bool priorLoadingFlag_
Definition: MindlinInteraction.h:236
Vec3D tangentialForceTurningPointLUTemp_
Definition: MindlinInteraction.h:218
Mdouble absoluteNormalForcePrevious_
Definition: MindlinInteraction.h:261
Vec3D tangentialForceTurningPointLU_
Definition: MindlinInteraction.h:214
Mdouble tangentialDisplacementSL_
Definition: MindlinInteraction.h:254
Vec3D tangentialDisplacementTemp2_
Definition: MindlinInteraction.h:249
Vec3D tangentialForceTurningPointUL_
Definition: MindlinInteraction.h:215
Vec3D tangentialForceTemp2_
Definition: MindlinInteraction.h:248
Vec3D tangentialDisplacementTurningPointUL_
Definition: MindlinInteraction.h:221
void setZero()
Sets all elements to zero.
Definition: Vector.cc:43
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73

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

◆ MindlinInteraction() [2/3]

MindlinInteraction::MindlinInteraction ( const MindlinInteraction p)

Copy constructor.

Parameters
[in]p
96  : BaseInteraction(p)
97 {
99  //k_edit
100  //setting the K_t0 parameter to that possessed by the interaction
101  //to be copied....
103  //...and its previous value...
105  //...and the same for the "normal" tangential stiffness parameter
107  //k_edit
108  //allowing turning point forces to be copied when an interaction is copied
111  //k_edit
112  //allowing the direction of the tangential force to be "remembered" also
113  //by the copied interaction
115  //k_edit
116  //copying the temporary 'holders' which store intermediate values of tangential force
117  //and displacement during multiple-step force calculations
122  //and similarly for the temporary turning point variables
125  //...and the displacement equivalents
128  //k_edit
129  //copying the variable which stores the minimum displacement for simple loading
131  //k_edit
133  //copying the initial tangential velocity
135 
137 #ifdef DEBUG_CONSTRUCTOR
138  std::cout<<"MindlinInteraction::MindlinInteraction(const MindlinInteraction& p) finished"<<std::endl;
139 #endif
140 }

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

◆ MindlinInteraction() [3/3]

MindlinInteraction::MindlinInteraction ( )

Empty constructor.

146 {
147  //I don't see why we are restricted in the use of interactions
148 //#ifdef MERCURYDPM_USE_MPI
149 // logger(FATAL,"MindlinInteractions are currently not implemented in parallel MercuryDPM");
150 //#endif
151 }

◆ ~MindlinInteraction()

MindlinInteraction::~MindlinInteraction ( )
override

Destructor.

157 {
158 #ifdef DEBUG_DESTRUCTOR
159  std::cout<<"MindlinInteraction::~MindlinInteraction() finished"<<std::endl;
160 #endif
161 }

Member Function Documentation

◆ computeFrictionForce()

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.

280 {
281  //If tangential forces are absent
282  if (getAbsoluteNormalForce() == 0.0) return;
283 
284  const MindlinSpecies* species = getSpecies();//dynamic_cast
285 
286  //Checking if the relevant particle species has a non-zero friction coefficient
287  if (species->getSlidingFrictionCoefficient() != 0.0)
288  {
289  //Compute the tangential component of relativeVelocity_
290  Vec3D tangentialRelativeVelocity = getRelativeVelocity() - getNormal() * getNormalRelativeVelocity();
291  {
292  // *************************************************************************************************************************
293  // **********************************************GENERAL CALCULATIONS*******************************************************
294  // *************************************************************************************************************************
295  //used to Integrate the spring
296  //Calculating the tangential spring using Luding, S. (2008) eq. (17)
297  const Mdouble springLength = slidingSpring_.getLength();
298  if (springLength > 1e-10)
299  {
301  slidingSpring_ *= springLength / slidingSpring_.getLength();
302  // logger.assert(std::abs(slidingSpring_.getLength() - springLength) < 1e-10, "Spring length not the same after rotation");
303  }
304 
305  //integrate(getHandler()->timeStep_);
306  slidingSpringVelocity_ = tangentialRelativeVelocity;
308  //logger(INFO,"slidingSpring.normalDirection %",Vec3D::dot(slidingSpring_/slidingSpring_.getLength(),getNormal()));
309 
310  //1) Calculating the current value of K_t0
311  //This is identical for both unloading and loading (under constant normal force) and hence can
312  //potentially later be moved for neatness/efficiency
313  Mdouble r1 = 1.0 * getEffectiveRadius();
314  Mdouble shearModulus = species->getEffectiveShearModulus();
315  updateTangentialStiffnessZero(r1, shearModulus);
316 
317  //2) Calculating the relevant tangential dissipation constant based on the current stiffness (and other relevant parameters)
318  Mdouble slidingDissipationCoefficient =
320 
321  //3) Using the parameters determined above, calculating the tangential force as per Di Maio and Di Renzo eqn. (37)
323 
324  //applying the Coulomb criterion (Di Maio and Di Renzo eqn. (36)) to ensure falsely large tangential forces are avoided
325  //if all is OK, i.e. if tangential force is smaller than mu*f_n, we simply add the tangential force calculated.
327  {
328  tangentialForce_ -= slidingDissipationCoefficient * tangentialRelativeVelocity;
330  }
331  //otherwise, we take the force as mu*f_n and recalculate the spring length accordingly
332  else
333  {
336  //adding the force as mu*f_n
338  //updating the spring length accordingly
340  }
341  }
342  }
344 }
double Mdouble
Definition: GeneralDefine.h:34
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Definition: BaseHandler.h:725
const Vec3D & getRelativeVelocity() const
Returns a constant reference to a vector of relative velocity.
Definition: BaseInteraction.cc:573
Mdouble getEffectiveMass() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap)
Definition: BaseInteraction.cc:810
Mdouble getAbsoluteNormalForce() const
Returns the absolute value of the norm (length) of the Normal force vector.
Definition: BaseInteraction.cc:596
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Definition: BaseInteraction.h:226
void addForce(Vec3D force)
add an force increment to the total force.
Definition: BaseInteraction.cc:606
Mdouble getNormalRelativeVelocity() const
Returns a double which is the norm (length) of the relative velocity vector.
Definition: BaseInteraction.cc:584
Mdouble getEffectiveRadius() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap)
Definition: BaseInteraction.cc:793
InteractionHandler * getHandler() const
Gets a point to the interaction handlers to which this interaction belongs.
Definition: BaseInteraction.cc:267
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1250
const MindlinSpecies * getSpecies() const
Returns a const pointer of type MindlinSpecies*.
Definition: MindlinInteraction.cc:398
void updateTangentialStiffnessZero(Mdouble rad, double shearMod)
Definition: MindlinInteraction.cc:212
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
Definition: MindlinInteraction.h:203
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
Definition: MindlinInteraction.h:199
MindlinSpecies contains the parameters used to describe sliding friction.
Definition: MindlinSpecies.h:38
Mdouble getSlidingDissipation() const
Allows the tangential viscosity to be accessed.
Definition: MindlinSpecies.cc:116
Mdouble getEffectiveShearModulus() const
Allows the shear modulus to be accessed.
Definition: MindlinSpecies.cc:183
Mdouble getSlidingFrictionCoefficient() const
Allows the (dynamic) Coulomb friction coefficient to be accessed.
Definition: MindlinSpecies.cc:137
Definition: Vector.h:51
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Definition: Vector.cc:331
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:76

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

Referenced by MindlinRollingTorsionInteraction::computeFrictionForce().

◆ getAbsoluteNormalForcePrevious()

Mdouble MindlinInteraction::getAbsoluteNormalForcePrevious ( ) const

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

Return the absolute 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.
438 {
440 }

References absoluteNormalForcePrevious_.

◆ getBaseName()

std::string MindlinInteraction::getBaseName ( ) const

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

Returns
std::string
408 {
409  return "Mindlin";
410 }

◆ getElasticEnergy()

Mdouble MindlinInteraction::getElasticEnergy ( ) const
overridevirtual

Returns the amount of elastic energy stored in sliding spring.

Returns
Mdouble

Reimplemented from BaseInteraction.

Reimplemented in MindlinRollingTorsionInteraction.

358 {
359 
360  //new_edit replacing outdated 'getSlidingStiffness()'
361  //return 0.5 * getSpecies()->getSlidingStiffness() * slidingSpring_.getLengthSquared();
363 }
static Mdouble getLengthSquared(const Vec3D &a)
Calculates the squared length of a Vec3D: .
Definition: Vector.h:332

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

Referenced by MindlinRollingTorsionInteraction::getElasticEnergy().

◆ getSpecies()

const MindlinSpecies * MindlinInteraction::getSpecies ( ) const

Returns a const pointer of type MindlinSpecies*.

Returns
const MindlinSpecies*
399 {
400  return static_cast<const MindlinSpecies*>(getBaseSpecies()->getFrictionForce());
401 ;
402 }
const BaseSpecies * getBaseSpecies() const
Return a constant point to BaseSpecies of the interaction.
Definition: BaseInteraction.cc:682
BaseFrictionForce * getFrictionForce() const
Definition: BaseSpecies.h:150

References BaseInteraction::getBaseSpecies(), and BaseSpecies::getFrictionForce().

Referenced by computeFrictionForce().

◆ getTangentialForce()

const Vec3D MindlinInteraction::getTangentialForce ( ) const
overridevirtual

Returns the sliding friction force vector.

Returns
const Vec3D

Reimplemented from BaseInteraction.

381 {
382  return tangentialForce_;
383 }

References tangentialForce_.

◆ getTangentialForceDirection()

const Mdouble MindlinInteraction::getTangentialForceDirection ( ) const
391 {
393 }

References tangentialForceDirection_.

◆ getTangentialOverlap()

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.

369 {
371  //k_edit Indeed it should - todo done :)
372  //k_edit
373  //Updating sliding spring to give positive / negative values dependent on the direction of the extension
375 }
static Vec3D getUnitVector(const Vec3D &a)
Returns a unit Vec3D based on a.
Definition: Vector.cc:345

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

◆ getTangentialStiffness()

Mdouble MindlinInteraction::getTangentialStiffness ( )
202 {
203  return tangentialStiffness_;
204 }

References tangentialStiffness_.

◆ getTangentialStiffnessZero()

Mdouble MindlinInteraction::getTangentialStiffnessZero ( )
195 {
197 }

References tangentialStiffnessZero_.

◆ integrate()

void MindlinInteraction::integrate ( Mdouble timeStep  )
overridevirtual

Increments the amount of compression in sliding spring.

Parameters
[in]timeStepthe dt

Reimplemented from BaseInteraction.

Reimplemented in MindlinRollingTorsionInteraction.

350 {
352 }

References slidingSpring_, and slidingSpringVelocity_.

Referenced by MindlinRollingTorsionInteraction::integrate().

◆ read()

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.

176 {
177  //BaseInteraction::read(is);
178  std::string dummy;
179  is >> dummy >> slidingSpring_;
180 }

References slidingSpring_.

Referenced by MindlinRollingTorsionInteraction::read().

◆ reverseHistory()

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.

References slidingSpring_, slidingSpringVelocity_, and tangentialForce_.

Referenced by MindlinRollingTorsionInteraction::reverseHistory().

◆ rotateHistory()

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.

423 {
424  slidingSpring_ = rotationMatrix * slidingSpring_;
426  tangentialForce_ = rotationMatrix * tangentialForce_;
427 }

References slidingSpring_, slidingSpringVelocity_, and tangentialForce_.

Referenced by MindlinRollingTorsionInteraction::rotateHistory().

◆ setAbsoluteNormalForcePrevious()

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.
449 {
450  absoluteNormalForcePrevious_ = absoluteNormalForcePrevious;
451 }

References absoluteNormalForcePrevious_.

◆ setTangentialStiffnessZero()

void MindlinInteraction::setTangentialStiffnessZero ( Mdouble  newKt0)
188 {
189  tangentialStiffnessZero_ = newKt0;
190 }

References tangentialStiffnessZero_.

◆ updateK_t()

void MindlinInteraction::updateK_t ( Mdouble  fric,
Vec3D  direction,
bool  useTurningPoint,
bool  isLoading 
)
228 {
229  //creating a simple positive or negative integer 'multiplier', m, whose values are either +1 or -1
230  //that can be used to alter the relevant equations depending on if we are loading or unloading
231  Mdouble m;
232  //A parameter to temporarily hold the relevant turning point so that this function can work both for
233  //loading and loading.
234  Vec3D turningPoint;
235  //Changing the directions and turning points used in calculation depending on if we are loading or unloading
236  if (isLoading)
237  {
238  m = 1;
239  turningPoint = tangentialForceTurningPointUL_;
240  }
241  else
242  {
243  m = -1;
244  turningPoint = tangentialForceTurningPointLU_;
245  }
246  //if the current part of the interaction can be treated as a virgin loading
247  //(i.e. the turning point can be ignored), we simply update K_t in the 'standard' manner
248  if (!useTurningPoint)
249  {
250  //determining the direction of the current tangential force relative to the
251  //current direction of motion
252  Mdouble forceDirection = Vec3D::dot(Vec3D::getUnitVector(tangentialForceTemp_), direction);
253  //finding the scalar ratio f_t1 / (mu f_n1)
254  //(note for a first loading f_t1 is simply equal to f_t, and similarly f_n1 f_n = const
255  Mdouble forceRatio = tangentialForceTemp_.getLength() / (fric * getAbsoluteNormalForce());
256  //changing the direction of the force ratio, if necessary, based on its relative orientation
257  //with respect to the current tangential motion.
258  if (forceDirection < 0)
259  forceRatio = -forceRatio;
260  //using the scalar ratio to update tangential stiffness
261  tangentialStiffness_ = tangentialStiffnessZero_ * cbrt(1 - forceRatio);
262  }
263  //alternatively, if we are reloading and within the limits where the turning point force must be considered
264  else
265  {
266  Vec3D resultantForce = m * (tangentialForceTemp_ - turningPoint);
267  //QUESTION: Does it make sense to use the total force here? Or should I just use the tangentialForceTemp?
268  Mdouble forceDirection = Vec3D::dot(Vec3D::getUnitVector(resultantForce), direction);
269  Mdouble forceRatio = resultantForce.getLength() / (2 * fric * getAbsoluteNormalForce());
270  //changing the direction of the force ratio, if necessary, based on its relative orientation
271  //with respect to the current tangential motion.
272  if (forceDirection < 0)
273  forceRatio = -forceRatio;
274  //using the scalar ratio to update tangential stiffness
275  tangentialStiffness_ = tangentialStiffnessZero_ * cbrt(1 - m * forceRatio);
276  }
277 }

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

◆ updateTangentialStiffnessInitial()

void MindlinInteraction::updateTangentialStiffnessInitial ( Mdouble  fric)

◆ updateTangentialStiffnessInitial2()

void MindlinInteraction::updateTangentialStiffnessInitial2 ( Mdouble  fric,
Vec3D  direction 
)

◆ updateTangentialStiffnessReloading()

void MindlinInteraction::updateTangentialStiffnessReloading ( Mdouble  fric,
Vec3D  direction 
)

◆ updateTangentialStiffnessReloadingTanUp()

void MindlinInteraction::updateTangentialStiffnessReloadingTanUp ( Mdouble  fric,
Vec3D  direction 
)

◆ updateTangentialStiffnessUnloading()

void MindlinInteraction::updateTangentialStiffnessUnloading ( Mdouble  fric,
Vec3D  direction 
)

◆ updateTangentialStiffnessUnloadingTanDown()

void MindlinInteraction::updateTangentialStiffnessUnloadingTanDown ( Mdouble  fric,
Vec3D  direction 
)

◆ updateTangentialStiffnessZero()

void MindlinInteraction::updateTangentialStiffnessZero ( Mdouble  rad,
double  shearMod 
)
213 {
214  //K_t0 = 8G_eq * sqrt(R_eq * delta_n) (Di Renzo and Di Maio)
215  tangentialStiffnessZero_ = 8 * shearMod * sqrt(rad * getOverlap());
216 }
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Definition: BaseInteraction.h:240

References BaseInteraction::getOverlap(), and tangentialStiffnessZero_.

Referenced by computeFrictionForce().

◆ write()

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.

167 {
168  //BaseInteraction::write(os);
169  os << " slidingSpring " << slidingSpring_;
170 }

References slidingSpring_.

Referenced by MindlinRollingTorsionInteraction::write().

Member Data Documentation

◆ absoluteNormalForcePrevious_

Mdouble MindlinInteraction::absoluteNormalForcePrevious_
protected

◆ initialTangentialVelocity_

Vec3D MindlinInteraction::initialTangentialVelocity_
protected

Referenced by MindlinInteraction().

◆ priorLoadingFlag_

bool MindlinInteraction::priorLoadingFlag_
protected

Referenced by MindlinInteraction().

◆ slidingSpring_

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().

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

◆ slidingSpringPrevious_

Vec3D MindlinInteraction::slidingSpringPrevious_
protected

◆ slidingSpringVelocity_

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().

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

◆ tangentialDisplacementSL_

Mdouble MindlinInteraction::tangentialDisplacementSL_
protected

Referenced by MindlinInteraction().

◆ tangentialDisplacementTemp2_

Vec3D MindlinInteraction::tangentialDisplacementTemp2_
protected

Referenced by MindlinInteraction().

◆ tangentialDisplacementTemp_

Vec3D MindlinInteraction::tangentialDisplacementTemp_
protected

Referenced by MindlinInteraction().

◆ tangentialDisplacementTurningPointLU_

Vec3D MindlinInteraction::tangentialDisplacementTurningPointLU_
protected

Referenced by MindlinInteraction().

◆ tangentialDisplacementTurningPointUL_

Vec3D MindlinInteraction::tangentialDisplacementTurningPointUL_
protected

Referenced by MindlinInteraction().

◆ tangentialForce_

Vec3D MindlinInteraction::tangentialForce_
protected

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

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

◆ tangentialForceDirection_

Mdouble MindlinInteraction::tangentialForceDirection_
protected

◆ tangentialForcePrevious_

Vec3D MindlinInteraction::tangentialForcePrevious_
protected

◆ tangentialForceTemp2_

Vec3D MindlinInteraction::tangentialForceTemp2_
protected

Referenced by MindlinInteraction().

◆ tangentialForceTemp_

Vec3D MindlinInteraction::tangentialForceTemp_
protected

Referenced by MindlinInteraction(), and updateK_t().

◆ tangentialForceTurningPointLU_

Vec3D MindlinInteraction::tangentialForceTurningPointLU_
protected

Referenced by MindlinInteraction(), and updateK_t().

◆ tangentialForceTurningPointLUTemp_

Vec3D MindlinInteraction::tangentialForceTurningPointLUTemp_
protected

Referenced by MindlinInteraction().

◆ tangentialForceTurningPointUL_

Vec3D MindlinInteraction::tangentialForceTurningPointUL_
protected

Referenced by MindlinInteraction(), and updateK_t().

◆ tangentialForceTurningPointULTemp_

Vec3D MindlinInteraction::tangentialForceTurningPointULTemp_
protected

Referenced by MindlinInteraction().

◆ tangentialStiffness_

Mdouble MindlinInteraction::tangentialStiffness_
protected

◆ tangentialStiffnessZero_

◆ tangentialStiffnessZeroPrevious_

Mdouble MindlinInteraction::tangentialStiffnessZeroPrevious_
protected

Referenced by MindlinInteraction().


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