How to stop a driver at a certain point?


I’m currently working with the pedal example in the repository and I’m preparing an parameter study. One parameter that I would like to study is how the pedals initial angle affects the muscle activity. The pedal is hinged at one end and driven by a AnyKinEqSimpleDriver. The data that I’m using says that the pedal should have a horizontal movement of 37mm at the foot-pedal contact node. The problem is that I can’t “stop” the driver when the pedal has moved 37mm. At first I made the simulation time, tend dependent of the pedals movement but this did not work when I tried to run a parameter study.

Does anyone out there have any tips on how to make the pedal stop after it has move a certain distance and make it compatible with the parameter study?

Best regards

Erik Ejdepalm,
KTH Royal Institute Of Technology

Hi Erik,

You can make complex motions (including stop the motion at any point) if you use an interpolation driver AnyKinEqInterpolDriver. But i think this is not needed in you case as the motion is simple. You just need to adjust the velocity of the simple driver according to tEnd so the pedal ends at the desired spot at the end of the simulation.
This will give you no problems with the parameter study.

Best regards, Sylvain.