d-slot

Embed Size (px)

DESCRIPTION

cumbustion

Citation preview

/*when inlet and outlet temperatures are known and given the required thermal duty*/

floatA,H1,H2,U,a1,a2,v1,v2,k1,k2,kw,p1,p2,d1,d1,dw,c1,c2,cw,u1,u2,uw,r1,r2,Q,Q1,ti1,ti2,to1,to2,tm,s1,s2,h1,h2,q1,q2,p11,p111,p22,p222,n1,n2;/*input command of values like total flow rate of liquid(v1,v2),Allowable presure drop(p1,p2),thermal conductivity(k1,k2),density(d1,d2),specific heat(c1,c2),dynamic viscosity(u1,u2),Fouling friction resistances(if any)(r1,r2),total thermal duty required(Q),Temperatures at both inlet and exit (ti1,ti2,to1,to2).All he above constants must be input for both hot and cold fluid.*///1 represents the hot fluid,2 represents the cold fluid dw=1000;cw=4.2;kw=0.63;uw=0.65*10^-3;If(v1>v2){Calculate A from fig 7.31 using v1;}else;{Calculate A from fig 7.31 using v2;}int i=1;for(i>0){//for fluid 1//input no of passes 'H1's1=[(k1/kw)^0.6]*[(d1/dw)^0.67]*[(c1/cw)^0.4]*[(u1/uw)^-0.27];h1=[(u1/uw)^0.252]*[(d1/dw)^0.748];//modify the graph 7.32 by multiplying the y-axis with s1 and x-axis with h1p11=p1/H1;//Obtain the value of a1 from the modified graph of 7.3 using the value p11p111=p11/s1;//Obatin the value of q1(plate flow rate) from the graph 7.33 using p111//for fluid 2//input no of passes 'H2's2=[(k2/kw)^0.6]*[(d2/dw)^0.67]*[(c2/cw)^0.4]*[(u2/uw)^-0.27];h1=[(u2/uw)^0.252]*[(d2/dw)^0.748];//modify the graph 7.32 by multiplying the y-axis with s2 and x-axis with h2p22=p2/H2;//Obtain the value of a2 from the modified graph of 7.3 using the value p22p222=p22/s2;//Obtain the value of q2(plate flow rate) from the graph 7.33 using p222U=[a1*a2]/[a1+a2+(r1+r2)*a1*a2];tm=[(to1-to2)-(ti1-ti2)]/ln[(to1-to2)/(ti1-ti2)];n1=(2*H1*V1)/q1;n2=(2*H2*V2)/q2;if(n1>n2){Q1=U*n1*A*tm;}else{Q1=U*n2*A*tm;}float Q2Q2=Q-Q1;if (Q2>=0){Q2=Q2;}else{Q2=-Q2;}if (Q2