I am using the default tugOfWar.osim model. I assign two different muscle activations to the muscle and I expect to have two different muscle forces.
here is the script:
Code: Select all
Model OsimModel ("tugOfWar.osim");
SimTK::State& system = OsimModel.initSystem();
const Set<Actuator>& actuatorSet = OsimModel.getActuators();
Thelen2003Muscle* myMusc1 = dynamic_cast<Thelen2003Muscle*>( &actuatorSet.get(0) );
myMusc1 ->setActivation (system, 1.0);
myMusc1 ->setFiberLength (system, 0.108865924);
Thelen2003Muscle* myMusc2 = dynamic_cast<Thelen2003Muscle*>( &actuatorSet.get(1) );
myMusc2 ->setActivation (system, 0.0);
myMusc2 ->setFiberLength (system, 0.108865924);
OsimModel.getMultibodySystem().realize(states, Stage::Acceleration);
//PRINTING SOME MUSCLE PARAMETERS
printf("Fibre Length %f -- %f\n", myMusc1->getFiberLength(states), myMusc2->getFiberLength(states));
printf("Fibre NormVel %f-- %f\n", myMusc1->getNormalizedFiberVelocity(states), myMusc2->getNormalizedFiberVelocity(states));
printf("Muscle Activation %f -- %f\n", myMusc1->getActivation(states), myMusc2->getActivation(states));
printf("Fiber Force %f -- %f\n", myMusc1->getFiberForce(states), myMusc2->getFiberForce(states));
printf("Active FiberForce %f -- %f\n", myMusc1->getActiveFiberForce(states), myMusc2->getActiveFiberForce(states));
printf("Pass FiberForce %f -- %f\n", myMusc1->getPassiveFiberForce(states), myMusc2->getPassiveFiberForce(states));
printf("Pass Force Multiplier %f -- %f\n", myMusc1->getPassiveForceMultiplier(states), myMusc2->getPassiveForceMultiplier(states));
printf("Actv Force Multiplier %f -- %f\n", myMusc1->getActiveForceLengthMultiplier(states),myMusc2->getActiveForceLengthMultiplier(states));
printf("Force Vel Multiplier %f -- %f\n", myMusc1->getForceVelocityMultiplier (states), myMusc2->getForceVelocityMultiplier (states));
As you can see the two muscles have the same fiber lengths and two different activations. Based on that, I expect to have equal passive forces but two different active forces. But as you can see, two muscles have the same active fiber force and active force multipliers. The only difference is the contraction velocities. I was wondering if I am missing sth in my script? Or does it mean that muscle force is not a function of muscle activation? !!Fibre Length 0.108866 -- 0.108866
Fibre NormVel -0.958064 -- 0.000000
Muscle Activation 1.000000 -- 0.010000
Fiber Force 24.880154 -- 24.880154
Active FiberForce 9.844103 -- 9.844103
Pass FiberForce 15.036052 -- 15.036052
Pass Force Multiplier 0.015036 -- 0.015036
Actv Force Multiplier 0.984402 -- 0.984402
Force Vel Multiplier 0.010000 -- 1.000008
Thanks
Sina