Sie sind auf Seite 1von 74

// Calculation of Area for Steel from given diameter

#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
clrscr();
cout.precision(3);
float Ast,dia,n,pi=3.14159;
cout<<"enter the dia of steel:";cin>>dia;
cout<<"no. of bars:";cin>>n;
Ast=n*pi*dia*dia/4;
cout<<"Area of steel for given dia and nos. is :"<<Ast<<" mm2"<<endl;
getch();
}
INPUT - OUTPUT
enter the dia of steel:25
no. of bars:6
Area of steel for given dia and nos. is : 2945.241 mm2

//. Number of rows of bar for given N-# combi of bars & breadth of beam.
#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
clrscr();
cout.precision(3);
float Ast,dia1,dia2,n2,B,pi=3.14159,s1,s2;
int n1;
cout<<"enter the area of steel:";cin>>Ast;
cout<<"first size of dia of bars:";cin>>dia1;
n1=(4*Ast)/(pi*dia1*dia1);
cout<<"Required no. for single dia.:"<<n1<<endl;
cout<<"no. of bars for "<<dia1<<" #:";cin>>n1;
float Ast1,Ast2;
Ast1=n1*pi*dia1*dia1/4;
Ast2=Ast-Ast1;
cout<<"second size of dia of bars:";cin>>dia2;
n2=(4*Ast2)/(pi*dia2*dia2);
int n3=n2+1;
cout<<"Provide "<<n1<<"- "<<dia1<<" # and "<<n3<<" - "<<dia2<<" #"<<endl;
cout<<"spacing between two bars :";cin>>s1;
cout<<"side cover provided :";cin>>s2;
int n=n1+n3;
B=2*s2+(n-1)*s1;
cout<<"min breadth reqd for beam for one raw of bars:"<<B<<endl;
int ans,b;
cout<<"Is it o.k.? (1 for Y :: 2 for N): ";cin>>ans;
if(ans==2)
{
cout<<"enter the width of beam reqd.:";cin>>b;
n1=((b-2*s2)/(s1))+1;
cout<<"provide "<<n1<<" nos. of bars in one raw."<<endl;
cout<<"no. of raws reqd. "<<(n/n1)+1;
}
else
{
cout<<"Provide width of beam "<<B<<" with one raw of bars."<<endl;
}
getch();
}

//.Calculation of Spacing for Given Area of Steel.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
clrscr();
float d[5]={10,12,16,20,25};
float a[5]={89,113,201,314,490};
float A;
int sp[5];
cout<<"enter the area of steel,mm2"<<endl;
cin>>A;
for(int i=0;i<=4;i++)
{
sp[i]=a[i]*1000/A;
if (sp[i]<=300)
{
cout<<"The spacing for "<<d[i]<<" mm dia is "<< sp[i]<<"mm c/c"<<endl;;
}
else
{goto jbo;}}
jbo:
if (sp[1]&&sp[2]&&sp[3]>300)
{
cout<<"Provide 10 mm dia @ 300 mm c/c"<<endl;
}
getch();
}
INPUT - OUTPUT
enter the area of steel,mm2
2500
The spacing for 10 mm dia is 35mm c/c
The spacing for 12 mm dia is 45mm c/c
The spacing for 16 mm dia is 80mm c/c
The spacing for 20 mm dia is 125mm c/c
The spacing for 25 mm dia is 196mm c/c

// Calculation of Maximun span moment, shear force.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
class beam
{
private:
float l,w,W,E,I,BM[5],sf[5];
int type;
public:
void getdata()
{
cout<<"Enter the span of the beam in M :";cin>>l;
cout<<"Enter the udl on beam in kn-m :";cin>>w;
cout<<"Enter the pt load in KN :";cin>>W;
cout<<"Enter the end conditions of beam :"
"1-for Cantilever "
"2-for Simply Supports
:";cin>>type;
cout<<"____________________________________________________"<<endl;
cout<<"intervals"<<setw(6)<<"BM"<<setw(20)<<"SF"<<endl;
cout<<"____________________________________________________"<<endl;
cout<<endl;
switch(type)
{
case 1:
{
for (int i=1;i<=l;i++)
{
BM[i]=(w*i*i*0.5)+(W*i);
sf[i]=(w*i)+(W);
cout<<i<<setw(15)<<BM[i]<<setw(20)<<sf[i]<<endl;
}
break;
}
case 2:
{
for (int i=1;i<=l;i++)
{
BM[i]=(W*0.5)+(w*l*0.5)-(w*i*i*0.5);
sf[i]=(w*l*0.5)+(W*0.5)-(w*i);
cout<<i<<setw(15)<<BM[i]<<setw(20)<<sf[i]<<endl;
}
}
break;
} //switch
} //void
};//class
4

void main()
{
clrscr();
beam b1;
b1.getdata();
getch();
}

// Serviceability Check.
#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
class check
{
private:
float mr,l,mr1;
int type,R,ans;
public:
void getdata()
{
cout<<"Enter the length of beam in M :";cin>>l;
cout<<"Enter type of beam:(1-canti 2-SS 3-Conti.) :";cin>>ans;
cout<<"M.R. for given grade of mati. :";cin>>mr;
}
void getout()
{
switch(ans)
{
case 1:
cout<<"span/Depth should not be more than "<<7*mr<<endl;
cout<<"Depth of beam should be :"<<l*1000/(7*mr)<<" mm"<<endl;
break;
case 2:
if (l>10) mr1=10/l;
if (l<=10) mr1=1;
cout<<"span/Depth should not be more than "<<20*mr*mr1<<endl;
cout<<"Depth of beam should be :"<<l*1000/(20*mr*mr1)<<" mm"<<endl;
break;
case 3:
if (l>10) mr1=10/l;
if (l<=10) mr1=1;
cout<<"span/Depth should not be more than "<<26*mr*mr1<<endl;
cout<<"Depth of beam should be :"<<l*1000/(26*mr*mr1)<<" mm"<<endl;
break;
}
}
};
void main()
{
clrscr();
cout.precision(3);
check c1;
c1.getdata();
c1.getout();
getch();
}
6

INPUT - OUTPUT
1
Enter the length of beam in M :6
Enter type of beam:(1-canti 2-SS 3-Conti.) :2
M.R. for given grade of mati. :1.6
span/Depth should not be more than 32
Depth of beam should be :187.5 mm
2
Enter the length of beam in M :12
Enter type of beam:(1-canti 2-SS 3-Conti.) :3
M.R. for given grade of mati. :1.4
span/Depth should not be more than 30.333
Depth of beam should be :395.604 mm

// Design of Shear reinforcement.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
class shear
{
private:
float Vus,Vu,Sv,sv,Tv,Tc,w,l,b,d,pt;
int fy,fck,R,ans,dia;
public:
void getdata()
{
cout<<"Enter the grade of concrete :";cin>>fck;
cout<<"Enter the grade of steel :";cin>>fy;
cout<<"Diameter of stirrups
:";cin>>dia;
cout<<"Width and eff depth of beam :";cin>>b>>d;
cout<<"Load on beam (kn/m)
:";cin>>w;
cout<<"length of beam (m)
:";cin>>l;
cout<<"Assume % of steel (pt)
:";cin>>pt;
}
void getcal()
{
Vu=1.5*w*l/2;
Tv=Vu*1000/(b*d);
switch(fck)
{
case 20:
{
if (pt<=0.25) Tc=0.36;
if (pt>0.25 && pt<=0.50) Tc=.48;
if (pt>0.50 && pt<=0.75) Tc=.56;
if (pt>0.75 && pt<=1.00) Tc=.62;
if (pt>1.00 && pt<=1.25) Tc=.72;
if (pt>1.25 && pt<=1.50) Tc=.75;
if (pt>1.50 && pt<=1.75) Tc=.79;
if (pt>1.75 && pt<=2.00) Tc=.81;
if (pt>2.00 ) Tc=.82;
}
break;
case 25:
{
if (pt<=0.25) Tc=0.36;
if (pt>0.25 && pt<=0.50) Tc=.49;
if (pt>0.50 && pt<=0.75) Tc=.57;
if (pt>0.75 && pt<=1.00) Tc=.64;
8

if (pt>1.00 && pt<=1.25) Tc=.70;


if (pt>1.25 && pt<=1.50) Tc=.74;
if (pt>1.50 && pt<=1.75) Tc=.78;
if (pt>1.75 && pt<=2.00) Tc=.82;
if (pt>2.00 && pt<=2.25) Tc=.85;
if (pt>2.25 && pt<=2.50) Tc=.88;
if (pt>2.50 && pt<=2.75) Tc=.90;
if (pt>2.75 && pt<=3.00) Tc=.92;
if (pt>3.00 ) Tc=.92;
}
break;
}
if(Tv<Tc)
{
cout<<"Tv<Tc .... Only nonimal shear reif. reqd."<<endl;
Sv=3.14*dia*dia*0.25*fy/(0.4*b);
}
else
{
cout<<"Tv>Tc .... Shear Rein. is reqd."<<endl;
Vus=(Vu*1000)-(Tc*b*d);
Sv =(0.87*fy*3.14*dia*dia*0.25*d)/(Vus);
sv=(450>(.75*d)?450:(0.75*d));
if (Sv>sv)Sv=sv;
}}
void getout()
{
cout<<"Provide "<<dia<<" # stirrups @ "<<Sv<<" mm c/c";
}
};
void main()
{
clrscr();
cout.precision(3);
shear s1;
s1.getdata();
s1.getcal();
s1.getout();
getch();
}

INPUT - OUTPUT
1
Enter the grade of concrete :20
Enter the grade of steel :415
Diameter of stirrups
:8
Width and eff depth of beam :300 450
Load on beam (kn/m)
:20
length of beam (m)
:5
Assume % of steel (pt)
:1
Only nonimal shear reif. reqd.
Provide 8 # stirrups @ 173.747 c/c
2
Enter the grade of concrete :25
Enter the grade of steel :415
Diameter of stirrups
:10
Width and eff depth of beam :300 500
Load on beam (kn/m)
:40
length of beam (m)
:6
Assume % of steel (pt)
:1.9
Shear Rein. is reqd.
Provide 10 # stirrups @ 248.618 c/c

10

// Analysis of Rectangular Beam Section.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
class Analysis
{
private:
float Ast,n,b,d,Mu,xu,xul,k;
int fy,fck,dia;
public:
void getdata()
{
cout<<"Enter the grade of concrete :";cin>>fck;
cout<<"Enter the grade of steel :";cin>>fy;
cout<<"Diameter and nos. of tension reinf.:";cin>>dia>>n;
cout<<"Width and eff depth of beam :";cin>>b>>d;
}
void getcal()
{
Ast=n*3.14*dia*dia*0.25;
if (fy==250)
{ xul=0.52*d;
k=0.149;
}
if (fy==415)
{ xul=0.48*d;
k=0.138;
}
if (fy==500)
{ xul=0.43*d;
k=0.133;
}
xu=(0.87*fy*Ast*d)/(0.36*fck*b);
if (xu<xul)
{cout<<"section is under reif."<<endl;
Mu=0.87*fy*Ast*d*(d-(0.42*xu));
}
else if (xu>xul)
{
cout<<"section is over reinf."<<endl;
Mu=k*fck*b*d*d;
}
else
{
11

cout<<"section is Balanced section."<<endl;


Mu=k*fck*b*d*d;
}
}
void getout()
{
cout<<"MR of section is "<<Mu/1e06<<" KN-M";
}
};
void main()
{
clrscr();
cout.precision(3);
Analysis A1;
A1.getdata();
A1.getcal();
A1.getout();
getch();
}
INPUT - OUTPUT
1
Enter the grade of concrete :20
Enter the grade of steel :415
Diameter and nos. of tension reinf.:16 5
Width and eff depth of beam :300 500
section is over reinf.
MR of section is 207 KN-M
2
Enter the grade of concrete :25
Enter the grade of steel :415
Diameter and nos. of tension reinf.:25 3
Width and eff depth of beam :300 550
section is over reinf.
MR of section is 313.087 KN-M

12

13

// Analysis of Flanged Section.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
class Flange
{
private:
float bw,d,Df,Bf,Mu,Mul,xu,xul,k,yf;
int fy,fck;
public:
void getdata()
{
cout<<"Enter the grade of concrete :";cin>>fck;
cout<<"Enter the grade of steel :";cin>>fy;
cout<<"Eff depth,width of web :";cin>>d>>bw;
cout<<"Thickness and width of flange:";cin>>Df>>Bf;
}
void getcal()
{
if (fy==250) k=0.149; xul=.52*d;
if (fy==415) k=0.138; xul=.48*d;
if (fy==500) k=0.133; xul=.43*d;
if (Df<0.2*d)
{
Mul=k*fck*bw*d*d;
Mu=Mul+(0.446*fck*(Bf-bw)*Df*(d-(0.5*Df)));
}
if (Df>0.2*d)
{
Mul=k*fck*bw*d*d;
yf=0.15*xul+(0.65*Df);
if (yf>Df) yf=Df;
Mu=Mul+(0.446*fck*(Bf-bw)*yf*(d-(0.5*yf)));
}
}
void getout()
{
cout<<"MR of T-section is "<<Mu/1e06<<" KN-M";
}
};
void main()
{
14

clrscr();
cout.precision(3);
Flange f1;
f1.getdata();
f1.getcal();
f1.getout();
getch();
}
INPUT - OUTPUT
1
Enter the grade of concrete :20
Enter the grade of steel :415
Eff depth,width of web :600 250
Thickness and width of flange:120 1200
MR of T-section is 797.515 KN-M
2
Enter the grade of concrete :25
Enter the grade of steel :500
Eff depth,width of web :500 200
Thickness and width of flange:150 1500
MR of T-section is 984.601 KN-M

15

// Design of Flanged Section.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
class Flange
{
private:
float bw,d,Df,Bf,Mu,Mul,xu,xul,k,yf,ptl,Astl,Astf,Ast;
int fy,fck;
public:
void getdata()
{
cout<<"Enter the grade of concrete :";cin>>fck;
cout<<"Enter the grade of steel :";cin>>fy;
cout<<"Eff depth,width of web :";cin>>d>>bw;
cout<<"Thickness and width of flange:";cin>>Df>>Bf;
}
void getcal()
{
if (fy==250) {k=0.149; xul=.52*d; ptl=21.97;}
if (fy==415) {k=0.138; xul=.48*d; ptl=19.82;}
if (fy==500) {k=0.133; xul=.43*d; ptl=18.87;}
cout<<"Df/d "<<Df/d<<endl;
if (Df<=0.2*d)
{
Mul=k*fck*bw*d*d;
Mu=Mul+(0.446*fck*(Bf-bw)*Df*(d-(0.5*Df)));
Astl=ptl*fck*bw*d*0.01/fy;
Astf=0.446*fck*(Bf-bw)*Df/(0.87*fy);
Ast=Astl+Astf;
}
if (Df>0.2*d)
{
Mul=k*fck*bw*d*d;
yf=0.15*xul+(0.65*Df);
if (yf>Df) yf=Df;
Mu=Mul+(0.446*fck*(Bf-bw)*yf*(d-(0.5*yf)));
Astl=ptl*fck*bw*d*.01/fy;
Astf=0.446*fck*(Bf-bw)*yf/(0.87*fy);
Ast=Astl+Astf;
16

}
}
void getout()
{
cout<<"MR of T-section is "<<Mu/1e06<<" KN-M"<<endl;
cout<<"Area of Tension steel :"<<Ast<<" mm2"<<endl;
}
};
void main()
{
clrscr();
cout.precision(3);
Flange f1;
f1.getdata();
f1.getcal();
f1.getout();
getch();
}
INPUT - OUTPUT
Enter the grade of concrete :20
Enter the grade of steel :415
Eff depth,width of web :450 240
Thickness and width of flange:120 1500
MR of T-section is 611.061 KN-M
Area of Tension steel :1635.847 mm2

17

// Design of One way slab.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
class slab
{
private:
float d,dp,dr,Mu,Mul,xu,xul,k,ptl,Ast;
int fy,fck;
float A;
int sp[4];
public:
void getdata()
{
cout<<"Enter the grade of concrete :";cin>>fck;
cout<<"Enter the grade of steel :";cin>>fy;
cout<<"Working Moment due to external load (kn-m):";cin>>Mu;
cout<<"Assume Eff depth of slab :";cin>>d;
}
void getcal()
{
if (fy==250) {k=0.149; xul=.52*d; ptl=21.97;}
if (fy==415) {k=0.138; xul=.48*d; ptl=19.82;}
if (fy==500) {k=0.133; xul=.43*d; ptl=18.87;}
Mu=1.5*Mu*1e06;
dr=sqrt(Mu/(k*fck*1000));
cout<<"Eff. depth reqd for slab is :"<<dr<<endl;
if(d<dr)
{cout<<"Provided depth is less ..Give new depth :";cin>>dp;}
else { cout<<"Provided depth is O.K. "<<endl; dp=d;}
Ast=ptl*fck*1000*dp*0.01/fy;
cout<<"ast "<<Ast<<endl;
float D[4]={10,12,16,20};
float a[4]={89,113,201,314};
for (int i=0;i<=3;i++)
{
sp[i]=a[i]*1000/Ast;
18

if (sp[i]<=300)
{
cout<<"The spacing for "<<D[i]<<" mm dia is "<< sp[i]<<" mm c/c"<<endl;;
}
else
{goto jbo;}}
jbo:
if (sp[1]>300 && sp[2]>300 &&sp[3]>300)
{
cout<<"Provide 10 mm dia @ 300 mm c/c"<<endl;
}
}
};
void main()
{
clrscr();
cout.precision(3);
slab s1;
s1.getdata();
s1.getcal();
getch();
}
INPUT - OUTPUT
Enter the grade of concrete :20
Enter the grade of steel :415
Working Moment due to external load (kn-m):20
Assume Eff depth of slab :105
Eff. depth reqd for slab is :104.257
Provided depth is O.K.
ast 1002.94
The spacing for 10 mm dia is 88 mm c/c
The spacing for 12 mm dia is 112 mm c/c
The spacing for 16 mm dia is 200 mm c/c

19

20

// Design of Two way slab.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
class slab
{
private:
float lx,ly,d,dp,dr,dx,dy,Mx,My,Qx,Qy,Mul,w,xu,xul,k;
float Astx,Asty,ast,spx,spy,R,Mu,Astd,spr;
int fy,fck,dia;
public:
void getdata()
{
cout<<"Enter the grade of concrete :";cin>>fck;
cout<<"Enter the grade of steel :";cin>>fy;
cout<<"Working external load (kn/m):";cin>>w;
cout<<"Shorter span & Longer span (m):";cin>>lx>>ly;
cout<<"diameter of reinforcement :";cin>>dia;
cout<<"Assume Eff depth of slab :";cin>>d;
}
void getcal()
{
if (fy==250) {k=0.149; xul=.52*d; }
if (fy==415) {k=0.138; xul=.48*d; }
if (fy==500) {k=0.133; xul=.43*d; }
lx=1000*lx;
ly=1000*ly;
R=ly/lx;
Mu=1.5*w*lx*lx/8;
dr=sqrt(Mu/(k*fck*1000));
cout<<"Eff. depth reqd for slab is :"<<dr<<endl;
if(d<dr)
{cout<<"Provided depth is less ..Give new depth :";cin>>dp;}
else { cout<<"Provided depth is O.K. "<<endl; dp=d;}
dx=dp;
dy=dp-dia;
cout<<"Value of Constants of Moments for ly/lx :"<<R<<",Qx= ";cin>>Qx;
21

cout<<"Qy = ";cin>>Qy;
Mx=Qx*w*lx*lx/8;
My=Qy*w*lx*lx/8;
Astx=Mx/(0.87*fy*(dx-0.42*xul));
Asty=My/(0.87*fy*(dy-0.42*xul));
ast=3.14*.25*dia*dia;
spx=ast*1000/Astx;
spy=ast*1000/Asty;
if(spx>300) spx=300;
if(spy>300) spy=300;
Astd=0.12*1000*d/100;
spr=3.14*.25*8*8*1000/Astd;
if(spr>300) spr=300;
}
void getout()
{
cout<<"Eff depth of slab :"<<dx<< " mm"<<endl;
cout<<"Provide "<<dia<<" # @ "<<spx<<" mm c/c in shorter span."<<endl;
cout<<"Provide "<<dia<<" # @ "<<spy<<" mm c/c in longer span."<<endl;
cout<<"Provide "<<8<<" # @ "<<spr<<" mm c/c as distri. steel."<<endl;
}
};
void main()
{
clrscr();
cout.precision(3);
slab s1;
s1.getdata();
s1.getcal();
s1.getout();
getch();
}

22

INPUT - OUTPUT
Enter the grade of concrete :20
Enter the grade of steel :415
Working external load (kn/m):20
Shorter span & Longer span (m):2 2
diameter of reinforcement :10
Assume Eff depth of slab :120
Eff. depth reqd for slab is :73.721
Provided depth is O.K.
Value of Constants of Moments for ly/lx :1,
Qx= .52
Qy = .52
Eff depth of slab :120 mm
Provide 10 # @ 300 mm c/c in shorter span.
Provide 10 # @ 300 mm c/c in longer span.
Provide 8 # @ 300 mm c/c as distri. steel.

23

// Analysis of Isolated rectangular footing.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<iomanip.h>
class footing
{
private:
float l,Pu;
float Asc,pt,L,B,d1,d2,Mu1,Mu2,k;
int fy,fck;
float p,fcbc,Sbc,dr,dr1,dr2,d;
public:
void getdata()
{
cout<<"Enter the grade of concrete :";cin>>fck;
cout<<"Enter the grade of steel :";cin>>fy;
cout<<"Working axially load on cloumn (kn):";cin>>Pu;
cout<<"Area of steel in col. (mm2):";cin>>Asc;
cout<<"Size of rect. col. (b x d) :";cin>>d1>>d2;
cout<<"Length Width and eff. depth of footing :";cin>>L>>B>>d;
cout<<"safe bearing capacity of soil :";cin>>Sbc;
cout<<"Permi. Compressive Stress in Concrete:";cin>>fcbc;
}
void getcal()
{
if (fy==250) k=0.149;
if (fy==415) k=0.138;
if (fy==500) k=0.133;
Pu=1.1*Pu*1000;
p=Pu/(L*B);
if (p<fcbc) cout<<"Upward pressure is less than fcbc..OK."<<endl;
if (p>fcbc) {cout<<"Upward Pressure is more than fcbc."<<endl;
cout<<"Size of footing is to incease."<<endl;}
Mu1=p*B*(L-d1)*(L-d2)/8;
dr1=sqrt(Mu1/(k*fck*B));
Mu2=p*L*(B-d1)*(B-d2)/8;
dr2=sqrt(Mu2/(k*fck*L));
dr=dr1>dr2?dr1:dr2;
24

cout<<"Min. eff. depth reqd. is :"<<dr<<endl;


if (dr<d) cout<<"Provided depth is O.K."<<endl;
if (dr>d) cout<<"Provided depth is less than reqd."<<endl;
}
void getout()
{
cout<<endl;
cout<<"------------------ Analysis Data ---------------------"<<endl;
cout<<endl;
cout<<"Moment parallel to breadth:"<<Mu1/1e06<< " kn-m"<<endl;
cout<<"Moment parallel to Length:"<<Mu2/1e06<< " kn-m"<<endl;
cout<<endl;
cout<<"--------------------------------------------------"<<endl;
cout<<endl;
}
};
void main()
{
clrscr();
cout.precision(3);
footing f1;
f1.getdata();
f1.getcal();
f1.getout();
getch();
}
INPUT - OUTPUT
Enter the grade of concrete :20
Enter the grade of steel :415
Working axially load on cloumn (kn):1200
Area of steel in col. (mm2):1000
Size of rect. col. (b x d) :400 300
Length Width and eff. depth of footing :2200 1800 300
safe bearing capacity of soil :200
Permi. Compressive Stress in Concrete:5
Upward pressure is less than fcbc..OK.
Min. eff. depth reqd. is :227.223
Provided depth is O.K.
------------------ Analysis Data --------------------Moment parallel to breadth:256.5 kn-m
Moment parallel to Length:192.5 kn-m
-------------------------------------------------25

// Analysis of Isolated circular footiing.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<iomanip.h>
class footing
{
private:
float Pu,Sbc,Q;
float r1,r2,d1,d2,p,dr,Mu;
int fck,fy;
float m,k,j,fcbc,fst;
public:
void getdata()
{
cout<<"Enter the value of Grade of concrete & steel ";cin>>fck>>fy;
cout<<"Working axially load on cloumn (kn):";cin>>Pu;
cout<<"Diameter of col. :";cin>>d1;
cout<<"Safe bearing capacity of Soil :";cin>>Sbc;
}
void getcal()
{
Pu=1.1*Pu*1000;
r2=sqrt(Pu/(3.14*Sbc*1000));
r2=r2*1000;
r1=d1/2;
p=Pu/(3.14*r2*r2);
Mu=p*3.14*(r2-r1)*((3*r2*r2)-(2*r1*r2)-(2*r1*r1))/20;
switch(fck)
{
case 20:
fcbc=7;
break;
case 25:
fcbc=8.5;
break;
case 30:
fcbc=10;
break;
default :
cout<<"Enter correct values of fck"<<endl;
26

}
switch(fy)
{
case 250:
fst=140;
break;
case 415:
fst=190;
break;
}
m=280/(3*fcbc);
k=1/(1+(fst/(m*fcbc)));
j=1-(k/3);
Q=0.5*fcbc*k*j;
dr=sqrt(Mu/(Q*3.14*0.5*r1));
}
void getout()
{
cout<<endl;
cout<<"------------------ Analysis Data ---------------------"<<endl;
cout<<endl;
cout<<"Diameter of footing :"<<2*r2<<" mm"<<endl;
cout<<"Depth reqd. tobe provided : "<<dr<<" mm"<<endl;
cout<<endl;
cout<<"--------------------------------------------------"<<endl;
cout<<endl;
}
};
void main()
{
clrscr();
cout.precision(3);
footing f1;
f1.getdata();
f1.getcal();
f1.getout();
getch();
}

27

INPUT - OUTPUT
Enter the value of Grade of concrete & steel 20 415
Working axially load on cloumn (kn):1000
Diameter of col. :500
Safe bearing capacity of Soil :200
------------------ Analysis Data --------------------Diameter of footing :2646.955 mm
Depth reqd. to be provided : 611.44 mm
-------------------------------------------------2
Enter the value of Grade of concrete & steel 20 250
Working axially load on cloumn (kn):800
Diameter of col. :400
Safe bearing capacity of Soil :140
------------------ Analysis Data --------------------Diameter of footing :2829.714 mm
Depth reqd. to be provided : 612.893 mm
--------------------------------------------------

28

// Design of Isolated circular footiing.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<iomanip.h>
class footing
{
private:
float Pu,Sbc,Q;
float At,r1,r2,d1,d2,p,dr,Mu;
int fck,fy,at,sp;
float m,k,j,fcbc,fst,dia;
public:
void getdata()
{
cout<<"Enter the value of Grade of concrete & steel ";cin>>fck>>fy;
cout<<"Working axially load on cloumn (kn):";cin>>Pu;
cout<<"Diameter of col. :";cin>>d1;
cout<<"Safe bearing capacity of Soil :";cin>>Sbc;
cout<<"Daimeret of reinforcement :";cin>>dia;
}
void getcal()
{
Pu=1.1*Pu*1000;
r2=sqrt(Pu/(3.14*Sbc*1000));
r2=r2*1000;
r1=d1/2;
p=Pu/(3.14*r2*r2);
Mu=p*3.14*(r2-r1)*((3*r2*r2)-(2*r1*r2)-(2*r1*r1))/20;
switch(fck)
{
case 20:
fcbc=7;
break;
case 25:
fcbc=8.5;
break;
case 30:
fcbc=10;
break;
default :
cout<<"Enter correct values of fck"<<endl;
29

}
switch(fy)
{
case 250:
fst=140;
break;
case 415:
fst=190;
break;
}
m=280/(3*fcbc);
k=1/(1+(fst/(m*fcbc)));
j=1-(k/3);
Q=0.5*fcbc*k*j;
dr=sqrt(Mu/(Q*3.14*0.5*r1));
At=Mu/(Q*fst*dr);
at=3.14*0.25*dia*dia;
sp=At/at;
sp=sp+1;
}
void getout()
{
cout<<endl;
cout<<"------------------ Analysis Data ---------------------"<<endl;
cout<<endl;
cout<<"Diameter of footing :"<<2*r2<<" mm"<<endl;
cout<<"Min Depth reqd. tobe provided : "<<dr<<" mm"<<endl;
cout<<"Area of steel (both way ) :"<<At<<" ("<<sp<<" nos. of bar of "<<dia<<
"# )"<<endl;
cout<<endl;
cout<<"--------------------------------------------------"<<endl;
cout<<endl;
}
};
void main()
{
clrscr();
cout.precision(3);
footing f1;
f1.getdata();
f1.getcal();
f1.getout();
getch();
}
30

INPUT - OUTPUT
Enter the value of Grade of concrete & steel 20 415
Working axially load on cloumn (kn):1000
Diameter of col. :500
Safe bearing capacity of Soil :200
Daimeret of reinforcement :10
------------------ Analysis Data --------------------Diameter of footing :2646.955 mm
Min Depth reqd. tobe provided : 611.44 mm
Area of steel (both way ) :1263.105 (17 nos. of bar of 10# )
--------------------------------------------------

31

32

// Design of rectangular combined footing.


#include<iostream.h>
#include<math.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<iomanip.h>
class footing
{
private:
float Pu,Sbc,Q;
float At,c1,c2,d1,d2,L,B,p,dr,Mu,Ar,x,l;
int fck,fy,at,sp;
float m,k,j,fcbc,fst,dia,P1,P2,a,b,x1;
public:
void getdata()
{
cout<<"Enter the value of Grade of concrete & steel:";cin>>fck>>fy;
cout<<"Working axially load on cloumn1 (kn):";cin>>P1;
cout<<"Working axially load on cloumn2 (kn):";cin>>P2;
cout<<"Size of sqare col.-1 :";cin>>d1;
cout<<"Size of sqare col.-2 :";cin>>d2;
cout<<"Dist. between two col. :";cin>>l;
cout<<"Safe bearing capacity of Soil :";cin>>Sbc;
cout<<"Daimeret of reinforcement :";cin>>dia;
}
void getcal()
{
Pu=1.1*(P1+P2)*1000;
Ar=Pu/(Sbc*1000);
cout<<"Area of footing comes...:"<<Ar<<endl;
cout<<"Enter the Breadth of footing :";cin>>B;
L=Ar/B;
change:
cout<<"Length of footing...:"<<L<<endl;
cout<<"Round off the Length..:";cin>>L;
L=L*1000;
B=B*1000;
x=(P2*l)/(P1+P2);
a=(L/2)-x;
b= (L/2)-(l-x);
if(a<0 || b<0) {cout<<"Projection not sufficient change size"<<endl;
goto change;}
switch(fck)
33

{
case 20:
fcbc=7;
break;
case 25:
fcbc=8.5;
break;
case 30:
fcbc=10;
break;
default :
cout<<"Enter correct values of fck"<<endl;
}
switch(fy)
{
case 250:
fst=140;
break;
case 415:
fst=190;
break;
}
m=280/(3*fcbc);
k=1/(1+(fst/(m*fcbc)));
j=1-(k/3);
Q=0.5*fcbc*k*j;
p=(P1+P2)/(L*B);
x1=(P1/(p*B))-a;
Mu=(P1+P2)*1000*x1;
dr=sqrt(Mu/(Q*B));
At=Mu/(Q*fst*dr);
at=3.14*0.25*dia*dia;
sp=At/at;
sp=sp+1;
}
void getout()
{
cout<<endl;
cout<<"------------------ Design Data ---------------------"<<endl;
cout<<endl;
cout<<"Size of Combined footing :"<<L <<" X "<<B<<" mm"<<endl;
cout<<"Projection::from Col 1:"<<a<<" and from col.2:"<<b<<" mm"<<endl;
cout<<"Min Depth reqd. tobe provided : "<<dr<<" mm"<<endl;
cout<<"Area of steel :"<<At<<" ("<<sp<<" nos. of bar of "<<dia<< "# )"<<endl;
cout<<endl;
cout<<"--------------------------------------------------"<<endl;
34

cout<<endl;
}
};
void main()
{
clrscr();
cout.precision(3);
footing f1;
f1.getdata();
f1.getcal();
f1.getout();
getch();
}

35

INPUT - OUTPUT
Enter the value of Grade of concrete & steel:20 415
Working axially load on cloumn1 (kn):600
Working axially load on cloumn2 (kn):800
Size of sqare col.-1 :320
Size of sqare col.-2 :400
Dist. between two col. :3500
Safe bearing capacity of Soil :150
Daimeret of reinforcement :16
Area of footing comes...:10.267
Enter the Breadth of footing :2.1
Lngth of footing...:4.889
Round off the Length..:5
------------------ Design Data --------------------Size of Combined footing :5000 X 2100 mm
Projection::from Col 1: 500 and from col.2: 1000 mm
Min Depth reqd. tobe provided : 1033.018 mm
Area of steel :11417.566 (58 nos. of bar of 16# )
-------------------------------------------------2
Enter the value of Grade of concrete & steel:20 415
Working axially load on cloumn1 (kn):800
Working axially load on cloumn2 (kn):600
Size of sqare col.-1 :320
Size of sqare col.-2 :400
Dist. between two col. :3000
Safe bearing capacity of Soil :150
Daimeret of reinforcement :20
Area of footing comes...:10.267
Enter the Breadth of footing :2.1
Length of footing...:4.889
Round off the Length..:5
------------------ Design Data --------------------Size of Combined footing :5000 X 2100 mm
Projection::from Col 1: 1214.286 and from col.2: 785.714 mm
Min Depth reqd. tobe provided : 1033.018 mm
Area of steel :11417.566 (37 nos. of bar of 20# )
--------------------------------------------------

36

// Use of OVERLOADING in program.


#include<fstream.h>
#include<math.h>
#include<conio.h>
#include<iomanip.h>
int n;
float kvalue(float,float);
float kvalue(float,float,int);
float netarea(float,float,float);
void main()
{
clrscr();
int a,b,t,n,d,fy;
float A1,A2,Anet,D,k,k1,k2,T_cap;
cout<<"Enter the length l1,l2 and t:";
cin>>a>>b>>t;
cout<<"Enter the dia of rivet:";
cin>>d;
cout<<"What is the stress of steel:";
cin>>fy;
cout<<"Type of Section::
"1.Single 2.Double(same side): ";cin>>n;
if (d<=25) D=1.5+d;
if (d>25) D=2+d;
A1=(a-D-(t/2))*t;
A2=(b-(t/2))*t;
if(n==1)
{ k1=kvalue(A1,A2);
Anet=A1+k1*A2;}
if(n==2)
{ k2=kvalue(A1,A2,t);
Anet=2*(A1+k2*A2); }
T_cap=Anet*0.6*fy;
cout<<"Tensile Strength of member in KN ::"<<T_cap/1000<<endl;
getch();
}
float kvalue(float A1,float A2)
{return(3*A1/(3*A1+A2));}
float kvalue(float A1,float A2,int t)
{
return(5*A1/(5*A1+A2));}

37

INPUT - OUTPUT
1
Enter the length l1,l2 and t:110 110 10
Enter the dia of rivet:20
What is the stress of steel:250
Type of Section:: 1.Single 2.Double(same side)1
Tensile Strength of member in KN ::236.231018
2
Enter the length l1,l2 and t:110 110 10
Enter the dia of rivet:20
What is the stress of steel:250
Type of Section:: 1.Single 2.Double(same side)2
Tensile Strength of member in KN ::502.198547

38

// PROGRAM TO DESIGN AN AXIALLY LOADED SHORT COLUMN


#include<iostream.h>
#include<conio.h>
#include<math.h>
class column
{
public:
float p,pu,fck,l,le,Ag,As,fy,bx,pt,b,D,b1,e1,e2,emin,emin1;
void design()
{
cout<<"Enter the values of fck and fy in N/sq.mm : ";
cin>>fck>>fy;
cout<<"\nEnter unsupported length of column in m : ";
cin>>l;
cout<<"\nEnter the magnitude of axial load in kN : ";
cin>>p;
pu = 1.5*p;
cout<<"\nEnter the co-efficient for the effective length of the column from the
restrain condition : ";
cin>>bx;
le = bx*l;
cout<<"\nEnter the percentage of steel : ";
cin>>pt;
Ag = (pu*1000)/((0.4*fck)+(pt*(0.67*fy-0.4*fck))/100);
cout<<"\nGross area of concret required in sq.mm = "<<Ag;
cout<<"\nProvide depth of column in mm = ";
cin>>D;
b1 = Ag/D;
cout<<"\nTherefore the required width of column in mm is = "<<b1;
cout<<"\nTherefore provided width of the column in mm is = ";
cin>>b;
cout<<"\nThe designed section is " <<D<< " x " <<b<< " mm";
As = pt*b*D/100;
cout<<"\nThe area of reinforcement in sq.mm is = "<<As;
emin = l*1000/500 + D/30;
emin1 = l*1000/500 + b/30;
e1 = emin/D;
e2 = emin1/b;
if(e1<=0.05 && e2<=0.05)
{
cout<<"\nMinimum eccentricity ratio in the longer dimension is "<<e1;
cout<<"\nMinimum eccentricity ratio in the shorter dimension is "<<e2;
cout<<"\nPermissible eccentricity ratio is 0.05"<<"\nTherefore section is O.K.";
}
else
{
39

cout<<"\nMinimum eccentricity ratio in the longer dimension is "<<e1;


cout<<"\nMinimum eccentricity ratio in the shorter dimension is "<<e2;
cout<<"\nPermissible eccentricity ratio is 0.05";
cout<<"\nTherefore section should be revised.";
}
}
}
main()
{
clrscr();
column c1;
c1.design();
getch();
}
INPUT
Enter the values of fck and fy in N/sq.mm : 20 415
Enter unsupported length of column in m : 3
Enter the magnitude of axial load in kN : 1000
Enter the co-efficient for the effective length of the column from the restrain
Condition : 1
Enter the percentage of steel : 1
Gross area of concret required in sq.mm = 140180.359375
Provide depth of column in mm = 400
Therefore the required width of column in mm is = 350.450897
Therefore provided width of the column in mm is = 400
OUTPUT
The designed section is 400 x 400 mm
The area of reinforcement in sq.mm is = 1600
Minimum eccentricity ratio in the longer dimension is 0.048333
Minimum eccentricity ratio in the shorter dimension is 0.048333
Permissible eccentricity ratio is 0.05
Therefore section is O.K.

40

/*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,c2;
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 width of the beam in mm:";
cin>>b;
cout<<"\nGive the overall depth of the beam in mm:";
cin>>D;
cout<<"\nGive the effective cover to the tension steel in mm:";
cin>>c1;
cout<<"\nGive the effective cover to the compression steel:";
cin>>c2;
cout<<"\nGive the Ultimate(Factored) Moment for design in kN-m:";
cin>>Mu;
//
cout<<"\nGive the 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;
41

}
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)
42

{
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)
{
fsc=288.7+(18.0*(abs-0.00144)/(0.00019));
}
else if(abs>0.00163 && abs<=0.00192)
{
fsc=306.7+(18.1*(abs-0.00163)/(0.00029));
}
else if(abs>0.00192 && abs<=0.00241)
{
fsc=324.8+(18.0*(abs-0.00192)/(0.00049));
}
else if(abs>0.00241 && abs<=0.00276)
{
fsc=342.8+(9.0*(abs-0.00241)/(0.00035));
}
else if(abs>0.00276 && abs<0.00380)
{
fsc=351.8+(9.1*(abs-0.00276)/(0.00104));
}
else if(abs>=0.00380)
{
fsc=360.9;
}
}
}
//cout<<"fsc="<<fsc<<endl;
Asc=Mu2/((fsc)*(d-c2));
}
}//Main function starts
void main()
43

{
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

44

45

// DESIGN OF BIAXIAL COLUMN


#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float b,d,d1,fy,fck,a,b1,c,d2,l,le,eminx,eminy,p,C1,C2,An,e,f;
double P,Pu,Mux,Muy,Meminx,Meminy,Mux1,Muy1,Puz,Asc,Muminx,Muminy;
cout<<"Enter the grade of concrete and steel"<<endl;
cin>>fck;
cin>>fy;
cout<<"Enter the dimensions of the column"<<endl;
cin>>b;
cin>>d;
cout<<"Enter the load on column:"<<endl;
cin>>P;
Pu=1.5*P;
cout<<"Enter the cover";
cin>>d1;
cout<<"Enter the unsupported length of the column "<<endl;
cin>>l;
cout<<"Enter the effective length of the column "<<endl;
cin>>le;
cout<<"enter the ultimate moment on Xaxis and Y axis respectively"<<endl;
cin>>Mux;
cin>>Muy;
eminx =(l/500)+(d/30);
eminy=(l/500)+(d/30);
if(eminx>20)
eminx=eminx;
else
eminx=20;
if(eminy>20)
eminy=eminy;
else
eminy=20;
Muminx=Pu*eminx;
if(Muminx>Mux)
Mux=Muminx;
else
Mux=Mux;
Muminy=Pu*eminy;
if(Muminy>Muy)
Muy=Muminy;
else
Muy=Muy;
46

cout<<"Enter the percentage of steel"<<endl;


cin>>p;
Asc=(p*b*d/100);
a=(p/fck);
cout<<"The value of p/fck is "<<a<<endl;
b1=(Pu/(fck*b*d));
c=(d1/d);
d2=(d1/b);
cout<<"Enter the coefficient from the code"<<endl;
cin>>C1;
Mux1=C1*fck*b*d*d;
cout<<"enter the coefficient from The SP 16"<<endl;
cin>>C2;
Muy1=C2*fck*b*b*d;
Puz=(0.45*fck*b*d)+(0.75*fy-0.45*fck)*Asc;
e=(Pu/Puz);
cout<<"Get the value of An from value of Pu/Puz"<<endl;
cin>>An;
f=pow((Mux/Mux1),An)+pow((Muy/Muy1),An);
if(f<1)
cout<<"The design is ok"<<endl;
else
cout<<"Change the percentage of steel";
getch();
}

47

//DESIGN CONSTANTS FOR BALANCED SECTION


#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define Es 200000
#define ecu 0.0035
class section
{
int fck,fy;
float b,d,xu_max,ku_max,Mur_max,Ast_max,pt_max,es,Ec,fcr,D,dc;
public:
void getdata();
void display();
};
void section :: getdata()
{
cout<<"Give the value of grade of concrete (n/mm2)"<<"\n";
cin>>fck;
cout<<"Give the value of grade of steel (n/mm2)"<<"\n";
cin>>fy;
cout<<"Give the value of width of beam (mm)"<<"\n";
cin>>b;
cout<<"Give the value of effective depth of beam (mm)"<<"\n";
cin>>d;
cout<<"Give the value of effective cover of beam (mm)"<<"\n";
cin>>dc;
D = d + dc;
xu_max = (700/(1100 + 0.87*fy))*d;
ku_max = xu_max/d;
Mur_max = 0.36*fck*b*xu_max*(d-0.42*xu_max)*pow(10,-6);
Ast_max = (0.36*fck*b*xu_max)/(0.87*fy);
pt_max = (Ast_max/(b*d))*100;
es = (0.002 + (0.87*fy/Es));
Ec = 5700*sqrt(fck);
fcr = 0.7*sqrt(fck);
}
void section :: display()
{
cout<<"--------PROPERTIES OF BALANCED
SECTION-------------------------"<<"\n";
cout<<"Grade of concrete M"<<fck<<"\n";
cout<<"Grade of steel Fe"<<fy<<"\n";
cout<<"Overall Section of beam :"<<b<<"mm x"<<D<<"mm"<<"\n";
48

cout<<"maximum depth of N.A.(xu_max) ="<<xu_max<<"mm"<<"\n";


cout<<"maximum tension reinforcement:(Ast_max) ="<<Ast_max<<"mm2"<<"\n";
cout<<"maximum percentage of tension steel:(pt_max) ="<<pt_max<<"%"<<"\n";
cout<<"maximum moment of resistance:(Mur_max) =
"<<Mur_max<<"Kn.m"<<"\n";
cout<<"maximum tensile strain:(es) = "<<es<<"\n";
cout<<"maximum compressive strain:(ecu) ="<<ecu<<"\n";
cout<<"flexural cracking strength:(fcr) = "<<fcr<<"n/mm2"<<"\n";
cout<<"short term modulas of elasticity of concrete(Ec) ="<<Ec<<"n/mm2"<<"\n";
cout<<"---------------------------------------------------------------";
}
int main()
{
clrscr();
section A;
A.getdata();
A.display();
getch();
return 0;
}
INPUT
Give the value of grade of concrete (n/mm2)
20
Give the value of grade of steel (n/mm2)
415
Give the value of width of beam (mm)
300
Give the value of effective depth of beam (mm)
505
Give the value of effective cover of beam (mm)
25
OUTPUT
--------PROPERTIES OF BALANCED SECTION------------------------Grade of concrete M20
Grade of steel Fe415
Overall Section of beam :300mm x530mm
maximum depth of N.A.(xu_max) =241.94928mm
maximum tension reinforcement:(Ast_max) =1447.473877mm2
maximum percentage of tension steel:(pt_max) =0.955428%
maximum moment of resistance:(Mur_max) = 210.811279Kn.m
maximum tensile strain:(es) = 0.003805
maximum compressive strain:(ecu) =0.0035
flexural cracking strength:(fcr) = 3.130495n/mm2
short term modulas of elasticity of concrete(Ec) =25491.175781n/mm2
--------------------------------------------------------------49

// CHECK FOR DEVELOPMENT LENGTH


#include<iostream.h>
#include<math.h>
#include<conio.h>
class DL
{
int fy,fck;
float tbd,dia,k,ld,ldp,d,m,sf,lo,Tbd;
public:
void getdata();
void display();
};
void DL :: getdata()
{
cout<<"enter the value of fck & fy (n/mm2)"<<"\n";
cin>>fck>>fy;
cout<<"enter the diameter of bar (mm)"<<"\n";
cin>>dia;
cout<<"enter the value of design bond stress (n/mm2)"<<"\n";
cin>>tbd;
cout<<"enter the value of effective depth (mm)"<<"\n";
cin>>d;
cout<<"enter the value of moment (kn.m)"<<"\n";
cin>>m;
cout<<"enter the value of s.f. (kn)"<<"\n";
cin>>sf;
if(fck==15)
{tbd = 1.0;
}
if(fck==20)
{tbd = 1.2;
}
if(fck==25)
{tbd = 1.4;
}
if(fck==30)
{tbd = 1.5;
}
if(fck==35)
{tbd = 1.7;
}
if(fck==40)
{tbd = 1.9;
}
if(fy==415)
50

{Tbd = tbd*1.6;
}
if(d> (12*dia))
{
lo = d;
}
else
{
lo = 12*dia;
}
if(fy==415)
{
k = (0.87*fy)/(4*Tbd);
}
else
{
k = (0.87*fy)/(4*tbd);
}
ld = k*dia;
ldp = ((1.3*m/sf)*1000) + lo;
if(ld < ldp)
{
cout<<"the development check is o.k."<<"\n";
}
else
{
cout<<"the development check is not o.k."<<"\n";
}
}
void DL :: display()
{
cout<<"k = "<<k<<"\n";
cout<<"lo = "<<lo<<"\n";
cout<<"ld = "<<ld<<"\n";
cout<<"ldp = "<<ldp<<"\n";
}
int main()
{
clrscr();
DL A;
A.getdata();
A.display();
getch();
return 0;
}
51

INPUT
enter the value of fck & fy (n/mm2)
20 415
enter the diameter of bar (mm)
20
enter the value of design bond stress (n/mm2)
1.3
enter the value of effective depth (mm)
450
enter the value of moment (kn.m)
125
enter the value of s.f. (kn)
200
OUTPUT
the development check is o.k.
k = 47.011719
lo = 450
ld = 940.234375
ldp = 1262.5

52

// PROGRAM TO FIND OUT FIXED END ACTIONS


#include<iostream.h>
#include<conio.h>
#include<math.h>
class fea
{
int choice;
float a,b,l,s,Ma,Mb,P,w,wl,wr,M;
public:
void input()
{
cout<<"\n Given case for loads on a fixed beam\n";
cout<<"1. Concentric or Point load. \n";
cout<<"2. Uniformly distributed load. \n";
cout<<"3. Uniformly varying load. \n";
cout<<"4. Applied moment or a couple. \n";
cout<<"\n";
cout<<"\nEnter your case : ";
cin>>choice;
cout<<"\n";
}
void result()
{
switch(choice)
{
case 1:
cout<<"Enter the span of beam in m : ";
cin>>l;
cout<<"Enter the value of load in kN : ";
cin>>P;
cout<<"\nEnter the distance of point load from the left support in m : ";
cin>>a;
b = l - a;
Ma = (P*a*b*b)/(l*l);
Mb = (P*b*a*a)/(l*l);
cout<<"\nThe value of fixed end moment at left support is "<<Ma<<" kN-m <anticlockwise> ";
cout<<"\nThe value of fixed end moment at right support is "<<Mb<<" kN-m
<clockwise> ";
break;
case 2:
cout<<"Enter the span of beam in m : ";
cin>>l;
cout<<"Enter the value of uniformly distributed load in kN/m : ";
cin>>w;
53

cout<<"\nEnter the distance of load from the left support in m : ";


cin>>a;
b = l - a;
Ma = (w*a*a)*((2*l)*((3*l)-(4*a))+(3*a*a)) / (12*l*l);
Mb = (w*a*a*a)*((4*l)-(3*a)) / (12*l*l);
cout<<"\nThe value of fixed end moment at left support is "<<Ma<<" kN-m <anticlockwise> ";
cout<<"\nThe value of fixed end moment at right support is "<<Mb<<" kN-m
<clockwise> ";
break;
case 3:
cout<<"Enter the span of beam in m : ";
cin>>l;
cout<<"Enter the value of uniformly varying load in kN/m : ";
cin>>w;
cout<<"\nEnter the value of uniformly varying load at the left support in kN/m : ";
cin>>wl;
cout<<"\nEnter the value of uniformly varying load at the right support in kN/m : ";
cin>>wr;
if(wl==0)
{
Ma = (w*l*l)/(30);
Mb = (w*l*l)/(20);
cout<<"\nThe value of fixed end moment at left support is "<<Ma<<" kN-m <anticlockwise> ";
cout<<"\nThe value of fixed end moment at right support is "<<Mb<<" kN-m
<clockwise> ";
}
else
{
Ma = (w*l*l)/(20);
Mb = (w*l*l)/(30);
cout<<"\nThe value of fixed end moment at left support is "<<Ma<<" kN-m <anticlockwise> ";
cout<<"\nThe value of fixed end moment at right support is "<<Mb<<" kN-m
<clockwise> ";
}
break;
case 4:
cout<<"Enter the span of beam in m : ";
cin>>l;
cout<<"Enter the value of applied moment or couple in kN-m : ";
cin>>M;
cout<<"\nEnter the distance of moment from the left support in m : ";
cin>>a;
b = l - a;
Ma = (M*b)*(2-((3*b)/l)) / (l);
54

Mb = (M*a)*(2-((3*a)/l)) / (l);
cout<<"\nThe value of fixed end moment at left support is "<<Ma<<" kN-m ";
cout<<"\nThe value of fixed end moment at right support is "<<Mb<<" kN-m ";
cout<<"\nBoth the fixed end reactive moments are in the same direction \n\t\tas
they are applied\n";
break;
}
}
};
void main()
{
fea b1,b2;
b1.input();
b1.result();
getch();
}
INPUT
Given case for loads on a fixed beam
1. Concentric or Point load.
2. Uniformly distributed load.
3. Uniformly varying load.
4. Applied moment or a couple.
Enter your case : 1
Enter the span of beam in m : 5
Enter the value of load in kN : 20
Enter the distance of point load from the left support in m : 2.5
OUTPUT
The value of fixed end moment at left support is 12.5 kN-m <anti-clockwise>
The value of fixed end moment at right support is 12.5 kN-m <clockwise>

55

// A GENERALISED PROGRAM FOR DESIGN OF RCC ISOLATED


FOOTING
#include<iostream.h>
#include<conio.h>
#include<math.h>
class isofooting
{
float l,bc,we,fck,fy,de,fac,cb,cd,x,w,W,a,dim,diff,b,d,ar;
float pre,D,bm,fdd,fd,fde,pp,qq,t,st1,st2,ast,diffe,Ast,dia;
float spacing,diffee,bt,spac,Vu,Vu1,Tv,Tv1,pt,Tc,Tc1,ks,ks1,term;
public:
void entre(void);
void area(void);
void depth(void);
void steel(void);
void shearone(void);
void sheartwo(void);
};
inline void isofooting :: entre(void)
{
cout<<"\n"<<"Enter the value of column load in KN:";
cin>>l;
cout<<"\n"<<"baring capacity of soil in kN/m2 is:";
cin>>bc;
cout<<"\n"<<"unit weight of earth in kN/m3 is:";
cin>>we;
cout<<"\n"<<"characteristic strength of concrete in N/mm2 is :";
cin>>fck;
cout<<"\n"<<"approximate depth of footing in m is :";
cin>>de;
cout<<"\n"<<"load factor:";
cin>>fac;
cout<<"\n"<<"The size of column is breadth by depth in cm x cm is:";
cin>>cb>>cd;
fy=415;
}
void isofooting::area (void)
{
cout<<"\n"<<"DIMENTION OF FOOTING";
x=(l/bc);
/*APPROXIMATE AREA OF FOOTING*/
w=((we)*(de)*(x));/* WEIGHT OF FOOTING INCLUDING*/
W=(w+l); /*ACTUAL WEIGHT OF FOOTING INCLUDING*/
/*EARTH*/
56

a=(W/bc); /*REQUIRED AREA OF FOOTING*/


dim=sqrt(a);
diff=floor(dim);
b=d=(diff+0.5);
ar=(b*d); /*PROVIDE AREA OF FOOTING*/
cout<<"\n"<<"\n"<<"AREA OF SQUARE FOOTING:"<<ar;
cout<<"\n"<<"\n"<<"HAVING DIMENTION OF :"<<b<<" x "<<d;
if(ar>a)
{
cout<<"\n"<<"\n"<<"PROVIDED FOOTING AREA IS SAFE AGAINST
LOADING";
}
pre=((l*fac))/(ar);/*THE NET EARTH PRESSURE ACTING*/
/*UPWARD DUE TO FACTORED LOADING*/
}
void isofooting :: depth(void)
{
D = ((0.5*0.5)*(b-(cb*0.01)))*(b-(cb*0.01));
bm =((pre)*(d)*(D)*(0.5)*(1000000));
bt =((0.138)*(fck)*(b)*(1000));
/*BENDING MOMENT ABOUT SHORTER DIMENTION*/
fdd =(bm/bt);
fd = pow(fdd,0.5);
cout<<"\n"<<"\n"<<"DEPTH OF FOOTING IN mm IS :"<<fd;
if(fd<560)
{
fde= 560;
cout<<"\n"<<"\n"<<"PROVIDE DEPTH OF FOOTING:"<<fde<<"mm";
}
else
{
fde =fd;
cout<<"\n"<<"\n"<<" PROVIDE DEPTH OF FOOTING "<<fde<<"mm";
}
}
void isofooting:: steel (void)
{
cout<<"\n"<<"CALCULATION OF STEEL";
pp =(((fde)*((b)*(1000))*(fck))/(fy));
qq = (((bm)*(fck)*(b)*(1000))/((0.87)*(fy)*(fy)));
t = (((pp)*(pp))-((4)*(qq)));
st1 = ((pp + sqrt(t))*(0.5));
st2 = ((pp - sqrt(t))*(0.5));
if ( st1 < st2)
{
ast = st1;
}
57

else
{
ast = st2;
}
cout<<"\n"<<"\n"<<"CALCULATED VALUE OF STEEL IS: "<< ast;
diffe = (ast/10);
diffee = ceil(diffe);
Ast = (((diffee)*(10)) + (10));
cout<<"\n"<<"\n"<<"Enter dia of steel to provide in footing in mm:";
cin>>dia;
spacing = (((3.14)*(250)*(dia)*(dia)/(Ast)));
if(spacing<100)
{
spac = 100;
}
else
{
spac = spacing;
}
cout<<"\n"<<"\n"<<"PROVIDE STEEL OF"<<Ast<<"mm2";
cout<<"\n"<<"\n"<<"AREA HAVING DIA OF "<<dia<<"mm";
cout<<"\n"<<"\n"<<"AT SPACING "<<spac<<"mm";
}
void isofooting :: shearone(void)
{
cout<<"\n"<<"\n"<<"CHECKS";
/* SHEAR ONE WAY ACTION */
/*shear force at critical section fde m away from column face*/
Vu = ((pre)*((0.001)*(d))*(((0.5)*(((b)*(0.001))-(cb*0.01)))-(fde*0.001)));
/* Nominal shear stress */
Tv = ((Vu)/(b*fde));
pt = (((ast)*(100))/((b)*(1000)*(fde)));
cout<<"\n"<<"Percentage of the steel is :"<<pt;
cout<<"\n"<<"\n"<<"Grade of concrete is :"<<fck;
cout<<"\n"<<"\n"<<"Enter the value of shear strength of from IS:456 ";
cin>>Tc;
if (Tc>Tv)
{
cout<<"\n"<<"\n"<<"IT IS O.K.IN ONE WAY ACTION OF THE SHEAR";
}
else
{
cout<<"\n"<<"\n"<<"CHECK FOR ONE WAY ACTION IS NOT SATISFIED";
}
}
void isofooting :: sheartwo(void)
{
58

/* SHEAR TWO WAY ACTION */


/* Shear force */
term= ((b)*(0.01)) + ((fde)*(0.001));
Vu1 = ((pre)*(ar-sqrt(term)));
/* Nominal shear stress */
Tv1 = ((Vu1)*(1000))/((4)*(((cb)*(10)) + (fde))*(fde));
/* Shear strength */
ks = (0.5 + (cb/cd));
if (ks>=1)
{
ks1 = 1;
}
Tc1 = ((ks1)*pow(fck,0.5));
if (Tc1>Tv1)
{
cout<<"\n"<<"\n"<<"IT IS SAFE FOR TWO WAY ACTION OF THE SHEAR";
}
else
{
cout<<"\n"<<"\n"<<" MAKE PROVISION FOR THESAFETY AGAINST TWO
WYA ACTION";
}
}
void main()
{
clrscr();
isofooting i;
i.entre();
i.area();
i.depth();
i.steel();
i.shearone();
i.sheartwo();
getch();
}

59

INPUT OUTPUT
Enter the value of column load in KN:1200
baring capacity of soil in kN/m2 is:165
unit weight of earth in kN/m3 is:19
characteristic strength of concrete in N/mm2 is :25
approximate depth of footing in m is :1.5
load factor:1.5
The size of column is breadth by depth in cm x cm is:40 40
DIMENTION OF FOOTING
AREA OF SQUARE FOOTING:6.25
HAVING DIMENTION OF :2.5 x 2.5
DEPTH OF FOOTING IN mm IS :214.516647
PROVIDE DEPTH OF FOOTING:560mm
CALCULATION OF STEEL
CALCULATED VALUE OF STEEL IS: 2010.975464
Enter dia of steel to provide in footing in mm:10
PROVIDE STEEL OF2030mm2
AREA HAVING DIA OF 10mm
AT SPACING 100mm
CHECKS
Percentage of the steel is :0.143641
Grade of concrete is :25
Enter the value of shear strength of from IS:456 0.33
IT IS O.K.IN ONE WAY ACTION OF THE SHEAR
IT IS SAFE FOR TWO WAY ACTION OF THE SHEAR

60

/* MOMENT OF RESISTANCE OF SINGLY AND DOUBLY REINFORCED


BEAM*/
#include<iostream.h>
#include<conio.h>
#define pi 3.142857
void main()
{
clrscr();
int c,b,d,fck,fy,dia,n,dia1,n1;
float xu,Ast,xumax,Asc,fsc,dc,fsc1;
long double Mur;
cout<<"\n CASE1:SINGLY REINFORCED SECTION \n";
cout<<"\n CASE2:DOUBLY REINFORCED SECTION \n";
cin>>c;
switch(c)
{
case 1:
cout<<"THE M.R OF SINGLY REINFORCED SECTION IS \n";
cout<<"enter the value of b and d(mm)";
cin>>b>>d;
cout<<"Enter the grade of concrete and steel \n";
cin>>fck>>fy;
if(fy==250)
{
xumax=0.53*d;
}
else if(fy==415)
{
xumax=.48*d;
}
cout<<"Enter the diameter and number of bars \n";
cin>>dia>>n;
Ast=(n*pi*dia*dia)/4;
xu=(0.87*fy*Ast)/(0.36*fck*b);
cout<<"The depth of NEUTRAL AXIS IS"<<xu;
if(xu>xumax)
{
cout<<"\n Section is overreinforced";
xu=xumax;
Mur=0.36*fck*b*xu*(d-(0.42*xu));
cout<<"The moment of resistance is: \n"<<Mur;
}
else if(xu<xumax)
{
cout<<"The section is under reinforced \n";
xu=xu;
61

Mur=0.36*fck*b*xu*(d-(0.42*xu));
cout<<"The moment of resistance is: \n"<<Mur;
}
else if(xu=xumax)
{
cout<<"Section is balanced section";
xu=xumax;
Mur=0.36*fck*b*xu*(d-(0.42*xu));
cout<<"The moment of resistance is: \n"<<Mur;
}
break;
case 2:
cout<<"\n DOUBLY REINFORCED SECTION";
cout<<"enter the value of b and d(mm)";
cin>>b>>d;
cout<<"Enter the grade of concrete and steel \n";
cin>>fck>>fy;
if(fy==250)
{
xumax=0.53*d;
}
else if(fy==415)
{
xumax=.48*d;
}
cout<<"Enter the diameter and number of bars for Ast \n";
cin>>dia>>n;
cout<<"Enter the value of dc \n";
cin>>dc;
Ast=(n*pi*dia*dia)/4;
cout<<"Enter the diameter and number of bars for Asc \n";
cin>>dia1>>n1;
Asc=(n1*pi*dia1*dia1)/4;
fsc=0.87*fy;
xu=(0.87*fy*Ast-fsc*Asc)/(0.36*fck*b);
fsc1=700*(1-(dc/xu));
if(fsc1>fsc)
{
fsc=fsc;
}
else
{
fsc=fsc1;
}
cout<<" DEPTH OF NEUTRAL AXIS IS"<<xu;
if(xu<xumax)
{
62

cout<<"The section is over reinforced section \n";


xu=xumax;
Mur=0.36*fck*b*xu*(d-(0.42*xu))+(fsc*Asc*(d-dc));
cout<<"\n The moment of resistance is "<<Mur;
}
else if(xu<xumax)
{
cout<<"\n The section is under reinforced section";
xu=xu;
Mur=0.36*fck*b*xu*(d-(0.42*xu))+(fsc*Asc*(d-dc));
cout<<"\n The moment of resistance is "<<Mur;
}
}
getch();
}
INPUT - OUTPUT:
CASE1:SINGLY REINFORCED SECTION
CASE2:DOUBLY REINFORCED SECTION
1
THE M.R OF SINGLY REINFORCED SECTION IS
enter the value of b and d(mm) 230
380
Enter the grade of concrete and steel
20
415
Enter the diameter and number of bars
16
4
The depth of NEUTRAL AXIS IS175.416977The section is under reinforced
The moment of resistance is:
8.898447e+07

63

// SELECTION OF NUMBER - DIAMETER COMBINATION OF BAR


#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<math.h>
#include<iomanip.h>
class select
{
int dia,N,dh,de,bc,sp,dep,fck,fy;
float Astp,Ast,xu_max,Ast_max,b,d;
public:
void process();
};
void select :: process()
{
cout<<"Give the section of beam : width (mm) x effective depth (mm):"<<"\n";
cin>>b>>d;
cout<<"Give the value of tension reinforcement (mm2):"<<"\n";
cin>>Ast;
cout<<"Give the value of grade of concrete(n/mm2):"<<"\n";
cin>>fck;
cout<<"Give the value of grade of steel(n/mm2):"<<"\n";
cin>>fy;
xu_max = (700/(1100 + 0.87*fy))*d;
Ast_max = (0.36*fck*b*xu_max)/(0.87*fy);
cout<<"section of beam :"<<b<<" mm "<<"x"<<d<<" mm "<<" [Ast_max] =
"<<Ast_max<<"\n";
cout<<"-------------------------------------------------------------------------------"<<"\n";
cout<<" Number of bars"<<" Dia(mm) "<<" Ast(mm2) "<<" c/c spacing(mm)
"<<" side cover(mm) ";
cout<<"-------------------------------------------------------------------------------"<<"\n";
for(N=3;N<20;N++)
{
for(dia=6;dia<36;dia=dia+2)
{
if(dia<12)
de = 25;
else
de = 2*dia;
if(dia<24)
dh = 25;
else
64

dh = dia;
bc = (2*de + N*dia + (N-1)*dh);
Astp = N*0.7854*dia*dia;
sp = dh + dia;
dep = (b -(N*dia + (N-1)*dh))/2;
if( bc<=b && Astp>Ast && Ast_max>Astp )
{
cout<<"
"<<N<<"
"<<dia<<"
"<<setw(8)<<floor(Astp) <<"
"<<sp <<"
"<<dep<<"\n";
}
}
}
cout<<"-------------------------------------------------------------------------------"<<"\n";
}
// main programme
int main()
{
clrscr();
select A;
A.process();
getch();
return 0;
}

65

INPUT
Give the section of beam : width (mm) x effective depth (mm):
300 500
Give the value of tension reinforcement (mm2):
500
Give the value of grade of concrete(n/mm2):
20
Give the value of grade of steel(n/mm2):
415
OUTPUT
section of beam :300 mm x500 mm [Ast_max] = 1433.142456
------------------------------------------------------------------------------Number of bars Dia(mm) Ast(mm2)
c/c spacing(mm) side cover(mm) -----------------------------------------------------------------------------3
16
603
41
101
3
18
763
43
98
3
20
942
45
95
3
22
1140
47
92
3
24
1357
48
90
4
14
615
39
84
4
16
804
41
80
4
18
1017
43
76
4
20
1256
45
72
5
12
565
37
70
5
14
769
39
65
5
16
1005
41
60
5
18
1272
43
55
6
12
678
37
51
6
14
923
39
45
6
16
1206
41
39
7
10
549
35
40
7
12
791
37
33
-------------------------------------------------------------------------------

66

/*PROGRAM TO CALCULATE fsc FOR DESIGN OF DOUBLY


REINFORECED BEAM*/
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<stdio.h>
#define Es 200000
// INTERPOLATION OF STRESSES FROM STRAIN
class stress
{
int fy;
float xu,dc,fsc,esc;
public:
void getdata();
void process();
void display();
};
void stress :: getdata()
{
cout<<"Enter the grade of steel (n/mm2):"<<"\n";
cin>>fy;
}
void stress :: process()
{
if(fy==250)
{
cout<<"Enter the depth of neutral axis (mm):"<<"\n";
cin>>xu;
cout<<"Enter concrete cover to compression side (mm):"<<"\n";
cin>>dc;
fsc = Es*0.0035*(1-(dc/xu));
if(fsc<=217.5)
{
fsc = fsc;
}
else
{
fsc = 217.5;
}
}
if(fy==415)
{
cout<<"---------------------------"<<"\n";
cout<<"
Fe 415
"<<"\n";
cout<<"---------------------------"<<"\n";
cout<<" strain stress "<<"\n";
cout<<" 0.00144 288.7
"<<"\n";
cout<<" 0.00163 306.7
"<<"\n";
67

cout<<" 0.00192 324.8


"<<"\n";
cout<<" 0.00241 342.8
"<<"\n";
cout<<" 0.00276 351.8
"<<"\n";
cout<<" 0.00380 360.9
"<<"\n";
cout<<"---------------------------"<<"\n";
cout<<"Enter the value of strain from above table (esc):"<<"\n";
cin>>esc;
if(0.00144<esc && esc<0.00163)
{
fsc = (288.7 + (18.0/0.00019)*(esc-0.00144));
}
if(0.00163<esc && esc<0.00192)
{
fsc = (306.0 + (18.1/0.00029)*(esc-0.00163));
}
if(0.00192<esc && esc<0.00241)
{
fsc = (324.8 + (18.0/0.00049)*(esc-0.00192));
}
if(0.00241<esc && esc<0.00276)
{
fsc = (342.8 + (9.0/0.00035)*(esc-0.00241));
}
if(0.00276<esc && esc<0.0038)
{
fsc = (351.8 + (9.1/0.00104)*(esc-0.00276));
}
}
if(fy==500)
{
cout<<"---------------------------"<<"\n";
cout<<"
Fe 500
"<<"\n";
cout<<"---------------------------"<<"\n";
cout<<" strain
stress "<<"\n";
cout<<" 0.00174 347.8 "<<"\n";
cout<<" 0.00195 369.6 "<<"\n";
cout<<" 0.00226 391.3 "<<"\n";
cout<<" 0.00277 413.0 "<<"\n";
cout<<" 0.00312 423.9 "<<"\n";
cout<<" 0.00417 434.8 "<<"\n";
cout<<"---------------------------"<<"\n";
cout<<"Enter the value of strain from above table (esc):"<<"\n";
cin>>esc;
if(0.00174<esc && esc<0.00195)
{
fsc = (347.8 + (21.8/0.00021)*(esc-0.00174));
}
68

if(0.00195<esc && esc<0.00226)


{
fsc = (369.6 + (21.7/0.00031)*(esc-0.00195));
}
if(0.00226<esc && esc<0.00277)
{
fsc = (391.3 + (21.7/0.00051)*(esc-0.00226));
}
if(0.00277<esc && esc<0.00312)
{
fsc = (413.0 + (10.9/0.00035)*(esc-0.00277));
}
if(0.00312<esc && esc<0.00417)
{
fsc = (423.9 + (10.9/0.00105)*(esc-0.00312));
}
}
}
void stress :: display()
{
if(fy!=250 && fy!=415 && fy!=500)
{
cout<<"Error in grade of steel : please try again !!!"<<"\n";
}
else
{
cout<<"----------------------------------------------------"<<"\n";
cout.precision(2);
cout<<"The corresponding value of stress is: "<<fsc<<" n/mm2"<<"\n";
cout<<"----------------------------------------------------"<<"\n";
}
}
int main()
{
clrscr();
stress A;
A.getdata();
A.process();
A.display();
getch();
return 0;
}

69

INPUT
Enter the grade of steel (n/mm2):
415
--------------------------Fe 415
--------------------------strain stress
0.00144 288.7
0.00163 306.7
0.00192 324.8
0.00241 342.8
0.00276 351.8
0.00380 360.9
--------------------------Enter the value of strain from above table (esc):
0.002
OUTPUT
---------------------------------------------------The corresponding value of stress is: 327.74 n/mm2
----------------------------------------------------

70

// DESIN OF TENSION MEMBER USING ANGLE SECTIONS


#include<iostream.h>
#include<conio.h>
#include<math.h>
class ten_mem
{
protected:
float P,fs,d1,a1,a2,a_req,d,lo,lc,t,A;
public:
void getdata();
void calc1();
};
void ten_mem::getdata()
{
cout<<"Enter the value of load for which the tension member is to be designed in
kN\n";
cin>>P;
cout<<"Enter the value of permissible stress in steel in N/mm2\n";
cin>>fs;
cout<<"Enter the value of rivet dia in mm\n";
cin>>d1;
}
void ten_mem::calc1()
{
if(d1<=25)
{
d = d1 + 1.5;
}
else
{
d = d1 + 2;
}
a_req = P*1000 / fs;
cout<<"The area required for the tension member is "<<a_req<<" sq.mm";
cout<<endl<<"Select the corresponding angle section having area \n\tabout 20
percent higher than that of reqd.\n";
cout<<"Enter the gross area of selected section from steel table\n";
cin>>A;
cout<<"Enter the thickness of selected angle in mm\n";
cin>>t;
cout<<"Enter the length of connected leg and length of outstanding leg of the selected
angle in mm respectively\n";
cin>>lc>>lo;
a1 = (lc-d-(t/2))*t;
a2 = (lo-(t/2))*t;
71

}
class cases:public ten_mem
{
protected:
float k,Anet,S;
int choice;
public:
void func();
void calc2();
};
void cases::func()
{
cout<<"The cases for the selected sections are:\n";
cout<<"1. Single angle connected by one leg only\n";
cout<<"2. Pair of angles placed back to back connected by only one leg of each angle
to the same side of gusset plate\n";
cout<<"3. Double angles placed back to back and connected to each side of gusset
plate\n";
cout<<"\n";
cout<<"Enter your case: ";
cin>>choice;
cout<<"\n";
}
void cases::calc2()
{
switch(choice)
{
case 1:
k = (3*a1) / (3*a1+a2);
Anet = a1 + k*a2;
cout<<"The net area of the section is "<<Anet<<" sq.mm\n";
cout<<"\n";
cout<<"Check for Strength:\n";
S = fs*Anet/1000;
if(S>=P)
cout<<"Section is O.K.\n";
else
cout<<"Redesign the section\n";
break;
case 2:
k = (5*a1) / (5*a1+a2);
Anet = a1 + k*a2;
cout<<"The net area of the section is "<<Anet<<" sq.mm";
cout<<"\n";
cout<<"Check for Strength:\n";
72

S = fs*Anet/1000;
if(S>=P)
cout<<"Section is O.K.\n";
else
cout<<"Redesign the section\n";
break;
case 3:
Anet = (2*A) - (d*t*2);
cout<<"The net area of the section is "<<Anet<<" sq.mm";
cout<<"\n";
cout<<"Check for Strength:\n";
S = fs*Anet/1000;
if(S>=P)
cout<<"Section is O.K.\n";
else
cout<<"Redesign the section\n";
break;
}
}
void main()
{
cases t1;
clrscr();
t1.getdata();
t1.calc1();
t1.func();
t1.calc2();
getch();
}

73

INPUT
Enter the value of load for which the tension member is to be designed in kN
120
Enter the value of permissible stress in steel in N/mm2
150
Enter the value of rivet dia in mm
18
The area required for the tension member is 800 sq.mm
Select the corresponding angle section having area
about 20 percent higher than that of reqd.
Enter the gross area of selected section from steel table
1152
Enter the thickness of selected angle in mm
10
Enter the length of connected leg and length of outstanding leg of the selected
angle in mm respectively
75 50
The cases for the selected sections are:
1. Single angle connected by one leg only
2. Pair of angles placed back to back connected by only one leg of each angle to
the same side of gusset plate
3. Double angles placed back to back and connected to each side of gusset plate
Enter your case: 1
OUTPUT
The net area of the section is 851.946533 sq.mm
Check for Strength:
Section is O.K.

74

Das könnte Ihnen auch gefallen