matADi - A python package for material definition with automatic differentiation
Hi,
I'd like to introduce to you my open-source software package matADi (Material Definition with Automatic Differentiation) written in Python. It can be used to define custom or import pre-defined hyperelastic strain energy density functions. Both functions for the numeric evaluation of the gradient (as the first Piola-Kirchoff stress tensor) and the hessian (as the according elasticity tensor) are provided by automatic differentiation using casadi. This material definition may be used as a user material (UMAT) in Python-based FEA software packages like FElupe or scikit-fem. matADi also provides a numerical lab where the force-stretch material behavior of the common homogenous loadcases uniaxal, biaxial and planar shear may be visualized. It is published on PyPI, the python package index and may be installed via command line:
pip install matadi
Here is a little code snippet which shows the usage of matADI with an Ogden material:
from matadi import MaterialHyperelastic, Lab, models # load a model, set material parameters and optionally add a bulk modulus ogden = MaterialHyperelastic(models.ogden, mu=(1,), alpha=(1.6,), bulk=5000) # init `n` random deformation gradients import numpy as np n = 500 np.random.seed(51251) F = np.eye(3).reshape(3, 3, 1) + (np.random.rand(3, 3, n) - 0.5) / 10 # evaluate first Piola-Kirchhoff stress and associated elasticity tensor P = ogden.gradient([F]) A = ogden.hessian([F]) # plot force-stretch curves of homogenous loadcases # with fixed principal directions lab = Lab(ogden) data = lab.run(ux=True, bx=True, ps=True) fig, ax = lab.plot(data)
Available isotropic hyperelastic material models:
- Linear Elastic (code)
- Saint Venant Kirchhoff (code)
- Neo-Hooke (code)
- Mooney-Rivlin (code)
- Yeoh (code)
- Third-Order-Deformation (James-Green-Simpson)Â (code)
- Ogden (code)
- Arruda-Boyce (code)
- Extended-Tube (code)
- Van-der-Waals (Kilian)Â (code)
Â
For more information please have a look at the README. Feel free to try it out!
All the best,
Andreas
- Hello...does anybody know how to find residual force (i.e., error) in Abaqus static nonlinear solver?1 year ago
- UMAT with steady state transport step in Abaqus4 years ago
- Abaqus exits with error when executed by Matlab script6 years ago
- Problems about UMAT and associated subroutines8 years ago
- Python script to extract fieldOutput for 2 specific nodes8 years ago
- 21 Forums
- 3,866 Topics
- 13.2 K Posts
- 12 Online
- 29.3 K Members