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
@@ -0,0 +1,462 @@
1
+ # Methods to get information about model geometry
2
+ # Many of these methods may be moved to core OpenStudio
3
+ module OpenstudioStandards
4
+ module Geometry
5
+ # @!group Information
6
+
7
+ # calculate aspect ratio from area and perimeter
8
+ #
9
+ # @param area [Double] area
10
+ # @param perimeter [Double] perimeter
11
+ # @return [Double] aspect ratio
12
+ def self.aspect_ratio(area, perimeter)
13
+ length = 0.25 * (perimeter + Math.sqrt(perimeter**2 - 16 * area))
14
+ width = 0.25 * (perimeter - Math.sqrt(perimeter**2 - 16 * area))
15
+ aspect_ratio = length / width
16
+
17
+ return aspect_ratio
18
+ end
19
+
20
+ # @!endgroup Information
21
+
22
+ # @!group Information:Surfaces
23
+
24
+ # return an array of z values for surfaces passed in. The values will be relative to the parent origin.
25
+ #
26
+ # @param surfaces [Array<OpenStudio::Model::Surface>] array of Surface objects
27
+ # @return [Array<Double>] array of z values in meters
28
+ def self.surfaces_get_z_values(surfaces)
29
+ z_values = []
30
+
31
+ # loop over all surfaces
32
+ surfaces.each do |surface|
33
+ # get the existing vertices
34
+ vertices = surface.vertices
35
+ vertices.each do |vertex|
36
+ # push z value to array
37
+ z_values << vertex.z
38
+ end
39
+ end
40
+
41
+ return z_values
42
+ end
43
+
44
+ # Check if a point is contained on any surface in an array of surfaces
45
+ #
46
+ # @param surfaces [Array<OpenStudio::Model::Surface>] array of Surface objects
47
+ # @param point [OpenStudio::Point3d] Point3d object
48
+ # @return [Boolean] true if on a surface in surface array, false if not
49
+ def self.surfaces_contain_point?(surfaces, point)
50
+ on_surface = false
51
+
52
+ surfaces.each do |surface|
53
+ # Check if sensor is on floor plane (I need to loop through all floors)
54
+ plane = surface.plane
55
+ point_on_plane = plane.project(point)
56
+
57
+ face_transform = OpenStudio::Transformation.alignFace(surface.vertices)
58
+ face_vertices = face_transform * surface.vertices
59
+ face_point_on_plane = face_transform * point_on_plane
60
+
61
+ if OpenStudio.pointInPolygon(face_point_on_plane, face_vertices.reverse, 0.01)
62
+ # initial_sensor location lands in this surface's polygon
63
+ on_surface = true
64
+ end
65
+ end
66
+
67
+ return on_surface
68
+ end
69
+
70
+ # @!endgroup Information:Surfaces
71
+
72
+ # @!group Information:Space
73
+
74
+ # @!endgroup Information:Space
75
+
76
+ # @!group Information:Spaces
77
+
78
+ # Get the total floor area of selected spaces
79
+ #
80
+ # @param spaces [Array<OpenStudio::Model::Space>] array of Space objects
81
+ # @param multiplier [Boolean] account for space multiplier
82
+ # @return [Double] total floor area of spaces in square meters
83
+ def self.spaces_get_floor_area(spaces, multiplier: true)
84
+ total_area = 0.0
85
+ spaces.each do |space|
86
+ space_multiplier = multiplier ? space.multiplier : 1.0
87
+ total_area += space.floorArea * space_multiplier
88
+ end
89
+ return total_area
90
+ end
91
+
92
+ # Get the total exterior area of selected spaces
93
+ #
94
+ # @param spaces [Array<OpenStudio::Model::Space>] array of Space objects
95
+ # @param multiplier [Boolean] account for space multiplier
96
+ # @return [Double] total exterior area of spaces in square meters
97
+ def self.spaces_get_exterior_area(spaces, multiplier: true)
98
+ total_area = 0.0
99
+ spaces.each do |space|
100
+ space_multiplier = multiplier ? space.multiplier : 1.0
101
+ total_area += space.exteriorArea * space_multiplier
102
+ end
103
+ return total_area
104
+ end
105
+
106
+ # Get the total exterior wall area of selected spaces
107
+ #
108
+ # @param spaces [Array<OpenStudio::Model::Space>] array of Space objects
109
+ # @param multiplier [Boolean] account for space multiplier
110
+ # @return [Double] total exterior wall area of spaces in square meters
111
+ def self.spaces_get_exterior_wall_area(spaces, multiplier: true)
112
+ total_area = 0.0
113
+ spaces.each do |space|
114
+ space_multiplier = multiplier ? space.multiplier : 1.0
115
+ total_area += space.exteriorWallArea * space_multiplier
116
+ end
117
+ return total_area
118
+ end
119
+
120
+ # @!endgroup Information:Spaces
121
+
122
+ # @!group Information:Story
123
+
124
+ # Calculate the story exterior wall perimeter. Selected story should have above grade walls. If not perimeter may return zero.
125
+ #
126
+ # @param story [OpenStudio::Model::BuildingStory]
127
+ # @param multiplier_adjustment [Double] Adjust the calculated perimeter to account for zone multipliers. The value represents the story_multiplier which reduces the adjustment by that factor over the full zone multiplier.
128
+ # @param exterior_boundary_conditions [Array<String>] Array of strings of exterior boundary conditions.
129
+ # @param bounding_box [OpenStudio::BoundingBox] bounding box to determine which spaces are included
130
+ # @todo this doesn't catch walls that are split that sit above floor surfaces that are not (e.g. main corridoor in secondary school model)
131
+ # @todo also odd with multi-height spaces
132
+ def self.story_get_exterior_wall_perimeter(story,
133
+ multiplier_adjustment: nil,
134
+ exterior_boundary_conditions: ['Outdoors', 'Ground'],
135
+ bounding_box: nil)
136
+ perimeter = 0
137
+ party_walls = []
138
+ story.spaces.each do |space|
139
+ # counter to use later
140
+ edge_hash = {}
141
+ edge_counter = 0
142
+ space.surfaces.each do |surface|
143
+ # get vertices
144
+ vertex_hash = {}
145
+ vertex_counter = 0
146
+ surface.vertices.each do |vertex|
147
+ vertex_counter += 1
148
+ vertex_hash[vertex_counter] = [vertex.x, vertex.y, vertex.z]
149
+ end
150
+ # make edges
151
+ counter = 0
152
+ vertex_hash.each do |k, v|
153
+ edge_counter += 1
154
+ counter += 1
155
+ if vertex_hash.size != counter
156
+ edge_hash[edge_counter] = [v, vertex_hash[counter + 1], surface, surface.outsideBoundaryCondition, surface.surfaceType]
157
+ else # different code for wrap around vertex
158
+ edge_hash[edge_counter] = [v, vertex_hash[1], surface, surface.outsideBoundaryCondition, surface.surfaceType]
159
+ end
160
+ end
161
+ end
162
+
163
+ # check edges for matches (need opposite vertices and proper boundary conditions)
164
+ edge_hash.each do |k1, v1|
165
+ # apply to any floor boundary condition. This supports used in floors above basements
166
+ next if v1[4] != 'Floor'
167
+
168
+ edge_hash.each do |k2, v2|
169
+ test_boundary_cond = false
170
+ next if !exterior_boundary_conditions.include?(v2[3]) # method arg takes multiple conditions
171
+ next if v2[4] != 'Wall'
172
+
173
+ # see if edges have same geometry
174
+
175
+ # found cases where the two lines below removed edges and resulted in lower than actual perimeter. Added new code with tolerance.
176
+ # next if not v1[0] == v2[1] # next if not same geometry reversed
177
+ # next if not v1[1] == v2[0]
178
+
179
+ # these are three item array's add in tollerance for each array entry
180
+ tolerance = 0.0001
181
+ test_a = true
182
+ test_b = true
183
+ 3.times.each do |i|
184
+ if (v1[0][i] - v2[1][i]).abs > tolerance
185
+ test_a = false
186
+ end
187
+ if (v1[1][i] - v2[0][i]).abs > tolerance
188
+ test_b = false
189
+ end
190
+ end
191
+
192
+ next if test_a != true
193
+ next if test_b != true
194
+
195
+ # edge_bounding_box = OpenStudio::BoundingBox.new
196
+ # edge_bounding_box.addPoints(space.transformation() * v2[2].vertices)
197
+ # if not edge_bounding_box.intersects(bounding_box) doesn't seem to work reliably, writing custom code to check
198
+
199
+ point_one = OpenStudio::Point3d.new(v2[0][0], v2[0][1], v2[0][2])
200
+ point_one = (space.transformation * point_one)
201
+ point_two = OpenStudio::Point3d.new(v2[1][0], v2[1][1], v2[1][2])
202
+ point_two = (space.transformation * point_two)
203
+
204
+ if !bounding_box.nil? && (v2[3] == 'Adiabatic')
205
+
206
+ on_bounding_box = false
207
+ if ((bounding_box.minX.to_f - point_one.x).abs < tolerance) && ((bounding_box.minX.to_f - point_two.x).abs < tolerance)
208
+ on_bounding_box = true
209
+ elsif ((bounding_box.maxX.to_f - point_one.x).abs < tolerance) && ((bounding_box.maxX.to_f - point_two.x).abs < tolerance)
210
+ on_bounding_box = true
211
+ elsif ((bounding_box.minY.to_f - point_one.y).abs < tolerance) && ((bounding_box.minY.to_f - point_two.y).abs < tolerance)
212
+ on_bounding_box = true
213
+ elsif ((bounding_box.maxY.to_f - point_one.y).abs < tolerance) && ((bounding_box.maxY.to_f - point_two.y).abs < tolerance)
214
+ on_bounding_box = true
215
+ end
216
+
217
+ # if not edge_bounding_box.intersects(bounding_box) doesn't seem to work reliably, writing custom code to check
218
+ # todo - this is basic check for adiabatic party walls and won't catch all situations. Can be made more robust in the future
219
+ if on_bounding_box == true
220
+ length = OpenStudio::Vector3d.new(point_one - point_two).length
221
+ party_walls << v2[2]
222
+ length_ip_display = OpenStudio.convert(length, 'm', 'ft').get.round(2)
223
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Geometry.Create', " * #{v2[2].name} has an adiabatic boundary condition and sits in plane with the building bounding box. Adding #{length_ip_display} (ft) to perimeter length of #{story.name} for this surface, assuming it is a party wall.")
224
+ elsif space.multiplier == 1
225
+ length = OpenStudio::Vector3d.new(point_one - point_two).length
226
+ party_walls << v2[2]
227
+ length_ip_display = OpenStudio.convert(length, 'm', 'ft').get.round(2)
228
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Geometry.Create', " * #{v2[2].name} has an adiabatic boundary condition and is in a zone with a multiplier of 1. Adding #{length_ip_display} (ft) to perimeter length of #{story.name} for this surface, assuming it is a party wall.")
229
+ else
230
+ length = 0
231
+ end
232
+
233
+ else
234
+ length = OpenStudio::Vector3d.new(point_one - point_two).length
235
+ end
236
+
237
+ if multiplier_adjustment.nil?
238
+ perimeter += length
239
+ else
240
+ # adjust for multiplier
241
+ non_story_multiplier = space.multiplier / multiplier_adjustment.to_f
242
+ perimeter += length * non_story_multiplier
243
+ end
244
+ end
245
+ end
246
+ end
247
+
248
+ return { perimeter: perimeter, party_walls: party_walls }
249
+ end
250
+
251
+ # @!endgroup Information:Story
252
+
253
+ # @!group Information:Model
254
+
255
+ # Returns the window to wall ratio
256
+ #
257
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
258
+ # @param spaces [Array<OpenStudio::Model::Space>] optional array of Space objects.
259
+ # If provided, the return will report for only those spaces.
260
+ # @return [Double] window to wall ratio
261
+ def self.model_get_exterior_window_to_wall_ratio(model, spaces: [])
262
+ # counters
263
+ total_gross_ext_wall_area = 0
264
+ total_ext_window_area = 0
265
+
266
+ if spaces.empty?
267
+ spaces = model.getSpaces
268
+ end
269
+
270
+ spaces.each do |space|
271
+ # get surface area adjusting for zone multiplier
272
+ zone = space.thermalZone
273
+ if !zone.empty?
274
+ zone_multiplier = zone.get.multiplier
275
+ if zone_multiplier > 1
276
+ end
277
+ else
278
+ zone_multiplier = 1 # space is not in a thermal zone
279
+ end
280
+
281
+ space.surfaces.each do |s|
282
+ next if s.surfaceType != 'Wall'
283
+ next if s.outsideBoundaryCondition != 'Outdoors'
284
+
285
+ surface_gross_area = s.grossArea * zone_multiplier
286
+
287
+ # loop through sub surfaces and add area including multiplier
288
+ ext_window_area = 0
289
+ s.subSurfaces.each do |sub_surface|
290
+ ext_window_area += sub_surface.grossArea * sub_surface.multiplier * zone_multiplier
291
+ end
292
+
293
+ total_gross_ext_wall_area += surface_gross_area
294
+ total_ext_window_area += ext_window_area
295
+ end
296
+ end
297
+
298
+ if total_gross_ext_wall_area > 0
299
+ result = total_ext_window_area / total_gross_ext_wall_area
300
+ else
301
+ result = 0.0
302
+ end
303
+
304
+ return result
305
+ end
306
+
307
+ # Returns the wall area and window area by orientation
308
+ #
309
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
310
+ # @param spaces [Array<OpenStudio::Model::Space>] optional array of Space objects.
311
+ # If provided, the return will report for only those spaces.
312
+ # @return [Hash] Hash of wall area in square meters and window to wall ratio for each orientation
313
+ def self.model_get_exterior_window_and_wall_area_by_orientation(model, spaces: [])
314
+ # counters
315
+ total_gross_ext_wall_area_north = 0.0
316
+ total_gross_ext_wall_area_south = 0.0
317
+ total_gross_ext_wall_area_east = 0.0
318
+ total_gross_ext_wall_area_west = 0.0
319
+ total_ext_window_area_north = 0.0
320
+ total_ext_window_area_south = 0.0
321
+ total_ext_window_area_east = 0.0
322
+ total_ext_window_area_west = 0.0
323
+
324
+ if spaces.empty?
325
+ spaces = model.getSpaces
326
+ end
327
+
328
+ spaces.each do |space|
329
+ # get surface area adjusting for zone multiplier
330
+ zone = space.thermalZone
331
+ if !zone.empty?
332
+ zone_multiplier = zone.get.multiplier
333
+ if zone_multiplier > 1
334
+ end
335
+ else
336
+ zone_multiplier = 1 # space is not in a thermal zone
337
+ end
338
+
339
+ space.surfaces.each do |s|
340
+ next if s.surfaceType != 'Wall'
341
+ next if s.outsideBoundaryCondition != 'Outdoors'
342
+
343
+ surface_gross_area = s.grossArea * zone_multiplier
344
+
345
+ # loop through sub surfaces and add area including multiplier
346
+ ext_window_area = 0
347
+ s.subSurfaces.each do |sub_surface|
348
+ ext_window_area += sub_surface.grossArea * sub_surface.multiplier * zone_multiplier
349
+ end
350
+
351
+ absolute_azimuth = OpenStudio.convert(s.azimuth, 'rad', 'deg').get + s.space.get.directionofRelativeNorth + model.getBuilding.northAxis
352
+ absolute_azimuth -= 360.0 until absolute_azimuth < 360.0
353
+
354
+ # add to exterior wall counter if north or south
355
+ if (absolute_azimuth >= 45.0) && (absolute_azimuth < 125.0)
356
+ # east exterior walls
357
+ total_gross_ext_wall_area_east += surface_gross_area
358
+ total_ext_window_area_east += ext_window_area
359
+ elsif (absolute_azimuth >= 125.0) && (absolute_azimuth < 225.0)
360
+ # south exterior walls
361
+ total_gross_ext_wall_area_south += surface_gross_area
362
+ total_ext_window_area_south += ext_window_area
363
+ elsif (absolute_azimuth >= 225.0) && (absolute_azimuth < 315.0)
364
+ # west exterior walls
365
+ total_gross_ext_wall_area_west += surface_gross_area
366
+ total_ext_window_area_west += ext_window_area
367
+ else
368
+ # north exterior walls
369
+ total_gross_ext_wall_area_north += surface_gross_area
370
+ total_ext_window_area_north += ext_window_area
371
+ end
372
+ end
373
+ end
374
+
375
+ result = { 'north_wall' => total_gross_ext_wall_area_north,
376
+ 'north_window' => total_ext_window_area_north,
377
+ 'south_wall' => total_gross_ext_wall_area_south,
378
+ 'south_window' => total_ext_window_area_south,
379
+ 'east_wall' => total_gross_ext_wall_area_east,
380
+ 'east_window' => total_ext_window_area_east,
381
+ 'west_wall' => total_gross_ext_wall_area_west,
382
+ 'west_window' => total_ext_window_area_west }
383
+ return result
384
+ end
385
+
386
+ # Calculates the exterior perimeter length, checking checks for edges shared by a ground exposed floor and exterior exposed wall.
387
+ #
388
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
389
+ # @return [Double] perimeter length in meters
390
+ # @todo this doesn't catch walls that are split that sit above floor surfaces that are not (e.g. main corridoor in secondary school model)
391
+ # @todo also odd with multi-height spaces
392
+ def self.model_get_perimeter_length(model)
393
+ perimeter = 0.0
394
+ model.getSpaces.sort.each do |space|
395
+ # counter to use later
396
+ edge_hash = {}
397
+ edge_counter = 0
398
+ space.surfaces.sort.each do |surface|
399
+ # get vertices
400
+ vertex_hash = {}
401
+ vertex_counter = 0
402
+ surface.vertices.each do |vertex|
403
+ vertex_counter += 1
404
+ vertex_hash[vertex_counter] = [vertex.x, vertex.y, vertex.z]
405
+ end
406
+ # make edges
407
+ counter = 0
408
+ vertex_hash.each do |k, v|
409
+ edge_counter += 1
410
+ counter += 1
411
+ if vertex_hash.size != counter
412
+ edge_hash[edge_counter] = [v, vertex_hash[counter + 1], surface, surface.outsideBoundaryCondition, surface.surfaceType]
413
+ else # different code for wrap around vertex
414
+ edge_hash[edge_counter] = [v, vertex_hash[1], surface, surface.outsideBoundaryCondition, surface.surfaceType]
415
+ end
416
+ end
417
+ end
418
+
419
+ # check edges for matches (need opposite vertices and proper boundary conditions)
420
+ edge_hash.each do |k1, v1|
421
+ next if v1[3] != 'Ground' # skip if not ground exposed floor
422
+ next if v1[4] != 'Floor'
423
+
424
+ edge_hash.each do |k2, v2|
425
+ next if v2[3] != 'Outdoors' # skip if not exterior exposed wall (todo - update to handle basement)
426
+ next if v2[4] != 'Wall'
427
+
428
+ # see if edges have same geometry
429
+ # found cases where the two lines below removed edges and resulted in lower than actual perimeter. Added new code with tolerance.
430
+ # next if not v1[0] == v2[1] # next if not same geometry reversed
431
+ # next if not v1[1] == v2[0]
432
+
433
+ # these are three item array's add in tollerance for each array entry
434
+ tolerance = 0.0001
435
+ test_a = true
436
+ test_b = true
437
+ 3.times.each do |i|
438
+ if (v1[0][i] - v2[1][i]).abs > tolerance
439
+ test_a = false
440
+ end
441
+ if (v1[1][i] - v2[0][i]).abs > tolerance
442
+ test_b = false
443
+ end
444
+ end
445
+
446
+ next if test_a != true
447
+ next if test_b != true
448
+
449
+ point_one = OpenStudio::Point3d.new(v1[0][0], v1[0][1], v1[0][2])
450
+ point_two = OpenStudio::Point3d.new(v1[1][0], v1[1][1], v1[1][2])
451
+ length = OpenStudio::Vector3d.new(point_one - point_two).length
452
+ perimeter += length
453
+ end
454
+ end
455
+ end
456
+
457
+ return perimeter
458
+ end
459
+
460
+ # @!endgroup Information:Model
461
+ end
462
+ end
@@ -0,0 +1,48 @@
1
+ # Methods to modify geometry
2
+ module OpenstudioStandards
3
+ module Geometry
4
+ # @!group Modify
5
+
6
+ # lower z value of vertices with starting value above z_value_target to z_value_target
7
+ #
8
+ # @param surfaces [Array<OpenStudio::Model::Surface>] array of Surface objects
9
+ # @param z_value_target [Double]
10
+ # @return [Array] array of z values in meters
11
+ def self.surfaces_lower_z_values(surfaces, z_value_target)
12
+ count = 0
13
+
14
+ # loop over all surfaces
15
+ surfaces.each do |surface|
16
+ # create a new set of vertices
17
+ new_vertices = OpenStudio::Point3dVector.new
18
+
19
+ # get the existing vertices for this interior partition
20
+ vertices = surface.vertices
21
+ flag = false
22
+ vertices.each do |vertex|
23
+ # initialize new vertex to old vertex
24
+ x = vertex.x
25
+ y = vertex.y
26
+ z = vertex.z
27
+
28
+ # if this z vertex is not on the z = 0 plane
29
+ if z > z_value_target
30
+ z = z_value_target
31
+ flag = true
32
+ end
33
+
34
+ # add point to new vertices
35
+ new_vertices << OpenStudio::Point3d.new(x, y, z)
36
+ end
37
+
38
+ # set vertices to new vertices
39
+ # @todo check if this was made, and issue warning if it was not. Could happen if resulting surface not planer.
40
+ surface.setVertices(new_vertices)
41
+
42
+ count += 1 if flag
43
+ end
44
+
45
+ return count
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,79 @@
1
+ # Method to apply a typical CBECS HVAC system to thermal zones
2
+ module OpenstudioStandards
3
+ module HVAC
4
+ # @!group AirLoop:Information
5
+
6
+ # Returns whether air loop HVAC is a direct evaporative system
7
+ #
8
+ # @param air_loop_hvac [<OpenStudio::Model::AirLoopHVAC>] OpenStudio AirLoopHVAC object
9
+ # @return [Bool] returns true if successful, false if not
10
+ def self.air_loop_hvac_direct_evap?(air_loop_hvac)
11
+ # check if direct evap
12
+ is_direct_evap = false
13
+ air_loop_hvac.supplyComponents.each do |component|
14
+ # Get the object type
15
+ obj_type = component.iddObjectType.valueName.to_s
16
+ case obj_type
17
+ when 'OS_EvaporativeCooler_Direct_ResearchSpecial', 'OS_EvaporativeCooler_Indirect_ResearchSpecial'
18
+ is_direct_evap = true
19
+ end
20
+ end
21
+ return is_direct_evap
22
+ end
23
+
24
+ # Returns whether air loop HVAC is a unitary system
25
+ #
26
+ # @param air_loop_hvac [<OpenStudio::Model::AirLoopHVAC>] OpenStudio AirLoopHVAC object
27
+ # @return [Bool] returns true if air_loop_hvac is a unitary system, false if not
28
+ def self.air_loop_hvac_unitary_system?(air_loop_hvac)
29
+ # check if unitary system
30
+ is_unitary_system = false
31
+ air_loop_hvac.supplyComponents.each do |component|
32
+ # Get the object type
33
+ obj_type = component.iddObjectType.valueName.to_s
34
+ case obj_type
35
+ when 'OS_AirLoopHVAC_UnitarySystem', 'OS_AirLoopHVAC_UnitaryHeatPump_AirToAir', 'OS_AirLoopHVAC_UnitaryHeatPump_AirToAir_MultiSpeed', 'OS_AirLoopHVAC_UnitaryHeatCool_VAVChangeoverBypass'
36
+ is_unitary_system = true
37
+ end
38
+ end
39
+ return is_unitary_system
40
+ end
41
+
42
+ # Returns the unitary system minimum and maximum design temperatures
43
+ #
44
+ # @param unitary_system [<OpenStudio::Model::ModelObject>] OpenStudio ModelObject object
45
+ # @return [Hash] returns as hash with 'min_temp' and 'max_temp' in degrees Fahrenheit
46
+ def self.unitary_system_min_max_temperature_value(unitary_system)
47
+ min_temp = nil
48
+ max_temp = nil
49
+ # Get the object type
50
+ obj_type = unitary_system.iddObjectType.valueName.to_s
51
+ case obj_type
52
+ when 'OS_AirLoopHVAC_UnitarySystem'
53
+ unitary_system = unitary_system.to_AirLoopHVACUnitarySystem.get
54
+ if unitary_system.useDOASDXCoolingCoil
55
+ min_temp = OpenStudio.convert(unitary_system.dOASDXCoolingCoilLeavingMinimumAirTemperature, 'C', 'F').get
56
+ end
57
+ if unitary_system.maximumSupplyAirTemperature.is_initialized
58
+ max_temp = OpenStudio.convert(unitary_system.maximumSupplyAirTemperature.get, 'C', 'F').get
59
+ end
60
+ when 'OS_AirLoopHVAC_UnitaryHeatPump_AirToAir'
61
+ unitary_system = unitary_system.to_AirLoopHVACUnitaryHeatPumpAirToAir.get
62
+ if unitary_system.maximumSupplyAirTemperaturefromSupplementalHeater.is_initialized
63
+ max_temp = OpenStudio.convert(unitary_system.maximumSupplyAirTemperaturefromSupplementalHeater.get, 'C', 'F').get
64
+ end
65
+ when 'OS_AirLoopHVAC_UnitaryHeatPump_AirToAir_MultiSpeed'
66
+ unitary_system = unitary_system.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get
67
+ if unitary_system.maximumSupplyAirTemperaturefromSupplementalHeater.is_initialized
68
+ max_temp = OpenStudio.convert(unitary_system.maximumSupplyAirTemperaturefromSupplementalHeater.get, 'C', 'F').get
69
+ end
70
+ when 'OS_AirLoopHVAC_UnitaryHeatCool_VAVChangeoverBypass'
71
+ unitary_system = unitary_system.to_AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass.get
72
+ min_temp = OpenStudio.convert(unitary_system.minimumOutletAirTemperatureDuringCoolingOperation, 'C', 'F').get
73
+ max_temp = OpenStudio.convert(unitary_system.maximumOutletAirTemperatureDuringHeatingOperation, 'C', 'F').get
74
+ end
75
+
76
+ return { 'min_temp' => min_temp, 'max_temp' => max_temp }
77
+ end
78
+ end
79
+ end