ASTM Counting
This module implements the standard cycle counting methods in ASTM E1049-85(2017) Standard Practices for Cycle Counting in Fatigue Analysis
- ffpack.lcc.astmCounting.astmLevelCrossingCounting(data, refLevel=0.0, levels=None, aggregate=True)
ASTM level crossing counting in E1049-85: sec 5.1.1.
- Parameters
data (1d array) – Load sequence data for counting.
refLevel (scalar, optional) – Reference level.
levels (1d array) – Self-defined levels for counting.
aggragate (bool, optional) – If aggregate is set to False, the original sequence for internal counting, e.g., [ crossPoint1, corssPoint2, … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data length is less than 2 or the data dimension is not 1.
Examples
>>> from ffpack.lcc import astmLevelCrossingCounting >>> data = [ -0.8, 1.3, 0.7, 3.4, 0.7, 2.5, -1.4, -0.5, -2.3, >>> -2.2, -2.6, -2.4, -3.3, 1.5, 0.6, 3.4, -0.5 ] >>> rst = astmLevelCrossingCounting( data )
- ffpack.lcc.astmCounting.astmPeakCounting(data, refLevel=None, aggregate=True)
ASTM peak counting in E1049-85: sec 5.2.1.
- Parameters
data (1d array) – Load sequence data for counting.
refLevel (scalar, optional) – Reference level.
aggragate (bool, optional) – If aggregate is set to False, the original sequence for internal counting, e.g., [ peak1, peak2, … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data length is less than 2 or the data dimension is not 1.
Examples
>>> from ffpack.lcc import astmPeakCounting >>> data = [ 0.0, 1.5, 0.5, 3.5, 0.5, 2.5, -1.5, -0.5, -2.5, >>> -2.0, -2.7, -2.5, -3.5, 1.5, 0.5, 3.5, -0.5 ] >>> rst = astmPeakCounting( data )
- ffpack.lcc.astmCounting.astmRainflowCounting(data, aggregate=True)
ASTM rainflow counting in E1049-85: sec 5.4.4.
- Parameters
data (1d array) – Load sequence data for counting.
aggragate (bool, optional) – If aggregate is set to False, the original sequence for internal counting, e.g., [ [ rangeStart1, rangeEnd1, count1 ], [ rangeStart2, rangeEnd2, count2 ], … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data length is less than 2 or the data dimension is not 1.
Examples
>>> from ffpack.lcc import astmRainflowCounting >>> data = [ -2.0, 1.0, -3.0, 5.0, -1.0, 3.0, -4.0, 4.0, -2.0 ] >>> rst = astmRainflowCounting( data )
- ffpack.lcc.astmCounting.astmRainflowRepeatHistoryCounting(data, aggregate=True)
ASTM simplified rainflow counting for repeating histories in E1049-85: sec 5.4.5.
- Parameters
data (1d array) – Load sequence data for counting.
aggragate (bool, optional) – If aggregate is set to False, the original sequence for internal counting, e.g., [ [ rangeStart1, rangeEnd1, count1 ], [ rangeStart2, rangeEnd2, count2 ], … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data length is less than 2 or the data dimension is not 1. If the data is not repeatable: first data point is different from the last data point.
Examples
>>> from ffpack.lcc import astmRainflowRepeatHistoryCounting >>> data = [ -2.0, 1.0, -3.0, 5.0, -1.0, 3.0, -4.0, 4.0, -2.0 ] >>> rst = astmRainflowRepeatHistoryCounting( data )
- ffpack.lcc.astmCounting.astmRangePairCounting(data, aggregate=True)
ASTM range pair counting in E1049-85: sec 5.4.3.
- Parameters
data (1d array) – Load sequence data for counting.
aggragate (bool, optional) – If aggregate is set to False, the original sequence for internal counting, e.g., [ [ rangeStart1, rangeEnd1, count1 ], [ rangeStart2, rangeEnd2, count2 ], … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data length is less than 2 or the data dimension is not 1.
Examples
>>> from ffpack.lcc import astmRangePairCounting >>> data = [ -2.0, 1.0, -3.0, 5.0, -1.0, 3.0, -4.0, 4.0, -2.0 ] >>> rst = astmRangePairCounting( data )
- ffpack.lcc.astmCounting.astmSimpleRangeCounting(data, aggregate=True)
ASTM simple range counting in E1049-85: sec 5.3.1.
- Parameters
data (1d array) – Load sequence data for counting.
aggragate (bool, optional) – If aggregate is set to False, the original sequence for internal counting, e.g., [ [ rangeStart1, rangeEnd1, count1 ], [ rangeStart2, rangeEnd2, count2 ], … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data length is less than 2 or the data dimension is not 1.
Examples
>>> from ffpack.lcc import astmSimpleRangeCounting >>> data = [ -2.0, 1.0, -3.0, 5.0, -1.0, 3.0, -4.0, 4.0, -2.0 ] >>> rst = astmSimpleRangeCounting( data )
Johannesson Counting
Johannesson proposed a minMax cycle counting method.
Reference: Johannesson, P., 1998. Rainflow cycles for switching processes with Markov structure. Probability in the Engineering and Informational Sciences, 12(2), pp.143-175.
- ffpack.lcc.johannessonCounting.johannessonMinMaxCounting(data, aggregate=True)
Johannesson min-max counting
- Parameters
data (1d array) – Load sequence data for counting.
aggragate (bool, optional) – if aggregate is set to False, the original sequence for internal counting, e.g., [ [ rangeStart1, rangeEnd1, count1 ], [ rangeStart2, rangeEnd2, count2 ], … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data dimension is not 1 If the data length is less than 2
Examples
>>> from ffpack.lcc import johannessonMinMaxCounting >>> data = [ -0.8, 1.3, 0.7, 3.4, 0.7, 2.5, -1.4, -0.5, -2.3, >>> -2.2, -2.6, -2.4, -3.3, 1.5, 0.6, 3.4, -0.5 ] >>> rst = johannessonMinMaxCounting( data )
Rychlik Counting
Rychlik proposed a toplevel-up cycle counting method and proved that the proposed method is equivalent to the classical rainflow counting method. Compared to the classical rainflow counting method, the proposed method keeps the original sequence information which is quite useful if the sequence information is required for further analysis.
Reference: Rychlik, I., 1987. A new definition of the rainflow cycle counting method. International journal of fatigue, 9(2), pp.119-121.
- ffpack.lcc.rychlikCounting.rychlikRainflowCounting(data, aggregate=True)
Rychilk rainflow counting (toplevel-up cycle TUC)
- Parameters
data (1d array) – Load sequence data for counting.
aggragate (bool, optional) – If aggregate is set to False, the original sequence for internal counting, e.g., [ [ rangeStart1, rangeEnd1, count1 ], [ rangeStart2, rangeEnd2, count2 ], … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data dimension is not 1 If the data length is less than 2
Examples
>>> from ffpack.lcc import rychlikRainflowCycleCounting >>> data = [ -0.8, 1.3, 0.7, 3.4, 0.7, 2.5, -1.4, -0.5, -2.3, >>> -2.2, -2.6, -2.4, -3.3, 1.5, 0.6, 3.4, -0.5 ] >>> rst = rychlikRainflowCycleCounting( data )
Rychlik Counting
- ffpack.lcc.fourPointCounting.fourPointRainflowCounting(data, aggregate=True)
Four point rainflow counting in [Lee2011].
- Parameters
data (1d array) – Load sequence data for counting.
aggragate (bool, optional) – If aggregate is set to False, the original sequence for internal counting, e.g., [ [ rangeStart1, rangeEnd1, count1 ], [ rangeStart2, rangeEnd2, count2 ], … ], will be returned.
- Returns
rst – Sorted counting results.
- Return type
2d array
- Raises
ValueError – If the data length is less than 4 or the data dimension is not 1.
Examples
>>> from ffpack.lcc import fourPointRainflowCounting >>> data = [ -2.0, 1.0, -3.0, 5.0, -1.0, 3.0, -4.0, 4.0, -2.0 ] >>> rst = fourPointRainflowCounting( data )
References
- Lee2011
Lee, Y.L., Barkey, M.E. and Kang, H.T., 2011. Metal fatigue analysis handbook: practical problem-solving techniques for computer-aided engineering. Elsevier.
Mean Stress Correction
This module implements the mean stress methods to quantify the interaction of mean and alternating stresses on the fatigue life of a material.
- ffpack.lcc.meanStressCorrection.gerberCorrection(stressRange, ultimateStrength, n=1.0)
The Gerber correction in this implementation is applicable to cases with stress ratio no less than -1.
- Parameters
stressRange (1d array) – Stress range, e.g., [ lowerStress, upperStress ].
ultimateStrength (scalar) – Ultimate strength.
n (scalar, optional) – Safety factor, default to 1.0.
- Returns
rst – Fatigue limit.
- Return type
scalar
- Raises
ValueError – If the stressRange dimension is not 1, or stressRange length is not 2. If stressRange[ 1 ] <= 0 or stressRange[ 0 ] >= stressRange[ 1 ]. If ultimateStrength is not a scalar or ultimateStrength <= 0. If ultimateStrength is smaller than the mean stress. If safety factor n < 1.0.
Examples
>>> from ffpack.lcc import gerberCorrection >>> stressRange = [ 1.0, 2.0 ] >>> ultimateStrength = 3.0 >>> rst = gerberCorrection( stressRange, ultimateStrength )
- ffpack.lcc.meanStressCorrection.goodmanCorrection(stressRange, ultimateStrength, n=1.0)
The Goodman correction in this implementation is applicable to cases with stress ratio no less than -1.
- Parameters
stressRange (1d array) – Stress range, e.g., [ lowerStress, upperStress ].
ultimateStrength (scalar) – Ultimate tensile strength.
n (scalar, optional) – Safety factor, default to 1.0.
- Returns
rst – Fatigue limit.
- Return type
scalar
- Raises
ValueError – If the stressRange dimension is not 1, or stressRange length is not 2. If stressRange[ 1 ] <= 0 or stressRange[ 0 ] >= stressRange[ 1 ]. If ultimateStrength is not a scalar or ultimateStrength <= 0. If ultimateStrength is smaller than the mean stress. If n < 1.0.
Examples
>>> from ffpack.lcc import goodmanCorrection >>> stressRange = [ 1.0, 2.0 ] >>> ultimateStrength = 4.0 >>> rst = goodmanCorrection( stressRange, ultimateStrength )
- ffpack.lcc.meanStressCorrection.soderbergCorrection(stressRange, yieldStrength, n=1.0)
The Soderberg correction in this implementation is applicable to cases with stress ratio no less than -1.
- Parameters
stressRange (1d array) – Stress range, e.g., [ lowerStress, upperStress ].
yieldStrength (scalar) – Yield strength.
n (scalar, optional) – Safety factor, default to 1.0.
- Returns
rst – Fatigue limit.
- Return type
scalar
- Raises
ValueError – If the stressRange dimension is not 1, or stressRange length is not 2. If stressRange[ 1 ] <= 0 or stressRange[ 0 ] >= stressRange[ 1 ]. If yieldStrength is not a scalar or yieldStrength <= 0. If yieldStrength is smaller than the mean stress. If safety factor n < 1.0.
Examples
>>> from ffpack.lcc import soderbergCorrection >>> stressRange = [ 1.0, 2.0 ] >>> yieldStrength = 3.0 >>> rst = soderbergCorrection( stressRange, yieldStrength )