# Rainflow Counting

The fatigue life of a component which is subjected to Constant Amplitude (CA) loading can be calculated using fatigue curve (S-N curve for instance).  In real world the fatigue loading is very complex.  When the varying loading is random, it is difficult to estimate the fatigue life.  The rainflow counting algorithm (a.k.a the “rainflow counting method”) is used in the analysis of fatigue life in such a smart way that the complex loading time history is broken down into individual cycles by numerous sets of simple stress (strain) reversals. The fatigue damage of each reversal is calculated, and the accumulated damage is summed up using Miner’s rule.

Before the availability of modern computing power, the rainflow counting was used to divide the loading time history into several manageable groups, traditionally called bins.  Each bin contains a group of loads with different amplitudes; the fatigue damage is calculated on that bin based on the maximum amplitude in that bin. The total damage of all bins is then summed up using Miner’s rule. This approach greatly reduced computing time but was overly conservative. Nowadays with ever powerful computers, fatigue damages are calculated on each actual reversal basis, and the loads are no longer grouped into bins. However, the “bin” is still used to make presentations of cycles that constitutes the time history.

The algorithm was developed by Tatsuo Endo and M. Matsuishi, and published in the paper “Fatigue of Metals Subjected to Varying Stress – Fatigue Lives under Random Loading” (Japan Society of Mechanical Engineers, March 1968). Downing and Socie created one of the more widely referenced and utilized rainflow cycle-counting algorithms in 1982, which was included as one of many cycle-counting algorithms in ASTM E 1049-85 (Standard Practices for Cycle Counting in Fatigue Analysis).  Igor Rychlik gave a mathematical definition for the rainflow counting method, thus enabling closed-form computations from the statistical properties of the load signal.

For simple periodic loadings, such as Figure 1, rainflow counting is unnecessary. That sequence clearly has 7.5 cycles of amplitude 150 MPa (the stress range is 300 MPa) and a structure’s life can be estimated from a simple application of the relevant S-N curve.

For the Variable Amplitude (VA) loading in Figure 2 however, the cycles of certain stress ranges cannot be clearly identified. The rainflow counting algorithm is required to solve this kind of problems.

## Rainflow Counting Algorithm

The “rainflow” was named from a comparison of this algorithm to the flow of rain falling on a pagoda and running down the edges of the roof. The rainflow counting algorithm consists of the following steps:

1. Rotate the loading time history chart in Figure 2 clockwise 90°, with earliest time to the top (Figure 3).
2. Reduce the time history to a sequence of peaks on the right side and valleys on the left side (Figure 4). The peaks and valleys represent the stress reversal points.
3. The time axis is vertically downward and the load time history resembles a pagoda roof (Figure 5).
4. Imagine a flow of rain starting at each successive peak point on the right side that “drips” down the pagoda.
5. Define a loading reversal (half-cycle) by allowing each rainflow to continue to drip down these roofs until:
• case (a) It falls below the roof, i.e., it reaches the end of the time history. (For example: segment #6 in Figure 6)
• case (b) It meets a previous flow falling from above, i.e., it merges with a flow that started at an earlier peak. (For example: segments #2, #3, #4, #5 and #7 in Figure 7)
• case (c) it flows until it reaches a peak having a greater or equal magnitude. (For example: segments #1, #2, #3 and #4 in Figure 6)
6. Repeat step 5 for valleys.
7. Assign a stress range Δσ = σmax – σmin to each half-cycle equal to the stress difference (so called stress range) between its start and termination.
8. Pair up half-cycles of identical magnitude but opposite sense to count the number of complete cycles. Unmatched half-cycles are residual half-cycles.

Figure 4: Reduce the time history to a sequence of peaks and valleys

Figure 5:  Pagoda roof

A given half cycle may contain smaller half cycles.  As a general rule, large stress cycles must not be fragmented into smaller ones as this will lead to underestimation of fatigue damage.  Smaller stress cycles should be treated as temporary interruptions of larger stress reversals.

## Rainflow Counting Example

• The rainflow for peaks of stress history in Figure 4 is shown in Figure 6.  The stress values are 0,-150,100,0,130,-120,110,-50,80,0,150,-100,100,0,130,0 (MPa).
• The first number in the bracket represents the peak (or valley) number; the second number is the stress value.
• The segment #1 in peak rainflow starts at peak (1) and terminates at (2), because the next peak point (3) has greater magnitude (case c); the stress range Δσ = 0 – (-150) = 150 MPa.
• The segment #2 starts at peak (3) and terminates at (4), because the next peak point (5) has greater magnitude (case c); the stress range Δσ = 100 – (0) = 100 MPa.
• the segment #3 starts at peak (5), drips down passing peak (7) and peak (9) and stops at peak (11), because the peak point (11) has greater magnitude (case c); the stress range Δσ = 130 – (-120) = 250 MPa.
• Similarly, the segment #4 starts at peak (7), drips down passing peak (9) and stops at peak (11), because the peak point (11) has greater magnitude (case c); the stress range Δσ = 110 – (-50) = 160 MPa.
• In the rainflow for valleys in Figure 7, the segment #1 starts at valley point (2) and terminates at (11) and beyond, as the rainflow falls all the way to the ground (case a). The stress range Δσ = 150 – (-150) = 300 MPa.
• The segments #2, #3, #4, #5 and #7 all meet a previous flow falling from above (case b). For segment #2, the stress range Δσ = 100 – (0) = 100 MPa; for segment #3, the stress range Δσ = 130 – (-120) = 250 MPa; for segment #4, the stress range Δσ = 110 – (-50) = 160 MPa; for segment #5, the stress range Δσ = 80 – (0) = 80 MPa
• The segments not mentioned are summarized in the tables below.

Figure 6:  Rainflow for peaks

Figure 7:  Rainflow for valleys

The calculations are summarized in the following tables. The half-cycles are matched.  A pair of matched half cycles (one peak, one valley) is counted as a full cycle (or 1 cycle); an unmatched half-cycle is counted as a half cycle (or 0.5 cycle).

The results are summarized in the following table.  Note that a half cycle is equivalent to 0.5 full cycle.

Watch the following video and see a similar but simplified approach. Once you are familiar with the principal of rainflow, you don’t have to rotate the time history. You can directly flow the rain from left to right.

The cycle counting results match those calculated in Fatigue+ software as shown below:

## ASTM E1049-85 (2017) Rainflow Counting Example

Figure 6: Rainflow Counting Example

The following is an example of Fatigue+ software.  The unit of the stresses is MPa.  The stress history is taken from FIG. 6 of ASTM E1049, Standard Practices for Cycle Counting in Fatigue Analysis, amplified by 10 times.