Skip to content

[FEM] Implement getPotentialEnergy for Linear & Corotational FEMForceField - #6228

Merged
alxbilger merged 4 commits into
sofa-framework:masterfrom
th-skam:potentialEnergy
Sep 4, 2026
Merged

[FEM] Implement getPotentialEnergy for Linear & Corotational FEMForceField#6228
alxbilger merged 4 commits into
sofa-framework:masterfrom
th-skam:potentialEnergy

Conversation

@th-skam

@th-skam th-skam commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Implements getPotentialEnergy() for CorotationalFEMForceField and LinearSmallStrainFEMForceField components. Both now compute elastic strain energy using the form:

$$E = \sum_e \frac{1}{2}\mathbf{u_e}^T\mathbf{K_e}\mathbf{u_e}$$
  • $\mathbf{u_e}$: element displacement of DOFs
  • $\mathbf{K_e}$: element stiffness matrix

The corotational form uses the local displacements and so gives the energy due to local deformations.

[with-all-tests]

@th-skam th-skam added pr: status to review To notify reviewers to review this pull-request pr: new feature Implement a new feature labels Aug 19, 2026

@alxbilger alxbilger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job!

@alxbilger

Copy link
Copy Markdown
Contributor

The potential energy for linear elasticity with linear tets has been tested successfully in #6289.

@alxbilger alxbilger added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Sep 3, 2026
@alxbilger
alxbilger merged commit 69ff5cf into sofa-framework:master Sep 4, 2026
8 of 13 checks passed
@th-skam
th-skam deleted the potentialEnergy branch September 4, 2026 12:29
damienmarchal pushed a commit to CRIStAL-PADR/sofa that referenced this pull request Sep 9, 2026
…Field (sofa-framework#6228)

* Add potential energy computation for the LinearSmallStrainFEMForceField

* Add potential energy for the CorotationalFEMForceField

* Use auto

* Factor out displacement compute helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new feature Implement a new feature pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants