Page 1 of 1

creating a new muscle

Posted: Mon Mar 08, 2021 3:59 am
by eglij
Hello,

I'm trying to create an additional TFL muscle to my gait model. Although I know how to transfer the actual one, I might not be able to add a new muscle to the model.
Could someone tell me where I can find the necessary tools in OpenSim to do so?

Thanks!

Re: creating a new muscle

Posted: Mon Mar 08, 2021 10:08 am
by tkuchida
A starting point is the example in the README.md file, which you can see by visiting the GitHub page (https://github.com/opensim-org/opensim-core) and scrolling down to the "Simple example" section. The code is provided in C++ as well as Python and Matlab (expand the sections below the reporter output table).

Re: creating a new muscle

Posted: Mon Mar 08, 2021 11:25 am
by aymanh
Hello,

If you're not comfortable with programming in the environments suggested by Thomas, you may do the editing in the model's xml file (keep backup, this will be model file format dependent) or in the scripting shell of the application. If you give us more details/context we can help you further.

Best regards,
-Ayman

Re: creating a new muscle

Posted: Tue Mar 09, 2021 2:02 am
by eglij
Hi,

Thanks for the help!
May you explain me furthermore how I know the new values in the .xml file for tendon-slack-length and optimal-fiber-length as well as pennetration-angle-at-optimal? Because my aim is to add a new TFL that is shortened and transfered to the femur head as insertion point. Or how can I estimate if not calculate the new plug in values?

Again, thanks in advance!