Example 15.4-2 Parallel or Counter-Flow Heat Exchangers

>  restart;
>  eqh:=wCph*D(Th)(z)=U0*2*Pi*r0*(Tc(z)-Th(z)); Balance on 
the hot side: a combination of eq. 15.4-10 and eq. 13.1-8
>  eqc:=wCpc*D(Tc)(z)=U0*2*Pi*r0*(Th(z)-Tc(z)); Just like eqh, 
but for the cold side.
>  s:=dsolve({eqh,eqc,Tc(0)=Tc1,Th(0)=Th1},{Tc(z),Th(z)}):
>  assign(s); Th:=unapply(Th(z),z);Tc:=unapply(Tc(z),z);
>  dT1:=simplify(Th(0)-Tc(0));
>  dT2:=simplify(Th(L)-Tc(L));
>  log(dT1/dT2);
>  logdT12:=simplify(%,assume=positive); Agrees with eq. 15.4-14
[Maple Math]
>  wCpc:=Qc/(Tc2-Tc1); Using eq. 15.4-9
>  wCph:=-Qc/(Th2-Th1); Using eq. 15.4-8 and Qc+Qh=0.
>  logdT12;
>  Qc:=solve(-logdT12=logdT21,Qc); eq. 15.4-15
[Maple Math]
In this last expression, logdT21 is log(dT2/dT1) which of course 
is -log(dT1/dT2) or log((Th2-Tc2)/(Th1-Tc1)), thus we will set up a 
function to calculate this as:
>  Qc:=(UA,Tc2,Tc1,Th2,Th1)->UA*((Th2-Tc2)-(Th1-Tc1))/
log((Th2-Tc2)/(Th1-Tc1));
>  Tc1:=25; Tc2:=100; Th1:=200; wCpc:=5; wCph:=7.; This is 
one set of parameters that are commonly specified for a heat exchanger.
>  Qcspec:=(Tc2-Tc1)*wCpc; Using eq. 15.4-9 again. This time to 
get Qc.
[Maple Math]
>  Th2:=solve(-Qcspec=(Th2-Th1)*wCph,Th2); Using eq. 15.4-8 
and Qc+Qh=0 again. This time to get the hot temperature at the 2 end.
[Maple Math]
>  UA:=solve(Qcspec=Qc(UA,Tc2,Tc1,Th2,Th1),UA);
[Maple Math]
>  U0:=UA/(2*Pi*r0*L);
>  Th(zeta*L);
>  Tc(zeta*L);
>  plot({Th(zeta*L),Tc(zeta*L)},zeta=0...1.,color=[red,blue]); 
This is typical co-current flow. It is not an efficient way to operate.
[Maple Plot]
>  Th2:=200;Th1:='Th1';UA:='UA'; Let's switch to countercurrent 
flow so the temperature of the hot fluid at end 2 will be 200. 
In addition we need to "unset" a couple of variables that we gave 
values to in the last session.
>  wCph:=-7.; Now our flow will be in the opposite direction to z 
for the hot stream. 
>  Th1:=solve(-Qcspec=(Th2-Th1)*wCph,Th1);
[Maple Math]
>  UA:=solve(Qcspec=Qc(UA,Tc2,Tc1,Th2,Th1),UA);U0:=UA/
(2*Pi*r0*L); The UA required is now about 12% less than for 
co-current flow.
[Maple Math] [Maple Math]
>  plot({Th(zeta*L),Tc(zeta*L)},zeta=0...1.,color=[red,blue]);
[Maple Plot]
That looks much better and efficient than in co-current flow.