You are on page 1of 2

//PROGRAM TO FIND END REACTIONS DUE TO SECONDARY EFFECTS.

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
double Rh,Ra,Rb,E,A,T,a,T1,T2,d,Ma,Mb,I,e,L,Q;
int choice;
clrscr();
cout<<"\n\n(1)FIX-END ACTIONS CAUSED BY TEMPERATURE
CHANGES";
cout<<"\n\n(2)FIX-END ACTIONS CAUSED BY PRESTRAINS";
cout<<"\n\n(3)FIX-END ACTIONS CAUSED BY SINKING OF SUPPORT\n";
cin>>choice;
switch(choice)
{
case 1:
{
cout<<"\nEnter Cross sectional area(A) in mm2:";
cin>>A;
cout<<"\nEnter Modulus of Elasticity (E) in N/mm2:";
cin>>E;
cout<<"\nEnter Tempurature Increase (T) in C':";
cin>>T;
cout<<"\nEnter Co-efficient of thermal expansion (a):";
cin>>a;
cout<<"\nEnter Depth of Beam (d) in mm:";
cin>>d;
cout<<"\nEnter Moment of Inertia (I) in mm4:";
cin>>I;
Rh=(E*A*a*T);
Ma=(a*E*I*T)/d;
Mb=-Ma;
cout<<"\nMoment at A:"<<Ma<<"kNm";
cout<<"\nMoment at B:"<<Mb<<"kNm";
cout<<"\nHorizontal Reaction:"<<Rh<<"kN";
break;
}
case 2:
{
cout<<"\nEnter Cross sectional area(A) in mm2:";
cin>>A;
cout<<"\nEnter Modulus of Elasticity (E) in N/mm2:";

cin>>E;
cout<<"\nEnter Span of the Beam (L) in mm :";
cin>>L;
cout<<"\nEnter Moment of Inertia (I) in mm4:";
cin>>I;
cout<<"\nEnter Distace a from which Bar bent (a):";
cin>>a;
cout<<"\nEnter Angle of Inclination:";
cin>>Q;
Ra=(6*(E*I*Q)*(L-2*a))/(L*L*L);
Rb=-Ra;
Ma=((2*E*I*Q)*(2*L-3*a))/(L*L);
Mb=-(((2*E*I*Q)*(L-3*a))/(L*L));
cout<<"\nReaction at A:"<<Ra<<"kN";
cout<<"\nReaction at B:"<<Rb<<"kN";
cout<<"\nMoment at A:"<<Ma<<"kNm";
cout<<"\nMoment at B:"<<Mb<<"kNm";
break;
}
case 3:
{
cout<<"\nEnter Modulus of Elasticity (E) in N/mm2:";
cin>>E;
cout<<"\nEnter Span of the Beam (L) in mm :";
cin>>L;
cout<<"\nEnter Moment of Inertia (I) in mm4:";
cin>>I;
Ra=(12*(E*I))/(L*L*L);
Rb=-Ra;
Ma=((6*E*I))/(L*L);
Mb=-Ma;
cout<<"\nReaction at A:"<<Ra<<"kN";
cout<<"\nReaction at B:"<<Rb<<"kN";
cout<<"\nMoment at A:"<<Ma<<"kNm";
cout<<"\nMoment at B:"<<Mb<<"kNm";
break;
}
}
getch();
}

You might also like