资源描述:
《理论塔板数的计算》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、首先要得到相平衡方程和精馏段、提馏段方程,再根据逐板计算求得精馏塔的理论塔板数。源程序:#include#include#includestaticdoubleR,L,F,W,T0,P,E;staticdoubleXf,Xd,Xw,q,Xe;staticdoubleP1,P2;//td和tb的变量staticdoubleK1;staticdoubleK2;staticdoubleX1;staticdoubleX2;staticdoubleY1;staticdoubleY
2、2;staticdoubleA1;staticdoubleB1;staticdoubleC1;staticdoubleA2;staticdoubleB2;staticdoubleC2;staticdoubleF1;staticdoubleF2;doublePressure(doubleA,doubleB,doubleC,doubleT){doubletemp1=101325.0/760.0;doubletemp2=A*1.0-B*1.0/(C+T)*1.0;doubletemp3=pow(10.0,temp2);doubl
3、eresult=temp1*temp3;returnresult;}doubleFtd(doubley,doubleP1,doubleP2){doubletemp1=pow(K1,2);doubletemp2=pow(C1+T0,2);doubletemp3=pow(K2,2);doubletemp4=pow(C2+T0,2);doubletemp5=temp1*P*temp2;doubletemp6=temp3*P*temp4;doubletemp7=-1.0*y*P1*B1*log(10);doubletemp8=-1
4、.0*(1-y)*P2*B2*log(10);doubleresult=temp7/temp5+temp8/temp6;returnresult;}doubleFtb(doublex,doubleP1,doubleP2){doubletemp2=pow(C1+T0,2);doubletemp4=pow(C2+T0,2);doubletemp5=P*temp2;doubletemp6=P*temp4;doubletemp7=1.0*x*P1*B1*log(10);doubletemp8=1.0*(1-x)*P2*B2*log
5、(10);doubleresult=temp7/temp5+temp8/temp6;returnresult;}doubleTdm(doubley){doubleTd=T0;doubleP1;doubleP2;KTdm:P1=Pressure(A1,B1,C1,Td);P2=Pressure(A2,B2,C2,Td);K1=P1*1.0/P;K2=P2*1.0/P;X1=y*1.0/K1;X2=(1-y)*1.0/K2;F1=X1+X2-1;F2=Ftd(y,P1,P2);if(fabs(F1)>=E){Td=Td-F1*
6、1.0/F2;gotoKTdm;}returnTd;}doubleTbm(doublex){doubleTb=T0;doubleP1;doubleP2;KTbm:P1=Pressure(A1,B1,C1,Tb);P2=Pressure(A2,B2,C2,Tb);K1=P1/P;K2=P2/P;Y1=x*K1;Y2=(1-x)*K2;F1=Y1+Y2-1;F2=Ftb(x,P1,P2);if(fabs(F1)>=E){Tb=Tb-F1*1.0/F2;gotoKTbm;}returnTb;}voidmain(){doubleT
7、d;doubleTb;doublex;doubley;intn=0;intm=0;intN,M;intNt;intflag;charend;printf("PleaseinputR");scanf("%lf",&R);printf("PleaseinputL");scanf("%lf",&L);printf("PleaseinputF");scanf("%lf",&F);printf("PleaseinputW");scanf("%lf",&W);printf("PleaseinputP");scanf
8、("%lf",&P);printf("PleaseinputT0");scanf("%lf",&T0);printf("PleaseinputE");scanf("%lf",&E);printf("PleaseinputXf");scanf("%lf",&Xf);printf("Please