makeup problem solution
DESCRIPTION
reliability problemTRANSCRIPT
Phong Nguyen Structural Reliability_Makeup Problem 1
Part I: My own Problem
Question 1:
a. Euler Bernoulli Beam Theory
The limit state function:
No. Iteration Variables Variable values gradients Direction
cosinesReliability
index
1X1 150000000 0.0003522 0.0865
3.35268X2 70000000 0.0004537 0.1115X3 12 -0.0040297 -0.9900
2X1 147824249.912 0.0006654 0.1569
3.32944X2 68691956.555 0.0008603 0.2029X3 21.9574 -0.0040988 -0.9666
3X1 146081907.58 0.0006735 0.1566
3.32944X2 67635876.107 0.0008736 0.2031X3 21.654 -0.0041562 -0.9665
4X1 146088824.86 0.0006735 0.1566
3.32944X2 67632683.595 0.0008736 0.2032X3 21.654 -0.0041562 -0.9665
Probability of failure (AFOSM): pf=Φ (−3.32944 )=4.351 x 10−4
Phong Nguyen Structural Reliability_Makeup Problem 2
Monte Carlo Simulation: pf=4.432 x10−4 ;COV=11%
b. Timoshenko beam theory
The limit state function:
No. Iteration Variables Variable values gradients Direction
cosinesReliability
index
1
X1 150000000 0.000355 0.0866
3.29522X2 70000000 0.000457 0.1114X3 12 -0.004062 -0.9900X4 0.3 -1.66e-006 -0.0004
2
X1 147859795.967 0.000666 0.1559
3.27315X2 68715182.459 0.00086 0.2012X3 21.7868 -0.00413 -0.9671X4 0.3 -3.06e-006 -0.0007
3
X1 146173844.533 0.000674 0.1556
3.27315X2 67694908.156 0.000872 0.2015X3 21.496 -0.004187 -0.9671X4 0.3 -3.06e-006 -0.0007
4
X1 146180296.405 0.000674 0.1556
3.27315X2 67691930.201 0.000872 0.2015X3 21.496 -0.004187 -0.9671X4 0.3 -3.06e-006 -0.0007
Probability of failure: pf=Φ (−3.27315 )=5.318 x10−4
Monte Carlo Simulation: pf=5.408 x10−4 ;COV=10.61%
Phong Nguyen Structural Reliability_Makeup Problem 3
Question 2:
The limit state function:
No. Iteration Variables Variable values gradients Direction
consines
Limit state
function
1
X1 150000000 -0.11217 -0.3843
0.911917X2 70000000 -0.14503 -0.4969X3 3400 0.01983 0.0680X4 2702 0.03161 0.1083X5 16 0.224 0.7675
2
X1 159005711.73 -0.10947 -0.3797
0.00569X2 75434182.099 -0.13955 -0.4840X3 3392.781 0.020606 0.0715X4 2692.857 0.032834 0.1139X5 15.233 0.224 0.7769
3
X1 158951699.254 -0.109475 -0.3796
2.2444e-6X2 75325284.135 -0.139688 -0.4844X3 3392.361 0.020601 0.0714X4 2692.327 0.032827 0.1138X5 15.218 0.224 0.7767
4
X1 158949909.436 -0.109477 -0.3796
3.2901e-9X2 75329300.95 -0.139683 -0.4843X3 3392.365 0.020601 0.0714X4 2692.331 0.032827 0.1138X5 15.218 0.224 0.7767
At design point:
Phong Nguyen Structural Reliability_Makeup Problem 4
Probability of failure: pf=Φ (−3.14369 )=8.341 x 10−4
Monte Carlo Simulation: pf=8.07 x10−4 ;COV=10.9%
Question 3:
a. Euler Bernoulli Beam Theory
The limit state function:
At design point:
Probability of failure: pf=Φ (−3.32204 )=4.4681 x 10−4
Omission sensitivity factor: b. Timoshenko beam theory
The limit state function:
At design point:
Phong Nguyen Structural Reliability_Makeup Problem 5
Probability of failure: pf=Φ (−3.26592 )=5.4555 x 10−4
Omission sensitivity factor:
Code Matlab:
Q.1
Bernoulli beam:
%% Use AFOSM to calculate probability of failure.% Limit state function: g=L/360-5*A*W*L^4/(384*(AD-B^2));syms betav x1 x2 x3 x4syms z lamdaformat long%% Inputb=0.2; h=0.5; L=12;p=2;muy=[150e6; 70e6; 12]; %Mean values of Ec,Em and Wcov=[0.05; 0.05; 0.25]; % coefficients of variantion of Ec,Em and W.xichma=cov.*muy; % Standard deviation.%%J1=int((z/h+0.5)^p,z,-h/2,h/2);J2=int(z*(z/h+0.5)^p,z,-h/2,h/2);J3=int(z^2*(z/h+0.5)^p,z,-h/2,h/2);AA=b*(x1-x2)*J1+x2*b*h;BB=b*(x1-x2)*J2;DD=b*(x1-x2)*J3+x2*b*h^3/12; gg=L/400-5/384*AA*x3*L^4/(AA*DD-BB^2);g1=diff(gg,x1);g2=diff(gg,x2);g3=diff(gg,x3); beta_trial=3; % guessed value of raliability index;tolerance=10^-7; % interation error.itermax=50; % the maximum number of iterationx0=muy; % Guessed valueser=1;i=1;
Phong Nguyen Structural Reliability_Makeup Problem 6
while er > tolerance beta(i)=beta_trial; x(:,i)=x0; g(1,i)=subs(g1,{x1,x2,x3},{x(1,i),x(2,i),x(3,i)}); g(2,i)=subs(g2,{x1,x2,x3},{x(1,i),x(2,i),x(3,i)}); g(3,i)=subs(g3,{x1,x2,x3},{x(1,i),x(2,i),x(3,i)}); grad(:,i)=g(:,i).*xichma; %Gradients in new coordinate system anpha(:,i)=grad(:,i)/sqrt(sum(grad(:,i).^2)); xnew(:,i)=muy-betav*anpha(:,i).*xichma; A=b*(xnew(1,i)-xnew(2,i))*J1+xnew(2,i)*b*h; B=b*(xnew(1,i)-xnew(2,i))*J2; D=b*(xnew(1,i)-xnew(2,i))*J3+xnew(2,i)*b*h^3/12; gbeta=L/400-5/384*A*xnew(3,i)*L^4/(A*D-B^2); betar=(double(solve(gbeta,betav))); %solve reliability index x0=muy-min(betar(betar>0))*anpha(:,i).*xichma; er=abs((min(betar(betar>0))-beta(i))); % error of reliability index beta_trial=min(betar(betar>0)); betaf(i)=min(betar(betar>0)); i=i+1; if i>itermax, break, endendpf=normcdf(-betaf);
Timoshenko Beam:
%% Use AFOSM to calculate probability of failure.% Limit state function: g=L/400-[(AD-B^2)pi^2/L^2+AH]W/[H(AD-B^2)pi^4/L^4];syms betav x1 x2 x3 x4syms zformat long%% Inputb=0.2; h=0.5; L=12;p=2;muy=[150e6; 70e6; 12; 0.3]; %Mean values of Ec,Em and W, poison ratiocov=[0.05; 0.05; 0.25; 0.1]; % coefficients of variantion of Ec, Em, W, poison ratio.xichma=cov.*muy; % Standard deviation.%%J1=double(int((z/h+0.5)^p,z,-h/2,h/2));J2=double(int(z*(z/h+0.5)^p,z,-h/2,h/2));J3=double(int(z^2*(z/h+0.5)^p,z,-h/2,h/2));AA=b*(x1-x2)*J1+x2*b*h;BB=b*(x1-x2)*J2;DD=b*(x1-x2)*J3+x2*b*h^3/12;HH=(5/12)*AA/(1+x4); gg=L/400-1.273*((AA*DD-BB^2)*pi^2/L^2+AA*HH)*x3/(HH*(AA*DD-BB^2)*pi^4/L^4);g1=diff(gg,x1);g2=diff(gg,x2);g3=diff(gg,x3);g4=diff(gg,x4); beta_trial=3; % guessed value of raliability index;
Phong Nguyen Structural Reliability_Makeup Problem 7
tolerance=10^-7; % interation error.itermax=10; % the maximum number of iterationx0=muy; % Guessed valueser=1;i=1;iternum=5;for i=1:iternum beta(i)=beta_trial; x(:,i)=x0; g(1,i)=subs(g1,{x1,x2,x3,x4},{x(1,i),x(2,i),x(3,i),x(4,i)}); g(2,i)=subs(g2,{x1,x2,x3,x4},{x(1,i),x(2,i),x(3,i),x(4,i)}); g(3,i)=subs(g3,{x1,x2,x3,x4},{x(1,i),x(2,i),x(3,i),x(4,i)}); g(4,i)=subs(g4,{x1,x2,x3,x4},{x(1,i),x(2,i),x(3,i),x(4,i)}); grad(:,i)=g(:,i).*xichma; %Gradients in new coordinate system anpha(:,i)=(grad(:,i)/sqrt(sum(grad(:,i).^2))); xnew(:,i)=muy-betav*anpha(:,i).*xichma; A=b*(xnew(1,i)-xnew(2,i))*J1+xnew(2,i)*b*h; B=b*(xnew(1,i)-xnew(2,i))*J2; D=b*(xnew(1,i)-xnew(2,i))*J3+xnew(2,i)*b*h^3/12; H=(5/12)*A/(1+xnew(4,i)); gbeta=L/400-1.273*((A*D-B^2)*pi^2/L^2+A*H)*xnew(3,i)/(H*(A*D- B^2)*pi^4/L^4); %limit state function in term of beta betar=(double(solve(gbeta,betav))); %solve reliability index betaf(i)=min(betar(betar>0)); x0=muy-min(betar(betar>0))*anpha(:,i).*xichma; er=abs((min(betar(betar>0))-beta(i))); % error of reliability index beta_trial=min(betar(betar>0)); endpf=normcdf(-betaf)
Q2.
%% Use New FOSM (Rackwitz-Fiessler algorithm) to calculate probability of failure.% Limit state function: g=L/360-5*A*W*L^4/(384*(AD-B^2));syms x1 x2 x3 x4 x5syms z lamdaformat long%% Inputb=0.2; h=0.5; L=5;p=2;muy=[150e6; 70e6; 3400; 2702; 16]; %Mean values of Ec,Em and pro_c, pro_m, omega_pcov=[0.05; 0.05; 0.01; 0.01; 0.02]; xichma=cov.*muy; % Standard deviation.%%
omega=1/14073748835532800*(-318954283212249450785993520220890*x3*x1-...636365057765537158911562306801735*x4*x1-636365057765537159064790073939380*x3*x2-...1269643098213150832808730680598670*x4*x2-1228285163894519192601457852416*x1*pi*x4-...1228285163894519192601457852416*x2*pi*x3+1228285163894519192601457852416*x2*pi*x4+...1228285163894519192601457852416*x1*pi*x3+...(-775950152915851682223433388725080334688732732710789356705546240*x3*x1*x2*pi*x4-...16897265771045921223758890041058086220520378114626105114624000*x1*pi^2*x4*x2*x3+...
Phong Nguyen Structural Reliability_Makeup Problem 8
7241685330448251953039524303310608380223019191982616477696000*x2^2*pi^2*x4^2+...8448632885522960611879445020529043110260189057313052557312000*x1*pi^2*x4^2*x2-...4827790220298834635359682868873738920148679461321744318464000*x1^2*pi^2*x4*x3-...14483370660896503906079048606621216760446038383965232955392000*x2^2*pi^2*x3*x4+...8448632885522960611879445020529043110260189057313052557312000*x2*pi^2*x3^2*x1+...7241685330448251953039524303310608380223019191982616477696000*x2^2*pi^2*x3^2-...779741890488142549074641931811401211393656294625276146525143040*x3*x1^2*pi*x4-...779741890488142549451056717955108233004107098497169948860743680*x3^2*x1*x2*pi+...1555692043403994231674490106680188567692839831207959305566289920*x4^2*x1*x2*pi+...1555692043403994231298075320536481546082389027336065503230689280*x3*x2^2*pi*x4+...100269203199468442259909210601902412590826076443469454441841148324*x3^2*x1^2+...399124254938931626098556067158630038575772652424994550311433368497*x4^2*x1^2+...395697153405116644263726859407719954223026314952595292554505684624*x3^2*x2^2+...1575030795402264382586435519595857903740975375801713688692324159172*x4^2*x2^2+...400099342658912552630490858778316650734268010539283991101585179884*x3*x1^2*x4+...387416055042219638950286615584330611099178246227970242231882679952*x3^2*x1*x2+...1541987404196006217152221930754029771503291352424995231110601756356*x4^2*x1*x2+...1578904939673404900066249094594156085375458443565438657703918244784*x3*x2^2*x4+...1545821047344481806722261812526463333008920294427829328267811034032*x3*x1*x4*x2+...2413895110149417317679841434436869460074339730660872159232000*x1^2*pi^2*x3^2-...783533628060433416302265261041429109709030660411656738680340480*x3^2*x1^2*pi+...1563275518548575965376907192852830321102686955036932885205483520*x4^2*x1^2*pi+...1563275518548575965753321978996537342713137758908826687541084160*x3^2*x2^2*pi-...3118967561952570197051397299533018888795526786244892190771773440*x4^2*x2^2*pi+...2413895110149417317679841434436869460074339730660872159232000*x1^2*pi^2*x4^2)^(1/2))/...(-113701209351838406*x3^2-454249228073565621*x3*x4-453693618739777618*x4^2+70368744177664*pi^2*x3^2-...140737488355328*pi^2*x3*x4+70368744177664*pi^2*x4^2); ggg=0.7*x5-omega^0.5;g1=diff(ggg,x1);g2=diff(ggg,x2);g3=diff(ggg,x3);g4=diff(ggg,x4);g5=diff(ggg,x5);beta_trial=3; % guessed value of raliability index;tolerance=10^-9; % interation error.itermax=5; % the maximum number of iterationx0=muy; % Guessed valueser=1;i=1;while er > tolerance x(:,i)=x0; u(:,i)=(x(:,i)-muy)./xichma; gg=double(subs(ggg,{x1,x2,x3,x4,x5},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i)}));g(1,i)=double(subs(g1,{x1,x2,x3,x4,x5},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i)})); g(2,i)=double(subs(g2,{x1,x2,x3,x4,x5},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i)})); g(3,i)=double(subs(g3,{x1,x2,x3,x4,x5},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i)})); g(4,i)=double(subs(g4,{x1,x2,x3,x4,x5},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i)})); g(5,i)=double(subs(g5,{x1,x2,x3,x4,x5},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i)})); grad(:,i)=g(:,i).*xichma; %Gradients in new coordinate system anpha(:,i)=double(grad(:,i)/sqrt(sum(grad(:,i).^2))); u(:,i+1)=((grad(:,i)'*u(:,i)-gg)/(grad(:,i)'*grad(:,i)))*grad(:,i);
Phong Nguyen Structural Reliability_Makeup Problem 9
x0=u(:,i+1).*xichma + muy; %neu design point in original coordinate er=abs(double((subs(ggg,{x1,x2,x3,x4,x5},{x0(1),x0(2),x0(3),x0(4),x0(5)})))); beta=sqrt(u(:,i+1)'*u(:,i+1)); betaf(i)=beta; i=i+1; if i>itermax, break, endendnormcdf(-betaf);
Part II: Lim’s Problem
Question 1:
The limit state function:
At design point:
; ;
Probability of failure: pf=Φ (−1.6111 )=0.05358
Question 2:
Phong Nguyen Structural Reliability_Makeup Problem 10
Order of importance of random variables:
1 2 4 7 7 6 5 3
Question 3: probability of failure for different values of
100 150 200 250 300pf 0.0005215 0.00824 0.05358 0.17649 0.367475
We can see that The probability of failure increases rapidly when fs increases.
Figure 1: probability of failure for different values of fs
Code Matlab:
%% Use New FOSM (Rackwitz-Fiessler algorithm) to calculate probability of failure.% Limit state function: g=1.57*wc*sqrt(db1)/(k*beta*sqrt(s1*s2*dc))-c*fs;% db1,c are lognormal, others are normal.syms x1 x2 x3 x4 x5 x6 x7 x8 % wc,k,beta,s1,s2,dc,db1,cformat long%% Inputmuy=[0.35; 2.1e-5; 1.25; 80; 80; 25; 40; 1]; %Mean valuescov=[0.2; 0.15; 0.1; 0.05; 0.05; 0.06; 0.1; 0.11]; % coefficients of variantion.xichma=cov.*muy; % Standard deviation.fs=200;%% LogNormal Parameter Transformation for db1 & cshape7 = log( (muy(7)^2) / sqrt(muy(7)^2 + xichma(7)^2));
Phong Nguyen Structural Reliability_Makeup Problem 11
scale7 = sqrt(log((cov(7))^2 + 1));shape8 = log( (muy(8)^2) / sqrt(muy(8)^2 + xichma(8)^2));scale8 = sqrt(log((cov(8))^2 + 1)); %% Limit state function and its derivativesggg=1.57*x1*sqrt(x7)/(x2*x3*sqrt(x4*x5*x6))-x8*fs;g1=diff(ggg,x1);g2=diff(ggg,x2);g3=diff(ggg,x3);g4=diff(ggg,x4);g5=diff(ggg,x5);g6=diff(ggg,x6);g7=diff(ggg,x7);g8=diff(ggg,x8); beta_trial=5; % guessed value of raliability index;tolerance=10^-9; % interation error.itermax=20; % the maximum number of iterationx0=muy; % Guessed valueser=1;i=1; while er > tolerance x(:,i)=x0; % values in original coordinate system %% Transform from Lognormal to Equivalent Normal for x7 & x8 xichma7=x(7,i)*scale7; muy7=x(7,i)*(1-log(x(7,i))+shape7); xichma8=x(8,i)*scale8; muy8=x(8,i)*(1-log(x(8,i))+shape8); muy(7)=muy7; xichma(7)=xichma7; muy(8)=muy8; xichma(8)=xichma8; u(:,i)=(x(:,i)-muy)./xichma; % values in new coordinate system %% check limit state function and its derivatives gg=double(1.57*x(1,i)*sqrt(x(7,i))/(x(2,i)*x(3,i)*sqrt(x(4,i)*x(5,i)*x(6,i)))-x(8,i)*fs); g(1,i)=double(subs(g1,{x1,x2,x3,x4,x5,x6,x7,x8},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i),x(7,i),x(8,i)})); %Gradients in original coordinate system g(2,i)=double(subs(g2,{x1,x2,x3,x4,x5,x6,x7,x8},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i),x(7,i),x(8,i)})); g(3,i)=double(subs(g3,{x1,x2,x3,x4,x5,x6,x7,x8},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i),x(7,i),x(8,i)})); g(4,i)=double(subs(g4,{x1,x2,x3,x4,x5,x6,x7,x8},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i),x(7,i),x(8,i)})); g(5,i)=double(subs(g5,{x1,x2,x3,x4,x5,x6,x7,x8},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i),x(7,i),x(8,i)})); g(6,i)=double(subs(g6,{x1,x2,x3,x4,x5,x6,x7,x8},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i),x(7,i),x(8,i)})); g(7,i)=double(subs(g7,{x1,x2,x3,x4,x5,x6,x7,x8},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i),x(7,i),x(8,i)})); g(8,i)=double(subs(g8,{x1,x2,x3,x4,x5,x6,x7,x8},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i),x(7,i),x(8,i)}));
Phong Nguyen Structural Reliability_Makeup Problem 12
grad(:,i)=g(:,i).*xichma; anpha(:,i)=grad(:,i)/sqrt(sum(grad(:,i).^2)); u(:,i+1)=((grad(:,i)'*u(:,i)-gg)/(grad(:,i)'*grad(:,i)))*grad(:,i); x0=u(:,i+1).*xichma + muy; er(i)=abs(1.57*x0(1)*sqrt(x0(7))/(x0(2)*x0(3)*sqrt(x0(4)*x0(5)*x0(6)))-x0(8)*fs); beta=sqrt(u(:,i+1)'*u(:,i+1)); betaf(i)=beta; i=i+1; if er<tolerance, break,endendpf=normcdf(-betaf);Part III: Morsy’s Problem
The limit state function:
Probability of failure for 2 elevations z
Z=2 ft Z=6 ftMethods MCS FORM SORM MCS FORM SORM
pf 0.00382 0.00441 0.00391 0.179095 0.194765 0.18619
The results obtained from second-order reliability method (SORM) are closer to Monte Carlo simulation than FORM.
At the design point (z=2 ft):
; ;
Phong Nguyen Structural Reliability_Makeup Problem 13
Order of importance of random variables:
5 6 3 1 4 2
Code:
%% Use New FORM (Rackwitz-Fiessler algorithm) and SORM (second-order) to calculate probability of failure.% Limit state function: g=(Tult/RF)-tan(45-phi/2)*(K/Ka)*[gama*z+qrb+qt+(qb+qll)/pi*(anpha1+sin(anpha1)*cos(anpha1+2*beta1))]*sv;% qll is exponential; qt,phi are lognormal; others are normalsyms x1 x2 x3 x4 x5 x6 % qt,qll,phi,K/Ka,Tult,RFformat long%% Inputmuy=[400; 2400; pi/6; 1; 2800; 5]; %Mean valuesvarr=[40; 240; pi^2/60/180; 0.1; 280; 0.5]; % coefficients of variantion.xichma=sqrt(varr) ; % Standard deviation.cov=xichma./muy;sv=8/12; b=2; ab=2; gama=110; qrb=300; qb=1600;z=6;beta1=atan(ab/z); anpha1=atan((b+ab)/z)-beta1;%% LogNormal Parameter Transformation for qt, qll & phishape1 = log( (muy(1)^2) / sqrt(muy(1)^2 + xichma(1)^2));scale1 = sqrt(log((cov(1))^2 + 1));shape2 = log( (muy(2)^2) / sqrt(muy(2)^2 + xichma(2)^2));scale2 = sqrt(log((cov(2))^2 + 1));shape3 = log( (muy(3)^2) / sqrt(muy(3)^2 + xichma(3)^2));scale3 = sqrt(log((cov(3))^2 + 1)); %% Limit state function and first derivativesggg=x5/x6-(tan(45*pi/180-x3/2))^2*x4*(gama*z+qrb+x1+(qb+x2)/pi*(anpha1+sin(anpha1)*cos(anpha1+2*beta1)))*sv;g1=diff(ggg,x1);g2=diff(ggg,x2);g3=diff(ggg,x3);g4=diff(ggg,x4);g5=diff(ggg,x5);g6=diff(ggg,x6); %% second derivativesg11=diff(g1,x1); g12=diff(g1,x2);g13=diff(g1,x3);g14=diff(g1,x4);g15=diff(g1,x5);g16=diff(g1,x6);g22=diff(g2,x2); g23=diff(g2,x3);g24=diff(g2,x4);g25=diff(g2,x5);g26=diff(g2,x6);g33=diff(g3,x3); g34=diff(g3,x4); g35=diff(g3,x5); g36=diff(g3,x6);g44=diff(g4,x4); g45=diff(g4,x5); g46=diff(g4,x6);g55=diff(g5,x5); g56=diff(g5,x6);g66=diff(g6,x6); %% FORMbeta_trial=5; % guessed value of raliability index;tolerance=10^-7; % interation error.
Phong Nguyen Structural Reliability_Makeup Problem 14
itermax=20; % the maximum number of iterationx0=muy; % Guessed valueser=1;i=1; while er > tolerance x(:,i)=x0; % values in original coordinate system %% Transform from Lognormal (x1, x2 & x3) to Equivalent Normal xichma1=x(1,i)*scale1; muy1=x(1,i)*(1-log(x(1,i))+shape1); xichma2=x(2,i)*scale2; muy2=x(2,i)*(1-log(x(2,i))+shape2); xichma3=x(3,i)*scale3; muy3=x(3,i)*(1-log(x(3,i))+shape3); muy(1)=muy1; xichma(1)=xichma1; muy(2)=muy2; xichma(2)=xichma2; muy(3)=muy3; xichma(3)=xichma3; u(:,i)=(x(:,i)-muy)./xichma; % values in new coordinate system %% check limit state function and its derivatives gg=double(subs(ggg,{x1,x2,x3,x4,x5,x6},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i)})); g(1,i)=double(subs(g1,{x1,x2,x3,x4,x5,x6},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i)})); g(2,i)=double(subs(g2,{x1,x2,x3,x4,x5,x6},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i)})); g(3,i)=double(subs(g3,{x1,x2,x3,x4,x5,x6},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i)})); g(4,i)=double(subs(g4,{x1,x2,x3,x4,x5,x6},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i)})); g(5,i)=double(subs(g5,{x1,x2,x3,x4,x5,x6},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i)})); g(6,i)=double(subs(g6,{x1,x2,x3,x4,x5,x6},{x(1,i),x(2,i),x(3,i),x(4,i),x(5,i),x(6,i)})); grad(:,i)=g(:,i).*xichma; %Gradients in new coordinate system anpha(:,i)=grad(:,i)/sqrt(sum(grad(:,i).^2)); anpha2=grad(:,i)/sqrt(sum(grad(:,i).^2)); % use form SORM u(:,i+1)=((grad(:,i)'*u(:,i)-gg)/(grad(:,i)'*grad(:,i)))*grad(:,i); x0=u(:,i+1).*xichma + muy; %neu design point in original coordinate er(i)=abs(x0(5)/x0(6)-(tan(45*pi/180-x0(3)/2))^2*x0(4)*(gama*z+qrb+x0(1)+(qb+x0(2))/pi*(anpha1+sin(anpha1)*cos(anpha1+2*beta1)))*sv); beta=sqrt(u(:,i+1)'*u(:,i+1)); gradd=grad(:,i); %% use for SORM betaf(i)=beta; i=i+1; if er<tolerance, break,endend %% Second-order reliability method (SORM);%% formulate matrix Rr0=[1 0 0 0 0 0;0 1 0 0 0 0;0 0 1 0 0 0;0 0 0 1 0 0;0 0 0 0 1 0;anpha2'];
Phong Nguyen Structural Reliability_Makeup Problem 15
%% Gram-Schmidt Orthogonalizationfor ii=5:-1:1 rr=zeros(1,6); for jj=ii+1:6 rr=rr+(r0(jj,:)*r0(ii,:)')/(r0(jj,:)*r0(jj,:)')*r0(jj,:); end r0(ii,:)=r0(ii,:)-rr;endr=r0;for j=1:6 r(j,:)=r(j,:)./sqrt(sum(r(j,:).^2));end%% Formulate matrix D%% Second derivativesd11=double(subs(g11,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(1)*xichma(1);d12=double(subs(g12,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(1)*xichma(2);d13=double(subs(g13,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(1)*xichma(3);d14=double(subs(g14,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(1)*xichma(4);d15=double(subs(g15,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(1)*xichma(5);d16=double(subs(g16,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(1)*xichma(6); d22=double(subs(g22,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(2)*xichma(2);d23=double(subs(g23,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(2)*xichma(3);d24=double(subs(g24,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(2)*xichma(4);d25=double(subs(g25,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(2)*xichma(5);d26=double(subs(g26,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(2)*xichma(6); d33=double(subs(g33,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(3)*xichma(3);d34=double(subs(g34,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(3)*xichma(4);d35=double(subs(g35,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(3)*xichma(5);d36=double(subs(g36,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(3)*xichma(6); d44=double(subs(g44,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(4)*xichma(4);d45=double(subs(g45,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(4)*xichma(5);d46=double(subs(g46,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(4)*xichma(6); d55=double(subs(g55,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(5)*xichma(5);
Phong Nguyen Structural Reliability_Makeup Problem 16
d56=double(subs(g56,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(5)*xichma(6);d66=double(subs(g66,{x1,x2,x3,x4,x5,x6},{x0(1),x0(2),x0(3),x0(4),x0(5),x0(6)}))*xichma(6)*xichma(6); D=[ d11 d12 d13 d14 d15 d16; d12 d22 d23 d24 d25 d26; d13 d23 d33 d34 d35 d36; d14 d24 d34 d44 d45 d46; d15 d25 d35 d45 d55 d56; d16 d26 d36 d46 d56 d66]; A=1/(sqrt(sum(gradd.^2)))*(r*D*r');A(6,:)=[];A(:,6)=[];k=eig(A);kk=1;for iii=1:5 kkk=(1+beta*k(iii))^-0.5; kk=kk*kkk;end pf1=normcdf(-beta);pf2=normcdf(-beta)*kk;
Phong Nguyen Structural Reliability_Makeup Problem 17
Part IV: Nick Kratkiewicz’s problem
The limit state function:
g1=F yCSR−PL4; g2=Dmax−
P L3
24 ESH;
Dmax=1∈;R=1.05 ; L=20 ft ; H=13∈; E=29000 ksi ;
F y=X1 N (52,3 );C=X 2 N (0.75,0.0025 ); S=X3 N (4,0.1 ); P=X4 U (2.4,2.6 );
For Monte Carlo Simulation: pf=P (g1≤0∪ g2≤0 )=0.2065 ;
For AFORM: pf 1=P (g1≤0 )=0.1319 ; p f 1=P (g2≤0 )=0.1109 ;
In case of uni-modal: 0.1319≤ p f ≤1−(1−0.1319 ) (1−0.1109 )=0.2282
For bi-modal:
β1=1.11716 ; α1,1−4=[0.7641;0.4265 ;0.3176 ;−0.3652 ]
β2=1.22157 ;α 2,3−4=[0.7506;−0.6607 ]
So, ρ=0.3176∗0.7506+ (−0.3652 )∗(−0.6607 )=0.4797 ;
P (A )=p f 1∅ (−0.78145 )=0.02866 ;P (B )=p f 2∅ (−0.78145 )=0.02409;
So, 0.19005=0.1319+0.1109−0.05275≤ p f ≤0.1319+0.1109−0.02866=0.21414
Code Matlab:
Monte Cartlo Simulation:
syms x1 x2 x3 x4 x5 x6 % Fy, C, S, Pformat long%% Inputmuy=[52; 0.75; 4]; %Mean valuesxichma=[3; 0.025; 0.1]; % Standard deviation.. r=1.05; L=20*12; D=1; H=13;E=29000;%% Monte Carlo Simulation
Phong Nguyen Structural Reliability_Makeup Problem 18
Ns=1000;Nset=25;for i=1:Nset pf=0; for j=1:Ns % uniform random number u = rand(1,3); x1 = muy(1) + xichma(1)*norminv(u(:,1),0,1); x2 = muy(2) + xichma(2)*norminv(u(:,2),0,1); x3 = muy(3) + xichma(3)*norminv(u(:,3),0,1); aa=5; x4=2.35+0.05*ceil(aa.*rand(1,1)); % choose randomly x4 from [ 2.4; 2.45; 2.5; 2.55; 2.6] g1=double(x1*x2*x3*r-x4*L/4); g2=double(D-x4*L^3/24/E/x3/H); if g1>0 && g2>0 pff=0; else pff=1/Ns; end pf=pf+pff; end Pf(i)=pf;endpf=mean(Pf);cov=std(Pf)/pf;
AFORM for function g1
syms x1 x2 x3 x4 betav % Fy, C, S, Pformat long%% Inputmuy=[52; 0.75; 4; 2.5]; %Mean valuesxichma=[3; 0.025; 0.1; 0.0577]; % Standard deviation.. r=1.05; L=20*12; D=1; H=13;E=29000;%% Limit state function and its derivativesgg1=x1*x2*x3*r-x4*L/4;g1=diff(gg1,x1);g2=diff(gg1,x2);g3=diff(gg1,x3);g4=diff(gg1,x4); beta_trial=5; % guessed value of raliability index;tolerance=10^-8; % interation error.itermax=20; % the maximum number of iterationx0=muy; % Guessed valueser=1;i=1; while er > tolerance beta(i)=beta_trial; x(:,i)=x0; %% Transform from Uniform to Equivalent Normal for x4 xichma4=normpdf(norminv((x(4,i)/0.2-2.4/0.2)))/5; muy4=x(4,i)-norminv((x(4,i)/0.2-2.4/0.2))*xichma4;
Phong Nguyen Structural Reliability_Makeup Problem 19
xichma(4)=xichma4; muy(4)=muy4; g(1,i)=subs(g1,{x1,x2,x3,x4},{x(1,i),x(2,i),x(3,i),x(4,i)}); g(2,i)=subs(g2,{x1,x2,x3,x4},{x(1,i),x(2,i),x(3,i),x(4,i)}); g(3,i)=subs(g3,{x1,x2,x3,x4},{x(1,i),x(2,i),x(3,i),x(4,i)}); g(4,i)=subs(g4,{x1,x2,x3,x4},{x(1,i),x(2,i),x(3,i),x(4,i)}); grad(:,i)=g(:,i).*xichma; %Gradients in new coordinate system anpha(:,i)=double(grad(:,i)/sqrt(sum(grad(:,i).^2))); xnew(:,i)=muy-betav*anpha(:,i).*xichma; gbeta=xnew(1,i)*xnew(2,i)*xnew(3,i)*r-xnew(4,i)*L/4; betar=(double(solve(gbeta,betav))); %solve reliability index x0=double(muy-min(betar(betar>0))*anpha(:,i).*xichma); er=abs((min(betar(betar>0))-beta(i))); % error of reliability index beta_trial=min(betar(betar>0)); betaf(i)=min(betar(betar>0)); i=i+1; if i>itermax, break, endendpf=normcdf(-betaf);