Professional Documents
Culture Documents
A computer algorithm for rainflow cycle counting of very long stress histories is
presented. The procedure enables the rainflow counting to be performed without prior
knowledge of the whole stress history being analysed. The stress history can be read
and analysed by the computer one block at a time without reading the whole history
at once. This will enable small computers to analyse very long stress histories because
the length of one block can be adjusted to the computer capabilities. The algorithm
does not require any rearrangement of the stress history before the start of counting
and the peaks and troughs can be analysed as they were recorded in service.
Damage cumulation procedures are usually employed to trains do not contain any distinct, short repetitive blocks
estimate fatigue life of engineering components and stru- or segments.
tures. 1'2 These procedures allow the component life to be Procedures described in References 6 and 7 do not re-
related to the life of simple laboratory specimens tested under quire the entire load history to be known before the counting
constant stress amplitude. However, real structures usually process starts but the algorithm given in Reference 6 requires
experience an irregular stress history and therefore a cycle reading and analysing the stress history point by point. This
counting procedure has to be employed to decompose the was suitable for 'on-line' data processing s but it would be
complex irregular history into a series of simple events very time consuming and inconvenient if a long stress history
equivalent to individual cycles in a constant amplitude stress had to be read from a floppy disc or other external memory
history. The procedure called 'rainflow counting '1 has gained device. Very often the entire stress history which has to
wide recognition and it defines individual cycles as closed be counted cannot be read from the disc into the computer
stress/strain hysteresis loops. There are several algorithms at once because of limitations of the computer memory.
available to perform the counting 3'4 but most of them require Therefore it is more convenient to divide the stress history
that the entire load/stress history be known before the count- into blocks which can be read and analsyed at one time.
ing process starts. In addition, stress history has to be The results of the count are independent of block length.
rearranged before counting so that the absolute maximum The length of a 'block', NR, will depend on the maximum
in the history can be placed at the second and the last point length of the vector, S(N), which can be handled by the
in the history. This rearrangement is justified in the case computer. Not only will this reduce the number of readings
of stress histories with distinct and repetitive blocks which from the disc down to (NOP/NR + 1) times and therefore
are relatively short, as happens in the case of earth moving reduce the computing time, but also the stress history need
and lifting machines) However, the characteristic stress not be known or rearranged before the counting starts.
histories of offshore structures and some elements of railway Therefore it allows computation to be conducted on small
" V
G
ii Time ABS(F- E)>ABS(E- D)
I
2. Calculate DS=X=ABS(E - D)
b SM = (E+D)/2
3. Discard reversal 'D- E'
4
B B A 2. Check relation Y ~ X starting from element F
- ^ ~ ? \ / \ I ABS(F- C)>ABS(C- B)
~ 2 ,, 3. Calculate DS=ABS(C-B)
SM = (C+B)/2
0
-2
A A V Time
4. Discard reversal 'B-C'
C G
B
^ ,A
F
H ] 1. Shift element A forward by two places
I \ 2. Check relationY /> X starting from element H
~ 2 / \ I \
ABS(H- G)<ABS(G- F)
/ \1 I
0 v ABS(I- H)<ABS(H- G) and N=NR
T I
Time
-2
d G I
NR ~j
. Move elements A,F,G,H,I to the beginning of
vector S(N) and read further data from the file
6 until 'NR' elements are found in vector S(N)
4 J ~ k . Check relation Y/> X starting from element H
until it is true
P 2 ABS(M- L)>ABS(L-- K)
i
0 3. Calculate DS=ABS(L- K)
Time SM=(L+K)/2
-2
e G M 4. Discard reversal 'K- L'
F F F
1. Shift elements A through H forward by two
places
4
2
,,' '\ ,,' ", / %::::ii::Ti::ii;i~i7
2. Check relation Y ~> X starting from element M
ABS(M- H)>ABS(H- G)
F F F F
6
l
'
~
/\ l
1. Shift elements A,F forward by two places
4
ii ~ I ~ I 2. ( N - N I ) < 3 a n d N=NR
P
2 lI ~ I 3. Read in next block of elements until I I=NEND
0
A A Time
h -2
M
F N'
6 ~::~.,~..~
1, Close the last loop N'=F
4. .~i~.~..::::~.
m 4 2. Check relation Y >/ X starting from element N'
P
2 ::~.,'.~..-..'
3. Calculate DS=ABS(N'--M), SM=(N'+M)/2
0 4. Discard reversal 'M- N'
Time
-2
M
F F=N'
6
4-
A A 1. Shift elements A,F forward by two places
P
2-
i",/\ 2. N - N l < 3 a n d N = N R a n d II=NEND
3. STOP
0 " V\
--2--
A A \ Time
P
computers because the length of block, NR, can be chosen E, F, G . . . corresponding to the S(1), S(2), S(3), S(4), S(5),
according to computer capability while there is no limitation S(6), S(7)... elements of the vector S(N) in the computer
on the length, NOP, of the stress history to be analysed. memory. The range under consideration is represented by
Y. Thus for N -- 6 the range Y will be calculated as (Fig. la)"
Basic rules and n o t a t i o n
Let the peaks and troughs be identified as A, B, C, D, Y = ABS ( S ( N ) - S ( N - 1 ) ) = ABS(F-E) (1)
PROGRAM RAINFLOW--COUNTING
DIMENSION S(4001 ) IDECLARATION
READ(5,') NSTART, N EN D,N R IREAD IN CONTROL PARAMETERS
NOP = NEND - NSTART + 1 IINITIATION
NP = NSTART
I = NSTART
II = NSTART + N R - 1
IF(II .GT. NEND) II=NEND
K=I
100 OPEN (U NIT = 10,FI LE = 'LOAD.S PL',ACCESS = 'DIR ECT',RECL-- 1,TYPE = 'OLD')
IREC= I IREAD IN ONE BLOCK
110 READ(10'IREC)S(K)
IF (IREC .LT. II) THEN
IREC=IREC+I
K=K+I
GOTO 110
ENDIF
CLOSE(UNIT= 10)
IF (I .EQ. NSTART) THEN 1FIRST POINT GENERATION
IF ( S ( 1 ) / ( S ( 2 ) - S ( 1 ) ) ) 120,130,130
120 DO J1 = NR,1,- 1
S(J1 + 1 )S(J1 )
END DO
NR=NR+I
NP = NSTART- 1
C
130 s(1)=o.
ENDIF
NI=I ICOUNTING STARTS
N=4
140 IF((N-NI) .LT. 3) GOTO 180
IF(II .EQ. NEND .AND. N .EQ. K) THEN IFINAL CYCLE
IF(S(2)/(S(N) - (N-1)))150,160,160
150 S(N-1) =S(N-3)
N=N°I
GOTO 140
160 S(N) = S(N-2)
END IF
170 IF(ABS(S(N)-S(N-1)) .GE. ABS(S(N-1)-S(N-2))) GOTO 190
180 N=N+I
IF(NP+ N - l ) .GT. II) THEN 1NEXT PEAK
GOTO 210
ELSE
GOTO 140
END IF
190 DS = ABS(S(N-1)-S(N-2)) IOUTPUT GATEWAY
SM = (S(N-1) + S(N-2))/2.
WRITE(6,1000) DS,SM
1000 FORMAT(5X,'Stress range = ',F10.5,' Mean Stress --',F10.5)
NI = NI + 2 !NEXT RANGE
DO 200 L = I , N - N I
S(N-1) = S(N-2-L)
200 CONTINUE
GOTO 140
210 IF(II .GE. NEND) GOTO 230 ISHIFTING THE REMAINING
DO 220 J = 1, N-NI-1 I PEAKSIN THE BLOCK
S(J+I)=S(NI+J)
220 CONTINUE
NP=NP+NI-1 INEXT SET OF DATA
I=11+1
II=II+NI-1
IF(II .GT. NEND) II=NEND
K=NR-NI+2
GOTO 100
230 CONTINUE
STOP
END 1END