Skip to content

Implement stress to strain and strain to stress transformation according to Hooke's law #39

@JiriKuzelka

Description

@JiriKuzelka

ℹ️ 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

A function allowing compute stresses ($\sigma$) in MPa form given strains ($\epsilon$) and vice versa according to Hooke's law. Considering two material parameters Young's modulus ($E$) and Poisson's ratio ($\nu$).

Mathematical Formulation

Inputs

  1. Material parameters
Parameter Symbol Type Description Units Range
elastic_modulus $E$ array of floats Young's modulus MPa $(0;\infty)$
poisson_ratio $\nu$ array of floats Poisson's ratio - $(-\infty;0.5)$
  1. Stress / Strain values
Parameter Symbol Type Description Units Range
stress $\sigma$ array of floats stress MPa $(-\infty;\infty)$
strain $\epsilon$ array of floats strain - $(-\infty;\infty)$

Outputs

Parameter Symbol Type Description Units Range
stress $\sigma$ array of floats stress MPa $(-\infty;\infty)$
strain $\epsilon$ array of floats strain - $(-\infty;\infty)$

Expected Behavior

🔧 Implementation Guidelines

Function Signature

# Suggested function signature
def calc_stress(
strain: ArrayLike,
) -> NDArray[np.float64]:

def calc_strain(
stress: ArrayLike,
) -> NDArray[np.float64]:

Code Structure

Error Handling

✅ Validation & Testing

Test Cases

Validation Criteria

  • Edge cases handled appropriately
  • Output format matches specification

📚 References & Resources

https://en.wikipedia.org/wiki/Hooke%27s_law

📝 Technical Notes

Performance Considerations

Edge Cases to Handle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions