Page 1 of 1

prescribedforce

Posted: Wed Jul 12, 2017 10:50 am
by shayanlut
hi,
i am trying to create an externally applied force as: for 0-0.3 time of simulation the force is constant, from 0.3-1 the force follows a sine function and from 1-2 the force is a linear function.
i wonder how can i use prescribed force to combine these three different force functions?
or do i have to create a .xml file for the time and forces and then reading them? (if this is the way, please explain how)
the location of the applied force remains constant.
regards
Shayan

Re: prescribedforce

Posted: Wed Jul 12, 2017 11:40 am
by mitkof6
Hi,

PrescribedForce accepts a function object. You can choose from (see inheritance diagram):

https://simtk.org/api_docs/opensim/api_ ... ction.html

I would go with SimmSpline by providing the corresponding values for t, y:

https://simtk.org/api_docs/opensim/api_ ... pline.html

Best

Re: prescribedforce

Posted: Sun May 05, 2019 9:26 pm
by wopt
Hi, shayan moradkhani
I have a similar problem to yours. Have you solved your problem? Do you want to share your solution with me?

Thanks!
Qianwen Nie