openstudio-standards 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards.xlsx +0 -0
  3. data/data/standards/OpenStudio_Standards_boilers.json +62 -4
  4. data/data/standards/OpenStudio_Standards_chillers.json +778 -68
  5. data/data/standards/OpenStudio_Standards_construction_sets.json +52 -93
  6. data/data/standards/OpenStudio_Standards_curve_biquadratics.json +36 -36
  7. data/data/standards/OpenStudio_Standards_curve_quadratics.json +3 -3
  8. data/data/standards/OpenStudio_Standards_heat_pumps.json +840 -0
  9. data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +352 -0
  10. data/data/standards/OpenStudio_Standards_heat_rejection.json +48 -0
  11. data/data/standards/OpenStudio_Standards_motors.json +270 -0
  12. data/data/standards/OpenStudio_Standards_space_types.json +10390 -2824
  13. data/data/standards/OpenStudio_Standards_unitary_acs.json +794 -18
  14. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.ddy +538 -0
  15. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw +8768 -0
  16. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.stat +493 -0
  17. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
  18. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
  19. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
  20. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.ddy +536 -0
  21. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.epw +8768 -0
  22. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.stat +554 -0
  23. data/data/weather/envelope_info.csv +6 -0
  24. data/lib/openstudio-standards.rb +10 -11
  25. data/lib/openstudio-standards/btap/compliance.rb +251 -969
  26. data/lib/openstudio-standards/btap/envelope.rb +1 -1
  27. data/lib/openstudio-standards/btap/fileio.rb +37 -5
  28. data/lib/openstudio-standards/btap/geometry.rb +27 -17
  29. data/lib/openstudio-standards/btap/hvac.rb +80 -27
  30. data/lib/openstudio-standards/hvac_sizing/{HVACSizing.CoilHeatingDXMultiSpeed.rb → Siz.CoilHeatingDXMultiSpeed.rb} +0 -0
  31. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +30 -4
  32. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +61 -5
  33. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +37 -7
  34. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +27 -0
  35. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +27 -0
  36. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +55 -0
  37. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +55 -0
  38. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +51 -9
  39. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +99 -17
  40. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +1 -1
  41. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +29 -6
  42. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +16 -0
  43. data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +43 -48
  44. data/lib/openstudio-standards/prototypes/Prototype.ControllerWaterCoil.rb +5 -9
  45. data/lib/openstudio-standards/prototypes/Prototype.Fan.rb +68 -0
  46. data/lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb +39 -43
  47. data/lib/openstudio-standards/prototypes/Prototype.FanOnOff.rb +49 -51
  48. data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +55 -61
  49. data/lib/openstudio-standards/prototypes/Prototype.FanZoneExhaust.rb +8 -10
  50. data/lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +15 -20
  51. data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +330 -322
  52. data/lib/openstudio-standards/prototypes/Prototype.Model.rb +501 -446
  53. data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +221 -230
  54. data/lib/openstudio-standards/prototypes/Prototype.add_objects.rb +0 -2
  55. data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +130 -137
  56. data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +374 -291
  57. data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +146 -193
  58. data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +1315 -1113
  59. data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +65 -88
  60. data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +101 -156
  61. data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +46 -96
  62. data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +113 -123
  63. data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +356 -345
  64. data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +48 -103
  65. data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +115 -123
  66. data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +30 -39
  67. data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +32 -45
  68. data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +98 -258
  69. data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +429 -474
  70. data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +28 -36
  71. data/lib/openstudio-standards/prototypes/Prototype.strip_model.rb +7 -7
  72. data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +172 -146
  73. data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +46 -53
  74. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +885 -707
  75. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +48 -57
  76. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +24 -31
  77. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +80 -93
  78. data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +69 -0
  79. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +60 -72
  80. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +104 -108
  81. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +190 -198
  82. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +134 -146
  83. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +56 -60
  84. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +151 -161
  85. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +30 -34
  86. data/lib/openstudio-standards/standards/Standards.Construction.rb +116 -132
  87. data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +138 -0
  88. data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +11 -0
  89. data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +11 -0
  90. data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +16 -0
  91. data/lib/openstudio-standards/standards/Standards.Fan.rb +190 -236
  92. data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -2
  93. data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -2
  94. data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +168 -14
  95. data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -2
  96. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +33 -0
  97. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +83 -0
  98. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +22 -0
  99. data/lib/openstudio-standards/standards/Standards.Model.rb +2385 -1622
  100. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +83 -35
  101. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +805 -395
  102. data/lib/openstudio-standards/standards/Standards.Pump.rb +139 -119
  103. data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -2
  104. data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +16 -15
  105. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +35 -0
  106. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +7 -13
  107. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +144 -59
  108. data/lib/openstudio-standards/standards/Standards.Space.rb +1509 -1326
  109. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +254 -262
  110. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +105 -105
  111. data/lib/openstudio-standards/standards/Standards.Surface.rb +27 -31
  112. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +882 -157
  113. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +179 -69
  114. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +75 -0
  115. data/lib/openstudio-standards/utilities/logging.rb +31 -38
  116. data/lib/openstudio-standards/utilities/simulation.rb +118 -82
  117. data/lib/openstudio-standards/version.rb +1 -1
  118. data/lib/openstudio-standards/weather/Weather.Model.rb +382 -390
  119. data/lib/openstudio-standards/weather/Weather.stat_file.rb +159 -78
  120. metadata +59 -6
@@ -1,39 +1,39 @@
1
1
 
2
2
  # open the class to add methods to return sizing values
3
3
  class OpenStudio::Model::FanVariableVolume
4
+ include PrototypeFan
4
5
 
5
6
  # Sets the fan pressure rise based on the Prototype buildings inputs
6
7
  # which are governed by the flow rate coming through the fan
7
8
  # and whether the fan lives inside a unit heater, PTAC, etc.
8
- def setPrototypeFanPressureRise(building_type, building_vintage, climate_zone)
9
-
9
+ def apply_prototype_fan_pressure_rise(building_type, template, climate_zone)
10
10
  # NECB
11
- if building_vintage == 'NECB 2011' then
11
+ if template == 'NECB 2011'
12
12
  pressure_rise_pa = 1000.0
13
- self.setPressureRise(pressure_rise_pa)
13
+ setPressureRise(pressure_rise_pa)
14
14
  return true
15
- end
16
-
15
+ end
16
+
17
17
  # Get the max flow rate from the fan.
18
18
  maximum_flow_rate_m3_per_s = nil
19
- if self.maximumFlowRate.is_initialized
20
- maximum_flow_rate_m3_per_s = self.maximumFlowRate.get
21
- elsif self.autosizedMaximumFlowRate.is_initialized
22
- maximum_flow_rate_m3_per_s = self.autosizedMaximumFlowRate.get
19
+ if maximumFlowRate.is_initialized
20
+ maximum_flow_rate_m3_per_s = maximumFlowRate.get
21
+ elsif autosizedMaximumFlowRate.is_initialized
22
+ maximum_flow_rate_m3_per_s = autosizedMaximumFlowRate.get
23
23
  else
24
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.prototype.FanVariableVolume", "For #{self.name} max flow rate is not available, cannot apply prototype assumptions.")
24
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.prototype.FanVariableVolume', "For #{name} max flow rate is not available, cannot apply prototype assumptions.")
25
25
  return false
26
26
  end
27
-
27
+
28
28
  # Convert max flow rate to cfm
29
29
  maximum_flow_rate_cfm = OpenStudio.convert(maximum_flow_rate_m3_per_s, 'm^3/s', 'cfm').get
30
-
31
- # Pressure rise will be determined based on the
30
+
31
+ # Pressure rise will be determined based on the
32
32
  # following logic.
33
- pressure_rise_in_h2o = 0.0
34
-
33
+ pressure_rise_in_h2o = 0.0
34
+
35
35
  # If the fan lives inside of a zone hvac equipment
36
- if self.containingZoneHVACComponent.is_initialized
36
+ if containingZoneHVACComponent.is_initialized
37
37
  zone_hvac = self.ZoneHVACComponent.get
38
38
  if zone_hvac.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
39
39
  pressure_rise_in_h2o = 1.33
@@ -44,56 +44,50 @@ class OpenStudio::Model::FanVariableVolume
44
44
  else # This type of fan should not exist in the prototype models
45
45
  return false
46
46
  end
47
- end
48
-
49
- # TODO Inconsistency - Primary School uses CAV pressure rises
50
- # even thought it has a VAV system. CAV system is listed in document,
51
- # so assume the system type was updated but forgot to update pressure rises.
52
- if building_type == 'PrimarySchool' && (building_vintage == 'DOE Ref Pre-1980' || building_vintage == 'DOE Ref 1980-2004')
53
-
54
- # If the fan lives on an airloop (From Prototype.FanConstantVolume)
55
- if self.airLoopHVAC.is_initialized
56
- if maximum_flow_rate_cfm < 7487
57
- pressure_rise_in_h2o = 2.5
58
- elsif maximum_flow_rate_cfm >= 7487 && maximum_flow_rate_cfm < 20000
59
- pressure_rise_in_h2o = 4.46
60
- else # Over 20,000 cfm
61
- pressure_rise_in_h2o = 4.09
62
- end
63
- end
64
-
65
- else
66
-
67
- # If the fan lives on an airloop
68
- if self.airLoopHVAC.is_initialized
69
- case building_vintage
47
+ # If the fan lives on an airloop
48
+ elsif airLoopHVAC.is_initialized
49
+
50
+ # TODO: Inconsistency - Primary School uses CAV pressure rises
51
+ # even thought it has a VAV system. CAV system is listed in document,
52
+ # so assume the system type was updated but forgot to update pressure rises.
53
+ if building_type == 'PrimarySchool' && (template == 'DOE Ref Pre-1980' || template == 'DOE Ref 1980-2004')
54
+
55
+ pressure_rise_in_h2o = if maximum_flow_rate_cfm < 7487
56
+ 2.5
57
+ elsif maximum_flow_rate_cfm >= 7487 && maximum_flow_rate_cfm < 20_000
58
+ 4.46
59
+ else # Over 20,000 cfm
60
+ 4.09
61
+ end
62
+
63
+ else
64
+
65
+ case template
70
66
  when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004'
71
- if maximum_flow_rate_cfm < 4648
72
- pressure_rise_in_h2o = 4.0
73
- elsif maximum_flow_rate_cfm >= 4648 && maximum_flow_rate_cfm < 20000
74
- pressure_rise_in_h2o = 6.32
75
- else # Over 20,000 cfm
76
- pressure_rise_in_h2o = 5.58
77
- end
67
+ pressure_rise_in_h2o = if maximum_flow_rate_cfm < 4648
68
+ 4.0
69
+ elsif maximum_flow_rate_cfm >= 4648 && maximum_flow_rate_cfm < 20_000
70
+ 6.32
71
+ else # Over 20,000 cfm
72
+ 5.58
73
+ end
78
74
  when '90.1-2007', '90.1-2010', '90.1-2013'
79
- if maximum_flow_rate_cfm < 4648
80
- pressure_rise_in_h2o = 4.0
81
- else # Over 7,437 cfm
82
- pressure_rise_in_h2o = 5.58
83
- end
75
+ pressure_rise_in_h2o = if maximum_flow_rate_cfm < 4648
76
+ 4.0
77
+ else # Over 7,437 cfm
78
+ 5.58
79
+ end
84
80
  end
81
+
85
82
  end
86
-
87
83
  end
88
-
84
+
89
85
  # Set the fan pressure rise
90
- pressure_rise_pa = OpenStudio.convert(pressure_rise_in_h2o, 'inH_{2}O','Pa').get
91
- self.setPressureRise(pressure_rise_pa)
92
-
93
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.FanVariableVolume', "For Prototype: #{self.name}: #{maximum_flow_rate_cfm.round}cfm; Pressure Rise = #{pressure_rise_in_h2o}in w.c.")
94
-
86
+ pressure_rise_pa = OpenStudio.convert(pressure_rise_in_h2o, 'inH_{2}O', 'Pa').get
87
+ setPressureRise(pressure_rise_pa)
88
+
89
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.FanVariableVolume', "For Prototype: #{name}: #{maximum_flow_rate_cfm.round}cfm; Pressure Rise = #{pressure_rise_in_h2o}in w.c.")
90
+
95
91
  return true
96
-
97
92
  end
98
-
99
93
  end
@@ -1,22 +1,20 @@
1
1
 
2
2
  # Reopen the OpenStudio class to add methods to apply standards to this object
3
3
  class OpenStudio::Model::FanZoneExhaust
4
+ include PrototypeFan
4
5
 
5
6
  # Sets the fan pressure rise based on the Prototype buildings inputs
6
- def setPrototypeFanPressureRise
7
-
7
+ def apply_prototype_fan_pressure_rise
8
8
  # All exhaust fans are assumed to have a pressure rise of
9
9
  # 0.5 in w.c. in the prototype building models.
10
10
  pressure_rise_in_h2o = 0.5
11
-
11
+
12
12
  # Set the pressure rise
13
- pressure_rise_pa = OpenStudio.convert(pressure_rise_in_h2o, 'inH_{2}O','Pa').get
14
- self.setPressureRise(pressure_rise_pa)
15
-
16
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.FanZoneExhaust', "For Prototype: #{self.name}: Pressure Rise = #{pressure_rise_in_h2o}in w.c.")
17
-
13
+ pressure_rise_pa = OpenStudio.convert(pressure_rise_in_h2o, 'inH_{2}O', 'Pa').get
14
+ setPressureRise(pressure_rise_pa)
15
+
16
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.FanZoneExhaust', "For Prototype: #{name}: Pressure Rise = #{pressure_rise_in_h2o}in w.c.")
17
+
18
18
  return true
19
-
20
19
  end
21
-
22
20
  end
@@ -1,15 +1,13 @@
1
1
 
2
2
  # Reopen the OpenStudio class to add methods to apply standards to this object
3
3
  class OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent
4
-
5
- def setPrototypeNominalElectricPower
6
-
4
+ def apply_prototype_nominal_electric_power
7
5
  # Get the nominal supply air flow rate
8
6
  supply_air_flow_m3_per_s = nil
9
- if self.nominalSupplyAirFlowRate.is_initialized
10
- supply_air_flow_m3_per_s = self.nominalSupplyAirFlowRate.get
11
- elsif self.autosizedNominalSupplyAirFlowRate.is_initialized
12
- supply_air_flow_m3_per_s = self.autosizedNominalSupplyAirFlowRate.get
7
+ if nominalSupplyAirFlowRate.is_initialized
8
+ supply_air_flow_m3_per_s = nominalSupplyAirFlowRate.get
9
+ elsif autosizedNominalSupplyAirFlowRate.is_initialized
10
+ supply_air_flow_m3_per_s = autosizedNominalSupplyAirFlowRate.get
13
11
  else
14
12
  # Get the min OA flow rate from the OA
15
13
  # system if the ERV was not on the system during sizing.
@@ -17,9 +15,9 @@ class OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent
17
15
  controller_oa = nil
18
16
  oa_system = nil
19
17
  # Get the air loop
20
- air_loop = self.airLoopHVAC
18
+ air_loop = airLoopHVAC
21
19
  if air_loop.empty?
22
- OpenStudio::logFree(OpenStudio::Info, "openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent", "For #{self.name}, cannot get the air loop and therefore cannot get the min OA flow.")
20
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent', "For #{name}, cannot get the air loop and therefore cannot get the min OA flow.")
23
21
  return false
24
22
  end
25
23
  air_loop = air_loop.get
@@ -28,38 +26,35 @@ class OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent
28
26
  oa_system = air_loop.airLoopHVACOutdoorAirSystem.get
29
27
  controller_oa = oa_system.getControllerOutdoorAir
30
28
  else
31
- OpenStudio::logFree(OpenStudio::Info, "openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent", "For #{self.name}, cannot find the min OA flow because it has no OA intake.")
29
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent', "For #{name}, cannot find the min OA flow because it has no OA intake.")
32
30
  return false
33
31
  end
34
- # Get the min OA flow rate from the OA
32
+ # Get the min OA flow rate from the OA
35
33
  if controller_oa.minimumOutdoorAirFlowRate.is_initialized
36
34
  supply_air_flow_m3_per_s = controller_oa.minimumOutdoorAirFlowRate.get
37
35
  elsif controller_oa.autosizedMinimumOutdoorAirFlowRate.is_initialized
38
36
  supply_air_flow_m3_per_s = controller_oa.autosizedMinimumOutdoorAirFlowRate.get
39
37
  else
40
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent", "For #{self.name}, ERV minimum OA flow rate is not available, cannot apply prototype nominal power assumption.")
38
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent', "For #{name}, ERV minimum OA flow rate is not available, cannot apply prototype nominal power assumption.")
41
39
  return false
42
40
  end
43
41
  end
44
42
 
45
43
  # Convert the flow rate to cfm
46
- supply_air_flow_cfm = OpenStudio.convert(supply_air_flow_m3_per_s, "m^3/s", "cfm").get
47
-
44
+ supply_air_flow_cfm = OpenStudio.convert(supply_air_flow_m3_per_s, 'm^3/s', 'cfm').get
45
+
48
46
  # Calculate the motor power for the rotatry wheel per:
49
47
  # Power (W) = (Nominal Supply Air Flow Rate (CFM) * 0.3386) + 49.5
50
48
  # power = (supply_air_flow_cfm * 0.3386) + 49.5
51
-
49
+
52
50
  # Calculate the motor power for the rotatry wheel per:
53
51
  # Power (W) = (Minimum Outdoor Air Flow Rate (m^3/s) * 212.5 / 0.5) + (Minimum Outdoor Air Flow Rate (m^3/s) * 162.5 / 0.5) + 50
54
52
  power = (supply_air_flow_m3_per_s * 212.5 / 0.5) + (supply_air_flow_m3_per_s * 0.9 * 162.5 / 0.5) + 50
55
- OpenStudio::logFree(OpenStudio::Info, "openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent", "For #{self.name}, ERV power is calculated to be #{power.round} W, based on a min OA flow of #{supply_air_flow_cfm.round} cfm.")
53
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent', "For #{name}, ERV power is calculated to be #{power.round} W, based on a min OA flow of #{supply_air_flow_cfm.round} cfm.")
56
54
 
57
55
  # Set the power for the HX
58
- self.setNominalElectricPower(power)
56
+ setNominalElectricPower(power)
59
57
 
60
58
  return true
61
-
62
59
  end
63
-
64
60
  end
65
-
@@ -1,370 +1,380 @@
1
1
 
2
2
  # open the class to add methods to size all HVAC equipment
3
3
  class OpenStudio::Model::Model
4
-
5
- def add_hvac(building_type, building_vintage, climate_zone, prototype_input)
6
-
7
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started Adding HVAC')
8
-
9
- # Get the list of HVAC systems, as defined
10
- # for each building in the Prototype.building_name files.
11
- system_to_space_map = define_hvac_system_map(building_type, building_vintage, climate_zone)
12
-
13
- # Add each HVAC system
14
- system_to_space_map.each do |system|
15
-
16
- thermal_zones = get_zones_from_spaces_on_system(system)
17
-
18
- return_plenum = get_return_plenum_from_system(system)
19
-
20
- # Add the HVAC systems
21
- case system['type']
22
- when 'VAV'
23
-
24
- # Retrieve the existing hot water loop
25
- # or add a new one if necessary.
26
- hot_water_loop = nil
27
- if self.getPlantLoopByName('Hot Water Loop').is_initialized
28
- hot_water_loop = self.getPlantLoopByName('Hot Water Loop').get
29
- else
30
- hot_water_loop = self.add_hw_loop('NaturalGas', building_type)
31
- end
32
-
33
- # Retrieve the existing chilled water loop
34
- # or add a new one if necessary.
35
- chilled_water_loop = nil
36
- if self.getPlantLoopByName('Chilled Water Loop').is_initialized
37
- chilled_water_loop = self.getPlantLoopByName('Chilled Water Loop').get
38
- else
39
- condenser_water_loop = nil
40
- number_cooling_towers = 1
41
- num_chillers = 1
42
- if building_type == "Hospital" or building_type == "LargeOffice"
43
- case building_vintage
4
+ def add_hvac(building_type, template, climate_zone, prototype_input, epw_file)
5
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started Adding HVAC')
6
+ case template
7
+ when 'NECB 2011'
8
+ boiler_fueltype, baseboard_type, mau_type, mau_heating_coil_type, mua_cooling_type, chiller_type, heating_coil_types_sys3, heating_coil_types_sys4, heating_coil_types_sys6, fan_type = BTAP::Environment.get_canadian_system_defaults_by_weatherfile_name(epw_file)
9
+ BTAP::Compliance::NECB2011.necb_autozone_and_autosystem(self, runner = nil, use_ideal_air_loads = false, boiler_fueltype, mau_type, mau_heating_coil_type, baseboard_type, chiller_type, mua_cooling_type, heating_coil_types_sys3, heating_coil_types_sys4, heating_coil_types_sys6, fan_type)
10
+ else
11
+ # Get the list of HVAC systems, as defined
12
+ # for each building in the Prototype.building_name files.
13
+ system_to_space_map = define_hvac_system_map(building_type, template, climate_zone)
14
+
15
+ # Add each HVAC system
16
+ system_to_space_map.each do |system|
17
+ thermal_zones = get_zones_from_spaces_on_system(system)
18
+
19
+ return_plenum = get_return_plenum_from_system(system)
20
+
21
+ # Add the HVAC systems
22
+ case system['type']
23
+ when 'VAV'
24
+
25
+ # Retrieve the existing hot water loop
26
+ # or add a new one if necessary.
27
+ hot_water_loop = nil
28
+ hot_water_loop = if getPlantLoopByName('Hot Water Loop').is_initialized
29
+ getPlantLoopByName('Hot Water Loop').get
30
+ else
31
+ add_hw_loop('NaturalGas', building_type)
32
+ end
33
+
34
+ # Retrieve the existing chilled water loop
35
+ # or add a new one if necessary.
36
+ chilled_water_loop = nil
37
+ if getPlantLoopByName('Chilled Water Loop').is_initialized
38
+ chilled_water_loop = getPlantLoopByName('Chilled Water Loop').get
39
+ else
40
+ condenser_water_loop = nil
41
+ number_cooling_towers = 1
42
+ num_chillers = 1
43
+ if building_type == 'Hospital' || building_type == 'LargeOffice'
44
+ case template
44
45
  when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
45
46
  number_cooling_towers = 2
46
47
  num_chillers = 2
48
+ end
49
+ end
50
+ if prototype_input['chiller_cooling_type'] == 'WaterCooled'
51
+ condenser_water_loop = add_cw_loop(template,
52
+ 'Open Cooling Tower',
53
+ 'Centrifugal',
54
+ 'Fan Cycling',
55
+ 2,
56
+ 1,
57
+ building_type)
47
58
  end
48
- end
49
- if prototype_input['chiller_cooling_type'] == 'WaterCooled'
50
- condenser_water_loop = self.add_cw_loop(building_type, building_vintage, number_cooling_towers)
51
- end
52
- chilled_water_loop = self.add_chw_loop(
53
- building_vintage,
54
- prototype_input['chw_pumping_type'],
55
- prototype_input['chiller_cooling_type'],
56
- prototype_input['chiller_condenser_type'],
57
- prototype_input['chiller_compressor_type'],
58
- prototype_input['chiller_capacity_guess'],
59
- condenser_water_loop,
60
- building_type,
61
- num_chillers
62
- )
63
- end
64
59
 
65
- # Add the VAV
66
- self.add_vav_reheat(building_vintage,
67
- system['name'],
68
- hot_water_loop,
69
- chilled_water_loop,
70
- thermal_zones,
71
- prototype_input['vav_operation_schedule'],
72
- prototype_input['vav_oa_damper_schedule'],
73
- prototype_input['vav_fan_efficiency'],
74
- prototype_input['vav_fan_motor_efficiency'],
75
- prototype_input['vav_fan_pressure_rise'],
76
- return_plenum,
77
- building_type
78
- )
79
-
80
-
81
- when 'CAV'
82
-
83
- # Retrieve the existing hot water loop
84
- # or add a new one if necessary.
85
- hot_water_loop = nil
86
- if self.getPlantLoopByName('Hot Water Loop').is_initialized
87
- hot_water_loop = self.getPlantLoopByName('Hot Water Loop').get
88
- else
89
- hot_water_loop = self.add_hw_loop('NaturalGas',building_type)
90
- end
60
+ chilled_water_loop = add_chw_loop(template,
61
+ prototype_input['chw_pumping_type'],
62
+ prototype_input['chiller_cooling_type'],
63
+ prototype_input['chiller_condenser_type'],
64
+ prototype_input['chiller_compressor_type'],
65
+ 'Electricity',
66
+ condenser_water_loop)
91
67
 
92
- chilled_water_loop = nil
93
- if self.getPlantLoopByName('Chilled Water Loop').is_initialized
94
- chilled_water_loop = self.getPlantLoopByName('Chilled Water Loop').get
95
- elsif building_type == 'Hospital'
96
- condenser_water_loop = nil
97
- if prototype_input['chiller_cooling_type'] == 'WaterCooled'
98
- condenser_water_loop = self.add_cw_loop()
99
68
  end
100
69
 
101
- chilled_water_loop = self.add_chw_loop(building_vintage,
102
- prototype_input['chw_pumping_type'],
103
- prototype_input['chiller_cooling_type'],
104
- prototype_input['chiller_condenser_type'],
105
- prototype_input['chiller_compressor_type'],
106
- prototype_input['chiller_capacity_guess'],
107
- condenser_water_loop)
108
- end
109
-
110
- # Add the CAV
111
- self.add_cav(building_vintage,
112
- system['name'],
113
- hot_water_loop,
114
- thermal_zones,
115
- prototype_input['vav_operation_schedule'],
116
- prototype_input['vav_oa_damper_schedule'],
117
- prototype_input['vav_fan_efficiency'],
118
- prototype_input['vav_fan_motor_efficiency'],
119
- prototype_input['vav_fan_pressure_rise'],
120
- chilled_water_loop,
121
- building_type)
122
-
123
- when 'PSZ-AC'
124
-
125
- # Special logic to differentiate between operation schedules
126
- # that vary even inside of a system type for stripmall.
127
- hvac_op_sch = nil
128
- oa_sch = nil
129
- if system['hvac_op_sch_index'].nil? || system['hvac_op_sch_index'] == 1
130
- hvac_op_sch = prototype_input['pszac_operation_schedule']
131
- oa_sch = prototype_input['pszac_oa_damper_schedule']
132
- elsif system['hvac_op_sch_index'] == 2
133
- hvac_op_sch = prototype_input['pszac_operation_schedule_2']
134
- oa_sch = prototype_input['pszac_oa_damper_schedule_2']
135
- elsif system['hvac_op_sch_index'] == 3
136
- hvac_op_sch = prototype_input['pszac_operation_schedule_3']
137
- oa_sch = prototype_input['pszac_oa_damper_schedule_3']
138
- end
139
-
140
- # Special logic to make unitary heat pumps all blow-through
141
- fan_position = 'DrawThrough'
142
- if prototype_input['pszac_heating_type'] == 'Single Speed Heat Pump' ||
143
- prototype_input['pszac_heating_type'] == 'Water To Air Heat Pump'
144
- fan_position = 'BlowThrough'
145
- end
70
+ # Add the VAV
71
+ add_vav_reheat(template,
72
+ system['name'],
73
+ hot_water_loop,
74
+ chilled_water_loop,
75
+ thermal_zones,
76
+ prototype_input['vav_operation_schedule'],
77
+ prototype_input['vav_oa_damper_schedule'],
78
+ prototype_input['vav_fan_efficiency'],
79
+ prototype_input['vav_fan_motor_efficiency'],
80
+ prototype_input['vav_fan_pressure_rise'],
81
+ return_plenum,
82
+ electric_reheat = false,
83
+ building_type)
84
+
85
+ when 'CAV'
86
+
87
+ # Retrieve the existing hot water loop
88
+ # or add a new one if necessary.
89
+ hot_water_loop = nil
90
+ hot_water_loop = if getPlantLoopByName('Hot Water Loop').is_initialized
91
+ getPlantLoopByName('Hot Water Loop').get
92
+ else
93
+ add_hw_loop('NaturalGas', building_type)
94
+ end
95
+
96
+ chilled_water_loop = nil
97
+ if getPlantLoopByName('Chilled Water Loop').is_initialized
98
+ chilled_water_loop = getPlantLoopByName('Chilled Water Loop').get
99
+ elsif building_type == 'Hospital'
100
+ condenser_water_loop = nil
101
+ if prototype_input['chiller_cooling_type'] == 'WaterCooled'
102
+ condenser_water_loop = add_cw_loop
103
+ end
146
104
 
147
- # Special logic to make a heat pump loop if necessary
148
- heat_pump_loop = nil
149
- if prototype_input['pszac_heating_type'] == 'Water To Air Heat Pump'
150
- heat_pump_loop = add_hp_loop(building_type)
151
- end
105
+ chilled_water_loop = add_chw_loop(template,
106
+ prototype_input['chw_pumping_type'],
107
+ prototype_input['chiller_cooling_type'],
108
+ prototype_input['chiller_condenser_type'],
109
+ prototype_input['chiller_compressor_type'],
110
+ prototype_input['chiller_capacity_guess'],
111
+ condenser_water_loop)
112
+ end
152
113
 
153
- self.add_psz_ac(building_vintage,
154
- system['name'],
155
- heat_pump_loop, # Typically nil unless water source hp
156
- heat_pump_loop, # Typically nil unless water source hp
157
- thermal_zones,
158
- hvac_op_sch,
159
- oa_sch,
160
- fan_position,
161
- prototype_input['pszac_fan_type'],
162
- prototype_input['pszac_heating_type'],
163
- prototype_input['pszac_supplemental_heating_type'],
164
- prototype_input['pszac_cooling_type'],
165
- building_type)
166
-
167
- when 'PVAV'
168
-
169
- # Retrieve the existing hot water loop
170
- # or add a new one if necessary.
171
- hot_water_loop = nil
172
- if self.getPlantLoopByName('Hot Water Loop').is_initialized
173
- hot_water_loop = self.getPlantLoopByName('Hot Water Loop').get
174
- elsif building_type == 'MediumOffice'
175
- hot_water_loop = nil
176
- else
177
- hot_water_loop = self.add_hw_loop('NaturalGas',building_type)
178
- end
114
+ # Add the CAV
115
+ add_cav(template,
116
+ system['name'],
117
+ hot_water_loop,
118
+ thermal_zones,
119
+ prototype_input['vav_operation_schedule'],
120
+ prototype_input['vav_oa_damper_schedule'],
121
+ prototype_input['vav_fan_efficiency'],
122
+ prototype_input['vav_fan_motor_efficiency'],
123
+ prototype_input['vav_fan_pressure_rise'],
124
+ chilled_water_loop,
125
+ building_type)
126
+
127
+ when 'PSZ-AC'
128
+
129
+ # Special logic to differentiate between operation schedules
130
+ # that vary even inside of a system type for stripmall.
131
+ hvac_op_sch = nil
132
+ oa_sch = nil
133
+ if system['hvac_op_sch_index'].nil? || system['hvac_op_sch_index'] == 1
134
+ hvac_op_sch = prototype_input['pszac_operation_schedule']
135
+ oa_sch = prototype_input['pszac_oa_damper_schedule']
136
+ elsif system['hvac_op_sch_index'] == 2
137
+ hvac_op_sch = prototype_input['pszac_operation_schedule_2']
138
+ oa_sch = prototype_input['pszac_oa_damper_schedule_2']
139
+ elsif system['hvac_op_sch_index'] == 3
140
+ hvac_op_sch = prototype_input['pszac_operation_schedule_3']
141
+ oa_sch = prototype_input['pszac_oa_damper_schedule_3']
142
+ end
179
143
 
180
- self.add_pvav(building_vintage,
181
- system['name'],
182
- thermal_zones,
183
- prototype_input['vav_operation_schedule'],
184
- prototype_input['vav_oa_damper_schedule'],
185
- hot_water_loop,
186
- return_plenum,
187
- building_type)
188
-
189
- when 'DOAS'
190
-
191
- # Retrieve the existing hot water loop
192
- # or add a new one if necessary.
193
- hot_water_loop = nil
194
- if self.getPlantLoopByName('Hot Water Loop').is_initialized
195
- hot_water_loop = self.getPlantLoopByName('Hot Water Loop').get
196
- else
197
- hot_water_loop = self.add_hw_loop('NaturalGas',building_type)
198
- end
144
+ # Special logic to make unitary heat pumps all blow-through
145
+ fan_position = 'DrawThrough'
146
+ if prototype_input['pszac_heating_type'] == 'Single Speed Heat Pump' ||
147
+ prototype_input['pszac_heating_type'] == 'Water To Air Heat Pump'
148
+ fan_position = 'BlowThrough'
149
+ end
199
150
 
200
- # Retrieve the existing chilled water loop
201
- # or add a new one if necessary.
202
- chilled_water_loop = nil
203
- if self.getPlantLoopByName('Chilled Water Loop').is_initialized
204
- chilled_water_loop = self.getPlantLoopByName('Chilled Water Loop').get
205
- else
206
- condenser_water_loop = nil
207
- if prototype_input['chiller_cooling_type'] == 'WaterCooled'
208
- condenser_water_loop = self.add_cw_loop()
151
+ # Special logic to make a heat pump loop if necessary
152
+ heat_pump_loop = nil
153
+ if prototype_input['pszac_heating_type'] == 'Water To Air Heat Pump'
154
+ heat_pump_loop = add_hp_loop(building_type)
209
155
  end
210
156
 
211
- chilled_water_loop = self.add_chw_loop(building_vintage,
212
- prototype_input['chw_pumping_type'],
213
- prototype_input['chiller_cooling_type'],
214
- prototype_input['chiller_condenser_type'],
215
- prototype_input['chiller_compressor_type'],
216
- prototype_input['chiller_capacity_guess'],
217
- condenser_water_loop)
218
- end
157
+ add_psz_ac(template,
158
+ system['name'],
159
+ heat_pump_loop, # Typically nil unless water source hp
160
+ heat_pump_loop, # Typically nil unless water source hp
161
+ thermal_zones,
162
+ hvac_op_sch,
163
+ oa_sch,
164
+ fan_position,
165
+ prototype_input['pszac_fan_type'],
166
+ prototype_input['pszac_heating_type'],
167
+ prototype_input['pszac_supplemental_heating_type'],
168
+ prototype_input['pszac_cooling_type'],
169
+ building_type)
170
+
171
+ when 'PVAV'
172
+
173
+ # Retrieve the existing hot water loop
174
+ # or add a new one if necessary.
175
+ hot_water_loop = nil
176
+ hot_water_loop = if getPlantLoopByName('Hot Water Loop').is_initialized
177
+ getPlantLoopByName('Hot Water Loop').get
178
+ elsif building_type == 'MediumOffice'
179
+ nil
180
+ else
181
+ add_hw_loop('NaturalGas', building_type)
182
+ end
183
+
184
+ add_pvav(template,
185
+ system['name'],
186
+ thermal_zones,
187
+ prototype_input['vav_operation_schedule'],
188
+ prototype_input['vav_oa_damper_schedule'],
189
+ electric_reheat = false,
190
+ hot_water_loop,
191
+ chilled_water_loop = nil,
192
+ return_plenum,
193
+ building_type)
194
+
195
+ when 'DOAS'
196
+
197
+ # Retrieve the existing hot water loop
198
+ # or add a new one if necessary.
199
+ hot_water_loop = nil
200
+ hot_water_loop = if getPlantLoopByName('Hot Water Loop').is_initialized
201
+ getPlantLoopByName('Hot Water Loop').get
202
+ else
203
+ add_hw_loop('NaturalGas', building_type)
204
+ end
205
+
206
+ # Retrieve the existing chilled water loop
207
+ # or add a new one if necessary.
208
+ chilled_water_loop = nil
209
+ if getPlantLoopByName('Chilled Water Loop').is_initialized
210
+ chilled_water_loop = getPlantLoopByName('Chilled Water Loop').get
211
+ else
212
+ condenser_water_loop = nil
213
+ if prototype_input['chiller_cooling_type'] == 'WaterCooled'
214
+ condenser_water_loop = add_cw_loop(template,
215
+ 'Open Cooling Tower',
216
+ 'Centrifugal',
217
+ 'Fan Cycling',
218
+ 2,
219
+ 1,
220
+ building_type)
221
+ end
219
222
 
220
- self.add_doas(building_vintage,
221
- system['name'],
222
- hot_water_loop,
223
- chilled_water_loop,
224
- thermal_zones,
225
- prototype_input['vav_operation_schedule'],
226
- prototype_input['doas_oa_damper_schedule'],
227
- prototype_input['doas_fan_maximum_flow_rate'],
228
- prototype_input['doas_economizer_control_type'],
229
- building_type)
230
-
231
- when 'DC' # Data Center
232
-
233
- # Retrieve the existing hot water loop
234
- # or add a new one if necessary.
235
- hot_water_loop = nil
236
- if self.getPlantLoopByName('Hot Water Loop').is_initialized
237
- hot_water_loop = self.getPlantLoopByName('Hot Water Loop').get
238
- else
239
- hot_water_loop = self.add_hw_loop('NaturalGas',building_type)
240
- end
223
+ chilled_water_loop = add_chw_loop(template,
224
+ prototype_input['chw_pumping_type'],
225
+ prototype_input['chiller_cooling_type'],
226
+ prototype_input['chiller_condenser_type'],
227
+ prototype_input['chiller_compressor_type'],
228
+ 'Electricity',
229
+ condenser_water_loop)
230
+ end
241
231
 
242
- # Retrieve the existing heat pump loop
243
- # or add a new one if necessary.
244
- heat_pump_loop = nil
245
- if self.getPlantLoopByName('Heat Pump Loop').is_initialized
246
- heat_pump_loop = self.getPlantLoopByName('Heat Pump Loop').get
232
+ add_doas(template,
233
+ system['name'],
234
+ hot_water_loop,
235
+ chilled_water_loop,
236
+ thermal_zones,
237
+ prototype_input['vav_operation_schedule'],
238
+ prototype_input['doas_oa_damper_schedule'],
239
+ prototype_input['doas_fan_maximum_flow_rate'],
240
+ prototype_input['doas_economizer_control_type'],
241
+ building_type)
242
+
243
+ when 'DC' # Data Center
244
+
245
+ # Retrieve the existing hot water loop
246
+ # or add a new one if necessary.
247
+ hot_water_loop = nil
248
+ hot_water_loop = if getPlantLoopByName('Hot Water Loop').is_initialized
249
+ getPlantLoopByName('Hot Water Loop').get
250
+ else
251
+ add_hw_loop('NaturalGas', building_type)
252
+ end
253
+
254
+ # Retrieve the existing heat pump loop
255
+ # or add a new one if necessary.
256
+ heat_pump_loop = nil
257
+ heat_pump_loop = if getPlantLoopByName('Heat Pump Loop').is_initialized
258
+ getPlantLoopByName('Heat Pump Loop').get
259
+ else
260
+ add_hp_loop(building_type)
261
+ end
262
+
263
+ add_data_center_hvac(template,
264
+ nil,
265
+ hot_water_loop,
266
+ heat_pump_loop,
267
+ thermal_zones,
268
+ prototype_input['flow_fraction_schedule_name'],
269
+ prototype_input['flow_fraction_schedule_name'],
270
+ system['main_data_center'])
271
+
272
+ when 'SAC'
273
+
274
+ add_split_ac(template,
275
+ nil,
276
+ thermal_zones,
277
+ prototype_input['sac_operation_schedule'],
278
+ prototype_input['sac_operation_schedule_meeting'],
279
+ prototype_input['sac_oa_damper_schedule'],
280
+ prototype_input['sac_fan_type'],
281
+ prototype_input['sac_heating_type'],
282
+ prototype_input['sac_heating_type'],
283
+ prototype_input['sac_cooling_type'],
284
+ building_type)
285
+
286
+ when 'UnitHeater'
287
+
288
+ add_unitheater(template,
289
+ nil,
290
+ thermal_zones,
291
+ prototype_input['unitheater_operation_schedule'],
292
+ prototype_input['unitheater_fan_control_type'],
293
+ OpenStudio.convert(prototype_input['unitheater_fan_static_pressure'], 'inH_{2}O', 'Pa').get,
294
+ prototype_input['unitheater_heating_type'],
295
+ hot_water_loop = nil,
296
+ building_type)
297
+
298
+ when 'PTAC'
299
+
300
+ add_ptac(template,
301
+ nil,
302
+ nil,
303
+ thermal_zones,
304
+ prototype_input['ptac_fan_type'],
305
+ prototype_input['ptac_heating_type'],
306
+ prototype_input['ptac_cooling_type'],
307
+ building_type)
308
+
309
+ when 'Exhaust Fan'
310
+
311
+ add_exhaust_fan(system['availability_sch_name'],
312
+ system['flow_rate'],
313
+ system['flow_fraction_schedule_name'],
314
+ system['balanced_exhaust_fraction_schedule_name'],
315
+ thermal_zones)
316
+
317
+ when 'Zone Ventilation'
318
+
319
+ add_zone_ventilation(system['availability_sch_name'],
320
+ system['flow_rate'],
321
+ system['ventilation_type'],
322
+ thermal_zones)
323
+
324
+ when 'Refrigeration'
325
+
326
+ add_refrigeration(template,
327
+ system['case_type'],
328
+ system['cooling_capacity_per_length'],
329
+ system['length'],
330
+ system['evaporator_fan_pwr_per_length'],
331
+ system['lighting_per_length'],
332
+ system['lighting_sch_name'],
333
+ system['defrost_pwr_per_length'],
334
+ system['restocking_sch_name'],
335
+ system['cop'],
336
+ system['cop_f_of_t_curve_name'],
337
+ system['condenser_fan_pwr'],
338
+ system['condenser_fan_pwr_curve_name'],
339
+ thermal_zones[0])
247
340
  else
248
- heat_pump_loop = self.add_hp_loop(building_type)
249
- end
250
341
 
251
- self.add_data_center_hvac(building_vintage,
252
- nil,
253
- hot_water_loop,
254
- heat_pump_loop,
255
- thermal_zones,
256
- prototype_input['flow_fraction_schedule_name'],
257
- prototype_input['flow_fraction_schedule_name'],
258
- system['main_data_center'])
259
-
260
- when 'SAC'
261
-
262
- self.add_split_AC(building_vintage,
263
- nil,
264
- thermal_zones,
265
- prototype_input['sac_operation_schedule'],
266
- prototype_input['sac_operation_schedule_meeting'],
267
- prototype_input['sac_oa_damper_schedule'],
268
- prototype_input['sac_fan_type'],
269
- prototype_input['sac_heating_type'],
270
- prototype_input['sac_heating_type'],
271
- prototype_input['sac_cooling_type'],
272
- building_type)
273
-
274
- when 'UnitHeater'
275
-
276
- self.add_unitheater(building_vintage,
277
- nil,
278
- thermal_zones,
279
- prototype_input['unitheater_operation_schedule'],
280
- prototype_input['unitheater_fan_control_type'],
281
- prototype_input['unitheater_fan_static_pressure'],
282
- prototype_input['unitheater_heating_type'],
283
- building_type)
284
-
285
- when 'PTAC'
286
-
287
- self.add_ptac(building_vintage,
288
- nil,
289
- nil,
290
- thermal_zones,
291
- prototype_input['ptac_fan_type'],
292
- prototype_input['ptac_heating_type'],
293
- prototype_input['ptac_cooling_type'],
294
- building_type)
295
-
296
- when 'Exhaust Fan'
297
-
298
- self.add_exhaust_fan(system['availability_sch_name'],
299
- system['flow_rate'],
300
- system['flow_fraction_schedule_name'],
301
- system['balanced_exhaust_fraction_schedule_name'],
302
- thermal_zones)
303
-
304
- when 'Zone Ventilation'
305
-
306
- self.add_zone_ventilation(system['availability_sch_name'],
307
- system['flow_rate'],
308
- system['ventilation_type'],
309
- thermal_zones)
310
-
311
- when 'Refrigeration'
312
-
313
- self.add_refrigeration(building_vintage,
314
- system['case_type'],
315
- system['cooling_capacity_per_length'],
316
- system['length'],
317
- system['evaporator_fan_pwr_per_length'],
318
- system['lighting_per_length'],
319
- system['lighting_sch_name'],
320
- system['defrost_pwr_per_length'],
321
- system['restocking_sch_name'],
322
- system['cop'],
323
- system['cop_f_of_t_curve_name'],
324
- system['condenser_fan_pwr'],
325
- system['condenser_fan_pwr_curve_name'],
326
- thermal_zones[0])
327
- else
328
-
329
- OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', "System type #{system['type']} is not recognized. This system will not be added.")
342
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "System type #{system['type']} is not recognized. This system will not be added.")
330
343
 
344
+ end
331
345
  end
332
346
 
333
347
  end
334
348
 
335
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished adding HVAC')
349
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished adding HVAC')
336
350
 
337
351
  return true
338
-
339
- end #add hvac
352
+ end # add hvac
340
353
 
341
354
  private
342
355
 
343
356
  def get_zones_from_spaces_on_system(system)
344
-
345
357
  # Find all zones associated with these spaces
346
358
  thermal_zones = []
347
359
  system['space_names'].each do |space_name|
348
- space = self.getSpaceByName(space_name)
360
+ space = getSpaceByName(space_name)
349
361
  if space.empty?
350
- OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', "No space called #{space_name} was found in the model")
362
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "No space called #{space_name} was found in the model")
351
363
  next
352
364
  end
353
365
  space = space.get
354
366
  zone = space.thermalZone
355
367
  if zone.empty?
356
- OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', "Space #{space_name} has no thermal zone; cannot add an HVAC system to this space.")
368
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "Space #{space_name} has no thermal zone; cannot add an HVAC system to this space.")
357
369
  next
358
370
  end
359
371
  thermal_zones << zone.get
360
372
  end
361
373
 
362
374
  return thermal_zones
363
-
364
375
  end
365
376
 
366
377
  def get_return_plenum_from_system(system)
367
-
368
378
  # Find the zone associated with the return plenum space name
369
379
  return_plenum = nil
370
380
 
@@ -372,9 +382,9 @@ class OpenStudio::Model::Model
372
382
  return return_plenum if system['return_plenum'].nil?
373
383
 
374
384
  # Get the space
375
- space = self.getSpaceByName(system['return_plenum'])
385
+ space = getSpaceByName(system['return_plenum'])
376
386
  if space.empty?
377
- OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', "No space called #{space_name} was found in the model")
387
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "No space called #{space_name} was found in the model")
378
388
  return return_plenum
379
389
  end
380
390
  space = space.get
@@ -382,12 +392,10 @@ class OpenStudio::Model::Model
382
392
  # Get the space's zone
383
393
  zone = space.thermalZone
384
394
  if zone.empty?
385
- OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', "Space #{space_name} has no thermal zone; cannot be a return plenum.")
395
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "Space #{space_name} has no thermal zone; cannot be a return plenum.")
386
396
  return return_plenum
387
397
  end
388
398
 
389
399
  return zone.get
390
-
391
400
  end
392
-
393
401
  end