资源描述:
《材力课程设计 车床主轴程序》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、#include#include#definepi3.141592654#defineip0.017453292doubleL1=0.16,L2=0.52,L3=0.15,a=0.12,b=0.16,A0=0,n=500,P=5.3,i=0.7,R=0.12,Fy=4200,Fz=2300,Fby=0,Fbz=0,Fay,Faz,Fcy,Fdz,Fdy,Fcz,Fey,Fez,Me,Mby,Mbz,Mdy,Mdz,Mcy,Mcz,Mey,Mez,Md,Mc,www,x
2、xx=150,eee=0.21,ddd,fby0,fbz0,fby1,fbz1,fffe=0.00035,fffd=0.00033,aaac=0.0028,aMb,aMc,aMe,aaaac,fffb=0.00005,fffbb,big,SM,SN,B1,SD,FFF;voidzaihe(){longdoubleFt,Fr,An=20.0,Bn=10.0;Me=9549*P/n;Ft=Me/R;Fr=Ft*tan(An*ip)/(cos(Bn*ip));Fey=Ft*sin(A0*ip)-Fr*cos
3、(A0*ip);Fez=Ft*cos(A0*ip)+Fr*sin(A0*ip);Md=-Me;Fdy=Fy;Fdz=Fz;Mdy=Fdy*b;Mdz=Fdz*b;}voidwaili(){Fay=(Fdy*L3+Mdy-Fey*a)/(L1+L2);Fcy=(-Fdy*(L1+L2+L3)-Mdy-Fey*(L1+L2-a))/(L1+L2);Faz=(-Fdz*L3-Mdz-Fez*a)/(L1+L2);Fcz=(Fdz*(L1+L2+L3)+Mdz-Fez*(L1+L2-a))/(L1+L2);M
4、by=Fay*L1;Mbz=Faz*L1;Mey=Fay*(L1+L2-a)+Fby*(L2-a);Mez=Faz*(L1+L2-a)+Fbz*(L2-a);Mcy=Fay*(L1+L2)+Fby*L2+Fey*a;Mcz=Faz*(L1+L2)+Fbz*L2+Fez*a;}voidqiangdu(){longdoubleXmax,Mmax,Xmax1,Xmax3,Xmax2=0.0;Mc=sqrt(Mcy*Mcy+Mcz*Mcz);Xmax=Mc/www;Mmax=Me/(2*www);Xmax3=
5、-Xmax/2-sqrt((Xmax/2)*(Xmax/2)+Mmax*Mmax);Xmax1=-Xmax/2+sqrt((Xmax/2)*(Xmax/2)+Mmax*Mmax);ddd=sqrt(((Xmax1-Xmax2)*(Xmax1-Xmax2)+(Xmax2-Xmax3)*(Xmax2-Xmax3)+(Xmax3-Xmax1)*(Xmax3-Xmax1))/2)/xxx;ddd=pow(ddd,0.333333333333333333333);ddd=ddd/100;ddd=(float)d
6、dd;}voidnaodu(){longdoublefffd1,fffdy,fffdz;fffdy=L1*Mby*L1*aMc/(L1+L2)/0.147/eee;fffdy+=(L2-a)*(Mby*(2*aMc*L1/(L1+L2)+aMc*(L1+L2-a)/(L1+L2))+Mey*(2*aMc*(L1+L2-a)/(L1+L2)+aMc*L1/(L1+L2)))/(0.294*eee);fffdy+=a*(Mey*(2*aMc+(L1+L2-a)*aMc/(L1+L2)+aMc)+Mcy*(
7、2*aMc+(L1+L2-a)*aMc/(L1+L2)))/(0.294*eee);fffdy+=L3*aMc*(Mdy-2*Mcy)/(0.294*eee);fffdz=L1*Mbz*L1*aMc/(L1+L2)/0.147/eee;fffdz+=(L2-a)*(Mbz*(2*aMc*L1/(L1+L2)+aMc*(L1+L2-a)/(L1+L2))+Mez*(2*aMc*(L1+L2-a)/(L1+L2)+aMc*L1/(L1+L2)))/(0.294*eee);fffdz+=a*(Mez*(2*
8、aMc+(L1+L2-a)*aMc/(L1+L2)+aMc)+Mez*(2*aMc+(L1+L2-a)*aMc/(L1+L2)))/(0.294*eee);fffdz+=L3*aMc*(Mdz+2*Mcz)/(0.294*eee);fffd1=pi*sqrt(fffdy*fffdy+fffdz*fffdz)/www/32/fffd;ddd=pow(fffd1,0.25);ddd=ddd/1000;ddd=(float)ddd;}voidnaodue(){