1 | package test.simpat.models.basic; |
---|
2 | |
---|
3 | |
---|
4 | import schedframe.resources.StandardResourceType; |
---|
5 | import schedframe.resources.computing.Node; |
---|
6 | import schedframe.resources.computing.ComputingResource; |
---|
7 | import schedframe.resources.computing.Processor; |
---|
8 | import schedframe.resources.computing.Rack; |
---|
9 | import schedframe.resources.computing.coolemall.ComputeBox1; |
---|
10 | import schedframe.resources.computing.coolemall.NodeGroup; |
---|
11 | import schedframe.resources.computing.profiles.energy.ResourceEvent; |
---|
12 | import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; |
---|
13 | import schedframe.resources.devices.Device; |
---|
14 | import schedframe.resources.devices.Fan; |
---|
15 | import schedframe.resources.devices.PhysicalResource; |
---|
16 | import schedframe.scheduling.manager.tasks.JobRegistry; |
---|
17 | import simulator.ConfigurationOptions; |
---|
18 | import example.energy.BaseEnergyEstimationPlugin; |
---|
19 | import example.energy.coolemall.CoolEmAllTestbedMeasurements; |
---|
20 | |
---|
21 | public class DataCenterEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{ |
---|
22 | |
---|
23 | public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry, |
---|
24 | PhysicalResource resource) { |
---|
25 | |
---|
26 | double Pdc; |
---|
27 | |
---|
28 | double Pload_dc = 0; |
---|
29 | double Pothers = 0; |
---|
30 | double Pfans_dc = 0; |
---|
31 | double Pcooling_device = 0; |
---|
32 | |
---|
33 | ComputingResource room = (ComputingResource) resource; |
---|
34 | |
---|
35 | /**************** IT PART ****************/ |
---|
36 | |
---|
37 | /*********** Pload_dc ***********/ |
---|
38 | Pload_dc = calculatePit(room); |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | /**************** NON- IT PART ****************/ |
---|
43 | |
---|
44 | /*********** Pothers ***********/ |
---|
45 | Pothers = calculatePothers(Pload_dc); |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | /************* COOLING PART *************/ |
---|
50 | |
---|
51 | |
---|
52 | /*********** Pfans_dc ***********/ |
---|
53 | Pfans_dc = calculatePfans(room); |
---|
54 | |
---|
55 | /************ Pcooling_device ************/ |
---|
56 | Device coolingDevice = null; |
---|
57 | for(Device device: room.getResourceCharacteristic().getDevices()){ |
---|
58 | if(device.getType().equals(StandardResourceType.CoolingDevice)){ |
---|
59 | coolingDevice = device; |
---|
60 | break; |
---|
61 | } |
---|
62 | } |
---|
63 | |
---|
64 | |
---|
65 | double Pchiller = calculatePchiller(Pload_dc, Pfans_dc, Pothers, room); |
---|
66 | double Pdry_cooler = calculatePdryCooler(Pload_dc, Pfans_dc, Pothers, room); |
---|
67 | |
---|
68 | double delta_Th_ex;//DEBB |
---|
69 | try{ |
---|
70 | delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue(); |
---|
71 | } catch (Exception e){ |
---|
72 | delta_Th_ex = 10; |
---|
73 | } |
---|
74 | |
---|
75 | double delta_Th_dry_cooler;//DEBB |
---|
76 | try{ |
---|
77 | delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue(); |
---|
78 | } catch (Exception e){ |
---|
79 | delta_Th_dry_cooler = 10; |
---|
80 | } |
---|
81 | |
---|
82 | double Tamb;//experiment |
---|
83 | try{ |
---|
84 | Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature(); |
---|
85 | } catch (Exception e){ |
---|
86 | Tamb = -1; |
---|
87 | } |
---|
88 | |
---|
89 | double Tr_out;//from database, CFD |
---|
90 | try{ |
---|
91 | Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature(); |
---|
92 | } catch (Exception e){ |
---|
93 | Tr_out = -1; |
---|
94 | } |
---|
95 | |
---|
96 | double Tr_in;//experiment |
---|
97 | try{ |
---|
98 | Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature(); |
---|
99 | } catch (Exception e){ |
---|
100 | Tr_in = -1; |
---|
101 | } |
---|
102 | |
---|
103 | double Tev = Tr_in - delta_Th_ex; |
---|
104 | |
---|
105 | |
---|
106 | //if data not present in DB than don't take Pchiller into account |
---|
107 | if(Tr_in != -1 && Tr_out != -1) { |
---|
108 | if(Tamb != -1 && Tev - Tamb > 0 && delta_Th_dry_cooler < Tev - Tamb) |
---|
109 | Pcooling_device = Pdry_cooler; |
---|
110 | else |
---|
111 | Pcooling_device = Pchiller; |
---|
112 | } |
---|
113 | |
---|
114 | |
---|
115 | Pdc = Pload_dc + Pothers + Pfans_dc + Pcooling_device; |
---|
116 | //System.out.println("---"); |
---|
117 | //System.out.println("Pdry_cooler: " + Pdry_cooler + " Pchiller: "+ Pchiller); |
---|
118 | //System.out.println("Pdc: " + Pdc + " Pload_dc: "+ Pload_dc + " Pothers: " + Pothers + " Pfans_dc: " + Pfans_dc + " Pcooling_device: " + Pcooling_device); |
---|
119 | |
---|
120 | //System.out.println("CB2 heat: " + Qload_dc + "; " + Qothers + "; " + Qfans_dc + "; " + Qdc); |
---|
121 | //System.out.println("CB2 power: " + Pload_dc + "; " + Pothers + "; " + Pfans_dc + "; " + Pcooling_device + "; " + Pdc); |
---|
122 | |
---|
123 | return Pdc; |
---|
124 | } |
---|
125 | |
---|
126 | private double calculatePit(ComputingResource room){ |
---|
127 | double Pload_dc = 0; |
---|
128 | for(ComputingResource cr: room.getChildren()){ |
---|
129 | Rack rack = (Rack)cr; |
---|
130 | Pload_dc = Pload_dc + rack.getPowerInterface().getRecentPowerUsage().getValue(); |
---|
131 | } |
---|
132 | return Pload_dc; |
---|
133 | } |
---|
134 | |
---|
135 | private double calculatePothers(double Pload_dc){ |
---|
136 | |
---|
137 | double Pothers = 0; |
---|
138 | |
---|
139 | double a;//experiment |
---|
140 | try{ |
---|
141 | a = ConfigurationOptions.coolingData.getAlpha(); |
---|
142 | } catch (Exception e){ |
---|
143 | a = 0.2; |
---|
144 | } |
---|
145 | |
---|
146 | Pothers = a * Pload_dc; |
---|
147 | return Pothers; |
---|
148 | } |
---|
149 | |
---|
150 | private double calculatePfans(ComputingResource room){ |
---|
151 | |
---|
152 | double Pfans_dc = 0; |
---|
153 | |
---|
154 | Device coolingDevice = null; |
---|
155 | for(Device device: room.getResourceCharacteristic().getDevices()){ |
---|
156 | if(device.getType().equals(StandardResourceType.CoolingDevice)){ |
---|
157 | coolingDevice = device; |
---|
158 | break; |
---|
159 | } |
---|
160 | } |
---|
161 | |
---|
162 | double nf;//DEBB |
---|
163 | try{ |
---|
164 | nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue(); |
---|
165 | } catch (Exception e){ |
---|
166 | nf = 0.6; |
---|
167 | } |
---|
168 | double delta_p;//from database, CFD |
---|
169 | double Vair_total; |
---|
170 | |
---|
171 | delta_p = ConfigurationOptions.coolingData.getPressureDrop(); |
---|
172 | Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); |
---|
173 | |
---|
174 | if(delta_p != -1 && Vair_total != -1) |
---|
175 | Pfans_dc = delta_p * Vair_total / nf; |
---|
176 | else { |
---|
177 | |
---|
178 | double ro = 1.168;//constant |
---|
179 | |
---|
180 | double mair_total; |
---|
181 | |
---|
182 | double mair_rack = 0; |
---|
183 | |
---|
184 | for(ComputingResource cr: room.getChildren()){ |
---|
185 | Rack rack = (Rack)cr; |
---|
186 | for(Node node: rack.getNodes()){ |
---|
187 | for(Device device: node.getResourceCharacteristic().getDevices()){ |
---|
188 | if(device.getType().equals(StandardResourceType.Outlet)){ |
---|
189 | |
---|
190 | Fan fan = (Fan) device; |
---|
191 | double mair_recs = 0; |
---|
192 | double Vair_recs = 0; |
---|
193 | |
---|
194 | double Vair_recs1 = 0; |
---|
195 | |
---|
196 | Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); |
---|
197 | |
---|
198 | double Vair_recs2 = 0; |
---|
199 | for(Device device2: node.getResourceCharacteristic().getDevices()){ |
---|
200 | if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ |
---|
201 | |
---|
202 | Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); |
---|
203 | |
---|
204 | break; |
---|
205 | } |
---|
206 | } |
---|
207 | |
---|
208 | Vair_recs = Math.max(Vair_recs1, Vair_recs2); |
---|
209 | |
---|
210 | mair_recs = Vair_recs * ro; |
---|
211 | mair_rack = mair_rack + mair_recs; |
---|
212 | } |
---|
213 | } |
---|
214 | } |
---|
215 | } |
---|
216 | mair_total = mair_rack; |
---|
217 | Vair_total = mair_total / ro; |
---|
218 | |
---|
219 | |
---|
220 | if(delta_p != -1 && Vair_total != -1) |
---|
221 | Pfans_dc = delta_p * Vair_total / nf; |
---|
222 | } |
---|
223 | return Pfans_dc; |
---|
224 | } |
---|
225 | |
---|
226 | private double calculatePchiller(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){ |
---|
227 | |
---|
228 | double Pchiller = 0; |
---|
229 | |
---|
230 | Device coolingDevice = null; |
---|
231 | for(Device device: room.getResourceCharacteristic().getDevices()){ |
---|
232 | if(device.getType().equals(StandardResourceType.CoolingDevice)){ |
---|
233 | coolingDevice = device; |
---|
234 | break; |
---|
235 | } |
---|
236 | } |
---|
237 | |
---|
238 | double delta_Th_dry_cooler;//DEBB |
---|
239 | try{ |
---|
240 | delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue(); |
---|
241 | } catch (Exception e){ |
---|
242 | delta_Th_dry_cooler = 10; |
---|
243 | } |
---|
244 | |
---|
245 | double Tamb;//experiment |
---|
246 | try{ |
---|
247 | Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature(); |
---|
248 | } catch (Exception e){ |
---|
249 | Tamb = -1; |
---|
250 | } |
---|
251 | |
---|
252 | double ncc;//DEBB |
---|
253 | try{ |
---|
254 | ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue(); |
---|
255 | } catch (Exception e){ |
---|
256 | ncc = 0.95; |
---|
257 | } |
---|
258 | |
---|
259 | double Qcooling_rated;//DEBB |
---|
260 | try{ |
---|
261 | Qcooling_rated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCapacityRated").get(0).getContent()).doubleValue(); |
---|
262 | } catch (Exception e){ |
---|
263 | Qcooling_rated = 80000; |
---|
264 | } |
---|
265 | |
---|
266 | double EERrated;//DEBB |
---|
267 | try{ |
---|
268 | EERrated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("EERRated").get(0).getContent()).doubleValue(); |
---|
269 | } catch (Exception e){ |
---|
270 | EERrated = 5; |
---|
271 | } |
---|
272 | |
---|
273 | double delta_Th_ex;//DEBB |
---|
274 | try{ |
---|
275 | delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue(); |
---|
276 | } catch (Exception e){ |
---|
277 | delta_Th_ex = 10; |
---|
278 | } |
---|
279 | |
---|
280 | double Tr_in;//experiment |
---|
281 | try{ |
---|
282 | Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature(); |
---|
283 | } catch (Exception e){ |
---|
284 | Tr_in = -1; |
---|
285 | } |
---|
286 | |
---|
287 | |
---|
288 | double Tev; |
---|
289 | double CoolT; |
---|
290 | double Qcooling_nom; |
---|
291 | double PLR; |
---|
292 | |
---|
293 | double delta_T; |
---|
294 | double CoolPR; |
---|
295 | double CoolPRrated; |
---|
296 | double CoolPRT; |
---|
297 | double CoolPRPLR; |
---|
298 | double EER; |
---|
299 | |
---|
300 | |
---|
301 | double Qdc = calculateQ(Pfans_dc, Pothers, room); |
---|
302 | double Qcooling = Qdc / ncc; |
---|
303 | |
---|
304 | Tev = Tr_in - delta_Th_ex; |
---|
305 | double Tevf = 32 + 1.8 * Tev; |
---|
306 | |
---|
307 | double Tco = Tamb + delta_Th_dry_cooler; |
---|
308 | |
---|
309 | double Tcof = 32 + 1.8 * Tco; |
---|
310 | CoolT = 0.647177 + 0.015888 * Tevf + 0.000103 * Math.pow(Tevf, 2) - 0.004167 * Tcof + 0.000007 * Math.pow(Tcof, 2) - 0.000064 * Tevf * Tcof; |
---|
311 | Qcooling_nom = Qcooling_rated * CoolT; |
---|
312 | PLR = Qcooling / Qcooling_nom; |
---|
313 | |
---|
314 | delta_T = Tcof - Tevf; |
---|
315 | CoolPRrated = 1 / EERrated; |
---|
316 | CoolPRT = 0.564064 - 0.011463 * Tevf + 0.000112 * Math.pow(Tevf, 2) + 0.008091 * Tcof + 0.000070 * Math.pow(Tcof, 2) - 0.000126 * Tevf * Tcof; |
---|
317 | CoolPRPLR = 0.023918 + 0.889469 * PLR + 0.077931 * Math.pow(PLR, 2) - 0.000264 * delta_T + 0.000007 * Math.pow(delta_T, 2) + 0.000180 * PLR * delta_T; |
---|
318 | CoolPR = CoolPRrated * CoolPRT * CoolPRPLR; |
---|
319 | EER = 1/CoolPR; |
---|
320 | |
---|
321 | Pchiller = Qcooling/EER; |
---|
322 | |
---|
323 | return Pchiller; |
---|
324 | } |
---|
325 | |
---|
326 | private double calculatePdryCooler(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){ |
---|
327 | |
---|
328 | double Pdry_cooler = 0; |
---|
329 | Device coolingDevice = null; |
---|
330 | for(Device device: room.getResourceCharacteristic().getDevices()){ |
---|
331 | if(device.getType().equals(StandardResourceType.CoolingDevice)){ |
---|
332 | coolingDevice = device; |
---|
333 | break; |
---|
334 | } |
---|
335 | } |
---|
336 | |
---|
337 | double n_dry_cooler;//DEBB |
---|
338 | try{ |
---|
339 | n_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("dryCoolerEfficiency").get(0).getContent()).doubleValue(); |
---|
340 | } catch (Exception e){ |
---|
341 | n_dry_cooler = 0.02; |
---|
342 | } |
---|
343 | |
---|
344 | double ncc;//DEBB |
---|
345 | try{ |
---|
346 | ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue(); |
---|
347 | } catch (Exception e){ |
---|
348 | ncc = 0.95; |
---|
349 | } |
---|
350 | |
---|
351 | |
---|
352 | double Qdc = calculateQ(Pfans_dc, Pothers, room); |
---|
353 | double Qcooling = Qdc / ncc; |
---|
354 | |
---|
355 | Pdry_cooler = n_dry_cooler * Qcooling; |
---|
356 | |
---|
357 | return Pdry_cooler; |
---|
358 | } |
---|
359 | |
---|
360 | private double calculateQ(double Pfans_dc, double Pothers, ComputingResource room){ |
---|
361 | |
---|
362 | double Qdc = 0; |
---|
363 | |
---|
364 | Device coolingDevice = null; |
---|
365 | for(Device device: room.getResourceCharacteristic().getDevices()){ |
---|
366 | if(device.getType().equals(StandardResourceType.CoolingDevice)){ |
---|
367 | coolingDevice = device; |
---|
368 | break; |
---|
369 | } |
---|
370 | } |
---|
371 | |
---|
372 | double nf;//DEBB |
---|
373 | try{ |
---|
374 | nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue(); |
---|
375 | } catch (Exception e){ |
---|
376 | nf = 0.6; |
---|
377 | } |
---|
378 | |
---|
379 | /**************** HEAT ****************/ |
---|
380 | |
---|
381 | double Qload_dc = 0; |
---|
382 | double Qothers = 0; |
---|
383 | double Qfans_dc = 0; |
---|
384 | |
---|
385 | double delta_2; //DEBB - currently not present; |
---|
386 | delta_2 = 0.4; |
---|
387 | |
---|
388 | for(ComputingResource cr: room.getChildren()){ |
---|
389 | Rack rack = (Rack)cr; |
---|
390 | double QnodeGroup = 0; |
---|
391 | for(Node node: rack.getNodes()){ |
---|
392 | double Qnodes = 0; |
---|
393 | |
---|
394 | double Qcpu = 0; |
---|
395 | for(Processor proc: node.getProcessors()){ |
---|
396 | Qcpu = Qcpu + proc.getPowerInterface().getRecentPowerUsage().getValue(); |
---|
397 | } |
---|
398 | Qnodes = Qnodes + Qcpu; |
---|
399 | |
---|
400 | double Qfans = 0; |
---|
401 | for(Device device: node.getResourceCharacteristic().getDevices()){ |
---|
402 | Fan fan = (Fan) device; |
---|
403 | if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){ |
---|
404 | try { |
---|
405 | Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState()); |
---|
406 | } catch (NoSuchFieldException e) { |
---|
407 | // TODO Auto-generated catch block |
---|
408 | e.printStackTrace(); |
---|
409 | } |
---|
410 | }else |
---|
411 | Qfans = Qfans + (1 - delta_2) * fan.getPowerInterface().getRecentPowerUsage().getValue(); |
---|
412 | } |
---|
413 | QnodeGroup = QnodeGroup + Qnodes + Qfans; |
---|
414 | } |
---|
415 | int nrOfPoweredOffNodes = 0; |
---|
416 | for(Node node: rack.getNodes()){ |
---|
417 | if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){ |
---|
418 | nrOfPoweredOffNodes++; |
---|
419 | } |
---|
420 | } |
---|
421 | if(nrOfPoweredOffNodes != rack.getNodes().size()){ |
---|
422 | Qload_dc = Qload_dc + QnodeGroup + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION; |
---|
423 | } else { |
---|
424 | Qload_dc = Qload_dc + QnodeGroup; |
---|
425 | } |
---|
426 | } |
---|
427 | |
---|
428 | Qothers = Pothers; |
---|
429 | |
---|
430 | Qfans_dc = (1 - nf) * Pfans_dc; |
---|
431 | |
---|
432 | Qdc = Qload_dc + Qothers + Qfans_dc; |
---|
433 | |
---|
434 | |
---|
435 | return Qdc; |
---|
436 | } |
---|
437 | |
---|
438 | |
---|
439 | private double calculateQ2(ComputingResource room){ |
---|
440 | |
---|
441 | double Qdc = 0; |
---|
442 | |
---|
443 | double mair_total; |
---|
444 | double Vair_total; |
---|
445 | double ro = 1.168;//constant |
---|
446 | |
---|
447 | Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); |
---|
448 | |
---|
449 | if(Vair_total != -1) { |
---|
450 | mair_total = Vair_total * ro; |
---|
451 | } |
---|
452 | else { |
---|
453 | |
---|
454 | //in case of DCworms calculation of Vair_total |
---|
455 | double mair_rack = 0; |
---|
456 | |
---|
457 | for(ComputingResource cr: room.getChildren()){ |
---|
458 | Rack rack = (Rack)cr; |
---|
459 | for(Node node: rack.getNodes()){ |
---|
460 | for(Device device: node.getResourceCharacteristic().getDevices()){ |
---|
461 | if(device.getType().equals(StandardResourceType.Outlet)){ |
---|
462 | |
---|
463 | Fan fan = (Fan) device; |
---|
464 | double mair_recs = 0; |
---|
465 | double Vair_recs = 0; |
---|
466 | |
---|
467 | double Vair_recs1 = 0; |
---|
468 | |
---|
469 | Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); |
---|
470 | |
---|
471 | double Vair_recs2 = 0; |
---|
472 | for(Device device2: node.getResourceCharacteristic().getDevices()){ |
---|
473 | if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ |
---|
474 | |
---|
475 | Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); |
---|
476 | |
---|
477 | break; |
---|
478 | } |
---|
479 | } |
---|
480 | |
---|
481 | Vair_recs = Math.max(Vair_recs1, Vair_recs2); |
---|
482 | |
---|
483 | mair_recs = Vair_recs * ro; |
---|
484 | mair_rack = mair_rack + mair_recs; |
---|
485 | } |
---|
486 | } |
---|
487 | } |
---|
488 | } |
---|
489 | mair_total = mair_rack; |
---|
490 | } |
---|
491 | |
---|
492 | double Cp = 1004;//constant |
---|
493 | |
---|
494 | |
---|
495 | double Tr_out;//from database, CFD |
---|
496 | try{ |
---|
497 | Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature(); |
---|
498 | } catch (Exception e){ |
---|
499 | Tr_out = -1; |
---|
500 | } |
---|
501 | |
---|
502 | double Tr_in;//experiment |
---|
503 | try{ |
---|
504 | Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature(); |
---|
505 | } catch (Exception e){ |
---|
506 | Tr_in = -1; |
---|
507 | } |
---|
508 | |
---|
509 | |
---|
510 | Qdc = mair_total * Cp * (Tr_out - Tr_in); |
---|
511 | |
---|
512 | return Qdc; |
---|
513 | } |
---|
514 | |
---|
515 | } |
---|