Elaston
Elaston is a simple and lightweight module for linear elasticity calculations.
Installation
We will offer pip and conda at some point. For now, you can install the package by cloning the repository and running the following command in the root directory:
pip install .
Features
- Calculation of elastic constants
- Stress, strain and displacement field around dislocations using anisotropic elasticity
- Stress, strain and displacement field around point defects
Usage
Examples I: Get bulk modulus from the elastic tensor:
from elaston import LinearElasticity
medium = LinearElasticity(C_11=211.0, C_12=130.0, C_44=82.0) # Fe
medium_voigt = medium.get_voigt_average()
parameters = medium_voigt.get_elastic_moduli()
print(parameters['bulk_modulus'])
Example II: Get strain field around a point defect:
import numpy as np
medium = LinearElasticity(C_11=211.0, C_12=130.0, C_44=82.0)
random_positions = np.random.random((10, 3)) - 0.5
dipole_tensor = np.eye(3)
print(medium.get_point_defect_strain(random_positions, dipole_tensor))
Example III: Get stress field around a dislocation:
import numpy as np
medium = LinearElasticity(C_11=211.0, C_12=130.0, C_44=82.0)
random_positions = np.random.random((10, 3)) - 0.5
# Burgers vector of a screw dislocation in bcc Fe
burgers_vector = np.array([0, 0, 2.86 * np.sqrt(3) / 2])
print(medium.get_dislocation_stress(random_positions, burgers_vector))
Example IV: Estimate the distance between partial dislocations:
medium = LinearElasticity(C_11=110.5, C_12=64.8, C_44=30.9) # Al
lattice_constant = 4.05
partial_one = np.array([-0.5, 0, np.sqrt(3) / 2]) * lattice_constant
partial_two = np.array([0.5, 0, np.sqrt(3) / 2]) * lattice_constant
distance = 100
stress_one = medium.get_dislocation_stress([0, distance, 0], partial_one)
print('Choose `distance` in the way that the value below corresponds to SFE')
medium.get_dislocation_force(stress_one, [0, 1, 0], partial_two)
Metadata
Release files for Elaston 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| elaston-0.0.3.tar.gz | 30.6 kB | Without provenance | Details for elaston-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elaston-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for elaston-0.0.3-py3-none-any.whl |
Total release size: 54.5 kB
Release files / elaston-0.0.3.tar.gz
| Download URL | elaston-0.0.3.tar.gz |
|---|---|
| Size | 30.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e3f57154e53592ab70c961323836194bb1e8aaebb0ce5b7175a4ecf28bb2aa2
|
|
BLAKE2b-256 checksum How to use checksums |
1b83b697ea648f5752b6ee9cfb0fd42e979699a2da94502afb21490d66de39c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / elaston-0.0.3-py3-none-any.whl
| Download URL | elaston-0.0.3-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69d0e9534b2a76b859fe86092d9edbf014ea02ab25859fdaf40ab977368da8e6
|
|
BLAKE2b-256 checksum How to use checksums |
b405f45931f7efc194de14672de01f4afe4be4665422a31a9b4fdc8ba53996c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for Elaston 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.