prescribedforce

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
shayan moradkhani
Posts: 6
Joined: Mon Apr 24, 2017 4:53 am

prescribedforce

Post by shayan moradkhani » Wed Jul 12, 2017 10:50 am

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

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: prescribedforce

Post by Dimitar Stanev » Wed Jul 12, 2017 11:40 am

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

User avatar
聂 倩文
Posts: 11
Joined: Tue Oct 30, 2018 4:21 am

Re: prescribedforce

Post by 聂 倩文 » Sun May 05, 2019 9:26 pm

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

POST REPLY