About¶
hyper-surrogate is a Python library for building data-driven surrogates of hyperelastic constitutive models used in finite element analysis.
Motivation¶
Hyperelastic material models (Neo-Hookean, Mooney-Rivlin, etc.) define stress-strain relationships through strain energy functions. Evaluating these symbolically at every integration point is expensive. This library provides:
- Symbolic mechanics -- SymPy-based strain energy differentiation to derive PK2 stress and material stiffness tensors automatically.
- ML surrogates -- Train neural networks (MLP, Input-Convex Neural Networks) to approximate the constitutive response, orders of magnitude faster than symbolic evaluation.
- Fortran export -- Transpile trained models into standalone Fortran 90 subroutines (UMAT-compatible) with baked-in weights, ready for commercial FE solvers (Abaqus, LS-DYNA, etc.).
Architecture¶
The library is organized into layered subpackages:
mechanics-- Symbolic tensor algebra, kinematics, and material model definitionsdata-- Deformation gradient generation and dataset creation for trainingmodels-- Neural network architectures (MLP, ICNN) with export supporttraining-- Loss functions (stress, energy-stress) and training loopexport-- Weight extraction, Fortran code generation, and analytical UMAT generationreporting-- Visualization and statistics for deformation data
License¶
See the LICENSE file.