Você está na página 1de 5

DESIGN OF CLAMP COUPLING

PROGRAM

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int b,c,x,p,n,t,s,d,u,k,e,y,o,m,l,j,v1,h,v,w,z,sc,dc;
float dia1,dia2;

clrscr();
printf("\n \n 1. DIAMETER OF SHAFT");
printf("\n \n 2.BOLT DIAMETER ");
printf("\n \n 3. SLEEVE DESIGN");
printf("\n \n 4.KEY DESIGN ");
printf("\n \n 5.EXIT");
printf("\n \n ENTER YOUR CHOICE ");
scanf("%d",&x);
switch(x)
{
case 1:
printf("\n ENTER THE TRANSMITTED POWER IN WATTS");
scanf("%d",&p);
printf("\n ENTER SPEED IN RPM");
scanf("%d",&n);
printf("\n ENTER SAFE CRUSHING AND DIRECT
SHEAR STRESS VALUES ");
scanf("%d,%d",&sc,&dc);
t=(60*p)/(2*3.14*n);
printf("\n TRANSMITTED TORQUE IS T=%d",t);
printf("\n ENTER MAXIMUM ALLOWABLE STRESS");
scanf("%d",&s);
d=((16*t)/(3.14*s));
dia1=(pow(d,((double)1/3)));
printf("\n THE DIAMETER OF SHAFT IS , dia1=%f",dia1);
break;

case 2:
printf("\n ENTER THE TRANSMITTED TORQUE & SHAFT
DIAMETER");
scanf("%d,%d",&t,&dia1);
printf("\n ENTER THE VALUE OF CO-EFF OF FRICTION..");
scanf("%d",&u);
printf("\n ENTER CRUSHING STRESS FOR KEY DESIGN");
scanf("%d",&k);
b=(t*8)/(u*3.14*3.14*k*4*dia1);
dia2=(pow(b,((double)1/2)));
printf("\n THE DIAMETER OF BOLT IS dia2=%f",dia2);
break;

case 3:
printf("\n ENTER THE SHAFT DIA & BOLT DIA");
scanf("%d,%d",&dia1,&dia2);
e=0.5*dia1;
j=(2*dia2)+20;
m=1.5*dia1;
printf("\n THE DATA ARE e=%d,j=%d,m=%d",e,j,m);
l=(3*j)+(2*m);
c=dia1+dia2+10;
printf("\n THE DATA ARE l=%d,c=%d",l,c);
v=c+dia2+10;
v1=v;
printf("\n THE DIA OF SLEEVE IS v1=%d",v1);
break;

case 4:
printf("\n ENTER THE SHAFT DIA d");
scanf("%d",&dia1);
w=dia1/4;
h=(2*w)/3;
o=(0.75*dia1);
printf("\n THE WIDTH,HEIGHT&LENGTH OF THE KEY ARE w=
%d,h=%d,o=%d",w,h,o);
printf("\n ENTER THE VALUE OF TORQUE");
scanf("%d",&t);
z=(2*t)/(dia1*w*o);
y=(4*t)/(dia1*h*o);
printf("\n THE DIRECT SHEAR STRESS & CRUSHING STRESS OF
KEY IS z=%d,y=%d",z,y);
break;

case 5:
printf("\n TO EXIT FROM PROGRAM");
getch();
exit(0);
}
if(z<dc && y<sc)
printf("\n DESIGN IS SAFE");
else
printf("\n NOT SAFE");
getch();
}
OUTPUT

ENTER THE TRANSMITTED POWER IN WATTS 500

ENTER SPEED IN RPM 200

TRANSMITTED TORQUE IS T=2388.535156N-MM

ENTER MAXIMUM ALLOWABLE STRESS 125

THE DIAMETER OF SHAFT IS dia1=46.004887mm

ENTER THE VALUE OF CO-EFF OF FRICTION..3

ENTER CRUSHING STRESS FOR KEY DESIGN 300

THE DIAMETER OF BOLT IS dia2=48.912361mm

THE DATA'S ARE e=23mm, J=21mm, m=69mm

THE VALUES ARE L=201mm, c=57mm


THE DIAMETER OF SLEEVE IS v1=67mm

THE WIDTH, HEIGHT & LENGTH OF KEY ARE


w=12mm, h=8mm, 0=35mm

THE DIRECT SHEAR & CRUSHING STRESS FOR KEY IS


z=26n/mm^2,
y=78n/mm^2

ENTER THE SAFE CRUSHING & DIRECT STRESS VALUES..300,260

THE DESIGN IS SAFE..