%Name: reference %Course & Year: BSCE 3-D %SINGLY REINFORCED BEAM %inputs b= input( 'Width of the beam in inches: '); %value of b d= input('Effective depth of the beam in inches: '); %value of d fc= input('Compressive strength of concrete in ksi: '); %value of fc fy= input('Yield strength of steel in ksi: '); %value of fy Asq= input('The number of steel in the beam: '); %number of steel Asd= input('The diameter of the steel: '); %diameter of steel B= input('The Length of Beam in ksf: '); %beamspan DL= input("Dead Load in ksf: "); %value of dead load LL= input("Live Load in ksf: "); %value of live load ME= input ("Modulus of Elasticity, in ksi: "); %value of ME %Calculation of As (cross sectional area of steel) As= Asq*((pi*(Asd/8)^2)/4); %cross sectional area of steel fprintf('Value of As: %0.2f in^2\n',As) %Equilibrium Equation T=Cc T=As*fy; %Tensile Force in Steel % Assigning the value of B based on fc if fc<=4 B= 0.85; elseif (4=Strain_y\n') Ecu=0.003; Strain_y=fy/ME; %Vlaue of Ey fprintf ('Value of Strain_y is: %0.4f\n', Strain_y); Strain_s=(Ecu*(d-c))/(c); %Value of Es fprintf ('Value of Strain_s is: %0.4f\n', Strain_s); if Strain_s>Strain_y c=(As*Strain_s*ME)/(0.85*fc*B*b); end fprintf ('Value of Strain_s is: %0.4f\n', Strain_s); if Strain_s>=Strain_y fprintf('Considering that Strain_s>=Strain_y. Therefore, the Steel Bars are Yielding. The assumption is correct.\n') else fprintf('Considering that Strain_s=0.002)&&(Strain_s<0.005) phi=0.65+(Strain_s-0.002)*(250/3); elseif Strain_s>=0.005 phi=0.9; end fprintf('Value of phi is: %0.2f kips-in\n', phi) %Compute for Reduced Nominal Monent, M M=phi*Mn; fprintf('Value of M is: %0.2f kips-in\n', M) %Check for Minimum Area of Steel Bars, As_min As_m=3*(sqrt(fc)); if As_m>=200 As_min=(3*(sqrt(fc)*b*d))/(fy); elseif As_m<=200 As_min=(200*b*d)/(fy*1000); end fprintf ('Value of As_min is: %0.2f in^2\n', As_min) fprintf ('Value of As is: %0.2f in^2\n', As) if As_min>As fprintf ('Considering that As_min>As, therefore the area of steel bars does not achieve the required area.\n'); elseif As_min <= As fprintf ('Considering that As_min<=As, therefore area of steel bars does achieve the required area.\n'); end %Calculation for Required Maximum Nominal Moment, Mn_max Mn_max=(((1.4*DL)+(1.6*LL))*(As)*(As)*12)/(8); fprintf ('Value of Mn_max is: %.2f kips*in\n', Mn_max); %General Design Strength Equation for Flexure if M>=Mn_max fprintf('Since M>=Mn_max. Therefore, the flexural strength of the beam is achieved.\n'); else fprintf('Since M