Campbell-Muscle-Lab / MATMyoSim

MyoSim model written in MATLAB
https://campbell-muscle-lab.github.io/MATMyoSim
1 stars 6 forks source link

Twitch demo is not running #13

Open utkugulbulak opened 2 years ago

utkugulbulak commented 2 years ago

I'm trying to run the twitch demo on MATMyoSim, however, Matlab returns the following error: "Unrecognized field name "int_passive_force_mode"." I looked at the function files and the issue starts at return_intracellular_passive_force.m and half_sarcomere.m. It looks like Matlab is not finding the right/required files. Please see the attached picture of the command window

image

kenatcampbellmusclelab commented 2 years ago

@utkugulbulak - this bug is because I added a 'feature'. Specifically, there are now intracellular and extracellular passive forces.

The model file now defines the stress (force per unit) for each component.

The absolute forces are given by: int_passive_force = (1-prop_fibrosis) prop_myofilaments int_passive_stress and ext_passive_force = prop_fibrosis * ext_passive_stress

If required parameters are not defined in the model file, they are now set to appropriate values in the constructor.

This new feature required changes to the passive parameter names, but the new code should handle things correctly if the passive properties are changed to "int_passive_x". I made the change to the demos in the getting_started folder.

Could you have a look at what I did and then see if you feel comfortable working through the other demos, updating the model files so that they are compatible?

If you do that, can you add a new code version number to the model json file (again, as done for the getting started demos). This should help us with future compatibility.