1 | |
---|
2 | using "types"; |
---|
3 | |
---|
4 | Model LogMeanTemperature |
---|
5 | |
---|
6 | VARIABLES |
---|
7 | |
---|
8 | DT0 as temp_delta; |
---|
9 | DTL as temp_delta; |
---|
10 | LMTD as temp_delta; |
---|
11 | Thi as temperature; |
---|
12 | Tho as temperature; |
---|
13 | Tci as temperature; |
---|
14 | Tco as temperature; |
---|
15 | |
---|
16 | EQUATIONS |
---|
17 | |
---|
18 | if abs(DT0 - DTL) > 0.05*max(abs([DT0,DTL])) |
---|
19 | |
---|
20 | then |
---|
21 | "Log Mean Temperature Difference" |
---|
22 | LMTD= (DT0-DTL)/ln(DT0/DTL); |
---|
23 | |
---|
24 | else |
---|
25 | |
---|
26 | if DT0*DTL equal 0 |
---|
27 | |
---|
28 | then |
---|
29 | "Log Mean Temperature Difference" |
---|
30 | LMTD = 0.5*(DT0+DTL); |
---|
31 | |
---|
32 | else |
---|
33 | "Log Mean Temperature Difference" |
---|
34 | LMTD = 0.5*(DT0+DTL)*(1-(DT0-DTL)^2/(DT0*DTL)*(1+(DT0-DTL)^2/(DT0*DTL)/2)/12); |
---|
35 | |
---|
36 | end |
---|
37 | |
---|
38 | end |
---|
39 | |
---|
40 | end |
---|
41 | |
---|
42 | Model LMTD_counter as LogMeanTemperature |
---|
43 | |
---|
44 | EQUATIONS |
---|
45 | |
---|
46 | "Temperature Difference at Inlet - Counter Flow" |
---|
47 | DT0 = Thi - Tco; |
---|
48 | |
---|
49 | "Temperature Difference at Outlet - Counter Flow" |
---|
50 | DTL = Tho - Tci; |
---|
51 | |
---|
52 | end |
---|
53 | |
---|
54 | Model LMTD_cocurrent as LogMeanTemperature |
---|
55 | |
---|
56 | EQUATIONS |
---|
57 | |
---|
58 | "Temperature Difference at Inlet - Cocurrent Flow" |
---|
59 | DT0 = Thi- Tci; |
---|
60 | |
---|
61 | "Temperature Difference at Outlet - Cocurrent Flow" |
---|
62 | DTL = Tho - Tco; |
---|
63 | |
---|
64 | end |
---|