openstudio-standards 0.2.17.rc2 → 0.3.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +4 -4
  2. data/data/geometry/ASHRAESuperMarket.json +29 -38
  3. data/data/standards/OpenStudio_Standards-deer-ALL-comstock(space_types).xlsx +0 -0
  4. data/data/standards/metadata_units_OpenStudio_Standards-deer-ALL-comstockspace_types.csv +172 -0
  5. data/data/standards/test_performance_expected_dd_results.csv +12 -12
  6. data/lib/openstudio-standards/btap/analysis.rb +389 -389
  7. data/lib/openstudio-standards/btap/bridging.rb +2099 -0
  8. data/lib/openstudio-standards/btap/btap.model.rb +717 -717
  9. data/lib/openstudio-standards/btap/btap.rb +33 -30
  10. data/lib/openstudio-standards/btap/economics.rb +1163 -1163
  11. data/lib/openstudio-standards/btap/envelope.rb +4 -4
  12. data/lib/openstudio-standards/btap/equest.rb +2524 -2524
  13. data/lib/openstudio-standards/btap/fileio.rb +9 -0
  14. data/lib/openstudio-standards/btap/measures.rb +1515 -1515
  15. data/lib/openstudio-standards/btap/mpc.rb +554 -554
  16. data/lib/openstudio-standards/btap/reporting.rb +287 -287
  17. data/lib/openstudio-standards/btap/simmanager.rb +759 -759
  18. data/lib/openstudio-standards/btap/spaceloads.rb +439 -439
  19. data/lib/openstudio-standards/btap/spacetypes.rb +113 -113
  20. data/lib/openstudio-standards/btap/utilities.rb +134 -134
  21. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb +8 -83
  22. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb +3 -99
  23. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +81 -75
  24. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +7 -306
  25. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +70 -98
  26. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +41 -14
  27. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +40 -14
  28. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +1 -23
  29. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.exterior_lights.rb +7 -7
  30. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +5 -1
  31. data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +101 -4
  32. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +16 -1
  33. data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +5 -4
  34. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +24 -4
  35. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +18 -2
  36. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +18 -0
  37. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +13 -10
  38. data/lib/openstudio-standards/standards/Standards.CoilDX.rb +5 -3
  39. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +11 -8
  40. data/lib/openstudio-standards/standards/Standards.Construction.rb +1 -1
  41. data/lib/openstudio-standards/standards/Standards.Model.rb +68 -52
  42. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +2 -2
  43. data/lib/openstudio-standards/standards/Standards.Space.rb +16 -18
  44. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +1 -1
  45. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +5 -5
  46. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_cases.json +510 -0
  47. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_compressors.json +18 -0
  48. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_walkins.json +410 -0
  49. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +2 -2
  50. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_cases.json +510 -0
  51. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_compressors.json +18 -0
  52. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_walkins.json +410 -0
  53. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +2 -2
  54. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_cases.json +510 -0
  55. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_compressors.json +18 -0
  56. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_walkins.json +410 -0
  57. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +2 -2
  58. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_cases.json +510 -0
  59. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_compressors.json +18 -0
  60. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_walkins.json +410 -0
  61. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +2 -2
  62. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +2 -2
  63. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +2 -2
  64. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.entryways.json +13 -2
  65. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.parking.json +11 -2
  66. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +9 -0
  67. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -0
  68. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +4 -3
  69. data/lib/openstudio-standards/standards/deer/deer_1985/comstock_deer_1985/data/comstock_deer_1985.spc_typ.json +405 -405
  70. data/lib/openstudio-standards/standards/deer/deer_1996/comstock_deer_1996/data/comstock_deer_1996.spc_typ.json +405 -405
  71. data/lib/openstudio-standards/standards/deer/deer_2003/comstock_deer_2003/data/comstock_deer_2003.spc_typ.json +405 -405
  72. data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.ThermalZone.rb +21 -0
  73. data/lib/openstudio-standards/standards/deer/deer_2007/comstock_deer_2007/data/comstock_deer_2007.spc_typ.json +405 -405
  74. data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.ThermalZone.rb +21 -0
  75. data/lib/openstudio-standards/standards/deer/deer_2011/comstock_deer_2011/data/comstock_deer_2011.spc_typ.json +405 -405
  76. data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.ThermalZone.rb +21 -0
  77. data/lib/openstudio-standards/standards/deer/deer_2014/comstock_deer_2014/data/comstock_deer_2014.spc_typ.json +405 -405
  78. data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.ThermalZone.rb +21 -0
  79. data/lib/openstudio-standards/standards/deer/deer_2015/comstock_deer_2015/data/comstock_deer_2015.spc_typ.json +405 -405
  80. data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.ThermalZone.rb +21 -0
  81. data/lib/openstudio-standards/standards/deer/deer_2017/comstock_deer_2017/data/comstock_deer_2017.spc_typ.json +405 -405
  82. data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.ThermalZone.rb +21 -0
  83. data/lib/openstudio-standards/standards/deer/deer_2020/comstock_deer_2020/data/comstock_deer_2020.spc_typ.json +405 -405
  84. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +8 -0
  85. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.ThermalZone.rb +21 -0
  86. data/lib/openstudio-standards/standards/deer/deer_2025/comstock_deer_2025/data/comstock_deer_2025.spc_typ.json +405 -405
  87. data/lib/openstudio-standards/standards/deer/deer_2030/comstock_deer_2030/data/comstock_deer_2030.spc_typ.json +405 -405
  88. data/lib/openstudio-standards/standards/deer/deer_2035/comstock_deer_2035/data/comstock_deer_2035.spc_typ.json +405 -405
  89. data/lib/openstudio-standards/standards/deer/deer_2040/comstock_deer_2040/data/comstock_deer_2040.spc_typ.json +405 -405
  90. data/lib/openstudio-standards/standards/deer/deer_2045/comstock_deer_2045/data/comstock_deer_2045.spc_typ.json +405 -405
  91. data/lib/openstudio-standards/standards/deer/deer_2050/comstock_deer_2050/data/comstock_deer_2050.spc_typ.json +405 -405
  92. data/lib/openstudio-standards/standards/deer/deer_2055/comstock_deer_2055/data/comstock_deer_2055.spc_typ.json +405 -405
  93. data/lib/openstudio-standards/standards/deer/deer_2060/comstock_deer_2060/data/comstock_deer_2060.spc_typ.json +405 -405
  94. data/lib/openstudio-standards/standards/deer/deer_2065/comstock_deer_2065/data/comstock_deer_2065.spc_typ.json +405 -405
  95. data/lib/openstudio-standards/standards/deer/deer_2070/comstock_deer_2070/data/comstock_deer_2070.spc_typ.json +405 -405
  96. data/lib/openstudio-standards/standards/deer/deer_2075/comstock_deer_2075/data/comstock_deer_2075.spc_typ.json +405 -405
  97. data/lib/openstudio-standards/standards/deer/deer_pre_1975/comstock_deer_pre_1975/data/comstock_deer_pre_1975.spc_typ.json +405 -405
  98. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +1 -1
  99. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +3 -1
  100. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +3 -1
  101. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +2 -2
  102. data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +233 -0
  103. data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +180 -0
  104. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +6 -1
  105. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +807 -258
  106. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +102 -66
  107. data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +85 -8
  108. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartment.osm +2483 -992
  109. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LowriseApartment.osm +4 -336
  110. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/MidriseApartment.osm +228 -231
  111. data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +12 -18
  112. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_type_unit_definitions.txt +76 -0
  113. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +6 -1
  114. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +111 -24
  115. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +1 -0
  116. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +3 -1
  117. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +64 -16
  118. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +61 -17
  119. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +128 -0
  120. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +252 -23
  121. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +316 -20
  122. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +1 -1
  123. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +4 -6
  124. data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +38 -0
  125. data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +16 -24
  126. data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +48 -25
  127. data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +3 -3
  128. data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +36 -19
  129. data/lib/openstudio-standards/standards/necb/NECB2020/data/furnaces.json +19 -4
  130. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps.json +20 -40
  131. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +74 -36
  132. data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +0 -2
  133. data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +124 -57
  134. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +124 -2
  135. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +15 -2
  136. data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
  137. data/lib/openstudio-standards/utilities/simulation.rb +1 -1
  138. data/lib/openstudio-standards/version.rb +1 -1
  139. data/lib/openstudio-standards/weather/Weather.Model.rb +5 -0
  140. data/lib/openstudio-standards/weather/Weather.stat_file.rb +33 -1
  141. data/lib/openstudio-standards.rb +1 -0
  142. metadata +14 -121
  143. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  144. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.ddy +0 -2342
  145. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.epw +0 -8768
  146. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.stat +0 -700
  147. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.ddy +0 -2342
  148. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.epw +0 -8768
  149. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.stat +0 -700
  150. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.ddy +0 -2342
  151. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.epw +0 -8768
  152. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.stat +0 -700
  153. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.ddy +0 -276
  154. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.epw +0 -8768
  155. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.stat +0 -611
  156. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.ddy +0 -276
  157. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.epw +0 -8768
  158. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.stat +0 -610
  159. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.ddy +0 -2342
  160. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.epw +0 -8768
  161. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.stat +0 -700
  162. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.ddy +0 -2342
  163. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.epw +0 -8768
  164. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.stat +0 -700
  165. data/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb +0 -81
  166. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb +0 -27
  167. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb +0 -69
  168. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +0 -178
  169. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb +0 -27
  170. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb +0 -27
  171. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb +0 -27
  172. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb +0 -27
  173. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb +0 -67
  174. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb +0 -27
  175. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb +0 -30
  176. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb +0 -27
  177. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb +0 -27
  178. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb +0 -68
  179. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb +0 -68
  180. data/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb +0 -42
  181. data/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb +0 -27
  182. data/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb +0 -58
  183. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +0 -171
  184. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb +0 -56
  185. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb +0 -89
  186. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb +0 -50
  187. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -69
  188. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb +0 -120
  189. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb +0 -56
  190. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb +0 -41
  191. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb +0 -27
  192. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb +0 -30
  193. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb +0 -30
  194. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +0 -68
  195. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb +0 -61
  196. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -57
  197. data/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb +0 -27
  198. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +0 -59
  199. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb +0 -49
  200. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb +0 -90
  201. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +0 -83
  202. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +0 -57
  203. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +0 -27
  204. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +0 -27
  205. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb +0 -27
  206. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb +0 -27
  207. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb +0 -27
  208. data/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb +0 -29
  209. data/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb +0 -27
  210. data/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb +0 -29
  211. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +0 -55
  212. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +0 -55
  213. data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb +0 -38
  214. data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb +0 -27
  215. data/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb +0 -27
  216. data/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb +0 -42
  217. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +0 -59
  218. data/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb +0 -59
  219. data/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb +0 -48
  220. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +0 -16
  221. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb +0 -27
  222. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb +0 -27
  223. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb +0 -27
  224. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb +0 -27
  225. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb +0 -27
  226. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb +0 -27
  227. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb +0 -27
  228. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb +0 -27
  229. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb +0 -88
  230. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb +0 -88
  231. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb +0 -104
  232. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb +0 -27
  233. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb +0 -27
@@ -59,7 +59,7 @@ class Standard
59
59
  end
60
60
 
61
61
  # add exterior lights for parking area
62
- if area_length_count_hash[:parking_area_and_drives_area] > 0
62
+ if !area_length_count_hash[:parking_area_and_drives_area].nil? && area_length_count_hash[:parking_area_and_drives_area] > 0
63
63
 
64
64
  # lighting values
65
65
  multiplier = area_length_count_hash[:parking_area_and_drives_area] * onsite_parking_fraction
@@ -86,7 +86,7 @@ class Standard
86
86
  end
87
87
 
88
88
  # add exterior lights for facades
89
- if area_length_count_hash[:building_facades] > 0
89
+ if !area_length_count_hash[:building_facades].nil? && area_length_count_hash[:building_facades] > 0
90
90
 
91
91
  # lighting values
92
92
  multiplier = area_length_count_hash[:building_facades]
@@ -113,7 +113,7 @@ class Standard
113
113
  end
114
114
 
115
115
  # add exterior lights for main entries
116
- if area_length_count_hash[:main_entries] > 0
116
+ if !area_length_count_hash[:main_entries].nil? && area_length_count_hash[:main_entries] > 0
117
117
 
118
118
  # lighting values
119
119
  multiplier = area_length_count_hash[:main_entries]
@@ -140,7 +140,7 @@ class Standard
140
140
  end
141
141
 
142
142
  # add exterior lights for other doors
143
- if area_length_count_hash[:other_doors] > 0
143
+ if !area_length_count_hash[:other_doors].nil? && area_length_count_hash[:other_doors] > 0
144
144
 
145
145
  # lighting values
146
146
  multiplier = area_length_count_hash[:other_doors]
@@ -167,7 +167,7 @@ class Standard
167
167
  end
168
168
 
169
169
  # add exterior lights for entry canopies
170
- if area_length_count_hash[:canopy_entry_area] > 0
170
+ if !area_length_count_hash[:canopy_entry_area].nil? && area_length_count_hash[:canopy_entry_area] > 0
171
171
 
172
172
  # lighting values
173
173
  multiplier = area_length_count_hash[:canopy_entry_area]
@@ -194,7 +194,7 @@ class Standard
194
194
  end
195
195
 
196
196
  # add exterior lights for emergency canopies
197
- if area_length_count_hash[:canopy_emergency_area] > 0
197
+ if !area_length_count_hash[:canopy_emergency_area].nil? && area_length_count_hash[:canopy_emergency_area] > 0
198
198
 
199
199
  # lighting values
200
200
  multiplier = area_length_count_hash[:canopy_emergency_area]
@@ -221,7 +221,7 @@ class Standard
221
221
  end
222
222
 
223
223
  # add exterior lights for drive through windows
224
- if area_length_count_hash[:drive_through_windows] > 0
224
+ if !area_length_count_hash[:drive_through_windows].nil? && area_length_count_hash[:drive_through_windows] > 0
225
225
 
226
226
  # lighting values
227
227
  multiplier = area_length_count_hash[:drive_through_windows]
@@ -2721,7 +2721,11 @@ Standard.class_eval do
2721
2721
  end
2722
2722
  end
2723
2723
  end
2724
- return window_area / wall_area * 100 if wwr
2724
+
2725
+ # check wall area is non-zero
2726
+ if wwr && wall_area > 0
2727
+ return window_area / wall_area * 100
2728
+ end
2725
2729
 
2726
2730
  # else
2727
2731
  return window_area
@@ -307,6 +307,8 @@ class Standard
307
307
  # Creates a heatpump water heater and attaches it to the supplied service water heating loop.
308
308
  #
309
309
  # @param model [OpenStudio::Model::Model] OpenStudio model object
310
+ # @param type [String] valid option are 'WrappedCondenser' or 'PumpedCondenser' (default).
311
+ # The 'WrappedCondenser' uses a WaterHeaterStratified tank, 'PumpedCondenser' uses a WaterHeaterMixed tank.
310
312
  # @param water_heater_capacity [Double] water heater capacity, in W
311
313
  # @param water_heater_volume [Double] water heater volume, in m^3
312
314
  # @param service_water_temperature [Double] water heater temperature, in C
@@ -317,6 +319,7 @@ class Standard
317
319
  # @param flowrate_schedule [String] name of the flow rate schedule
318
320
  # @param water_heater_thermal_zone [OpenStudio::Model::ThermalZone] zone to place water heater in.
319
321
  # If nil, will be assumed in 70F air for heat loss.
322
+ # @param use_ems_control [Bool] if true, use ems control logic if using a 'WrappedCondenser' style HPWH.
320
323
  # @return [OpenStudio::Model::WaterHeaterMixed] the resulting water heater
321
324
  def model_add_heatpump_water_heater(model,
322
325
  type: 'PumpedCondenser',
@@ -332,7 +335,8 @@ class Standard
332
335
  set_peak_use_flowrate: false,
333
336
  peak_flowrate: 0.0,
334
337
  flowrate_schedule: nil,
335
- water_heater_thermal_zone: nil)
338
+ water_heater_thermal_zone: nil,
339
+ use_ems_control: false)
336
340
 
337
341
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.Model.Model', 'Adding heat pump water heater')
338
342
 
@@ -352,9 +356,13 @@ class Standard
352
356
  u_tank = (5.678 * tank_ua) / OpenStudio.convert(tank_surface_area, 'm^2', 'ft^2').get
353
357
  hpwh.setName("#{hpwh_vol_gal.round}gal Heat Pump Water Heater - #{water_heater_capacity_kbtu_per_hr.round(0)}kBtu/hr")
354
358
 
359
+ # set min/max HPWH operating temperature limit
360
+ hpwh_op_min_temp_c = OpenStudio.convert(45.0, 'F', 'C').get
361
+ hpwh_op_max_temp_c = OpenStudio.convert(120.0, 'F', 'C').get
362
+
355
363
  if type == 'WrappedCondenser'
356
- hpwh.setMinimumInletAirTemperatureforCompressorOperation(OpenStudio.convert(45.0, 'F', 'C').get)
357
- hpwh.setMaximumInletAirTemperatureforCompressorOperation(OpenStudio.convert(120.0, 'F', 'C').get)
364
+ hpwh.setMinimumInletAirTemperatureforCompressorOperation(hpwh_op_min_temp_c)
365
+ hpwh.setMaximumInletAirTemperatureforCompressorOperation(hpwh_op_max_temp_c)
358
366
  # set sensor heights
359
367
  if hpwh_vol_gal <= 50.0
360
368
  hpwh.setDeadBandTemperatureDifference(0.5)
@@ -535,7 +543,10 @@ class Standard
535
543
  fan.setFanEfficiency(65.0 / fan_power * OpenStudio.convert(1.0, 'ft^3/min', 'm^3/s').get)
536
544
  fan.setPressureRise(65.0)
537
545
  end
538
- fan.setMaximumFlowRate(OpenStudio.convert(181.0, 'ft^3/min', 'm^3/s').get)
546
+ # determine maximum flow rate from water heater capacity
547
+ # use 5.035E-5 m^3/s/W from EnergyPlus used to autocalculate the evaporator air flow rate in WaterHeater:HeatPump:PumpedCondenser and Coil:WaterHeating:AirToWaterHeatPump:Pumped
548
+ fan_flow_rate_m3_per_s = water_heater_capacity * 5.035e-5
549
+ fan.setMaximumFlowRate(fan_flow_rate_m3_per_s)
539
550
  fan.setMotorEfficiency(1.0)
540
551
  fan.setMotorInAirstreamFraction(1.0)
541
552
  fan.setEndUseSubcategory('Service Hot Water')
@@ -546,6 +557,14 @@ class Standard
546
557
  default_water_heater_ambient_temp_sch = model_add_constant_schedule_ruleset(model,
547
558
  OpenStudio.convert(70.0, 'F', 'C').get,
548
559
  name = 'Water Heater Ambient Temp Schedule - 70F')
560
+ if temp_sch_type_limits.nil?
561
+ temp_sch_type_limits = model_add_schedule_type_limits(model,
562
+ name: 'Temperature Schedule Type Limits',
563
+ lower_limit_value: 0.0,
564
+ upper_limit_value: 100.0,
565
+ numeric_type: 'Continuous',
566
+ unit_type: 'Temperature')
567
+ end
549
568
  default_water_heater_ambient_temp_sch.setScheduleTypeLimits(temp_sch_type_limits)
550
569
  tank.setAmbientTemperatureIndicator('Schedule')
551
570
  tank.setAmbientTemperatureSchedule(default_water_heater_ambient_temp_sch)
@@ -575,6 +594,84 @@ class Standard
575
594
  tank.setUseFlowRateFractionSchedule(schedule)
576
595
  end
577
596
 
597
+ # add EMS for overriding HPWH setpoints schedules (for upper/lower heating element in water tank and compressor in heat pump)
598
+ if type == 'WrappedCondenser' && use_ems_control
599
+ hpwh_name_ems_friendly = ems_friendly_name(hpwh.name)
600
+
601
+ # create an ambient temperature sensor for the air that blows through the HPWH evaporator
602
+ if water_heater_thermal_zone.nil?
603
+ # assume the condenser is outside
604
+ amb_temp_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Site Outdoor Air Drybulb Temperature')
605
+ amb_temp_sensor.setName("#{hpwh_name_ems_friendly}_amb_temp")
606
+ amb_temp_sensor.setKeyName('Environment')
607
+ else
608
+ amb_temp_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Zone Mean Air Temperature')
609
+ amb_temp_sensor.setName("#{hpwh_name_ems_friendly}_amb_temp")
610
+ amb_temp_sensor.setKeyName(water_heater_thermal_zone.name.to_s)
611
+ end
612
+
613
+ # create actuator for heat pump compressor
614
+ if swh_temp_sch.to_ScheduleConstant.is_initialized
615
+ swh_temp_sch = swh_temp_sch.to_ScheduleConstant.get
616
+ schedule_type = 'Schedule:Constant'
617
+ elsif swh_temp_sch.to_ScheduleCompact.is_initialized
618
+ swh_temp_sch = swh_temp_sch.to_ScheduleCompact.get
619
+ schedule_type = 'Schedule:Compact'
620
+ elsif swh_temp_sch.to_ScheduleRuleset.is_initialized
621
+ swh_temp_sch = swh_temp_sch.to_ScheduleRuleset.get
622
+ schedule_type = 'Schedule:Year'
623
+ else
624
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.Prototype.ServiceWaterHeating', "Unsupported schedule type for HPWH setpoint schedule #{swh_temp_sch.name}.")
625
+ return false
626
+ end
627
+ hpwhschedoverride_actuator = OpenStudio::Model::EnergyManagementSystemActuator.new(swh_temp_sch,schedule_type,'Schedule Value')
628
+ hpwhschedoverride_actuator.setName("#{hpwh_name_ems_friendly}_HPWHSchedOverride")
629
+
630
+ # create actuator for lower heating element in water tank
631
+ leschedoverride_actuator = OpenStudio::Model::EnergyManagementSystemActuator.new(hpwh_bottom_element_sp,'Schedule:Constant','Schedule Value')
632
+ leschedoverride_actuator.setName("#{hpwh_name_ems_friendly}_LESchedOverride")
633
+
634
+ # create actuator for upper heating element in water tank
635
+ ueschedoverride_actuator = OpenStudio::Model::EnergyManagementSystemActuator.new(hpwh_top_element_sp,'Schedule:Constant','Schedule Value')
636
+ ueschedoverride_actuator.setName("#{hpwh_name_ems_friendly}_UESchedOverride")
637
+
638
+ # create sensor for heat pump compressor
639
+ t_set_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Schedule Value')
640
+ t_set_sensor.setName("#{hpwh_name_ems_friendly}_T_set")
641
+ t_set_sensor.setKeyName(swh_temp_sch.name.to_s)
642
+
643
+ # define control configuration
644
+ t_offset = 9.0 # deg-C
645
+
646
+ # get tank specifications
647
+ upper_element_db = tank.heater1DeadbandTemperatureDifference
648
+
649
+ # define control logic
650
+ hpwh_ctrl_program = OpenStudio::Model::EnergyManagementSystemProgram.new(model)
651
+ hpwh_ctrl_program.setName("#{hpwh_name_ems_friendly}_Control")
652
+ hpwh_ctrl_program.addLine("SET #{hpwhschedoverride_actuator.name} = #{t_set_sensor.name}")
653
+ # lockout hp when ambient temperature is either too high or too low
654
+ hpwh_ctrl_program.addLine("IF (#{amb_temp_sensor.name}<#{hpwh_op_min_temp_c}) || (#{amb_temp_sensor.name}>#{hpwh_op_max_temp_c})")
655
+ hpwh_ctrl_program.addLine("SET #{ueschedoverride_actuator.name} = #{t_set_sensor.name}")
656
+ hpwh_ctrl_program.addLine("SET #{leschedoverride_actuator.name} = #{t_set_sensor.name}")
657
+ hpwh_ctrl_program.addLine('ELSE')
658
+ # upper element setpoint temperature
659
+ hpwh_ctrl_program.addLine("SET #{ueschedoverride_actuator.name} = #{t_set_sensor.name} - #{t_offset}")
660
+ # upper element cut-in temperature
661
+ hpwh_ctrl_program.addLine("SET #{ueschedoverride_actuator.name}_cut_in = #{ueschedoverride_actuator.name} - #{upper_element_db}")
662
+ # lower element disabled
663
+ hpwh_ctrl_program.addLine("SET #{leschedoverride_actuator.name} = 0")
664
+ # lower element disabled
665
+ hpwh_ctrl_program.addLine("SET #{leschedoverride_actuator.name}_cut_in = 0")
666
+ hpwh_ctrl_program.addLine('ENDIF')
667
+
668
+ # create a program calling manager
669
+ program_calling_manager = OpenStudio::Model::EnergyManagementSystemProgramCallingManager.new(model)
670
+ program_calling_manager.setName("#{hpwh_name_ems_friendly}_ProgramManager")
671
+ program_calling_manager.setCallingPoint('InsideHVACSystemIterationLoop')
672
+ program_calling_manager.addProgram(hpwh_ctrl_program)
673
+ end
674
+
578
675
  return hpwh
579
676
  end
580
677
 
@@ -371,6 +371,19 @@ class Standard
371
371
  chiller.setChillerFlowMode('ConstantFlow')
372
372
  chiller.setSizingFactor(chiller_sizing_factor)
373
373
 
374
+ # use default efficiency from 90.1-2019
375
+ # 1.188 kw/ton for a 150 ton AirCooled chiller
376
+ # 0.66 kw/ton for a 150 ton Water Cooled positive displacement chiller
377
+ case chiller_cooling_type
378
+ when 'AirCooled'
379
+ default_cop = kw_per_ton_to_cop(1.188)
380
+ when 'WaterCooled'
381
+ default_cop = kw_per_ton_to_cop(0.66)
382
+ else
383
+ default_cop = kw_per_ton_to_cop(0.66)
384
+ end
385
+ chiller.setReferenceCOP(default_cop)
386
+
374
387
  # connect the chiller to the condenser loop if one was supplied
375
388
  if condenser_water_loop.nil?
376
389
  chiller.setCondenserType('AirCooled')
@@ -3264,7 +3277,9 @@ class Standard
3264
3277
  # To solve the issue, add economizer here for cold climates
3265
3278
  # select the climate zones with winter design temperature lower than -20C (for safer)
3266
3279
  cold_climates = ['ASHRAE 169-2006-6A', 'ASHRAE 169-2006-6B', 'ASHRAE 169-2006-7A',
3267
- 'ASHRAE 169-2006-7B', 'ASHRAE 169-2006-8A', 'ASHRAE 169-2006-8B']
3280
+ 'ASHRAE 169-2006-7B', 'ASHRAE 169-2006-8A', 'ASHRAE 169-2006-8B',
3281
+ 'ASHRAE 169-2013-6A', 'ASHRAE 169-2013-6B', 'ASHRAE 169-2013-7A',
3282
+ 'ASHRAE 169-2013-7B', 'ASHRAE 169-2013-8A', 'ASHRAE 169-2013-8B']
3268
3283
  if cold_climates.include? climate_zone
3269
3284
  # Determine the economizer type in the prototype buildings, which depends on climate zone.
3270
3285
  economizer_type = model_economizer_type(model, climate_zone)
@@ -108,7 +108,9 @@ class Standard
108
108
  ref_case.setCaseAntiSweatHeaterPowerperUnitLength(anti_sweat_power)
109
109
  end
110
110
  ref_case.setFractionofAntiSweatHeaterEnergytoCase(fractionofantisweatheaterenergytocase)
111
- ref_case.setFractionofLightingEnergytoCase(fraction_of_lighting_energy_to_case)
111
+ if props['fraction_of_lighting_energy_to_case']
112
+ ref_case.setFractionofLightingEnergytoCase(fraction_of_lighting_energy_to_case)
113
+ end
112
114
  if props['minimum_anti_sweat_heater_power_per_unit_length']
113
115
  ref_case.setMinimumAntiSweatHeaterPowerperUnitLength(minimum_anti_sweat_heater_power_per_unit_length)
114
116
  end
@@ -221,6 +223,8 @@ class Standard
221
223
  end
222
224
  if props['reachin_door_area']
223
225
  reachin_door_area = OpenStudio.convert(props['reachin_door_area'], 'ft^2', 'm^2').get
226
+ else
227
+ reachin_door_area = 0.0
224
228
  end
225
229
  if props['total_insulated_surface_area']
226
230
  total_insulated_surface_area = OpenStudio.convert(props['total_insulated_surface_area'], 'ft^2', 'm^2').get
@@ -250,9 +254,6 @@ class Standard
250
254
  if total_insulated_surface_area.nil?
251
255
  total_insulated_surface_area = 1.7226 * floor_surface_area + 28.653
252
256
  end
253
- if reachin_door_area.nil?
254
- reachin_door_area = reachin_door_area_mult * floor_surface_area
255
- end
256
257
  if fan_power.nil?
257
258
  fan_power = fan_power_mult * rated_cooling_capacity
258
259
  end
@@ -514,6 +514,7 @@ class Standard
514
514
  # z = C1 + C2*x + C3*x^2 + C4*y + C5*y^2 + C6*x*y
515
515
  #
516
516
  # @author Scott Horowitz, NREL
517
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
517
518
  # @param coeffs [Array<Double>] an array of 6 coefficients, in order
518
519
  # @param crv_name [String] the name of the curve
519
520
  # @param min_x [Double] the minimum value of independent variable X that will be used
@@ -545,6 +546,7 @@ class Standard
545
546
  # z = C1 + C2*x + C3*x^2 + C4*y + C5*y^2 + C6*x*y + C7*x^3 + C8*y^3 + C9*x^2*y + C10*x*y^2
546
547
  #
547
548
  # @author Scott Horowitz, NREL
549
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
548
550
  # @param coeffs [Array<Double>] an array of 10 coefficients, in order
549
551
  # @param crv_name [String] the name of the curve
550
552
  # @param min_x [Double] the minimum value of independent variable X that will be used
@@ -580,6 +582,7 @@ class Standard
580
582
  # z = C1 + C2*x + C3*x^2
581
583
  #
582
584
  # @author Scott Horowitz, NREL
585
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
583
586
  # @param coeffs [Array<Double>] an array of 3 coefficients, in order
584
587
  # @param crv_name [String] the name of the curve
585
588
  # @param min_x [Double] the minimum value of independent variable X that will be used
@@ -610,6 +613,7 @@ class Standard
610
613
  # z = C1 + C2*x + C3*x^2 + C4*x^3
611
614
  #
612
615
  # @author Scott Horowitz, NREL
616
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
613
617
  # @param coeffs [Array<Double>] an array of 4 coefficients, in order
614
618
  # @param crv_name [String] the name of the curve
615
619
  # @param min_x [Double] the minimum value of independent variable X that will be used
@@ -617,8 +621,8 @@ class Standard
617
621
  # @param min_out [Double] the minimum value of dependent variable Z
618
622
  # @param max_out [Double] the maximum value of dependent variable Z
619
623
  # @return [OpenStudio::Model::CurveCubic] a cubic curve
620
- def create_curve_cubic(coeffs, crv_name, min_x, max_x, min_out, max_out)
621
- curve = OpenStudio::Model::CurveCubic.new(self)
624
+ def create_curve_cubic(model, coeffs, crv_name, min_x, max_x, min_out, max_out)
625
+ curve = OpenStudio::Model::CurveCubic.new(model)
622
626
  curve.setName(crv_name)
623
627
  curve.setCoefficient1Constant(coeffs[0])
624
628
  curve.setCoefficient2x(coeffs[1])
@@ -635,6 +639,7 @@ class Standard
635
639
  # z = C1 + C2*x^C3
636
640
  #
637
641
  # @author Scott Horowitz, NREL
642
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
638
643
  # @param coeffs [Array<Double>] an array of 3 coefficients, in order
639
644
  # @param crv_name [String] the name of the curve
640
645
  # @param min_x [Double] the minimum value of independent variable X that will be used
@@ -642,8 +647,8 @@ class Standard
642
647
  # @param min_out [Double] the minimum value of dependent variable Z
643
648
  # @param max_out [Double] the maximum value of dependent variable Z
644
649
  # @return [OpenStudio::Model::CurveExponent] an exponent curve
645
- def create_curve_exponent(coeffs, crv_name, min_x, max_x, min_out, max_out)
646
- curve = OpenStudio::Model::CurveExponent.new(self)
650
+ def create_curve_exponent(model, coeffs, crv_name, min_x, max_x, min_out, max_out)
651
+ curve = OpenStudio::Model::CurveExponent.new(model)
647
652
  curve.setName(crv_name)
648
653
  curve.setCoefficient1Constant(coeffs[0])
649
654
  curve.setCoefficient2Constant(coeffs[1])
@@ -966,6 +971,21 @@ class Standard
966
971
  return model
967
972
  end
968
973
 
974
+ # converts existing string to ems friendly string
975
+ #
976
+ # @param name [String] original name
977
+ # @return [String] the resulting EMS friendly string
978
+ def ems_friendly_name(name)
979
+ # replace white space and special characters with underscore
980
+ # \W is equivalent to [^a-zA-Z0-9_]
981
+ new_name = name.to_s.gsub(/\W/, '_')
982
+
983
+ # prepend ems_ in case the name starts with a number
984
+ new_name = 'ems_' + new_name
985
+
986
+ return new_name
987
+ end
988
+
969
989
  def true?(obj)
970
990
  obj.to_s.downcase == 'true'
971
991
  end
@@ -315,11 +315,27 @@ class Standard
315
315
  htg_sch = htg_clg_sch[0]
316
316
  clg_sch = htg_clg_sch[1]
317
317
 
318
+ if htg_sch.to_ScheduleConstant.is_initialized
319
+ htg_sch_type = 'Schedule:Constant'
320
+ elsif htg_sch.to_ScheduleCompact.is_initialized
321
+ htg_sch_type = 'Schedule:Compact'
322
+ else
323
+ htg_sch_type = 'Schedule:Year'
324
+ end
325
+
326
+ if clg_sch.to_ScheduleCompact.is_initialized
327
+ clg_sch_type = 'Schedule:Constant'
328
+ elsif clg_sch.to_ScheduleCompact.is_initialized
329
+ clg_sch_type = 'Schedule:Compact'
330
+ else
331
+ clg_sch_type = 'Schedule:Year'
332
+ end
333
+
318
334
  # Actuators
319
- htg_sch_act = OpenStudio::Model::EnergyManagementSystemActuator.new(htg_sch, 'Schedule:Year', 'Schedule Value')
335
+ htg_sch_act = OpenStudio::Model::EnergyManagementSystemActuator.new(htg_sch, htg_sch_type, 'Schedule Value')
320
336
  htg_sch_act.setName("#{loop_name_clean}HtgSch#{i}")
321
337
 
322
- clg_sch_act = OpenStudio::Model::EnergyManagementSystemActuator.new(clg_sch, 'Schedule:Year', 'Schedule Value')
338
+ clg_sch_act = OpenStudio::Model::EnergyManagementSystemActuator.new(clg_sch, clg_sch_type, 'Schedule Value')
323
339
  clg_sch_act.setName("#{loop_name_clean}ClgSch#{i}")
324
340
 
325
341
  # Programs
@@ -53,6 +53,24 @@ class Standard
53
53
  return capacity_w
54
54
  end
55
55
 
56
+ # Find design water flow rate in m^3/s
57
+ #
58
+ # @param boiler_hot_water [OpenStudio::Model::BoilerHotWater] hot water boiler object
59
+ # @return [Double] design water flow rate in m^3/s
60
+ def boiler_hot_water_find_design_water_flow_rate(boiler_hot_water)
61
+ design_water_flow_rate_m3_per_s = nil
62
+ if boiler_hot_water.designWaterFlowRate.is_initialized
63
+ design_water_flow_rate_m3_per_s = boiler_hot_water.designWaterFlowRate.get
64
+ elsif boiler_hot_water.autosizedDesignWaterFlowRate.is_initialized
65
+ design_water_flow_rate_m3_per_s = boiler_hot_water.autosizedDesignWaterFlowRate.get
66
+ else
67
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{boiler_hot_water.name} design water flow rate is not available.")
68
+ return false
69
+ end
70
+
71
+ return design_water_flow_rate_m3_per_s
72
+ end
73
+
56
74
  # Finds lookup object in standards and return minimum thermal efficiency
57
75
  #
58
76
  # @param boiler_hot_water [OpenStudio::Model::BoilerHotWater] hot water boiler object
@@ -6,8 +6,9 @@ class Standard
6
6
  # Finds capacity in W
7
7
  #
8
8
  # @param coil_cooling_dx_single_speed [OpenStudio::Model::CoilCoolingDXSingleSpeed] coil cooling dx single speed object
9
+ # @param necb_ref_hp [Bool] for compatability with NECB ruleset only.
9
10
  # @return [Double] capacity in W to be used for find object
10
- def coil_cooling_dx_single_speed_find_capacity(coil_cooling_dx_single_speed)
11
+ def coil_cooling_dx_single_speed_find_capacity(coil_cooling_dx_single_speed, necb_ref_hp = false)
11
12
  capacity_w = nil
12
13
  if coil_cooling_dx_single_speed.ratedTotalCoolingCapacity.is_initialized
13
14
  capacity_w = coil_cooling_dx_single_speed.ratedTotalCoolingCapacity.get
@@ -42,13 +43,14 @@ class Standard
42
43
  #
43
44
  # @param coil_cooling_dx_single_speed [OpenStudio::Model::CoilCoolingDXSingleSpeed] coil cooling dx single speed object
44
45
  # @param rename [Bool] if true, object will be renamed to include capacity and efficiency level
46
+ # @param necb_ref_hp [Bool] for compatability with NECB ruleset only.
45
47
  # @return [Double] full load efficiency (COP)
46
- def coil_cooling_dx_single_speed_standard_minimum_cop(coil_cooling_dx_single_speed, rename = false)
47
- search_criteria = coil_dx_find_search_criteria(coil_cooling_dx_single_speed)
48
+ def coil_cooling_dx_single_speed_standard_minimum_cop(coil_cooling_dx_single_speed, rename = false, necb_ref_hp = false)
49
+ search_criteria = coil_dx_find_search_criteria(coil_cooling_dx_single_speed, necb_ref_hp)
48
50
  cooling_type = search_criteria['cooling_type']
49
51
  heating_type = search_criteria['heating_type']
50
52
  sub_category = search_criteria['subcategory']
51
- capacity_w = coil_cooling_dx_single_speed_find_capacity(coil_cooling_dx_single_speed)
53
+ capacity_w = coil_cooling_dx_single_speed_find_capacity(coil_cooling_dx_single_speed, necb_ref_hp)
52
54
  capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
53
55
  capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
54
56
 
@@ -171,15 +173,16 @@ class Standard
171
173
  #
172
174
  # @param coil_cooling_dx_single_speed [OpenStudio::Model::CoilCoolingDXSingleSpeed] coil cooling dx single speed object
173
175
  # @param sql_db_vars_map [Hash] hash map
176
+ # @param necb_ref_hp [Bool] for compatability with NECB ruleset only.
174
177
  # @return [Hash] hash of coil objects
175
- def coil_cooling_dx_single_speed_apply_efficiency_and_curves(coil_cooling_dx_single_speed, sql_db_vars_map)
178
+ def coil_cooling_dx_single_speed_apply_efficiency_and_curves(coil_cooling_dx_single_speed, sql_db_vars_map, necb_ref_hp = false)
176
179
  successfully_set_all_properties = true
177
180
 
178
- # Get the search criteria
179
- search_criteria = coil_dx_find_search_criteria(coil_cooling_dx_single_speed)
181
+ # Get the search criteria.
182
+ search_criteria = coil_dx_find_search_criteria(coil_cooling_dx_single_speed, necb_ref_hp)
180
183
 
181
- # Get the capacity
182
- capacity_w = coil_cooling_dx_single_speed_find_capacity(coil_cooling_dx_single_speed)
184
+ # Get the capacity.
185
+ capacity_w = coil_cooling_dx_single_speed_find_capacity(coil_cooling_dx_single_speed, necb_ref_hp)
183
186
  capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
184
187
  capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
185
188
 
@@ -247,7 +250,7 @@ class Standard
247
250
  orig_name = coil_cooling_dx_single_speed.name.to_s
248
251
 
249
252
  # Find the minimum COP and rename with efficiency rating
250
- cop = coil_cooling_dx_single_speed_standard_minimum_cop(coil_cooling_dx_single_speed, true)
253
+ cop = coil_cooling_dx_single_speed_standard_minimum_cop(coil_cooling_dx_single_speed, true, necb_ref_hp)
251
254
 
252
255
  # Map the original name to the new name
253
256
  sql_db_vars_map[coil_cooling_dx_single_speed.name.to_s] = orig_name
@@ -84,8 +84,9 @@ module CoilDX
84
84
  #
85
85
  # @param coil_dx [OpenStudio::Model::StraightComponent] coil cooling object, allowable types:
86
86
  # CoilCoolingDXSingleSpeed, CoilCoolingDXTwoSpeed, CoilCoolingDXMultiSpeed
87
+ # @param necb_ref_hp [Bool] for compatability with NECB ruleset only.
87
88
  # @return [String] the heating type
88
- def coil_dx_heating_type(coil_dx)
89
+ def coil_dx_heating_type(coil_dx, necb_ref_hp = false)
89
90
  htg_type = nil
90
91
 
91
92
  # If Unitary or Zone HVAC
@@ -159,8 +160,9 @@ module CoilDX
159
160
  #
160
161
  # @param coil_dx [OpenStudio::Model::StraightComponent] coil cooling object, allowable types:
161
162
  # CoilCoolingDXSingleSpeed, CoilCoolingDXTwoSpeed, CoilCoolingDXMultiSpeed
163
+ # @param necb_ref_hp [Bool] for compatability with NECB ruleset only.
162
164
  # @return [hash] has for search criteria to be used for find object
163
- def coil_dx_find_search_criteria(coil_dx)
165
+ def coil_dx_find_search_criteria(coil_dx, necb_ref_hp = false)
164
166
  search_criteria = {}
165
167
  search_criteria['template'] = template
166
168
 
@@ -179,7 +181,7 @@ module CoilDX
179
181
  search_criteria['subcategory'] = coil_dx_subcategory(coil_dx)
180
182
 
181
183
  # Add the heating type to the search criteria
182
- htg_type = coil_dx_heating_type(coil_dx)
184
+ htg_type = coil_dx_heating_type(coil_dx, necb_ref_hp)
183
185
  unless htg_type.nil?
184
186
  search_criteria['heating_type'] = htg_type
185
187
  end
@@ -6,8 +6,9 @@ class Standard
6
6
  # Finds capacity in W. This is the cooling capacity of the paired DX cooling coil.
7
7
  #
8
8
  # @param coil_heating_dx_single_speed [OpenStudio::Model::CoilHeatingDXSingleSpeed] coil heating dx single speed object
9
+ # @param necb_ref_hp [Bool] for compatability with NECB ruleset only.
9
10
  # @return [Double] capacity in W to be used for find object
10
- def coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed)
11
+ def coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed, necb_ref_hp = false)
11
12
  capacity_w = nil
12
13
 
13
14
  # Get the paired cooling coil
@@ -104,13 +105,14 @@ class Standard
104
105
  #
105
106
  # @param coil_heating_dx_single_speed [OpenStudio::Model::CoilHeatingDXSingleSpeed] coil heating dx single speed object
106
107
  # @param rename [Bool] if true, object will be renamed to include capacity and efficiency level
108
+ # @param necb_ref_hp [Bool] for compatability with NECB ruleset only.
107
109
  # @return [Double] full load efficiency (COP)
108
- def coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_speed, rename = false)
110
+ def coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_speed, rename = false, necb_ref_hp = false)
109
111
  # find ac properties
110
- search_criteria = coil_dx_find_search_criteria(coil_heating_dx_single_speed)
112
+ search_criteria = coil_dx_find_search_criteria(coil_heating_dx_single_speed, necb_ref_hp)
111
113
  sub_category = search_criteria['subcategory']
112
114
  suppl_heating_type = search_criteria['heating_type']
113
- capacity_w = coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed)
115
+ capacity_w = coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed, necb_ref_hp)
114
116
  capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
115
117
  capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
116
118
 
@@ -179,15 +181,16 @@ class Standard
179
181
  #
180
182
  # @param coil_heating_dx_single_speed [OpenStudio::Model::CoilHeatingDXSingleSpeed] coil heating dx single speed object
181
183
  # @param sql_db_vars_map [Hash] hash map
184
+ # @param necb_ref_hp [Bool] for compatability with NECB ruleset only.
182
185
  # @return [Hash] hash of coil objects
183
- def coil_heating_dx_single_speed_apply_efficiency_and_curves(coil_heating_dx_single_speed, sql_db_vars_map)
186
+ def coil_heating_dx_single_speed_apply_efficiency_and_curves(coil_heating_dx_single_speed, sql_db_vars_map, necb_ref_hp = false)
184
187
  successfully_set_all_properties = true
185
188
 
186
189
  # Get the search criteria
187
- search_criteria = coil_dx_find_search_criteria(coil_heating_dx_single_speed)
190
+ search_criteria = coil_dx_find_search_criteria(coil_heating_dx_single_speed, necb_ref_hp)
188
191
 
189
192
  # Get the capacity
190
- capacity_w = coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed)
193
+ capacity_w = coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed, necb_ref_hp)
191
194
  capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
192
195
  capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
193
196
 
@@ -250,7 +253,7 @@ class Standard
250
253
  orig_name = coil_heating_dx_single_speed.name.to_s
251
254
 
252
255
  # Find the minimum COP and rename with efficiency rating
253
- cop = coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_speed, true)
256
+ cop = coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_speed, true, necb_ref_hp)
254
257
 
255
258
  # Map the original name to the new name
256
259
  sql_db_vars_map[coil_heating_dx_single_speed.name.to_s] = orig_name
@@ -31,7 +31,7 @@ class Standard
31
31
  if insulation_layer_name.nil? && target_u_value_ip == 0.0
32
32
  # Do nothing if the construction already doesn't have an insulation layer
33
33
  elsif insulation_layer_name.nil?
34
- insulation_layer_name = find_and_set_insulaton_layer(construction).name
34
+ insulation_layer_name = find_and_set_insulation_layer(construction).name
35
35
  end
36
36
 
37
37
  # Remove the insulation layer if the specified U-value is zero.