/[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 2740 - (show annotations) (download) (as text)
Tue Jan 28 13:58:59 2014 UTC (10 years, 5 months ago) by jpye
File MIME type: text/x-ascend
File size: 3356 byte(s)
linear dish array model, with pressure drops in pipe segments, first attempt
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
19 o------+-------+-------+-------\
20 | | | |
21 DI1 | DI2 | ... | DIn |
22 o------+-------+-------+-------/
23 PH1 PH2 ... PHn 
24
25 So far this model isn't solving... it might be because pressure drops
26 are overspecified / we aren't allowing for pressure drop through the dishes
27 such that at the joins, the pressures even out...?
28 *)
29 MODEL disharray;
30 n IS_A integer_constant;
31 n :== 4;
32
33 PC[1..n] IS_A pipe_heat_loss;
34 PH[1..n] IS_A pipe_heat_loss;
35 TE[1..n-1] IS_A tee;
36 JO[1..n-1] IS_A merge;
37 TH[1..n-1] IS_A throttle;
38 DI[1..n] IS_A boiler_simple;
39
40 FOR i IN [1..n-1] CREATE
41 PC[i].outlet, TE[i].inlet ARE_THE_SAME;
42 TE[i].outlet_branch, DI[i].inlet ARE_THE_SAME;
43 DI[i].outlet, TH[i].inlet ARE_THE_SAME;
44 TH[i].outlet, JO[i].inlet_branch ARE_THE_SAME;
45 JO[i].outlet, PH[i].inlet ARE_THE_SAME;
46 TE[i].outlet,PC[i+1].inlet ARE_THE_SAME;
47 JO[i].inlet,PH[i+1].inlet ARE_THE_SAME;
48 END FOR;
49 PC[n].outlet, DI[n].inlet ARE_THE_SAME;
50 DI[n].outlet, PH[n].inlet ARE_THE_SAME;
51
52 (* easy first try: all pipes same size, thickness, length, roughness *)
53 D, t, L, eps IS_A distance;
54 D, PC[1..n].D, PH[1..n].D ARE_THE_SAME;
55 t, PC[1..n].t, PH[1..n].t ARE_THE_SAME;
56 L, PC[1..n].L, PH[1..n].L ARE_THE_SAME;
57 eps, PC[1..n].eps, PH[1..n].eps ARE_THE_SAME;
58 emiss IS_A fraction;
59 emiss, PC[1..n].emiss, PH[1..n].emiss ARE_THE_SAME;
60 mu IS_A viscosity;
61 mu, PC[1..n].mu, PH[1..n].mu ARE_THE_SAME;
62 h IS_A heat_transfer_coefficient;
63 h, PC[1..n].h, PH[1..n].h ARE_THE_SAME;
64 T_amb IS_A temperature;
65 T_amb, PC[1..n].T_amb, PH[1..n].T_amb ARE_THE_SAME;
66
67 Qdot_onedish IS_A energy_rate;
68 Qdot_onedish, DI[1..n].Qdot ARE_THE_SAME;
69 DI[1..n].eta ARE_THE_SAME; eta_DI ALIASES DI[1].eta;
70
71 Qdot_loss_tot IS_A energy_rate;
72 Qdot_loss_tot = SUM[PC[i].Q + PH[i].Q|i IN [1..n]];
73
74 inlet ALIASES PC[1].inlet;
75 outlet ALIASES PH[1].outlet;
76
77 (* try: same mass flow for each dish *)
78 DI[1..n].mdot ARE_THE_SAME;
79
80 cd ALIASES inlet.cd;
81 cd.component :== 'water';
82 cd.type :== 'helmholtz';
83 METHODS
84 METHOD default_self;
85 FOR i IN [1..n-1] DO
86 RUN TE[i].default_self;
87 RUN JO[i].default_self;
88 RUN TH[i].default_self;
89 END FOR;
90 FOR i IN [1..n] DO
91 RUN PC[i].default_self;
92 RUN DI[i].default_self;
93 RUN PH[i].default_self;
94 END FOR;
95 END default_self;
96 METHOD on_load;
97 RUN default_self;
98 FOR i IN [1..n-1] DO
99 (*RUN TE[i].disable_cons_mass;*)
100 (*FIX TE[i].phi := 0.5;*)
101 END FOR;
102 FIX Qdot_onedish := 400 {kW};
103 FIX eta_DI := 1;
104 FIX D := 25 {mm};
105 FIX L := 40 {m};
106 FIX t := 4 {mm};
107 FIX eps := 0.015 {mm};
108 FIX emiss := 0.5;
109 FIX mu := 0.024 {cP};
110 FIX h := 10 {W/m^2/K};
111 FIX inlet.p := 50 {bar};
112 FIX inlet.T := 100 {K} + 273.15 {K};
113 FIX DI[1].mdot := 0.1 {kg/s}; (* same for all dishes *)
114 FIX T_amb := 300 {K};
115 (* initial guesses to help the solver *)
116 PC[1..n].inlet.h := 400 {kJ/kg};
117 END on_load;
118 END disharray;

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