-
Notifications
You must be signed in to change notification settings - Fork 8
Description
ℹ️ General Information
Component Name: Rainflow in 1D
Component Location: core/decompositions/uniaxial/
Suggested Python Name: rainflow
FABER WG Relation: 4.5
Brief Description: The rain-flow process on the chosen signal. Outputs positions in the original vector forming each cycle - these are referred to later and together with the input form the stress/strain levels
Priority: (1-10 scale) 10
Technical Complexity: (1-10 scale) 5
Estimated Effort: (1-10 scale) 5
Dependencies: structural_mechanics.stress
Implementation Details
The algorithm follows the standard rainflow counting procedure applied to a sequence of reversal points. It returns pairs of indices corresponding to stress values that form individual cycles. The reversal extraction procedure is included. However, all returned cycle indices MUST refer to the original stress vector, not to the reduced reversal sequence.
📋 Specification
- Reversal extraction with index mapping
Given stress signal:
Extract reversal sequence:
together with index mapping:
where:
Important constraint: All further operations use
- Rainflow condition
For three most recent points:
Define ranges:
Cycle closure condition:
- Cycle definition
A closed cycle is formed between:
but must be reported as indices in original signal:
NOT:
- Half cycles
Remaining stack elements define half cycles:
again referencing the original signal.
Inputs
| Parameter | Symbol | Type | Description | Units | Constraints |
|---|---|---|---|---|---|
Outputs
| Parameter | Symbol | Type | Description | Units | Range |
|---|---|---|---|---|---|
Expected Behavior
🔧 Implementation Guidelines
Function Signature
# Suggested function signature
def function_name():
passCode Structure
Error Handling
✅ Validation & Testing
Test Cases
| Test Case | Inputs | Expected Outputs | Notes |
|---|---|---|---|
| Example 1 | |||
| Example 2 |
Validation Criteria
- Mathematical accuracy verified against literature
- Edge cases handled appropriately
- Output format matches specification