summaryrefslogtreecommitdiff
path: root/617/CH9/EX9.6/Example9_6.sci
blob: c5e9b521ab4600fc8c1ffd9aff9277804cd2e373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clc();
clear;

// To calculate temperature difference for heat exchanger

Tc1 = 120;                                  // Inlet cold fluid temperature in degF
Tc2 = 310;                                  // Outlet cold fluid temperature in degF
Th1 = 500;                                  // Inlet hot fluid temperature in degF
Th2 = 400;                                  // Outlet hot fluid temperature in degF
K = (Tc2-Tc1)/(Th2-Tc2);                    // Temperature ratio
R = (Th1-Th2)/(Tc2-Tc1);                    // Temperature ratio    
delt1 = Th2-Tc1;                            // Maximum temperature difference in degF
delt2 = Th1-Tc2;                            // Minimum temperature difference in degF
LMTD = (delt1-delt2)/log(delt1/delt2);      // Log mean temperature difference
f = 0.99;                                   // Correction factor as seen from figure
LMTDc = round(LMTD*f);                      // Corrected log mean temperature difference
printf("Log mean temperature difference is %d degF",LMTDc);