Sunteți pe pagina 1din 7

//Generalized Program to design Built up Column Using Batten:#include<iostream.

h>
#include<conio.h>
#include<iomanip.h>
#include<math.h>
#include<string.h>
class blt_clmn
{
protected:
int P,degree,y_stress;
float factor,l;
public:
void getdata();
void analysedata();
};
class cpsn_mbr:public blt_clmn
{
public:
char sect_n[4];
float sp_channel,p_stress2;
int b,t;
float area,r1,a_reqd,Ixx,Cxx,p,sl_ratio,dim1,dim2,dim;
int p_stress,section,depth;
float sp_section,sp_channel3,s_load,factor2,g_area,e_l,a_prov;
float s_ratio,r_min,Ix,Iy,Cy,sp_channel1;
void designdata();
};
class dsgn_battened:public cpsn_mbr
{
public:
int n_rivets2;
float
l_stress,t_shear,rivets,r_spacing,f_rivet,d_force,r_force,l_shear,moment,b_stress,ry;
float sp_btn,rc_min,ed_btn,th_btn,s_shear,s_bearing,r_value,n_rivets;
void analysedata2();
void e_cnts();
void showdata();
void printline();
};
void blt_clmn::getdata()
{
cout<<"Enter the axial load that the column has to carry in kN: ";
cin>>P;
cout<<"\nEnter the unsupported length of the member in meters(i.e.column): ";
cin>>l;

cout<<"\nEnter the yield stress of steel in MPa: ";


cin>>y_stress;
cout<<"\nEnter the degree of end restraint of the compression member \n\nFor
effectively held in position \n\n1.and restrained against rotation at both ends\n\n2.at both
ends and restrained agains rotaion at one end\n\n3.at both ends restrained against rotation
at one end\n\n4.and restrained against rotation at one end, and at the other hand restrained
against rotation but not held in position\n\n5.and restrained against rotation at one end,
and at the other hand partially restrained against rotation but not held in position\n\n6.at
one end but not restrained against rotation, and at the other hand restrained against
rotation at held in position\n\n7.and restrained against rotation at one end but not held in
position or restrained against rotation at the other hand: ";
cin>>degree;
}
void blt_clmn::analysedata()
{
switch(degree)
{
case 1:{ factor=0.65; break; }
//Effective Length of column
case 2:{
factor=0.80; break; }
//as per degree of restraint
case 3:{
factor=1.00; break; }
//of the compression member
case 4:{
factor=1.20; break; }
//as per IS:800 1984 Clause 5.2.2
case 5:{
factor=1.50; break; }
case 6:{
factor=2.00; break; }
case 7:{
factor=2.00; break; }
default:
{
cout<<"Enter the correct code"; break; }
}
}
void cpsn_mbr::designdata()
{
e_l=(factor*1.10*l*1000.00); //The effective length is 10% more for battened
column
start:
cout<<"\nEnter the permissible compressive stress of the steel in MPa: ";
cin>>p_stress;
a_reqd=(P*1e3)/(p_stress);
cout<<"\nThe area required for given loading is "<<a_reqd<<"mm2";
cout<<"\n\aEnter which type of section to be provided\n1.Two Channel
Section\n2.Two I Section\n3.Four Angle Section: ";
cin>>section;
read:
switch(section)
{
case 1:
{

cout<<"\nEnter which channel (IS) section is to be provided (ISJC, ISLC,


ISMC, ISMCP)";
cin>>sect_n;
break;
}
case 2:
{
cout<<"\nEnter which rolled I section is to be provided
(ISJB,ISLB,ISMB,ISWB)";
cin>>sect_n;
break;
}
case 3:
{
cout<<"\nEnter the dimensions of the equal ISA section in mm (i.e Enter
length, breadth and thickness) so as to meet the requirements: ";
cin>>l>>b>>t;
cout<<"\nEnter the area of single ISA "<<l<<"X"<<b<<"X"<<t<<"
section in mm2: ";
cin>>area;
a_reqd=4.0*area;
cout<<"\nEnter the centre of gravity for the ISA
"<<l<<"X"<<b<<"X"<<t<<" in cm: ";
cin>>Cxx;
p=P*1000.00/a_reqd;
cout<<"\nEnter the slenderness ratio for the compressive stress equal to
"<<p<<"N\mm2: ";
cin>>sl_ratio;
float x,y;
x=(l*l*100.00)/(sl_ratio*sl_ratio);
y=(Ixx*100.00/area);
dim1=2.00*(pow((x-y),0.5)+Cxx);
dim2=dim1*10;
cout<<"\nThe size of the square column comes out to be "<<dim2<<" x
"<<dim2<<": ";
cout<<"\nEnter the size of the column to provided i.e breadth of the
column in mm: ";
cin>>dim;
float a,m,c,r2;
a=(Ixx*10000.00/area);
m=((0.5*dim2)-(10.00*Cxx));
c=a+(m*m);
r1=sqrt(c);
cout<<"r1= "<<r1;
r2=(r1*1e-1);
sp_section=2.00*(r2-Cxx);

break;
}
default:
{
cout<<"\nEnter the correct case";
break;
}
}
if(section==1||section==2)
{
cout<<"\nEnter th depth of the "<<sect_n<<" section so as to meet the
requirements: ";
cin>>depth;
cout<<"\nEnter the area of single "<<sect_n<<" "<<depth<<" section in
mm2: ";
cin>>area;
a_prov=2.00*area;
cout<<"\nEnter the radius of gyration about X-X axis for the given
"<<sect_n<<" "<<depth<<" in mm: ";
cin>>r_min;
s_ratio=(e_l/r_min);
if(s_ratio>=180.00)
{
cout<<"\nRevise the section";
goto read;
}
else
{
cout<<"\nEnter the permissible stress for steel for slenderness ratio
"<<s_ratio<<" from IS 800:1984 Clause 5.5.1 in MPa";
cin>>p_stress2;
s_load=(p_stress2*a_reqd/1e3);
if (s_load<P)
{
cout<<"\nRevise the section as it is not capable to
withstand the load";
goto start;
}
else
{
factor2=s_load/P;
if(factor2<=1.12)
cout<<"\nThe given section is safe and hence
economical";
else
{

cout<<"\nThe given section is extrasafe and hence uneconomical";


goto read;
}
}
cout<<"\nEnter the moment of inertia of given "<<sect_n<<"
"<<depth<<" about X-X axis and Y-Y axis respectively in cm^4 from steel tables: ";
cin>>Ix>>Iy;
cout<<"\nEnter the centre of gravity Cy for the "<<sect_n<<"
"<<depth<<" in cm from steel tables: ";
cin>>Cy;
sp_channel=2*((pow((((Ix)-(Iy))/(a_prov*1e-2)),0.5)-Cy));
cout<<"\nThe spacing of "<<sect_n<<" "<<depth<<" come to be
"<<sp_channel<<" cm";
cout<<"\nEnter roundoff value of spacing in cm to be act as column
section: ";
cin>>sp_section;
}
}
else
goto function;
function:
}
void dsgn_battened::analysedata2()
{
cout<<"Enter the least radius of gyration in cm";
cin>>rc_min;
if((0.7*l/rc_min>50.00)){
sp_btn=(50.00*rc_min);
}
else{
sp_btn=(0.7*l*rc_min*rc_min);
}
cout<<"spacing "<<sp_btn;
cout<<"Enter round off value of spacing of battened bars..."; cin>>sp_btn;
th_btn=(sp_section+6.00+6.00)/50.00;
ed_btn=(3*(2*Cy+sp_section))/4.00;
cout<<"The dimensions of battened comes out to be
"<<ed_btn<<"x"<<th_btn<<"cm...";
cout<<"Enter the dimesions of battened member so as to meet the requirement ";
cin>>ed_btn>>th_btn;
ed_btn=ed_btn*10.00; th_btn=th_btn*10.00;
t_shear=(2.5*P/100.00);
l_shear=(t_shear*sp_btn)/(2.00*(sp_section+6.00+6.00));
moment=(t_shear*sp_btn/(2.00*2.00));
l_stress=(l_shear/(ed_btn*th_btn));
b_stress=(moment*6.00)/(ed_btn*ed_btn*th_btn);

}
void dsgn_battened::e_cnts()
{
s_shear=(100.00*3.14*21.5*21.5)/(1000.00*4.00);
//using 20mm pds
rivets
s_bearing=(300.00*21.5*th_btn)/1000.00;
if(s_shear<s_bearing)
r_value=s_shear;
else
r_value=s_bearing;
cout<<"The width of battened bar comes out to be "<<ed_btn<<"cm Enter how
many rivets at which spacing to be provided..";
cin>>rivets>>r_spacing;
d_force=(l_shear/4.00);
f_rivet=(moment*(3.5+r_spacing))/
((2*3.5*3.5)+(2*(3.5+r_spacing)*(3.5+r_spacing)));
r_force=sqrt((d_force*d_force)+(f_rivet*f_rivet));
}
void dsgn_battened::printline()
{
cout<<"\n-------------------------------------------------------------------\n";
}
void dsgn_battened::showdata()
{
cout<<"\n***************************************************************
*******\n";
cout<<"\n\t\tDESIGN OF BUILT UP COLUMN USING BATENS";
cout<<"\n\n**************************************************************
********\n";
cout<<"\n\t\t\tGiven data\n\n";
cout<<"\tAxial Load (kN)\tUnsupported Length(m)\tDegree of Restraint\n";
cout<<"-------------------------------------------------------------------\n";
cout<<"\t "<<P<<"\t\t\t"<<l<<"\t\t\t"<<degree<<"\n";
cout<<"-------------------------------------------------------------------\n";
cout<<"\n\t\t\tDESIGN DETAILS";
printline();
printline();
if(section==1||section==2)
{
cout<<"\n\tProvided Section\tArea of column section\tMax slenderness
ratio\n";
cout<<"\t
"<<sect_n<<""<<depth<<"\t\t"<<a_prov<<"\t\t\t"<<s_ratio<<"\n";
printline();

cout<<"\n\t\t\tDESIGN OF BATENS";
cout<<"\n\nSpacing of Battened bars in mm
:\t\t"<<sp_btn<<"";
cout<<"\n\nEffective Width of Battened bars in mm:\t\t"<<ed_btn<<"";
cout<<"\n\nProvided Battened bars for given
loading:\t\t"<<ed_btn<<"X"<<th_btn<<"mm";
cout<<"\n\nNumber of 20 mm diameter required to\n connect the lacing
bars\n with given "<<sect_n<<" "<<depth<<" is:\t\t\t1";
}
else
{
cout<<"\n\tProvided Section\tArea of column section\tMax slenderness
ratio\n";
cout<<"\tISA"<<l<<"x"<<b<<"x"<<t<<"\t\t"<<a_reqd<<"\t\t\t
"<<sl_ratio<<"\n";
printline();
cout<<"\n\t\t\tDESIGN OF BATENS";
cout<<"\n\spacing of Battened bars in mm
:\t\t"<<sp_btn<<"";
cout<<"\n\nEffective Width of Battened bars in mm:\t\t"<<ed_btn<<"";
cout<<"\n\nProvided Battened bars for given
loading:\t\t"<<ed_btn<<"X"<<th_btn<<"mm";
cout<<"\n\nNumber of 20 mm diameter required to\n connect the lacing
bars\n with given "<<sect_n<<" "<<depth<<" is:\t\t\t1";
}
}
void main()
{
clrscr();
cout.precision(3);
dsgn_battened d;
d.getdata();
d.analysedata();
d.designdata();
d.analysedata2();
d.e_cnts();
d.showdata();
d.printline();
getch();
}

S-ar putea să vă placă și