/[ascend]/trunk/models/solar/packed_bed_thermal_storage_tank_Cp_rho_constant.a4l
ViewVC logotype

Contents of /trunk/models/solar/packed_bed_thermal_storage_tank_Cp_rho_constant.a4l

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2573 - (show annotations) (download) (as text)
Mon Feb 20 23:03:16 2012 UTC (10 years, 4 months ago) by jpye
File MIME type: text/x-ascend
File size: 4245 byte(s)
Merging models from Vikram Kadam. Awaiting checking.
1 REQUIRE "solar/solar_types.a4l";
2 REQUIRE "johnpye/thermo_types.a4c";
3
4
5 MODEL Air_Properties(
6 T WILL_BE temperature;
7 );
8 (* Variables *)
9 rho IS_A mass_density;
10 Cp IS_A specific_heat_capacity; (* Constant pressure heat capacity *)
11
12 T_dimless IS_A factor;
13 rho_dimless IS_A factor;
14 Cp_dimless IS_A factor;
15
16
17 (* Equations *)
18 T_dimless * 1{K} = T;
19 rho = rho_dimless * 1{kg/m^3};
20 Cp = Cp_dimless * 1{J/kg/K};
21
22 (* rho_dimless * (8314.32 * T_dimless) = 1000 * 101.325 * 28.9645; *)
23 rho = 1.2466 {kg/m^3};
24
25 (* Cp_dimless = (1 + ( 2.5e-10 * T_dimless^3 )) * 1000 ; *)
26 Cp = 1.012 {kJ/kg/K};
27
28 METHODS
29 METHOD bound_self;
30 rho.lower_bound := 0 {kg/m^3};
31 rho_dimless.lower_bound := 0;
32 Cp.lower_bound := 0 {J/kg/K};
33 Cp_dimless.lower_bound := 0;
34 END bound_self;
35 END Air_Properties;
36
37
38 MODEL test_Air_Properties;
39 T IS_A temperature;
40 instance IS_A Air_Properties (T);
41
42 METHODS
43 METHOD specify;
44 FIX T;
45 END specify;
46
47 METHOD values;
48 T := 25{K} + 273.15{K};
49 END values;
50
51 METHOD on_load;
52 RUN specify;
53 RUN values;
54
55 RUN instance.bound_self;
56 END on_load;
57 END test_Air_Properties;
58
59
60 MODEL layer;
61 T_f_after IS_A temperature;
62 T_f_before IS_A temperature;
63
64 T_b IS_A temperature;
65 NTU_by_N IS_A factor;
66
67 e IS_A real_constant;
68 e :== 2.718;
69
70 (T_f_after - T_b) * e^NTU_by_N = T_f_before - T_b;
71
72 (* T_f_after = T_f_before / 2; *)
73 END layer;
74
75
76 MODEL packed_bed_tank;
77 (* Constants *)
78 NL IS_A integer_constant;
79 NL :== 3;
80 e IS_A real_constant;
81 e :== 2.718;
82
83 (* Variables *)
84 (* Input Variables *)
85 T_amb IS_A temperature;
86 T_in IS_A temperature;
87 V IS_A speed; (* Fluid velocity *)
88 D IS_A distance; (* diameter of pebbles *)
89 A IS_A area; (* Cross sectional area of bed [input] *)
90 L IS_A distance; (* length of bed [input] *)
91 delta_t IS_A time; (* process starts from zero (Input: 0 to 5hrs) *)
92 epsilon IS_A fraction; (* bed void fraction (input) *)
93 (* Other variables *)
94 Tavg IS_A temperature;
95 T_out IS_A temperature;
96 NTU IS_A factor;
97 hv IS_A volumetric_heat_transfer_coefficient; (* volumetric heat transfer coefficient *)
98 G_dimless IS_A factor;
99 D_dimless IS_A factor;
100 mdot IS_A mass_rate;
101 NTU_by_N IS_A factor;
102 delta_x IS_A distance;
103 delta_theta IS_A time;
104
105
106 (* parts *)
107 air_props IS_A Air_Properties (Tavg);
108 bed[1..NL] IS_A layer;
109
110 (* Interconnections *)
111 bed[1].T_f_before, T_in ARE_THE_SAME;
112 bed[NL].T_f_after, T_out ARE_THE_SAME;
113 NTU_by_N, bed[1..NL].NTU_by_N ARE_THE_SAME;
114 FOR i IN [2..NL] CREATE
115 bed[i-1].T_f_after, bed[i].T_f_before ARE_THE_SAME;
116 END FOR;
117
118
119 (* Equations *)
120 Tavg = (T_in + T_out)/2;
121 NTU * (mdot * air_props.Cp) = hv * A * L;
122
123 hv * (D_dimless^0.7) = 650 * (G_dimless^0.7);
124 (* hv * D_dimless = 650{watt/m^3/K} * G_dimless; *)
125 (* hv^10 * (D_dimless^7) = 650^10 * (G_dimless^7); *)
126
127 D_dimless = D / 1{m};
128 G_dimless = V * air_props.rho / 1{kg/m^2/s};
129 mdot = air_props.rho * V * A;
130
131 delta_x = L / NL;
132 NTU_by_N = NTU / NL;
133
134 delta_theta * (air_props.rho * air_props.Cp) * (1-epsilon) * A * L = delta_t * mdot * air_props.Cp;
135
136 (bed[1].T_b - T_amb) * e^NTU_by_N = delta_theta * NL * (T_in - (T_amb + bed[1].T_b)/2);
137 FOR i IN [2..NL] CREATE
138 (bed[i].T_b - bed[i-1].T_b) * e^NTU_by_N = delta_theta * NL * (bed[i-1].T_f_after - (bed[i-1].T_b + bed[i].T_b)/2);
139 END FOR;
140
141
142 METHODS
143 METHOD specify;
144 FIX T_amb, T_in, V, D, A, L, delta_t, epsilon;
145 (* FIX T_out; *)
146 END specify;
147
148 METHOD bound_self;
149 RUN air_props.bound_self;
150 G_dimless.lower_bound := 0;
151 mdot.lower_bound := 0{kg/s};
152 NTU.lower_bound := 0;
153 NTU_by_N.lower_bound := 0;
154 hv.lower_bound := 0{watt/m^3/K};
155 delta_theta.lower_bound := 0 {s};
156 NTU_by_N.upper_bound := 100;
157
158 END bound_self;
159
160 METHOD values;
161 T_amb := 10 {K} + 273.15 {K};
162 T_in := 40 {K} + 273.15 {K};
163 V := 0.053 {m/s};
164 D := 0.0125 {m};
165 A := 14.8 {m^2};
166 L := 1.8 {m};
167 delta_t := 1 {hr};
168 epsilon := 0.47;
169 END values;
170
171 METHOD default_self;
172 G_dimless := 0.0638;
173 NTU := 57;
174 hv := 2030{watt/m^3/K};
175 T_out := 20 {K} + 273.15 {K};
176 END default_self;
177
178 METHOD on_load;
179 RUN specify;
180 RUN bound_self;
181 RUN values;
182 RUN default_self;
183
184 SOLVER QRSlv;
185 OPTION convopt 'RELNOM_SCALE';
186 END on_load;
187
188 END packed_bed_tank;

Properties

Name Value
svn:executable *

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