Simbody  3.6
SimTK::ElasticFoundationForce Class Reference

This class implements an elastic foundation or "bed of springs" contact model. More...

+ Inheritance diagram for SimTK::ElasticFoundationForce:

Public Member Functions

 ElasticFoundationForce (GeneralForceSubsystem &forces, GeneralContactSubsystem &contacts, ContactSetIndex contactSet)
 Create an elastic foundation 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, which must be a ContactGeometry::TriangleMesh. 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...
 
 SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS (ElasticFoundationForce, ElasticFoundationForceImpl, 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 implements an elastic foundation or "bed of springs" contact model.

It places springs over the surface of a triangle mesh, each of which independently interacts with objects in contact with the mesh. The interaction includes components for the normal restoring force, dissipation in the material, and surface friction. This force is only applied to contacts involving a triangle mesh, though the object colliding with the mesh may be of any type. Contacts which do not involve a triangle mesh 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 objects to it.
  3. Add an ElasticFoundationForce to the GeneralForceSubsystem, and call setBodyParameters() on it once for each TriangleMesh in the contact set.

A spring is placed at the center of each face of each triangle mesh. When a mesh collides with any other object, the other object is considered to be rigid and the displacement of each spring is calculated independently. A spring is considered to be displaced if its base location is inside the other object, and the contact point is taken to be the nearest point on that object's surface. When two meshes collide, the springs on each mesh are treated independently: each mesh is assumed to be rigid for purposes of calculating the force exerted by the other mesh's springs.

Normal Force Components

The force exerted by each spring along its displacement direction is given by

f = k*a*x*(1+c*v)

where k is the spring stiffness, a is the area of the face the spring belongs to, x is the displacement distance, c is the spring's dissipation coefficient, and v=dx/dt. If the springs are assumed to represent a uniform layer of elastic material over a rigid substrate, the stiffness is given by

k = (1-p)*E/((1+p)(1-2p)*h)

where E is the Young's modulus of the elastic layer, p is its Poisson's ratio, and h is its thickness.

Friction Force

The friction force exerted by each spring 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.

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

◆ ElasticFoundationForce()

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

Create an elastic foundation contact model.

Parameters
forcesthe subsystem which will own this ElasticFoundationForce 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::ElasticFoundationForce::setBodyParameters ( ContactSurfaceIndex  surfIndex,
Real  stiffness,
Real  dissipation,
Real  staticFriction,
Real  dynamicFriction,
Real  viscousFriction 
)

Set the material parameters for a surface in the contact set, which must be a ContactGeometry::TriangleMesh.

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::ElasticFoundationForce::getTransitionVelocity ( ) const

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

◆ setTransitionVelocity()

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

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

◆ SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS()

SimTK::ElasticFoundationForce::SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS ( ElasticFoundationForce  ,
ElasticFoundationForceImpl  ,
Force   
)

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