Demo entry 6250342

精馏

   

Submitted by anonymous on Oct 14, 2016 at 14:42
Language: C. Code size: 1.2 kB.

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char *argv[])
{float R,Rmin,DT,Cp,FI,a,Aw,t,D,rw,rd,r,inta,Ag,X,Y,Nmin,k,J,J1,J2,J3,F,W,Ws,Cb,Cg;
 int i,n,j,N;
 float xw,xd,x,y,C0,kp;
 xd=0.95;
 xw=0.086;
 Rmin=5.9;
 DT=3;
 Cp=4.18;
 Nmin=20.23;
 Ag=0.125;
 inta=0.7;
 Aw=0.0008;
 a=3100;
 FI=0.2;
 t=25920000;
 rd=35.56;
 rw=37.03;
 r=2205.2;
 D=13.16;
 F=27.48;
 W=14.32;
 X=0;
 Y=0;
 k=1.2;
 J=0;
 J1=0;
 J2=0;
 J3=0;
 for(k=1.1;k<=2;k=k+0.01)
 {R=k*Rmin;
   x=0.95;
   y=0.95;
  for(i=0;x>=0.5;i++)
  {y=R*x/(R+1)+xd/(R+1);
   x=y/(1.3-0.3*y);
   } 
  for(j=0;x>=xw;j++)
  {y=(R*D+F)*x/(R*D+F-W)-W*xw/(R*D+F-W);
   x=y/(1.3-0.3*y);
  }
  N=i+j-2;
  Ws=N*DT*2*3.14*0.6*7810/0.6;
  Cg=6.95+0.1808*log(Ws)+0.02468*log(Ws)*log(Ws);
  C0=834.86*pow(DT,0.83316)*pow(N*0.6,0.80161); 
  Cb=pow(2.718,Cg)*FI+C0*FI+N*a*FI*DT/0.6;
J=Cb*6.12+(R+1)*D*rw*Ag*t/(r*inta)+(R+1)*D*rd*Aw*t*0.18/(Cp*40);
  J3=J2;
  J2=J1;
  J1=J;
  if(J2<J3&&J2<J1)
 {kp=k-0.01;
  printf("k=%f    ",kp);
  printf("价格=%f\n",J2);
  printf("理论板数=%d   ",N);
  printf("精馏段板数=%d   ",i-1);
  printf("提馏段板数=%d\n",j-1); 
  }
   
     }
   system("PAUSE");	
  return 0;
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).