I am currently implementing a model of spindle afferents, using an object derived from
ModelComponent. The model I use calculates the tension in the spindle's fibers, and to do so it calculates the second derivative of the tension in the
computeStateVariableDerivatives method. The equation for the second derivative of the tension, however, requires the acceleration of the muscle fiber length from the muscle containing the spindle.
I don't know how to control the stage at which
computeStateVariableDerivatives is called, or how to access the acceleration. I tried something like:
Code: Select all
double Lpp = dynamic_cast<const AfferentMuscle*>(musclePtr)->getStateVariableDeriv(s,"fiber_velocity");
where
AfferentMuscle is my muscle class (derived from
Millard2012EquilibriumMuscle), and
musclePtr is a pointer to the muscle containing the spindle afferent object. This resulted in some runtime error.
Is there some way to access the length acceleration from
computeStateVariableDerivatives?