ITMKURS_LAB1 Script to computer exercises 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Analysis of Load Data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A Stochastic Load Process %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Measured data
Slice virkler.mat at a given crack length. | |
Calculates the amplitudes from a cycle count. | |
Calculates the total Palmgren-Miner damage of a cycle count. | |
Plots a cycle count as a point process in the plane. | |
Estimate one-sided spectral density from data. | |
Extracts turning points from data, | |
A program for visualization of cycle counts in random | |
Calculates the fatigue failure time distribution. | |
Slice virkler.mat at a given number of cycles. | |
Fatigue experiment, constant-amplitude loading. | |
Plots SN-data and estimates parameters | |
Calculates spectral moments from spectrum | |
Calculates the number of upcrossings from the turning points. | |
Calculates min2Max and Max2min cycles from a sequence of turning points | |
Finds the rainflow cycles from the sequence of turning points. | |
Plots data on a Normal distribution paper | |
Plot a spectral density |
001 %ITMKURS_LAB1 Script to computer exercises 1 002 % 003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 004 % 005 %%Analysis of Load Data 006 % 007 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 008 % A Stochastic Load Process 009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 010 % 011 %%Measured data 012 % 013 014 load deep.dat 015 x = deep; 016 plot(x(:,1),x(:,2)) 017 plot(x(1:1000,1),x(1:1000,2)) 018 019 020 T=x(end,1)-x(1,1); 021 022 whos 023 024 025 tp = dat2tp(x); 026 plot(x(:,1),x(:,2),tp(:,1),tp(:,2),'.-') 027 axis([0 100 -20 20]) 028 029 tp1 = dat2tp(x,1); 030 plot(x(:,1),x(:,2),tp(:,1),tp(:,2),tp1(:,1),tp1(:,2)) 031 axis([0 100 -20 20]) 032 033 034 lc = tp2lc(tp); 035 lc(:,2)=lc(:,2)/T; 036 plot(lc(:,1),lc(:,2)) 037 semilogx(lc(:,2),lc(:,1)) 038 039 040 m=mean(x(:,2)); 041 f0 = interp1(lc(:,1),lc(:,2),m,'linear'); 042 f0 043 044 045 046 extr0=length(tp)/2/T; 047 alfa=f0/extr0 048 049 % 050 %%Gaussian process as a model for the deep water data 051 % 052 053 054 wnormplot(x(:,2)) 055 056 057 058 S = dat2spec(deep); 059 wspecplot(S); 060 061 S 062 plot(S.w,S.S) 063 064 065 066 lam = spec2mom(S,4); L0=lam(1); L2=lam(2); L4=lam(3); 067 068 069 f0=1/(2*pi)*sqrt(L2/L0) 070 ux = -20:0.1:20; 071 ricex = f0*exp(-ux.*ux./(2*L0)); 072 plot(lc(:,1),lc(:,2),'-',ux,ricex,'--') 073 semilogx(lc(:,2),lc(:,1),'-',ricex,ux,'--') 074 075 076 077 078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 079 % Cycle counts 080 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 081 %--------------------- 082 %Cycle Counts 083 %--------------------- 084 085 proc = x(1:500,:); 086 democc 087 088 RFC = tp2rfc(tp); 089 mM = tp2mm(tp); 090 091 092 subplot(1,2,1), ccplot(RFC) 093 subplot(1,2,2), ccplot(mM) 094 095 096 ampRFC = cc2amp(RFC); 097 ampmM = cc2amp(mM); 098 subplot(1,2,1), hist(ampRFC) 099 subplot(1,2,2), hist(ampmM) 100 101 102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 103 % SN-data 104 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 105 % 106 %%Calculation of damage intensity} 107 % 108 109 beta=3.2; gam=5.5E-10; 110 d_beta=cc2dam(RFC,beta)/T; 111 time_fail=1/gam/d_beta/3600 %in hours of the specific storm 112 113 114 % 115 %%Additional exercises, Optional 116 % 117 118 load SN 119 120 plot(N,s,'o') 121 axis([0 14e5 5 35 ]) 122 loglog(N,s,'o') 123 124 125 wnormplot(reshape(log(N),8,5)) 126 127 128 [e0,beta0,s20] = snplot(s,N,12) 129 [e0,beta0,s20] = snplot(s,N,14) 130 e0 = 5.5361e-10 131 beta0 = 3.2286 132 s20 = 0.0604 133 134 % 135 %%Calculation of the 95\% quantile for the fatigue life time 136 % 137 %%Fatigue life distribution under variable random load 138 % 139 140 D0 = e0*cumsum((RFC(:,2)-RFC(:,1)).^beta0); 141 plot(D0) 142 143 144 beta = 3:0.1:8; 145 DRFC = cc2dam(RFC,beta); 146 dRFC = DRFC/T 147 plot(beta,dRFC) 148 149 150 help ftf 151 [t0,F0] = ftf(e0,cc2dam(RFC,beta0)/T,s20,0.5,1); 152 153 [t1,F1] = ftf(e0,cc2dam(RFC,beta0)/T,s20,0,1); 154 [t2,F2] = ftf(e0,cc2dam(RFC,beta0)/T,s20,5,1); 155 plot(t0,F0,t1,F1,t2,F2) 156 157 158 taRFC = exp(-1.96*sqrt(0.06))/e0./dRFC; 159 DmM = cc2dam(mM,beta); 160 dmM = DmM/T 161 tamM = exp(-1.96*sqrt(0.06))/e0./dmM; 162 plot(beta,taRFC,beta,tamM,'r') 163 164 % 165 %%Crack growth data} %%%%%%%%%%%%% 166 % 167 168 169 170 171 clear 172 load virkler 173 174 plot(v(:,2),v(:,1)) 175 176 177 plot(v(:,2:69),v(:,1),'b-') 178 179 180 181 N = alevel(v,15); 182 183 plot(N,ones(1,length(N)),'o') 184 185 a = nlevel(v,2e5); 186 plot(a,ones(1,length(a)),'o') 187 188 189
Comments or corrections to the WAFO group