Skip to content

Two ellipsoid muscles#39

Merged
Lukuas31415 merged 14 commits intomainfrom
two-ellipsoid-muscles
Jun 26, 2025
Merged

Two ellipsoid muscles#39
Lukuas31415 merged 14 commits intomainfrom
two-ellipsoid-muscles

Conversation

@Lukuas31415
Copy link
Collaborator

@Lukuas31415 Lukuas31415 commented May 15, 2025

Main changes of this PR

Issues that are addressed by this PR:

Features that have been added:

Additional information

Author's checklist

  • I updated the documentation.
  • I checked that everything compiles and runs as it should.

@carme-hp
Copy link
Collaborator

Hi Lukas, can yo look into this error?

Error: Traceback (most recent call last):
  File "<string>", line 179, in updateNeumannContraction_1
NameError: name 'tendon_end_t' is not defined

@Lukuas31415
Copy link
Collaborator Author

Lukuas31415 commented May 20, 2025

Hi Lukas, can yo look into this error?

Error: Traceback (most recent call last):
  File "<string>", line 179, in updateNeumannContraction_1
NameError: name 'tendon_end_t' is not defined

I haven't gotten this error so far. But I still added the variable in the beginning of the file, so this shouldn't be an issue now.

@Lukuas31415
Copy link
Collaborator Author

@carme-hp, I have a question: What do you think about the following plot of the lengths of the ellipsoid muscles with the spring-tendon simulation (only muscle 2 is being activated)? Until 70ms it looks great, but after that the second muscle is contracting again, but it's not being activated again, and the first activation has gone through the entire muscle already.

Screenshot from 2025-05-20 22-48-02

And this is the plot for the direct connection of the muscles. It seems to be extremely unstable (in paraview it looks a bit wonky as well). This simulation has to be fixed before merging.

Screenshot from 2025-05-20 22-53-53

@carme-hp
Copy link
Collaborator

How does the direct connection look like in paraview? I think it could lead to the muscles overlapping.
That the direct comection is unstable is expected.
The first plot looks good! Could be that because the muscle is a hyperelastic material it contracts again due to spring behaviour, but i'm not sure about it.

@Lukuas31415
Copy link
Collaborator Author

The muscles of the direct connection are not overlapping, but that could easily happen with slightly different parameters. This is a screenshot from this simulation in paraview. It does not capture the wonkyness well, because it's also the process that's weird. It is very jittery and doesn't behave as expected at all.

Screenshot from 2025-05-21 13-05-13

Another weird thing is the beginning of the simulation. The first 40ms seem to work fine, but at 20ms, the first muscle is contracting again, even though the second muscle is still contracting. Can that also be explained, or is the simulation not working at all times?

@Lukuas31415 Lukuas31415 marked this pull request as ready for review June 17, 2025 12:58

elasticity_neumann_bc_1 = [{"element": (variables.el_z-1)*variables.el_x*variables.el_y + i*variables.el_y + j, "constantVector": traction_vector, "face": "2+", "isInReferenceConfiguration": True} for i in range(variables.el_x) for j in range(variables.el_y)]
elasticity_neumann_bc_2 = [{"element": j*variables.el_x + i, "constantVector": traction_vector, "face": "2-", "isInReferenceConfiguration": True} for i in range(variables.el_x) for j in range(variables.el_y)]
elasticity_neumann_bc_2 = [{"element": j*variables.el_x + i, "constantVector": traction_vector, "face": "2+", "isInReferenceConfiguration": True} for i in range(variables.el_x) for j in range(variables.el_y)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about 2+? I'd expect that the muscle in the left uses 2- and the one in the right uses 2+.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought so too, but after looking at the result in Paraview, I was sure this had to be 2+ in both cases, because this is the only case where the connection looks reasonable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, then we keep it like this but lets open an issue about this

Copy link
Collaborator

@carme-hp carme-hp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge!

@Lukuas31415 Lukuas31415 merged commit e210221 into main Jun 26, 2025
@Lukuas31415 Lukuas31415 deleted the two-ellipsoid-muscles branch June 26, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants