A class implementing a SIMM muscle. More...
#include <Delp1990Muscle.h>
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 Object * | copy () const |
Copy this muscle point and return a pointer to the copy. | |
Delp1990Muscle & | operator= (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 Function * | getActiveForceLengthCurve () const |
Get the active force-length curve. | |
virtual bool | setActiveForceLengthCurve (Function *aActiveForceLengthCurve) |
Set the active force-length curve. | |
virtual Function * | getPassiveForceLengthCurve () const |
Get the passive force-length curve. | |
virtual bool | setPassiveForceLengthCurve (Function *aPassiveForceLengthCurve) |
Set the passive force-length curve. | |
virtual Function * | getTendonForceLengthCurve () const |
Get the tendon force-length curve. | |
virtual bool | setTendonForceLengthCurve (Function *aTendonForceLengthCurve) |
Set the tendon force-length curve. | |
virtual Function * | getForceVelocityCurve () 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 |
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.
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.
aMuscle | Delp1990Muscle to be copied. |
Delp1990Muscle::~Delp1990Muscle | ( | ) | [virtual] |
Destructor.
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.
aActivation | Activation of the muscle. |
Implements OpenSim::ActivationFiberLengthMuscle.
SimTK::Vector Delp1990Muscle::computeStateVariableDerivatives | ( | const SimTK::State & | s | ) | const [protected, virtual] |
Compute the derivatives of the muscle states.
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.
Implements OpenSim::ActivationFiberLengthMuscle.
void Delp1990Muscle::copyData | ( | const Delp1990Muscle & | aMuscle | ) |
Copy data members from one Delp1990Muscle to another.
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.
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.
virtual double OpenSim::Delp1990Muscle::getMass | ( | ) | const [inline, virtual] |
Function * Delp1990Muscle::getPassiveForceLengthCurve | ( | ) | const [virtual] |
Get the passive force-length curve.
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.
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.
virtual double OpenSim::Delp1990Muscle::getTimeScale | ( | ) | const [inline, virtual] |
OpenSim::Delp1990Muscle::OPENSIM_DECLARE_DERIVED | ( | Delp1990Muscle | , | |
ActivationFiberLengthMuscle | ||||
) |
Delp1990Muscle & Delp1990Muscle::operator= | ( | const Delp1990Muscle & | aMuscle | ) |
Assignment operator.
Reimplemented from OpenSim::ActivationFiberLengthMuscle.
bool Delp1990Muscle::setActivation1 | ( | double | aActivation1 | ) | [virtual] |
Set the time constant of ramping up of muscle force.
aActivation1 | The time constant of ramping up of muscle force. |
bool Delp1990Muscle::setActivation2 | ( | double | aActivation2 | ) | [virtual] |
Set the time constant of ramping up and ramping down of muscle force.
aActivation1 | The time constant of ramping up and ramping down of muscle force. |
void Delp1990Muscle::setActiveForce | ( | const SimTK::State & | s, | |
double | aForce | |||
) | const [virtual] |
bool Delp1990Muscle::setActiveForceLengthCurve | ( | Function * | aActiveForceLengthCurve | ) | [virtual] |
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] |
bool Delp1990Muscle::setMass | ( | double | aMass | ) | [virtual] |
Set the mass of the muscle.
aMass | The mass of the muscle. |
bool Delp1990Muscle::setPassiveForceLengthCurve | ( | Function * | aPassiveForceLengthCurve | ) | [virtual] |
bool Delp1990Muscle::setTendonForceLengthCurve | ( | Function * | aTendonForceLengthCurve | ) | [virtual] |
bool Delp1990Muscle::setTimeScale | ( | double | aTimeScale | ) | [virtual] |
Set the scale factor for normalizing time.
aTimeScale | The scale factor for normalizing time. |
void Delp1990Muscle::setup | ( | Model & | aModel | ) | [protected, virtual] |
Perform some set up functions that happen after the object has been deserialized or copied.
aModel | model containing this Delp1990Muscle. |
Reimplemented from OpenSim::ActivationFiberLengthMuscle.
double& OpenSim::Delp1990Muscle::_activation1 [protected] |
PropertyDbl OpenSim::Delp1990Muscle::_activation1Prop [protected] |
Parameter used in time constant of ramping up of muscle force.
double& OpenSim::Delp1990Muscle::_activation2 [protected] |
PropertyDbl OpenSim::Delp1990Muscle::_activation2Prop [protected] |
Parameter used in time constant of ramping up and ramping down of muscle force.
Function*& OpenSim::Delp1990Muscle::_activeForceLengthCurve [protected] |
Function*& OpenSim::Delp1990Muscle::_forceVelocityCurve [protected] |
double& OpenSim::Delp1990Muscle::_mass [protected] |
PropertyDbl OpenSim::Delp1990Muscle::_massProp [protected] |
Mass between the tendon and muscle fibers.
Function*& OpenSim::Delp1990Muscle::_passiveForceLengthCurve [protected] |
Function*& OpenSim::Delp1990Muscle::_tendonForceLengthCurve [protected] |
double& OpenSim::Delp1990Muscle::_timeScale [protected] |
PropertyDbl OpenSim::Delp1990Muscle::_timeScaleProp [protected] |
Scale factor for normalizing time.