Research Article

An Analytical Solution for Predicting the Vibration-Fatigue-Life in Bimodal Random Processes

Algorithm 1

function Int_eq = Int_M_eq3  (L01, L02, m)
% MATLAB program for Eq. (38).
% L01 represent the zero-order spectral moment for spectra 1
% L02 represent the zero-order spectral moment for spectra 2
% m is fatigue strength exponent
error(nargchk(2,3,nargin))
if nargin < 3 || isempty(m)
   m = 0;
end
if m < 0
   Int_eq = ;
   Return
else
   if rem(m,1) > 0
      Int_eq = ;
      return
   end
end
I0 = sqrt(2*pi)/4+(pi/2-atan(sqrt(L02/L01)))/sqrt(2*pi);
I1 = 0.5 + sqrt(L01/(L01+L02))/2;
if m == 0
   Int_eq = I0;
   return
end
if m == 1
   Int_eq = I1;
   return
end
DoubFac_m = DoubleFactorial(m-1);
C1 = DoubFac_m * I1;
C2 = DoubFac_m * I0;
C3 = sqrt(L01/L02)/2/sqrt(2*pi);
C4 = sqrt(2 * L02/(L01+L02));
if mod(m,2)==1
   C5 = zeros((m+1)/2,1);
   for k = 2:1:(m+1)/2
        DoubFac_k = DoubleFactorial(2*k-2);
        C5(k) = C4(2*k-1) * gamma((2*k-1)/2)/DoubFac_k;
   end
   Int_eq = C1 + C3 * DoubFac_m * sum(C5);
else
   C5 = zeros(m/2,1);
   for k = 1:1:m/2
        DoubFac_k = DoubleFactorial(2*k-1);
        C5(k) = C4(2*k) * gamma(k)/DoubFac_k;
   end
   Int_eq = C2 + C3 * DoubFac_m * sum(C5);
end
return
%–subroutine for caculating double factorial.
function b = DoubleFactorial(a)
% a is a integral number.
b = 1;
for i = a:-2:1
     b = b*i;
end
return
%-end-