summaryrefslogtreecommitdiff
path: root/1328/CH5/EX5.2/5_2.sce
blob: bb0a355fe7524a36edc9bd0360c8677c0a8155fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
printf("\t example 5.2 \n");
T1=300; // hot fluid inlet temperature,F
T2=200; // hot fluid outlet temperature,F
t1=150; // cold fluid inlet temperature,F
t2=200; // cold fluid outlet temperature,F
printf("\t for counter current flow \n");
delt1=T1-t2; //F
delt2=T2-t1; // F
printf("\t delt1 is : %.0f F \n",delt1);
printf("\t delt2 is : %.0f F \n",delt2);
LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));
printf("\t LMTD is :%.0f F \n",LMTD);
printf("\t for parallel flow \n");
delt1=T1-t1; // F
delt2=T2-t2; // F
printf("\t delt1 is : %.0f F \n",delt1);
printf("\t delt2 is : %.0f F \n",delt2);
if(delt2==0);
    printf("\t denominator becomes infinity so LMTD becomes Zero \n");
    printf("\t LMTD is Zero \n");
else
    LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));
printf("\t LMTD is :%.0f F \n",LMTD);
    end
//end