/[ascend]/trunk/models/johnpye/cavity.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/cavity.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2742 - (show annotations) (download) (as text)
Thu Jan 30 04:08:09 2014 UTC (10 years, 5 months ago) by jpye
File MIME type: text/x-ascend
File size: 6641 byte(s)
components.a4l had a mistake in units on nitrogen and oxygen cpvapa etc.
cavity.a4c needs to use 'fraction' instead of 'factor', hope that's correct.
test list updates for IDA.
1 (*
2 ASCEND model library: radiation heat transfer model
3 Copyright (C) John Pye 2006
4 http://jpye.dyndns.org/
5
6 This program is free software; you can redistribute it
7 and/or modify it under the terms of the GNU General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later
10 version.
11
12 This program is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied
14 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the GNU General Public License for more
16 details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 -------------------------------------------------------------------
21
22 This is a radiation heat transfer model that is being used
23 to simulate (just a rough model) the absorber of a large solar
24 thermal energy system. For more information see
25 http://jpye.dyndns.org or google for 'CLFR'. This is a linear
26 concentrator, so the cavity is simulated with a two-dimensional
27 model. The cavity is trapezoidal in shape, wider at the base
28 through which radiation enters.
29
30 The upper inside surface 'W' is the absorber. The cavity has a flat
31 base 'B', and side walls 'L' and 'R' (of length N). This model
32 calculates view factors between these surfaces then implements a
33 'network' model to determine the equilibrium temperatures and
34 heat transfer between the surfaces inside the cavity. External heat
35 losses are allowed for: radiation and convention at the cavity
36 base, plus convection off the side-walls.
37 *)
38
39 REQUIRE "atoms.a4l";
40 REQUIRE "johnpye/thermo_types.a4c";
41
42 MODEL cavity_base;
43 (*
44 This model implements the grey body equilibrium equations
45 but no specific geometry or boundary conditions
46 *)
47 n "surfaces in the cavity" IS_A set OF symbol_constant;
48 A[n] "length of the surfaces (in 2D)" IS_A distance;
49
50 F[n][n] IS_A fraction;
51
52 (* Radiation equations *)
53 q[n] "net heat transfer from each surface" IS_A energy_rate_per_length;
54
55 E_b[n] IS_A energy_flux;
56 J[n] IS_A energy_flux;
57 T[n] IS_A temperature;
58 eps[n] IS_A fraction; (* emissivity *)
59
60 FOR i IN n CREATE
61 z_q[i]: q[i] = SUM[ (J[i]-J[j])*(A[i]*F[i][j]) | j IN n];
62 END FOR;
63
64 FOR i IN n CREATE
65 z_E_b[i]: E_b[i] = 1{SIGMA_C} * T[i]^4;
66 END FOR;
67
68 FOR i IN n CREATE
69 z_J[i]: q[i] * (1-eps[i]) = (E_b[i] - J[i]) * (eps[i]*A[i]);
70 END FOR;
71 END cavity_base;
72
73 MODEL cavity REFINES cavity_base;
74 (* specific test case for the CLFR cavity receiver *)
75 W,B,S,N,C,E,D IS_A distance;
76 theta, phi, psi IS_A angle;
77
78 F_WN, F_WW, F_WB IS_A fraction;
79 F_NB, F_NW, F_NN, F_BW, F_BN IS_A fraction;
80 F_WS IS_A fraction;
81
82 z_N: N * sin(theta) = D;
83 z_S: S * tan(theta) = D;
84 z_B: B = W + 2 * S;
85 z_E: E^2 = W^2 + D^2;
86 z_phi: phi = arctan(D/W);
87 z_psi: psi = 1{PI} - phi;
88 z_C: C^2 = E^2 + S^2 - 2* E * S * cos(psi);
89
90 z_F_WN: F_WN = (W+N-C)/2/W;
91 z_F_WW: F_WW = (2*E-2*D)/2/W; (* from top to directly opp part of bottom *)
92 z_F_WB: F_WB = 1 - 2 * F_WN;
93 z_F_WS: F_WS = (1 - 2 * F_WN - F_WB)/2;
94 z_F_NB: F_NB = (N+B-C)/2/N;
95 z_F_NW: F_NW = (N+W-C)/2/N;
96
97 z_F_BN: F_BN = F_NB*N/B;
98 z_F_NN: F_NN = 1 - F_NW - F_NB;
99 z_F_BW: F_BW = F_WB*W/B;
100
101 n :== ['W','B','L','R'];
102
103 (* Put lengths into a vector *)
104
105 A['W'], W ARE_THE_SAME;
106 A['B'], B ARE_THE_SAME;
107 A['L'], N ARE_THE_SAME;
108 A['R'], N ARE_THE_SAME;
109
110 (* View factor matrix *)
111
112 F['W']['L'], F['W']['R'], F_WN ARE_THE_SAME;
113 F['W']['B'], F_WB ARE_THE_SAME;
114 z_F_WW1: F['W']['W'] = 0;
115
116 F['B']['L'], F['B']['R'], F_BN ARE_THE_SAME;
117 F['B']['W'], F_BW ARE_THE_SAME;
118 z_F_BB1: F['B']['B'] = 0;
119
120 F['L']['R'], F['R']['L'], F_NN ARE_THE_SAME;
121 F['L']['B'], F['R']['B'], F_NB ARE_THE_SAME;
122 F['L']['W'], F['R']['W'], F_NW ARE_THE_SAME;
123 z_F_LL: F['L']['L'] = 0;
124 z_F_RR: F['R']['R'] = 0;
125
126 METHODS
127 METHOD on_load;
128 RUN default_self;
129 RUN reset;
130 RUN values;
131 RUN bound_self;
132 END on_load;
133
134 METHOD default_self;
135 psi := 120 {deg};
136 END default_self;
137
138 METHOD bound_self;
139 phi.lower_bound := 0 {deg};
140 phi.upper_bound := 90 {deg};
141 psi.lower_bound := 90 {deg};
142 psi.upper_bound := 180 {deg};
143 END bound_self;
144
145 METHOD specify;
146 FIX T['W', 'B'];
147 FIX q['L','R'];
148 FIX W,D,theta;
149 FIX eps[n];
150 END specify;
151
152 METHOD values;
153 T['W'] := 550 {K};
154 T['B'] := 373.15 {K};
155 q['L','R'] := 0 {W/m};
156
157 W := 575 {mm};
158 D := 200 {mm};
159 theta := 32 {deg};
160
161 eps['W'] := 0.49;
162 eps['B'] := 0.9;
163 eps['L','R'] := 0.1;
164 END values;
165
166 END cavity;
167
168 (*
169 The following model adds external convection coefficients to
170 the model, and an ambient temperature.
171
172 We also calculate the 'F_rad' correlation parameter (see
173 http://jpye.dyndns.org for more information).
174 *)
175 MODEL cavity_losses REFINES cavity;
176 h_B, h_N IS_A heat_transfer_coefficient;
177 T_amb IS_A temperature;
178
179 (* external heat loss *)
180
181 q_ext_rad IS_A energy_rate_per_length;
182 q_ext_conv IS_A energy_rate_per_length;
183 q_ext_conv = h_B * B * (T['B'] - T_amb);
184 q_ext_rad = B * eps['B'] * 1{SIGMA_C} * (T['B']^4 - T_amb^4);
185 z_q_B: - q['B'] = q_ext_conv + q_ext_rad;
186 z_q_L: - q['L'] = h_N * N * (T['L'] - T_amb);
187 z_q_R:- q['R'] = h_N * N * (T['L'] - T_amb);
188
189 (* Determine 'F_rad' from overall heatloss... *)
190
191 F_rad IS_A factor;
192 F_rad_1 IS_A factor;
193
194 z_F_rad: q['W'] = F_rad * W * eps['W'] * 1{SIGMA_C} * (T['W']^4 - T['B']^4);
195
196 z_F_rad_1: q['W'] = F_rad_1 * W * 1{SIGMA_C} * (T['W']^4 - T['B']^4) /
197 (1/eps['B'] + 1/eps['W'] - 1);
198
199 METHODS
200 METHOD specify;
201 FIX T['W'], T_amb;
202 FIX h_B, h_N;
203 FIX W,D,theta;
204 FIX eps[n];
205 END specify;
206 METHOD values;
207 T['W'] := 550 {K};
208 T_amb := 290 {K};
209 W := 575 {mm};
210 D := 200 {mm};
211 theta := 32 {deg};
212 eps['W'] := 0.49;
213 eps['B'] := 0.9;
214 eps['L','R'] := 0.1;
215 h_B := 10 {W/m^2/K};
216 h_N := 0.5 {W/m^2/K};
217 (* free values *)
218 T['L','R'] := 500 {K};
219 T['B'] := 400 {K};
220 END values;
221 END cavity_losses;
222
223 (*
224 This final model will examine the possible convection
225 behaviour inside the stratified cavity
226 *)
227 MODEL cavity_convection;
228 W, D_strat IS_A distance;
229 k IS_A thermal_conductivity;
230 Q IS_A energy_rate_per_length;
231 T[1,2] IS_A temperature;
232
233 Q * D_strat = W * k * (T[1] - T[2]); (* conduction through stratified zone*)
234
235 (* rho IS_A mass_density;
236 cp IS_A specific_heat_capacity;
237
238 Pr IS_A factor;
239 Pr = mu / rho / alpha;
240
241 mu IS_A viscosity;
242 alpha IS_A diffusivity;
243 alpha = k / rho / cp;
244 *)
245
246 METHODS
247 METHOD specify;
248 FIX k, mu, cp, rho;
249 FIX T[1,2];
250 FIX W, D_strat;
251 END specify;
252 METHOD default_self;
253 RUN reset; RUN values;
254 END default_self;
255 METHOD values;
256 D_strat := 0.15 {m};
257 W := 575 {mm};
258 k := 0.039 {W/m/K};
259 T[1] := 550 {K};
260 T[2] := 332 {K};
261 END values;
262 END cavity_convection;
263
264

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