Rainflow Counting Visualizer

Rainflow counting turns an irregular load history into a set of cycles that can be fed into Miner's rule and a fatigue life calculation. This visualizer shows the original Matsuishi–Endo "pagoda roof" picture in action: the history is rotated so time runs downward, rain is released at every reversal, and where each flow stops defines a half cycle. Step through your own load history and verify the result against the ASTM-style algorithm.

Pagoda roof — stress across, time downward

Half cycles found so far

Counted cycles — pagoda vs ASTM-style algorithm

The two columns agree — the geometric rain rules and the three-point stack algorithm are the same counting method in different clothes. The total number of half cycles always equals the number of reversals minus one.

The pagoda roof rules

Rotate the load history a quarter turn so that time flows downward: every segment between two reversals becomes a sloped pagoda roof. Rain is released at the inside of every reversal, in order, and obeys four rules:

  1. R1 — the rain runs down its roof, drips off the edge, falls vertically, and lands on the next roof below that crosses its path, where it continues.
  2. R2 — the rain stops when it falls opposite a reversal of the same sense that is at least as extreme as its starting point (a deeper valley for rain that started at a valley; a higher peak for rain that started at a peak).
  3. R3 — the rain stops when it meets rain dripping from a roof above.
  4. R4 — the rain stops at the end of the record.

Each flow is a half cycle whose range is the horizontal (stress) distance it covered. Two half cycles of equal range in opposite directions pair into one full cycle; what cannot be paired remains as residual half cycles. The physical motivation: each paired cycle corresponds to a closed hysteresis loop in the material's stress-strain response, which is what actually accumulates fatigue damage.

The same result is obtained — without any geometry — by the three-point comparison algorithm standardised in ASTM E1049, which is what fatigue software implements. The visualizer runs both and shows that they agree.

The counted cycles, each with a range and a mean, feed Miner's rule together with a life calculation per cycle — for notched components typically the strain-life method, where each rainflow cycle is analysed through Neuber's rule.

Input handling: the visualizer reduces your input to its turning points automatically — intermediate points that are not reversals, repeated values, and non-numeric tokens are ignored.

This visualizer is provided for educational purposes and accompanies our course Introduction to Fatigue Calculations with FEA.