fork download
  1. //2014111161
  2. #include<iostream>
  3. #include<cmath>
  4. using namespace std;
  5. int main()
  6. {
  7. double Re1,Re2,V1,V2,a1,a2,b1,b2;
  8. cout<<"请假设两管道沿程阻力系数:";
  9. cin>>a1>>a2;
  10. do
  11. {b1=a1;b2=a2;V1=pow((117.68/(0.69+154.3*a1+52.67*a2)),0.5);
  12. V2=(V1*0.36)/0.81;Re1=(V1*0.6)/0.000001;Re2=(V2*0.9)/0.000001;
  13. a1=0.0055*(1+pow((50+1000000/Re1),1.0/3));
  14. a2=0.0055*(1+pow((6.67+1000000/Re2),1.0/3));
  15. }
  16. while((b1-a1)/b1<0.001&&(b2-a2)/b2<0.001);
  17. cout<<"两管道流速分别为:"<<V1<<endl<<V2<<endl<<"流量为:"<<0.09*3.14*V1<<endl;
  18. return 0;
  19. }
Success #stdin #stdout 0s 3460KB
stdin
0.1 0.2
stdout
请假设两管道沿程阻力系数:两管道流速分别为:2.10121
0.933873
流量为:0.593803