四、 设计源程序
#include
P,Pd,n1,aMIN,aMAX,V,a,a0,Ld0,ALF1,z,P0,DIFP0,Kb,Ki,KL,KALF,F0,Q,j,m0,K1,K2,K3,e,fB,Bl;
char TYPE,q;
int Ld,dd1,dd20,dd2,i,reply,w,f,g,a2,a3,a4,VMAX,s,s1; char Z,A,B,C,D,E; char c[9];
float DD2[]= {50,56,63,71,75,80,90,100,112,125,140,150,160,180,200,224, 250,280,315,355,400,425,450,500,560,600,630,710,800}; float LD[33][7]= {{400,0.87},{450,0.89},{500,0.91},
{560,0.94},{630,0.96,0.81},{710,0.99,0.83},{800,1.00,0.85},{900,1.03,0.87,0.82},{1000,1.06,0.89,0.84},
{1120,1.08,0.91,0.86},{1250,1.10,0.93,0.88},{1400,1.14,0.96,0.90},{1600,1.16,0.99,0.92,0.83},
{1800,1.18,1.01,0.95,0.86},{2000,0,1.03,0.98,0.88},{2240,0,1.06,1.00,0.91},{2500,0,1.09,1.03,0.93},
{2800,0,1.11,1.05,0.95,0.83},{3150,0,1.13,1.07,0.97,0.86},{3550,0,1.17,1.09,0.99,0.89},{4000,0,1.19,1.13,1.02,0.91},{4500,0,0,1.15,1.04,0.93,0.90},{5000,0,0,1.18,1.07,0.96,0.92},
{5600,0,0,0,1.09,0.98,0.95},{6300,0,0,0,1.12,1.00,0.97},{7100,0,0,0,1.15,1.03,1.00},{8000,0,0,0,1.18,1.06,1.02},{9000,0,0,0,1.21,1.08,1.05},{10000,0,0,0,1.23,1.11,1.07},{11200,0,0,0,0,1.14,1.10},
{12500,0,0,0,0,1.17,1.12},{14000,0,0,0,0,1.20,1.15},{16000,0,0,0,0,1.22,1.18} };
float ka1[4][3]= {{1.0,1.1,1.2},{1.1,1.2,1.3},{1.2,1.3,1.4},{1.3,1.4,1.5}}; float ka2[4][3]= {{1.1,1.2,1.3},{1.2,1.3,1.4},{1.4,1.5,1.6},{1.5,1.6,1.8}}; float jg[9][7];
float temp1,t1,temp2,t2,KA; int jd=0,jk=0;
main() {
printf(\请输入传递功率P<单位kW>:\ scanf(\
6
printf(\小带轮转速n1<单位r/min>:\scanf(\printf(\传动比i:\scanf(\
printf(\请输入原动机类型YDJ<Ⅰ或Ⅱ>:\scanf(\
printf(\载荷类型:\\n\printf(\载荷平稳\\n\printf(\载荷变动小\\n\printf(\载荷变动大\\n\printf(\载荷变动很大\\n\scanf(\
printf(\请输入每天的工作时间:\\n\printf(\:<10h\\n\printf(\:<10h~16h\\n\printf(\:>16h\\n\scanf(\if(w==1) {
if(g==0)
KA=ka1[f-1][0]; else if(g==2)
KA=ka1[f-1][2]; else
KA=ka1[f-1][1]; }
if(w==2) {
if(g==0)
KA=ka2[f-1][0]; else if(g==2)
KA=ka2[f-1][2]; else
KA=ka2[f-1][1]; }
printf(\是否在启动频繁、经常正反转、工作环境恶劣等场合运转?n/y\\n\scanf(\switch(q) {
case 'n': Pd=P*KA;
printf(\名义功率Pd为:%.3fkW\\n\ break;
7
case 'y':
Pd=P*1.2*KA;
printf(\名义功率Pd为:%.3fkW\\n\ break; }
if((i>=1.00)&&(i<=1.01)) { Ki=1.0000;
printf(\传动比系数Ki=\ printf(\ }
if((i>=1.02)&&(i<=1.04)) { Ki=1.0136;
printf(\传动比系数Ki=\ printf(\ }
if((i>=1.05)&&(i<=1.08)) { Ki=1.0276;
printf(\传动比系数Ki=\ printf(\ }
if((i>=1.09)&&(i<=1.12)) { Ki=1.0419;
printf(\传动比系数Ki=\ printf(\ }
if((i>=1.13)&&(i<=1.18)) { Ki=1.0567;
printf(\传动比系数Ki=\ printf(\ }
if((i>=1.19)&&(i<=1.24)) { Ki=1.0719;
printf(\传动比系数Ki=\ printf(\ }
if((i>=1.25)&&(i<=1.34)) { Ki=1.0875;
8
do {
printf(\传动比系数Ki=\ printf(\}
if((i>=1.35)&&(i<=1.51)) { Ki=1.1036;
printf(\传动比系数Ki=\ printf(\ }
if((i>=1.52)&&(i<=1.99)) { Ki=1.1202;
printf(\传动比系数Ki=\ printf(\ }
if(i>=2) {
Ki=1.1373;
printf(\传动比系数Ki=\ printf(\ }
s=0;
printf(\输入带型号:\scanf(\
switch(TYPE) {
case 'Z':
printf(\带轮最小基准直径是50mm\\n\ Kb=0.0002925; VMAX=25; K1=0.246; K2=7.44;
K3=0.441*pow(10,-4); m0=0.06; e=12; fB=8;
9
printf(\型带轮基准直径分别是50、56、63、71、75、80mm\\n\ break; case 'A':
printf(\带轮最小基准直径是75mm\\n\ Kb=0.0007725; VMAX=25; K1=0.449; K2=19.02;
K3=0.765*pow(10,-4); m0=0.1; e=15; fB=10;
printf(\型带轮基准直径分别是75、80、90、100、112、125mm\\n\ break; case 'B':
printf(\带轮最小基准直径是125mm\\n\ Kb=0.0019875; VMAX=25; K1=0.794; K2=50.6;
K3=1.31*pow(10,-4); m0=0.17; e=19; fB=12.5;
printf(\型带轮基准直径分别是125、140、150、160、180mm\\n\ break; case 'C':
printf(\带轮最小基准直径是200mm\\n\ Kb=0.005625; VMAX=25; K1=1.48; K2=143.2;
K3=2.34*pow(10,-4); m0=0.3; e=25.5; fB=17;
printf(\型带轮基准直径分别是200、224、250、280、315、400mm\\n\ break; case 'D':
printf(\带轮最小基准直径是355mm\\n\ Kb=0.01995; VMAX=30; K1=3.15; K2=507.3;
10