该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
#include
#include
double SR(double a,double b,double c)
{
double x;
x=(1-a)/((1+b)*c);
x=atan(x);
return x;
}
double SF(double a,double b)
{
double x;
x=exp(-3*(39-a)/(2*a*sin(b)));
x=2*acos(x)/3.14159;
return x;
}double SJS(double a,double b)
{
double x;
x=3*a/(2*3.14159*b);
return x;
}
double SA(double a,double b,double c)
{
double x;
x=4*pow(sin(a),2)/(b*c)+1;
x=1/x;
return x;
}double SB(double a,double b,double c)
{
double x;
x=4*sin(a)*cos(a)/(b*c)+1;
x=1/x;
return x;
}
double SK(double a,double b,double c,double d)
{
double x;
x=4*a*pow(sin(b),2)/(c*d);
return x;
}
double GL(double a)
{
double x;
x=(2+a*(1-2*0.2)-sqrt(pow(2+a*(1-2*0.2),2)+4*(a*pow(0.2,2)-1)))/2;
return x;
}
int main(void)
{
double a=0,b=0;
double c,d;
double Ri,Si,Cl,Cd,Ci,Ypt;
double R,F,JS,Cn,Ct,k,Y,Bt;
double Cp,CT,Cm;
printf("输入半径:\n");
scanf("%f",&Ri);
printf("输入叶尖速比:\n");
scanf("%f",&Si);
printf("输入Cl:\n");
scanf("%f",&Cl);
printf("输入Cd:\n");
scanf("%f",&Cd);
printf("输入弦长:\n");
scanf("%f",&Ci);
printf("输入最佳迎角:\n");
scanf("%f",&Ypt);
Ypt=Ypt*2*3.14159/360;
do
{
c=a;
d=b;
R=SR(a,b,Si);
Bt=2/(3*Si)-Ypt;
Y=R-Bt;
Cn=Cl*cos(R)+Cd*sin(R);
Ct=Cl*sin(R)-Cd*cos(R);
JS=SJS(Ci,Ri);
F=SF(Ri,R);
a=SA(R,JS,Cn);
b=SB(R,JS,Ct);
for( ;a>0.2; )
{
k=SK(F,R,JS,Cn);
a=GL(k);
}
}while(fabs(a-c)<0.001&&fabs(b-d)<0.001);
Cp=4*a*pow(1-a,2);
CT=4*a*(1-a);
Cm=Cp/Si;
R=R*360/(2*3.14159);
Bt=Bt*360/(2*3.14159);
printf("入流角:%f\n",R);
printf("迎角:%f\n",Y);
printf("安装角:%f\n",Bt);
printf("轴向诱导因子:%f\n",a);
printf("径向诱导因子:%f\n",b);
printf("风能利用系数:%f\n",Cp);
printf("推力系数:%f\n",CT);
printf("扭矩系数:%f\n",Cm);
return 0;
}
这是程序,但是运行后可以输入,然后没有任何反应,是没有运行?还是我程序有逻辑错误?