openstudio-standards 0.2.17.rc2 → 0.3.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +4 -4
  2. data/data/geometry/ASHRAESuperMarket.json +29 -38
  3. data/data/standards/OpenStudio_Standards-deer-ALL-comstock(space_types).xlsx +0 -0
  4. data/data/standards/metadata_units_OpenStudio_Standards-deer-ALL-comstockspace_types.csv +172 -0
  5. data/data/standards/test_performance_expected_dd_results.csv +12 -12
  6. data/lib/openstudio-standards/btap/analysis.rb +389 -389
  7. data/lib/openstudio-standards/btap/bridging.rb +2099 -0
  8. data/lib/openstudio-standards/btap/btap.model.rb +717 -717
  9. data/lib/openstudio-standards/btap/btap.rb +33 -30
  10. data/lib/openstudio-standards/btap/economics.rb +1163 -1163
  11. data/lib/openstudio-standards/btap/envelope.rb +4 -4
  12. data/lib/openstudio-standards/btap/equest.rb +2524 -2524
  13. data/lib/openstudio-standards/btap/fileio.rb +9 -0
  14. data/lib/openstudio-standards/btap/measures.rb +1515 -1515
  15. data/lib/openstudio-standards/btap/mpc.rb +554 -554
  16. data/lib/openstudio-standards/btap/reporting.rb +287 -287
  17. data/lib/openstudio-standards/btap/simmanager.rb +759 -759
  18. data/lib/openstudio-standards/btap/spaceloads.rb +439 -439
  19. data/lib/openstudio-standards/btap/spacetypes.rb +113 -113
  20. data/lib/openstudio-standards/btap/utilities.rb +134 -134
  21. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb +8 -83
  22. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb +3 -99
  23. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +81 -75
  24. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +7 -306
  25. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +70 -98
  26. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +41 -14
  27. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +40 -14
  28. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +1 -23
  29. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.exterior_lights.rb +7 -7
  30. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +5 -1
  31. data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +101 -4
  32. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +16 -1
  33. data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +5 -4
  34. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +24 -4
  35. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +18 -2
  36. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +18 -0
  37. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +13 -10
  38. data/lib/openstudio-standards/standards/Standards.CoilDX.rb +5 -3
  39. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +11 -8
  40. data/lib/openstudio-standards/standards/Standards.Construction.rb +1 -1
  41. data/lib/openstudio-standards/standards/Standards.Model.rb +68 -52
  42. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +2 -2
  43. data/lib/openstudio-standards/standards/Standards.Space.rb +16 -18
  44. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +1 -1
  45. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +5 -5
  46. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_cases.json +510 -0
  47. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_compressors.json +18 -0
  48. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_walkins.json +410 -0
  49. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +2 -2
  50. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_cases.json +510 -0
  51. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_compressors.json +18 -0
  52. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_walkins.json +410 -0
  53. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +2 -2
  54. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_cases.json +510 -0
  55. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_compressors.json +18 -0
  56. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_walkins.json +410 -0
  57. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +2 -2
  58. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_cases.json +510 -0
  59. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_compressors.json +18 -0
  60. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_walkins.json +410 -0
  61. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +2 -2
  62. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +2 -2
  63. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +2 -2
  64. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.entryways.json +13 -2
  65. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.parking.json +11 -2
  66. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +9 -0
  67. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -0
  68. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +4 -3
  69. data/lib/openstudio-standards/standards/deer/deer_1985/comstock_deer_1985/data/comstock_deer_1985.spc_typ.json +405 -405
  70. data/lib/openstudio-standards/standards/deer/deer_1996/comstock_deer_1996/data/comstock_deer_1996.spc_typ.json +405 -405
  71. data/lib/openstudio-standards/standards/deer/deer_2003/comstock_deer_2003/data/comstock_deer_2003.spc_typ.json +405 -405
  72. data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.ThermalZone.rb +21 -0
  73. data/lib/openstudio-standards/standards/deer/deer_2007/comstock_deer_2007/data/comstock_deer_2007.spc_typ.json +405 -405
  74. data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.ThermalZone.rb +21 -0
  75. data/lib/openstudio-standards/standards/deer/deer_2011/comstock_deer_2011/data/comstock_deer_2011.spc_typ.json +405 -405
  76. data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.ThermalZone.rb +21 -0
  77. data/lib/openstudio-standards/standards/deer/deer_2014/comstock_deer_2014/data/comstock_deer_2014.spc_typ.json +405 -405
  78. data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.ThermalZone.rb +21 -0
  79. data/lib/openstudio-standards/standards/deer/deer_2015/comstock_deer_2015/data/comstock_deer_2015.spc_typ.json +405 -405
  80. data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.ThermalZone.rb +21 -0
  81. data/lib/openstudio-standards/standards/deer/deer_2017/comstock_deer_2017/data/comstock_deer_2017.spc_typ.json +405 -405
  82. data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.ThermalZone.rb +21 -0
  83. data/lib/openstudio-standards/standards/deer/deer_2020/comstock_deer_2020/data/comstock_deer_2020.spc_typ.json +405 -405
  84. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +8 -0
  85. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.ThermalZone.rb +21 -0
  86. data/lib/openstudio-standards/standards/deer/deer_2025/comstock_deer_2025/data/comstock_deer_2025.spc_typ.json +405 -405
  87. data/lib/openstudio-standards/standards/deer/deer_2030/comstock_deer_2030/data/comstock_deer_2030.spc_typ.json +405 -405
  88. data/lib/openstudio-standards/standards/deer/deer_2035/comstock_deer_2035/data/comstock_deer_2035.spc_typ.json +405 -405
  89. data/lib/openstudio-standards/standards/deer/deer_2040/comstock_deer_2040/data/comstock_deer_2040.spc_typ.json +405 -405
  90. data/lib/openstudio-standards/standards/deer/deer_2045/comstock_deer_2045/data/comstock_deer_2045.spc_typ.json +405 -405
  91. data/lib/openstudio-standards/standards/deer/deer_2050/comstock_deer_2050/data/comstock_deer_2050.spc_typ.json +405 -405
  92. data/lib/openstudio-standards/standards/deer/deer_2055/comstock_deer_2055/data/comstock_deer_2055.spc_typ.json +405 -405
  93. data/lib/openstudio-standards/standards/deer/deer_2060/comstock_deer_2060/data/comstock_deer_2060.spc_typ.json +405 -405
  94. data/lib/openstudio-standards/standards/deer/deer_2065/comstock_deer_2065/data/comstock_deer_2065.spc_typ.json +405 -405
  95. data/lib/openstudio-standards/standards/deer/deer_2070/comstock_deer_2070/data/comstock_deer_2070.spc_typ.json +405 -405
  96. data/lib/openstudio-standards/standards/deer/deer_2075/comstock_deer_2075/data/comstock_deer_2075.spc_typ.json +405 -405
  97. data/lib/openstudio-standards/standards/deer/deer_pre_1975/comstock_deer_pre_1975/data/comstock_deer_pre_1975.spc_typ.json +405 -405
  98. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +1 -1
  99. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +3 -1
  100. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +3 -1
  101. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +2 -2
  102. data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +233 -0
  103. data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +180 -0
  104. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +6 -1
  105. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +807 -258
  106. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +102 -66
  107. data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +85 -8
  108. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartment.osm +2483 -992
  109. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LowriseApartment.osm +4 -336
  110. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/MidriseApartment.osm +228 -231
  111. data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +12 -18
  112. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_type_unit_definitions.txt +76 -0
  113. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +6 -1
  114. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +111 -24
  115. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +1 -0
  116. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +3 -1
  117. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +64 -16
  118. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +61 -17
  119. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +128 -0
  120. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +252 -23
  121. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +316 -20
  122. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +1 -1
  123. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +4 -6
  124. data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +38 -0
  125. data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +16 -24
  126. data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +48 -25
  127. data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +3 -3
  128. data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +36 -19
  129. data/lib/openstudio-standards/standards/necb/NECB2020/data/furnaces.json +19 -4
  130. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps.json +20 -40
  131. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +74 -36
  132. data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +0 -2
  133. data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +124 -57
  134. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +124 -2
  135. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +15 -2
  136. data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
  137. data/lib/openstudio-standards/utilities/simulation.rb +1 -1
  138. data/lib/openstudio-standards/version.rb +1 -1
  139. data/lib/openstudio-standards/weather/Weather.Model.rb +5 -0
  140. data/lib/openstudio-standards/weather/Weather.stat_file.rb +33 -1
  141. data/lib/openstudio-standards.rb +1 -0
  142. metadata +14 -121
  143. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  144. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.ddy +0 -2342
  145. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.epw +0 -8768
  146. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.stat +0 -700
  147. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.ddy +0 -2342
  148. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.epw +0 -8768
  149. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.stat +0 -700
  150. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.ddy +0 -2342
  151. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.epw +0 -8768
  152. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.stat +0 -700
  153. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.ddy +0 -276
  154. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.epw +0 -8768
  155. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.stat +0 -611
  156. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.ddy +0 -276
  157. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.epw +0 -8768
  158. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.stat +0 -610
  159. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.ddy +0 -2342
  160. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.epw +0 -8768
  161. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.stat +0 -700
  162. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.ddy +0 -2342
  163. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.epw +0 -8768
  164. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.stat +0 -700
  165. data/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb +0 -81
  166. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb +0 -27
  167. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb +0 -69
  168. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +0 -178
  169. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb +0 -27
  170. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb +0 -27
  171. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb +0 -27
  172. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb +0 -27
  173. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb +0 -67
  174. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb +0 -27
  175. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb +0 -30
  176. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb +0 -27
  177. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb +0 -27
  178. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb +0 -68
  179. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb +0 -68
  180. data/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb +0 -42
  181. data/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb +0 -27
  182. data/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb +0 -58
  183. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +0 -171
  184. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb +0 -56
  185. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb +0 -89
  186. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb +0 -50
  187. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -69
  188. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb +0 -120
  189. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb +0 -56
  190. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb +0 -41
  191. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb +0 -27
  192. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb +0 -30
  193. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb +0 -30
  194. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +0 -68
  195. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb +0 -61
  196. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -57
  197. data/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb +0 -27
  198. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +0 -59
  199. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb +0 -49
  200. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb +0 -90
  201. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +0 -83
  202. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +0 -57
  203. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +0 -27
  204. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +0 -27
  205. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb +0 -27
  206. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb +0 -27
  207. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb +0 -27
  208. data/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb +0 -29
  209. data/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb +0 -27
  210. data/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb +0 -29
  211. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +0 -55
  212. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +0 -55
  213. data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb +0 -38
  214. data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb +0 -27
  215. data/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb +0 -27
  216. data/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb +0 -42
  217. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +0 -59
  218. data/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb +0 -59
  219. data/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb +0 -48
  220. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +0 -16
  221. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb +0 -27
  222. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb +0 -27
  223. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb +0 -27
  224. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb +0 -27
  225. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb +0 -27
  226. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb +0 -27
  227. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb +0 -27
  228. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb +0 -27
  229. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb +0 -88
  230. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb +0 -88
  231. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb +0 -104
  232. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb +0 -27
  233. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb +0 -27
@@ -2,48 +2,20 @@
2
2
  # open the class to add methods to return sizing values
3
3
  class OpenStudio::Model::ThermalZone
4
4
 
5
- # Sets all auto-sizeable fields to autosize
6
- def autosize
7
- self.autosizeDesignOutdoorAirFlowRate
8
- end
9
-
10
- # Takes the values calculated by the EnergyPlus sizing routines
11
- # and puts them into this object model in place of the autosized fields.
12
- # Must have previously completed a run with sql output for this to work.
13
- def applySizingValues
14
-
15
- # In OpenStudio, the design OA flow rates are calculated by the
16
- # Controller:OutdoorAir object associated with this system.
17
- # Therefore, this property will be retrieved from that object's sizing values
18
- air_loop = self.airLoopHVAC
19
- if air_loop.airLoopHVACOutdoorAirSystem.is_initialized
20
- controller_oa = air_loop.airLoopHVACOutdoorAirSystem.get.getControllerOutdoorAir
21
- # get the max oa flow rate from the controller:outdoor air sizing
22
- maximum_outdoor_air_flow_rate = controller_oa.autosizedMaximumOutdoorAirFlowRate
23
- if maximum_outdoor_air_flow_rate.is_initialized
24
- self.setDesignOutdoorAirFlowRate(maximum_outdoor_air_flow_rate.get)
25
- # Set the OA flow method to "ZoneSum" to avoid severe errors
26
- # in the fully hard-sized model.
27
- self.setSystemOutdoorAirMethod("ZoneSum")
28
- end
29
- end
30
-
31
- end
32
-
33
5
  # returns the autosized maximum outdoor air flow rate as an optional double
34
6
  def autosizedMaximumOutdoorAirFlowRate
35
7
 
36
- return self.model.getAutosizedValue(self, 'Maximum Outdoor Air Flow Rate', 'm3/s')
37
-
8
+ return self.getAutosizedValue('Maximum Outdoor Air Flow Rate', 'm3/s')
9
+
38
10
  end
39
-
11
+
40
12
  # returns the autosized minimum outdoor air flow rate as an optional double
41
13
  def autosizedMinimumOutdoorAirFlowRate
42
14
 
43
- return self.model.getAutosizedValue(self, 'Minimum Outdoor Air Flow Rate', 'm3/s')
44
-
15
+ return self.getAutosizedValue('Minimum Outdoor Air Flow Rate', 'm3/s')
16
+
45
17
  end
46
-
18
+
47
19
  # returns the autosized cooling design air flow rate as an optional double
48
20
  def autosizedCoolingDesignAirFlowRate
49
21
 
@@ -52,29 +24,29 @@ class OpenStudio::Model::ThermalZone
52
24
  name = self.name.get.upcase
53
25
 
54
26
  sql = self.model.sqlFile
55
-
27
+
56
28
  if sql.is_initialized
57
29
  sql = sql.get
58
-
30
+
59
31
  # In E+ 8.4, (OS 1.9.3 onward) the table name changed
60
32
  table_name = nil
61
33
  if self.model.version < OpenStudio::VersionString.new('1.9.3')
62
34
  table_name = 'Zone Cooling'
63
35
  else
64
36
  table_name = 'Zone Sensible Cooling'
65
- end
66
-
67
- query = "SELECT Value
37
+ end
38
+
39
+ query = "SELECT Value
68
40
  FROM tabulardatawithstrings
69
- WHERE ReportName='HVACSizingSummary'
70
- AND ReportForString='Entire Facility'
41
+ WHERE ReportName='HVACSizingSummary'
42
+ AND ReportForString='Entire Facility'
71
43
  AND TableName='#{table_name}'
72
44
  AND ColumnName='User Design Air Flow'
73
45
  AND RowName='#{name}'
74
46
  AND Units='m3/s'"
75
47
 
76
48
  val = sql.execAndReturnFirstDouble(query)
77
-
49
+
78
50
  if val.is_initialized
79
51
  result = OpenStudio::OptionalDouble.new(val.get)
80
52
  else
@@ -97,29 +69,29 @@ class OpenStudio::Model::ThermalZone
97
69
  name = self.name.get.upcase
98
70
 
99
71
  sql = self.model.sqlFile
100
-
72
+
101
73
  if sql.is_initialized
102
74
  sql = sql.get
103
-
75
+
104
76
  # In E+ 8.4, (OS 1.9.3 onward) the table name changed
105
77
  table_name = nil
106
78
  if self.model.version < OpenStudio::VersionString.new('1.9.3')
107
79
  table_name = 'Zone Heating'
108
80
  else
109
81
  table_name = 'Zone Sensible Heating'
110
- end
111
-
112
- query = "SELECT Value
82
+ end
83
+
84
+ query = "SELECT Value
113
85
  FROM tabulardatawithstrings
114
- WHERE ReportName='HVACSizingSummary'
115
- AND ReportForString='Entire Facility'
86
+ WHERE ReportName='HVACSizingSummary'
87
+ AND ReportForString='Entire Facility'
116
88
  AND TableName='#{table_name}'
117
89
  AND ColumnName='User Design Air Flow'
118
90
  AND RowName='#{name}'
119
91
  AND Units='m3/s'"
120
92
 
121
93
  val = sql.execAndReturnFirstDouble(query)
122
-
94
+
123
95
  if val.is_initialized
124
96
  result = OpenStudio::OptionalDouble.new(val.get)
125
97
  else
@@ -136,35 +108,35 @@ class OpenStudio::Model::ThermalZone
136
108
 
137
109
  # returns the calculated cooling design load as an optional double
138
110
  def coolingDesignLoad
139
-
111
+
140
112
  result = OpenStudio::OptionalDouble.new
141
113
 
142
114
  name = self.name.get.upcase
143
115
 
144
116
  sql = self.model.sqlFile
145
-
117
+
146
118
  if sql.is_initialized
147
119
  sql = sql.get
148
-
120
+
149
121
  # In E+ 8.4, (OS 1.9.3 onward) the table name changed
150
122
  table_name = nil
151
123
  if self.model.version < OpenStudio::VersionString.new('1.9.3')
152
124
  table_name = 'Zone Cooling'
153
125
  else
154
126
  table_name = 'Zone Sensible Cooling'
155
- end
156
-
157
- query = "SELECT Value
127
+ end
128
+
129
+ query = "SELECT Value
158
130
  FROM tabulardatawithstrings
159
- WHERE ReportName='HVACSizingSummary'
160
- AND ReportForString='Entire Facility'
131
+ WHERE ReportName='HVACSizingSummary'
132
+ AND ReportForString='Entire Facility'
161
133
  AND TableName='#{table_name}'
162
134
  AND ColumnName='User Design Load'
163
135
  AND RowName='#{name}'
164
136
  AND Units='W'"
165
137
 
166
138
  val = sql.execAndReturnFirstDouble(query)
167
-
139
+
168
140
  if val.is_initialized
169
141
  floor_area_no_multiplier_m2 = self.floorArea
170
142
  floor_area_m2 = floor_area_no_multiplier_m2 * self.multiplier
@@ -178,10 +150,10 @@ class OpenStudio::Model::ThermalZone
178
150
  OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', 'Model has no sql file containing results, cannot lookup data.')
179
151
  end
180
152
 
181
- return result
182
-
153
+ return result
154
+
183
155
  end
184
-
156
+
185
157
  def designAirFlowRate
186
158
 
187
159
  result = OpenStudio::OptionalDouble.new
@@ -189,17 +161,17 @@ class OpenStudio::Model::ThermalZone
189
161
  name = self.name.get.upcase
190
162
 
191
163
  sql = self.model.sqlFile
192
-
164
+
193
165
  if sql.is_initialized
194
166
  sql = sql.get
195
-
167
+
196
168
  table_name = 'Zone Sizing Information'
197
169
 
198
170
  # Get zone row name
199
171
  query = "SELECT RowName
200
172
  FROM tabulardatawithstrings
201
- WHERE ReportName='Initialization Summary'
202
- AND ReportForString='Entire Facility'
173
+ WHERE ReportName='Initialization Summary'
174
+ AND ReportForString='Entire Facility'
203
175
  AND TableName='#{table_name}'
204
176
  AND ColumnName='Zone Name'
205
177
  AND Value='#{name}'"
@@ -217,32 +189,32 @@ class OpenStudio::Model::ThermalZone
217
189
  end
218
190
  htg_des_air_flow_rate = 0
219
191
  clg_des_air_flow_rate = 0
220
-
192
+
221
193
  # Get zone cooling design flow rate
222
- query = "SELECT Value
194
+ query = "SELECT Value
223
195
  FROM tabulardatawithstrings
224
- WHERE ReportName='Initialization Summary'
225
- AND ReportForString='Entire Facility'
196
+ WHERE ReportName='Initialization Summary'
197
+ AND ReportForString='Entire Facility'
226
198
  AND TableName='#{table_name}'
227
199
  AND ColumnName='User Des Air Flow Rate {m3/s}'
228
200
  AND RowName='#{clg_id}'"
229
201
  val = sql.execAndReturnFirstDouble(query)
230
- if val.is_initialized
202
+ if val.is_initialized
231
203
  clg_des_air_flow_rate = val
232
204
  else
233
205
  OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.Model", "Data not found for query: #{query}")
234
206
  end
235
207
 
236
208
  # Get zone heating design flow rate
237
- query = "SELECT Value
209
+ query = "SELECT Value
238
210
  FROM tabulardatawithstrings
239
- WHERE ReportName='Initialization Summary'
240
- AND ReportForString='Entire Facility'
211
+ WHERE ReportName='Initialization Summary'
212
+ AND ReportForString='Entire Facility'
241
213
  AND TableName='#{table_name}'
242
214
  AND ColumnName='User Des Air Flow Rate {m3/s}'
243
215
  AND RowName='#{htg_id}'"
244
216
  val = sql.execAndReturnFirstDouble(query)
245
- if val.is_initialized
217
+ if val.is_initialized
246
218
  htg_des_air_flow_rate = val
247
219
  else
248
220
  OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.Model", "Data not found for query: #{query}")
@@ -263,16 +235,16 @@ class OpenStudio::Model::ThermalZone
263
235
 
264
236
  # returns the calculated heating design load as an optional double
265
237
  def heatingDesignLoad
266
-
238
+
267
239
  result = OpenStudio::OptionalDouble.new
268
240
 
269
241
  name = self.name.get.upcase
270
242
 
271
243
  sql = self.model.sqlFile
272
-
244
+
273
245
  if sql.is_initialized
274
246
  sql = sql.get
275
-
247
+
276
248
  # In E+ 8.4, (OS 1.9.3 onward) the table name changed
277
249
  table_name = nil
278
250
  if self.model.version < OpenStudio::VersionString.new('1.9.3')
@@ -280,18 +252,18 @@ class OpenStudio::Model::ThermalZone
280
252
  else
281
253
  table_name = 'Zone Sensible Heating'
282
254
  end
283
-
284
- query = "SELECT Value
255
+
256
+ query = "SELECT Value
285
257
  FROM tabulardatawithstrings
286
- WHERE ReportName='HVACSizingSummary'
287
- AND ReportForString='Entire Facility'
258
+ WHERE ReportName='HVACSizingSummary'
259
+ AND ReportForString='Entire Facility'
288
260
  AND TableName='#{table_name}'
289
261
  AND ColumnName='User Design Load'
290
262
  AND RowName='#{name}'
291
263
  AND Units='W'"
292
264
 
293
265
  val = sql.execAndReturnFirstDouble(query)
294
-
266
+
295
267
  if val.is_initialized
296
268
  floor_area_no_multiplier_m2 = self.floorArea
297
269
  floor_area_m2 = floor_area_no_multiplier_m2 * self.multiplier
@@ -305,8 +277,8 @@ class OpenStudio::Model::ThermalZone
305
277
  OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', 'Model has no sql file containing results, cannot lookup data.')
306
278
  end
307
279
 
308
- return result
309
-
280
+ return result
281
+
310
282
  end
311
283
 
312
284
  # Determine the zone heating fuels, including
@@ -314,14 +286,14 @@ class OpenStudio::Model::ThermalZone
314
286
  # the air loops serving the zone, and any plant loops
315
287
  # serving those air loops.
316
288
  #
317
- # return [Array<String>] An array. Possible values are
289
+ # return [Array<String>] An array. Possible values are
318
290
  # Electricity, NaturalGas, Propane, PropaneGas, FuelOilNo1, FuelOilNo2,
319
- # Coal, Diesel, Gasoline, DistrictCooling, DistrictHeating,
291
+ # Coal, Diesel, Gasoline, DistrictCooling, DistrictHeating,
320
292
  # and SolarEnergy.
321
293
  def heating_fuels
322
-
294
+
323
295
  fuels = []
324
-
296
+
325
297
  # Special logic for models imported from Sefaira.
326
298
  # In this case, the fuels are listed as a comment
327
299
  # above the Zone object.
@@ -338,7 +310,7 @@ class OpenStudio::Model::ThermalZone
338
310
  fuels.uniq.sort
339
311
  end
340
312
  end
341
-
313
+
342
314
  # Check the zone hvac heating fuels
343
315
  fuels += self.model.zone_equipment_heating_fuels(self)
344
316
 
@@ -348,9 +320,9 @@ class OpenStudio::Model::ThermalZone
348
320
  OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.Model', "For #{name}, heating fuels = #{fuels.uniq.sort.join(', ')}.")
349
321
 
350
322
  return fuels.uniq.sort
351
-
323
+
352
324
  end
353
-
325
+
354
326
  # Determine the zone cooling fuels, including
355
327
  # any fuels used by zone equipment, reheat terminals,
356
328
  # the air loops serving the zone, and any plant loops
@@ -358,12 +330,12 @@ class OpenStudio::Model::ThermalZone
358
330
  #
359
331
  # return [Array<String>] An array. Possible values are
360
332
  # Electricity, NaturalGas, Propane, PropaneGas, FuelOilNo1, FuelOilNo2,
361
- # Coal, Diesel, Gasoline, DistrictCooling, DistrictHeating,
333
+ # Coal, Diesel, Gasoline, DistrictCooling, DistrictHeating,
362
334
  # and SolarEnergy.
363
335
  def cooling_fuels
364
-
336
+
365
337
  fuels = []
366
-
338
+
367
339
  # Check the zone hvac cooling fuels
368
340
  fuels += self.model.zone_equipment_cooling_fuels(self)
369
341
 
@@ -373,7 +345,7 @@ class OpenStudio::Model::ThermalZone
373
345
  OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.Model', "For #{name}, cooling fuels = #{fuels.uniq.sort.join(', ')}.")
374
346
 
375
347
  return fuels.uniq.sort
376
-
377
- end
378
-
348
+
349
+ end
350
+
379
351
  end
@@ -279,6 +279,7 @@ class ASHRAE9012016 < ASHRAE901
279
279
  business_sensor.setName('Business_Sensor')
280
280
  business_sensor_name = business_sensor.name.to_s
281
281
 
282
+ space_types_affected = []
282
283
  zones.sort.each do |zone|
283
284
  spaces = zone.spaces
284
285
  if spaces.length != 1
@@ -286,34 +287,54 @@ class ASHRAE9012016 < ASHRAE901
286
287
  end
287
288
  space = spaces[0]
288
289
  space_lights = space.lights
290
+ lights_defined_by_spacetype = false
289
291
  if space_lights.empty?
290
292
  space_lights = space.spaceType.get.lights
293
+ lights_defined_by_spacetype = true
294
+ space_types_affected << space.spaceType
291
295
  end
292
296
  space_people = space.people
293
297
  if space_people.empty?
294
298
  space_people = space.spaceType.get.people
295
299
  end
296
300
 
297
- next if space_lights.empty? # skip space with no lights
301
+ # guard clause to skip space with no lights
302
+ next if space_lights.empty?
303
+
304
+ # if lights are defined at the space type level, clone each lights object and make it individual to the space
305
+ new_space_lights = []
306
+ if lights_defined_by_spacetype
307
+ space_lights.each do |lights|
308
+ new_lights = lights.clone.to_Lights.get
309
+ new_lights.setName("#{space.name}-#{lights.name}")
310
+ new_lights.setSpace(space)
311
+ new_space_lights << new_lights
312
+ end
313
+ space_lights = new_space_lights
314
+ end
298
315
 
299
316
  zone_name = zone.name.to_s
300
317
  next if zone_name =~ /data\s*center/i # skip data centers
301
318
 
302
- # EnergyPlus v9.4 name change for EMS actuators
319
+ # EnergyPlus v9.4.0 / OpenStudio v3.1.0 variable name change from 'Zone Lights Electric Power' to 'Zone Lights Electricity Rate'
320
+ # EnergyPlus v9.6.0 / OpenStudio v3.3.0 added Space objects, variable name change from 'Zone Lights Electricity Rate' to 'Space Lights Electricity Rate'
303
321
  # https://github.com/NREL/OpenStudio/pull/4104
304
322
  if model.version < OpenStudio::VersionString.new('3.1.0')
305
323
  light_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Zone Lights Electric Power')
306
- else
324
+ key_name = zone_name
325
+ elsif model.version < OpenStudio::VersionString.new('3.3.0')
307
326
  light_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Zone Lights Electricity Rate')
327
+ key_name = zone_name
328
+ else
329
+ light_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Space Lights Electricity Rate')
330
+ key_name = space.name.to_s
308
331
  end
309
- light_sensor.setKeyName(zone_name)
310
- light_sensor.setName("#{zone_name}_LSr".gsub(/[\s-]/, ''))
332
+ light_sensor.setKeyName(key_name)
333
+ light_sensor.setName("#{key_name}_LSr".gsub(/[\s-]/, ''))
311
334
  light_sensor_name = light_sensor.name.to_s
312
335
 
313
- floor_area = OpenStudio::Model::EnergyManagementSystemInternalVariable.new(model, 'Zone Floor Area')
314
- floor_area.setInternalDataIndexKeyName(zone_name)
315
- floor_area.setName("#{zone_name}_Area".gsub(/[\s-]/, ''))
316
- floor_area_name = floor_area.name.to_s
336
+ # get the space floor area for calculations
337
+ space_floor_area = space.floorArea
317
338
 
318
339
  # account for multiple lights (also work for single light)
319
340
  big_light = space_lights[0] # find the light with highest power (assuming specified by watts/area)
@@ -337,20 +358,20 @@ class ASHRAE9012016 < ASHRAE901
337
358
  else
338
359
  light_x_actuator = OpenStudio::Model::EnergyManagementSystemActuator.new(light_x, 'Lights', 'Electricity Rate')
339
360
  end
340
- light_x_actuator.setName("#{zone_name}_Light#{light_id}_Actuator".gsub(/[\s-]/, ''))
361
+ light_x_actuator.setName("#{key_name}_Light#{light_id}_Actuator".gsub(/[\s-]/, ''))
341
362
  light_x_actuator_name = light_x_actuator.name.to_s
342
363
  add_lights_prog_null += "\n SET #{light_x_actuator_name} = NULL,"
343
364
  if light_x == big_light
344
- add_lights_prog_0 += "\n SET #{light_x_actuator_name} = 0.02*#{floor_area_name}/0.09290304,"
365
+ add_lights_prog_0 += "\n SET #{light_x_actuator_name} = 0.02*#{space_floor_area}/0.09290304,"
345
366
  next
346
367
  end
347
368
  add_lights_prog_0 += "\n SET #{light_x_actuator_name} = 0,"
348
369
  end
349
370
 
350
371
  light_ems_prog = OpenStudio::Model::EnergyManagementSystemProgram.new(model)
351
- light_ems_prog.setName("SET_#{zone_name}_Light_EMS_Program".gsub(/[\s-]/, ''))
372
+ light_ems_prog.setName("SET_#{key_name}_Light_EMS_Program".gsub(/[\s-]/, ''))
352
373
  light_ems_prog_body = <<-EMS
353
- SET #{light_sensor_name}_IP=0.093*#{light_sensor_name}/#{floor_area_name},
374
+ SET #{light_sensor_name}_IP=0.093*#{light_sensor_name}/#{space_floor_area},
354
375
  IF (#{business_sensor_name} <= 0) && (#{light_sensor_name}_IP >= 0.02),#{add_lights_prog_0}
355
376
  ELSE,#{add_lights_prog_null}
356
377
  ENDIF
@@ -358,10 +379,16 @@ class ASHRAE9012016 < ASHRAE901
358
379
  light_ems_prog.setBody(light_ems_prog_body)
359
380
 
360
381
  light_ems_prog_manager = OpenStudio::Model::EnergyManagementSystemProgramCallingManager.new(model)
361
- light_ems_prog_manager.setName("SET_#{zone_name}_Light_EMS_Program_Manager")
382
+ light_ems_prog_manager.setName("SET_#{key_name}_Light_EMS_Program_Manager")
362
383
  light_ems_prog_manager.setCallingPoint('AfterPredictorAfterHVACManagers')
363
384
  light_ems_prog_manager.addProgram(light_ems_prog)
364
385
  end
386
+
387
+ # remove lights at the space type level
388
+ space_types_affected.each do |space_type|
389
+ space_type.get.lights.each(&:remove)
390
+ end
391
+
365
392
  return true
366
393
  end
367
394
  end
@@ -279,6 +279,7 @@ class ASHRAE9012019 < ASHRAE901
279
279
  business_sensor.setName('Business_Sensor')
280
280
  business_sensor_name = business_sensor.name.to_s
281
281
 
282
+ space_types_affected = []
282
283
  zones.sort.each do |zone|
283
284
  spaces = zone.spaces
284
285
  if spaces.length != 1
@@ -286,34 +287,54 @@ class ASHRAE9012019 < ASHRAE901
286
287
  end
287
288
  space = spaces[0]
288
289
  space_lights = space.lights
290
+ lights_defined_by_spacetype = false
289
291
  if space_lights.empty?
290
292
  space_lights = space.spaceType.get.lights
293
+ lights_defined_by_spacetype = true
294
+ space_types_affected << space.spaceType
291
295
  end
292
296
  space_people = space.people
293
297
  if space_people.empty?
294
298
  space_people = space.spaceType.get.people
295
299
  end
296
300
 
297
- next if space_lights.empty? # skip space with no lights
301
+ # guard clause to skip space with no lights
302
+ next if space_lights.empty?
303
+
304
+ # if lights are defined at the space type level, clone each lights object and make it individual to the space
305
+ new_space_lights = []
306
+ if lights_defined_by_spacetype
307
+ space_lights.each do |lights|
308
+ new_lights = lights.clone.to_Lights.get
309
+ new_lights.setName("#{space.name}-#{lights.name}")
310
+ new_lights.setSpace(space)
311
+ new_space_lights << new_lights
312
+ end
313
+ space_lights = new_space_lights
314
+ end
298
315
 
299
316
  zone_name = zone.name.to_s
300
317
  next if zone_name =~ /data\s*center/i # skip data centers
301
318
 
302
- # EnergyPlus v9.4 name change for EMS actuators
319
+ # EnergyPlus v9.4.0 / OpenStudio v3.1.0 variable name change from 'Zone Lights Electric Power' to 'Zone Lights Electricity Rate'
320
+ # EnergyPlus v9.6.0 / OpenStudio v3.3.0 added Space objects, variable name change from 'Zone Lights Electricity Rate' to 'Space Lights Electricity Rate'
303
321
  # https://github.com/NREL/OpenStudio/pull/4104
304
322
  if model.version < OpenStudio::VersionString.new('3.1.0')
305
323
  light_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Zone Lights Electric Power')
306
- else
324
+ key_name = zone_name
325
+ elsif model.version < OpenStudio::VersionString.new('3.3.0')
307
326
  light_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Zone Lights Electricity Rate')
327
+ key_name = zone_name
328
+ else
329
+ light_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Space Lights Electricity Rate')
330
+ key_name = space.name.to_s
308
331
  end
309
- light_sensor.setKeyName(zone_name)
310
- light_sensor.setName("#{zone_name}_LSr".gsub(/[\s-]/, ''))
332
+ light_sensor.setKeyName(key_name)
333
+ light_sensor.setName("#{key_name}_LSr".gsub(/[\s-]/, ''))
311
334
  light_sensor_name = light_sensor.name.to_s
312
335
 
313
- floor_area = OpenStudio::Model::EnergyManagementSystemInternalVariable.new(model, 'Zone Floor Area')
314
- floor_area.setInternalDataIndexKeyName(zone_name)
315
- floor_area.setName("#{zone_name}_Area".gsub(/[\s-]/, ''))
316
- floor_area_name = floor_area.name.to_s
336
+ # get the space floor area for calculations
337
+ space_floor_area = space.floorArea
317
338
 
318
339
  # account for multiple lights (also work for single light)
319
340
  big_light = space_lights[0] # find the light with highest power (assuming specified by watts/area)
@@ -337,20 +358,20 @@ class ASHRAE9012019 < ASHRAE901
337
358
  else
338
359
  light_x_actuator = OpenStudio::Model::EnergyManagementSystemActuator.new(light_x, 'Lights', 'Electricity Rate')
339
360
  end
340
- light_x_actuator.setName("#{zone_name}_Light#{light_id}_Actuator".gsub(/[\s-]/, ''))
361
+ light_x_actuator.setName("#{key_name}_Light#{light_id}_Actuator".gsub(/[\s-]/, ''))
341
362
  light_x_actuator_name = light_x_actuator.name.to_s
342
363
  add_lights_prog_null += "\n SET #{light_x_actuator_name} = NULL,"
343
364
  if light_x == big_light
344
- add_lights_prog_0 += "\n SET #{light_x_actuator_name} = 0.02*#{floor_area_name}/0.09290304,"
365
+ add_lights_prog_0 += "\n SET #{light_x_actuator_name} = 0.02*#{space_floor_area}/0.09290304,"
345
366
  next
346
367
  end
347
368
  add_lights_prog_0 += "\n SET #{light_x_actuator_name} = 0,"
348
369
  end
349
370
 
350
371
  light_ems_prog = OpenStudio::Model::EnergyManagementSystemProgram.new(model)
351
- light_ems_prog.setName("SET_#{zone_name}_Light_EMS_Program".gsub(/[\s-]/, ''))
372
+ light_ems_prog.setName("SET_#{key_name}_Light_EMS_Program".gsub(/[\s-]/, ''))
352
373
  light_ems_prog_body = <<-EMS
353
- SET #{light_sensor_name}_IP=0.093*#{light_sensor_name}/#{floor_area_name},
374
+ SET #{light_sensor_name}_IP=0.093*#{light_sensor_name}/#{space_floor_area},
354
375
  IF (#{business_sensor_name} <= 0) && (#{light_sensor_name}_IP >= 0.02),#{add_lights_prog_0}
355
376
  ELSE,#{add_lights_prog_null}
356
377
  ENDIF
@@ -358,11 +379,16 @@ class ASHRAE9012019 < ASHRAE901
358
379
  light_ems_prog.setBody(light_ems_prog_body)
359
380
 
360
381
  light_ems_prog_manager = OpenStudio::Model::EnergyManagementSystemProgramCallingManager.new(model)
361
- light_ems_prog_manager.setName("SET_#{zone_name}_Light_EMS_Program_Manager")
382
+ light_ems_prog_manager.setName("SET_#{key_name}_Light_EMS_Program_Manager")
362
383
  light_ems_prog_manager.setCallingPoint('AfterPredictorAfterHVACManagers')
363
384
  light_ems_prog_manager.addProgram(light_ems_prog)
364
385
  end
365
386
 
387
+ # remove lights at the space type level
388
+ space_types_affected.each do |space_type|
389
+ space_type.get.lights.each(&:remove)
390
+ end
391
+
366
392
  return true
367
393
  end
368
394
  end
@@ -17,9 +17,6 @@ module SuperMarket
17
17
  # additional kitchen loads
18
18
  add_extra_equip_kitchen(model)
19
19
 
20
- # reset bakery & deli OA reset
21
- reset_bakery_deli_oa(model)
22
-
23
20
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished building type specific adjustments')
24
21
 
25
22
  return true
@@ -35,7 +32,7 @@ module SuperMarket
35
32
  space = model.getSpaceByName(space_name).get
36
33
  kitchen_definition = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
37
34
  kitchen_definition.setName('kitchen load')
38
- kitchen_definition.setDesignLevel(11_674.5)
35
+ kitchen_definition.setDesignLevel(11674.5)
39
36
  kitchen_definition.setFractionLatent(0.25)
40
37
  kitchen_definition.setFractionRadiant(0.3)
41
38
  kitchen_definition.setFractionLost(0.2)
@@ -79,25 +76,6 @@ module SuperMarket
79
76
  return true
80
77
  end
81
78
 
82
- # reset bakery & deli OA from AEDG baseline model
83
- #
84
- # @param model [OpenStudio::Model::Model] OpenStudio model object
85
- # @return [Bool] returns true if successful, false if not
86
- def reset_bakery_deli_oa(model)
87
- space_names = ['Deli', 'Bakery']
88
- space_names.each do |space_name|
89
- space_kitchen = model.getSpaceByName(space_name).get
90
- ventilation = space_kitchen.designSpecificationOutdoorAir.get
91
- ventilation.setOutdoorAirFlowperPerson(0)
92
- ventilation.setOutdoorAirFlowperFloorArea(0.0015)
93
- # case template
94
- # when '90.1-2004','90.1-2007','90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019',
95
- # ventilation.setOutdoorAirFlowRate(4.27112436)
96
- # end
97
- end
98
- return true
99
- end
100
-
101
79
  # update water heater loss coefficient
102
80
  #
103
81
  # @param model [OpenStudio::Model::Model] OpenStudio model object