-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description:
Implement functionality to compute various equivalent strains from mechanics of materials using a Test-Driven Development (TDD) approach. This feature will enable users to calculate strain measures commonly used in engineering analysis, such as von Mises equivalent strain, principal strains, and their signed variants. Mathematical formulations should be documented, and tensors should utilize proper vector notation, leveraging the same utils module used for stress calculations.
Tasks:
Testing Setup
- Write unit tests for all strain calculation functions before implementing them.
- Use realistic strain tensors as test cases, ensuring coverage for both 2D and 3D states.
- Include edge cases, such as singular or zero tensors, in the test suite.
Mathematical Formulations
- Document the mathematical formulations for each strain measure in the module docstrings or separate documentation files.
- Ensure the documentation includes vector/tensor notation with clear examples.
Function Implementations
Principal Strains:
- Implement functions to calculate the first, second, and third principal strains.
- Handle both planar (2D) and volumetric (3D) strain tensors.
- Provide a method to sort the principal strains in decreasing order by magnitude.
Volumetric Strain:
- Implement a function for volumetric strain computations.
Deviatoric Strain:
- Implement a function for deviatoric strain computations.
Von Mises Equivalent Strain:
- Implement a function to compute von Mises equivalent strain.
- Ensure compatibility with both 2D and 3D strain states.
Signed Strain Variants:
- Extend the von Mises and principal strain functions to include signed variants where applicable, respecting mechanics of materials conventions.
Integration and Vector Representation
- Ensure strain tensors are represented in same notation as stress for calculations, utilizing the utils module that handles vector-to-tensor conversions.
- Use numpy or a similar library for efficient tensor operations and linear algebra.
Documentation
- Add detailed docstrings for each function, specifying inputs, outputs, and the equations used.
- Update README.md or create a docs/ folder with examples of how to use the implemented functions.
- Include vector/tensor notation in the documentation for clarity.
Acceptance Criteria
- All strain measures (principal strains, volumetric strain, deviatoric strain, von Mises equivalent strain, and signed variants) are implemented and pass the predefined unit tests.
- Functions work for both 2D and 3D strain tensors using the utils module for proper vector and tensor notation.
- Mathematical formulations are documented, and documentation provides clear usage examples.
Additional Notes
- Follow mechanics of materials conventions for strain calculations.
- Ensure robust error handling for invalid inputs.
- Leverage TDD principles by writing tests first and ensuring all tests pass before implementation.
- This Issue is closely related to Add Equivalent Stress Calculations #12 and the implementation should follow same principles.
- The data structure for the strain array should be designed to support multiple time increments to be consistent with fatigue analysis requirements.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request