Expressing general constitutive models in FEniCSx using external operators and algorithmic automatic differentiation
Résumé
Many problems in solid mechanics involve general and non-trivial constitutive models that are difficult to express in variational form. Consequently, it can be challenging to express these problems in automated finite element solvers, such as the FEniCS Project, that use domain-specific languages specifically designed for writing variational forms. In this article, we describe a methodology and software framework for FEniCSx / DOLFINx that enables the expression of constitutive models in nearly any general programming language. We demonstrate our approach on two solid mechanics problems; the first is a simple von Mises elastoplastic model with isotropic hardening implemented with Numba, and the second a more complex Mohr-Coulomb elastoplastic model with apex smoothing implemented with JAX. In the latter case we show that by leveraging JAX's algorithmic automatic differentiation transformations we can avoid error-prone manual differentiation of the terms necessary to resolve the constitutive model. We show extensive numerical results, including Taylor remainder testing, that verify the correctness of our implementation. The software framework and fully documented examples are available as supplementary material under the LGPLv3 or later license.
Origine | Fichiers produits par l'(les) auteur(s) |
---|---|
licence |