Home > wafo > damage > cc2dam.m

cc2dam

PURPOSE ^

Calculates the total Palmgren-Miner damage of a cycle count.

SYNOPSIS ^

D=cc2dam(cc,beta,K)

DESCRIPTION ^

  CC2DAM   Calculates the total Palmgren-Miner damage of a cycle count.
 
  CALL: D = cc2dam(cc,beta,K);
  
    D    = Damage.                                            [1xm]
 
    cc   = Cycle count with minima in column 1 and            [nx2]
           maxima in column 2.
    beta = Beta-values, material parameter.                    [1xm]
    K    = K-value, material parameter. (Optional, Default: 1) [1x1]
 
  The damage is calculated according to
    D(i) = sum ( K * S^beta(i) ),  with  S = (max-min)/2
 
  Example:
    x = load('sea.dat'); TP=dat2tp(x); RFC=tp2rfc(TP); 
    bv = 3:8;
    D = cc2dam(RFC,bv); plot(bv,D,'x-')
 
  See also  cmat2dam

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function D=cc2dam(cc,beta,K)
002 % CC2DAM   Calculates the total Palmgren-Miner damage of a cycle count.
003 %
004 % CALL: D = cc2dam(cc,beta,K);
005 % 
006 %   D    = Damage.                                            [1xm]
007 %
008 %   cc   = Cycle count with minima in column 1 and            [nx2]
009 %          maxima in column 2.
010 %   beta = Beta-values, material parameter.                    [1xm]
011 %   K    = K-value, material parameter. (Optional, Default: 1) [1x1]
012 %
013 % The damage is calculated according to
014 %   D(i) = sum ( K * S^beta(i) ),  with  S = (max-min)/2
015 %
016 % Example:
017 %   x = load('sea.dat'); TP=dat2tp(x); RFC=tp2rfc(TP); 
018 %   bv = 3:8;
019 %   D = cc2dam(RFC,bv); plot(bv,D,'x-')
020 %
021 % See also  cmat2dam
022 
023 % Tested on Matlab 6.0
024 %
025 % History:
026 % Revised by PJ  01-Nov-1999
027 % - updated for WAFO
028 % Created by PJ (Pär Johannesson) 1997
029 %   from 'Toolbox: Rainflow Cycles for Switching Processes V.1.0'
030 
031 
032 % Check input and otput
033 
034 ni = nargin;
035 no = nargout;
036 error(nargchk(2,3,ni));
037 
038 if ni < 3
039   K=[];
040 end
041 
042 % Set default values
043 
044 if isempty(K)
045   K = 1;
046 end
047 
048 % Calculate damage
049 
050 amp = abs(cc(:,2)-cc(:,1))/2;
051 
052 n=length(beta); D=zeros(1,n);
053 for i=1:n
054   D(i)=K*sum(amp.^beta(i));
055 end
056 
057

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003