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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2741 - (show annotations) (download) (as text)
Tue Jan 28 14:01:06 2014 UTC (6 years, 2 months ago) by jpye
File MIME type: text/x-ascend
File size: 3248 byte(s)
update comments
1 REQUIRE "johnpye/fprops/rankine_fprops.a4c";
2 REQUIRE "johnpye/fprops/pipe.a4c";
3
4 MODEL throttle REFINES stream_equipment;
5 inlet.h, outlet.h ARE_THE_SAME;
6 METHODS
7 METHOD default_self;
8 RUN inlet.default_self;
9 RUN outlet.default_self;
10 END default_self;
11 END throttle;
12
13 (*
14 Model of a linear array of solar concentrators (dishes) with pressure drop
15 and heat loss in the connection lines, and fixed heat input in each dish,
16 but no assumed pressure drop (boiler_simple model).
17
18 PC1 PC2 ... PCn (cold-side pipe connections)
19 >>-o------+-------+-------+-------\
20 | | | |
21 DI1 | DI2 | ... | DIn | (dishes)
22 <<-o------+-------+-------+-------/
23 PH1 PH2 ... PHn  (hot-size pipe connections)
24
25 *)
26 MODEL disharray;
27 n IS_A integer_constant;
28 n :== 4;
29
30 PC[1..n] IS_A pipe_heat_loss;
31 PH[1..n] IS_A pipe_heat_loss;
32 TE[1..n-1] IS_A tee;
33 JO[1..n-1] IS_A merge;
34 TH[1..n-1] IS_A throttle;
35 DI[1..n] IS_A boiler_simple;
36
37 FOR i IN [1..n-1] CREATE
38 PC[i].outlet, TE[i].inlet ARE_THE_SAME;
39 TE[i].outlet_branch, DI[i].inlet ARE_THE_SAME;
40 DI[i].outlet, TH[i].inlet ARE_THE_SAME;
41 TH[i].outlet, JO[i].inlet_branch ARE_THE_SAME;
42 JO[i].outlet, PH[i].inlet ARE_THE_SAME;
43 TE[i].outlet,PC[i+1].inlet ARE_THE_SAME;
44 JO[i].inlet,PH[i+1].inlet ARE_THE_SAME;
45 END FOR;
46 PC[n].outlet, DI[n].inlet ARE_THE_SAME;
47 DI[n].outlet, PH[n].inlet ARE_THE_SAME;
48
49 (* easy first try: all pipes same size, thickness, length, roughness *)
50 D, t, L, eps IS_A distance;
51 D, PC[1..n].D, PH[1..n].D ARE_THE_SAME;
52 t, PC[1..n].t, PH[1..n].t ARE_THE_SAME;
53 L, PC[1..n].L, PH[1..n].L ARE_THE_SAME;
54 eps, PC[1..n].eps, PH[1..n].eps ARE_THE_SAME;
55 emiss IS_A fraction;
56 emiss, PC[1..n].emiss, PH[1..n].emiss ARE_THE_SAME;
57 mu IS_A viscosity;
58 mu, PC[1..n].mu, PH[1..n].mu ARE_THE_SAME;
59 h IS_A heat_transfer_coefficient;
60 h, PC[1..n].h, PH[1..n].h ARE_THE_SAME;
61 T_amb IS_A temperature;
62 T_amb, PC[1..n].T_amb, PH[1..n].T_amb ARE_THE_SAME;
63
64 Qdot_onedish IS_A energy_rate;
65 Qdot_onedish, DI[1..n].Qdot ARE_THE_SAME;
66 DI[1..n].eta ARE_THE_SAME; eta_DI ALIASES DI[1].eta;
67
68 Qdot_loss_tot IS_A energy_rate;
69 Qdot_loss_tot = SUM[PC[i].Q + PH[i].Q|i IN [1..n]];
70
71 inlet ALIASES PC[1].inlet;
72 outlet ALIASES PH[1].outlet;
73
74 (* try: same mass flow for each dish *)
75 DI[1..n].mdot ARE_THE_SAME;
76
77 cd ALIASES inlet.cd;
78 cd.component :== 'water';
79 cd.type :== 'helmholtz';
80 METHODS
81 METHOD default_self;
82 FOR i IN [1..n-1] DO
83 RUN TE[i].default_self;
84 RUN JO[i].default_self;
85 RUN TH[i].default_self;
86 END FOR;
87 FOR i IN [1..n] DO
88 RUN PC[i].default_self;
89 RUN DI[i].default_self;
90 RUN PH[i].default_self;
91 END FOR;
92 END default_self;
93 METHOD on_load;
94 RUN default_self;
95 FOR i IN [1..n-1] DO
96 (*RUN TE[i].disable_cons_mass;*)
97 (*FIX TE[i].phi := 0.5;*)
98 END FOR;
99 FIX Qdot_onedish := 400 {kW};
100 FIX eta_DI := 1;
101 FIX D := 25 {mm};
102 FIX L := 40 {m};
103 FIX t := 4 {mm};
104 FIX eps := 0.015 {mm};
105 FIX emiss := 0.5;
106 FIX mu := 0.024 {cP};
107 FIX h := 10 {W/m^2/K};
108 FIX inlet.p := 50 {bar};
109 FIX inlet.T := 100 {K} + 273.15 {K};
110 FIX DI[1].mdot := 0.1 {kg/s}; (* same for all dishes *)
111 FIX T_amb := 300 {K};
112 (* initial guesses to help the solver *)
113 PC[1..n].inlet.h := 400 {kJ/kg};
114 END on_load;
115 END disharray;

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