Documente Academic
Documente Profesional
Documente Cultură
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;
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
{
}
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();
}