#program for spur gear design#
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float G,P,L,R,t,Y,Z,A,B,W,N,T,S,D,M,V,r,F;
clrscr();
printf("enter the value of endurence strength for gear=");
scanf("%f",&G);
printf("enter the value of endurence strength for pinion=");
scanf("%f",&P);
printf("enter the value of number of teeth on gear=");
scanf("%f",&L);
printf("enter the value of number of teeth on pinion=");
scanf("%f",&R);
printf("enter the value of form factor for gear=");
scanf("%f",&Y);
printf("enter the value of form factor for pinion=");
scanf("%f",&Z);
A=G*Y;
B=P*Z;
if(A>B)
{
printf("the pinion is weaker ,the design should be done for pinion");
}
else
{
Printf(“the gear is weaker ,the design should be done for gear”)
}
printf("enter the value of power=");
scanf("%f",&W);
printf("enter the value of rotational speed= ");
scanf("%f",&N);
t=(W*60)/(6.18*N);
printf("torque=%f\n",t);
printf("enter the value of induced stress =");
scanf("%f",S);
M=pow((1.037/S),0.333);
printf("module=%f\n",M);
D=R*M;
printf("diameter of pinion=%f\n",D);
printf("enter the value of radius=");
scanf("%f",&r);
V=r*(6.28*N)/60;
printf("velocity =%f\n",V);
F=M*3.374*3.14;
printf("face width=%f\n",F);
getch();
}
************************output**********************
enter the value of endurence strength for gear=60000000
enter the value of endurence strength for pinion=40000000
enter the value of number of teeth on gear=54
enter the value of number of teeth on pinion=26
enter the value of form factor for gear=.12
enter the value of form factor for pinion=.094
the pinion is weaker the design should be done for pinion
enter the value of power=14000
enter the value of rotational speed= 340
torque=399.771545
enter the value of induced stress =40000000
module=.002976
diameter of pinion=.07740
enter the value of radius=34
velocity =12.09946
face width=.03072
**********************************************************************************
#program for helical gear design#
#include<stdio.h>
#include<math.h>
#include<conio.h>
#define y=0.107
void main()
{
float so,ses,m,b,ps,pa,ha,gs,tg,tp,vtp,vtg,s,k,v,f;
clrscr();
printf("Enter the value of endurace strength=");
scanf("%f",&so);
printf("Enter the value of ses=");
scanf("%f",&ses);
printf("Enter the value of module=");
scanf("%f",&m);
printf("Enter the value of facewidth=");
scanf("%f",&b);
printf("Enter the value of speed of pinion=");
scanf("%f",&ps);
printf("Enter the value of speed of gear=");
scanf("%f",&gs);
printf("Enter the value of teeth of pinion=");
scanf("%f",&tp);
printf("Enter the value of pressure angle=");
scanf("%f",&pa);
printf("Enter the value of helix angle=");
scanf("%f",&ha);
tg=(tp*ps)/gs;
printf("teeth of gear=%f\n",tg);
k=(cos(ha))*(cos(ha))*(cos(ha))
vtp=tp/k;
printf("virtual teeth for pinion=%f\n",vtp);
vtg=tg/k;
printf("virtual teeth for gear=%f\n",vtg);
v=(2*3.14*ps*m*vtp)/(120);
printf("velocity=%f\n",v);
s=so*((5.6)/((5.6)+(sqrt(v))));
printf("enduced bending stress=%f\n",s);
f=(s*b*y*(3.14)*m*(cos(ha));
printf("force=%f\n",f);
getch();
}
**********************output**************************
Enter the value of endurace strength=70000000
Enter the value of ses=630000000
Enter the value of module=0.003
Enter the value of facewidth=0.03
Enter the value of speed of pinion=600
Enter the value of speed of gear=300
Enter the value of teeth of pinion=25
Enter the value of pressure angle=0.34888
Enter the value of helix angle=0.40122
teeth of gear=50
virtual teeth for pinion=32.05248
virtual teeth for gear=64.10497
velocity=3.01
enduced bending stress=53442871.9
force=1487.55080