1、# include # include main()double Do=0.025,Di=0.021,L=6,Wh=29.5; Th1=280,Wc=37.5, Tc1=160,Ro=0.0005,Ri=0.0001,D1,D2,D2O1=0.85,D2O2=0.919,Tc2,Th2,MD2O1,MD2O2,K=12.5,Cp1,Cp2,ramda1,ramda2,niu1,niu2,yita1,yita2,a1,b1,a2,b2,Tc20,Th20,Tmc,Tmh,C,Qc,Qh,Ho,Hi,Reo,Rei,Pro,Pri,Si,rou1,ui,Hi0,Twi0,Ai,Twi,niuwi,
2、yitawi,Dwi,Xwi,rouwi,Ao,Smax,B=0.23,D=0.8,t=0.032,De,uo,rou2,Ho0,Two0,Two,niuwo,yitawo,Dwo,Xwo,rouwo,Ko,NTU,E,F,Cmin,Cmax,Xh,Xc,ld=44,b=0.002,Dm=0.0023,e=2.71828;int n=0;Tc2=180;Th2=260; do n+; printf(“n=%dn“,n);Th20=Th2;Tmh=(Th1+Th20)/2;doTc20=Tc2; Tmc=(Tc1+Tc20)/2; Cp1=(0.7072+(0.00147-0.00051*D2O
3、1)*Tmc-0.318*D2O1)*(0.055*K+0.35)*4.18*1000;Cp2=(0.7072+(0.00147-0.00051*D2O2)*Tmh-0.318*D2O2)*(0.055*K+0.35)*4.18*1000;C=Wh*Cp2/(Wc*Cp1);Tc2=Tc1+C*(Th1-Th20);while(fabs(Tc2-Tc20)=0.1);Qh=Wh*Cp2*(Th1-Th2);Qc=Wc*Cp1*(Tc2-Tc1);Ai=3.14*Di*L*324;Si=0.25*3.14*Di*Di*324/2;Xc=1+Tmc/100.0;MD2O1=pow(D2O1,2);
4、D1=0.942+0.248*Xc+0.174*MD2O1+0.0841/(Xc*D2O1)-0.312*Xc/D2O1-0.556*exp(-Xc);rou1=1000*D1; ui=Wc/(rou1*Si);b1=log(log(90.0+1.22)/log(13+1.22)/(log(50.0+273)/(100.0+273);a1=log(log(90+1.22)-b1*log(50.0+273);niu1=exp(exp(a1+b1*log(Tmc+273)-1.22;yita1=niu1*rou1/1000000;Rei=Di*ui*rou1/yita1;ramda1=0.4213
5、*(1-0.00054*Tmc)/D2O1/3.6;Pri=Cp1*yita1/ramda1;Hi0=0.027*pow(Rei,0.8)*pow(Pri,0.33)*ramda1/Di;Twi0=Tmc+Qc/(Hi0*Ai);do niuwi=pow(e,pow(e,a1+b1*log(Twi0+273)-1.22;Xwi=1+Twi0/100.0;Dwi=0.942+0.248*Xwi+0.174*MD2O1+0.0841/(Xwi*D2O1)-0.312*Xwi/D2O1-0.556*exp(-Xwi);rouwi=1000*Dwi;yitawi=niuwi*rouwi/1000000
6、;Hi=Hi0*(pow(yita1/yitawi),0.14);Twi=Tmc+Qc/(Hi*Ai);Twi0=Twi;while(fabs(Twi-Twi0)=0.5);Ao=3.14*Do*L*324;Smax=B*D*(1-Do/t);De=4*(t*t-0.25*3.14*Do*Do)/(3.14*Do);Xh=1+Tmh/100.0;MD2O2=pow(D2O2,2);D2=0.942+0.248*Xh+0.174*MD2O2+0.0841/(Xh*D2O2)-0.312*Xh/D2O2-0.556*exp(-Xh);rou2=1000*D2;uo=Wh/(rou2*Smax);b
7、2=log(log(1500+1.22)/log(120+1.22)/(log(50.0+273)/(100.0+273);a2=log(log(1500+1.22)-b2*log(50.0+273);niu2=exp(exp(a2+b2*log(Tmh+273)-1.22;yita2=niu2*rou2/1000000;Reo=De*uo*rou2/yita2;ramda2=0.4213*(1-0.00054*Tmh)/D2O2/3.6;Pro=Cp2*yita2/ramda2;Ho0=0.36*pow(Reo,0.55)*pow(Pro,0.33)*ramda2/De;Two0=Tmh-Q
8、h/(Ho0*Ao);do niuwo=exp(exp(a1+b1*log(Two0+273)-1.22;Xwo=1+Two0/100;Dwo=0.942+0.248*Xwo+0.174*MD2O1+0.0841/(Xwo*D2O1)-0.312*Xwo/D2O1-0.556*exp(-Xwo);rouwo=1000*Dwo;yitawo=niuwo*rouwo/1000000;Ho=Ho0*(pow(yita2/yitawo),0.14);Two=Tmh-Qh/(Ho*Ao);Two0=Two; while(fabs(Two-Two0)=0.5);Ko=1/(1/Hi+Ri)*Ao/Ai+1
9、/Ho+Ro+b/ld*Do/Dm); Cmin=Wh*Cp2;Cmax=Wc*Cp1;NTU=Ko*Ao/Cmin; F=NTU*sqrt(1+pow(Cmin/Cmax,2);E=2/(1+Cmin/Cmax)+sqrt(1+Cmin/Cmax)*(1+exp(-F)/(1-exp(-F); Th2=Th1-E*(Th1-Tc1);Tc2=Tc1+C*(Th1-Th2);printf(“Th2=%.1lftTc2=%.1lfn“,Th2,Tc2);printf(“Rei=%.2lftPri=%.2lftHi=%.2lfn“,Rei,Pri,Hi);printf(“Reo=%.2lftPro=%.2lftHo=%.2lfn“,Reo,Pro,Ho);printf(“Qc=%.2lftQh=%.2lfn“,Qc/1000,Qh/1000);printf(“Ko=%.2lftNTU=%.3lftE=%.3lfn“,Ko,NTU,E);while( fabs(Th20-Th2) = 0.1);return 0;运行结果如下: