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)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elaston-0.0.2.tar.gz.
File metadata
- Download URL: elaston-0.0.2.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec4c48afaf15a54a40e220a3507321a9f1467786154750818413507f2a5b343b
|
|
| MD5 |
f907b71e8cc339710fe398f654e1bae6
|
|
| BLAKE2b-256 |
4e3e7d82d68f8ca82a0dd6e9c4b3473d54d343e7478f9ad483a5cb673f8f3814
|
File details
Details for the file elaston-0.0.2-py3-none-any.whl.
File metadata
- Download URL: elaston-0.0.2-py3-none-any.whl
- Upload date:
- Size: 24.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57329c5955f5eb97f6237b23f367e13dcceb95cb4e3b9f20fd333b7335175988
|
|
| MD5 |
805968df284f945cccdd41833fc07f94
|
|
| BLAKE2b-256 |
01065344ec8cb17bf456c79a2e29c2b541fe856481f6198b7887ffd8e72ad20b
|