ContactForce Class Reference

This is a simple class containing the basic force information for a single contact between deformable surfaces S1 and S2 mounted on rigid bodies B1 and B2. More...

#include <CompliantContactSubsystem.h>

List of all members.

Public Member Functions

 ContactForce ()
 Default constructor has invalid contact id, other fields garbage.
 ContactForce (ContactId id, const Vec3 &contactPt, const SpatialVec &forceOnSurface2, Real potentialEnergy, Real powerLoss)
 Construct with values for all fields.
void setTo (ContactId id, const Vec3 &contactPt, const SpatialVec &forceOnSurface2, Real potentialEnergy, Real powerLoss)
 Replace the current contents of this ContactForce object with the given arguments.
void clear ()
 Restore the ContactForce object to its default-constructed state with an invalid contact id and garbage for the other fields.
bool isValid () const
 Return true if this contact force contains a valid ContactId.
void changeFrameInPlace (const Transform &X_AB)
 This object is currently in an assumed frame A; given a transform from A to another frame B we'll re-measure and re-express this in B.

Public Attributes

ContactId m_contactId
Vec3 m_contactPt
SpatialVec m_forceOnSurface2
Real m_potentialEnergy
Real m_powerLoss

Detailed Description

This is a simple class containing the basic force information for a single contact between deformable surfaces S1 and S2 mounted on rigid bodies B1 and B2.

Every contact interaction between two rigid bodies, however complex, can be expressed as a resultant that can be contained in this class and is sufficient for advancing a simulation. Optionally, you may be able to get more details about the deformed geometry and pressure distribution over the patch but you have to ask for that separately because it can be expensive to calculate or report.

The information stored here is:

Points and vectors are measured and expressed in some assumed but unspecified frame A, which might for example be the frame of one of the two surfaces, or one of the two bodies, or Ground. Whenever a method returns a ContactForce object it must document what frame is being used; typically that will be Ground for end user use.

Definition of center of pressure

When the contact patch itself involves many distributed contact points, the center of pressure might not be a particularly meaningful quantity but serves to provide enough information to proceed with a simulation, and to display resultant contact forces, without requiring detailed patch geometry information. We define the location r_c of the center of pressure like this:

           sum_i (r_i * |r_i X Fn_i|) 
     r_c = --------------------------
              sum_i |r_i X Fn_i|

where r_i is the vector locating contact point i, F_i=Fn_i+Ft_i is the contact force at point i resolved into locally-normal and locally-tangential components, and M_i is a pure moment if any generated by the contact force model as a result of the i'th contact point. Note that the locally- tangent contact force Ft_i (presumably from friction) and pure moment M_i do not contribute to the center of pressure calculation; we're choosing the point that minimizes the net moment generated by normal ("pressure") forces only. Note that the normal force Fn_i includes both stiffness and dissipation contributions, so the center of pressure can be velocity-dependent.


Constructor & Destructor Documentation

ContactForce (  )  [inline]

Default constructor has invalid contact id, other fields garbage.

ContactForce ( ContactId  id,
const Vec3 contactPt,
const SpatialVec forceOnSurface2,
Real  potentialEnergy,
Real  powerLoss 
) [inline]

Construct with values for all fields.

Contact point and force must be in the same but unspecified frame (typically Ground), and force and moment must be as applied at the contact point; we can't check so don't mess up.


Member Function Documentation

void changeFrameInPlace ( const Transform X_AB  )  [inline]

This object is currently in an assumed frame A; given a transform from A to another frame B we'll re-measure and re-express this in B.

Cost is 48 flops. Note that this doesn't change the moment because we're not moving the force application point physically; just remeasuring it from B.

References ContactForce::m_contactPt, ContactForce::m_forceOnSurface2, and Transform_< P >::R().

void clear (  )  [inline]

Restore the ContactForce object to its default-constructed state with an invalid contact id and garbage for the other fields.

References ContactForce::m_contactId.

bool isValid (  )  const [inline]

Return true if this contact force contains a valid ContactId.

References ContactForce::m_contactId.

void setTo ( ContactId  id,
const Vec3 contactPt,
const SpatialVec forceOnSurface2,
Real  potentialEnergy,
Real  powerLoss 
) [inline]

Replace the current contents of this ContactForce object with the given arguments.

This provides values for all fields. Contact point and force must be in the same but unspecified frame (typically Ground), and force and moment must be as applied at the contact point; we can't check so don't mess up.

References ContactForce::m_contactId, ContactForce::m_contactPt, ContactForce::m_forceOnSurface2, ContactForce::m_potentialEnergy, and ContactForce::m_powerLoss.


Member Data Documentation

ContactId m_contactId

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

Generated on Thu Aug 12 16:37:58 2010 for SimTKcore by  doxygen 1.6.1