OpenSim::Muscle Class Reference

A base class representing a muscle-tendon actuator. More...

#include <Muscle.h>

Inheritance diagram for OpenSim::Muscle:
OpenSim::PathActuator OpenSim::Actuator OpenSim::Actuator_ OpenSim::Force OpenSim::ModelComponent OpenSim::Object OpenSim::ActivationFiberLengthMuscle OpenSim::RigidTendonMuscle OpenSim::ContDerivMuscle OpenSim::Delp1990Muscle OpenSim::Schutte1993Muscle OpenSim::Thelen2003Muscle

List of all members.

Public Member Functions

 Muscle ()
 Default constructor.
 Muscle (const Muscle &aMuscle)
 Copy constructor.
virtual ~Muscle ()
 Destructor.
virtual Objectcopy () const =0
 Copy this actuator and return a pointer to the copy.
void setName (const std::string &aName)
Muscleoperator= (const Muscle &aMuscle)
 Assignment operator.
void copyData (const Muscle &aMuscle)
 Copy data members from one Muscle to another.
virtual void updateFromXMLNode ()
 Override of the default implementation to account for versioning.
virtual double getMaxIsometricForce () const
virtual double getOptimalFiberLength () const
virtual double getTendonSlackLength () const
virtual double getPennationAngleAtOptimalFiberLength () const
virtual double getMaxContractionVelocity () const
virtual void setMaxIsometricForce (double aMaxIsometricForce)
virtual void setOptimalFiberLength (double aOptimalFiberLength)
virtual void setTendonSlackLength (double aTendonSlackLength)
virtual void setPennationAngleAtOptimalFiberLength (double aPennationAngle)
virtual void setMaxContractionVelocity (double aMaxContractionVelocity)
virtual double getPennationAngle (const SimTK::State &s) const
 Get the current pennation angle of the muscle fiber(s).
virtual double getTendonLength (const SimTK::State &s) const
 Get the length of the tendon.
virtual double getFiberLength (const SimTK::State &s) const =0
virtual double getNormalizedFiberLength (const SimTK::State &s) const =0
virtual double getFiberLengthAlongTendon (const SimTK::State &s) const
 Get the length of the muscle fiber(s) along the tendon.
virtual double getFiberForce (const SimTK::State &s) const
 Compute the force generated by the muscle fibers.
virtual double getActiveFiberForce (const SimTK::State &s) const
 Get the active force generated by the muscle fibers.
virtual double getPassiveFiberForce (const SimTK::State &s) const =0
virtual double getActiveFiberForceAlongTendon (const SimTK::State &s) const
 Get the active force generated by the muscle fibers along the direction of the tendon.
virtual double getPassiveFiberForceAlongTendon (const SimTK::State &s) const
 Get the passive force generated by the muscle fibers along the direction of the tendon.
virtual double getTendonForce (const SimTK::State &s) const =0
virtual double getActivation (const SimTK::State &s) const =0
virtual void setActivation (SimTK::State &s, double activation) const =0
virtual double computeActuation (const SimTK::State &s) const =0
 Compute all quantities necessary for applying the actuator force to the model.
virtual double computeIsometricForce (SimTK::State &s, double activation) const =0
virtual double evaluateForceLengthVelocityCurve (double aActivation, double aNormalizedLength, double aNormalizedVelocity) const
 Evaluate the normalized force-length-velocity curve for the muscle.
virtual double calcPennation (double aFiberLength, double aOptimalFiberLength, double aInitialPennationAngle) const
 Utility function to calculate the current pennation angle in a muscle.
virtual void equilibrate (SimTK::State &state) const =0
virtual OpenSim::Array
< std::string > 
getRecordLabels () const
 Methods to query a Force for the value actually applied during simulation The names of the quantities (column labels) is returned by this first function getRecordLabels().
virtual OpenSim::Array< double > getRecordValues (const SimTK::State &state) const
 Given SimTK::State object extract all the values necessary to report forces, application location frame, etc.
 OPENSIM_DECLARE_DERIVED (Muscle, PathActuator)

Protected Member Functions

virtual void computeForce (const SimTK::State &state, SimTK::Vector_< SimTK::SpatialVec > &bodyForces, SimTK::Vector &generalizedForce) const
 Apply the muscle's force at its points of attachment to the bodies.
virtual void updateGeometry (const SimTK::State &s) const
virtual void setup (Model &aModel)
 Perform set up functions after model has been deserialized or copied.
virtual void createSystem (SimTK::MultibodySystem &system) const
 allocate and initialize the SimTK state for this acuator.
virtual void initState (SimTK::State &s) const
 This is called after a SimTK System and State have been created for the Model.
virtual void setDefaultsFromState (const SimTK::State &state)
 Set all default values for this object to match those in a specified State.

Protected Attributes

PropertyDbl _optimalFiberLengthProp
 Optimal length of the muscle fibers.
double & _optimalFiberLength
PropertyDbl _maxIsometricForceProp
 Maximum isometric force that the fibers can generate.
double & _maxIsometricForce
PropertyDbl _tendonSlackLengthProp
 Resting length of the tendon.
double & _tendonSlackLength
PropertyDbl _pennationAngleAtOptimalProp
 Angle between tendon and fibers at optimal fiber length.
double & _pennationAngleAtOptimal
PropertyDbl _maxContractionVelocityProp
 Maximum contraction velocity of the fibers, in optimal fiberlengths per second.
double & _maxContractionVelocity

Detailed Description

A base class representing a muscle-tendon actuator.

It adds data and methods to PathActuator, but does not implement all of the necessary methods, and remains an abstract class. The path information for a muscle is contained in PathActuator, and the force-generating behavior should be defined in the derived classes.

This class defines a subset of muscle models that include an active fiber (contractile element) in series with a tendon. This class defines common data members and handles the geometry of a unipennate fiber in connection with a tendon. No states are assumed, but concrete classes are free to add whatever states are necessary to describe the specific behavior of a muscle.

Version:
2.0
Author:
Ajay Seth
Version:
1.0
Author:
Peter Loan
Frank C. Anderson

Constructor & Destructor Documentation

Muscle::Muscle (  ) 

Default constructor.

Muscle::Muscle ( const Muscle aMuscle  ) 

Copy constructor.

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

Destructor.


Member Function Documentation

double Muscle::calcPennation ( double  aFiberLength,
double  aOptimalFiberLength,
double  aInitialPennationAngle 
) const [virtual]

Utility function to calculate the current pennation angle in a muscle.

Pennation angle increases as muscle fibers shorten. The implicit modeling assumption is that muscles have constant width.

Parameters:
aFiberLength Current fiber length of muscle.
aOptimalFiberLength Optimal fiber length of muscle.
aInitialPennationAngle Pennation angle at optimal fiber length (in radians).
Returns:
Current pennation angle (in radians).
virtual double OpenSim::Muscle::computeActuation ( const SimTK::State &  s  )  const [pure virtual]

Compute all quantities necessary for applying the actuator force to the model.

Reimplemented from OpenSim::PathActuator.

Implemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, and OpenSim::ActivationFiberLengthMuscle.

void Muscle::computeForce ( const SimTK::State &  state,
SimTK::Vector_< SimTK::SpatialVec > &  bodyForces,
SimTK::Vector &  generalizedForce 
) const [protected, virtual]

Apply the muscle's force at its points of attachment to the bodies.

Reimplemented from OpenSim::PathActuator.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

virtual double OpenSim::Muscle::computeIsometricForce ( SimTK::State &  s,
double  activation 
) const [pure virtual]
virtual Object* OpenSim::Muscle::copy (  )  const [pure virtual]

Copy this actuator and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this actuator.

Reimplemented from OpenSim::PathActuator.

Implemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, and OpenSim::ActivationFiberLengthMuscle.

void Muscle::copyData ( const Muscle aMuscle  ) 

Copy data members from one Muscle to another.

Parameters:
aMuscle Muscle to be copied.

Reimplemented from OpenSim::PathActuator.

Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, and OpenSim::ActivationFiberLengthMuscle.

void Muscle::createSystem ( SimTK::MultibodySystem &  system  )  const [protected, virtual]
virtual void OpenSim::Muscle::equilibrate ( SimTK::State &  state  )  const [pure virtual]
double Muscle::evaluateForceLengthVelocityCurve ( double  aActivation,
double  aNormalizedLength,
double  aNormalizedVelocity 
) const [virtual]

Evaluate the normalized force-length-velocity curve for the muscle.

A simple generic implementation is used here. Derived classes should override this method for more precise evaluation of the force-length-velocity curve.

Parameters:
aActivation Activation level of the muscle. 1.0 is full activation; 0.0 is no activation.
aNormalizedLength Normalized length of the muscle fibers. 1.0 indicates the muscle fibers are at their optimal length. Lnorm = L / Lo.
aNormalizedVelocity Normalized shortening velocity of the muscle fibers. Positive values indicate concentric contraction (shortening); negative values indicate eccentric contraction (lengthening). Normalized velocity is the fiber shortening velocity divided by the maximum shortening velocity times the optimal fiber length. Vnorm = V / (Vmax*Lo).
Returns:
Force normalized by the optimal force.
virtual double OpenSim::Muscle::getActivation ( const SimTK::State &  s  )  const [pure virtual]
double Muscle::getActiveFiberForce ( const SimTK::State &  s  )  const [virtual]

Get the active force generated by the muscle fibers.

Returns:
Current active force of the muscle fibers.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

double Muscle::getActiveFiberForceAlongTendon ( const SimTK::State &  s  )  const [virtual]

Get the active force generated by the muscle fibers along the direction of the tendon.

Returns:
Current active force of the muscle fibers along tendon.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

double Muscle::getFiberForce ( const SimTK::State &  s  )  const [virtual]

Compute the force generated by the muscle fibers.

This accounts for pennation angle. That is, the fiber force is computed by dividing the actuator force by the cosine of the pennation angle.

Returns:
Force in the muscle fibers.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

virtual double OpenSim::Muscle::getFiberLength ( const SimTK::State &  s  )  const [pure virtual]
double Muscle::getFiberLengthAlongTendon ( const SimTK::State &  s  )  const [virtual]

Get the length of the muscle fiber(s) along the tendon.

This method accounts for the pennation angle.

Returns:
Current length of the muscle fiber(s) along the direction of the tendon.

Reimplemented in OpenSim::ActivationFiberLengthMuscle.

virtual double OpenSim::Muscle::getMaxContractionVelocity (  )  const [inline, virtual]
virtual double OpenSim::Muscle::getMaxIsometricForce (  )  const [inline, virtual]
virtual double OpenSim::Muscle::getNormalizedFiberLength ( const SimTK::State &  s  )  const [pure virtual]
virtual double OpenSim::Muscle::getOptimalFiberLength (  )  const [inline, virtual]
virtual double OpenSim::Muscle::getPassiveFiberForce ( const SimTK::State &  s  )  const [pure virtual]
double Muscle::getPassiveFiberForceAlongTendon ( const SimTK::State &  s  )  const [virtual]

Get the passive force generated by the muscle fibers along the direction of the tendon.

Returns:
Current passive force of the muscle fibers along tendon.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

double Muscle::getPennationAngle ( const SimTK::State &  s  )  const [virtual]

Get the current pennation angle of the muscle fiber(s).

Parameters:
Pennation angle.
virtual double OpenSim::Muscle::getPennationAngleAtOptimalFiberLength (  )  const [inline, virtual]
virtual OpenSim::Array<std::string> OpenSim::Muscle::getRecordLabels (  )  const [inline, virtual]

Methods to query a Force for the value actually applied during simulation The names of the quantities (column labels) is returned by this first function getRecordLabels().

Reimplemented from OpenSim::PathActuator.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

virtual OpenSim::Array<double> OpenSim::Muscle::getRecordValues ( const SimTK::State &  state  )  const [inline, virtual]

Given SimTK::State object extract all the values necessary to report forces, application location frame, etc.

used in conjunction with getRecordLabels and should return same size Array

Reimplemented from OpenSim::PathActuator.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

virtual double OpenSim::Muscle::getTendonForce ( const SimTK::State &  s  )  const [pure virtual]
double Muscle::getTendonLength ( const SimTK::State &  s  )  const [virtual]

Get the length of the tendon.

Returns:
Current length of the tendon.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

virtual double OpenSim::Muscle::getTendonSlackLength (  )  const [inline, virtual]
void Muscle::initState ( SimTK::State &  state  )  const [protected, virtual]

This is called after a SimTK System and State have been created for the Model.

It must be implementd to set initial values of state variables.

Parameters:
state the State to initialize

Reimplemented from OpenSim::Actuator.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

OpenSim::Muscle::OPENSIM_DECLARE_DERIVED ( Muscle  ,
PathActuator   
)

Reimplemented in OpenSim::RigidTendonMuscle.

Muscle & Muscle::operator= ( const Muscle aMuscle  ) 

Assignment operator.

Parameters:
aMuscle The muscle from which to copy its data
Returns:
Reference to this object.

Reimplemented from OpenSim::PathActuator.

Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, and OpenSim::ActivationFiberLengthMuscle.

virtual void OpenSim::Muscle::setActivation ( SimTK::State &  s,
double  activation 
) const [pure virtual]
void Muscle::setDefaultsFromState ( const SimTK::State &  state  )  [protected, virtual]

Set all default values for this object to match those in a specified State.

It must be implemented/overriden to set any default values defined by each subclass.

Parameters:
state the State from which to take values that should become the defaults for this object

Reimplemented from OpenSim::Actuator.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

virtual void OpenSim::Muscle::setMaxContractionVelocity ( double  aMaxContractionVelocity  )  [inline, virtual]
virtual void OpenSim::Muscle::setMaxIsometricForce ( double  aMaxIsometricForce  )  [inline, virtual]
void OpenSim::Muscle::setName ( const std::string &  aName  ) 
virtual void OpenSim::Muscle::setOptimalFiberLength ( double  aOptimalFiberLength  )  [inline, virtual]
virtual void OpenSim::Muscle::setPennationAngleAtOptimalFiberLength ( double  aPennationAngle  )  [inline, virtual]
virtual void OpenSim::Muscle::setTendonSlackLength ( double  aTendonSlackLength  )  [inline, virtual]
void Muscle::setup ( Model aModel  )  [protected, virtual]

Perform set up functions after model has been deserialized or copied.

Parameters:
aModel The model containing this muscle.

Reimplemented from OpenSim::PathActuator.

Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, and OpenSim::ActivationFiberLengthMuscle.

void Muscle::updateFromXMLNode (  )  [virtual]

Override of the default implementation to account for versioning.

Override default implementation by object to intercept and fix the XML node underneath the model to match current version.

Reimplemented from OpenSim::PathActuator.

Reimplemented in OpenSim::RigidTendonMuscle, and OpenSim::ActivationFiberLengthMuscle.

void Muscle::updateGeometry ( const SimTK::State &  s  )  const [protected, virtual]

Member Data Documentation

Maximum contraction velocity of the fibers, in optimal fiberlengths per second.

Maximum isometric force that the fibers can generate.

Optimal length of the muscle fibers.

Angle between tendon and fibers at optimal fiber length.

Resting length of the tendon.


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

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