openstudio-standards 0.4.0 → 0.5.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. checksums.yaml +4 -4
  2. data/data/inventory/thermal_bridging.csv +90 -0
  3. data/data/standards/OpenStudio_Standards-deer-comstock.xlsx +0 -0
  4. data/data/standards/manage_OpenStudio_Standards.rb +1 -1
  5. data/data/standards/test_performance_expected_dd_results.csv +2014 -1891
  6. data/lib/openstudio-standards/btap/analysis.rb +8 -8
  7. data/lib/openstudio-standards/btap/bridging.rb +664 -645
  8. data/lib/openstudio-standards/btap/btap.model.rb +14 -14
  9. data/lib/openstudio-standards/btap/btap.rb +7 -7
  10. data/lib/openstudio-standards/btap/btap_result.rb +1 -1
  11. data/lib/openstudio-standards/btap/economics.rb +23 -23
  12. data/lib/openstudio-standards/btap/envelope.rb +8 -8
  13. data/lib/openstudio-standards/btap/equest.rb +1 -1
  14. data/lib/openstudio-standards/btap/geometry.rb +2 -2
  15. data/lib/openstudio-standards/btap/mpc.rb +7 -7
  16. data/lib/openstudio-standards/btap/schedules.rb +1 -1
  17. data/lib/openstudio-standards/btap/simmanager.rb +4 -4
  18. data/lib/openstudio-standards/btap/spaceloads.rb +26 -26
  19. data/lib/openstudio-standards/btap/utilities.rb +6 -6
  20. data/lib/openstudio-standards/btap/vintagizer.rb +1 -1
  21. data/lib/openstudio-standards/constructions/information.rb +83 -0
  22. data/lib/openstudio-standards/constructions/materials/modify.rb +72 -0
  23. data/lib/openstudio-standards/constructions/modify.rb +80 -0
  24. data/lib/openstudio-standards/create_typical/create_typical.rb +983 -0
  25. data/lib/openstudio-standards/create_typical/enumerations.rb +484 -0
  26. data/lib/openstudio-standards/create_typical/space_type_blend.rb +791 -0
  27. data/lib/openstudio-standards/create_typical/space_type_ratios.rb +494 -0
  28. data/lib/openstudio-standards/daylighting/space.rb +47 -0
  29. data/lib/openstudio-standards/geometry/create.rb +801 -0
  30. data/lib/openstudio-standards/geometry/create_bar.rb +2171 -0
  31. data/lib/openstudio-standards/geometry/information.rb +462 -0
  32. data/lib/openstudio-standards/geometry/modify.rb +48 -0
  33. data/lib/openstudio-standards/hvac/air_loop/information.rb +79 -0
  34. data/lib/openstudio-standards/hvac/cbecs_hvac.rb +616 -0
  35. data/lib/openstudio-standards/hvac/setpoint_managers/information.rb +91 -0
  36. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.AirTerminalSingleDuctVAVReheat.rb +1 -1
  37. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.AirTerminalSingleDuctVAVReheat.rb +1 -1
  38. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
  39. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Model.rb +1 -1
  40. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
  41. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb +2 -2
  42. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.hvac_systems.rb +1 -1
  43. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
  44. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +4 -36
  45. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.hvac_systems.rb +1 -1
  46. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
  47. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +4 -36
  48. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Space.rb +3 -3
  49. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.hvac_systems.rb +1 -1
  50. data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirTerminalSingleDuctVAVReheat.rb +1 -1
  51. data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.Model.elevators.rb +1 -1
  52. data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirTerminalSingleDuctVAVReheat.rb +1 -1
  53. data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.CoilHeatingGas.rb +1 -1
  54. data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.Model.elevators.rb +1 -1
  55. data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
  56. data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
  57. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.College.rb +7 -7
  58. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Courthouse.rb +8 -8
  59. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb +14 -14
  60. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +9 -9
  61. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +16 -16
  62. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Laboratory.rb +7 -7
  63. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeDataCenterHighITE.rb +8 -8
  64. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeDataCenterLowITE.rb +8 -8
  65. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +11 -11
  66. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +7 -7
  67. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOfficeDetailed.rb +9 -9
  68. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +8 -8
  69. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOfficeDetailed.rb +11 -11
  70. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MidriseApartment.rb +9 -9
  71. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +19 -19
  72. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +10 -10
  73. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.QuickServiceRestaurant.rb +13 -13
  74. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStandalone.rb +6 -6
  75. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStripmall.rb +6 -6
  76. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +9 -9
  77. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallDataCenterHighITE.rb +8 -8
  78. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallDataCenterLowITE.rb +8 -8
  79. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb +8 -8
  80. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOffice.rb +8 -8
  81. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +11 -11
  82. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +10 -10
  83. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperTallBuilding.rb +19 -19
  84. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.TallBuilding.rb +18 -18
  85. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Warehouse.rb +6 -6
  86. data/lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb +957 -957
  87. data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +1 -1
  88. data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirTerminalSingleDuctVAVReheat.rb +1 -1
  89. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +84 -16
  90. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +1 -1
  91. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingGas.rb +1 -1
  92. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +61 -10
  93. data/lib/openstudio-standards/prototypes/common/objects/Prototype.ControllerWaterCoil.rb +1 -1
  94. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoolingTower.rb +1 -1
  95. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +1 -1
  96. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +1 -1
  97. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +1 -1
  98. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +1 -1
  99. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +1 -1
  100. data/lib/openstudio-standards/prototypes/common/objects/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +2 -2
  101. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.exterior_lights.rb +4 -4
  102. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +4 -4
  103. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +43 -30
  104. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.swh.rb +1 -1
  105. data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +18 -11
  106. data/lib/openstudio-standards/prototypes/common/objects/Prototype.SizingSystem.rb +1 -1
  107. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +774 -117
  108. data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +340 -481
  109. data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +3 -3
  110. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +3 -3
  111. data/lib/openstudio-standards/prototypes/common/prototype_metaprogramming.rb +22 -22
  112. data/lib/openstudio-standards/prototypes/deer/deer.Model.rb +1 -1
  113. data/lib/openstudio-standards/qaqc/calibration.rb +131 -0
  114. data/lib/openstudio-standards/qaqc/create_results.rb +983 -0
  115. data/lib/openstudio-standards/qaqc/envelope.rb +399 -0
  116. data/lib/openstudio-standards/qaqc/eui.rb +213 -0
  117. data/lib/openstudio-standards/qaqc/hvac.rb +1943 -0
  118. data/lib/openstudio-standards/qaqc/internal_loads.rb +568 -0
  119. data/lib/openstudio-standards/qaqc/reporting.rb +141 -0
  120. data/lib/openstudio-standards/qaqc/schedules.rb +129 -0
  121. data/lib/openstudio-standards/qaqc/service_water_heating.rb +273 -0
  122. data/lib/openstudio-standards/qaqc/weather_files.rb +497 -0
  123. data/lib/openstudio-standards/qaqc/zone_conditions.rb +278 -0
  124. data/lib/openstudio-standards/schedules/create.rb +364 -0
  125. data/lib/openstudio-standards/schedules/information.rb +169 -0
  126. data/lib/openstudio-standards/schedules/modify.rb +445 -0
  127. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +110 -71
  128. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +3 -3
  129. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +4 -4
  130. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +2 -1
  131. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +16 -10
  132. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +4 -4
  133. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +1 -1
  134. data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +1 -1
  135. data/lib/openstudio-standards/standards/Standards.CoilDX.rb +4 -4
  136. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +1 -1
  137. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +5 -5
  138. data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +1 -1
  139. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +1 -1
  140. data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +1 -1
  141. data/lib/openstudio-standards/standards/Standards.Construction.rb +17 -18
  142. data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +6 -6
  143. data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +1 -1
  144. data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +1 -1
  145. data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +1 -1
  146. data/lib/openstudio-standards/standards/Standards.Fan.rb +6 -12
  147. data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +2 -2
  148. data/lib/openstudio-standards/standards/Standards.FluidCooler.rb +1 -1
  149. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +1 -1
  150. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +3 -3
  151. data/lib/openstudio-standards/standards/Standards.Model.rb +411 -261
  152. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +2 -2
  153. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +94 -29
  154. data/lib/openstudio-standards/standards/Standards.Pump.rb +2 -2
  155. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +2 -2
  156. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +14 -14
  157. data/lib/openstudio-standards/standards/Standards.Space.rb +37 -30
  158. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +38 -29
  159. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +7 -7
  160. data/lib/openstudio-standards/standards/Standards.Surface.rb +13 -13
  161. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +109 -66
  162. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +11 -4
  163. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +6 -6
  164. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.AirLoopHVAC.rb +1 -1
  165. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PlantLoop.rb +1 -1
  166. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.Space.rb +1 -1
  167. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.Space.rb +1 -1
  168. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirLoopHVAC.rb +4 -4
  169. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
  170. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Space.rb +4 -4
  171. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb +4 -4
  172. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
  173. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTowerVariableSpeed.rb +1 -1
  174. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb +5 -21
  175. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space.rb +4 -4
  176. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.WaterHeaterMixed.rb +1 -1
  177. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.ZoneHVACComponent.rb +1 -1
  178. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirLoopHVAC.rb +36 -4
  179. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
  180. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerVariableSpeed.rb +1 -1
  181. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Space.rb +4 -4
  182. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ZoneHVACComponent.rb +1 -1
  183. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/comstock_ashrae_90_1_2016.AirLoopHVAC.rb +26 -0
  184. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +53 -10
  185. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
  186. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerVariableSpeed.rb +1 -1
  187. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Space.rb +6 -6
  188. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ZoneHVACComponent.rb +2 -2
  189. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/comstock_ashrae_90_1_2019.AirLoopHVAC.rb +26 -0
  190. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.curves.json +211 -211
  191. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.economizers.json +14 -14
  192. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirLoopHVAC.rb +4 -4
  193. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.Model.rb +1 -1
  194. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.PlantLoop.rb +1 -1
  195. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.economizers.json +14 -14
  196. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirLoopHVAC.rb +4 -4
  197. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.Model.rb +1 -1
  198. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.PlantLoop.rb +1 -1
  199. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirLoopHVAC.rb +6 -6
  200. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
  201. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.CoolingTowerVariableSpeed.rb +1 -1
  202. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +1 -1
  203. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.Space.rb +4 -4
  204. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirLoopHVAC.rb +6 -6
  205. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
  206. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.CoolingTowerVariableSpeed.rb +1 -1
  207. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +1 -1
  208. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.Space.rb +4 -4
  209. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +22 -28
  210. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctParallelPIUReheat.rb +1 -1
  211. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctVAVReheat.rb +2 -2
  212. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.BoilerHotWater.rb +1 -74
  213. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +7 -59
  214. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +1 -1
  215. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +1 -1
  216. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +1 -1
  217. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +1 -1
  218. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +1 -21
  219. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.DesignSpecificationOutdoorAir.rb +101 -0
  220. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +1 -1
  221. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +1 -1
  222. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanVariableVolume.rb +1 -1
  223. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.HeatExchangerSensLat.rb +1 -1
  224. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +643 -526
  225. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlanarSurface.rb +8 -2
  226. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +17 -77
  227. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Space.rb +74 -16
  228. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +96 -44
  229. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Surface.rb +6 -6
  230. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ThermalZone.rb +18 -6
  231. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ZoneHVACComponent.rb +1 -1
  232. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +328 -74
  233. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +0 -118
  234. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.rb +2 -1
  235. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_rejection.json +1 -1
  236. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/baseline_outdoor_air.md +35 -0
  237. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_plug_load_measures.md +1 -1
  238. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/ashrae_90_1_prm.UserData.rb +228 -0
  239. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_enums.rb +131 -0
  240. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_space.csv +1 -1
  241. data/lib/openstudio-standards/standards/cbes/cbes.AirLoopHVAC.rb +5 -5
  242. data/lib/openstudio-standards/standards/cbes/cbes.Model.rb +1 -1
  243. data/lib/openstudio-standards/standards/cbes/cbes.PlantLoop.rb +1 -1
  244. data/lib/openstudio-standards/standards/cbes/cbes.Space.rb +1 -1
  245. data/lib/openstudio-standards/standards/cbes/cbes_t24_2005/cbes_t24_2005.Space.rb +1 -1
  246. data/lib/openstudio-standards/standards/cbes/cbes_t24_2008/cbes_t24_2008.Space.rb +1 -1
  247. data/lib/openstudio-standards/standards/deer/deer.AirLoopHVAC.rb +109 -27
  248. data/lib/openstudio-standards/standards/deer/deer.Space.rb +1 -1
  249. data/lib/openstudio-standards/standards/deer/deer_1985/data/deer_1985.economizers.json +246 -4
  250. data/lib/openstudio-standards/standards/deer/deer_1996/data/deer_1996.economizers.json +246 -4
  251. data/lib/openstudio-standards/standards/deer/deer_2003/data/deer_2003.economizers.json +246 -4
  252. data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.ThermalZone.rb +18 -18
  253. data/lib/openstudio-standards/standards/deer/deer_2007/data/deer_2007.economizers.json +246 -4
  254. data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.ThermalZone.rb +18 -18
  255. data/lib/openstudio-standards/standards/deer/deer_2011/data/deer_2011.economizers.json +246 -4
  256. data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.ThermalZone.rb +18 -18
  257. data/lib/openstudio-standards/standards/deer/deer_2014/data/deer_2014.economizers.json +248 -6
  258. data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.Space.rb +3 -3
  259. data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.ThermalZone.rb +18 -18
  260. data/lib/openstudio-standards/standards/deer/deer_2015/data/deer_2015.economizers.json +248 -6
  261. data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.Space.rb +3 -3
  262. data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.ThermalZone.rb +18 -18
  263. data/lib/openstudio-standards/standards/deer/deer_2017/data/deer_2017.economizers.json +248 -6
  264. data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.Space.rb +3 -3
  265. data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.ThermalZone.rb +18 -18
  266. data/lib/openstudio-standards/standards/deer/deer_2020/data/deer_2020.economizers.json +248 -6
  267. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +18 -5
  268. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.FanVariableVolume.rb +1 -1
  269. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.Space.rb +3 -3
  270. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.ThermalZone.rb +18 -18
  271. data/lib/openstudio-standards/standards/deer/deer_2025/data/deer_2025.economizers.json +248 -6
  272. data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.AirLoopHVAC.rb +3 -3
  273. data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.FanVariableVolume.rb +1 -1
  274. data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.Space.rb +3 -3
  275. data/lib/openstudio-standards/standards/deer/deer_2030/data/deer_2030.economizers.json +248 -6
  276. data/lib/openstudio-standards/standards/deer/deer_2030/data/deer_2030.heat_pumps.json +2 -2
  277. data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.AirLoopHVAC.rb +3 -3
  278. data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.FanVariableVolume.rb +1 -1
  279. data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.Space.rb +3 -3
  280. data/lib/openstudio-standards/standards/deer/deer_2035/data/deer_2035.economizers.json +248 -6
  281. data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.AirLoopHVAC.rb +3 -3
  282. data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.FanVariableVolume.rb +1 -1
  283. data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.Space.rb +3 -3
  284. data/lib/openstudio-standards/standards/deer/deer_2040/data/deer_2040.economizers.json +248 -6
  285. data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.AirLoopHVAC.rb +3 -3
  286. data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.FanVariableVolume.rb +1 -1
  287. data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.Space.rb +3 -3
  288. data/lib/openstudio-standards/standards/deer/deer_2045/data/deer_2045.economizers.json +260 -0
  289. data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.AirLoopHVAC.rb +3 -3
  290. data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.FanVariableVolume.rb +1 -1
  291. data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.Space.rb +3 -3
  292. data/lib/openstudio-standards/standards/deer/deer_2050/data/deer_2050.economizers.json +248 -6
  293. data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.AirLoopHVAC.rb +3 -3
  294. data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.FanVariableVolume.rb +1 -1
  295. data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.Space.rb +3 -3
  296. data/lib/openstudio-standards/standards/deer/deer_2055/data/deer_2055.economizers.json +248 -6
  297. data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.AirLoopHVAC.rb +3 -3
  298. data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.FanVariableVolume.rb +1 -1
  299. data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.Space.rb +3 -3
  300. data/lib/openstudio-standards/standards/deer/deer_2060/data/deer_2060.economizers.json +248 -6
  301. data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.AirLoopHVAC.rb +3 -3
  302. data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.FanVariableVolume.rb +1 -1
  303. data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.Space.rb +3 -3
  304. data/lib/openstudio-standards/standards/deer/deer_2065/data/deer_2065.economizers.json +248 -6
  305. data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.AirLoopHVAC.rb +3 -3
  306. data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.FanVariableVolume.rb +1 -1
  307. data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.Space.rb +3 -3
  308. data/lib/openstudio-standards/standards/deer/deer_2070/data/deer_2070.economizers.json +248 -6
  309. data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.AirLoopHVAC.rb +3 -3
  310. data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.FanVariableVolume.rb +1 -1
  311. data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.Space.rb +3 -3
  312. data/lib/openstudio-standards/standards/deer/deer_2075/data/deer_2075.economizers.json +248 -6
  313. data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.AirLoopHVAC.rb +3 -3
  314. data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.FanVariableVolume.rb +1 -1
  315. data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.Space.rb +3 -3
  316. data/lib/openstudio-standards/standards/deer/deer_pre_1975/data/deer_pre_1975.economizers.json +246 -4
  317. data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/data/space_types.json +447 -223
  318. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +1 -1
  319. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/space_types.json +447 -223
  320. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +5 -2
  321. data/lib/openstudio-standards/standards/necb/ECMS/data/chiller_types.json +25 -0
  322. data/lib/openstudio-standards/standards/necb/ECMS/data/chillers.json +44 -0
  323. data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +225 -0
  324. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +2 -2
  325. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +193 -73
  326. data/lib/openstudio-standards/standards/necb/ECMS/pv_ground.rb +1 -1
  327. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +10 -4
  328. data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +7 -7
  329. data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +4 -5
  330. data/lib/openstudio-standards/standards/necb/NECB2011/data/chiller_types.json +32 -0
  331. data/lib/openstudio-standards/standards/necb/NECB2011/data/chillers.json +1 -1
  332. data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +36 -0
  333. data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +7 -7
  334. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernEducation.osm +47587 -0
  335. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernHealthCare.osm +49764 -0
  336. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Warehouse.osm +283 -297
  337. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_type_unit_definitions.txt +2 -1
  338. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +447 -223
  339. data/lib/openstudio-standards/standards/necb/NECB2011/data/standards_data.rb +3 -3
  340. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +1 -1
  341. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +49 -27
  342. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +400 -202
  343. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +4 -4
  344. data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +637 -318
  345. data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +18 -1
  346. data/lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb +3 -3
  347. data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +637 -318
  348. data/lib/openstudio-standards/standards/necb/NECB2017/hvac_systems.rb +1 -1
  349. data/lib/openstudio-standards/standards/necb/NECB2017/necb_2017.rb +3 -3
  350. data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +1 -1
  351. data/lib/openstudio-standards/standards/necb/NECB2020/data/space_types.json +615 -307
  352. data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +4 -4
  353. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +10 -5
  354. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +1 -1
  355. data/lib/openstudio-standards/utilities/assertion.rb +128 -0
  356. data/lib/openstudio-standards/utilities/logging.rb +2 -3
  357. data/lib/openstudio-standards/utilities/object_info.rb +39 -18
  358. data/lib/openstudio-standards/utilities/schedule_translator.rb +8 -6
  359. data/lib/openstudio-standards/utilities/simulation.rb +24 -11
  360. data/lib/openstudio-standards/utilities/sqlfile.rb +10 -5
  361. data/lib/openstudio-standards/version.rb +1 -1
  362. data/lib/openstudio-standards/weather/Weather.Model.rb +8 -9
  363. data/lib/openstudio-standards/weather/Weather.stat_file.rb +3 -3
  364. data/lib/openstudio-standards/weather/information.rb +35 -0
  365. data/lib/openstudio-standards.rb +69 -5
  366. metadata +52 -16
  367. data/data/standards/OpenStudio_Standards-deer-ALL-comstock(space_types).xlsx +0 -0
  368. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb +0 -59
  369. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb +0 -13
  370. data/lib/openstudio-standards/hvac_sizing/Siz.HVACComponent.rb +0 -36
  371. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +0 -898
  372. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +0 -126
  373. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +0 -356
  374. data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.Model.rb +0 -35
  375. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTower.rb +0 -110
  376. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTowerVariableSpeed.rb +0 -5
@@ -13,6 +13,9 @@ class ASHRAE901PRM < Standard
13
13
  # [template, climate_zone, intended_surface_type, standards_construction_type, occ_type]
14
14
  # and the values are the constructions. If supplied, constructions will be pulled
15
15
  # from this hash if already created to avoid creating duplicate constructions.
16
+ # @param wwr_building_type [String | Nil] building type that identifies the prescribed window to wall ratio
17
+ # @param wwr_info [Hash] A map that maps the building area type to window to wall ratio
18
+ # @param surface_category [String] surface category e.g., 'ExteriorSubSurface'
16
19
  # @return [Hash] returns a hash where the key is an array of inputs
17
20
  # [template, climate_zone, intended_surface_type, standards_construction_type, occ_type]
18
21
  # and the value is the newly created construction.
@@ -54,8 +57,11 @@ class ASHRAE901PRM < Standard
54
57
  cons_set = space.model.building.get.defaultConstructionSet.get
55
58
  construction = get_default_surface_cons_from_surface_type(surface_category, surface_type, cons_set)
56
59
  end
57
-
58
- return previous_construction_map if construction.nil?
60
+ OpenStudio.logFree(OpenStudio::Error, 'prm.log',
61
+ "Surface #{planar_surface.name.get} does not have a construction. Failed to find defaultConstructionSet for #{planar_surface.name.get}. Add a construction for the surface or add a defaultConstructionSet to Space #{space.name.get} or SpaceType #{space_type.name.get}.")
62
+ prm_raise(construction,
63
+ @sizing_run_dir,
64
+ "Failed to find defaultConstructionSet for #{planar_surface.name.get}. Check inputs.")
59
65
  end
60
66
 
61
67
  # Determine if residential or nonresidential
@@ -2,7 +2,7 @@ class ASHRAE901PRM < Standard
2
2
  # Keep only one cooling tower, but use one condenser pump per chiller
3
3
 
4
4
  # @param plant_loop [OpenStudio::Model::PlantLoop] plant loop
5
- # @return [Bool] returns true if successful, false if not
5
+ # @return [Boolean] returns true if successful, false if not
6
6
  def plant_loop_apply_prm_number_of_cooling_towers(plant_loop)
7
7
  # Skip non-cooling plants
8
8
  return true unless plant_loop.sizingPlant.loopType == 'Condenser'
@@ -90,70 +90,12 @@ class ASHRAE901PRM < Standard
90
90
  end
91
91
  end
92
92
 
93
- # Get the total cooling capacity for the plant loop
94
- #
95
- # @param plant_loop [OpenStudio::Model::PlantLoop] plant loop
96
- # @param [String] sizing_run_dir
97
- # @return [Double] total cooling capacity in watts
98
- def plant_loop_total_cooling_capacity(plant_loop, sizing_run_dir = Dir.pwd)
99
- # Sum the cooling capacity for all cooling components
100
- # on the plant loop.
101
- total_cooling_capacity_w = 0
102
- sizing_run_ran = false
103
-
104
- plant_loop.supplyComponents.each do |sc|
105
- # ChillerElectricEIR
106
- if sc.to_ChillerElectricEIR.is_initialized
107
- chiller = sc.to_ChillerElectricEIR.get
108
-
109
- # If chiller is autosized, check sizing run results. If sizing run not ran, run it first
110
- if chiller.isReferenceCapacityAutosized
111
- model = chiller.model
112
- sizing_run_ran = model_run_sizing_run(model, "#{sizing_run_dir}/SR_cooling_plant") if !sizing_run_ran
113
-
114
- if sizing_run_ran
115
- if model.version <= OpenStudio::VersionString.new('3.2.1')
116
- sizing_run_capacity = model.getAutosizedValueFromEquipmentSummary(chiller, 'Central Plant', 'Nominal Capacity', 'W').get
117
- else
118
- sizing_run_capacity = model.getAutosizedValueFromEquipmentSummary(chiller, 'Central Plant', 'Rated Capacity', 'W').get
119
- end
120
- chiller.setReferenceCapacity(sizing_run_capacity)
121
- total_cooling_capacity_w += sizing_run_capacity
122
- else
123
- OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "For #{plant_loop.name} capacity of #{chiller.name} is not available due to a sizing run failure, total cooling capacity of plant loop will be incorrect when applying standard.")
124
- end
125
-
126
- elsif chiller.referenceCapacity.is_initialized
127
- total_cooling_capacity_w += chiller.referenceCapacity.get
128
- elsif chiller.autosizedReferenceCapacity.is_initialized
129
- total_cooling_capacity_w += chiller.autosizedReferenceCapacity.get
130
- else
131
- OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "For #{plant_loop.name} capacity of #{chiller.name} is not available, total cooling capacity of plant loop will be incorrect when applying standard.")
132
- end
133
- # DistrictCooling
134
- elsif sc.to_DistrictCooling.is_initialized
135
- dist_clg = sc.to_DistrictCooling.get
136
- if dist_clg.nominalCapacity.is_initialized
137
- total_cooling_capacity_w += dist_clg.nominalCapacity.get
138
- elsif dist_clg.autosizedNominalCapacity.is_initialized
139
- total_cooling_capacity_w += dist_clg.autosizedNominalCapacity.get
140
- else
141
- OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "For #{plant_loop.name} capacity of DistrictCooling #{dist_clg.name} is not available, total heating capacity of plant loop will be incorrect when applying standard.")
142
- end
143
- end
144
- end
145
-
146
- total_cooling_capacity_tons = OpenStudio.convert(total_cooling_capacity_w, 'W', 'ton').get
147
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.PlantLoop', "For #{plant_loop.name}, cooling capacity is #{total_cooling_capacity_tons.round} tons of refrigeration.")
148
-
149
- return total_cooling_capacity_w
150
- end
151
-
152
93
  # Splits the single chiller used for the initial sizing run
153
94
  # into multiple separate chillers based on Appendix G.
154
95
  #
155
- # @param plant_loop_args [Array] chilled water loop (OpenStudio::Model::PlantLoop), sizing run directory
156
- # @return [Bool] returns true if successful, false if not
96
+ # @param plant_loop [OpenStudio::Model::PlantLoop] chilled water loop
97
+ # @param sizing_run_dir [String] sizing run directory
98
+ # @return [Boolean] returns true if successful, false if not
157
99
  def plant_loop_apply_prm_number_of_chillers(plant_loop, sizing_run_dir = nil)
158
100
  # Skip non-cooling plants & secondary cooling loop
159
101
  return true unless plant_loop.sizingPlant.loopType == 'Cooling'
@@ -173,7 +115,7 @@ class ASHRAE901PRM < Standard
173
115
  end
174
116
 
175
117
  # Determine the capacity of the loop
176
- cap_w = plant_loop_total_cooling_capacity(plant_loop, sizing_run_dir)
118
+ cap_w = plant_loop_total_cooling_capacity(plant_loop)
177
119
  cap_tons = OpenStudio.convert(cap_w, 'W', 'ton').get
178
120
  if cap_tons <= 300
179
121
  num_chillers = 1
@@ -309,7 +251,7 @@ class ASHRAE901PRM < Standard
309
251
  # you could set at 0.9 and just calculate the pressure rise to have your 19 W/GPM or whatever
310
252
  #
311
253
  # @param plant_loop [OpenStudio::Model::PlantLoop] plant loop
312
- # @return [Bool] returns true if successful, false if not
254
+ # @return [Boolean] returns true if successful, false if not
313
255
  def plant_loop_apply_prm_baseline_pump_power(plant_loop)
314
256
  hot_water_pump_power = 19 # W/gpm
315
257
  hot_water_district_pump_power = 14 # W/gpm
@@ -330,7 +272,7 @@ class ASHRAE901PRM < Standard
330
272
 
331
273
  has_district_heating = false
332
274
  plant_loop.supplyComponents.each do |sc|
333
- if sc.to_DistrictHeating.is_initialized
275
+ if sc.iddObjectType.valueName.to_s.include?('DistrictHeating')
334
276
  has_district_heating = true
335
277
  end
336
278
  end
@@ -394,9 +336,8 @@ class ASHRAE901PRM < Standard
394
336
  # @param chilled_water_loop [OpenStudio::Model::PlantLoop] chilled water loop
395
337
  # @param dsgn_sup_wtr_temp [Double] design chilled water supply T
396
338
  # @param dsgn_sup_wtr_temp_delt [Double] design chilled water supply delta T
397
- # @return [Bool] returns true if successful, false if not
339
+ # @return [Boolean] returns true if successful, false if not
398
340
  def chw_sizing_control(model, chilled_water_loop, dsgn_sup_wtr_temp, dsgn_sup_wtr_temp_delt)
399
-
400
341
  design_chilled_water_temperature = 44 # Loop design chilled water temperature (F)
401
342
  design_chilled_water_temperature_delta = 10.1 # Loop design chilled water temperature (deltaF)
402
343
  chw_outdoor_temperature_high = 80 # Chilled water temperature reset at high outdoor air temperature (F)
@@ -406,7 +347,7 @@ class ASHRAE901PRM < Standard
406
347
  chiller_chw_low_temp_limit = 36 # Chiller leaving chilled water lower temperature limit (F)
407
348
  chiller_chw_cond_temp = 95 # Chiller entering condenser fluid temperature (F)
408
349
  primary_pump_power = 9 # primary pump power (W/gpm)
409
-
350
+
410
351
  if dsgn_sup_wtr_temp.nil?
411
352
  dsgn_sup_wtr_temp_c = OpenStudio.convert(design_chilled_water_temperature, 'F', 'C').get
412
353
  else
@@ -425,17 +366,17 @@ class ASHRAE901PRM < Standard
425
366
  sizing_plant.setDesignLoopExitTemperature(dsgn_sup_wtr_temp_c)
426
367
  sizing_plant.setLoopDesignTemperatureDifference(dsgn_sup_wtr_temp_delt_k)
427
368
  # Use OA reset setpoint manager
428
- outdoor_low_temperature_C = OpenStudio.convert(chw_outdoor_temperature_low, 'F', 'C').get.round(1)
429
- outdoor_high_temperature_C = OpenStudio.convert(chw_outdoor_temperature_high, 'F', 'C').get.round(1)
430
- setpoint_temperature_outdoor_high_C = OpenStudio.convert(chw_outdoor_high_setpoint, 'F', 'C').get.round(1)
431
- setpoint_temperature_outdoor_low_C = OpenStudio.convert(chw_outdoor_low_setpoint, 'F', 'C').get.round(1)
369
+ outdoor_low_temperature_c = OpenStudio.convert(chw_outdoor_temperature_low, 'F', 'C').get.round(1)
370
+ outdoor_high_temperature_c = OpenStudio.convert(chw_outdoor_temperature_high, 'F', 'C').get.round(1)
371
+ setpoint_temperature_outdoor_high_c = OpenStudio.convert(chw_outdoor_high_setpoint, 'F', 'C').get.round(1)
372
+ setpoint_temperature_outdoor_low_c = OpenStudio.convert(chw_outdoor_low_setpoint, 'F', 'C').get.round(1)
432
373
 
433
374
  chw_stpt_manager = OpenStudio::Model::SetpointManagerOutdoorAirReset.new(model)
434
375
  chw_stpt_manager.setName("#{chilled_water_loop.name} Setpoint Manager")
435
- chw_stpt_manager.setOutdoorHighTemperature(outdoor_high_temperature_C) # Degrees Celsius
436
- chw_stpt_manager.setSetpointatOutdoorHighTemperature(setpoint_temperature_outdoor_high_C) # Degrees Celsius
437
- chw_stpt_manager.setOutdoorLowTemperature(outdoor_low_temperature_C) # Degrees Celsius
438
- chw_stpt_manager.setSetpointatOutdoorLowTemperature(setpoint_temperature_outdoor_low_C) # Degrees Celsius
376
+ chw_stpt_manager.setOutdoorHighTemperature(outdoor_high_temperature_c) # Degrees Celsius
377
+ chw_stpt_manager.setSetpointatOutdoorHighTemperature(setpoint_temperature_outdoor_high_c) # Degrees Celsius
378
+ chw_stpt_manager.setOutdoorLowTemperature(outdoor_low_temperature_c) # Degrees Celsius
379
+ chw_stpt_manager.setSetpointatOutdoorLowTemperature(setpoint_temperature_outdoor_low_c) # Degrees Celsius
439
380
  chw_stpt_manager.addToNode(chilled_water_loop.supplyOutletNode)
440
381
 
441
382
  return true
@@ -450,5 +391,4 @@ class ASHRAE901PRM < Standard
450
391
  pri_sec_config = 'heat_exchanger'
451
392
  return pri_sec_config
452
393
  end
453
-
454
394
  end
@@ -1,41 +1,45 @@
1
1
  class ASHRAE901PRM < Standard
2
2
  # @!group Space
3
3
 
4
- # Set the infiltration rate for this space to include
5
- # the impact of air leakage requirements in the standard.
4
+ # Set the infiltration rate for this space to include the impact of air leakage requirements in the standard.
6
5
  #
7
- # @return [Double] true if successful, false if not
6
+ # @param space [OpenStudio::Model::Space] space object
7
+ # @param tot_infil_m3_per_s [Float] total infiltration in m3/s
8
+ # @param infil_method [String] infiltration method
9
+ # @param infil_coefficients [Array] Array of 4 items
10
+ # [Constant Term Coefficient, Temperature Term Coefficient,
11
+ # Velocity Term Coefficient, Velocity Squared Term Coefficient]
12
+ # @return [Boolean] returns true if successful, false if not
8
13
  def space_apply_infiltration_rate(space, tot_infil_m3_per_s, infil_method, infil_coefficients)
9
- # get the climate zone
10
- climate_zone = model_standards_climate_zone(space.model)
11
-
12
14
  # Calculate infiltration rate
13
15
  case infil_method.to_s
14
16
  when 'Flow/ExteriorWallArea'
15
17
  # Spread the total infiltration rate
16
18
  total_exterior_wall_area = 0
17
- space.model.getSpaces.sort.each do |spc|
19
+ space.model.getSpaces.each do |spc|
18
20
  # Get the space conditioning type
19
21
  space_cond_type = space_conditioning_category(spc)
20
- total_exterior_wall_area += spc.exteriorWallArea unless space_cond_type == 'Unconditioned'
22
+ total_exterior_wall_area += spc.exteriorWallArea * spc.multiplier unless space_cond_type == 'Unconditioned'
21
23
  end
24
+ prm_raise(total_exterior_wall_area > 0, @sizing_run_dir, 'Total exterior wall area in the model is 0. Check your model inputs')
22
25
  adj_infil_flow_ext_wall_area = tot_infil_m3_per_s / total_exterior_wall_area
23
- OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.Space', "For #{space.name}, adj infil = #{adj_infil_flow_ext_wall_area.round(8)} m^3/s*m^2 of above grade wall area.")
26
+ OpenStudio.logFree(OpenStudio::Debug, 'prm.log', "For #{space.name}, adj infil = #{adj_infil_flow_ext_wall_area.round(8)} m^3/s*m^2 of above grade wall area.")
24
27
  when 'Flow/Area'
25
28
  # Spread the total infiltration rate
26
29
  total_floor_area = 0
27
- space.model.getSpaces.sort.each do |spc|
30
+ space.model.getSpaces.each do |spc|
28
31
  # Get the space conditioning type
29
32
  space_cond_type = space_conditioning_category(spc)
30
- total_floor_area += spc.floorArea unless space_cond_type == 'Unconditioned' || space.exteriorArea == 0
33
+ total_floor_area += spc.floorArea * spc.multipler unless space_cond_type == 'Unconditioned' || space.exteriorArea == 0
31
34
  end
35
+ prm_raise(total_floor_area > 0, @sizing_run_dir, 'Sum of the floor area in exterior spaces in the model is 0. Check your model inputs')
32
36
  adj_infil_flow_area = tot_infil_m3_per_s / total_floor_area
33
- OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.Space', "For #{space.name}, adj infil = #{adj_infil_flow_area.round(8)} m^3/s*m^2 of space floor area.")
37
+ OpenStudio.logFree(OpenStudio::Debug, 'prm.log', "For #{space.name}, adj infil = #{adj_infil_flow_area.round(8)} m^3/s*m^2 of space floor area.")
34
38
  end
35
39
 
36
40
  # Get any infiltration schedule already assigned to this space or its space type
37
41
  # If not, the always on schedule will be applied.
38
- # TODO-PRM: Infiltration schedules should be based on HVAC operation
42
+ # @todo Infiltration schedules should be based on HVAC operation
39
43
  infil_sch = nil
40
44
  unless space.spaceInfiltrationDesignFlowRates.empty?
41
45
  old_infil = space.spaceInfiltrationDesignFlowRates[0]
@@ -96,11 +100,65 @@ class ASHRAE901PRM < Standard
96
100
 
97
101
  # For stable baseline, remove all daylighting controls (sidelighting and toplighting)
98
102
  # @param space [OpenStudio::Model::Space] the space with daylighting
99
- # @param remove_existing_controls [Bool] if true, will remove existing controls then add new ones
100
- # @param draw_daylight_areas_for_debugging [Bool] If this argument is set to true,
101
- # @return [boolean] true if successful
103
+ # @param remove_existing [Boolean] if true, will remove existing controls then add new ones
104
+ # @param draw_areas_for_debug [Boolean] If this argument is set to true,
105
+ # @return [Boolean] returns true if successful, false if not
102
106
  def space_set_baseline_daylighting_controls(space, remove_existing = false, draw_areas_for_debug = false)
103
107
  removed = space_remove_daylighting_controls(space)
104
108
  return removed
105
109
  end
110
+
111
+ # Create and assign PRM computer room electric equipment schedule
112
+ #
113
+ # @param space [OpenStudio::Model::Space] OpenStudio Space object
114
+ # @return [Boolean] returns true if successful, false if not
115
+ def space_add_prm_computer_room_equipment_schedule(space)
116
+ # Get proposed or baseline model
117
+ model = space.model
118
+
119
+ # Get space type associated with the space
120
+ standard_space_type = prm_get_optional_handler(space, @sizing_run_dir, 'spaceType', 'standardsSpaceType').delete(' ').downcase
121
+
122
+ # Check if the PRM computer room schedule is already in the model
123
+ schedule_name = 'ASHRAE 90.1 Appendix G - Computer Room Equipment Schedule'
124
+ schedule_found = model.getScheduleRulesetByName(schedule_name)
125
+
126
+ # Create and assign the the electric equipment schedule
127
+ if standard_space_type == 'computerroom'
128
+ space.spaceType.get.electricEquipment.each do |elec_equipment|
129
+ # Only create the schedule if it could not be found
130
+ if !schedule_found.is_initialized
131
+ computer_room_equipment_schedule_ruleset = OpenStudio::Model::ScheduleRuleset.new(model)
132
+ computer_room_equipment_schedule_ruleset.setName(schedule_name)
133
+ schedule_fractions = [0.25, 0.5, 0.75, 1.0, 0.25, 0.5, 0.75, 1.0, 0.25, 0.5, 0.75, 1.0]
134
+ # Weekdays and weekends schedules
135
+ schedule_fractions.each_with_index do |frac, i|
136
+ sch_rule = OpenStudio::Model::ScheduleRule.new(computer_room_equipment_schedule_ruleset)
137
+ sch_rule.setStartDate(OpenStudio::Date.new(OpenStudio::MonthOfYear.new(i.to_i + 1), 1))
138
+ # No leap year according to PRM-RM
139
+ sch_rule.setEndDate(OpenStudio::Date.new(OpenStudio::MonthOfYear.new(i.to_i + 1), Date.new(2006, i.to_i + 1, -1).day))
140
+ day_sch = sch_rule.daySchedule
141
+ day_sch.setName("#{schedule_name} - Month #{i + 1} - Fraction #{frac}")
142
+ model_add_vals_to_sch(model, day_sch, 'Constant', [frac])
143
+ sch_rule.setApplyAllDays(true)
144
+ end
145
+ # Special days schedules
146
+ equipment_on = OpenStudio::Model::ScheduleDay.new(model)
147
+ model_add_vals_to_sch(model, equipment_on, 'Constant', [1])
148
+ equipment_off = OpenStudio::Model::ScheduleDay.new(model)
149
+ model_add_vals_to_sch(model, equipment_off, 'Constant', [0])
150
+ computer_room_equipment_schedule_ruleset.setHolidaySchedule(equipment_on)
151
+ computer_room_equipment_schedule_ruleset.setCustomDay1Schedule(equipment_on)
152
+ computer_room_equipment_schedule_ruleset.setCustomDay2Schedule(equipment_on)
153
+ computer_room_equipment_schedule_ruleset.setSummerDesignDaySchedule(equipment_on)
154
+ computer_room_equipment_schedule_ruleset.setWinterDesignDaySchedule(equipment_off)
155
+ else
156
+ computer_room_equipment_schedule_ruleset = model.getScheduleRulesetByName(schedule_name).get
157
+ end
158
+ elec_equipment.setSchedule(computer_room_equipment_schedule_ruleset)
159
+ end
160
+ end
161
+
162
+ return true
163
+ end
106
164
  end
@@ -1,4 +1,4 @@
1
- class ASHRAE901PRM2019 < ASHRAE901PRM
1
+ class ASHRAE901PRM < Standard
2
2
  # @!group SpaceType
3
3
 
4
4
  # Sets the selected internal loads to standards-based or typical values.
@@ -9,16 +9,16 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
9
9
  # loads directly assigned to spaces. This method skips plenums.
10
10
  #
11
11
  # @param space_type [OpenStudio::Model::SpaceType] space type object
12
- # @param set_people [Bool] if true, set the people density.
12
+ # @param set_people [Boolean] if true, set the people density.
13
13
  # Also, assign reasonable clothing, air velocity, and work efficiency inputs
14
14
  # to allow reasonable thermal comfort metrics to be calculated.
15
- # @param set_lights [Bool] if true, set the lighting density, lighting fraction
15
+ # @param set_lights [Boolean] if true, set the lighting density, lighting fraction
16
16
  # to return air, fraction radiant, and fraction visible.
17
- # @param set_electric_equipment [Bool] if true, set the electric equipment density
18
- # @param set_gas_equipment [Bool] if true, set the gas equipment density
19
- # @param set_ventilation [Bool] if true, set the ventilation rates (per-person and per-area)
20
- # @param set_infiltration [Bool] if true, set the infiltration rates
21
- # @return [Bool] returns true if successful, false if not
17
+ # @param set_electric_equipment [Boolean] if true, set the electric equipment density
18
+ # @param set_gas_equipment [Boolean] if true, set the gas equipment density
19
+ # @param set_ventilation [Boolean] if true, set the ventilation rates (per-person and per-area)
20
+ # @param set_infiltration [Boolean] if true, set the infiltration rates
21
+ # @return [Boolean] returns true if successful, false if not
22
22
  def space_type_apply_internal_loads(space_type, set_people, set_lights, set_electric_equipment, set_gas_equipment, set_ventilation, set_infiltration)
23
23
  # Skip plenums
24
24
  # Check if the space type name
@@ -154,10 +154,12 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
154
154
  # @param power_schedule_hash [Hash] equipment operation schedule hash
155
155
  # @param space_type [OpenStudio::Model:SpaceType] space type
156
156
  # @param user_space_data [Hash] user space data
157
+ # @return [Boolean] returns true if successful, false if not
157
158
  def calculate_electric_value_by_userdata(user_equip_data, power_equipment, power_schedule_hash, space_type, user_space_data = nil)
158
159
  # Check if the plug load represents a motor (check if motorhorsepower exist), if so, record the motor HP and efficiency.
159
160
  if !user_equip_data['motor_horsepower'].nil?
160
161
  # Pre-processing will ensure these three user data are added correctly (float, float, boolean)
162
+ # @todo move this part to user data processing.
161
163
  power_equipment.additionalProperties.setFeature('motor_horsepower', user_equip_data['motor_horsepower'].to_f)
162
164
  power_equipment.additionalProperties.setFeature('motor_efficiency', user_equip_data['motor_efficiency'].to_f)
163
165
  power_equipment.additionalProperties.setFeature('motor_is_exempt', user_equip_data['motor_is_exempt'])
@@ -168,12 +170,20 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
168
170
  else
169
171
  # The electric equipment is either an elevator or refrigeration
170
172
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ElectricEquipment', "#{power_equipment.name} is an elevator or refrigeration according to the user data provided. Skip receptacle power credit.")
173
+ return false
171
174
  end
175
+ return true
172
176
  end
173
177
 
178
+ # Apply power equipment to space type
179
+ # This is utility function for applying user data to space type
180
+ #
181
+ # @param space_type [OpenStudio::Model:SpaceType]
182
+ # @return [Boolean] returns true if successful, false if not
174
183
  def space_type_apply_power_equipment(space_type)
175
184
  # save schedules in a hash in case it is needed for new electric equipment
176
185
  power_schedule_hash = {}
186
+ # @todo move this part to user data processing
177
187
  user_electric_equipment_data = @standards_data.key?('userdata_electric_equipment') ? @standards_data['userdata_electric_equipment'] : nil
178
188
  user_gas_equipment_data = @standards_data.key?('userdata_gas_equipment') ? @standards_data['userdata_gas_equipment'] : nil
179
189
  if user_electric_equipment_data && user_electric_equipment_data.length >= 1
@@ -198,6 +208,7 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
198
208
  end
199
209
  end
200
210
  end
211
+ return true
201
212
  end
202
213
 
203
214
  # Apply space to space type power equipment adjustment.
@@ -207,7 +218,8 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
207
218
  #
208
219
  # @param user_spacetypes [Hash] spacetype user data
209
220
  # @param user_spaces [Hash] space user data
210
- # @param space_array [OpenStudio::Model:Space] list of spaces need for process
221
+ # @param space_array [Array OpenStudio::Model:Space] list of spaces need for process
222
+ # @return [Boolean] returns true if successful, false if not
211
223
  def space_to_space_type_apply_power_equipment(user_spacetypes, user_spaces, space_array)
212
224
  # Step 1: Set electric / gas equipment
213
225
  # save schedules in a hash in case it is needed for new electric equipment
@@ -265,17 +277,19 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
265
277
  end
266
278
  end
267
279
  end
280
+ return true
268
281
  end
269
282
 
270
283
  # Function update a power equipment schedule based on user data.
271
284
  # This function works with both electric equipment and gas equipment and applies the ruleset on power equipment
272
285
  # The function process user data including the fraction of controlled receptacles and receptacle power savings.
273
286
  #
274
- # @parma power_equipment [OpenStudio::Model::ElectricEquipment] or [OpenStudio::Model:GasEquipment]
287
+ # @param power_equipment [OpenStudio::Model::ElectricEquipment] or [OpenStudio::Model:GasEquipment]
275
288
  # @param user_power_equipment [Hash] user data for the power equipment
276
289
  # @param schedule_hash [Hash] power equipment operation schedules in a hash
277
290
  # @param space_type [OpenStudio::Model:SpaceType] space type
278
291
  # @param user_data [Hash] user space data
292
+ # @return [Boolean] returns true it adjusted, false if not
279
293
  def update_power_equipment_credits(power_equipment, user_power_equipment, schedule_hash, space_type, user_data = nil)
280
294
  exception_list = ['office - enclosed <= 250 sf', 'conference/meeting/multipurpose', 'copy/print',
281
295
  'lounge/breakroom - all other', 'lounge/breakroom - healthcare facility', 'classroom/lecture/training - all other',
@@ -319,28 +333,36 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
319
333
  end
320
334
  end
321
335
 
336
+ # return false if no receptacle power credits
337
+ unless receptacle_power_credits > 0.0
338
+ return false
339
+ end
340
+
322
341
  # Step 2: check if need to adjust the electric equipment schedule. - apply credit if needed.
323
- if receptacle_power_credits > 0.0
324
- # get current schedule
325
- power_schedule = power_equipment.schedule.get
326
- power_schedule_name = power_schedule.name.get
327
- new_power_schedule_name = format("#{power_schedule_name}_%.4f", receptacle_power_credits)
328
- if schedule_hash.key?(new_power_schedule_name)
329
- # In this case, there is a schedule created, can retrieve the schedule object and reset in this space type.
330
- schedule_rule = schedule_hash[new_power_schedule_name]
331
- power_equipment.setSchedule(schedule_rule)
332
- else
333
- # In this case, create a new schedule
334
- # 1. Clone the existing schedule
335
- new_rule_set_schedule = deep_copy_schedule(new_power_schedule_name, power_schedule, receptacle_power_credits, space_type.model)
336
- if power_equipment.setSchedule(new_rule_set_schedule)
337
- schedule_hash[new_power_schedule_name] = new_rule_set_schedule
338
- end
342
+ # get current schedule
343
+ power_schedule = power_equipment.schedule.get
344
+ power_schedule_name = power_schedule.name.get
345
+ new_power_schedule_name = format("#{power_schedule_name}_%.4f", receptacle_power_credits)
346
+ if schedule_hash.key?(new_power_schedule_name)
347
+ # In this case, there is a schedule created, can retrieve the schedule object and reset in this space type.
348
+ schedule_rule = schedule_hash[new_power_schedule_name]
349
+ power_equipment.setSchedule(schedule_rule)
350
+ else
351
+ # In this case, create a new schedule
352
+ # 1. Clone the existing schedule
353
+ new_rule_set_schedule = deep_copy_schedule(new_power_schedule_name, power_schedule, receptacle_power_credits, space_type.model)
354
+ if power_equipment.setSchedule(new_rule_set_schedule)
355
+ schedule_hash[new_power_schedule_name] = new_rule_set_schedule
339
356
  end
340
357
  end
358
+ return true
341
359
  end
342
360
 
343
- # Function to tset LPD on default space type
361
+ # Function to test LPD on default space type. The function assigns lighting power density to an light object.
362
+ # @param space_type [OpenStudio::Model::SpaceType]
363
+ # @param user_spaces [Hash]
364
+ # @param user_spacetypes [Hash]
365
+ # @return [Boolean] returns true if successful, false if not
344
366
  def set_lpd_on_space_type(space_type, user_spaces, user_spacetypes)
345
367
  if has_multi_lpd_values_space_type(space_type)
346
368
  # If multiple LPD value exist - then enforce space-space_type one on one relationship
@@ -355,18 +377,21 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
355
377
  if space_type.hasAdditionalProperties && space_type.additionalProperties.hasFeature('regulated_lights_name')
356
378
  lights_name = space_type.additionalProperties.getFeatureAsString('regulated_lights_name').to_s
357
379
  lights_obj = space_type.model.getLightsByName(lights_name).get
380
+ OpenStudio.logFree(OpenStudio::Info, 'prm.log', "Setting lighting object #{lights_obj.name.get} lighting per area to #{space_type_lighting_per_area} W/ft^2")
358
381
  lights_obj.lightsDefinition.setWattsperSpaceFloorArea(OpenStudio.convert(space_type_lighting_per_area.to_f, 'W/ft^2', 'W/m^2').get)
359
382
  end
360
383
  end
384
+ return true
361
385
  end
362
386
 
363
387
  # Function that applies user LPD to each space by duplicating space types
364
388
  # This function is used when there are user space data available or
365
389
  # the spaces under space type has lighting per length value which may cause multiple
366
390
  # lighting power densities under one space_type.
367
- # @param user_spaces hash data contained in the user space
368
- # @param user_spacetypes hash data contained in the user spacetypes
369
- # @param space_type OpenStudio::Model::SpaceType object
391
+ # @param user_spaces [Hash] hash data contained in the user space
392
+ # @param user_spacetypes [Hash] hash data contained in the user spacetypes
393
+ # @param space_type [OpenStudio::Model::SpaceType] object
394
+ # @return [ArrayOpenStudio::Model::Space] List of Spaces
370
395
  def space_to_space_type_apply_lighting(user_spaces, user_spacetypes, space_type)
371
396
  space_lighting_per_area_hash = {}
372
397
  # first priority - user_space data
@@ -426,7 +451,7 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
426
451
  new_definition = definition.clone.to_LightsDefinition.get
427
452
  new_definition.setWattsperSpaceFloorArea(OpenStudio.convert(lighting_per_area.to_f, 'W/ft^2', 'W/m^2').get)
428
453
  inst.setLightsDefinition(new_definition)
429
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.SpaceType', "#{space_type.name} set LPD to #{lighting_per_area} W/ft^2.")
454
+ OpenStudio.logFree(OpenStudio::Info, 'log.prm', "#{space_type.name} set LPD to #{lighting_per_area} W/ft^2.")
430
455
  end
431
456
  end
432
457
  space_array.push(space)
@@ -441,22 +466,38 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
441
466
  # set schedule for lighting
442
467
  schedule_hash = {}
443
468
  model.getSpaces.each do |space|
444
- space_type = space.spaceType.get
469
+ space_type = prm_get_optional_handler(space, @sizing_run_dir, 'spaceType')
445
470
  if space_type.hasAdditionalProperties && space_type.additionalProperties.hasFeature('regulated_lights_name')
446
471
  lights_name = space_type.additionalProperties.getFeatureAsString('regulated_lights_name').to_s
447
- ltg = space_type.model.getLightsByName(lights_name).get
472
+ ltg_option = space_type.model.getLightsByName(lights_name)
473
+ if ltg_option.is_initialized
474
+ ltg = ltg_option.get
475
+ else
476
+ # raise exception if we cannot find the lights in the model
477
+ prm_raise(false, @sizing_run_dir, "Cannot find the lights #{lights_name} in the model")
478
+ end
479
+ # this will raise exception if the ltg has no schedule assigned.
448
480
  if ltg.schedule.is_initialized
449
481
  ltg_schedule = ltg.schedule.get
450
- ltg_schedule_name = ltg_schedule.name
451
- occupancy_sensor_credit = space.additionalProperties.getFeatureAsDouble('occ_control_credit')
452
- new_ltg_schedule_name = format("#{ltg_schedule_name}_%.4f", occupancy_sensor_credit)
453
- if schedule_hash.key?(new_ltg_schedule_name)
482
+ else
483
+ # case such as Attic may have light object but no light schedule assigned
484
+ # Eplus use default 0 so in here we raise Error but continue processing.
485
+ ltg_schedule = nil
486
+ OpenStudio.logFree(OpenStudio::Warn, 'prm.log',
487
+ "schedule is not available in component #{ltg.name.get}. Skip processing")
488
+ end
489
+
490
+ if ltg_schedule
491
+ ltg_schedule_name = ltg_schedule.name.get
492
+ occupancy_sensor_credit = get_additional_property_as_double(space, 'occ_control_credit', 0.0)
493
+ if schedule_hash.key?(ltg_schedule_name)
454
494
  # In this case, there is a schedule created, can retrieve the schedule object and reset in this space type
455
- schedule_rule = schedule_hash[new_ltg_schedule_name]
495
+ schedule_rule = schedule_hash[ltg_schedule_name]
456
496
  ltg.setSchedule(schedule_rule)
457
497
  else
458
498
  # In this case, create a new schedule
459
499
  # 1. Clone the existing schedule
500
+ new_ltg_schedule_name = format("#{ltg_schedule_name}_%.4f", occupancy_sensor_credit)
460
501
  new_rule_set_schedule = deep_copy_schedule(new_ltg_schedule_name, ltg_schedule, occupancy_sensor_credit, model)
461
502
  if ltg.setSchedule(new_rule_set_schedule)
462
503
  schedule_hash[new_ltg_schedule_name] = new_rule_set_schedule
@@ -468,21 +509,21 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
468
509
  end
469
510
 
470
511
  def deep_copy_schedule(new_schedule_name, schedule, adjustment_factor, model)
471
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.ScheduleRuleset', "Creating a new lighting schedule that applies occupancy sensor adjustment factor: #{adjustment_factor} based on #{schedule.name.get} schedule")
512
+ OpenStudio.logFree(OpenStudio::Info, 'prm.log', "Creating a new lighting schedule that applies occupancy sensor adjustment factor: #{adjustment_factor} based on #{schedule.name.get} schedule")
472
513
  ruleset = OpenStudio::Model::ScheduleRuleset.new(model)
473
514
  ruleset.setName(new_schedule_name)
474
515
 
475
516
  # schedule types limits and default day schedule - keep the copy
476
- schedule_ruleset = schedule.to_ScheduleRuleset.get
477
- schedule_type_limit = schedule_ruleset.scheduleTypeLimits.get
517
+ schedule_ruleset = prm_get_optional_handler(schedule, @sizing_run_dir, 'to_ScheduleRuleset')
518
+ schedule_type_limit = prm_get_optional_handler(schedule, @sizing_run_dir, 'scheduleTypeLimits')
478
519
  default_day_schedule = schedule_ruleset.defaultDaySchedule
479
520
  default_winter_design_day_schedule = schedule_ruleset.winterDesignDaySchedule
480
521
  default_summer_design_day_schedule = schedule_ruleset.summerDesignDaySchedule
481
522
 
482
523
  schedule_ruleset.scheduleRules.each do |week_rule|
483
524
  day_rule = week_rule.daySchedule
484
- start_date = week_rule.startDate.get
485
- end_date = week_rule.endDate.get
525
+ start_date = prm_get_optional_handler(week_rule, @sizing_run_dir, 'startDate')
526
+ end_date = prm_get_optional_handler(week_rule, @sizing_run_dir, 'endDate')
486
527
 
487
528
  # create a new day rule - copy and apply the ajustment factor
488
529
  new_day_rule = OpenStudio::Model::ScheduleDay.new(model)
@@ -532,11 +573,13 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
532
573
  # calculate the lighting power density per area based on space type
533
574
  # The function will calculate the LPD based on the space type (STRING)
534
575
  # It considers lighting per area, lighting per length as well as occupancy factors in the database.
535
- # @param space_type [String]
576
+ # @param space_type [OpenStudio::Model::SpaceType]
536
577
  # @param space [OpenStudio::Model::Space]
578
+ # @return [Double] lighting power density in the space
537
579
  def calculate_lpd_by_space(space_type, space)
538
580
  # get interior lighting data
539
581
  space_type_properties = interior_lighting_get_prm_data(space_type)
582
+ OpenStudio.logFree(OpenStudio::Info, 'prm.log', "The lighting properties for space: #{space.name.get} is based on lighting_space_type: #{space_type_properties['lighting_space_type']}, primary_space_type: #{space_type_properties['primary_space_type']}, secondary_space_type: #{space_type_properties['secondary_space_type']}.")
540
583
  space_lighting_per_area = 0.0
541
584
  # Assign data
542
585
  lights_have_info = false
@@ -567,6 +610,8 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
567
610
  end
568
611
 
569
612
  # Function checks whether the user data contains lighting data
613
+ # @param user_space_data [Hash] space data extracted from user csv.
614
+ # @return [Boolean] True if there are user lpd values, False otherwise.
570
615
  def has_user_lpd_values(user_space_data)
571
616
  user_space_data.each do |user_data|
572
617
  if user_data.key?('num_std_ltg_types') && user_data['num_std_ltg_types'].to_f > 0
@@ -578,15 +623,21 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
578
623
 
579
624
  # Function checks whether there are multi lpd values in the space type
580
625
  # multi-lpd value means there are multiple spaces and the lighting_per_length > 0
626
+ # @param space_type [OpenStudio::Model::SpaceType]
627
+ # @return [Boolean] True if there is lighting power defined by w/ft, False otherwise.
581
628
  def has_multi_lpd_values_space_type(space_type)
582
629
  space_type_properties = interior_lighting_get_prm_data(space_type)
583
630
  lighting_per_length = space_type_properties['w/ft'].to_f
631
+
584
632
  return space_type.spaces.size > 1 && lighting_per_length > 0
585
633
  end
586
634
 
587
635
  # Function checks whether there are multi lpd values in the space type from user's data
588
636
  # The sum of each space fraction in the user_data is assumed to be 1.0
589
637
  # multi-lpd value means lighting per area > 0 and lighting_per_length > 0
638
+ # @param user_data [Hash] user data from the user csv
639
+ # @param space_type [OpenStudio::Model::SpaceType]
640
+ # @return [Boolean]
590
641
  def has_multi_lpd_values_user_data(user_data, space_type)
591
642
  num_std_ltg_types = user_data['num_std_ltg_types'].to_i
592
643
  std_ltg_index = 0 # loop index
@@ -614,6 +665,7 @@ class ASHRAE901PRM2019 < ASHRAE901PRM
614
665
  # The sum of each space fraction in the user_data is assumed to be 1.0
615
666
  # @param user_data [Hash] user data from the user csv
616
667
  # @param space [OpenStudio::Model::Space]
668
+ # @return [Double] space lighting per area in W per m2
617
669
  def calculate_lpd_from_userdata(user_data, space)
618
670
  num_std_ltg_types = user_data['num_std_ltg_types'].to_i
619
671
  space_lighting_per_area = 0.0