241
A P P E N D I X A
Samples of
MATLAB
®
Programs
A.1 THE H-L METHOD FOR EXAMPLE 3.11
% The H-L method for exmaple 3.11
% The Limit State function: g(Sy,Z,P,L)=Sy-P*L/(4Z)
% Input the distribution parameters mx-mean, sz-standard deviation
clear
mx=[6*10^5,10^(-4),10,8]; %The mean
sx=[10^5,2*10^(-5),2,2.083*10^(-2)]; % The standard deviation
beta=0; % Set beta=0
% Pick an initial design point x0(i)
for i=1:3
x0(i)=mx(i); % Use the mean for the first n-1 variable
end
% The last one x0(4) will be determined by using the limit state function
x0(4)=4*x0(1)*x0(2)/x0(3);
% Initial point in standard normal distribution space
for i=1:4
z0(i)=(x0(i)-mx(i))/sx(i);
end
% Start iterative process
for j=1:1000
% The Tylor series coefficent
G0(1)=sx(1)*1;
G0(2)=sx(2)*x0(3)*x0(4)/4/(x0(2))^2;
G0(3)=sx(3)*(-1)*x0(4)/4/x0(2);
G0(4)=sx(4)*(-1)*x0(3)/4/x0(2);
% Calculate the reliability index beta0
g00=0;
z00=0;
for i=1:4
242 A. SAMPLES OF MATLAB
®
PROGRAMS
g00=g00+G0(i)^2;
z00=z00+(-1)*z0(i)*G0(i);
end
Gi0=g00^0.5;
beta0=z00/Gi0;
% Store the data of iterative process
for i=1:4
ddp(j,i)=x0(i);
end
ddp(j,4+1)=beta0;
ddp(j,4+2)=abs(beta0-beta);
% New design point
% The values for the first n-1 are determined by the
% recurrence equation
for i=1:3
z1(i)=(-1)*beta0*G0(i)/Gi0;
x1(i)=sx(i)*z1(i)+mx(i);
end
% The value for the last variable will be determined
% by the limit state
% function
x1(4)=4*x1(1)*x1(2)/x1(3);
z1(4)=(x1(4)-mx(4))/sx(4);
% Check the convengence condition
if ddp(j,4+2)<=0.0001;
break
end
% Use new design point to replace previous design point
for i=1:4
z0(i)=z1(i);
x0(i)=x1(i);
end
beta=beta0;
end
% Calculate and display reliability
format short e
disp('reliability')
R=normcdf(beta0)
% Display iterative process and write it to Excel file
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset