Open moorepants opened 10 months ago
I just noticed that the state variables in the muscles are not functions of time, they seem to be simple symbols. We rely heavily on differentiating constants from time varying variables in mechanics by using Function('f')(me.dynamicsymbols._t)
for all time varying variables.
I suggest that we get all the stuff into non-public _biomechanics
as you have designed, then we use the example in #25525 and some simpler examples that we can add to a "muscle explanation" page based on various particle style models like https://github.com/brocksam/sympy-biomechanics/pull/19 which can show the basic setup and behavior of the muscle actuators. We can then review the code in _biomechanics
as we build out and improve those examples. Finally, we make _biomechanics public along with the tutorial pages.
@brocksam I've completed my parts of the two tutorial pages (I think). Once you add the remaining two parts it should be ready to merge.
I can open a PR for making _biomechanics public, but were all the docstrings and unit tests completed? I wasn't sure the status.
@brocksam I've completed my parts of the two tutorial pages (I think). Once you add the remaining two parts it should be ready to merge.
I can open a PR for making _biomechanics public, but where all the docstrings and unit tests completed? I wasn't sure the status.
I'll add my remaining two parts to the tutorial pages tomorrow to complete that PR. You're correct that we still need some docstrings and tests. I'll hopefully get the vital ones done tomorrow too and then I'll open the PR to make the module public. I'll also open issue for the remaining "nice to haves".
I've opened https://github.com/sympy/sympy/pull/25744 which will encapsulate the majority of the outstanding things in this list. Following the merging of https://github.com/sympy/sympy/pull/25744, we can open a PR to make the biomechanics module public. Then following that we will be able to fix the Sphinx errors related to the "missing" biomechanics module in https://github.com/sympy/sympy/pull/25525. That should then complete the biomechanics portion of our CZI work.
Ok, sounds good. Let me know when you are ready for review or if you need help on it.
General
Merge in remaining functionality
cos(alpha_opt)
in rigid tendon musculotendon dynamicsFiberForceVelocityInverseDeGroote2016
in fiber state elastic tendon musculotendon dynamics.mechanics._geometry
->mechanics.geometry
(publicizing: #25510)mechanics._pathway
->mechanics.pathway
(publicizing: https://github.com/sympy/sympy/pull/25511)mechanics._actuator
->mechanics.actuator
https://github.com/sympy/sympy/pull/25518mechanics.actuator
/mechanics.tests.test_actuator
mechanics.pathway
/mechanics.tests.test_pathway
mechanics.wrapping_geometry
/mechanics.tests.test_wrapping_geometry
biomechanics.curves
/biomechanics.tests.test_curves
physics.biomechanics
. Created a new module that acts to extend physics.mechanics with biomechanical modelling functionality.physics.biomechanics
. Implemented musculotendon characteristic curves for tendon and muscle fiber force-length and force-velocity relationships based on De Groote et al., 2016.Other
To-do requests
These should all be opened as issues if they don't get completely by 31/08/2023.
__str__
to biomechanical modeling components.PathwayBase
classes.subs
kwargs onto_loads
methods.rhs
method onMusculotendonDeGroote2016
to return simplified RHS equations.MusculotendonBase
class betweenForceActuator
andMusculotendonDeGroote2016
as most musculotendon implementation will be generic to any musculotendon.MusculotendonDeGroote2016
for linking to the...DeGroote2016
musculotendon curves, e.g.MusculotendonDeGroote2016.curves.tendon_force_length = TendonForceLengthDeGroote2016
withMusculotendonDeGroote2016.tendon_force_length
pointing to the musculotendon dynamics-specific instance.Unit test coverage
Docstrings
Create examples in documentation