Ticket #12: Modelo.mso

File Modelo.mso, 1.0 KB (added by gerson bicca, 15 years ago)
Line 
1
2using "types";
3
4Model LogMeanTemperature
5
6VARIABLES
7
8DT0     as temp_delta;
9DTL             as temp_delta;
10LMTD    as temp_delta;
11Thi     as temperature;
12Tho     as temperature;
13Tci     as temperature;
14Tco     as temperature;
15
16EQUATIONS
17
18if 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       
26if 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       
36end
37       
38end
39
40end
41
42Model LMTD_counter      as LogMeanTemperature
43
44EQUATIONS
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       
52end
53
54Model LMTD_cocurrent    as LogMeanTemperature
55
56EQUATIONS
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
64end