|
这个是我自己编制的一个验算点法的算例(赵国藩编写的那本‘工程结构可靠性理论与应用’中的算例),想跟大家多交流交流,是用matlab编写的
format long
syms i f w niter m0 n0 meanf0 meanw0 deltaf deltaw thf thw beta g f1 w1 m1 n1 cosf0 cosw0 cosf1 cosw1 beta0 beta1 betaa;
meanf0=38;
meanw0=54;
deltaf=0.1;
deltaw=0.05;
thf=meanf0*deltaf;
thw=meanw0*deltaw;
g=f*w-1040;
m0=subs(-diff(g,f)*thf,w,meanw0);
n0=subs(-diff(g,w)*thw,f,meanf0);
cosf0=m0/sqrt(m0^2+n0^2);
cosw0=n0/sqrt(m0^2+n0^2);
f0=meanf0+beta0*thf*cosf0;
w0=meanw0+beta0*thw*cosw0;
beta0=subs(solve('(meanf0+beta0*thf*cosf0)*(meanw0+beta0*thw*cosw0)-1140=0',beta0));
beta0=beta0(2);
niter=0;
for i=1:1000000
f1=meanf0+beta0*thf*cosf0;
w1=meanw0+beta0*thw*cosw0;
m1=subs(-diff(g,f)*thf,w,w1);
n1=subs(-diff(g,w)*thw,f,f1);
cosf1=m1/sqrt(m1^2+n1^2);
cosw1=n1/sqrt(m1^2+n1^2);
beta1=subs(solve('(meanf0+betaa*thf*cosf1)*(meanw0+betaa*thw*cosw1)-1140=0',betaa));
beta1=beta1(2);
if abs(beta1-beta0)<10^(-6)
break
end
niter=niter+1;
beta0=beta1;
end
beta1 %即为可靠度指标
niter %为迭代次数 |
|