function[ufc,lb,ab,hb,st] = opt(m,mt,smax,lmax,wmax) %optimise blade design from available thicknesses of steel and stress, length and width %given stage and total load g = 9.81; %gravitational acceleration alpha = 1.38; %shape factor ????????????????? ye = 186e9; %Young's elastic modulus for Marval steel blades mtb = mt;%total load on one blade mb = m;%uncoupled mass on one blade lb = lmax; %always best for index = 1:12 %NOTE CHANGE !!!! 0.0005 to 0.0001!!!!!!!!!! h = 0.0005 + index*0.0001; %changed as possibility can get material to 0.1mm and not 0.5mm for jndex = 1:18 a = 0.02+(wmax-0.02)/18*jndex; s = 6.*mtb.*g.*lb./(a.*h.^2);%max stress at equilibrium d = 4.*mtb.*g.*lb.^2.*alpha./(ye.*a.*h.^3); %deflection unloaded /l if s < smax & d < pi/2 f(index,jndex) = sqrt(ye.*a.*h.^3./(4.*mb.*lb.^3.*alpha))./2./pi; %mode freq. stress(index,jndex) = s; else f(index,jndex) = NaN;%invalidate stress(index,jndex) = s; end end end [fmin1,index1] = min(f); [fmin2,index2] = min(fmin1); ufc = fmin2; aindex = index2; ab = 0.02+(wmax-0.02)/18*aindex; hindex = index1(aindex); %NOTE CHANGE !!!! 0.0005 to 0.0001!!!!!!!!!! hb = 0.0005 + hindex*0.0001; st = stress(hindex,aindex);