Simbody  3.7
SimTK::HuntCrossleyForce Class Reference

This class models the forces generated by simple point contacts, such as between two spheres, or a sphere and a half space. More...

+ Inheritance diagram for SimTK::HuntCrossleyForce:

Public Member Functions

 HuntCrossleyForce (GeneralForceSubsystem &forces, GeneralContactSubsystem &contacts, ContactSetIndex contactSet)
 Create a Hunt-Crossley contact model. More...
 
void setBodyParameters (ContactSurfaceIndex surfIndex, Real stiffness, Real dissipation, Real staticFriction, Real dynamicFriction, Real viscousFriction)
 Set the material parameters for a surface in the contact set. More...
 
Real getTransitionVelocity () const
 Get the transition velocity (vt) of the friction model. More...
 
void setTransitionVelocity (Real v)
 Set the transition velocity (vt) of the friction model. More...
 
ContactSetIndex getContactSetIndex () const
 Retrieve the ContactSetIndex that was associated with this HuntCrossleyForce on construction. More...
 
 SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS (HuntCrossleyForce, HuntCrossleyForceImpl, Force)
 
- Public Member Functions inherited from SimTK::Force
void disable (State &) const
 Disable this force element, effectively removing it from the System for computational purposes (it is still using its ForceIndex, however). More...
 
void enable (State &) const
 Enable this force element if it was previously disabled. More...
 
bool isDisabled (const State &) const
 Test whether this force element is currently disabled in the supplied State. More...
 
void setDisabledByDefault (bool shouldBeDisabled)
 Normally force elements are enabled when defined and can be disabled later. More...
 
bool isDisabledByDefault () const
 Test whether this force element is disabled by default in which case it must be explicitly enabled before it will take effect. More...
 
void calcForceContribution (const State &state, Vector_< SpatialVec > &bodyForces, Vector_< Vec3 > &particleForces, Vector &mobilityForces) const
 Calculate the force that would be applied by this force element if the given state were realized to Dynamics stage. More...
 
Real calcPotentialEnergyContribution (const State &state) const
 Calculate the potential energy contribution that is made by this force element at the given state. More...
 
 Force ()
 Default constructor for Force handle base class does nothing. More...
 
 operator ForceIndex () const
 Implicit conversion to ForceIndex when needed. More...
 
const GeneralForceSubsystemgetForceSubsystem () const
 Get the GeneralForceSubsystem of which this Force is an element. More...
 
ForceIndex getForceIndex () const
 Get the index of this force element within its parent force subsystem. More...
 
- Public Member Functions inherited from SimTK::PIMPLHandle< Force, ForceImpl, true >
bool isEmptyHandle () const
 Returns true if this handle is empty, that is, does not refer to any implementation object. More...
 
bool isOwnerHandle () const
 Returns true if this handle is the owner of the implementation object to which it refers. More...
 
bool isSameHandle (const Force &other) const
 Determine whether the supplied handle is the same object as "this" PIMPLHandle. More...
 
void disown (Force &newOwner)
 Give up ownership of the implementation to an empty handle. More...
 
PIMPLHandlereferenceAssign (const Force &source)
 "Copy" assignment but with shallow (pointer) semantics. More...
 
PIMPLHandlecopyAssign (const Force &source)
 This is real copy assignment, with ordinary C++ object ("value") semantics. More...
 
void clearHandle ()
 Make this an empty handle, deleting the implementation object if this handle is the owner of it. More...
 
const ForceImpl & getImpl () const
 Get a const reference to the implementation associated with this Handle. More...
 
ForceImpl & updImpl ()
 Get a writable reference to the implementation associated with this Handle. More...
 
int getImplHandleCount () const
 Return the number of handles the implementation believes are referencing it. More...
 

Additional Inherited Members

- Public Types inherited from SimTK::PIMPLHandle< Force, ForceImpl, true >
typedef PIMPLHandle< Force, ForceImpl, PTR > HandleBase
 
typedef HandleBase ParentHandle
 
- Protected Member Functions inherited from SimTK::Force
 Force (ForceImpl *r)
 Use this in a derived Force handle class constructor to supply the concrete implementation object to be stored in the handle base. More...
 
- Protected Member Functions inherited from SimTK::PIMPLHandle< Force, ForceImpl, true >
 PIMPLHandle ()
 The default constructor makes this an empty handle. More...
 
 PIMPLHandle (ForceImpl *p)
 This provides consruction of a handle referencing an existing implementation object. More...
 
 PIMPLHandle (const PIMPLHandle &source)
 The copy constructor makes either a deep (value) or shallow (reference) copy of the supplied source PIMPL object, based on whether this is a "pointer semantics" (PTR=true) or "object (value) semantics" (PTR=false, default) class. More...
 
 ~PIMPLHandle ()
 Note that the destructor is non-virtual. More...
 
PIMPLHandleoperator= (const PIMPLHandle &source)
 Copy assignment makes the current handle either a deep (value) or shallow (reference) copy of the supplied source PIMPL object, based on whether this is a "pointer sematics" (PTR=true) or "object (value) semantics" (PTR=false, default) class. More...
 
void setImpl (ForceImpl *p)
 Set the implementation for this empty handle. More...
 
bool hasSameImplementation (const Force &other) const
 Determine whether the supplied handle is a reference to the same implementation object as is referenced by "this" PIMPLHandle. More...
 

Detailed Description

This class models the forces generated by simple point contacts, such as between two spheres, or a sphere and a half space.

This includes components for the normal restoring force, dissipation in the material, and surface friction. This force is only applied to point contacts. Other contacts, such as those involving triangle meshes, are ignored.

This class relies on a GeneralContactSubsystem to identify contacts, then applies forces to all contacts in a single contact set. To use it, do the following:

  1. Add a GeneralContactSubsystem and GeneralForceSubsystem to a MultibodySystem.
  2. Create a contact set within the GeneralContactSubsystem, and add ContactGeometry::Sphere and ContactGeometry::HalfSpace objects to it.
  3. Add a HuntCrossleyForce to the GeneralForceSubsystem, and call setBodyParameters() on it once for each body in the contact set.

Normal Force Components

The force in the normal direction is based on a model due to Hunt & Crossley: K. H. Hunt and F. R. E. Crossley, "Coefficient of Restitution Interpreted as Damping in Vibroimpact," ASME Journal of Applied Mechanics, pp. 440-445, June 1975. This is a continuous model based on Hertz elastic contact theory, which correctly reproduces the empirically observed dependence on velocity of coefficient of restitution, where e=(1-cv) for (small) impact velocity v and a material property c with units 1/v. Note that c can be measured right off the coefficient of restitution-vs.-velocity curves: it is the absolute value of the slope at low velocities.

Given a collision between two spheres, or a sphere and a plane, we can generate a contact force from this equation f = kx^n(1 + 3/2 cv) where k is a stiffness constant incorporating material properties and geometry (to be defined below), x is penetration depth and v = dx/dt is penetration rate (positive during penetration and negative during rebound). Exponent n depends on the surface geometry. For Hertz contact where the geometry can be approximated by sphere (or sphere-plane) interactions, which is all we are currently handling here, n=3/2.

Stiffness k is defined in terms of the relative radius of curvature R and effective plane-strain modulus E, each of which is a combination of the description of the two individual contacting elements:

         R1*R2                                         E2^(2/3)
    R = -------,  E = (s1 * E1^(2/3))^(3/2),  s1= ------------------- 
        R1 + R2                                   E1^(2/3) + E2^(2/3)
c = c1*s1 + c2*(1-s1)
k = (4/3) sqrt(R) E
f = k x^(3/2) (1 + 3/2 c xdot)
pe = 2/5 k x^(5/2)

Also, we can calculate the contact patch radius a as a = sqrt(R*x)

In the above, E1 and E2 are the plane strain moduli. If you have instead Young's modulus Y1 and Poisson's ratio p1, then E1=Y1/(1-p1^2). The interface to this subsystem asks for E1 (pressure/strain) and c1 (1/velocity), and E2,c2 only.

Friction Force

The friction force is based on a model by Michael Hollars:

f = fn*[min(vs/vt,1)*(ud+2(us-ud)/(1+(vs/vt)^2))+uv*vs]

where fn is the normal force at the contact point, vs is the slip (tangential) velocity of the two bodies at the contact point, vt is a transition velocity (see below), and us, ud, and uv are the coefficients of static, dynamic, and viscous friction respectively. Each of the three friction coefficients is calculated based on the friction coefficients of the two bodies in contact:

u = 2*u1*u2/(u1+u2)

Because the friction force is a continuous function of the slip velocity, this model cannot represent stiction; as long as a tangential force is applied, the two bodies will move relative to each other. There will always be a nonzero drift, no matter how small the force is. The transition velocity vt acts as an upper limit on the drift velocity. By setting vt to a sufficiently small value, the drift velocity can be made arbitrarily small, at the cost of making the equations of motion very stiff. The default value of vt is 0.01.

Constructor & Destructor Documentation

◆ HuntCrossleyForce()

SimTK::HuntCrossleyForce::HuntCrossleyForce ( GeneralForceSubsystem forces,
GeneralContactSubsystem contacts,
ContactSetIndex  contactSet 
)

Create a Hunt-Crossley contact model.

Parameters
forcesthe subsystem which will own this HuntCrossleyForce element
contactsthe subsystem to which this contact model should be applied
contactSetthe index of the contact set to which this contact model will be applied

Member Function Documentation

◆ setBodyParameters()

void SimTK::HuntCrossleyForce::setBodyParameters ( ContactSurfaceIndex  surfIndex,
Real  stiffness,
Real  dissipation,
Real  staticFriction,
Real  dynamicFriction,
Real  viscousFriction 
)

Set the material parameters for a surface in the contact set.

Parameters
surfIndexthe index of the surface within the contact set
stiffnessthe stiffness constant (k) for the body
dissipationthe dissipation coefficient (c) for the body
staticFrictionthe coefficient of static friction (us) for the body
dynamicFrictionthe coefficient of dynamic friction (ud) for the body
viscousFrictionthe coefficient of viscous friction (uv) for the body

◆ getTransitionVelocity()

Real SimTK::HuntCrossleyForce::getTransitionVelocity ( ) const

Get the transition velocity (vt) of the friction model.

◆ setTransitionVelocity()

void SimTK::HuntCrossleyForce::setTransitionVelocity ( Real  v)

Set the transition velocity (vt) of the friction model.

◆ getContactSetIndex()

ContactSetIndex SimTK::HuntCrossleyForce::getContactSetIndex ( ) const

Retrieve the ContactSetIndex that was associated with this HuntCrossleyForce on construction.

◆ SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS()

SimTK::HuntCrossleyForce::SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS ( HuntCrossleyForce  ,
HuntCrossleyForceImpl  ,
Force   
)

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