elasticipy 5.0.0__tar.gz → 6.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {elasticipy-5.0.0 → elasticipy-6.0.1}/.github/workflows/Codecov.yml +2 -2
- {elasticipy-5.0.0 → elasticipy-6.0.1}/CITATION.bib +2 -2
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Elasticipy_for_the_Impatient.ipynb +4 -8
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/Elasticipy_vs_pymatgen.py +5 -5
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/Elate_vs_Elasticipy.py +3 -3
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/Example_Stiffness_tensor.py +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/Example_StressStrain_arrays.py +2 -2
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/Example_WaveVelocity.py +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/Multiple_phases.py +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/SelfConsistent.py +2 -2
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/essai_plasticity.py +3 -3
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/example_readwrite.py +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/JOSS/paper.md +5 -3
- {elasticipy-5.0.0/src/elasticipy.egg-info → elasticipy-6.0.1}/PKG-INFO +11 -11
- {elasticipy-5.0.0 → elasticipy-6.0.1}/README.md +10 -10
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/API.rst +0 -8
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.interfaces.FEPX.rst +2 -2
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.interfaces.PRISMS.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.plasticity.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.spherical_function.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.tensors.elasticity.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.tensors.fourth_order.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.tensors.mapping.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.tensors.second_order.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.tensors.stress_strain.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/API/Elasticipy.tensors.thermal_expansion.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/FourthOrderTensors.rst +5 -5
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/GUI.rst +7 -2
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/Plasticity.rst +4 -3
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/Tutorial_AveragingMethods.rst +27 -15
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/Tutorial_MultiplePhases.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/Tutorial_ReadWriteFiles.rst +2 -2
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/Tutorial_StiffnessTensor.rst +71 -15
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/Tutorial_StressStrain.rst +32 -6
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/Tutorial_ThermalExpansion.rst +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/Tutorial_wave-velocities.rst +1 -1
- elasticipy-6.0.1/docs/source/Tutorials/images/GUI.png +0 -0
- elasticipy-6.0.1/docs/source/Tutorials/images/Nye.png +0 -0
- elasticipy-6.0.1/docs/source/citation.rst +23 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/conf.py +1 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/index.rst +27 -44
- elasticipy-6.0.1/docs/source/install.rst +68 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/pyproject.toml +9 -3
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/FourthOrderTensor.py +4 -4
- elasticipy-6.0.1/src/elasticipy/StressStrainTensors.py +16 -0
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/ThermalExpansion.py +3 -3
- elasticipy-6.0.1/src/elasticipy/gui/__init__.py +3 -0
- elasticipy-6.0.1/src/elasticipy/gui/about.py +49 -0
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy/gui}/gui.py +138 -61
- elasticipy-6.0.1/src/elasticipy/gui/rotate_window.py +79 -0
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/interfaces/FEPX.py +2 -2
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/interfaces/PRISMS.py +2 -2
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/plasticity.py +6 -6
- elasticipy-6.0.1/src/elasticipy/resources/favicon.png +0 -0
- elasticipy-6.0.1/src/elasticipy/resources/logo_text.svg +126 -0
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/spherical_function.py +3 -3
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/tensors/elasticity.py +22 -22
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/tensors/fourth_order.py +20 -20
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/tensors/second_order.py +8 -8
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/tensors/stress_strain.py +10 -10
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/tensors/thermal_expansion.py +3 -3
- {elasticipy-5.0.0 → elasticipy-6.0.1/src/elasticipy.egg-info}/PKG-INFO +11 -11
- {elasticipy-5.0.0 → elasticipy-6.0.1}/src/elasticipy.egg-info/SOURCES.txt +27 -18
- elasticipy-6.0.1/src/elasticipy.egg-info/entry_points.txt +2 -0
- elasticipy-6.0.1/src/elasticipy.egg-info/top_level.txt +1 -0
- elasticipy-6.0.1/tests/__init__.py +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/test_FourthOrderTensors.py +3 -3
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/test_SphericalFunction.py +2 -2
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/test_StiffnessTensor.py +8 -8
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/test_StressStrainTensors.py +8 -8
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/test_ThermalExpansion.py +4 -4
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/test_interfaces_FEPX.py +3 -3
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/test_interfaces_prisms.py +3 -3
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/test_plasticity.py +3 -3
- elasticipy-5.0.0/docs/source/Tutorials/images/GUI.png +0 -0
- elasticipy-5.0.0/src/Elasticipy/StressStrainTensors.py +0 -16
- elasticipy-5.0.0/src/elasticipy.egg-info/entry_points.txt +0 -2
- elasticipy-5.0.0/src/elasticipy.egg-info/top_level.txt +0 -1
- {elasticipy-5.0.0 → elasticipy-6.0.1}/.github/workflows/JOSS build.yml +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/.github/workflows/cloc.yml +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/.github/workflows/python-publish.yml +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/.readthedocs.yaml +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/CITATION.cff +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/CODE_OF_CONDUCT.md +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/CONTRIBUTING.md +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/Examples/MaterialsProject.json +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/JOSS/ElasticipyVSpymatgen.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/JOSS/Nye.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/JOSS/Plot_E.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/JOSS/YoungModulus.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/JOSS/paper.bib +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/LICENSE +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/_static/images/HyperSphericalCoordinates.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/index.rst +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/Cyclic.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/E_PF.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/E_VRH_sections.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/E_hill_fiber.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/E_plot3D.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/E_xyz_sections.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/G_plot3D.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/G_plot3D_min.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/G_xyz_sections.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/Incremental.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/Mohr.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/Shear.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/Stress-controlled.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/StressStrain-controlled.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/WaveVelocities.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials/images/plot_volumeFraction.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/Tutorials.rst +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/logo/favicon.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/logo/logo.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/logo/logo.svg +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/logo/logo_text.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/logo/logo_text.svg +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/docs/source/logo/logo_text_whitebg.png +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/postBuild +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/requirements.txt +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/runtime.txt +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/setup.cfg +0 -0
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/__init__.py +0 -0
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/crystal_symmetries.py +0 -0
- {elasticipy-5.0.0/src/Elasticipy/tensors → elasticipy-6.0.1/src/elasticipy/interfaces}/__init__.py +0 -0
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/polefigure.py +0 -0
- {elasticipy-5.0.0/tests → elasticipy-6.0.1/src/elasticipy/tensors}/__init__.py +0 -0
- {elasticipy-5.0.0/src/Elasticipy → elasticipy-6.0.1/src/elasticipy}/tensors/mapping.py +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/src/elasticipy.egg-info/dependency_links.txt +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/src/elasticipy.egg-info/requires.txt +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/MaterialsProject.json +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/.sim +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/defrate/defrate.step0 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/defrate/defrate.step1 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/defrate/defrate.step2 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/ori/ori.step0 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/ori/ori.step1 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/ori/ori.step2 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/spinrate/spinrate.step0 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/spinrate/spinrate.step1 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/spinrate/spinrate.step2 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/strain/strain.step0 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/strain/strain.step1 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/strain/strain.step2 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/stress/stress.step0 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/stress/stress.step1 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/stress/stress.step2 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/velgrad/velgrad.step0 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/velgrad/velgrad.step1 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/FEPX/simulation.sim/results/elts/velgrad/velgrad.step2 +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/PRISMS/QuadratureOutputs.csv +0 -0
- {elasticipy-5.0.0 → elasticipy-6.0.1}/tests/interfaces/PRISMS/stressstrain.txt +0 -0
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
pip install pytest pytest-cov codecov pymatgen orix
|
|
29
29
|
|
|
30
30
|
- name: Install project and its dependencies
|
|
31
|
-
run: pip install -e .[dev] # Installe
|
|
31
|
+
run: pip install -e .[dev] # Installe elasticipy et les dépendances dev
|
|
32
32
|
|
|
33
33
|
- name: Run tests
|
|
34
34
|
env:
|
|
@@ -40,6 +40,6 @@ jobs:
|
|
|
40
40
|
uses: codecov/codecov-action@v5
|
|
41
41
|
with:
|
|
42
42
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
43
|
-
slug: DorianDepriester/
|
|
43
|
+
slug: DorianDepriester/elasticipy
|
|
44
44
|
flags: ${{ matrix.python-version }}
|
|
45
45
|
name: python-${{ matrix.python-version }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@software{dorian_depriester_2025_15188346,
|
|
2
2
|
author = {Dorian Depriester},
|
|
3
|
-
title = {DorianDepriester/
|
|
3
|
+
title = {DorianDepriester/elasticipy: v4.0.0},
|
|
4
4
|
month = apr,
|
|
5
5
|
year = 2025,
|
|
6
6
|
publisher = {Zenodo},
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
sit=swh:1:snp:20bf603cb1ae305b4d37a4567557ac860e09
|
|
13
13
|
d3e5;anchor=swh:1:rel:6dad2d91dcebe09e35d44f82a0c8
|
|
14
14
|
a46c77f0d057;path=DorianDepriester-
|
|
15
|
-
|
|
15
|
+
elasticipy-c8bfc05
|
|
16
16
|
},
|
|
17
17
|
}
|
|
@@ -46,9 +46,7 @@
|
|
|
46
46
|
"id": "95129202",
|
|
47
47
|
"metadata": {},
|
|
48
48
|
"outputs": [],
|
|
49
|
-
"source":
|
|
50
|
-
"from Elasticipy.tensors.elasticity import StiffnessTensor"
|
|
51
|
-
]
|
|
49
|
+
"source": "from elasticipy.tensors.elasticity import StiffnessTensor"
|
|
52
50
|
},
|
|
53
51
|
{
|
|
54
52
|
"cell_type": "code",
|
|
@@ -187,7 +185,7 @@
|
|
|
187
185
|
}
|
|
188
186
|
],
|
|
189
187
|
"source": [
|
|
190
|
-
"from
|
|
188
|
+
"from elasticipy.tensors.stress_strain import StrainTensor\n",
|
|
191
189
|
"eps = StrainTensor.tensile([1,0,0],1e-3)\n",
|
|
192
190
|
"print(eps)"
|
|
193
191
|
]
|
|
@@ -273,7 +271,7 @@
|
|
|
273
271
|
"metadata": {},
|
|
274
272
|
"outputs": [],
|
|
275
273
|
"source": [
|
|
276
|
-
"from
|
|
274
|
+
"from elasticipy.tensors.stress_strain import StressTensor\n",
|
|
277
275
|
"sigma = StressTensor.tensile([1,0,0],100)"
|
|
278
276
|
]
|
|
279
277
|
},
|
|
@@ -448,9 +446,7 @@
|
|
|
448
446
|
"cell_type": "markdown",
|
|
449
447
|
"id": "c47c6e4f-48f1-4dc1-9a2b-520b2ebfa00e",
|
|
450
448
|
"metadata": {},
|
|
451
|
-
"source":
|
|
452
|
-
"Most Elasticipy's commands can be broadcasted. E.g.:"
|
|
453
|
-
]
|
|
449
|
+
"source": "Most Elasticipy's commands can be broadcast. E.g.:"
|
|
454
450
|
},
|
|
455
451
|
{
|
|
456
452
|
"cell_type": "code",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from elasticipy.tensors.stress_strain import StrainTensor
|
|
2
|
+
from elasticipy.tensors.elasticity import StiffnessTensor
|
|
3
3
|
from matplotlib import pyplot as plt
|
|
4
4
|
import matplotlib as mpl
|
|
5
5
|
mpl.use('Qt5Agg') # Ensure interactive plot
|
|
@@ -7,7 +7,7 @@ import numpy as np
|
|
|
7
7
|
import time
|
|
8
8
|
|
|
9
9
|
C = StiffnessTensor.transverse_isotropic(Ex=200, Ez=300, nu_yx=0.2, nu_zx=0.3, Gxz=80)
|
|
10
|
-
##
|
|
10
|
+
## elasticipy's stuff
|
|
11
11
|
exp = np.arange(0, 8)
|
|
12
12
|
n = 10**exp
|
|
13
13
|
t_stress_elast=[]
|
|
@@ -37,9 +37,9 @@ for ni in n:
|
|
|
37
37
|
|
|
38
38
|
fig, ax = plt.subplots()
|
|
39
39
|
ax.plot(n, t_stress_mg, label="Generalized Hooke's law (Pymatgen)", marker="s")
|
|
40
|
-
ax.plot(n, t_stress_elast, label="Generalized Hooke's law (
|
|
40
|
+
ax.plot(n, t_stress_elast, label="Generalized Hooke's law (elasticipy)", marker="o")
|
|
41
41
|
ax.plot(n, t_vm_mg, label='von Mises eq. stress (Pymatgen)', linestyle='dotted', marker="s")
|
|
42
|
-
ax.plot(n, t_vm_elast, label='von Mises eq. stress (
|
|
42
|
+
ax.plot(n, t_vm_elast, label='von Mises eq. stress (elasticipy)', linestyle='dotted', marker="o")
|
|
43
43
|
plt.legend()
|
|
44
44
|
plt.xscale('log')
|
|
45
45
|
plt.yscale('log')
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
from elastic import Elastic
|
|
3
|
-
from
|
|
3
|
+
from elasticipy.tensors.elasticity import StiffnessTensor
|
|
4
4
|
import matplotlib as mpl
|
|
5
5
|
mpl.use('Qt5Agg') # Ensure interactive plot
|
|
6
|
-
from
|
|
6
|
+
from elasticipy.spherical_function import sph2cart, _plot3D
|
|
7
7
|
import time
|
|
8
8
|
import matplotlib.pyplot as plt
|
|
9
9
|
|
|
@@ -36,5 +36,5 @@ ax.set_title("Elate (t={:.3f} s)".format(t))
|
|
|
36
36
|
start_time=time.perf_counter()
|
|
37
37
|
fig, ax = C.Young_modulus.plot3D(n_phi=n_phi, n_theta=n_theta)
|
|
38
38
|
t = time.perf_counter() - start_time
|
|
39
|
-
#ax.set_title("
|
|
39
|
+
#ax.set_title("elasticipy (t={:.3f} s)".format(t))
|
|
40
40
|
fig.savefig('../JOSS/Plot_E.png', dpi=300)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
|
-
from
|
|
3
|
-
from
|
|
2
|
+
from elasticipy.tensors.stress_strain import StressTensor, StrainTensor
|
|
3
|
+
from elasticipy.tensors.elasticity import StiffnessTensor
|
|
4
4
|
from scipy.spatial.transform import Rotation
|
|
5
5
|
|
|
6
6
|
# ======================================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
|
-
from
|
|
3
|
-
from
|
|
2
|
+
from elasticipy.tensors.fourth_order import FourthOrderTensor
|
|
3
|
+
from elasticipy.tensors.elasticity import StiffnessTensor
|
|
4
4
|
from scipy.integrate import trapezoid
|
|
5
5
|
from scipy.spatial.transform import Rotation
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from elasticipy.plasticity import JohnsonCook
|
|
2
|
+
from elasticipy.tensors.stress_strain import StressTensor, StrainTensor
|
|
3
|
+
from elasticipy.tensors.elasticity import StiffnessTensor
|
|
4
4
|
import numpy as np
|
|
5
5
|
from matplotlib import pyplot as plt
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: '
|
|
2
|
+
title: 'elasticipy: A Python package for linear elasticity and tensor analysis'
|
|
3
3
|
tags:
|
|
4
4
|
- Python
|
|
5
5
|
- Continuum Mechanics
|
|
@@ -143,7 +143,8 @@ This section presents the syntaxes of few basic operations performed with Elasti
|
|
|
143
143
|
\autoref{fig:Young}.a) and b) were rendered with the following syntax:
|
|
144
144
|
|
|
145
145
|
````python
|
|
146
|
-
from
|
|
146
|
+
from elasticipy.tensors.elasticity import StiffnessTensor
|
|
147
|
+
|
|
147
148
|
C = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
|
|
148
149
|
E = C.Young_modulus
|
|
149
150
|
fig, _ = E.plot3D(n_phi=500, n_theta=500)
|
|
@@ -185,7 +186,8 @@ Efforts have been made to provide out-of-the-box simple syntaxes for common oper
|
|
|
185
186
|
will create a tensor array corresponding to evenly-spaced strain along $[1,0,0]$ axis:
|
|
186
187
|
|
|
187
188
|
````python
|
|
188
|
-
from
|
|
189
|
+
from elasticipy.tensors.stress_strain import StrainTensor
|
|
190
|
+
|
|
189
191
|
m = 1000 # length of tensor array
|
|
190
192
|
mag = np.linspace(0, 0.1, m) # Strain magnitude
|
|
191
193
|
strain = StrainTensor.tensile([1, 0, 0], mag)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: elasticipy
|
|
3
|
-
Version:
|
|
3
|
+
Version: 6.0.1
|
|
4
4
|
Summary: A Python library for elasticity tensor computations
|
|
5
5
|
Author-email: Dorian Depriester <dorian.dep@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -47,12 +47,12 @@ Dynamic: license-file
|
|
|
47
47
|
[](https://mybinder.org/v2/gh/DorianDepriester/Elasticipy/HEAD?urlpath=%2Fdoc%2Ftree%2FElasticipy_for_the_Impatient.ipynb)
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
# 
|
|
51
51
|
|
|
52
52
|
A python toolkit to manipulate stress and strain tensors, and other linear elasticity-related tensors (e.g. stiffness).
|
|
53
53
|
This package also provides a collection of easy-to-use and very fast tools to work on stress and strain tensors.
|
|
54
54
|
|
|
55
|
-
##
|
|
55
|
+
## 🚀 Main features
|
|
56
56
|
Among other features, this package implements:
|
|
57
57
|
|
|
58
58
|
- Computation of elasticity tensors,
|
|
@@ -66,10 +66,10 @@ Among other features, this package implements:
|
|
|
66
66
|
- Compatibility with the [Materials Project](https://next-gen.materialsproject.org/) API, [pymatgen](https://pymatgen.org/) and
|
|
67
67
|
[orix](https://orix.readthedocs.io/).
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## 🐍 Installation
|
|
70
70
|
Elasticipy can be installed with PIP:
|
|
71
71
|
````
|
|
72
|
-
pip install
|
|
72
|
+
pip install elasticipy
|
|
73
73
|
````
|
|
74
74
|
|
|
75
75
|
On anaconda, one can also use:
|
|
@@ -77,18 +77,18 @@ On anaconda, one can also use:
|
|
|
77
77
|
conda install conda-forge::elasticipy
|
|
78
78
|
````
|
|
79
79
|
|
|
80
|
-
##
|
|
80
|
+
## 📚 Documentation
|
|
81
81
|
Tutorials and full documentation are available on [ReadTheDoc](https://elasticipy.readthedocs.io/).
|
|
82
82
|
|
|
83
|
-
##
|
|
83
|
+
## ⏱️ Elasticipy in a nutshell
|
|
84
84
|
Take a 5-minute tour through Elasticipy's main features by running the online Jupyter Notebook, hosted on
|
|
85
85
|
[Binder](https://mybinder.org/v2/gh/DorianDepriester/Elasticipy/HEAD?urlpath=%2Fdoc%2Ftree%2FElasticipy_for_the_Impatient.ipynb).
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
##
|
|
88
|
+
## 🔍 Sources
|
|
89
89
|
The source code is available on [GitHub](https://github.com/DorianDepriester/Elasticipy) under the [MIT licence](https://github.com/DorianDepriester/Elasticipy/blob/c6c3d441a2d290ab8f4939992d5d753a1ad3bdb0/LICENSE).
|
|
90
90
|
|
|
91
|
-
##
|
|
91
|
+
## ☔ Tests and Code Coverage
|
|
92
92
|
|
|
93
93
|
The project uses unit tests with `pytest` and coverage reports generated using `coverage`. These reports are hosted on
|
|
94
94
|
[codecov](https://app.codecov.io/gh/DorianDepriester/Elasticipy).
|
|
@@ -99,7 +99,7 @@ Certain parts of the code, particularly those related to graphical user interfac
|
|
|
99
99
|
|
|
100
100
|
- **`src/Elasticipy/gui.py`**
|
|
101
101
|
|
|
102
|
-
##
|
|
102
|
+
## 🎓 Cite this package
|
|
103
103
|
If you use Elasticipy, please cite [](https://doi.org/10.21105/joss.07940)
|
|
104
104
|
|
|
105
105
|
You can use the following BibTeX entry:
|
|
@@ -113,7 +113,7 @@ You can use the following BibTeX entry:
|
|
|
113
113
|
number = {115},
|
|
114
114
|
pages = {7940},
|
|
115
115
|
author = {Depriester, Dorian and Kubler, Régis},
|
|
116
|
-
title = {
|
|
116
|
+
title = {elasticipy: A Python package for linear elasticity and tensor analysis},
|
|
117
117
|
journal = {Journal of Open Source Software}
|
|
118
118
|
}
|
|
119
119
|
````
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
[](https://mybinder.org/v2/gh/DorianDepriester/Elasticipy/HEAD?urlpath=%2Fdoc%2Ftree%2FElasticipy_for_the_Impatient.ipynb)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
# 
|
|
16
16
|
|
|
17
17
|
A python toolkit to manipulate stress and strain tensors, and other linear elasticity-related tensors (e.g. stiffness).
|
|
18
18
|
This package also provides a collection of easy-to-use and very fast tools to work on stress and strain tensors.
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## 🚀 Main features
|
|
21
21
|
Among other features, this package implements:
|
|
22
22
|
|
|
23
23
|
- Computation of elasticity tensors,
|
|
@@ -31,10 +31,10 @@ Among other features, this package implements:
|
|
|
31
31
|
- Compatibility with the [Materials Project](https://next-gen.materialsproject.org/) API, [pymatgen](https://pymatgen.org/) and
|
|
32
32
|
[orix](https://orix.readthedocs.io/).
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## 🐍 Installation
|
|
35
35
|
Elasticipy can be installed with PIP:
|
|
36
36
|
````
|
|
37
|
-
pip install
|
|
37
|
+
pip install elasticipy
|
|
38
38
|
````
|
|
39
39
|
|
|
40
40
|
On anaconda, one can also use:
|
|
@@ -42,18 +42,18 @@ On anaconda, one can also use:
|
|
|
42
42
|
conda install conda-forge::elasticipy
|
|
43
43
|
````
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## 📚 Documentation
|
|
46
46
|
Tutorials and full documentation are available on [ReadTheDoc](https://elasticipy.readthedocs.io/).
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## ⏱️ Elasticipy in a nutshell
|
|
49
49
|
Take a 5-minute tour through Elasticipy's main features by running the online Jupyter Notebook, hosted on
|
|
50
50
|
[Binder](https://mybinder.org/v2/gh/DorianDepriester/Elasticipy/HEAD?urlpath=%2Fdoc%2Ftree%2FElasticipy_for_the_Impatient.ipynb).
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## 🔍 Sources
|
|
54
54
|
The source code is available on [GitHub](https://github.com/DorianDepriester/Elasticipy) under the [MIT licence](https://github.com/DorianDepriester/Elasticipy/blob/c6c3d441a2d290ab8f4939992d5d753a1ad3bdb0/LICENSE).
|
|
55
55
|
|
|
56
|
-
##
|
|
56
|
+
## ☔ Tests and Code Coverage
|
|
57
57
|
|
|
58
58
|
The project uses unit tests with `pytest` and coverage reports generated using `coverage`. These reports are hosted on
|
|
59
59
|
[codecov](https://app.codecov.io/gh/DorianDepriester/Elasticipy).
|
|
@@ -64,7 +64,7 @@ Certain parts of the code, particularly those related to graphical user interfac
|
|
|
64
64
|
|
|
65
65
|
- **`src/Elasticipy/gui.py`**
|
|
66
66
|
|
|
67
|
-
##
|
|
67
|
+
## 🎓 Cite this package
|
|
68
68
|
If you use Elasticipy, please cite [](https://doi.org/10.21105/joss.07940)
|
|
69
69
|
|
|
70
70
|
You can use the following BibTeX entry:
|
|
@@ -78,7 +78,7 @@ You can use the following BibTeX entry:
|
|
|
78
78
|
number = {115},
|
|
79
79
|
pages = {7940},
|
|
80
80
|
author = {Depriester, Dorian and Kubler, Régis},
|
|
81
|
-
title = {
|
|
81
|
+
title = {elasticipy: A Python package for linear elasticity and tensor analysis},
|
|
82
82
|
journal = {Journal of Open Source Software}
|
|
83
83
|
}
|
|
84
84
|
````
|
|
@@ -144,8 +144,8 @@ and
|
|
|
144
144
|
0 & 0 & 0 & 0 & 0 & 1\\
|
|
145
145
|
\end{bmatrix}
|
|
146
146
|
|
|
147
|
-
In
|
|
148
|
-
|
|
147
|
+
In Elasticipy
|
|
148
|
+
~~~~~~~~~~~~~
|
|
149
149
|
|
|
150
150
|
The Kelvin mapping preserves tensor norms and inner products between second-order tensors. This makes it particularly suitable
|
|
151
151
|
for tensor algebra, projections and eigendecompositions. Therefore, in Elasticipy, the Kelvin mapping is used for all
|
|
@@ -156,7 +156,7 @@ For ``FourthOrderTensor`` and ``SymmetricFourthOrderTensor``, the default mappin
|
|
|
156
156
|
|
|
157
157
|
.. doctest::
|
|
158
158
|
|
|
159
|
-
>>> from
|
|
159
|
+
>>> from elasticipy.tensors.fourth_order import FourthOrderTensor
|
|
160
160
|
>>> I_kelvin = FourthOrderTensor.eye()
|
|
161
161
|
>>> print(I_kelvin)
|
|
162
162
|
4th-order tensor (in Kelvin mapping):
|
|
@@ -169,7 +169,7 @@ For ``FourthOrderTensor`` and ``SymmetricFourthOrderTensor``, the default mappin
|
|
|
169
169
|
|
|
170
170
|
Still, the Voigt mapping can be used instead:
|
|
171
171
|
|
|
172
|
-
>>> from
|
|
172
|
+
>>> from elasticipy.tensors.mapping import VoigtMapping
|
|
173
173
|
>>> I_voigt = FourthOrderTensor.eye(mapping=VoigtMapping())
|
|
174
174
|
>>> print(I_voigt)
|
|
175
175
|
4th-order tensor (in Voigt mapping):
|
|
@@ -269,7 +269,7 @@ Between 4th and a 2nd -order tensors
|
|
|
269
269
|
|
|
270
270
|
The same applies when working with 2nd-order tensors (provided by the ``SecondOrderTensor`` class):
|
|
271
271
|
|
|
272
|
-
>>> from
|
|
272
|
+
>>> from elasticipy.tensors.second_order import SecondOrderTensor
|
|
273
273
|
>>> t = SecondOrderTensor.rand(shape=(4,))
|
|
274
274
|
>>> T1.ddot(t)
|
|
275
275
|
Second-order tensor
|
|
@@ -14,5 +14,10 @@ The figure bellow illustrates the Young's modulus of
|
|
|
14
14
|
|
|
15
15
|
To launch this GUI, just run::
|
|
16
16
|
|
|
17
|
-
from
|
|
18
|
-
crystal_elastic_plotter()
|
|
17
|
+
from elasticipy.gui import crystal_elastic_plotter
|
|
18
|
+
crystal_elastic_plotter()
|
|
19
|
+
|
|
20
|
+
If you have installed Elasticipy with ``pip`` or ``conda``, just open a terminal (e.g. Powershell or Anaconda prompt)
|
|
21
|
+
and run::
|
|
22
|
+
|
|
23
|
+
elasticipy-gui
|
|
@@ -39,17 +39,17 @@ First, let us create the model:
|
|
|
39
39
|
|
|
40
40
|
.. doctest::
|
|
41
41
|
|
|
42
|
-
>>> from
|
|
42
|
+
>>> from elasticipy.plasticity import JohnsonCook
|
|
43
43
|
>>> JC = JohnsonCook(A=363, B=792.7122, n=0.5756)
|
|
44
44
|
|
|
45
45
|
The parameters are taken from [1]_. As we will also take elastic behaviour into account, we also need:
|
|
46
46
|
|
|
47
|
-
>>> from
|
|
47
|
+
>>> from elasticipy.tensors.elasticity import StiffnessTensor
|
|
48
48
|
>>> C = StiffnessTensor.isotropic(E=210000, nu=0.27)
|
|
49
49
|
|
|
50
50
|
Now, let say that we want to investigate the material's response for the tensile stress ranging from 0 to 725 MPa:
|
|
51
51
|
|
|
52
|
-
>>> from
|
|
52
|
+
>>> from elasticipy.tensors.stress_strain import StressTensor, StrainTensor
|
|
53
53
|
>>> import numpy as np
|
|
54
54
|
>>> n_step = 100
|
|
55
55
|
>>> stress_mag = np.linspace(0, 725, n_step)
|
|
@@ -75,6 +75,7 @@ That's all. Finally, let us plot the applied stress as a function of the overall
|
|
|
75
75
|
>>> ax.set_xlabel(r'$\varepsilon_{xx}$') # doctest: +SKIP
|
|
76
76
|
>>> ax.set_ylabel('Tensile stress (MPa)') # doctest: +SKIP
|
|
77
77
|
|
|
78
|
+
|
|
78
79
|
.. image:: images/Stress-controlled.png
|
|
79
80
|
|
|
80
81
|
|
|
@@ -17,7 +17,7 @@ As an example, let's consider the stiffness tensor for monoclinic TiNi:
|
|
|
17
17
|
|
|
18
18
|
.. doctest::
|
|
19
19
|
|
|
20
|
-
>>> from
|
|
20
|
+
>>> from elasticipy.tensors.elasticity import StiffnessTensor
|
|
21
21
|
>>> C = StiffnessTensor.monoclinic(phase_name='TiNi',
|
|
22
22
|
... C11=231, C12=127, C13=104,
|
|
23
23
|
... C22=240, C23=131, C33=175,
|
|
@@ -33,7 +33,7 @@ behaviour. In this case, the aforementioned averages can be estimated as follows
|
|
|
33
33
|
>>> C_Reuss = C.Reuss_average()
|
|
34
34
|
>>> C_Hill = C.Hill_average()
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Let's see how ``C_Hill`` looks like:
|
|
37
37
|
|
|
38
38
|
>>> print(C_Hill)
|
|
39
39
|
Stiffness tensor (in Voigt mapping):
|
|
@@ -51,7 +51,7 @@ behaviour. In this case, the aforementioned averages can be estimated as follows
|
|
|
51
51
|
40.66513606]]
|
|
52
52
|
Phase: TiNi
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
As a comparison, let's see how the underlying assumption impair the Young moduli:
|
|
55
55
|
|
|
56
56
|
>>> E_Voigt = C_Voigt.Young_modulus
|
|
57
57
|
>>> E_Reuss = C_Reuss.Young_modulus
|
|
@@ -100,15 +100,27 @@ Above, we have only used the Hill average for estimating the macroscopic elastic
|
|
|
100
100
|
influence of the method (namely Voigt, Reuss or Hill), we can plot the directional Young moduli on orthogonal
|
|
101
101
|
sections (see :ref:`here<plotting>` for details) for each of the aforementioned methods as follows:
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
103
|
+
.. plot::
|
|
104
|
+
|
|
105
|
+
from scipy.spatial.transform import Rotation
|
|
106
|
+
import numpy as np
|
|
107
|
+
from elasticipy.tensors.elasticity import StiffnessTensor
|
|
108
|
+
C = StiffnessTensor.monoclinic(phase_name='TiNi',
|
|
109
|
+
C11=231, C12=127, C13=104,
|
|
110
|
+
C22=240, C23=131, C33=175,
|
|
111
|
+
C44=81, C55=11, C66=85,
|
|
112
|
+
C15=-18, C25=1, C35=-3, C46=3)
|
|
113
|
+
phi1 = np.random.random(10000)*2*np.pi # Random sampling from 0 to 2pi
|
|
114
|
+
Phi = phi2 = np.zeros(10000)
|
|
115
|
+
Euler_angles = np.array([phi1, Phi, phi2]).T
|
|
116
|
+
rotations = Rotation.from_euler('ZXZ', Euler_angles) # Bunge-Euler angles
|
|
117
|
+
C_rotated = C * rotations
|
|
118
|
+
for method in ['Reuss', 'Hill', 'Voigt']:
|
|
119
|
+
C_avg = C_rotated.average(method)
|
|
120
|
+
if method == 'Reuss':
|
|
121
|
+
fig, axs = C_avg.Young_modulus.plot_xyz_sections(label='Reuss') # Create fig and axes (sections)
|
|
122
|
+
else:
|
|
123
|
+
fig, axs = C_avg.Young_modulus.plot_xyz_sections(fig=fig, axs=axs, label=method) # Use existing axes
|
|
124
|
+
axs[-1].legend()
|
|
125
|
+
fig.tight_layout()
|
|
126
|
+
fig.show()
|
|
@@ -42,7 +42,7 @@ Let's start by creating the two stiffness tensors in Python:
|
|
|
42
42
|
|
|
43
43
|
.. doctest::
|
|
44
44
|
|
|
45
|
-
>>> from
|
|
45
|
+
>>> from elasticipy.tensors.elasticity import StiffnessTensor
|
|
46
46
|
>>> C_austenite = StiffnessTensor.cubic(C11=204, C12=137, C44=126)
|
|
47
47
|
>>> C_ferrite = StiffnessTensor.cubic(C11=242, C12=146, C44=116)
|
|
48
48
|
|
|
@@ -12,11 +12,11 @@ To save a given stiffness tensor to a plain text file, just use the ``save_to_tx
|
|
|
12
12
|
|
|
13
13
|
.. doctest::
|
|
14
14
|
|
|
15
|
-
>>> from
|
|
15
|
+
>>> from elasticipy.tensors.elasticity import StiffnessTensor
|
|
16
16
|
>>> C = StiffnessTensor.cubic(C11=186, C12=134, C44=77, phase_name='Cu')
|
|
17
17
|
>>> C.save_to_txt('Stiffness_Cu.txt')
|
|
18
18
|
|
|
19
|
-
By default, the file will contain the stiffness matrix, and additional data as well (
|
|
19
|
+
By default, the file will contain the stiffness matrix, and additional data as well (phase name). To save
|
|
20
20
|
the matrix only, just use the option ``matrix_only=True``.
|
|
21
21
|
|
|
22
22
|
Load stiffness from file
|