Robust implementation of elastoplastic constitutive models using automatic differentiation in PyTorch
This paper explores the use of automatic differentiation (AD) for implementing complex elastoplastic constitutive models in finite element analysis. Traditional approaches require manually deriving and coding the derivatives of residual functions governing implicit stress return mapping, a process that becomes cumbersome for advanced models. We demonstrate how AD can simplify the implementation of consistent material stiffness operators and improve code maintainability by using PyTorch and its autograd functionality. A drained triaxial shear test is used to compare AD with manually coded and finite difference derivatives, highlighting the efficiency of the proposed approach. The example shows that AD simplifies code development and reduces the required source code by over 50 %. These findings support the use of AD as a practical approach for implementing and testing constitutive models, especially in the early development stages.
Authors
- Tomáš Janda (ORCID: https://orcid.org/0000-0002-4158-0078)
- Michal Šejnoha (ORCID: https://orcid.org/0000-0002-0460-1431)
- Alena Zemanová
- Tereza Žalská (ORCID: https://orcid.org/0000-0002-3085-2613)
Institutions
- Czech Technical University in Prague (CZ)
Publication Details
- Journal
- Acta Polytechnica
- Published
- 2026-01-15
- DOI
- https://doi.org/10.14311/ap.2025.65.0640
- Primary Topic
- Elasticity and Material Modeling
- Type
- article
- Field-Weighted Citation Impact
- 0.00