45 #ifdef DEBUG_CONSTRUCTOR
46 std::cout<<
"MindlinRollingTorsionInteraction::MindlinRollingTorsionInteraction() finished"<<std::endl;
56 #ifdef DEBUG_CONSTRUCTOR
57 std::cout<<
"MindlinRollingTorsionInteraction::MindlinRollingTorsionInteraction() finished"<<std::endl;
69 #ifdef DEBUG_CONSTRUCTOR
70 std::cout<<
"MindlinRollingTorsionInteraction::MindlinRollingTorsionInteraction(const MindlinRollingTorsionInteraction& p) finished"<<std::endl;
78 #ifdef DEBUG_DESTRUCTOR
79 std::cout<<
"MindlinRollingTorsionInteraction::~MindlinRollingTorsionInteraction() finished"<<std::endl;
117 Vec3D rollingRelativeVelocity = -effectiveDiameter *
119 getP()->getAngularVelocity() -
getI()->getAngularVelocity());
121 if (dynamic_cast<BaseParticle *>(
getI()) == 0)
142 if (rollingForceSquared <=
148 std::sqrt(rollingForceSquared);
164 getI()->getAngularVelocity()) *
181 if (torsionForceSquared <=
187 std::sqrt(torsionForceSquared);
193 addTorque(effectiveDiameter * torsionForce);
static Mdouble getLengthSquared(const Vec3D &a)
Calculates the squared length of a Vec3D: .
Vec3D rollingSpringVelocity_
Stores the rate at which the rolling spring compresses or relaxes. Set in computeFrictionForce(), used in computing the amount of compression in rolling spring. Used in integrate().
void reverseHistory() override
A useful feature if one wants to return to the initial state of the springs. However, reverse history decrements the current state to the state corresponding to previous time step. Decrements the state or value of rollingSpring_, torsionSpring_ and slidingSpring_.
Mdouble getEffectiveRadius() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) ...
void write(std::ostream &os) const override
Interaction print function, which accepts an std::ostream as input.
Mdouble tangentialStiffnessZero_
InteractionHandler * getHandler() const
Gets a point to the interaction handlers to which this interaction belongs.
Computes the forces corresponding to sliding friction.
void setTorsionSpring(Vec3D torsionSpring)
Vec3D torsionSpring_
Stores the amount of torsional spring compression. Set in integrate(), used in computing frictional f...
Mdouble getTorsionFrictionCoefficient() const
Allows the (dynamic) Coulomb torsion friction coefficient to be accessed.
void setZero()
Sets all elements to zero.
void addTorque(Vec3D torque)
MindlinRollingTorsionInteraction()
const MindlinRollingTorsionSpecies * getSpecies() const
Returns a const pointer of type FrictionSpecies*.
Mdouble getRollingFrictionCoefficient() const
Allows the (dynamic) Coulomb friction coefficient to be accessed.
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Vec3D rollingSpring_
Stores the amount of rolling spring compression. Set in integrate(), used in computing frictional for...
Mdouble getRollingDissipation() const
Allows the tangential viscosity to be accessed.
T square(T val)
squares a number
void integrate(Mdouble timeStep) override
Increments the amount of compression in sliding spring.
Stores information about interactions between two interactable objects; often particles but could be ...
void setRollingSpring(Vec3D rollingSpring)
void computeFrictionForce()
Computes the forces arising due to all three types of friction, i.e., sliding, rolling and torsional...
Mdouble getElasticEnergy() const override
Returns the global amount of energy stored in all the springs (rolling, sliding and torsional)...
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_.
virtual ~MindlinRollingTorsionInteraction()
Destructor.
const BaseSpecies * getBaseSpecies() const
Return a constant point to BaseSpecies of the interaction.
void rotateHistory(Matrix3D &rotationMatrix) override
When periodic particles are used, some interactions need certain history properties rotated (e...
void rotateHistory(Matrix3D &rotationMatrix) override
When periodic particles are used, some interactions need certain history properties rotated (e...
Vec3D torsionSpringVelocity_
Stores the rate at which the torsional spring compresses or relaxes. Set in computeFrictionForce(), used in computing the amount of compression in torsion spring. Used in integrate().
void computeFrictionForce()
Computes the tangential force generated due to compression in the sliding spring. Does take into acco...
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Mdouble getElasticEnergy() const override
Returns the amount of elastic energy stored in sliding spring.
Mdouble getTorsionFrictionCoefficientStatic() const
Allows the static Coulomb torsion friction coefficient to be accessed.
void read(std::istream &is) override
Interaction read function, which accepts an std::istream as input.
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
void integrate(Mdouble timeStep) override
Computes the amount of compression in all the springs, i.e., increments the rollingSpring_, slidingSpring_ (see MindlinInteraction.cc) and torsionSpring_.
std::string getBaseName() const
Returns interaction name/type.
This class allows one to take all three types of frictional interactions into account. The sliding, rolling and torsional frictional interaction. See.
BaseInteractable * getI()
Mdouble getDistance() const
Returns an Mdouble which is the norm (length) of distance vector.
Mdouble getTorsionDissipation() const
Allows the torsion viscosity to be accessed.
Mdouble getRollingFrictionCoefficientStatic() const
Allows the static Coulomb rolling friction coefficient to be accessed.
Defines the basic properties that a interactable object can have.
Vec3D getRollingSpring() const
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
Implementation of a 3D matrix.
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Implementation of a 3D vector (by Vitaliy).
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
Vec3D getTorsionSpring() const
MindlinRollingTorsionSpecies contains the parameters used to describe sliding, rolling and torsional ...
void write(std::ostream &os) const override
Interaction write function, which accepts an std::ostream as input.
void read(std::istream &is) override
Interaction read function, which accepts an std::istream as input.
Mdouble getAbsoluteNormalForce() const
Returns the absolute value of the norm (length) of the Normal force vector.