Elasticipy Documentation
Purpose of this package
This Python’s package is dedicated to work on mechanical elasticity-related tensors; namely: stress, strain and stiffness/compliance tensors.
It provides a couple of ways to perform basic operations on these tensors in a user-friendly way. In addition, it handles arrays of tensors, allowing to perform thousands of data at once (see an example here).
It also comes with plotting features (e.g. spatial dependence of Young modulus) and tensor analysis tools (algebra, invariants, symmetries…).
Fundamentals of continuum mechanics
Linear elasticity
In continuum mechanics, the stress is described by the second-order Cauchy’s stress tensor \(\boldsymbol{\sigma}\) whereas the strain tensor \(\boldsymbol{\varepsilon}\), under the small strain assumption is defined as:
where \(\boldsymbol{\nabla}\boldsymbol{u}\) denotes the displacement gradient.
In linear elasticity, the stress-strain relationship is governed by the generalized Hooke’s law:
where \(\boldsymbol{C}\) is the fourth-order stiffness tensor, which depends on the material’s properties. Due to symmetries in stress, strain, and material response, \(\boldsymbol{C}\) exhibits various symmetries, reducing the number of independent constants: from 2 (for isotropic materials), to 21 (for triclinic materials).
In isotropic materials, the elasticity tensor can be expressed in terms of two constants: the Lamé parameters \(\lambda\) \(\mu\) (the shear modulus):
For anisotropic materials, the structure of \(\boldsymbol{C}\) depends on the material’s symmetry (e.g., transverse- isotropic, cubic, hexagonal,…). Elasticipy automates the computation of effective properties, symmetry-adapted reductions, and analysis for these complex cases.
Voigt Notation
To simplify the representation of the fourth-order elasticity tensor \(\boldsymbol{C}\), Voigt notation is commonly used. This notation reduces \(\boldsymbol{C}\) to a symmetric \(6\times 6\) matrix \(C_{\alpha\beta}\), leveraging the symmetries of the stress and strain tensors. The mapping of indices follows the convention:
This transformation allows the stress-strain relationship to be expressed in a more compact form:
The symmetric \(6\times 6\) stiffness matrix \(C_{\alpha\beta}\) is much easier to work with compared to the full \(3\times 3\times 3\times 3\) tensor, while retaining all the essential information about a material’s elastic properties. Elasticipy fully supports operations in Voigt notation, making it a practical tool for exploring elastic properties in isotropic and anisotropic materials.
Features of this package
Features of Elasticipy include:
Computation of elasticity tensors,
Analysis of elastic anisotropy and wave propagation,
Multidimensional arrays of strain and stress tensors,
Rotation of tensors,
Integration with crystal symmetry groups,
Visualization and tutorials for ease of use,
A graphical user interface to plot the spatial dependence of engineering constants,
Compatibility with the Materials Project, pymatgen and orix.
Elasticipy streamlines the exploration of linear elasticity, making it accessible for applications in materials science, geophysics, and mechanical engineering.
Installation
To install this package, simply run:
pip install Elasticipy
On Anaconda, you can use:
conda install conda-forge::elasticipy
Cite this work
If you use Elasticipy, please cite , or use the following BibTeX entry:
@article{Elasticipy,
doi = {10.21105/joss.07940},
url = {https://doi.org/10.21105/joss.07940},
year = {2025},
publisher = {The Open Journal},
volume = {10},
number = {115},
pages = {7940},
author = {Depriester, Dorian and Kubler, Régis},
title = {Elasticipy: A Python package for linear elasticity and tensor analysis},
journal = {Journal of Open Source Software}
}
Table of Contents