Access force at the specific motion angle during the parameter study

Hi,
I am studying the parameter study on the cervical spine. I tried to output the joint force at the specific motion angle, for example 1 degree. However, the value outputed by the AnyDesMeasure was the force at the end time. I found someone use the function argmin to realize the index of the minimum value in the previous thread. But I not only want to find the minimum, the force at specific angle (1°,2°,3°,4°…) could be outputed.

 
 AnyBodyStudy Study = {
AnyOutputFun Force = {
      Val = .Model.HumanModel.Trunk.JointsCervicalSpine.C5C4Jnt.Constraints.Reaction.Fout[0];
    };
AnyOutputFun Angle = {
      Val = .Model.HumanModel.Trunk.JointsCervicalSpine.C5C4Jnt.Pos[0];
    };
  }; 
AnyParamStudy ParamStudy = {
AnyDesMeasure C5C4JntForce = {
      Val = ???..Study.Force();// the force at the specific C5C4Jnt angle
    };
};

Thank you in advance.

Hi,

  1. I would assume that you’ve seen our tutorial chapter for parameter studies:
    https://anyscript.org/tutorials/Parameter_studies_and_optimization/lesson1.html

  2. Based on your code, it can be utilized like this:

 AnyBodyStudy Study = {
  AnyOutputFun Force = {
    Val = .Model.HumanModel.Trunk.JointsCervicalSpine.C5C4Jnt.Constraints.Reaction.Fout[0];
  };
  AnyOutputFun Angle = {
    Val = .Model.HumanModel.Trunk.JointsCervicalSpine.C5C4Jnt.Pos[0];
  };
}; 
AnyParamStudy ParamStudy = 
{
  AnyDesMeasure C5C4JntForce = 
  {
    Val = [b]min[/b](..Study.Force());
  };

};
But you need to define your own AnyDesVar objects inside your AnyParamStudy class instance.

  1. But if you want to have the full history of the force at a specific parameter for your parameter studies,
    it may be better to use external tool to test different parameters and hold all results for all different parameters.
    I would recommend you to use AnyPyTools here:
    https://anybody-research-group.github.io/anypytools-docs/index.html

I hope that this may be helpful to you.

Best regards,
Moonki