1 |
REQUIRE "johnpye/fprops/rankine_fprops.a4c"; |
2 |
IMPORT "johnpye/fprops/heatex_pinch"; |
3 |
IMPORT "johnpye/extpy/extpy"; |
4 |
IMPORT "johnpye/fprops/regenerator_plot"; |
5 |
|
6 |
MODEL heatex_pinch_data; |
7 |
(* this model exists simply to convey the necessary component data to the |
8 |
external relation that solves the heat exchanger behaviour. *) |
9 |
component IS_A symbol_constant; |
10 |
type IS_A symbol_constant; |
11 |
|
12 |
component_hot IS_A symbol_constant; |
13 |
type_hot IS_A symbol_constant; |
14 |
|
15 |
n IS_A integer_constant; |
16 |
END heatex_pinch_data; |
17 |
|
18 |
MODEL heatex_pinch REFINES stream_equipment; |
19 |
inlet_hot, outlet_hot IS_A stream_node; |
20 |
|
21 |
inlet.p, outlet.p ARE_THE_SAME; |
22 |
inlet_hot.p, outlet_hot.p ARE_THE_SAME; |
23 |
inlet_hot.cd, outlet_hot.cd ARE_THE_SAME; |
24 |
|
25 |
inlet_hot.mdot, outlet_hot.mdot ARE_THE_SAME; |
26 |
mdot_hot ALIASES inlet_hot.mdot; |
27 |
|
28 |
hxd IS_A heatex_pinch_data; |
29 |
hxd.component, inlet.cd.component ARE_THE_SAME; |
30 |
hxd.component_hot, inlet_hot.cd.component ARE_THE_SAME; |
31 |
hxd.type, inlet.cd.type ARE_THE_SAME; |
32 |
hxd.type_hot, inlet_hot.cd.type ARE_THE_SAME; |
33 |
n ALIASES hxd.n; |
34 |
|
35 |
Qdot IS_A energy_rate; |
36 |
DT_pinch "pinch temperature is the most-negative temperature difference (T_H-T_C) anywhere across the heat exchanger" IS_A delta_temperature; |
37 |
|
38 |
outlet.h = inlet.h + Qdot/inlet.mdot; |
39 |
outlet_hot.h = inlet_hot.h - Qdot/inlet_hot.mdot; |
40 |
|
41 |
pinch_ext: heatex_DT_phmphmQ( |
42 |
inlet.p, inlet.h, inlet.mdot, inlet_hot.p, inlet_hot.h, inlet_hot.mdot, Qdot : INPUT; |
43 |
DT_pinch : OUTPUT; |
44 |
hxd : DATA |
45 |
); |
46 |
METHODS |
47 |
METHOD regenerator_plot; |
48 |
EXTERNAL regenerator_plot_fprops(SELF); |
49 |
END regenerator_plot; |
50 |
END heatex_pinch; |
51 |
|
52 |
(* test case -- HEL from brayton_split model *) |
53 |
MODEL heatex_pinch_test REFINES heatex_pinch; |
54 |
inlet.cd.component :== 'carbondioxide'; |
55 |
inlet.cd.type :== 'helmholtz'; |
56 |
inlet_hot.cd.component :== 'carbondioxide'; |
57 |
inlet_hot.cd.type :== 'helmholtz'; |
58 |
n :== 8; |
59 |
METHODS |
60 |
METHOD on_load; |
61 |
RUN heatex_pinch::default_self; |
62 |
(* in this configuration, we iterate to calculate the heat transfer |
63 |
occuring for a particular pinch temperature *) |
64 |
FIX inlet.p := 200 {bar}; |
65 |
FIX inlet_hot.p := 74 {bar}; |
66 |
FIX inlet_hot.T := 100 {K} + 273.15 {K}; |
67 |
FIX inlet.T := 31 {K} + 273.15 {K}; |
68 |
FIX mdot_hot := 1.1 {kg/s}; |
69 |
FIX mdot := 0.81 {kg/s}; |
70 |
FIX DT_pinch := 10 {K}; |
71 |
END on_load; |
72 |
END heatex_pinch_test; |