Code Monkey home page Code Monkey logo

fenics-inversefem's Introduction

fenics-inverseFEM

FEniCS code for inverse FEM hyper-elasticity

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.

FEniCS

To download FEniCS: https://fenicsproject.org/download/ and know more about it: https://fenicsproject.org/

SOFA

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

Strcture of the repository

Submodule: FEgen

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

example

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

sofa_scenes

The directory contains the sofa scenes used in the paper. You first need to compile SOFA with the MJED plugin: * inData: contains different mesh refinement of the beam * outData: results of each simulations * scenes: the .py file used for creating and running the simulation

Running the code

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.

Full paper

https://link.springer.com/article/10.1007/s00366-021-01597-z

Information

Authors

  • 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

Contact

[email protected] or use the Discussion feature from Github

fenics-inversefem's People

Contributors

ziemnono avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.