Simbody  3.4 (development)
SimTK::Force::MobilityLinearStop Class Reference

Model a compliant stop element that acts to keep a mobilizer coordinate q within specified bounds. More...

#include <Force_MobilityLinearStop.h>

+ Inheritance diagram for SimTK::Force::MobilityLinearStop:

List of all members.

Public Member Functions

 MobilityLinearStop (GeneralForceSubsystem &forces, const MobilizedBody &mobod, MobilizerQIndex whichQ, Real defaultStiffness, Real defaultDissipation, Real defaultQLow=-Infinity, Real defaultQHigh=Infinity)
 Create a MobilityLinearStop force element on a particular generalized coordinate.
 MobilityLinearStop ()
 Default constructor creates an empty handle that can be assigned to refer to any MobilityLinearStop object.
MobilityLinearStopsetDefaultBounds (Real defaultQLow, Real defaultQHigh)
 Provide new values for the default lower and upper bounds of this stop.
MobilityLinearStopsetDefaultMaterialProperties (Real defaultStiffness, Real defaultDissipation)
 Provide new values for the default material properties of this stop, which are assumed to be the same for the upper and lower stops.
Real getDefaultLowerBound () const
 Return the default value for the stop's lower bound (a generalized coordinate value).
Real getDefaultUpperBound () const
 Return the default value for the stop's upper bound (a generalized coordinate value).
Real getDefaultStiffness () const
 Return the default value for the stop material's stiffness k.
Real getDefaultDissipation () const
 Return the default value for the stop's material's dissipation coefficient d.
void setBounds (State &state, Real qLow, Real qHigh) const
 Change the values of the lower and upper bounds in the given state; these may differ from the default values supplied at construction.
void setMaterialProperties (State &state, Real stiffness, Real dissipation) const
 Change the values of this stop's material properties in the given state; these may differ from the default values supplied at construction.
Real getLowerBound (const State &state) const
 Return the value for the lower bound that is stored in the given state.
Real getUpperBound (const State &state) const
 Return the value for the upper bound that is stored in the given state.
Real getStiffness (const State &state) const
 Return the value for the stop material's stiffness k that is stored in the given state.
Real getDissipation (const State &state) const
 Return the value for the stop material's dissipation coefficient d that is stored in the given state.

Detailed Description

Model a compliant stop element that acts to keep a mobilizer coordinate q within specified bounds.

This force element generates no force when the coordinate is in bounds, but when either the lower or upper bound is exceeded it generates a generalized force opposing further violation of the bound. The generated force is composed of a stiffness force (or torque, or generalized force) that is linear in the violation of the bound, and dissipation that is linear in the rate qdot.

Theory:

Given a mobilizer coordinate q and limits q_low and q_high, the generalized force generated here is:

      {           0,             q_low <= q <= q_high
  f = { min(0, -k*x*(1+d*qdot)), q > q_high, x=q-q_high (x>0, f<=0)
      { max(0, -k*x*(1-d*qdot)), q < q_low,  x=q-q_low  (x<0, f>=0)

where k is a stiffness parameter, and d is a dissipation coefficient.

Note that dissipation occurs both during compression and expansion, but we will never generate a "sticking" force. This is a Hunt and Crossley-like dissipation model. It has the nice property that the damping force is zero when you first touch the stop.


Constructor & Destructor Documentation

SimTK::Force::MobilityLinearStop::MobilityLinearStop ( GeneralForceSubsystem forces,
const MobilizedBody mobod,
MobilizerQIndex  whichQ,
Real  defaultStiffness,
Real  defaultDissipation,
Real  defaultQLow = -Infinity,
Real  defaultQHigh = Infinity 
)

Create a MobilityLinearStop force element on a particular generalized coordinate.

Parameters:
forcessubsystem to which this force element should be added
mobodmobilizer to which the force should be applied
whichQto which of the mobilizer's generalized coordinates q should this force be applied (first is 0)?
defaultStiffnessdefault stop stiffness (>= 0)
defaultDissipationdefault stop dissipation coefficient (>= 0)
defaultQLowdefault lower bound (-Infinity)
defaultQHighdefault upper bound (+Infinity)

Note that if you have an integer value for the generalized coordinate (q) index, you have to cast it to a MobilizerQIndex here. The generalized coordinates are numbered starting with 0 for each mobilizer. Here is an example:

        GeneralForceSubsystem forces;
        MobilizedBody::Pin pinJoint(...);
        MobilityLinearStop myStop(forces, pinJoint, MobilizerQIndex(0),
                                  k, d, -Pi/4, Pi/4);

Default constructor creates an empty handle that can be assigned to refer to any MobilityLinearStop object.


Member Function Documentation

MobilityLinearStop& SimTK::Force::MobilityLinearStop::setDefaultBounds ( Real  defaultQLow,
Real  defaultQHigh 
)

Provide new values for the default lower and upper bounds of this stop.

This is a topological change because it affects the value that the containing System's default state will have when realizeTopology() is called. This is for use during construction, not for during a simulation where you should be using setBounds() to set the bounds in a State rather than in the System.

Parameters:
defaultQLowDefault lower bound (generalized coordinate value); <= defaultQHigh. Set to -Infinity to disable the lower bound by default.
defaultQHighDefault upper bound (generalized coordinate value); >= defaultQLow. Set to Infinity to disable the upper bound by default.
Returns:
a writable reference to this modified force element
See also:
setBounds(), getDefaultLowerBound(), getDefaultUpperBound()
MobilityLinearStop& SimTK::Force::MobilityLinearStop::setDefaultMaterialProperties ( Real  defaultStiffness,
Real  defaultDissipation 
)

Provide new values for the default material properties of this stop, which are assumed to be the same for the upper and lower stops.

This is a topological change because it affects the value that the containing System's default state will have when realizeTopology() is called. This is for use during construction, not for during a simulation where you should be using setMaterialProperties() to set the material properties in a State rather than in the System.

Parameters:
defaultStiffnessdefault stop stiffness (>= 0)
defaultDissipationdefault stop dissipation coefficient (>= 0)
Returns:
a writable reference to this modified force element
See also:
setMaterialProperties(), getDefaultStiffness(), getDefaultDissipation()

Return the default value for the stop's lower bound (a generalized coordinate value).

This is normally set at construction.

See also:
getDefaultUpperBound(), getLowerBound()

Return the default value for the stop's upper bound (a generalized coordinate value).

This is normally set at construction.

See also:
getDefaultLowerBound(), getUpperBound()

Return the default value for the stop material's stiffness k.

This is normally set at construction.

See also:
getDefaultDissipation(), getStiffness()

Return the default value for the stop's material's dissipation coefficient d.

This is normally set at construction.

See also:
getDefaultStiffness(), getDissipation()
void SimTK::Force::MobilityLinearStop::setBounds ( State state,
Real  qLow,
Real  qHigh 
) const

Change the values of the lower and upper bounds in the given state; these may differ from the default values supplied at construction.

Parameters:
stateThe State in which the bounds are changed.
qLowLower bound (generalized coordinate value); <= qHigh. Set to -Infinity to disable the lower bound.
qHighUpper bound (generalized coordinate value); >= qLow. Set to Infinity to disable the upper bound.

Changing these bounds invalidates Stage::Dynamics and above in the state since it can affect force generation.

See also:
setDefaultBounds(), getLowerBound(), getUpperBound()
void SimTK::Force::MobilityLinearStop::setMaterialProperties ( State state,
Real  stiffness,
Real  dissipation 
) const

Change the values of this stop's material properties in the given state; these may differ from the default values supplied at construction.

Parameters:
stateThe State in which the material properties are changed.
stiffnessThe stop material stiffness k (>= 0).
dissipationThe stop material dissipation coefficient d (>= 0).

Changing these properties invalidates Stage::Dynamics and above in the state since it can affect force generation.

See also:
setDefaultMaterialProperties(), getStiffness(), getDissipation()

Return the value for the lower bound that is stored in the given state.

Note that this is not the same thing as the default lower bound that was supplied on construction.

See also:
getUpperBound(), setBounds(), getDefaultLowerBound()

Return the value for the upper bound that is stored in the given state.

Note that this is not the same thing as the default upper bound that was supplied on construction.

See also:
getLowerBound(), setBounds(), getDefaultUpperBound()

Return the value for the stop material's stiffness k that is stored in the given state.

Note that this is not the same thing as the default stiffness that was supplied on construction.

See also:
getDissipation(), setMaterialProperties(), getDefaultStiffness()

Return the value for the stop material's dissipation coefficient d that is stored in the given state.

Note that this is not the same thing as the default dissipation coefficient that was supplied on construction.

See also:
getStiffness(), setMaterialProperties(), getDefaultDissipation()

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