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
@@ -5,13 +5,13 @@ class NECB2020
5
5
  # Per PNNL http://www.energycodes.gov/sites/default/files/documents/PrototypeModelEnhancements_2014_0.pdf
6
6
  # Appendix A: Service Water Heating
7
7
  #
8
- # @return [Bool] true if successful, false if not
8
+ # @return [Boolean] true if successful, false if not
9
9
  #
10
10
  # NECB2020 uses a different procedure calculate gas water heater efficiencies (compared to previous NECB)
11
11
  #
12
12
  def water_heater_mixed_apply_efficiency(water_heater_mixed)
13
13
  # Get the capacity of the water heater
14
- # TODO add capability to pull autosized water heater capacity
14
+ # @todo add capability to pull autosized water heater capacity
15
15
  # if the Sizing:WaterHeater object is ever implemented in OpenStudio.
16
16
  capacity_w = water_heater_mixed.heaterMaximumCapacity
17
17
  if capacity_w.empty?
@@ -24,7 +24,7 @@ class NECB2020
24
24
  capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
25
25
 
26
26
  # Get the volume of the water heater
27
- # TODO add capability to pull autosized water heater volume
27
+ # @todo add capability to pull autosized water heater volume
28
28
  # if the Sizing:WaterHeater object is ever implemented in OpenStudio.
29
29
  volume_m3 = water_heater_mixed.tankVolume
30
30
  if volume_m3.empty?
@@ -202,7 +202,7 @@ class NECB2020
202
202
  # Skin loss
203
203
  water_heater_mixed.setOffCycleLossCoefficienttoAmbientTemperature(ua_w_per_k)
204
204
  water_heater_mixed.setOnCycleLossCoefficienttoAmbientTemperature(ua_w_per_k)
205
- # TODO: Parasitic loss (pilot light)
205
+ # @todo Parasitic loss (pilot light)
206
206
  # PNNL document says pilot lights were removed, but IDFs
207
207
  # still have the on/off cycle parasitic fuel consumptions filled in
208
208
  water_heater_mixed.setOnCycleParasiticFuelType(fuel_type)
@@ -158,6 +158,7 @@ class BTAPData
158
158
  building_data['cost_rs_means_prov'] = cost_result['rs_means_prov']
159
159
  building_data['cost_rs_means_city'] = cost_result['rs_means_city']
160
160
  building_data['cost_equipment_envelope_total_cost_per_m_sq'] = (cost_result['totals']['envelope']) / @conditioned_floor_area_m_sq
161
+ building_data['cost_equipment_thermal_bridging_total_cost_per_m_sq'] = (cost_result['totals']['thermal_bridging']) / @conditioned_floor_area_m_sq
161
162
  building_data['cost_equipment_lighting_total_cost_per_m_sq'] = (cost_result['totals']['lighting']) / @conditioned_floor_area_m_sq
162
163
  building_data['cost_equipment_heating_and_cooling_total_cost_per_m_sq'] = (cost_result['totals']['heating_and_cooling']) / @conditioned_floor_area_m_sq
163
164
  building_data['cost_equipment_shw_total_cost_per_m_sq'] = (cost_result['totals']['shw']) / @conditioned_floor_area_m_sq
@@ -1352,7 +1353,7 @@ class BTAPData
1352
1353
  data['energy_peak_electric_w_per_m_sq'] = electric_peak.empty? ? 0.0 : electric_peak.get / @conditioned_floor_area_m_sq
1353
1354
  data['energy_peak_natural_gas_w_per_m_sq'] = natural_gas_peak.empty? ? 0.0 : natural_gas_peak.get / @conditioned_floor_area_m_sq
1354
1355
 
1355
- # Peak heating load #TODO: IMPORTANT NOTE: Peak heating load must be updated if a combination of fuel types is used in a building model.
1356
+ # Peak heating load # @todo IMPORTANT NOTE: Peak heating load must be updated if a combination of fuel types is used in a building model.
1356
1357
  command = "SELECT Value
1357
1358
  FROM TabularDataWithStrings
1358
1359
  WHERE ReportName='EnergyMeters'
@@ -1367,14 +1368,14 @@ class BTAPData
1367
1368
  WHERE ReportName='EnergyMeters'
1368
1369
  AND ReportForString='Entire Facility'
1369
1370
  AND TableName='Annual and Peak Values - Natural Gas'
1370
- AND RowName='Heating:Gas'
1371
+ AND RowName='Heating:NaturalGas'
1371
1372
  AND ColumnName='Natural Gas Maximum Value'
1372
1373
  AND Units='W'"
1373
1374
  heating_peak_w_gas = @sqlite_file.get.execAndReturnFirstDouble(command)
1374
1375
  heating_peak_w = [heating_peak_w_electricity.to_f, heating_peak_w_gas.to_f].max
1375
1376
  data['heating_peak_w_per_m_sq'] = heating_peak_w / @conditioned_floor_area_m_sq
1376
1377
 
1377
- # Peak cooling load #TODO: IMPORTANT NOTE: Peak cooling load must be updated if a combination of fuel types is used in a building model.
1378
+ # Peak cooling load # @todo IMPORTANT NOTE: Peak cooling load must be updated if a combination of fuel types is used in a building model.
1378
1379
  command = "SELECT Value
1379
1380
  FROM TabularDataWithStrings
1380
1381
  WHERE ReportName='EnergyMeters'
@@ -1422,10 +1423,14 @@ class BTAPData
1422
1423
  data["energy_eui_#{row['name'].downcase}_gj_per_m_sq"] = energy_columns.inject(0) { |sum, tuple| sum += tuple[1] } / @conditioned_floor_area_m_sq
1423
1424
  end
1424
1425
  data['energy_eui_total_gj_per_m_sq'] = 0.0
1425
- ['natural_gas_GJ', 'electricity_GJ', 'district_cooling_GJ', 'district_heating_GJ', 'additional_fuel_GJ'].each do |column|
1426
+ ['natural_gas_GJ', 'electricity_GJ', 'additional_fuel_GJ'].each do |column|
1426
1427
  data["energy_eui_#{column.downcase}_per_m_sq"] = table.inject(0) { |sum, row| sum + (row[column].nil? ? 0.0 : row[column]) } / @conditioned_floor_area_m_sq
1427
1428
  data['energy_eui_total_gj_per_m_sq'] += data["energy_eui_#{column.downcase}_per_m_sq"] unless data["energy_eui_#{column.downcase}_per_m_sq"].nil?
1428
1429
  end
1430
+ ['district_cooling_GJ', 'district_heating_GJ'].each do |column|
1431
+ data["energy_eui_#{column.downcase}_per_m_sq"] = table.inject(0) { |sum, row| sum + (row[column].nil? ? 0.0 : row[column]) } / @conditioned_floor_area_m_sq
1432
+ end
1433
+
1429
1434
  # Get total and net site energy use intensity
1430
1435
  # Note: 'Total Site Energy' is the "gross" energy used by a building.
1431
1436
  # Note: 'Net Site Energy' is the final energy used by the building after considering any on-site energy generation (e.g. PV).
@@ -1793,7 +1798,7 @@ class BTAPData
1793
1798
  return var.get
1794
1799
  end
1795
1800
 
1796
- # TODO: SQL command units may have been converted wrong.
1801
+ # @todo SQL command units may have been converted wrong.
1797
1802
 
1798
1803
  def get_actual_child_object(object)
1799
1804
  # monkey patch class to have a decendants static method to return all possible subclasses of the object.
@@ -226,7 +226,7 @@ class BTAPDatapoint
226
226
  model.setSqlFile(sql)
227
227
 
228
228
  @cost_result = nil
229
- if @options[:enable_costing] == true
229
+ if defined?(BTAPCosting)
230
230
  # Perform costing
231
231
  costing = BTAPCosting.new
232
232
  costing.load_database
@@ -0,0 +1,128 @@
1
+ # PRM generation custom Error
2
+ class PRMError < StandardError
3
+ end
4
+
5
+ # PRM assertion method
6
+ # Raise assertion if the test (bool) is failed
7
+ #
8
+ # Before raise the exception, the method will generate the prm.log for debugging
9
+ # @param bool [Boolean, Object] an object for truthy evaluation
10
+ # @param log_dir [String] log file directory
11
+ # @param err_msg [String] message raise the exception
12
+ def prm_raise(bool, log_dir, err_msg)
13
+ unless bool
14
+ # OpenStudio.logFree(OpenStudio::Debug, 'prm.log', log_msg)
15
+ log_messages_to_file_prm("#{log_dir}/prm.log", true)
16
+ raise PRMError, "#{err_msg} - Check debug log at #{log_dir}/prm.log for more information"
17
+ end
18
+ end
19
+
20
+ # PRM reading function reads user data from a hash map.
21
+ # Handles key existence, value is nil and value string is empty
22
+ # @param user_data [Hash] a hash contains a user data
23
+ # @param key [String] key string
24
+ # @param default [Object] values assigned if the data is not available.
25
+ # @return [String] a string
26
+ def prm_read_user_data(user_data, key, default = nil)
27
+ return user_data.key?(key) && !user_data[key].nil? && !user_data[key].to_s.empty? ? user_data[key] : default
28
+ end
29
+
30
+ # This is a PRM handler function handles the .get from an optional object
31
+ # The handler will try to access the OpenStudio Object data key
32
+ # And do it recursively until all the keys have been checked and final object get or raise exception
33
+ # for non_initialized objects.
34
+ # @param component [OpenStudio::Model::Component] an OpenStudio object
35
+ # @param log_dir [string] directory to save the log
36
+ # @param data_key [string] The data key to retrieve the data from the OpenStudio object
37
+ # @param remaining_keys [str] Any additional keys in the path
38
+ # @return [OpenStudio::Model::Component] the OpenStudio Object or exception raise
39
+ def prm_get_optional_handler(component, log_dir, data_key, *remaining_keys)
40
+ target_data = component.send(data_key)
41
+ prm_raise(target_data.is_initialized,
42
+ log_dir,
43
+ "Failed to retrieve data: #{data_key} from #{prm_get_component_name(component)}"
44
+ )
45
+ target_data_get = target_data.get
46
+ return remaining_keys.length == 0 ? target_data_get : prm_get_optional_handler(target_data_get, log_dir, remaining_keys[0], *remaining_keys[1...])
47
+ end
48
+
49
+ # This is a PRM handler to get a name from an OpenStudio object instance
50
+ # If the object instance does not have a name, then it will return the object name.
51
+ #
52
+ # @param component [OpenStudio::Model:Component] an OpenStudio object
53
+ # @return [String] the name of the instance or object name
54
+ def prm_get_component_name(component)
55
+ return 'Model' if component.is_a?(OpenStudio::Model::Model)
56
+
57
+ name = component.iddObjectType.valueName.to_s
58
+ if component.name.is_initialized
59
+ name = component.name.get
60
+ end
61
+ return name
62
+ end
63
+
64
+
65
+ # PRM get an additional property from an OpenStudio object as a boolean,
66
+ # if no such additional property, then return default value.
67
+ # @param component [OpenStudio::Model:Component] the component to get the additional property from
68
+ # @param key [String] key string
69
+ # @param default [Boolean] the default to return when there is no matching key
70
+ # @return [Boolean] boolean value
71
+ def get_additional_property_as_boolean(component, key, default = false)
72
+ value = default
73
+ if component.additionalProperties.getFeatureAsBoolean(key).is_initialized
74
+ value = component.additionalProperties.getFeatureAsBoolean(key).get
75
+ else
76
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.utilities', "Cannot find the #{key} in component: #{component.name.get}, default value #{default} is used.")
77
+ end
78
+ return value
79
+ end
80
+
81
+ # PRM get an additional property from an OpenStudio object as a double,
82
+ # if no such additional property, then return default value.
83
+ # @param component [OpenStudio::Model::Component] the component to get the additional property from
84
+ # @param key [String] key string
85
+ # @param default [Integer] the default to return when there is no matching key
86
+ # @return [Integer] Integer value
87
+ def get_additional_property_as_integer(component, key, default = 0.0)
88
+ value = default
89
+ if component.additionalProperties.getFeatureAsInteger(key).is_initialized
90
+ value = component.additionalProperties.getFeatureAsInteger(key).get
91
+ else
92
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.utilities', "Cannot find the #{key} in component: #{component.name.get}, default value #{default} is used.")
93
+ end
94
+ return value
95
+ end
96
+
97
+ # PRM get an additional property from an OpenStudio object as a double,
98
+ # if no such additional property, then return default value.
99
+ # @param component [OpenStudio::Model::Component] the component to get the additional property from
100
+ # @param key [String] key string
101
+ # @param default [Double] the default to return when there is no matching key
102
+ # @return [Double] Double value
103
+ def get_additional_property_as_double(component, key, default = 0.0)
104
+ value = default
105
+ if component.additionalProperties.getFeatureAsDouble(key).is_initialized
106
+ value = component.additionalProperties.getFeatureAsDouble(key).get
107
+ else
108
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.utilities', "Cannot find the #{key} in component: #{component.name.get}, default value #{default} is used.")
109
+ end
110
+ return value
111
+ end
112
+
113
+ # PRM get an additional property from an OpenStudio object as a string,
114
+ # if no such additional property, then return default value.
115
+ # @param component [OpenStudio::Model::Component] the component to get the additional property from
116
+ # @param key [String] key string
117
+ # @param default [String] the default to return when there is no matching key
118
+ # @return [String] String value
119
+ def get_additional_property_as_string(component, key, default = "")
120
+ value = default
121
+ if component.additionalProperties.getFeatureAsString(key).is_initialized
122
+ value = component.additionalProperties.getFeatureAsString(key).get
123
+ else
124
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.utilities', "Cannot find the #{key} in component: #{component.name.get}, default value #{default} is used.")
125
+ end
126
+ return value
127
+ end
128
+
@@ -39,11 +39,10 @@ end
39
39
  # A function that writes error message to log file and stop the execution.
40
40
  #
41
41
  # @param msg [String] error message
42
- # @param log_level [OpenStudio::LogLevel] log level, eg. OpenStudio::Info
43
42
  # @param log_path [String] the log file directory
44
43
  # @param debug [Boolean] debug mode
45
44
  def terminate_prm_write_log(msg, log_path, debug = false)
46
- OpenStudio.logFree(OpenStudio::ERROR, 'prm.log', msg)
45
+ OpenStudio.logFree(OpenStudio::Error, 'prm.log', msg)
47
46
  log_messages_to_file_prm("#{log_path}/prm.log", debug)
48
47
  raise msg
49
48
  end
@@ -52,7 +51,7 @@ end
52
51
  #
53
52
  # @param file_path [String] the file path to the log file
54
53
  # @param debug [Boolean] debug mode
55
- # @return message [Array] array of message strings
54
+ # @return [Array] array of message strings
56
55
  def log_messages_to_file_prm(file_path, debug = false)
57
56
  messages = []
58
57
 
@@ -1,20 +1,41 @@
1
- #
2
- # Get hash of object field names and values
3
- # @author: Xuechen (Jerry) Lei, PNNL
4
- # @param obj [object]
5
- #
6
- # @return [Hash<String>] FieldName:Value
7
- #
8
- def getObjectHash(obj)
9
- fields_array = obj.to_s.split(/\n/)
10
- output_hash = { 'object type' => fields_array.shift.split(/,/)[0] }
11
- right = nil
12
- fields_array.each do |ori_field|
13
- left, right = ori_field.split(/[,;]/)
14
- left = left.strip
15
- right.slice!('!-')
16
- right = right.strip
17
- output_hash[right] = left
1
+ Standard.class_eval do
2
+ # A set of method to manipulate objects
3
+
4
+ # Get hash of object field names and values
5
+ # @author: Xuechen (Jerry) Lei, PNNL
6
+ # @param obj [object]
7
+ #
8
+ # @return [Hash<String>] FieldName:Value
9
+ #
10
+ def model_get_object_hash(obj)
11
+ fields_array = obj.to_s.split(/\n/)
12
+ output_hash = { 'object type' => fields_array.shift.split(/,/)[0] }
13
+ right = nil
14
+ fields_array.each do |ori_field|
15
+ left, right = ori_field.split(/[,;]/)
16
+ left = left.strip
17
+ right.slice!('!-')
18
+ right = right.strip
19
+ output_hash[right] = left
20
+ end
21
+ return output_hash
22
+ end
23
+
24
+ # This method is used to automatically cast a model
25
+ # object based on its IDD object type
26
+ #
27
+ # @param [OpenStudio::Model::ModelObject]
28
+ # @return Casted OpenStudio object or nil if the cast was not possible
29
+ def model_cast_model_object(model_object)
30
+ model_object_type = model_object.iddObjectType.valueName.to_s.sub('OS_', '').strip.sub('_', '')
31
+ casting_method_name = "to_#{model_object_type}"
32
+ casted_object = nil
33
+
34
+ # Make sure that the the casting method can be applied
35
+ if model_object.respond_to?(casting_method_name)
36
+ casted_object = model_object.public_send(casting_method_name).get
37
+ end
38
+
39
+ return casted_object
18
40
  end
19
- return output_hash
20
41
  end
@@ -54,12 +54,14 @@ class ScheduleTranslator
54
54
  end
55
55
 
56
56
  # Convert from scheduleCompact to scheduleRuleset
57
- # @Author Nicholas Long and Andrew Parker, NREL
58
- # @Return ScheduleRuleset object
57
+ # @author Nicholas Long and Andrew Parker, NREL
58
+ # @return [OpenStudio::Model::ScheduleRuleset] OpenStudio ScheduleRuleset object
59
+ # @todo will fail if no limits set in source schedule
59
60
  def convert_schedule_compact_to_schedule_ruleset
60
61
  @sched_name = @os_schedule.getString(1).get
61
62
  @sched_name = "#{@name_prefix} #{@sched_name}" unless @name_prefix.nil?
62
- @sched_type = @os_schedule.scheduleTypeLimits.get # TODO: - will fail if no limits set in source schedule
63
+ # @todo will fail if no limits set in source schedule
64
+ @sched_type = @os_schedule.scheduleTypeLimits.get
63
65
 
64
66
  # puts "Translating #{@sched_name}"
65
67
 
@@ -115,9 +117,9 @@ class ScheduleTranslator
115
117
  next
116
118
  end
117
119
 
118
- dVal = @os_schedule.getDouble(i).get
120
+ d_val = @os_schedule.getDouble(i).get
119
121
  # puts "thru: #{i_thru} for: #{i_for} until #{i_until}"
120
- @schedule[i_thru][:for][i_for][:until] << { timestamp: sUntil, value: dVal }
122
+ @schedule[i_thru][:for][i_for][:until] << { timestamp: sUntil, value: d_val }
121
123
  end
122
124
 
123
125
  # DEBUG spit out the schedule for quick check\
@@ -169,7 +171,7 @@ class ScheduleTranslator
169
171
  os_schedule_rule.setEndDate(osdate_end)
170
172
 
171
173
  # create os day model
172
- # TODO break this out as a method
174
+ # @todo break this out as a method
173
175
  if fr[:daytype].include?('monday') || fr[:daytype].include?('alldays') || fr[:daytype].include?('weekdays')
174
176
  os_schedule_rule.setApplyMonday(true)
175
177
  coverage[:mon] = true
@@ -5,7 +5,7 @@ Standard.class_eval do
5
5
  #
6
6
  # @param model [OpenStudio::Model::Model] OpenStudio model object
7
7
  # @param run_dir [String] file path location for the annual run, defaults to 'Run' in the current directory
8
- # @return [Bool] returns true if successful, false if not
8
+ # @return [Boolean] returns true if successful, false if not
9
9
  def model_run_simulation_and_log_errors(model, run_dir = "#{Dir.pwd}/Run")
10
10
  # Make the directory if it doesn't exist
11
11
  unless Dir.exist?(run_dir)
@@ -17,7 +17,7 @@ Standard.class_eval do
17
17
  osm_name = 'in.osm'
18
18
  osw_name = 'in.osw'
19
19
  OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Model', "Starting simulation here: #{run_dir}.")
20
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', "Running simulation #{run_dir}.")
20
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', "Started simulation #{run_dir} at #{Time.now.strftime('%T.%L')}")
21
21
  forward_translator = OpenStudio::EnergyPlus::ForwardTranslator.new
22
22
  idf = forward_translator.translateModel(model)
23
23
  idf_path = OpenStudio::Path.new("#{run_dir}/#{idf_name}")
@@ -82,7 +82,7 @@ Standard.class_eval do
82
82
 
83
83
  sql_path = OpenStudio::Path.new("#{run_dir}/EnergyPlus/eplusout.sql")
84
84
 
85
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished run.')
85
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', "Finished simulation #{run_dir} at #{Time.now.strftime('%T.%L')}")
86
86
 
87
87
  else # method to running simulation within measure using OpenStudio 2.x WorkflowJSON
88
88
 
@@ -103,7 +103,7 @@ Standard.class_eval do
103
103
 
104
104
  # 'touch' the weather file - for some odd reason this fixes the simulation not running issue we had on openstudio-server.
105
105
  # Removed for until further investigation completed.
106
- #FileUtils.touch("#{run_dir}/#{epw_name}")
106
+ # FileUtils.touch("#{run_dir}/#{epw_name}")
107
107
 
108
108
  cli_path = OpenStudio.getOpenStudioCLI
109
109
  cmd = "\"#{cli_path}\" run -w \"#{osw_path}\""
@@ -113,7 +113,7 @@ Standard.class_eval do
113
113
  # Run the sizing run
114
114
  OpenstudioStandards.run_command(cmd)
115
115
 
116
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished run.')
116
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', "Finished simulation #{run_dir} at #{Time.now.strftime('%T.%L')}")
117
117
 
118
118
  sql_path = OpenStudio::Path.new("#{run_dir}/run/eplusout.sql")
119
119
 
@@ -183,7 +183,7 @@ Standard.class_eval do
183
183
  #
184
184
  # @param model [OpenStudio::Model::Model] OpenStudio model object
185
185
  # @param sizing_run_dir [String] file path location for the sizing run, defaults to 'SR' in the current directory
186
- # @return [Bool] returns true if successful, false if not
186
+ # @return [Boolean] returns true if successful, false if not
187
187
  def model_run_sizing_run(model, sizing_run_dir = "#{Dir.pwd}/SR")
188
188
  # Change the simulation to only run the sizing days
189
189
  sim_control = model.getSimulationControl
@@ -213,14 +213,12 @@ Standard.class_eval do
213
213
  # Method to check if all zones have surfaces. This is required to run a simulation.
214
214
  #
215
215
  # @param model [OpenStudio::Model::Model] OpenStudio model object
216
- # @return [Bool] returns true if successful, false if not
216
+ # @return [Boolean] returns true if successful, false if not
217
217
  def model_do_all_zones_have_surfaces?(model)
218
218
  # Check to see if all zones have surfaces.
219
219
  model.getThermalZones.each do |zone|
220
220
  if BTAP::Geometry::Surfaces.get_surfaces_from_thermal_zones([zone]).empty?
221
- error_string = "Error: Thermal zone #{zone.name} does not contain surfaces.\n"
222
- puts error_string
223
- OpenStudio.logFree(OpenStudio::Error, 'openstudio.Siz.Model', error_string)
221
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.simulation', "Thermal zone #{zone.name} does not contain surfaces.\n")
224
222
  return false
225
223
  end
226
224
  end
@@ -283,7 +281,22 @@ Standard.class_eval do
283
281
  model_run_sizing_run(model, sizing_run_dir)
284
282
  model.getSpaces.each do |space|
285
283
  unless space.thermalZone.empty?
286
- space_load_array << { 'space_name' => space.name, 'CoolingDesignLoad' => space.thermalZone.get.coolingDesignLoad, 'HeatingDesignLoad' => space.thermalZone.get.heatingDesignLoad }
284
+ # error if zone design load methods are not available
285
+ if space.model.version < OpenStudio::VersionString.new('3.6.0')
286
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.simulation', 'Required ThermalZone methods .autosizedHeatingDesignLoad and .autosizedCoolingDesignLoad are not available in pre-OpenStudio 3.6.0 versions. Use a more recent version of OpenStudio.')
287
+ end
288
+
289
+ space_cooling_load = 0.0
290
+ if space.thermalZone.get.autosizedCoolingDesignLoad.is_initialized
291
+ space_cooling_load = space.thermalZone.get.autosizedCoolingDesignLoad.get
292
+ end
293
+
294
+ space_heating_load = 0.0
295
+ if space.thermalZone.get.autosizedHeatingDesignLoad.is_initialized
296
+ space_heating_load = space.thermalZone.get.autosizedHeatingDesignLoad.get
297
+ end
298
+
299
+ space_load_array << { 'space_name' => space.name, 'CoolingDesignLoad' => space_cooling_load, 'HeatingDesignLoad' => space_heating_load }
287
300
  end
288
301
  end
289
302
  puts space_load_array
@@ -412,10 +412,10 @@ Standard.class_eval do
412
412
  return heating_or_cooling_setpoint_unmet
413
413
  end
414
414
 
415
- # Get the total unmet load hours during occupancy of a model that has been simulated
415
+ # Get the total unmet load hours during occupancy of a model that has been simulated
416
416
  #
417
417
  # @param model [OpenStudio::Model::Model] OpenStudio model object
418
- # @return [Float] returns the number of total unmet load hours during occupancy in a simulated model
418
+ # @return [Double] returns the number of total unmet load hours during occupancy in a simulated model
419
419
  def model_get_unmet_load_hours(model)
420
420
  result = OpenStudio::OptionalDouble.new
421
421
  sql = model.sqlFile
@@ -451,7 +451,7 @@ Standard.class_eval do
451
451
 
452
452
  return result
453
453
  end
454
-
454
+
455
455
  # Gets the model annual energy consumption by fuel and enduse in GJ from the sql file
456
456
  #
457
457
  # @param model [OpenStudio::Model::Model] OpenStudio model object
@@ -556,8 +556,13 @@ Standard.class_eval do
556
556
  energy_values = {}
557
557
 
558
558
  # List of all fuel types, based on Table 5.1 of EnergyPlus' Input Output Reference manual
559
- fuel_types = ['Electricity', 'Gas', 'Gasoline', 'Diesel', 'Coal', 'FuelOilNo1', 'FuelOilNo2', 'Propane', 'OtherFuel1', 'OtherFuel2', 'Water', 'Steam', 'DistrictCooling',
560
- 'DistrictHeating', 'ElectricityPurchased', 'ElectricitySurplusSold', 'ElectricityNet']
559
+ if model.version < OpenStudio::VersionString.new('3.7.0')
560
+ fuel_types = ['Electricity', 'Gas', 'Gasoline', 'Diesel', 'Coal', 'FuelOilNo1', 'FuelOilNo2', 'Propane', 'OtherFuel1', 'OtherFuel2', 'Water', 'Steam', 'DistrictCooling',
561
+ 'DistrictHeating', 'ElectricityPurchased', 'ElectricitySurplusSold', 'ElectricityNet']
562
+ else
563
+ fuel_types = ['Electricity', 'Gas', 'Gasoline', 'Diesel', 'Coal', 'FuelOilNo1', 'FuelOilNo2', 'Propane', 'OtherFuel1', 'OtherFuel2', 'Water', 'DistrictCooling',
564
+ 'DistrictHeatingWater', 'DistrictHeatingSteam', 'ElectricityPurchased', 'ElectricitySurplusSold', 'ElectricityNet']
565
+ end
561
566
 
562
567
  # List of all end uses, based on Table 5.3 of EnergyPlus' Input Output Reference manual
563
568
  end_uses = ['InteriorLights', 'ExteriorLights', 'InteriorEquipment', 'ExteriorEquipment', 'Fans', 'Pumps', 'Heating', 'Cooling', 'HeatRejection', 'Humidifier',
@@ -13,5 +13,5 @@ module OpenstudioStandards
13
13
  end
14
14
  return 'git-not-found-on-this-system'
15
15
  end
16
- VERSION = '0.4.0'.freeze
16
+ VERSION = '0.5.0.rc1'.freeze
17
17
  end
@@ -127,7 +127,7 @@ class Standard
127
127
  # @param model [OpenStudio::Model::Model] OpenStudio model object
128
128
  # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
129
129
  # @param epw_file [String] the name of the epw file; if blank will default to epw file for the ASHRAE climate zone
130
- # @return [Bool] returns true if successful, false if not
130
+ # @return [Boolean] returns true if successful, false if not
131
131
  def model_add_design_days_and_weather_file(model, climate_zone, epw_file = '', weather_dir = nil)
132
132
  success = true
133
133
  require_relative 'Weather.stat_file'
@@ -217,7 +217,7 @@ class Standard
217
217
  # @param model [OpenStudio::Model::Model] OpenStudio model object
218
218
  # @param [String] openstudio-standards building type
219
219
  # @param [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
220
- # @return [Bool] returns true if successful, false if not
220
+ # @return [Boolean] returns true if successful, false if not
221
221
  def model_add_ground_temperatures(model, building_type, climate_zone)
222
222
  # Define the weather file for each climate zone
223
223
  climate_zone_weather_file_map = model_get_climate_zone_weather_file_map
@@ -636,7 +636,7 @@ module BTAP
636
636
 
637
637
  # This method will set the weather file and returns a log string.
638
638
  # @author phylroy.lopez@nrcan.gc.ca
639
- # @param model [OpenStudio::model::Model] A model object
639
+ # @param model [OpenStudio::Model::Model] A model object
640
640
  # @return [String] log
641
641
  def set_weather_file(model, runner = nil)
642
642
  BTAP.runner_register('Info', 'BTAP::Environment::WeatherFile::set_weather', runner)
@@ -915,7 +915,7 @@ module BTAP
915
915
  end
916
916
  end
917
917
  return heating_design_day_number, cooling_design_day_number
918
- end # def get_heating_design_day_number
918
+ end
919
919
 
920
920
  # This method calculates dehumidification degree days (DDD)
921
921
  # @author sara.gilani@canada.ca
@@ -991,11 +991,10 @@ module BTAP
991
991
 
992
992
  ddd += line[CALCULATED_HUMIDITY_RATIO_AVG_DAILY_DIFF_BASE].to_f
993
993
 
994
- end # unless line.first =~ /\D(.*)/
995
- end # @filearray.each do |line|
996
- # puts @filearray
994
+ end
995
+ end
997
996
  return ddd
998
- end # def calculate_humidity_ratio
999
- end # Environment
997
+ end
998
+ end
1000
999
  end
1001
1000
  end
@@ -317,7 +317,7 @@ module EnergyPlus
317
317
  # use regex to get the temperatures
318
318
  regex = /Daily Avg(.*)\n/
319
319
  match_data = text.match(regex)
320
- if match_data.nil?
320
+ if match_data.nil?
321
321
  puts "Can't find outdoor air temps"
322
322
  raise
323
323
  else
@@ -332,8 +332,8 @@ module EnergyPlus
332
332
 
333
333
  # insert as numbers
334
334
  monthly_temps.each { |temp| @monthly_dry_bulb << temp.to_f }
335
- # puts "#{@monthly_dry_bulb}"
336
- end
335
+ # puts "#{@monthly_dry_bulb}"
336
+ end
337
337
 
338
338
  # use regex to get undisturbed ground temps at 0.5 m depth
339
339
  regex = /Monthly.*Calculated.*undisturbed*.*Ground.*Temperatures.*\n.*Jan.*Feb.*Mar.*Apr.*May.*Jun.*Jul.*Aug.*Sep.*Oct.*Nov.*Dec.*\n(.*)\n(.*)\n(.*)/
@@ -0,0 +1,35 @@
1
+ # Methods to create Schedule objects
2
+ module OpenstudioStandards
3
+ module Weather
4
+ # @!group Information
5
+
6
+ # get the ASHRAE climate zone number
7
+ #
8
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
9
+ # @return [Integer] ASHRAE climate zone number, 0-8
10
+ def self.model_get_ashrae_climate_zone_number(model)
11
+ # get ashrae climate zone from model
12
+ ashrae_climate_zone = ''
13
+ model.getClimateZones.climateZones.each do |climate_zone|
14
+ if climate_zone.institution == 'ASHRAE'
15
+ ashrae_climate_zone = climate_zone.value
16
+ end
17
+ end
18
+
19
+ if ashrae_climate_zone == ''
20
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Weather', 'Please assign an ASHRAE Climate Zone to your model.')
21
+ return false
22
+ else
23
+ cz_number = ashrae_climate_zone.split(//).first.to_i
24
+ end
25
+
26
+ # expected climate zone number should be 0 through 8
27
+ if ![0, 1, 2, 3, 4, 5, 6, 7, 8].include? cz_number
28
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Weather', 'ASHRAE climate zone number is not within expected range of 1 to 8.')
29
+ return false
30
+ end
31
+
32
+ return cz_number
33
+ end
34
+ end
35
+ end