Constitutive equations describe how the internal state variables of a material evolve with changing external conditions or due to gradients of thermodynamic variables. Those state variables can describe many microstructural aspects of the material (grain size, dislocation density, hardening state, etc) or be phenomenological in nature (equivalent plastic strain). The knowledge of those internal state variables allows the computation of local thermodynamic forces which affect the material equilibrium at the structural scale.
MFront is an open-source code generator for complex constitutive laws which aims at ease of use, numerical efficiency and portability (see ). MFront has been developed under very stringent quality requirements in the context of nuclear fuel element simulation under the PLEIADES platform (see ), which is co-developed by CEA, EDF and Framatome. MFront provides several domain specific languages (DSL) built on top of the C++ language and associated with specific integration schemes that allows to readily implement the constitutive equations in source code close to their mathematical expressions. Numerical details are hidden by default allowing the user to focus on the physics. The underlying mathematical library, called TFEL/Math, provides optimised tensor objects and makes heavily use of template metaprogramming to generate optimised code.
Those DSLs are translated into C++ sources adapted to the targeted solver. Interfaces are provided for Cast3M, Code Aster, Europlexus, Cyrano, Abaqus/Implicit, Abaqus/Explicit, Ansys, CalculiX, AMITEX FFTP, etc. A so-called generic interface has recently been introduced and is meant to be used through the MFrontGenericInterfaceSupport project (MGIS) (See ).
The mgis.fenics python module aims at leveraging the power of the FEniCS platform, used for the discretization of the balance equations, the assembly of residuals and stiffness matrices and the parallel distribution of the resolution, combined with MFront, used for the local integration of the constitutive equations, to build complex mechanical simulations. Several examples, illustrating the use of the new module, will be presented (see ), including: