Simbody  3.4 (development)
SimTK::Constraint::NoSlip1D Class Reference

One non-holonomic constraint equation. More...

#include <Constraint.h>

+ Inheritance diagram for SimTK::Constraint::NoSlip1D:

List of all members.

Public Member Functions

 NoSlip1D (MobilizedBody &caseBodyC, const Vec3 &P_C, const UnitVec3 &n_C, MobilizedBody &movingBody0, MobilizedBody &movingBody1)
 Define the up to three bodies involved in this constraint: the two "moving" bodies and a Case body, and a default contact point and no-slip direction in the Case body frame C.
 NoSlip1D ()
 Default constructor creates an empty handle.
void setContactPoint (State &state, const Vec3 &point_C) const
 Change the contact point at which this Constraint acts.
void setDirection (State &state, const UnitVec3 &direction_C) const
 Change the no-slip direction along which this Constraint acts.
const Vec3getContactPoint (const State &state) const
 Return from the given state the contact point, in the Case body frame.
const UnitVec3getDirection (const State &state) const
 Return from the given state the no-slip direction, in the Case body frame.
NoSlip1DsetDirectionDisplayLength (Real)
 For visualization only, set the length of the line used to show the no-slip direction.
NoSlip1DsetPointDisplayRadius (Real)
 For visualization only, set the radius of the sphere used to show the contact point location.
Real getDirectionDisplayLength () const
 Return the current value of the visualization line length for the no-slip direction.
Real getPointDisplayRadius () const
 Return the current value of the radius for visualization of the contact point.
NoSlip1DsetDefaultContactPoint (const Vec3 &)
 Change the default contact point; this is the initial value for for the actual contact point and is a topological change.
NoSlip1DsetDefaultDirection (const UnitVec3 &)
 Change the default no-slip direction; this is the initial value for for the actual direction and is a topological change.
MobilizedBodyIndex getCaseMobilizedBodyIndex () const
 Get the mobilized body index of the Case body that was set during construction.
MobilizedBodyIndex getMovingBodyMobilizedBodyIndex (int which) const
 Get the mobilized body index of moving body 0 or moving body 1 that was set during construction.
const UnitVec3getDefaultDirection () const
 Obtain the default value for the no-slip direction, expressed in the Case body frame.
const Vec3getDefaultContactPoint () const
 Obtain the default value for the contact point, in the Case body frame.
Real getVelocityError (const State &state) const
 Get the velocity error for this constraint equation, using configuration and velocity information from the given state, which must already have been realized through Velocity stage.
Real getAccelerationError (const State &) const
 Get the acceleration error for this constraint equation, using configuration, velocity, and acceleration information from the given state, which must already have been realized through Acceleration stage.
Real getMultiplier (const State &) const
 Get the Lagrange multiplier for this constraint equation, using configuration, velocity, and acceleration information from the given state, which must already have been realized through Acceleration stage.
Real getForceAtContactPoint (const State &) const
 Determine the constraint force currently being generated by this constraint.

Detailed Description

One non-holonomic constraint equation.

There is a contact point P and a no-slip direction n fixed in a case body C. There are two moving bodies B0 and B1. The material point of B0 and the material point of B1 which are each coincident with the contact point P must have identical velocities in C, along the direction n. This can be used to implement simple rolling contact between disks, such as occurs in gear trains.

The assembly condition is the same as the run-time constraint: the velocities must be made to match.


Constructor & Destructor Documentation

SimTK::Constraint::NoSlip1D::NoSlip1D ( MobilizedBody caseBodyC,
const Vec3 P_C,
const UnitVec3 n_C,
MobilizedBody movingBody0,
MobilizedBody movingBody1 
)

Define the up to three bodies involved in this constraint: the two "moving" bodies and a Case body, and a default contact point and no-slip direction in the Case body frame C.

(If you are modeling gears then the Case is the gearbox.) The case serves to define the contact geometry but no forces are applied to it. It is OK for the Case body to be the same body as one of the moving bodies.

Default constructor creates an empty handle.


Member Function Documentation

void SimTK::Constraint::NoSlip1D::setContactPoint ( State state,
const Vec3 point_C 
) const

Change the contact point at which this Constraint acts.

Provide the station location in the Case body local frame. This overrides the default point that was supplied on construction. This is an Instance-stage change.

void SimTK::Constraint::NoSlip1D::setDirection ( State state,
const UnitVec3 direction_C 
) const

Change the no-slip direction along which this Constraint acts.

Provide the direction unit vector in the Case body local frame. This overrides the default direction that was supplied on construction. This is an Instance-stage change.

const Vec3& SimTK::Constraint::NoSlip1D::getContactPoint ( const State state) const

Return from the given state the contact point, in the Case body frame.

const UnitVec3& SimTK::Constraint::NoSlip1D::getDirection ( const State state) const

Return from the given state the no-slip direction, in the Case body frame.

For visualization only, set the length of the line used to show the no-slip direction.

For visualization only, set the radius of the sphere used to show the contact point location.

Return the current value of the visualization line length for the no-slip direction.

Return the current value of the radius for visualization of the contact point.

Change the default contact point; this is the initial value for for the actual contact point and is a topological change.

Change the default no-slip direction; this is the initial value for for the actual direction and is a topological change.

Get the mobilized body index of the Case body that was set during construction.

Get the mobilized body index of moving body 0 or moving body 1 that was set during construction.

Set which to 0 or 1 accordingly.

Obtain the default value for the no-slip direction, expressed in the Case body frame.

Obtain the default value for the contact point, in the Case body frame.

Get the velocity error for this constraint equation, using configuration and velocity information from the given state, which must already have been realized through Velocity stage.

Get the acceleration error for this constraint equation, using configuration, velocity, and acceleration information from the given state, which must already have been realized through Acceleration stage.

Get the Lagrange multiplier for this constraint equation, using configuration, velocity, and acceleration information from the given state, which must already have been realized through Acceleration stage.

While this is linearly related to the constraint force it may have arbitrary sign and scaling; if you want an actual force use getForceAtContactPoint() instead.

Determine the constraint force currently being generated by this constraint.

The force is as applied to the second moving body, that is, moving body 1, and is applied along the no-slip direction vector.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines