TwoPointLinearSpring Class Reference

A linear spring between two points, specified as a station on each of two bodies. More...

#include <Force.h>

Inheritance diagram for TwoPointLinearSpring:
Force PIMPLHandle< Force, ForceImpl, true >

List of all members.

Public Member Functions

 TwoPointLinearSpring (GeneralForceSubsystem &forces, const MobilizedBody &body1, const Vec3 &station1, const MobilizedBody &body2, const Vec3 &station2, Real k, Real x0)
 Create a TwoPointLinearSpring.
 SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS (TwoPointLinearSpring, TwoPointLinearSpringImpl, Force)

Detailed Description

A linear spring between two points, specified as a station on each of two bodies.

The stiffness k and unstretched length x0 are provided. Then if d is the unit vector from point1 to point2, and x the current separation, we have f = k(x-x0) and we apply a force f*d to point1 and -f*d to point2. This contributes to potential energy: pe = 1/2 k (x-x0)^2. It is an error if the two points become coincident, since we are unable to determine a direction for the force in that case.


Constructor & Destructor Documentation

TwoPointLinearSpring ( GeneralForceSubsystem forces,
const MobilizedBody body1,
const Vec3 station1,
const MobilizedBody body2,
const Vec3 station2,
Real  k,
Real  x0 
)

Create a TwoPointLinearSpring.

Parameters:
forces the subsystem to which this force should be added
body1 the first body to which the force should be applied
station1 the location on the first body at which the force should be applied
body2 the second body to which the force should be applied
station2 the location on the second body at which the force should be applied
k the spring constant
x0 the distance at which the force is 0

Member Function Documentation

SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS ( TwoPointLinearSpring  ,
TwoPointLinearSpringImpl  ,
Force   
)

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

Generated on Wed Dec 30 11:05:14 2009 for SimTKcore by  doxygen 1.6.1