![]() Mazier, Arnaud ![]() Scientific Conference (2022, August) The Simulation Open Framework Architecture (SOFA) is a software environment for building simulations with a particular focus on real-time medical applications, e.g. surgery. Its scope is far broader than ... [more ▼] The Simulation Open Framework Architecture (SOFA) is a software environment for building simulations with a particular focus on real-time medical applications, e.g. surgery. Its scope is far broader than the FEniCS Project, encompassing e.g. rigid body dynamics, interfacing with haptic devices, contact and visualisation. Naturally, it also includes some finite element models of soft tissue mechanics, but these capabilities are currently ‘pre-baked’ and limited to a few simple constitutive models. The goal of this work is to incorporate state-of-the-art code generation tools from the FEniCS Project into SOFA in order to hugely increase SOFA’s capabilities in terms of soft tissue mechanics. To this end we have developed a new SOFA plugin named SOniCS. For adding a new material model in SOniCS, the user describes its strain energy density function using UFL (Unified Form Language) syntax. Then, using FFCx (FEniCSx Form Compiler) we generate the C code associated with the kernels corresponding to the automatically differentiated cell-local residual and stiffness forms. Finally, we assemble these kernels in SOFA into global tensors and solve the resulting non-linear systems of equations. The result is that it is now possible to straightforwardly implement complex material models such as the Holzapfel-Ogden anisotropic model into SOFA, and to use them alongside SOFA’s existing strong feature set in medical simulation. [less ▲] Detailed reference viewed: 157 (11 UL)![]() Mazier, Arnaud ![]() E-print/Working paper (2022) This new approach allows the user to experiment with model choices easily and quickly without requiring in-depth expertise, as constitutive models can be modified by one line of code only. This ease in ... [more ▼] This new approach allows the user to experiment with model choices easily and quickly without requiring in-depth expertise, as constitutive models can be modified by one line of code only. This ease in building new models makes SOniCS ideal to develop surrogate, reduced order mod- els and to train machine learning algorithms for uncertainty quantification or to enable patient-specific simulations. SOniCS is thus not only a tool that facilitates the development of surgical training simulations but also, and perhaps more importantly, paves the way to increase the intuition of users or otherwise non-intuitive behaviors of (bio)mechanical systems. The plugin uses new developments of the FEniCSx project enabling au- tomatic generation with FFCx of finite element tensors such as the local residual vector and Jacobian matrix. We validate our approach with nu- merical simulations such as manufactured solutions, cantilever beams, and benchmarks provided by FEBio. We reach machine precision accuracy and demonstrate the use of the plugin for a real-time haptic simulation involv- ing a surgical tool controlled by the user in contact with a hyperelastic liver. We include complete examples showing the use of our plugin for sim- ulations involving Saint Venant-Kirchhoff, Neo-Hookean, Mooney-Rivlin, and Holzapfel Ogden anisotropic models as supplementary material. [less ▲] Detailed reference viewed: 30 (1 UL) |
||