Constitutive hyperelastic material formulations for FElupe
Project description
Constitutive hyperelastic material formulations for FElupe.
This package provides the essential building blocks for constitutive hyperelastic material formulations. This includes material behaviour-independent spaces and frameworks as well as material behaviour-dependent model formulations.
Spaces are full or partial deformations on which a given material formulation should be projected to, e.g. to the distortional (part of the deformation) space. Generalized Total-Lagrange Frameworks for isotropic hyperelastic material formulations based on the invariants of the right Cauchy-Green deformation tensor and the principal stretches enable a clean coding of isotropic material formulations.
The math-module provides helpers in reduced vector (Voigt) storage for symmetric three-dimensional second-order tensors along with a matrix storage for (at least minor) symmetric three-dimensional fourth-order tensors. Shear terms are not doubled for strain-like tensors, instead all math operations take care of the reduced vector storage.
$$ \boldsymbol{C} = \begin{bmatrix} C_{11} & C_{22} & C_{33} & C_{12} & C_{23} & C_{13} \end{bmatrix}^T $$
Installation
Install Python, fire up 🔥 a terminal and run 🏃
pip install hyperelastic
Usage
Material model formulations have to be created as classes with methods for the evaluation of the gradient
(stress) and the hessian
of the strain energy function (elasticity). It depends on the framework which derivatives have to be defined, e.g. the derivatives w.r.t. the invariants of the right Cauchy-Green deformation tensor or w.r.t. the principal stretches. An instance of a Framework has to be finalized by the application on a Space.
ⓘ Note Define your own material model formulation with manual, automatic or symbolic differentiation with the help of your favourite package, e.g. PyTorch, JAX, Tensorflow, TensorTRAX, SymPy, etc.
First, let's import hyperelastic (and its math module).
import hyperelastic as hel
import hyperelastic.math as hm
Invariant-based material formulations
A minimal template for an invariant-based material formulation applied on the distortional space:
class MyModel1:
def gradient(self, I1, I2, statevars):
"""The gradient as the partial derivative of the strain energy function w.r.t.
the invariants of the right Cauchy-Green deformation tensor."""
return dWdI1, dWdI2, statevars
def hessian(self, I1, I2, statevars_old):
"""The hessian as the second partial derivatives of the strain energy function
w.r.t. the invariants of the right Cauchy-Green deformation tensor."""
return d2WdI1I1, d2WdI2I2, d2WdI1I2
model1 = MyModel1()
umat1 = hel.spaces.DistortionalSpace(hel.frameworks.InvariantsFramework(model1))
Available isotropic hyperelastic invariant-based material formulations
The typical polynomial-based material formulations (Neo-Hooke, Mooney-Rivlin, Yeoh are all available as submodels of the third order deformation material formulation.
Principal stretch-based material formulations
A minimal template for a principal stretch-based material formulation applied on the distortional space:
class MyModel2:
def gradient(self, λ, statevars):
"""The gradient as the partial derivative of the strain energy function w.r.t.
the principal stretches."""
return [dWdλ1, dWdλ2, dWdλ3], statevars
def hessian(self, λ, statevars_old):
"""The hessian as the second partial derivatives of the strain energy function
w.r.t. the principal stretches."""
return d2Wdλ1dλ1, d2Wdλ2dλ2, d2Wdλ3dλ3, d2Wdλ1dλ2, d2Wdλ2dλ3, d2Wdλ1dλ3
model2 = MyModel2()
umat2 = hel.spaces.DistortionalSpace(hel.frameworks.StretchesFramework(model2))
Available isotropic hyperelastic stretch-based material formulations
License
Hyperelastic - Constitutive hyperelastic material formulations for FElupe (C) 2023 Andreas Dutzler, Graz (Austria).
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hyperelastic-0.0.1.tar.gz
.
File metadata
- Download URL: hyperelastic-0.0.1.tar.gz
- Upload date:
- Size: 52.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36a3081024f7895f6ff473dc181524e3c6013cf4bf7eb88bfe85a1a4974e4c70 |
|
MD5 | 4587ac3dc6a26f14a1b13423e2c94d5f |
|
BLAKE2b-256 | 56e4082d4fb42d7a542a2370c833fcbfc2b9aa0e087728b04f1bf1b14afd5d6e |
File details
Details for the file hyperelastic-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: hyperelastic-0.0.1-py3-none-any.whl
- Upload date:
- Size: 42.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb61c418eaf62231d8b4f89eb023660720fde4f19fc34fbc6ec3c1301611b5b9 |
|
MD5 | 7e225d41aaaf3b1b670af0abc7195a02 |
|
BLAKE2b-256 | fa6652ec0a05f60f2a9795ddf38815ffe26bc2287ce0611ac15d8a36b661f955 |