In this work, we develop a framework for solving inverse deformation problems using the FEniCS Project finite-element software. We validate our approach with experimental imaging data acquired from a soft silicone beam under gravity. In contrast with inverse iterative algorithms that require multiple solutions of a standard elasticity problem, the proposed method can compute the undeformed configuration by solving only one modified elasticity problem. This modified problem has a complexity comparable to the standard one. The framework is implemented within an open-source pipeline enabling the direct and inverse deformation simulation directly from imaging data. We use the high-level unified form language (UFL) of the FEniCS Project to express the finite-element model in variational form and to automatically derive the consistent Jacobian. Consequently, the design of the pipeline is flexible: for example, it allows the modification of the constitutive models by changing a single line of code. We include a complete working example showing the inverse deformation of a beam deformed by gravity as supplementary material.
To download FEniCS: https://fenicsproject.org/download/ and know more about it: https://fenicsproject.org/ We also used SOFA for comparing our FEniCS simulations. To download SOFA: https://www.sofa-framework.org/download/ and know more about it: https://www.sofa-framework.org/.We used the Multiplicative Jacobian Energy Decomposition (MJED) formulation, which is available in a specific SOFA plugin: https://github.com/sofa-framework/SofaMJEDFEM
We used a custom code FEgen to generate tetrahedral volume meshes readbale by FEniCS (.xml) from surface meshes (.obj). This tool can also read medical images NIFTI (.nii, .nii.gz) or INR (.inr, .inr.gz) and output VTK meshes (.vtu).https://bitbucket.org/unilucompmech/fegen
The directory contains the different examples used in the paper. They have been implemented using the FEniCS Project software:- Beam: hyperelastic cantilever beam deformed under gravity.
- Cube_compression: test case
- Cube_generalized_shear: appendix of the paper
- Cube_simple_shear: appendix of the paper
- meshes: containing a low resolution mesh of the beam used in the Beam repository. It also includes a python script for converting a .msh to .xdmf.
- Sagging_block: in section numerical results of the paper
To simply run the codes:
python3 file_name.py
FEniCS also offers parallel computation:
mpirun -n N python3 file_name.py
where N is the number of core you want to use.
https://link.springer.com/article/10.1007/s00366-021-01597-z
- Arnaud Mazier: Department of Computational Science, Université du Luxembourg, Esch-sur-Alzette, Luxembourg
- Alexandre Bilger: Department of Computational Science, Université du Luxembourg, Esch-sur-Alzette, Luxembourg
- Antonio E. Forte: Harvard University,29 Oxford St,Cambridge MA 02138,USA
- Igor Peterlik: Institute of Computer Science, Masaryk University
- Jack S. Hale: Department of Computational Science, Université du Luxembourg, Esch-sur-Alzette, Luxembourg
- Stéphane P.A. Bordas: Department of Computational Science, Université du Luxembourg, Esch-sur-Alzette, Luxembourg
[email protected] or use the Discussion feature from Github