45 #ifdef DEBUG_CONSTRUCTOR
46 std::cout<<
"FrictionInteraction::FrictionInteraction() finished"<<std::endl;
57 #ifdef DEBUG_CONSTRUCTOR
58 std::cout<<
"FrictionInteraction::FrictionInteraction(const FrictionInteraction& p) finished"<<std::endl;
66 #ifdef DEBUG_DESTRUCTOR
67 std::cout<<
"FrictionInteraction::~FrictionInteraction() finished"<<std::endl;
137 std::cerr <<
"FrictionInteraction::computeFrictionForce(): Rolling stiffness is zero" << std::endl;
175 addTorque(effectiveDiameter * torsionForce);
179 std::cerr <<
"FrictionInteraction::computeFrictionForce(): Torsion stiffness is zero" << std::endl;
void read(std::istream &is)
Interaction read function, which accepts an std::istream as input.
static Mdouble getLengthSquared(const Vec3D &a)
Calculates the squared length of a Vec3D: .
void rotateHistory(Matrix3D &rotationMatrix)
When periodic particles are used, some interactions need certain history properties rotated (e...
void reverseHistory()
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 getRollingFrictionCoefficient() const
Allows the (dynamic) Coulomb friction coefficient to be accessed.
void write(std::ostream &os) const
Interaction write function, which accepts an std::ostream as input.
const FrictionSpecies * getSpecies() const
Returns a const pointer of type FrictionSpecies*.
void integrate(Mdouble timeStep)
Computes the amount of compression in all the springs, i.e., increments the rollingSpring_, slidingSpring_ (see SlidingFrictionInteraction.cc) and torsionSpring_.
Mdouble getEffectiveRadius() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) ...
InteractionHandler * getHandler() const
Gets a point to the interaction handlers to which this interaction belongs.
Mdouble getTorsionFrictionCoefficient() const
Allows the (dynamic) Coulomb torsion friction coefficient to be accessed.
void reverseHistory()
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_.
FrictionSpecies contains the parameters used to describe sliding, rolling and torsional friction...
Mdouble getElasticEnergy() const
Returns the global amount of energy stored in all the springs (rolling, sliding and torsional)...
Computes the forces corresponding to sliding friction.
This class allows one to take all three types of frictional interactions into account. The sliding, rolling and torsional frictional interaction. See.
void setZero()
Sets all elements to zero.
void addTorque(Vec3D torque)
Mdouble getTorsionStiffness() const
Allows the torsion stiffness to be accessed.
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Mdouble getRollingDissipation() const
Allows the tangential viscosity to be accessed.
Mdouble getRollingFrictionCoefficientStatic() const
Allows the static Coulomb rolling friction coefficient to be accessed.
T square(T val)
squares a number
void read(std::istream &is)
Interaction read function, which accepts an std::istream as input.
Stores information about interactions between two interactable objects; often particles but could be ...
Mdouble getRollingStiffness() const
Allows the spring constant to be accessed.
std::string getBaseName() const
Returns interaction name/type.
virtual ~FrictionInteraction()
Destructor.
void computeFrictionForce()
Computes the tangential force generated due to compression in the sliding spring. Does take into acco...
void computeFrictionForce()
Computes the forces arising due to all three types of friction, i.e., sliding, rolling and torsional...
const BaseSpecies * getBaseSpecies() const
Return a constant point to BaseSpecies of the interaction.
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
void integrate(Mdouble timeStep)
Increments the amount of compression in sliding spring.
void rotateHistory(Matrix3D &rotationMatrix)
When periodic particles are used, some interactions need certain history properties rotated (e...
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
FrictionInteraction(BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
Constructor.
BaseInteractable * getI()
void write(std::ostream &os) const
Interaction print function, which accepts an std::ostream as input.
Mdouble getElasticEnergy() const
Returns the amount of elastic energy stored in sliding spring.
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().
Defines the basic properties that a interactable object can have.
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
Implementation of a 3D matrix.
Mdouble getTorsionDissipation() const
Allows the torsion viscosity to be accessed.
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 torsionSpring_
Stores the amount of torsional spring compression. Set in integrate(), used in computing frictional f...
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().
Mdouble getTorsionFrictionCoefficientStatic() const
Allows the static Coulomb torsion friction coefficient to be accessed.
Mdouble getEffectiveCorrectedRadius()
Returns a Mdouble to the effective radius corrected for the overlaps of the particles.
Vec3D rollingSpring_
Stores the amount of rolling spring compression. Set in integrate(), used in computing frictional for...
Mdouble getAbsoluteNormalForce() const
Returns the absolute value of the norm (length) of the Normal force vector.