A class implementing a SIMM muscle. More...
#include <Delp1990Muscle.h>
Public Member Functions | |
Delp1990Muscle () | |
Default 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. | |
virtual void | initStateCache (SimTK::State &s, SimTK::SubsystemIndex subsystemIndex, Model &model) |
allocate and initialize the SimTK state for this acuator. | |
virtual void | equilibrate (SimTK::State &state) const |
void | copyData (const Delp1990Muscle &aMuscle) |
Copy data members from one Delp1990Muscle to another. | |
virtual void | copyPropertyValues (Actuator &aActuator) |
Copy the property values from another actuator, which may not be a Delp1990Muscle. | |
virtual double | getMaxIsometricForce () const |
getMaxIsometricForce needs to be overridden by derived classes to be usable | |
virtual double | getOptimalFiberLength () const |
virtual double | getTendonSlackLength () const |
virtual double | getPennationAngleAtOptimalFiberLength () const |
virtual double | getMaxContractionVelocity () const |
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 | setMaxIsometricForce (double aMaxIsometricForce) |
Set the maximum isometric force that the fibers can generate. | |
virtual bool | setOptimalFiberLength (double aOptimalFiberLength) |
Set the optimal length of the muscle fibers. | |
virtual bool | setTendonSlackLength (double aTendonSlackLength) |
Set the resting length of the tendon. | |
virtual bool | setPennationAngle (double aPennationAngle) |
Set the angle between tendon and fibers at optimal fiber length. | |
virtual bool | setMaxContractionVelocity (double aMaxContractionVelocity) |
Set the maximum contraction velocity of the fibers, in optimal fiber lengths per second. | |
virtual bool | setMass (double aMass) |
Set the mass of the muscle. | |
virtual double | getPennationAngle (const SimTK::State &) const |
Get the current pennation angle of the muscle fiber(s). | |
virtual double | getNormalizedFiberLength (const SimTK::State &) const |
Get the normalized length of the muscle fiber(s). | |
virtual double | getPassiveFiberForce (const SimTK::State &) const |
Get the passive force generated by the muscle fibers. | |
double | getStress (const SimTK::State &s) const |
Compute stress. | |
virtual double | getActivation (const SimTK::State &s) const |
virtual void | setActivation (SimTK::State &s, double activation) const |
virtual double | getActivationDeriv (const SimTK::State &s) const |
virtual void | setActivationDeriv (const SimTK::State &s, double activationDeriv) const |
virtual double | getFiberLength (const SimTK::State &s) const |
virtual void | setFiberLength (SimTK::State &s, double fiberLength) const |
virtual double | getFiberLengthDeriv (const SimTK::State &s) const |
virtual void | setFiberLengthDeriv (const SimTK::State &s, double fiberLengthDeriv) const |
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 | setTendonForce (const SimTK::State &s, double aForce) const |
virtual double | getTendonForce (const SimTK::State &s) const |
virtual void | setActiveForce (const SimTK::State &s, double aForce) const |
virtual double | getActiveForce (const SimTK::State &s) const |
virtual void | setPassiveForce (const SimTK::State &s, double aForce) const |
virtual double | getPassiveForce (const SimTK::State &s) const |
virtual void | computeStateDerivatives (const SimTK::State &s) |
Compute the derivatives of the muscle states. | |
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 double | computeIsokineticForceAssumingInfinitelyStiffTendon (SimTK::State &s, double aActivation) |
Find the force produced by muscle under isokinetic conditions assuming an infinitely stiff tendon. | |
virtual void | postScale (const SimTK::State &s, const ScaleSet &aScaleSet) |
Perform computations that need to happen after the muscle is scaled. | |
virtual void | scale (const SimTK::State &s, const ScaleSet &aScaleSet) |
Scale the muscle. | |
virtual void | setup (Model &aModel) |
Perform some set up functions that happen after the object has been deserialized or copied. | |
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. | |
OPENSIM_DECLARE_DERIVED (Delp1990Muscle, Actuator) | |
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 | _maxIsometricForceProp |
Maximum isometric force that the fibers can generate. | |
double & | _maxIsometricForce |
PropertyDbl | _optimalFiberLengthProp |
Optimal length of the muscle fibers. | |
double & | _optimalFiberLength |
PropertyDbl | _tendonSlackLengthProp |
Resting length of the tendon. | |
double & | _tendonSlackLength |
PropertyDbl | _pennationAngleProp |
Angle between tendon and fibers at optimal fiber length. | |
double & | _pennationAngle |
PropertyDbl | _maxContractionVelocityProp |
Maximum contraction velocity of the fibers, in optimal fiberlengths per second. | |
double & | _maxContractionVelocity |
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 |
SimTK::CacheEntryIndex | _tendonForceIndex |
SimTK::CacheEntryIndex | _activeForceIndex |
SimTK::CacheEntryIndex | _passiveForceIndex |
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 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.
Reimplemented from OpenSim::Muscle.
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::computeIsokineticForceAssumingInfinitelyStiffTendon | ( | SimTK::State & | s, | |
double | aActivation | |||
) | [virtual] |
Find the force produced by muscle under isokinetic conditions assuming an infinitely stiff tendon.
That is, all the shortening velocity of the actuator (the musculotendon unit) is assumed to be due to the shortening of the muscle fibers alone. This methods calls computeIsometricForce and so alters the internal member variables of this muscle.
Note that the current implementation approximates the effect of the force-velocity curve. It does not account for the shortening velocity when it is solving for the equilibrium length of the muscle fibers. And, a generic representation of the force-velocity curve is used (as opposed to the implicit force-velocity curve assumed by this model.
aActivation | Activation of the muscle. |
Implements OpenSim::Muscle.
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::Muscle.
void Delp1990Muscle::computeStateDerivatives | ( | const SimTK::State & | s | ) | [virtual] |
Compute the derivatives of the muscle states.
rDYDT | the state derivatives are returned here. |
Reimplemented from OpenSim::Actuator.
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::Muscle.
void Delp1990Muscle::copyData | ( | const Delp1990Muscle & | aMuscle | ) |
Copy data members from one Delp1990Muscle to another.
aMuscle | Delp1990Muscle to be copied. |
Reimplemented from OpenSim::Muscle.
void Delp1990Muscle::copyPropertyValues | ( | Actuator & | aActuator | ) | [virtual] |
Copy the property values from another actuator, which may not be a Delp1990Muscle.
aActuator | Actuator to copy property values from. |
void Delp1990Muscle::equilibrate | ( | SimTK::State & | state | ) | const [virtual] |
Reimplemented from OpenSim::Muscle.
virtual double OpenSim::Delp1990Muscle::getActivation | ( | const SimTK::State & | s | ) | const [inline, virtual] |
Implements OpenSim::Muscle.
virtual double OpenSim::Delp1990Muscle::getActivationDeriv | ( | const SimTK::State & | s | ) | const [inline, virtual] |
double Delp1990Muscle::getActiveForce | ( | const SimTK::State & | s | ) | const [virtual] |
Function * Delp1990Muscle::getActiveForceLengthCurve | ( | ) | const [virtual] |
Get the active force-length curve.
virtual double OpenSim::Delp1990Muscle::getFiberLength | ( | const SimTK::State & | s | ) | const [inline, virtual] |
Implements OpenSim::Muscle.
virtual double OpenSim::Delp1990Muscle::getFiberLengthDeriv | ( | const SimTK::State & | s | ) | const [inline, virtual] |
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] |
virtual double OpenSim::Delp1990Muscle::getMaxContractionVelocity | ( | ) | const [inline, virtual] |
virtual double OpenSim::Delp1990Muscle::getMaxIsometricForce | ( | ) | const [inline, virtual] |
getMaxIsometricForce needs to be overridden by derived classes to be usable
Reimplemented from OpenSim::Muscle.
double Delp1990Muscle::getNormalizedFiberLength | ( | const SimTK::State & | s | ) | const [virtual] |
Get the normalized length of the muscle fiber(s).
This is the current fiber length(s) divided by the optimal fiber length.
Current | length of the muscle fiber(s). |
Implements OpenSim::Muscle.
virtual double OpenSim::Delp1990Muscle::getOptimalFiberLength | ( | ) | const [inline, virtual] |
double Delp1990Muscle::getPassiveFiberForce | ( | const SimTK::State & | s | ) | const [virtual] |
Get the passive force generated by the muscle fibers.
Current | active force of the muscle fiber(s). |
Implements OpenSim::Muscle.
double Delp1990Muscle::getPassiveForce | ( | const SimTK::State & | s | ) | const [virtual] |
Function * Delp1990Muscle::getPassiveForceLengthCurve | ( | ) | const [virtual] |
Get the passive force-length curve.
double Delp1990Muscle::getPennationAngle | ( | const SimTK::State & | s | ) | const [virtual] |
Get the current pennation angle of the muscle fiber(s).
Pennation | angle. |
Implements OpenSim::Muscle.
virtual double OpenSim::Delp1990Muscle::getPennationAngleAtOptimalFiberLength | ( | ) | const [inline, virtual] |
Implements OpenSim::Muscle.
double Delp1990Muscle::getStress | ( | const SimTK::State & | s | ) | const [virtual] |
Compute stress.
Reimplemented from OpenSim::Actuator.
double Delp1990Muscle::getTendonForce | ( | const SimTK::State & | s | ) | const [virtual] |
Function * Delp1990Muscle::getTendonForceLengthCurve | ( | ) | const [virtual] |
Get the tendon force-length curve.
virtual double OpenSim::Delp1990Muscle::getTendonSlackLength | ( | ) | const [inline, virtual] |
virtual double OpenSim::Delp1990Muscle::getTimeScale | ( | ) | const [inline, virtual] |
void Delp1990Muscle::initStateCache | ( | SimTK::State & | s, | |
SimTK::SubsystemIndex | subsystemIndex, | |||
Model & | model | |||
) | [virtual] |
allocate and initialize the SimTK state for this acuator.
Reimplemented from OpenSim::Muscle.
OpenSim::Delp1990Muscle::OPENSIM_DECLARE_DERIVED | ( | Delp1990Muscle | , | |
Actuator | ||||
) |
Reimplemented from OpenSim::CustomActuator.
Delp1990Muscle & Delp1990Muscle::operator= | ( | const Delp1990Muscle & | aMuscle | ) |
void Delp1990Muscle::postScale | ( | const SimTK::State & | s, | |
const ScaleSet & | aScaleSet | |||
) | [virtual] |
Perform computations that need to happen after the muscle is scaled.
For this object, that entails comparing the musculotendon length before and after scaling, and scaling some of the force-generating properties a proportional amount.
aScaleSet | XYZ scale factors for the bodies. |
Reimplemented from OpenSim::Muscle.
void Delp1990Muscle::scale | ( | const SimTK::State & | s, | |
const ScaleSet & | aScaleSet | |||
) | [virtual] |
Scale the muscle.
aScaleSet | XYZ scale factors for the bodies |
Reimplemented from OpenSim::Muscle.
virtual void OpenSim::Delp1990Muscle::setActivation | ( | SimTK::State & | s, | |
double | activation | |||
) | const [inline, virtual] |
Implements OpenSim::Muscle.
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. |
virtual void OpenSim::Delp1990Muscle::setActivationDeriv | ( | const SimTK::State & | s, | |
double | activationDeriv | |||
) | const [inline, virtual] |
void Delp1990Muscle::setActiveForce | ( | const SimTK::State & | s, | |
double | aForce | |||
) | const [virtual] |
bool Delp1990Muscle::setActiveForceLengthCurve | ( | Function * | aActiveForceLengthCurve | ) | [virtual] |
virtual void OpenSim::Delp1990Muscle::setFiberLength | ( | SimTK::State & | s, | |
double | fiberLength | |||
) | const [inline, virtual] |
Implements OpenSim::Muscle.
virtual void OpenSim::Delp1990Muscle::setFiberLengthDeriv | ( | const SimTK::State & | s, | |
double | fiberLengthDeriv | |||
) | const [inline, 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::setMaxContractionVelocity | ( | double | aMaxContractionVelocity | ) | [virtual] |
Set the maximum contraction velocity of the fibers, in optimal fiber lengths per second.
aMaxContractionVelocity | The maximum contraction velocity of the fibers, in optimal fiber lengths per second. |
bool Delp1990Muscle::setMaxIsometricForce | ( | double | aMaxIsometricForce | ) | [virtual] |
Set the maximum isometric force that the fibers can generate.
aMaxIsometricForce | The maximum isometric force that the fibers can generate. |
bool Delp1990Muscle::setOptimalFiberLength | ( | double | aOptimalFiberLength | ) | [virtual] |
Set the optimal length of the muscle fibers.
aOptimalFiberLength | The optimal length of the muscle fibers. |
void Delp1990Muscle::setPassiveForce | ( | const SimTK::State & | s, | |
double | aForce | |||
) | const [virtual] |
bool Delp1990Muscle::setPassiveForceLengthCurve | ( | Function * | aPassiveForceLengthCurve | ) | [virtual] |
bool Delp1990Muscle::setPennationAngle | ( | double | aPennationAngle | ) | [virtual] |
Set the angle between tendon and fibers at optimal fiber length.
aPennationAngle | The angle between tendon and fibers at optimal fiber length. |
void Delp1990Muscle::setTendonForce | ( | const SimTK::State & | s, | |
double | aForce | |||
) | const [virtual] |
bool Delp1990Muscle::setTendonForceLengthCurve | ( | Function * | aTendonForceLengthCurve | ) | [virtual] |
bool Delp1990Muscle::setTendonSlackLength | ( | double | aTendonSlackLength | ) | [virtual] |
Set the resting length of the tendon.
aTendonSlackLength | The resting length of the tendon. |
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 | ) | [virtual] |
Perform some set up functions that happen after the object has been deserialized or copied.
aModel | model containing this Delp1990Muscle. |
Reimplemented from OpenSim::Muscle.
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.
SimTK::CacheEntryIndex OpenSim::Delp1990Muscle::_activeForceIndex [protected] |
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.
double& OpenSim::Delp1990Muscle::_maxContractionVelocity [protected] |
Maximum contraction velocity of the fibers, in optimal fiberlengths per second.
double& OpenSim::Delp1990Muscle::_maxIsometricForce [protected] |
Maximum isometric force that the fibers can generate.
double& OpenSim::Delp1990Muscle::_optimalFiberLength [protected] |
Optimal length of the muscle fibers.
SimTK::CacheEntryIndex OpenSim::Delp1990Muscle::_passiveForceIndex [protected] |
Function*& OpenSim::Delp1990Muscle::_passiveForceLengthCurve [protected] |
double& OpenSim::Delp1990Muscle::_pennationAngle [protected] |
Angle between tendon and fibers at optimal fiber length.
SimTK::CacheEntryIndex OpenSim::Delp1990Muscle::_tendonForceIndex [protected] |
Function*& OpenSim::Delp1990Muscle::_tendonForceLengthCurve [protected] |
double& OpenSim::Delp1990Muscle::_tendonSlackLength [protected] |
Resting length of the tendon.
double& OpenSim::Delp1990Muscle::_timeScale [protected] |
PropertyDbl OpenSim::Delp1990Muscle::_timeScaleProp [protected] |
Scale factor for normalizing time.