Parameter study for conditional contact normal forces


I’m doing parameter study from my previous analysis model.
I know that usual parameter study is possible by defining a AnyOutputFun class in the existing AnyBodyStudy and by creating a new AnyParamStudy class which includes an AnyDesMeasure from the defined AnyOutputFun class.

What I try is to use an estimated force from conditional contact as the value of AnyOutputFun and thus as an AnyDesMeasure for AnyParamStudy.
For example, assuming that I want to see how GRF (at a contact node) is changed when some variables varies, I may use a normal force of GRF (from conditional contact) as the design measure of parameter study;

AnyBodyStudy Study = {
  AnyFolder &Model = .Model;

  AnyOutputFun GRF = 
    Val = Main.Model.ModelEnvironmentConnection.Drivers.ConditionalContact.RightFootSupport.Contac1.Push.NormalForceScalar; 
}; // End of study

AnyParamStudy ParamStudy = {
  Analysis = 
    Settings = 
      Echo = On;
      ModelSceneUpdate = On;
    AnyOperation &Operation = ..Study.InverseDynamics;
  AnyDesVar var1 = {  ...  };
  AnyDesVar var2 = {  ...  };
  AnyDesMeasure GRF = 
      Val = min(..Study.GRF());
  nStep =  ... ;

But I could not make it with this code, showing these error messages;
‘Val’ : Expression evaluation failed at moment ‘OutputVar’ :
NormalForceScalar : argument will not be ready for evaluation until moment ‘RuntimeVar’

Is there any way to use conditional contact force as design measure for a parameter study?

Thanks in advance.

Sincerely yours,

Hi Dong-Pyoung,

can you use


instead? This one has the evalution moment OutputVar, so should cause this error. As far as I can see from the class template, the calculations of these two variables are similar.

Best regards,

Dear Daniel,

NormalForceScalar2 works well!!
Thank you very much.

NormalForceScalar and NormalForceScalar2 seem to have the same value in the class definition. (ContactSurfaceLinPush.any)
But their evaluation types are different when looking at the model tree: NormalForceScalar contains RuntimeVar, and NormalForceScalars does OutputVar as their evaluation.
What is the difference between those classes?

Sincerely yours,

Dear Dong-Pyoung,

you can have a look in the definition of these two variables in the class template, they are easy to find. As far as I have seen, the one you used first is calculated in an AnyDrawVector. It looks as this changes the evaluation moment of this variable. The other one is calculated as AnyVar and thus can be used as another EvaluationMoment that can be used in the AnyOutputFun.

Best regards,

I found the scripts and looked though it.
Thank you for your kind explanation.
It was very helpful.

Have a nice day.

Sincerely yours,