A class implementing a SIMM muscle. More...
#include <Schutte1993Muscle.h>
Public Member Functions | |
Schutte1993Muscle () | |
Default constructor. | |
Schutte1993Muscle (const std::string &aName, double aMaxIsometricForce, double aOptimalFiberLength, double aTendonSlackLength, double aPennationAngle) | |
Constructor. | |
Schutte1993Muscle (const Schutte1993Muscle &aMuscle) | |
Copy constructor. | |
virtual | ~Schutte1993Muscle () |
Destructor. | |
virtual Object * | copy () const |
Copy this muscle point and return a pointer to the copy. | |
Schutte1993Muscle & | operator= (const Schutte1993Muscle &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 Schutte1993Muscle &aMuscle) |
Copy data members from one Schutte1993Muscle to another. | |
virtual void | copyPropertyValues (Actuator &aActuator) |
Copy the property values from another actuator, which may not be a Schutte1993Muscle. | |
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 | getDamping () 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 | setDamping (double aDamping) |
Set the damping factor related to maximum contraction velocity. | |
virtual double | getDamping () |
virtual double | getPennationAngle (const SimTK::State &s) const |
Get the current pennation angle of the muscle fiber(s). | |
virtual double | getNormalizedFiberLength (const SimTK::State &s) const |
Get the normalized length of the muscle fiber(s). | |
virtual double | getPassiveFiberForce (const SimTK::State &s) 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 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) |
Get the passive force-length curve. | |
virtual Function * | getTendonForceLengthCurve () const |
Get the tendon force-length curve. | |
virtual bool | setTendonForceLengthCurve (Function *aTendonForceLengthCurve) |
Get the tendon force-length curve. | |
virtual Function * | getForceVelocityCurve () const |
Get the force-velocity curve. | |
virtual bool | setForceVelocityCurve (Function *aForceVelocityCurve) |
Get the force-velocity curve. | |
OPENSIM_DECLARE_DERIVED (Schutte1993Muscle, 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 | _dampingProp |
Damping factor related to maximum contraction velocity. | |
double & | _damping |
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 |
Static Protected Attributes | |
static const int | STATE_ACTIVATION = 0 |
static const int | STATE_FIBER_LENGTH = 1 |
A class implementing a SIMM muscle.
Schutte1993Muscle::Schutte1993Muscle | ( | ) |
Default constructor.
Schutte1993Muscle::Schutte1993Muscle | ( | const std::string & | aName, | |
double | aMaxIsometricForce, | |||
double | aOptimalFiberLength, | |||
double | aTendonSlackLength, | |||
double | aPennationAngle | |||
) |
Constructor.
Schutte1993Muscle::Schutte1993Muscle | ( | const Schutte1993Muscle & | aMuscle | ) |
Copy constructor.
aMuscle | Schutte1993Muscle to be copied. |
Schutte1993Muscle::~Schutte1993Muscle | ( | ) | [virtual] |
Destructor.
double Schutte1993Muscle::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 Schutte1993Muscle::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 Schutte1993Muscle::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 Schutte1993Muscle::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, _fiberLength, _activeForce, and _passiveForce.
aActivation | Activation of the muscle. |
Implements OpenSim::Muscle.
void Schutte1993Muscle::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 * Schutte1993Muscle::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 Schutte1993Muscle::copyData | ( | const Schutte1993Muscle & | aMuscle | ) |
Copy data members from one Schutte1993Muscle to another.
aMuscle | Schutte1993Muscle to be copied. |
Reimplemented from OpenSim::Muscle.
void Schutte1993Muscle::copyPropertyValues | ( | Actuator & | aActuator | ) | [virtual] |
Copy the property values from another actuator, which may not be a Schutte1993Muscle.
aActuator | Actuator to copy property values from. |
void Schutte1993Muscle::equilibrate | ( | SimTK::State & | state | ) | const [virtual] |
Reimplemented from OpenSim::Muscle.
virtual double OpenSim::Schutte1993Muscle::getActivation | ( | const SimTK::State & | s | ) | const [inline, virtual] |
Implements OpenSim::Muscle.
virtual double OpenSim::Schutte1993Muscle::getActivationDeriv | ( | const SimTK::State & | s | ) | const [inline, virtual] |
double Schutte1993Muscle::getActiveForce | ( | const SimTK::State & | s | ) | const [virtual] |
Function * Schutte1993Muscle::getActiveForceLengthCurve | ( | ) | const [virtual] |
Get the active force-length curve.
virtual double OpenSim::Schutte1993Muscle::getDamping | ( | ) | [inline, virtual] |
virtual double OpenSim::Schutte1993Muscle::getDamping | ( | ) | const [inline, virtual] |
virtual double OpenSim::Schutte1993Muscle::getFiberLength | ( | const SimTK::State & | s | ) | const [inline, virtual] |
Implements OpenSim::Muscle.
virtual double OpenSim::Schutte1993Muscle::getFiberLengthDeriv | ( | const SimTK::State & | s | ) | const [inline, virtual] |
Function * Schutte1993Muscle::getForceVelocityCurve | ( | ) | const [virtual] |
Get the force-velocity curve.
virtual double OpenSim::Schutte1993Muscle::getMaxContractionVelocity | ( | ) | const [inline, virtual] |
virtual double OpenSim::Schutte1993Muscle::getMaxIsometricForce | ( | ) | const [inline, virtual] |
getMaxIsometricForce needs to be overridden by derived classes to be usable
Reimplemented from OpenSim::Muscle.
double Schutte1993Muscle::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::Schutte1993Muscle::getOptimalFiberLength | ( | ) | const [inline, virtual] |
double Schutte1993Muscle::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 Schutte1993Muscle::getPassiveForce | ( | const SimTK::State & | s | ) | const [virtual] |
Function * Schutte1993Muscle::getPassiveForceLengthCurve | ( | ) | const [virtual] |
Get the passive force-length curve.
double Schutte1993Muscle::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::Schutte1993Muscle::getPennationAngleAtOptimalFiberLength | ( | ) | const [inline, virtual] |
Implements OpenSim::Muscle.
double Schutte1993Muscle::getStress | ( | const SimTK::State & | s | ) | const [virtual] |
Compute stress.
Reimplemented from OpenSim::Actuator.
double Schutte1993Muscle::getTendonForce | ( | const SimTK::State & | s | ) | const [virtual] |
Function * Schutte1993Muscle::getTendonForceLengthCurve | ( | ) | const [virtual] |
Get the tendon force-length curve.
virtual double OpenSim::Schutte1993Muscle::getTendonSlackLength | ( | ) | const [inline, virtual] |
virtual double OpenSim::Schutte1993Muscle::getTimeScale | ( | ) | const [inline, virtual] |
void Schutte1993Muscle::initStateCache | ( | SimTK::State & | s, | |
SimTK::SubsystemIndex | subsystemIndex, | |||
Model & | model | |||
) | [virtual] |
allocate and initialize the SimTK state for this acuator.
Reimplemented from OpenSim::Muscle.
OpenSim::Schutte1993Muscle::OPENSIM_DECLARE_DERIVED | ( | Schutte1993Muscle | , | |
Actuator | ||||
) |
Reimplemented from OpenSim::CustomActuator.
Schutte1993Muscle & Schutte1993Muscle::operator= | ( | const Schutte1993Muscle & | aMuscle | ) |
void Schutte1993Muscle::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 Schutte1993Muscle::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::Schutte1993Muscle::setActivation | ( | SimTK::State & | s, | |
double | activation | |||
) | const [inline, virtual] |
Implements OpenSim::Muscle.
bool Schutte1993Muscle::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 Schutte1993Muscle::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::Schutte1993Muscle::setActivationDeriv | ( | const SimTK::State & | s, | |
double | activationDeriv | |||
) | const [inline, virtual] |
void Schutte1993Muscle::setActiveForce | ( | const SimTK::State & | s, | |
double | aForce | |||
) | const [virtual] |
bool Schutte1993Muscle::setActiveForceLengthCurve | ( | Function * | aActiveForceLengthCurve | ) | [virtual] |
bool Schutte1993Muscle::setDamping | ( | double | aDamping | ) | [virtual] |
Set the damping factor related to maximum contraction velocity.
aDamping | The damping factor related to maximum contraction velocity. |
virtual void OpenSim::Schutte1993Muscle::setFiberLength | ( | SimTK::State & | s, | |
double | fiberLength | |||
) | const [inline, virtual] |
Implements OpenSim::Muscle.
virtual void OpenSim::Schutte1993Muscle::setFiberLengthDeriv | ( | const SimTK::State & | s, | |
double | fiberLengthDeriv | |||
) | const [inline, virtual] |
bool Schutte1993Muscle::setForceVelocityCurve | ( | Function * | aForceVelocityCurve | ) | [virtual] |
Get the force-velocity curve.
aForceVelocityCurve | Pointer to a force-velocity curve (Function). |
bool Schutte1993Muscle::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 Schutte1993Muscle::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 Schutte1993Muscle::setOptimalFiberLength | ( | double | aOptimalFiberLength | ) | [virtual] |
Set the optimal length of the muscle fibers.
aOptimalFiberLength | The optimal length of the muscle fibers. |
void Schutte1993Muscle::setPassiveForce | ( | const SimTK::State & | s, | |
double | aForce | |||
) | const [virtual] |
bool Schutte1993Muscle::setPassiveForceLengthCurve | ( | Function * | aPassiveForceLengthCurve | ) | [virtual] |
Get the passive force-length curve.
aPassiveForceLengthCurve | Pointer to a passive force-length curve (Function). |
bool Schutte1993Muscle::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 Schutte1993Muscle::setTendonForce | ( | const SimTK::State & | s, | |
double | aForce | |||
) | const [virtual] |
bool Schutte1993Muscle::setTendonForceLengthCurve | ( | Function * | aTendonForceLengthCurve | ) | [virtual] |
Get the tendon force-length curve.
aTendonForceLengthCurve | Pointer to a tendon force-length curve (Function). |
bool Schutte1993Muscle::setTendonSlackLength | ( | double | aTendonSlackLength | ) | [virtual] |
Set the resting length of the tendon.
aTendonSlackLength | The resting length of the tendon. |
bool Schutte1993Muscle::setTimeScale | ( | double | aTimeScale | ) | [virtual] |
Set the scale factor for normalizing time.
aTimeScale | The scale factor for normalizing time. |
void Schutte1993Muscle::setup | ( | Model & | aModel | ) | [virtual] |
Perform some set up functions that happen after the object has been deserialized or copied.
aModel | model containing this Schutte1993Muscle. |
Reimplemented from OpenSim::Muscle.
double& OpenSim::Schutte1993Muscle::_activation1 [protected] |
Parameter used in time constant of ramping up of muscle force.
double& OpenSim::Schutte1993Muscle::_activation2 [protected] |
Parameter used in time constant of ramping up and ramping down of muscle force.
SimTK::CacheEntryIndex OpenSim::Schutte1993Muscle::_activeForceIndex [protected] |
Function*& OpenSim::Schutte1993Muscle::_activeForceLengthCurve [protected] |
double& OpenSim::Schutte1993Muscle::_damping [protected] |
PropertyDbl OpenSim::Schutte1993Muscle::_dampingProp [protected] |
Damping factor related to maximum contraction velocity.
Function*& OpenSim::Schutte1993Muscle::_forceVelocityCurve [protected] |
double& OpenSim::Schutte1993Muscle::_maxContractionVelocity [protected] |
Maximum contraction velocity of the fibers, in optimal fiberlengths per second.
double& OpenSim::Schutte1993Muscle::_maxIsometricForce [protected] |
Maximum isometric force that the fibers can generate.
double& OpenSim::Schutte1993Muscle::_optimalFiberLength [protected] |
Optimal length of the muscle fibers.
SimTK::CacheEntryIndex OpenSim::Schutte1993Muscle::_passiveForceIndex [protected] |
Function*& OpenSim::Schutte1993Muscle::_passiveForceLengthCurve [protected] |
double& OpenSim::Schutte1993Muscle::_pennationAngle [protected] |
Angle between tendon and fibers at optimal fiber length.
SimTK::CacheEntryIndex OpenSim::Schutte1993Muscle::_tendonForceIndex [protected] |
Function*& OpenSim::Schutte1993Muscle::_tendonForceLengthCurve [protected] |
double& OpenSim::Schutte1993Muscle::_tendonSlackLength [protected] |
Resting length of the tendon.
double& OpenSim::Schutte1993Muscle::_timeScale [protected] |
Scale factor for normalizing time.
const int Schutte1993Muscle::STATE_ACTIVATION = 0 [static, protected] |
const int Schutte1993Muscle::STATE_FIBER_LENGTH = 1 [static, protected] |