管壳式换热器模型原程序(C语言)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

换热器模型原程序(C语言)

#include

#include

float density(float t,float d)

{float x,z;

x=1+(t/100);

z=0.942+0.248*x+0.174*d*d+0.0841/(x*d)-0.312*x/d-0.556*exp(-x); z=z*1000;

return(z);

}

/*以下为比热容的计算:*/

float hcap(float t,float d)

{float cp;

cp=(0.7072+(0.00147-0.000551*d)*t-0.318*d)*(0.055*12.5+0.35); cp=cp*4186;

return(cp);

}

/*以下为热导率的计算:*/

float hcon(float t,float d)

{float cn;

cn=0.1008*(1-0.00054*t)/d;

cn=cn*4186/3600;

return(cn);

}

float nianc(float t,float d)

{float ni;

ni=exp(exp(22.81142-3.68738*log(t+273)))-1.22;

ni=ni*density(t,d)*0.000001;

return(ni);

}

float nianh(float t,float d)

{float ni;

ni=exp(exp(18.9173-2.92782*log(t+273)))-1.22;

ni=ni*density(t,d)*0.000001;

return(ni);

}

main()

{ int n,N;

float tc1,tc2,th1,th2,k,q,e,h,hi,ho,ntu,rei,reo,pri,pro,wc,tao,

wh,tmc,tmh,ai,ao,twi,two,cpc,cph,rdc,rdh,ndc,ndh,di,dou,dk,

d1,d2,s1,s2,cmin,cmax,de,p,l,v1,v2,rs,rt,thx,tx,ty,thy,tcx,tcy;

tc1=160; th1=280; wh=29.5; N=324; wc=37.5; di=0.021; dou=0.025; dk=0.8; l=6.0; p=0.032; n=0; rs=0.0005; rt=0.0001;

thx=th1;

do{

tmh=(th1+thx)/2;

cph=hcap(tmh,0.919);

q=wh*cph*(th1-thx);

tcx=tc1;

do{

tmc=(tc1+tcx)/2;

tc2=tc1+q/(wc*hcap(tmc,0.850));

tcy=tcx;

tcx=tc2;

}

while(fabs(tc2-tcy)>0.1);

tmc=(tc1+tc2)/2;

d1=density(tmc,0.850);

d2=density(tmh,0.919);

cpc=hcap(tmc,0.850);

rdc=hcon(tmc,0.850);

rdh=hcon(tmh,0.919);

ndc=nianc(tmc,0.850);

ndh=nianh(tmh,0.919);

s1=3.1415926*0.25*di*di*N*0.5;

v1=wc/d1/s1;

ai=3.1415926*di*N*l;

rei=di*v1*d1/ndc;

pri=cpc*ndc/rdc;

s2=0.230*dk*(1-dou/p);

v2=wh/d2/s2;

de=4*(p*p-3.1415926*0.25*dou*dou)/(3.1415926*dou);

reo=de*v2*d2/ndh;

pro=cph*ndh/rdh;

ao=3.1415926*dou*N*l;

h=0.023*pow(rei,0.8)*pow(pri,0.33)*rdc/di;

hi=h;

twi=tmc+q/(h*ai);

do{hi=h*pow(ndc/nianc(twi,0.850),0.14);

tx=twi;

twi=tmc+q/(hi*ai);

}

while(fabs(twi-tx)>0.5);

hi=h*pow(ndc/nianc(twi,0.850),0.14);

if(reo>2000)h=0.36*pow(reo,0.55)*pow(pro,0.33)*rdh/de;

if(reo<=2000)h=0.527*pow(reo,0.5)*pow(pro,0.33)*rdh/de;

ho=h;

two=tmh-q/(h*ao);

do{ho=h*pow(ndh/nianh(two,0.919),0.14);

ty=two;

two=tmh-q/(ho*ao);

}

while(fabs(two-ty)>0.5);

ho=h*pow(ndh/nianh(two,0.919),0.14);

k=1/((1/hi+rt)*ao/ai+1/ho+rs);

cmin=wh*cph;

cmax=wc*cpc;

ntu=k*ao/(wh*cph);

tao=ntu*sqrt(1+(cmin/cmax)*(cmin/cmax));

e=2/(1+(cmin/cmax)+sqrt(1+(cmin/cmax))*(1+exp(-tao))/(1-exp(-tao)));

th2=th1-e*(th1-tc1);

tc2=tc1+(cmin/cmax)*(th1-th2);

thy=thx;

thx=th2;

n++;

printf("output of the recycle %d:\n",n);

printf("Rei=%f,",rei);

printf("Reo=%f,",reo);

printf("Pri=%f,",pri);

printf("Pro=%f\n",pro);

printf("Hi=%f,",hi);

printf("Ho=%f,",ho);

printf("Th2=%f,",th2);

printf("Tc2=%f\n",tc2);

printf("e=%f\n",e);

printf("NTU=%f\n",ntu);

printf("K=%f\n",k);

}

while(fabs(th2-thy)>0.1);

}

相关文档
最新文档