43 #ifdef DEBUG_CONSTRUCTOR
44 std::cout<<
"SlidingFrictionInteraction::SlidingFrictionInteraction() finished"<<std::endl;
54 #ifdef DEBUG_CONSTRUCTOR
55 std::cout<<
"SlidingFrictionInteraction::SlidingFrictionInteraction(const SlidingFrictionInteraction& p) finished"<<std::endl;
63 #ifdef DEBUG_DESTRUCTOR
64 std::cout<<
"SlidingFrictionInteraction::~SlidingFrictionInteraction() finished"<<std::endl;
102 if (dynamic_cast<BaseParticle*>(
getI())==0)
191 return "SlidingFriction";
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 write(std::ostream &os) const
Interaction write function, which accepts an std::ostream as input.
Mdouble getSlidingFrictionCoefficientStatic() const
Allows the static Coulomb friction coefficient to be accessed.
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
InteractionHandler * getHandler() const
Gets a point to the interaction handlers to which this interaction belongs.
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_.
SlidingFrictionInteraction(BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
Constructor.
const Vec3D & getRelativeVelocity() const
Returns a constant reference to a vector of relative velocity.
Computes the forces corresponding to sliding friction.
virtual ~SlidingFrictionInteraction()
Destructor.
void setZero()
Sets all elements to zero.
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
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 ...
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
void computeFrictionForce()
Computes the tangential force generated due to compression in the sliding spring. Does take into acco...
Mdouble getNormalRelativeVelocity() const
Returns a double which is the norm (length) of the relative velocity vector.
const BaseSpecies * getBaseSpecies() const
Return a constant point to BaseSpecies of the interaction.
const SlidingFrictionSpecies * getSpecies() const
Returns a const pointer of type SlidingFrictionSpecies*.
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
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.
Mdouble getTangentialOverlap() const
Returns the amount of tangential overlap which is needed by BaseInteraction::writeToFstat().
std::string getBaseName() const
Returns the type/name of interaction (sliding friction interaction)
void addForce(Vec3D force)
add an force increment to the total force.
SlidingFrictionSpecies contains the parameters used to describe sliding friction. ...
BaseInteractable * getI()
Mdouble getDistance() const
Returns an Mdouble which is the norm (length) of distance vector.
Mdouble getElasticEnergy() const
Returns the amount of elastic energy stored in sliding spring.
Mdouble getSlidingStiffness() const
Allows the spring constant to be accessed.
Mdouble getSlidingDissipation() const
Allows the tangential viscosity to be accessed.
Defines the basic properties that a interactable object can have.
const Vec3D getTangentialForce() const
Returns the sliding friction force vector.
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
Implementation of a 3D matrix.
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.
Mdouble getSlidingFrictionCoefficient() const
Allows the (dynamic) Coulomb friction coefficient to be accessed.
Mdouble getAbsoluteNormalForce() const
Returns the absolute value of the norm (length) of the Normal force vector.