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

A linear damper that acts along or around a mobility coordinate to apply a generalized force there. More...

#include <Force_MobilityLinearDamper.h>

+ Inheritance diagram for SimTK::Force::MobilityLinearDamper:

List of all members.

Public Member Functions

 MobilityLinearDamper (GeneralForceSubsystem &forces, const MobilizedBody &mobod, MobilizerUIndex whichU, Real defaultDamping)
 Create a MobilityLinearDamper force element on a particular mobility (generalized speed).
 MobilityLinearDamper ()
 Default constructor creates an empty handle that can be assigned to refer to any MobilityLinearDamper object.
MobilityLinearDampersetDefaultDamping (Real defaultDamping)
 Provide a new value for the default damping constant c of this damper.
Real getDefaultDamping () const
 Return the default value for the damper's damping constant c.
const MobilityLinearDampersetDamping (State &state, Real damping) const
 Change the value of the damping constant c in the given state; this may differ from the default value supplied at construction.
Real getDamping (const State &state) const
 Return the value for the damping constant c that is stored in the given state.
Deprecated

Methods here are for backwards compatibility but have been replaced with better ones that you should use.

 MobilityLinearDamper (GeneralForceSubsystem &forces, const MobilizedBody &mobod, int whichU, Real defaultDamping)
 Deprecated: Alternate signature for backwards compatibilty -- for safety you should prefer using the other constructor signature that takes a MobilizerUIndex rather than a plain int.

Detailed Description

A linear damper that acts along or around a mobility coordinate to apply a generalized force there.

The damping constant c is provided, with the generated force being -c*u where u is the mobility's generalized speed. This is meaningful on any mobility, since all our generalized speeds have physical meaning. This is not a potential force and hence does not contribute to potential energy.


Constructor & Destructor Documentation

SimTK::Force::MobilityLinearDamper::MobilityLinearDamper ( GeneralForceSubsystem forces,
const MobilizedBody mobod,
MobilizerUIndex  whichU,
Real  defaultDamping 
)

Create a MobilityLinearDamper force element on a particular mobility (generalized speed).

Parameters:
[in,out]forcesThe subsystem to which this force should be added.
[in]mobodMobilizer to which the force should be applied.
[in]whichUTo which of the mobilizer's mobilities (generalized speeds) u should this force be applied (first is 0)?
[in]defaultDampingThe default value for the damping constant c.

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

SimTK::Force::MobilityLinearDamper::MobilityLinearDamper ( GeneralForceSubsystem forces,
const MobilizedBody mobod,
int  whichU,
Real  defaultDamping 
) [inline]

Deprecated: Alternate signature for backwards compatibilty -- for safety you should prefer using the other constructor signature that takes a MobilizerUIndex rather than a plain int.


Member Function Documentation

Provide a new value for the default damping constant c of this damper.

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 setDamping() to set the damping constant in a State rather than in the System.

Parameters:
[in]defaultDampingThe default value for the damping constant c.
Returns:
A writable reference to this modified force element for convenience in chaining set methods.
See also:
getDefaultDamping(), setDamping()

Return the default value for the damper's damping constant c.

This is normally set at construction but can be modified with setDefaultDamping().

See also:
setDefaultDamping(), getDamping()
const MobilityLinearDamper& SimTK::Force::MobilityLinearDamper::setDamping ( State state,
Real  damping 
) const

Change the value of the damping constant c in the given state; this may differ from the default value supplied at construction.

Parameters:
[in,out]stateThe State in which the damping constant is to be changed.
[in]dampingThe new damping constant c (>= 0) that overrides the default.
Returns:
A const reference to this MobilityLinearDamper element for convenience in chaining set methods together.

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

See also:
setDefaultDamping(), getDamping()

Return the value for the damping constant c that is stored in the given state.

Note that this is not the same thing as the default damping constant that was supplied on construction or in setDefaultDamping().

See also:
setDamping(), getDefaultDamping()

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