I am trying to fill in the area between these two curves.
2 views (last 30 days)
Show older comments
clc
clear all
Duty = [0
2112798.41
4225596.82
6338395.22
8451193.63
10563992
12676790.4
14789588.9
16902387.3
19015185.7
21127984.1
23240782.5
25353580.9
27466379.3
29579177.7
31691976.1
33804774.5
35917572.9
38030371.3
40143169.7
42255968.2
44368766.6
46481565
48594363.4
50707161.8
52819960.2
54932758.6
57045557
59158355.4
61271153.8
63383952.2
65496750.6
67609549
69722347.5
70901149.6
71835145.9
73947944.3
76060742.7
78173541.1
80286339.5
82399137.9
84511936.3
86624734.7
88737533.1
90850331.5
92963129.9
95075928.3
97188726.8
99301525.2
101414324
103527122
105639920
107752719
109865517
111978316
114091114
116203912
118316711
120429509
122542308
124655106
126767904
128880703
130993501
133106300
135219098
137331897
139444695
141557493
143670292
145783090
147895889
150008687
152121485
154234284
156347082
158459881
160572679
162685477
164798276
166911074
169023873
171136671
173249469
175362268
177475066
179587865
181700663
183813461
185926260
188039058
188519623
190151857
192264655
194377454
196490252
198603050
200715849
202828647
204941446
207054244
209167042
211279841
];
T_h = [3682.40812
3655.48389
3628.53567
3601.56299
3574.56538
3547.54236
3520.49344
3493.41811
3466.31585
3439.18612
3412.02838
3384.84207
3357.6266
3330.3814
3303.10584
3275.79931
3248.46117
3221.09075
3193.68739
3166.25039
3138.77904
3111.27259
3083.73031
3056.15142
3028.53512
3000.88059
2973.187
2945.45348
2917.67914
2889.86306
2862.00431
2834.10192
2806.15489
2778.1622
2762.5239
2750.1228
2722.03559
2693.89947
2665.71328
2637.47584
2609.18593
2580.8423
2552.44365
2523.98866
2495.47595
2466.90411
2438.2717
2409.57722
2380.81912
2351.99582
2323.10568
2294.14703
2265.11814
2236.01722
2206.84244
2177.59191
2148.26368
2118.85578
2089.36614
2059.79265
2030.13297
2000.38546
1970.54713
1940.61599
1910.58958
1880.46545
1850.24107
1819.91388
1789.48125
1758.9405
1728.28891
1697.52372
1666.64212
1635.64127
1604.5183
1573.27035
1541.89452
1510.38793
1478.74773
1446.971107
1415.055285
1382.997582
1350.795415
1318.446333
1285.948043
1253.298452
1220.495699
1187.538201
1154.424692
1121.154272
1087.726456
1080.101177
1054.141218
1020.399035
986.500932
952.44851
918.243968
883.890106
849.39031
814.748514
779.969132
745.05696
710.017068
];
T_c = [1885
1853.05218
1820.93148
1788.63484
1756.15923
1723.50168
1690.65929
1657.62922
1624.40872
1590.99513
1557.38588
1523.57853
1489.57073
1455.360258
1420.944998
1386.32296
1351.492267
1316.451156
1281.197975
1245.731185
1210.049364
1174.151219
1138.035615
1101.701618
1065.14857
1028.376204
991.384804
954.175436
916.750254
879.112901
841.269023
803.226893
764.998158
726.598686
705.107661
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107661
692.773792
676.729326
660.605426
644.412772
628.161939
611.863421
595.527647
579.165
562.785821
546.4004275
530.019111
];
T_o = 530; %R
T_hot = (T_h - T_o)./T_h;
T_cold = (T_c - T_o)./T_c;
A_hot = trapz(Duty,T_hot);
A_cold = trapz(Duty,T_cold);
Exergy_loss = A_hot - A_cold
figure;
hold on;
plot(Duty,T_hot,'r')
plot(Duty,T_cold,'b')
xlabel('Duty (BTU/hr)')
ylabel('T-To/T')
legend('Thot','Tcold')
hold off

0 Comments
Accepted Answer
Star Strider
on 26 Jun 2025
Perhaps something like this --
clc
clear all
Duty = [0
2112798.41
4225596.82
6338395.22
8451193.63
10563992
12676790.4
14789588.9
16902387.3
19015185.7
21127984.1
23240782.5
25353580.9
27466379.3
29579177.7
31691976.1
33804774.5
35917572.9
38030371.3
40143169.7
42255968.2
44368766.6
46481565
48594363.4
50707161.8
52819960.2
54932758.6
57045557
59158355.4
61271153.8
63383952.2
65496750.6
67609549
69722347.5
70901149.6
71835145.9
73947944.3
76060742.7
78173541.1
80286339.5
82399137.9
84511936.3
86624734.7
88737533.1
90850331.5
92963129.9
95075928.3
97188726.8
99301525.2
101414324
103527122
105639920
107752719
109865517
111978316
114091114
116203912
118316711
120429509
122542308
124655106
126767904
128880703
130993501
133106300
135219098
137331897
139444695
141557493
143670292
145783090
147895889
150008687
152121485
154234284
156347082
158459881
160572679
162685477
164798276
166911074
169023873
171136671
173249469
175362268
177475066
179587865
181700663
183813461
185926260
188039058
188519623
190151857
192264655
194377454
196490252
198603050
200715849
202828647
204941446
207054244
209167042
211279841
];
T_h = [3682.40812
3655.48389
3628.53567
3601.56299
3574.56538
3547.54236
3520.49344
3493.41811
3466.31585
3439.18612
3412.02838
3384.84207
3357.6266
3330.3814
3303.10584
3275.79931
3248.46117
3221.09075
3193.68739
3166.25039
3138.77904
3111.27259
3083.73031
3056.15142
3028.53512
3000.88059
2973.187
2945.45348
2917.67914
2889.86306
2862.00431
2834.10192
2806.15489
2778.1622
2762.5239
2750.1228
2722.03559
2693.89947
2665.71328
2637.47584
2609.18593
2580.8423
2552.44365
2523.98866
2495.47595
2466.90411
2438.2717
2409.57722
2380.81912
2351.99582
2323.10568
2294.14703
2265.11814
2236.01722
2206.84244
2177.59191
2148.26368
2118.85578
2089.36614
2059.79265
2030.13297
2000.38546
1970.54713
1940.61599
1910.58958
1880.46545
1850.24107
1819.91388
1789.48125
1758.9405
1728.28891
1697.52372
1666.64212
1635.64127
1604.5183
1573.27035
1541.89452
1510.38793
1478.74773
1446.971107
1415.055285
1382.997582
1350.795415
1318.446333
1285.948043
1253.298452
1220.495699
1187.538201
1154.424692
1121.154272
1087.726456
1080.101177
1054.141218
1020.399035
986.500932
952.44851
918.243968
883.890106
849.39031
814.748514
779.969132
745.05696
710.017068
];
T_c = [1885
1853.05218
1820.93148
1788.63484
1756.15923
1723.50168
1690.65929
1657.62922
1624.40872
1590.99513
1557.38588
1523.57853
1489.57073
1455.360258
1420.944998
1386.32296
1351.492267
1316.451156
1281.197975
1245.731185
1210.049364
1174.151219
1138.035615
1101.701618
1065.14857
1028.376204
991.384804
954.175436
916.750254
879.112901
841.269023
803.226893
764.998158
726.598686
705.107661
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107665
705.107661
692.773792
676.729326
660.605426
644.412772
628.161939
611.863421
595.527647
579.165
562.785821
546.4004275
530.019111
];
T_o = 530; %R
T_hot = (T_h - T_o)./T_h;
T_cold = (T_c - T_o)./T_c;
A_hot = trapz(Duty,T_hot);
A_cold = trapz(Duty,T_cold);
Exergy_loss = A_hot - A_cold
figure;
hold on;
plot(Duty,T_hot,'r')
plot(Duty,T_cold,'b')
patch([Duty; flip(Duty)], [T_hot; flip(T_cold)], 'g', FaceAlpha=0.25, EdgeColor='none')
xlabel('Duty (BTU/hr)')
ylabel('T-To/T')
legend('Thot','Tcold')
hold off
.
2 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
