clc clear all clear Figure1 nd=1.5; d=8; F=250; Sut=2211/d^0.145; Sr=0.45*Sut; Se=0.5*Sr*(1-(0.45/2)^2)^(-1); c=linspace(-15,15,1000); O=F*((4*c.^2-c-1)*16./(4*(c-1)*3.14*d^2)+4/(3.14*d^2)); Q=nd*O/Se+(nd*O/Sut).^2-1; %Q=(nd*F*4/(3.14*Sut*d^2))^2*((4*c.^2-1)./(c-1)).^2+nd*F*4/(3.14*Se*d^2)*((4*c.^2-1)./(c-1))-1; Qmin=min(abs(transpose(Q))); for i=1:1000 if Q(i)==Qmin C=c(i); fprintf('Qmin= %g C=%g\n',Qmin,C); end end plot(c,Q); hold on; z=linspace(0,0,1000); plot(c,z,'r'); axis([0 15 -6 5]); d=d/1000; Lmin=0.377; Lmax=0.89; Ymax=Lmax-Lmin; G=80*10^9; E=200*10^9; D=C*d; k=500/Ymax; Na=G*d^4/(8*k*D^3); Nb=Na-G/E; L0=(2*C-1+Nb)*d; Li=Lmin-L0; Fi=Li*k; fprintf('d=%g 4