/[ascend]/trunk/models/johnpye/fprops/heatex_pinch.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/fprops/heatex_pinch.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2630 - (show annotations) (download) (as text)
Mon Aug 6 13:42:14 2012 UTC (9 years, 10 months ago) by jpye
File MIME type: text/x-ascend
File size: 1690 byte(s)
Trying to split up instantiate.c. A big job actually.
1 REQUIRE "johnpye/fprops/rankine_fprops.a4c";
2 IMPORT "johnpye/fprops/heatex_pinch";
3
4 MODEL heatex_pinch_data;
5 component IS_A symbol_constant;
6 component_hot IS_A symbol_constant;
7 n IS_A integer_constant;
8 END heatex_pinch_data;
9
10 MODEL heatex_pinch REFINES stream_equipment;
11 inlet_hot, outlet_hot IS_A stream_node;
12
13 inlet.p, outlet.p ARE_THE_SAME;
14 inlet_hot.p, outlet_hot.p ARE_THE_SAME;
15 inlet_hot.cd, outlet_hot.cd ARE_THE_SAME;
16
17 inlet_hot.mdot, outlet_hot.mdot ARE_THE_SAME;
18 mdot_hot ALIASES inlet_hot.mdot;
19
20 hxd IS_A heatex_pinch_data;
21 hxd.component, inlet.cd.component ARE_THE_SAME;
22 hxd.component_hot, inlet_hot.cd.component ARE_THE_SAME;
23 n ALIASES hxd.n;
24
25 Qdot IS_A energy_rate;
26 DT_pinch "pinch temperature is the most-negative temperature difference (T_H-T_C) anywhere across the heat exchanger" IS_A delta_temperature;
27
28 outlet.h = inlet.h + Qdot/inlet.mdot;
29 outlet_hot.h = inlet_hot.h - Qdot/inlet_hot.mdot;
30
31 pinch_ext: heatex_DT_phmphmQ(
32 inlet_hot.p, inlet_hot.h, inlet_hot.mdot, inlet.p, inlet.h, inlet.mdot,Qdot : INPUT;
33 DT_pinch : OUTPUT;
34 hxd : DATA
35 );
36 METHODS
37 METHOD regenerator_plot;
38 EXTERNAL regenerator_plot_fprops(SELF);
39 END regenerator_plot;
40 END heatex_pinch;
41
42 (* test case -- HEL from brayton_split model *)
43 MODEL heatex_pinch_test REFINES heatex_pinch;
44 inlet.cd.component :== 'carbondioxide';
45 inlet_hot.cd.component :== 'carbondioxide';
46 n :== 20;
47 METHODS
48 METHOD on_load;
49 RUN heatex_pinch::default_self;
50 FIX inlet.p := 200 {bar};
51 FIX inlet_hot.p := 74 {bar};
52 FIX inlet_hot.T := 100 {K} + 273.15{K};
53 FIX inlet.T := 31 {K};
54 FIX mdot_hot := 1.1 {kg/s};
55 FIX mdot := 0.81 {kg/s};
56 FIX DT_pinch := 10 {K};
57 END on_load;
58 END heatex_pinch_test;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22