Changing muscles on one leg only

Hello everyone,

I want to change the F0 value of single muscles on only one leg or remove the muscle completly. It doesn’t work, when I simply comment out the muscle in the Mus.any file or if I change the F0 value in the MusMdlSimple_2.any file, since both legs refer to this files.
How can I change this parameters on one leg only?

Thanks for your help and kind regards,
Kathrin :slight_smile:

Hi Kathrin,

Generally speaking it is not recommended to modify the repository. Here is a trick how to do it as an operation. You can nullify the F0 value before you run the analysis similarly as coordinates are changed below (just provide the F0 full path and make a corresponding float variable with 0 value :

  // Changing muscle geometry
  Main.Study.InitialConditions.PreOperation = {
    AnyOperationSequence UpdateAll = {
     AnyOperationSetValue UpdateMuscles  = {
       AnyFloat ShankSemitendinosus1Node_New =  {0.07183647, -0.4917728, 0.002008504} + {0.0, -0.2, 0.0};
       Source = {
         &ShankSemitendinosus1Node_New
       };
       Target = {
         &Main.HumanModel.BodyModel.Left.Leg.Seg.Shank.Semitendinosus1Node.sRel
       };
     };
     AnyOperationMacro Update = {
        MacroStr = {
         "classoperation Main " + strquote("Update Values")
       };
     };
   };
  };

Kind regards,
Pavel

Hello Pavel,

looks like it worked. Thank you very much.

Kind regards,
Kathrin

Sounds good.

There is also an alternative to add a force constraint, like this:


    AnyForceConSimpleBound LimitOnWallNormalForce = {
      AnyForceBase &Force = .BoxMotion.Reaction;
      Findex = 0;
//      LowerBoundOnOff = On;
//      LowerBound = 0.0;
      UpperBoundOnOff = On;
      UpperBound = 0.0;
    };
    

where the force object will relate to the relevant muscle.

Regards,
Pavel