Anda di halaman 1dari 5

/*A generalised C++ program for the design of Rectangular Singly or

Doubly Reinforced Beam for a given section,Moment of Resistance and


Shear*/
#include<iostream.h>
#include<conio.h>
#include<math.h>
# define Es 200000
class beam
{
float
fck,fy,fsc,fcc,abs,abse,absp,b,d,D,xumax,Ast1,Ast2,Ast,Asc,pt,pc,sv,c1,c
2;
double Mu,Mu2,Mumax,Vu;
public:
//
friend void strain(void);
void m_grade()
{
cout<<"\n:Program for design of Rectangulr R.C. Beam
Section for Limit State of Flexure:";
cout<<"\nGive the grade of concrete to be used:";
cin>>fck;
cout<<"\nGive the grade of steel to be used:";
cin>>fy;
}
void designdata()
{
cout<<"\nGive the
cin>>b;
cout<<"\nGive the
cin>>D;
cout<<"\nGive the
cin>>c1;
cout<<"\nGive the
cin>>c2;
cout<<"\nGive the
cin>>Mu;
cout<<"\nGive the

width of the beam in mm:";


overall depth of the beam in mm:";
effective cover to the tension steel in mm:";
effective cover to the compression steel:";
Ultimate(Factored) Moment for design in kN-m:";

//
Ultimate(Factored) Shear Force for design in
kN :";
//
cin>>Vu;
}
void designprocess();
void results()
{
cout<<"***************** RESULTS ****************"<<endl;
if(Mu<Mumax)
{
cout<<"\nThe beam is designed as a SINGLY REINFORCE BEAM";
cout<<"\nThe Area of tension steel is :"<<Ast<<" sq mm"<<endl;
}
else if (Mu>Mumax)
{
cout<<"The beam is designed as a DOUBLY REINFORCED BEAM: ";
cout<<"\nAst1 ="<<Ast1<<" sq mm\n";
cout<<"\nAst2 ="<<Ast2<<" sq mm";

cout<<"\n\nThe total area required of steel in tension is :"<<Ast<<" sq


mm";
cout<<"\n\nThe required area of steel in compression is:"<<Asc<<" sq
mm";
}
}
};
void beam :: designprocess()
{
float res,temp;
d=D-c1;//cout<<"d="<<d<<endl;
Mu=Mu*1000000;
temp=0.0035+0.002+(0.87*fy/Es);
xumax=0.0035*d/temp;//cout<<"xumax="<<xumax<<"mm"<<endl;
Mumax=0.36*fck*b*xumax*(d-(0.42*xumax));
//
cout<<"Mumax = "<<Mumax/1000000.0<<"kN-m"<<endl;
if(Mu<Mumax)
{
res=sqrt(1-(4.6*Mu/(fck*b*d*d)));
pt=50*(fck/fy)*(1-res);
Ast=pt*b*d/100;
}
else
{
//abs= Strain at the level of the compression steel.
//fsc= Stress in compression steel.
res=sqrt(1-(4.6*Mumax/(fck*b*d*d)));
pt=50.0*(fck/fy)*(1-res);//cout<<"pt="<<pt<<endl;
Ast1=pt*b*d/100;
Mu2=Mu-Mumax;//cout<<"Mu2 ="<<Mu2/1000000<<"kN-m"<<endl;
Ast2=Mu2/(0.87*fy*(d-c2));
Ast=Ast1+Ast2;
//Now finding fsc.
abs=0.0035*(xumax-c2)/xumax;//cout<<"abs="<<abs<<endl;
/*
if (abs>0.002)
{
fcc=0.446*fck;cout<<"fcc="<<fcc<<endl;
}
else
{
fcc=446.0*fck*(abs-(250*abs*abs));cout<<"fcc="<<fcc<<endl;
}*/fcc=0;//fcc is neglected in design.
if(fy==250)
{
if (abs<0.00108)
{
fsc=abs*Es;
}
else
{
fsc=fy/1.15;
}
}
else if(fy==415)
{
if (abs<0.00144)
{

fsc=abs*Es;
}
else
{
if(abs>=0.00144 && abs<=0.00163)
{
else

else

else

else

else

fsc=288.7+(18.0*(abs-0.00144)/(0.00019));
}
if(abs>0.00163 && abs<=0.00192)
{
fsc=306.7+(18.1*(abs-0.00163)/(0.00029));
}
if(abs>0.00192 && abs<=0.00241)
{
fsc=324.8+(18.0*(abs-0.00192)/(0.00049));
}
if(abs>0.00241 && abs<=0.00276)
{
fsc=342.8+(9.0*(abs-0.00241)/(0.00035));
}
if(abs>0.00276 && abs<0.00380)
{
fsc=351.8+(9.1*(abs-0.00276)/(0.00104));
}
if(abs>=0.00380)
{
fsc=360.9;
}

}
}
//cout<<"fsc="<<fsc<<endl;
Asc=Mu2/((fsc)*(d-c2));
}
}//Main function starts
void main()
{
clrscr();
beam b1;
b1.m_grade();
b1.designdata();
b1.designprocess();
b1.results();
getch();
}

INPUT
:Program for design of Rectangulr R.C. Beam Section for Limit State of
Flexure:
Give the grade of concrete to be used:20
Give the grade of steel to be used:415
Give the width of the beam in mm:300
Give the overall depth of the beam in mm:500
Give the effective cover to the tension steel in mm:25
Give the effective cover to the compression steel:25
Give the Ultimate(Factored) Moment for design in kN-m:100
OUTPUT
***************** RESULTS ****************
The beam is designed as a SINGLY REINFORCE BEAM
The Area of tension steel is :643.726196 sq mm

INPUT
:Program for design of Rectangulr R.C. Beam Section for Limit State of
Flexure:
Give the grade of concrete to be used:20
Give the grade of steel to be used:415
Give the width of the beam in mm:300
Give the overall depth of the beam in mm:500
Give the effective cover to the tension steel in mm:25
Give the effective cover to the compression steel:25
Give the Ultimate(Factored) Moment for design in kN-m:200
OUTPUT
***************** RESULTS ****************
The beam is designed as a DOUBLY REINFORCED BEAM:
Ast1 =1355.685669 sq mm
Ast2 =83.039528 sq mm
The total area required of steel in tension is :1438.72522 sq mm
The required area of steel in compression is:84.475952 sq mm

Anda mungkin juga menyukai