-
Notifications
You must be signed in to change notification settings - Fork 8
Description
ℹ️ General Information
Component Name: Hooke's Law
Component Location: material_laws/hookes_law
Suggested Python Name: hookes_law
FABER WG Relation: -
Brief Description: Elastic stress to strain and back conversion for linear elastic and isotropic material.
Priority: 3
Technical Complexity: 2
Estimated Effort: 2
Dependencies: -
Implementation Details
📋 Specification
2 Separate versions should be implemented for both stress to strain and strain to stress conversion:
- 1D Hooke's law for uniaxial stress and strain
- 2D Hooke's law for plane stress and plane strain conditions
Additional requirements:
-
Voigt notation should be utilized for 2D and 3D cases, i.e. stress and strain tensors should be represented as 6-component vectors.
-
Isotropic material behavior is assumed. This should be clearly stated in the documentation.
Mathematical Formulation
3D Hooke's Law (Strain-Stress Relationship):
Note: if images are not well visible, switch to light mode or click on them to open in a new tab
3D Hooke's Law (Stress-Strain Relationship):
2D Hooke's Law (Strain-Stress Relationship):
2D Hooke's Law (Stress-Strain Relationship):
Inputs
- Material parameters
| Parameter | Symbol | Type | Description | Units | Range |
|---|---|---|---|---|---|
| elastic_modulus | array of floats | Young's modulus | MPa | ||
| poisson_ratio | array of floats | Poisson's ratio | - |
- Stress / Strain values
| Parameter | Symbol | Type | Description | Units | Range |
|---|---|---|---|---|---|
| stress | array of floats | stress | MPa | ||
| strain | array of floats | strain | - |
Outputs
| Parameter | Symbol | Type | Description | Units | Range |
|---|---|---|---|---|---|
| stress | array of floats | stress | MPa | ||
| strain | array of floats | strain | - |
🔧 Implementation Guidelines
Code Structure
Create separate file hookes_law.py in the material_laws directory for better namespace organization.
Function Signature
# import numpy as np
# from numpy.typing import ArrayLike, NDArray
def calc_stress_xD(
elastic_modulus: float,
poisson_ratio: float,
strain: ArrayLike,
) -> NDArray[np.float64]:
# x should be repalaced with 2 or 3
pass
def calc_strain_xD(
elastic_modulus: float,
poisson_ratio: float,
stress: ArrayLike,
) -> NDArray[np.float64]:
# x should be repalaced with 2 or 3
passError Handling
No error handling is required.
Testing
Test cases are not provided, but should be straightforward to implement.