Scaling muscle properties

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Raphaël Gaiffe
Posts: 3
Joined: Wed Nov 02, 2022 8:34 am

Scaling muscle properties

Post by Raphaël Gaiffe » Wed Nov 02, 2022 8:55 am

Hello,

In the OpenSim documentation in "How Scaling Works" https://simtk-confluence.stanford.edu:8 ... ling+Works, it is mentioned that "...muscle's new optimal fiber length and tendon slack length are computed during the scaling process. A scale factor is computed as the ratio of the length before scaling to the length after scaling and the result is used to scale the component's length-dependent properties." I haven't been able to find how the new length of the muscle is calculated in https://github.com/opensim-org/opensim-core, and thus I don't know how the scaling factor for optimal fiber length and tendon slack length are calculated. Do you know where I can find the code or equation that calculated the new muscle length ?

Best Regards,

Tags:

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Scaling muscle properties

Post by Ayman Habib » Wed Nov 02, 2022 10:31 am

Hello,

Here's a link to the code snippet you're looking for:
https://github.com/opensim-org/opensim- ... e.cpp#L181

Please let us know if that answers your questions.

Best regards,
-Ayman

User avatar
Raphaël Gaiffe
Posts: 3
Joined: Wed Nov 02, 2022 8:34 am

Re: Scaling muscle properties

Post by Raphaël Gaiffe » Thu Nov 03, 2022 1:43 am

That answers my question, thank you !
However, now I would like to know how upd_GeometryPath() works (mostly where it is) and how the path.getLength(s) and path.getPreScaleLength(s) calculate the muscle length ?

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Scaling muscle properties

Post by Thomas Uchida » Thu Nov 03, 2022 10:10 am

now I would like to know how upd_GeometryPath() works
upd_GeometryPath() returns a writable reference to the GeometryPath.
how the path.getLength(s) and path.getPreScaleLength(s) calculate the muscle length ?
The length of the GeometryPath (the total path of the muscle-tendon unit) is stored before the model is scaled. After scaling, extendPostScale() is called to adjust the optimal fiber length and tendon slack length properties. If scaling the model increased the length of the GeometryPath by x%, then the optimal fiber length and tendon slack length are also increased by x%. This is just one strategy; you can also update these properties yourself after the model is scaled.

User avatar
Raphaël Gaiffe
Posts: 3
Joined: Wed Nov 02, 2022 8:34 am

Re: Scaling muscle properties

Post by Raphaël Gaiffe » Mon Nov 21, 2022 8:09 am

Thank you for your answer, where can I find the code of the functions getLength(s) and getPreScaleLength(s) ?

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Scaling muscle properties

Post by Thomas Uchida » Mon Nov 21, 2022 3:43 pm

where can I find the code of the functions getLength(s) and getPreScaleLength(s)?
You can search the code on GitHub (https://github.com/opensim-org/opensim-core) to find the implementations. Please note that the muscle length is obtained from the underlying GeometryPath.

POST REPLY