OpenSim::Delp1990Muscle Class Reference

A class implementing a SIMM muscle. More...

#include <Delp1990Muscle.h>

Inheritance diagram for OpenSim::Delp1990Muscle:
OpenSim::ActivationFiberLengthMuscle OpenSim::Muscle OpenSim::PathActuator OpenSim::Actuator OpenSim::Actuator_ OpenSim::Force OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 Delp1990Muscle ()
 Default constructor.
 Delp1990Muscle (const std::string &aName, double aMaxIsometricForce, double aOptimalFiberLength, double aTendonSlackLength, double aPennationAngle)
 Constructor.
 Delp1990Muscle (const Delp1990Muscle &aMuscle)
 Copy constructor.
virtual ~Delp1990Muscle ()
 Destructor.
virtual Objectcopy () const
 Copy this muscle point and return a pointer to the copy.
Delp1990Muscleoperator= (const Delp1990Muscle &aMuscle)
 Assignment operator.
void copyData (const Delp1990Muscle &aMuscle)
 Copy data members from one Delp1990Muscle to another.
virtual double getTimeScale () const
virtual double getMass () const
virtual bool setTimeScale (double aTimeScale)
 Set the scale factor for normalizing time.
virtual bool setActivation1 (double aActivation1)
 Set the time constant of ramping up of muscle force.
virtual bool setActivation2 (double aActivation2)
 Set the time constant of ramping up and ramping down of muscle force.
virtual bool setMass (double aMass)
 Set the mass of the muscle.
virtual double getFiberVelocity (const SimTK::State &s) const
virtual void setFiberVelocity (SimTK::State &s, double fiberVelocity) const
virtual double getFiberVelocityDeriv (const SimTK::State &s) const
virtual void setFiberVelocityDeriv (const SimTK::State &s, double fiberVelocityDeriv) const
virtual void setActiveForce (const SimTK::State &s, double aForce) const
virtual double getActiveForce (const SimTK::State &s) const
virtual void computeEquilibrium (SimTK::State &s) const
 Compute the equilibrium states.
virtual double computeActuation (const SimTK::State &s) const
 Compute the actuation for the muscle.
virtual double computeIsometricForce (SimTK::State &s, double activation) const
 computeIsometricForce: this function finds the force in a muscle, assuming static equilibrium.
virtual FunctiongetActiveForceLengthCurve () const
 Get the active force-length curve.
virtual bool setActiveForceLengthCurve (Function *aActiveForceLengthCurve)
 Set the active force-length curve.
virtual FunctiongetPassiveForceLengthCurve () const
 Get the passive force-length curve.
virtual bool setPassiveForceLengthCurve (Function *aPassiveForceLengthCurve)
 Set the passive force-length curve.
virtual FunctiongetTendonForceLengthCurve () const
 Get the tendon force-length curve.
virtual bool setTendonForceLengthCurve (Function *aTendonForceLengthCurve)
 Set the tendon force-length curve.
virtual FunctiongetForceVelocityCurve () const
 Get the force-velocity curve.
virtual bool setForceVelocityCurve (Function *aForceVelocityCurve)
 Set the force-velocity curve.
virtual int getStateVariableYIndex (int index) const
 Get the YIndex of a state variable allocated by this ModelComponent.
 OPENSIM_DECLARE_DERIVED (Delp1990Muscle, ActivationFiberLengthMuscle)

Protected Member Functions

virtual void setup (Model &aModel)
 Perform some set up functions that happen after the object has been deserialized or copied.
virtual void createSystem (SimTK::MultibodySystem &system) const
 allocate and initialize the SimTK state for this acuator.
virtual SimTK::Vector computeStateVariableDerivatives (const SimTK::State &s) const
 Compute the derivatives of the muscle states.

Protected Attributes

PropertyDbl _timeScaleProp
 Scale factor for normalizing time.
double & _timeScale
PropertyDbl _activation1Prop
 Parameter used in time constant of ramping up of muscle force.
double & _activation1
PropertyDbl _activation2Prop
 Parameter used in time constant of ramping up and ramping down of muscle force.
double & _activation2
PropertyDbl _massProp
 Mass between the tendon and muscle fibers.
double & _mass
PropertyObjPtr< Function_tendonForceLengthCurveProp
Function *& _tendonForceLengthCurve
PropertyObjPtr< Function_activeForceLengthCurveProp
Function *& _activeForceLengthCurve
PropertyObjPtr< Function_passiveForceLengthCurveProp
Function *& _passiveForceLengthCurve
PropertyObjPtr< Function_forceVelocityCurveProp
Function *& _forceVelocityCurve

Detailed Description

A class implementing a SIMM muscle.

This implementation is based on muscle model 2 from the Dynamics Pipeline, but is modified slightly so that when fiber_velocity = 0.0, this model calculates lengths and forces that match SIMM's isometric calculations.

Author:
Peter Loan
Version:
1.0

Constructor & Destructor Documentation

Delp1990Muscle::Delp1990Muscle (  ) 

Default constructor.

Delp1990Muscle::Delp1990Muscle ( const std::string &  aName,
double  aMaxIsometricForce,
double  aOptimalFiberLength,
double  aTendonSlackLength,
double  aPennationAngle 
)

Constructor.

Delp1990Muscle::Delp1990Muscle ( const Delp1990Muscle aMuscle  ) 

Copy constructor.

Parameters:
aMuscle Delp1990Muscle to be copied.
Delp1990Muscle::~Delp1990Muscle (  )  [virtual]

Destructor.


Member Function Documentation

double Delp1990Muscle::computeActuation ( const SimTK::State &  s  )  const [virtual]

Compute the actuation for the muscle.

This function assumes that computeDerivatives has already been called.

Implements OpenSim::ActivationFiberLengthMuscle.

void Delp1990Muscle::computeEquilibrium ( SimTK::State &  s  )  const [virtual]

Compute the equilibrium states.

This method computes a fiber length for the muscle that is consistent with the muscle's activation level.

Reimplemented from OpenSim::Actuator_.

double Delp1990Muscle::computeIsometricForce ( SimTK::State &  s,
double  aActivation 
) const [virtual]

computeIsometricForce: this function finds the force in a muscle, assuming static equilibrium.

Using the total muscle-tendon length, it finds the fiber and tendon lengths so that the forces in each match. This routine takes pennation angle into account, so its definition of static equilibrium is when tendon_force = fiber_force * cos(pennation_angle). This funcion will modify the object's values for length, fiber length, active force, and passive force.

Parameters:
aActivation Activation of the muscle.
Returns:
The isometric force in the muscle.

Implements OpenSim::ActivationFiberLengthMuscle.

SimTK::Vector Delp1990Muscle::computeStateVariableDerivatives ( const SimTK::State &  s  )  const [protected, virtual]

Compute the derivatives of the muscle states.

Parameters:
rDYDT the state derivatives are returned here.

Reimplemented from OpenSim::ModelComponent.

Object * Delp1990Muscle::copy (  )  const [virtual]

Copy this muscle point and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this Delp1990Muscle.

Implements OpenSim::ActivationFiberLengthMuscle.

void Delp1990Muscle::copyData ( const Delp1990Muscle aMuscle  ) 

Copy data members from one Delp1990Muscle to another.

Parameters:
aMuscle Delp1990Muscle to be copied.

Reimplemented from OpenSim::ActivationFiberLengthMuscle.

void Delp1990Muscle::createSystem ( SimTK::MultibodySystem &  system  )  const [protected, virtual]

allocate and initialize the SimTK state for this acuator.

Reimplemented from OpenSim::ActivationFiberLengthMuscle.

double Delp1990Muscle::getActiveForce ( const SimTK::State &  s  )  const [virtual]
Function * Delp1990Muscle::getActiveForceLengthCurve (  )  const [virtual]

Get the active force-length curve.

Returns:
Pointer to the active force-length curve (Function).
virtual double OpenSim::Delp1990Muscle::getFiberVelocity ( const SimTK::State &  s  )  const [inline, virtual]
virtual double OpenSim::Delp1990Muscle::getFiberVelocityDeriv ( const SimTK::State &  s  )  const [inline, virtual]
Function * Delp1990Muscle::getForceVelocityCurve (  )  const [virtual]

Get the force-velocity curve.

Returns:
Pointer to the force-velocity curve (Function).
virtual double OpenSim::Delp1990Muscle::getMass (  )  const [inline, virtual]
Function * Delp1990Muscle::getPassiveForceLengthCurve (  )  const [virtual]

Get the passive force-length curve.

Returns:
Pointer to the passive force-length curve (Function).
int Delp1990Muscle::getStateVariableYIndex ( int  index  )  const [virtual]

Get the YIndex of a state variable allocated by this ModelComponent.

The default implementation throws an exception, so subclasses that allocate state variables must override it.

Parameters:
index the index of the state variable (0 to getNumStateVariables()-1)

Reimplemented from OpenSim::ModelComponent.

Function * Delp1990Muscle::getTendonForceLengthCurve (  )  const [virtual]

Get the tendon force-length curve.

Returns:
Pointer to the tendon force-length curve (Function).
virtual double OpenSim::Delp1990Muscle::getTimeScale (  )  const [inline, virtual]
OpenSim::Delp1990Muscle::OPENSIM_DECLARE_DERIVED ( Delp1990Muscle  ,
ActivationFiberLengthMuscle   
)
Delp1990Muscle & Delp1990Muscle::operator= ( const Delp1990Muscle aMuscle  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::ActivationFiberLengthMuscle.

bool Delp1990Muscle::setActivation1 ( double  aActivation1  )  [virtual]

Set the time constant of ramping up of muscle force.

Parameters:
aActivation1 The time constant of ramping up of muscle force.
Returns:
Whether the time constant was successfully changed.
bool Delp1990Muscle::setActivation2 ( double  aActivation2  )  [virtual]

Set the time constant of ramping up and ramping down of muscle force.

Parameters:
aActivation1 The time constant of ramping up and ramping down of muscle force.
Returns:
Whether the time constant was successfully changed.
void Delp1990Muscle::setActiveForce ( const SimTK::State &  s,
double  aForce 
) const [virtual]
bool Delp1990Muscle::setActiveForceLengthCurve ( Function aActiveForceLengthCurve  )  [virtual]

Set the active force-length curve.

Parameters:
aActiveForceLengthCurve Pointer to an active force-length curve (Function).
Returns:
Whether active force-length curve was successfully changed.
virtual void OpenSim::Delp1990Muscle::setFiberVelocity ( SimTK::State &  s,
double  fiberVelocity 
) const [inline, virtual]
virtual void OpenSim::Delp1990Muscle::setFiberVelocityDeriv ( const SimTK::State &  s,
double  fiberVelocityDeriv 
) const [inline, virtual]
bool Delp1990Muscle::setForceVelocityCurve ( Function aForceVelocityCurve  )  [virtual]

Set the force-velocity curve.

Parameters:
aForceVelocityCurve Pointer to a force-velocity curve (Function).
Returns:
Whether force-velocity curve was successfully changed.
bool Delp1990Muscle::setMass ( double  aMass  )  [virtual]

Set the mass of the muscle.

Parameters:
aMass The mass of the muscle.
Returns:
Whether the mass was successfully changed.
bool Delp1990Muscle::setPassiveForceLengthCurve ( Function aPassiveForceLengthCurve  )  [virtual]

Set the passive force-length curve.

Parameters:
aPassiveForceLengthCurve Pointer to a passive force-length curve (Function).
Returns:
Whether passive force-length curve was successfully changed.
bool Delp1990Muscle::setTendonForceLengthCurve ( Function aTendonForceLengthCurve  )  [virtual]

Set the tendon force-length curve.

Parameters:
aTendonForceLengthCurve Pointer to a tendon force-length curve (Function).
Returns:
Whether tendon force-length curve was successfully changed.
bool Delp1990Muscle::setTimeScale ( double  aTimeScale  )  [virtual]

Set the scale factor for normalizing time.

Parameters:
aTimeScale The scale factor for normalizing time.
Returns:
Whether the scale factor was successfully changed.
void Delp1990Muscle::setup ( Model aModel  )  [protected, virtual]

Perform some set up functions that happen after the object has been deserialized or copied.

Parameters:
aModel model containing this Delp1990Muscle.

Reimplemented from OpenSim::ActivationFiberLengthMuscle.


Member Data Documentation

Parameter used in time constant of ramping up of muscle force.

Parameter used in time constant of ramping up and ramping down of muscle force.

double& OpenSim::Delp1990Muscle::_mass [protected]

Mass between the tendon and muscle fibers.

Scale factor for normalizing time.


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

Generated on Sun Sep 25 00:19:44 2011 for OpenSim by  doxygen 1.6.1