[QUESTION] Understanding warp.fem.deformation_gradient behaviour in deformed configurations
@gdaviet is already working on this.
Since Mar 18, 2025.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 624
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 5
Description
Hi,
I'm implementing corotational FEM structural dynamics using warp.fem, and I'd like to clarify how fem.deformation_gradient works in the context of a deformed configuration.
My base geometry is a 3D grid, and at each simulation step, I create a deformed geometry using:
deformed_geo = u_field.make_deformed_geometry() # u_field is the displacement field (vec3d)
deformed_domain = fem.Cells(deformed_geo)
Since u_field.dof_values stores relative displacements from the base configuration, I call make_deformed_geometry using the default relative=True parameter.
I then compute per-element rotation matrices using fem.interpolate:
# in each step:
fem.interpolate(
element_rotation_matrix_integrand,
domain=deformed_domain,
quadrature=fem.RegularQuadrature(deformed_domain, 0),
values={'Re': Re} # output array of wp.mat33 with one slot per element
)
Inside element_rotation_matrix_integrand, I call:
F = fem.deformation_gradient(domain, s)
I expected F to represent the deformation gradient relative to the reference configuration, but in my case, F is always a diagonal matrix with the diagonal entries corresponding to element dimensions.
I want to make sure that I correctly compute the deformation gradient relative to the base configuration while working with deformed geometries in warp.fem.
Would you be able to clarify how this should be handled? Am I using deformation_gradient wrong? Thanks in advance!
Regards,
Chris
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.