openstudio-standards 0.3.0 → 0.3.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) 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.ServiceWaterHeating.rb +93 -4
  30. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +13 -0
  31. data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +5 -4
  32. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +24 -4
  33. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +18 -2
  34. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +18 -0
  35. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +13 -10
  36. data/lib/openstudio-standards/standards/Standards.CoilDX.rb +5 -3
  37. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +11 -8
  38. data/lib/openstudio-standards/standards/Standards.Construction.rb +1 -1
  39. data/lib/openstudio-standards/standards/Standards.Model.rb +68 -52
  40. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +2 -2
  41. data/lib/openstudio-standards/standards/Standards.Space.rb +16 -18
  42. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_cases.json +510 -0
  43. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_compressors.json +18 -0
  44. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_walkins.json +410 -0
  45. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +2 -2
  46. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_cases.json +510 -0
  47. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_compressors.json +18 -0
  48. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_walkins.json +410 -0
  49. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +2 -2
  50. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_cases.json +510 -0
  51. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_compressors.json +18 -0
  52. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_walkins.json +410 -0
  53. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +2 -2
  54. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_cases.json +510 -0
  55. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_compressors.json +18 -0
  56. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_walkins.json +410 -0
  57. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +2 -2
  58. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +2 -2
  59. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +2 -2
  60. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +9 -0
  61. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -0
  62. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +4 -3
  63. data/lib/openstudio-standards/standards/deer/deer_1985/comstock_deer_1985/data/comstock_deer_1985.spc_typ.json +405 -405
  64. data/lib/openstudio-standards/standards/deer/deer_1996/comstock_deer_1996/data/comstock_deer_1996.spc_typ.json +405 -405
  65. data/lib/openstudio-standards/standards/deer/deer_2003/comstock_deer_2003/data/comstock_deer_2003.spc_typ.json +405 -405
  66. data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.ThermalZone.rb +21 -0
  67. data/lib/openstudio-standards/standards/deer/deer_2007/comstock_deer_2007/data/comstock_deer_2007.spc_typ.json +405 -405
  68. data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.ThermalZone.rb +21 -0
  69. data/lib/openstudio-standards/standards/deer/deer_2011/comstock_deer_2011/data/comstock_deer_2011.spc_typ.json +405 -405
  70. data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.ThermalZone.rb +21 -0
  71. data/lib/openstudio-standards/standards/deer/deer_2014/comstock_deer_2014/data/comstock_deer_2014.spc_typ.json +405 -405
  72. data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.ThermalZone.rb +21 -0
  73. data/lib/openstudio-standards/standards/deer/deer_2015/comstock_deer_2015/data/comstock_deer_2015.spc_typ.json +405 -405
  74. data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.ThermalZone.rb +21 -0
  75. data/lib/openstudio-standards/standards/deer/deer_2017/comstock_deer_2017/data/comstock_deer_2017.spc_typ.json +405 -405
  76. data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.ThermalZone.rb +21 -0
  77. data/lib/openstudio-standards/standards/deer/deer_2020/comstock_deer_2020/data/comstock_deer_2020.spc_typ.json +405 -405
  78. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +8 -0
  79. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.ThermalZone.rb +21 -0
  80. data/lib/openstudio-standards/standards/deer/deer_2025/comstock_deer_2025/data/comstock_deer_2025.spc_typ.json +405 -405
  81. data/lib/openstudio-standards/standards/deer/deer_2030/comstock_deer_2030/data/comstock_deer_2030.spc_typ.json +405 -405
  82. data/lib/openstudio-standards/standards/deer/deer_2035/comstock_deer_2035/data/comstock_deer_2035.spc_typ.json +405 -405
  83. data/lib/openstudio-standards/standards/deer/deer_2040/comstock_deer_2040/data/comstock_deer_2040.spc_typ.json +405 -405
  84. data/lib/openstudio-standards/standards/deer/deer_2045/comstock_deer_2045/data/comstock_deer_2045.spc_typ.json +405 -405
  85. data/lib/openstudio-standards/standards/deer/deer_2050/comstock_deer_2050/data/comstock_deer_2050.spc_typ.json +405 -405
  86. data/lib/openstudio-standards/standards/deer/deer_2055/comstock_deer_2055/data/comstock_deer_2055.spc_typ.json +405 -405
  87. data/lib/openstudio-standards/standards/deer/deer_2060/comstock_deer_2060/data/comstock_deer_2060.spc_typ.json +405 -405
  88. data/lib/openstudio-standards/standards/deer/deer_2065/comstock_deer_2065/data/comstock_deer_2065.spc_typ.json +405 -405
  89. data/lib/openstudio-standards/standards/deer/deer_2070/comstock_deer_2070/data/comstock_deer_2070.spc_typ.json +405 -405
  90. data/lib/openstudio-standards/standards/deer/deer_2075/comstock_deer_2075/data/comstock_deer_2075.spc_typ.json +405 -405
  91. data/lib/openstudio-standards/standards/deer/deer_pre_1975/comstock_deer_pre_1975/data/comstock_deer_pre_1975.spc_typ.json +405 -405
  92. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +1 -1
  93. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +3 -1
  94. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +3 -1
  95. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +2 -2
  96. data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +233 -0
  97. data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +180 -0
  98. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +6 -1
  99. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +807 -258
  100. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +102 -66
  101. data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +85 -8
  102. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartment.osm +2483 -992
  103. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LowriseApartment.osm +4 -336
  104. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/MidriseApartment.osm +228 -231
  105. data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +12 -18
  106. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_type_unit_definitions.txt +76 -0
  107. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +6 -1
  108. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +111 -24
  109. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +1 -0
  110. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +3 -1
  111. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +64 -16
  112. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +61 -17
  113. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +128 -0
  114. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +252 -23
  115. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +316 -20
  116. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +1 -1
  117. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +3 -5
  118. data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +38 -0
  119. data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +16 -24
  120. data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +48 -25
  121. data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +3 -3
  122. data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +36 -19
  123. data/lib/openstudio-standards/standards/necb/NECB2020/data/furnaces.json +19 -4
  124. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps.json +20 -40
  125. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +74 -36
  126. data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +0 -2
  127. data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +123 -56
  128. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +124 -2
  129. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +15 -2
  130. data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
  131. data/lib/openstudio-standards/utilities/simulation.rb +1 -1
  132. data/lib/openstudio-standards/version.rb +1 -1
  133. data/lib/openstudio-standards/weather/Weather.stat_file.rb +33 -1
  134. data/lib/openstudio-standards.rb +1 -0
  135. metadata +14 -121
  136. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  137. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.ddy +0 -2342
  138. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.epw +0 -8768
  139. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.stat +0 -700
  140. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.ddy +0 -2342
  141. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.epw +0 -8768
  142. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.stat +0 -700
  143. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.ddy +0 -2342
  144. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.epw +0 -8768
  145. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.stat +0 -700
  146. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.ddy +0 -276
  147. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.epw +0 -8768
  148. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.stat +0 -611
  149. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.ddy +0 -276
  150. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.epw +0 -8768
  151. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.stat +0 -610
  152. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.ddy +0 -2342
  153. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.epw +0 -8768
  154. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.stat +0 -700
  155. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.ddy +0 -2342
  156. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.epw +0 -8768
  157. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.stat +0 -700
  158. data/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb +0 -81
  159. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb +0 -27
  160. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb +0 -69
  161. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +0 -178
  162. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb +0 -27
  163. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb +0 -27
  164. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb +0 -27
  165. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb +0 -27
  166. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb +0 -67
  167. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb +0 -27
  168. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb +0 -30
  169. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb +0 -27
  170. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb +0 -27
  171. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb +0 -68
  172. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb +0 -68
  173. data/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb +0 -42
  174. data/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb +0 -27
  175. data/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb +0 -58
  176. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +0 -171
  177. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb +0 -56
  178. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb +0 -89
  179. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb +0 -50
  180. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -69
  181. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb +0 -120
  182. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb +0 -56
  183. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb +0 -41
  184. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb +0 -27
  185. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb +0 -30
  186. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb +0 -30
  187. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +0 -68
  188. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb +0 -61
  189. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -57
  190. data/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb +0 -27
  191. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +0 -59
  192. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb +0 -49
  193. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb +0 -90
  194. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +0 -83
  195. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +0 -57
  196. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +0 -27
  197. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +0 -27
  198. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb +0 -27
  199. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb +0 -27
  200. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb +0 -27
  201. data/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb +0 -29
  202. data/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb +0 -27
  203. data/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb +0 -29
  204. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +0 -55
  205. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +0 -55
  206. data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb +0 -38
  207. data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb +0 -27
  208. data/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb +0 -27
  209. data/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb +0 -42
  210. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +0 -59
  211. data/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb +0 -59
  212. data/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb +0 -48
  213. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +0 -16
  214. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb +0 -27
  215. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb +0 -27
  216. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb +0 -27
  217. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb +0 -27
  218. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb +0 -27
  219. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb +0 -27
  220. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb +0 -27
  221. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb +0 -27
  222. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb +0 -88
  223. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb +0 -88
  224. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb +0 -104
  225. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb +0 -27
  226. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb +0 -27
@@ -1,5 +1,7 @@
1
1
  class NECB2011
2
2
  def add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model:,
3
+ necb_reference_hp:false,
4
+ necb_reference_hp_supp_fuel:'DefaultFuel',
3
5
  zones:,
4
6
  heating_coil_type:,
5
7
  baseboard_type:,
@@ -34,6 +36,8 @@ class NECB2011
34
36
  system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
35
37
  system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference] = 21.0
36
38
  system_data[:ZoneHeatingDesignSupplyAirTemperature] = 43.0
39
+ system_data[:ZoneDXCoolingSizingFactor] = 1.0
40
+ system_data[:ZoneDXHeatingSizingFactor] = 1.3
37
41
  system_data[:ZoneCoolingSizingFactor] = 1.1
38
42
  system_data[:ZoneHeatingSizingFactor] = 1.3
39
43
 
@@ -71,26 +75,38 @@ class NECB2011
71
75
  sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
72
76
  sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
73
77
  sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
74
- sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
75
- sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])
78
+ if necb_reference_hp
79
+ sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneDXCoolingSizingFactor])
80
+ sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneDXHeatingSizingFactor])
81
+ else
82
+ sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
83
+ sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])
84
+ end
76
85
 
77
- fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
86
+ if necb_reference_hp
87
+ # AirLoopHVACUnitaryHeatPumpAirToAir needs FanOnOff in order for the fan to turn off during off hours
88
+ fan = OpenStudio::Model::FanOnOff.new(model, always_on)
89
+ else
90
+ fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
91
+ end
92
+
93
+ # Set up DX coil with NECB performance curve characteristics;
94
+ clg_coil = add_onespeed_DX_coil(model, always_on)
95
+ clg_coil.setName('CoilCoolingDXSingleSpeed_dx')
96
+ clg_coil.setName('CoilCoolingDXSingleSpeed_ashp') if necb_reference_hp
78
97
 
98
+ raise("Flag 'necb_reference_hp' is set to true while parameter 'heating_coil_type' is not set to DX") if (necb_reference_hp && (heating_coil_type != 'DX'))
79
99
  if heating_coil_type == 'Electric' # electric coil
80
100
  htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
81
- end
82
-
83
- if heating_coil_type == 'Gas'
101
+ elsif heating_coil_type == 'Gas'
84
102
  htg_coil = OpenStudio::Model::CoilHeatingGas.new(model, always_on)
103
+ elsif heating_coil_type == 'DX'
104
+ htg_coil = add_onespeed_htg_DX_coil(model, always_on)
105
+ htg_coil.setName('CoilHeatingDXSingleSpeed_ashp')
85
106
  end
86
107
 
87
108
  # TO DO: other fuel-fired heating coil types? (not available in OpenStudio/E+ - may need to play with efficiency to mimic other fuel types)
88
109
 
89
- # Set up DX coil with NECB performance curve characteristics;
90
-
91
- clg_coil = add_onespeed_DX_coil(model, always_on)
92
- clg_coil.setName('CoilCoolingDXSingleSpeed_dx')
93
-
94
110
  # oa_controller
95
111
  oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
96
112
  oa_controller.autosizeMinimumOutdoorAirFlowRate
@@ -105,11 +121,32 @@ class NECB2011
105
121
  # Add the components to the air loop
106
122
  # in order from closest to zone to furthest from zone
107
123
  supply_inlet_node = air_loop.supplyInletNode
108
- fan.addToNode(supply_inlet_node)
109
- htg_coil.addToNode(supply_inlet_node)
110
- clg_coil.addToNode(supply_inlet_node)
124
+ if necb_reference_hp
125
+ #create supplemental heating coil based on default regional fuel type
126
+ if necb_reference_hp_supp_fuel == 'DefaultFuel'
127
+ epw = BTAP::Environment::WeatherFile.new(model.weatherFile.get.path.get)
128
+ necb_reference_hp_supp_fuel = @standards_data['regional_fuel_use'].detect { |fuel_sources| fuel_sources['state_province_regions'].include?(epw.state_province_region) }['fueltype_set']
129
+ end
130
+ if necb_reference_hp_supp_fuel == 'NaturalGas'
131
+ supplemental_htg_coil = OpenStudio::Model::CoilHeatingGas.new(model, always_on)
132
+ elsif necb_reference_hp_supp_fuel == 'Electricity' or necb_reference_hp_supp_fuel == 'FuelOilNo2'
133
+ supplemental_htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
134
+ else #hot water coils is an option in the future
135
+ raise('Invalid fuel type selected for heat pump supplemental coil')
136
+ end
137
+ # This method will seem like an error in number of args..but this is due to swig voodoo.
138
+ air_to_air_heatpump = OpenStudio::Model::AirLoopHVACUnitaryHeatPumpAirToAir.new(model, always_on, fan, htg_coil, clg_coil, supplemental_htg_coil)
139
+ air_to_air_heatpump.setName("#{control_zone.name} ASHP")
140
+ air_to_air_heatpump.setControllingZone(control_zone)
141
+ air_to_air_heatpump.setSupplyAirFanOperatingModeSchedule(always_on)
142
+ air_to_air_heatpump.addToNode(supply_inlet_node)
143
+ else
144
+ fan.addToNode(supply_inlet_node)
145
+ htg_coil.addToNode(supply_inlet_node)
146
+ clg_coil.addToNode(supply_inlet_node)
147
+
148
+ end
111
149
  oa_system.addToNode(supply_inlet_node)
112
-
113
150
  # Add a setpoint manager single zone reheat to control the
114
151
  # supply air temperature based on the needs of this zone
115
152
  setpoint_mgr_single_zone_reheat = OpenStudio::Model::SetpointManagerSingleZoneReheat.new(model)
@@ -139,8 +176,13 @@ class NECB2011
139
176
  sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
140
177
  sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
141
178
  sizing_zone.setZoneHeatingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
142
- sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
143
- sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])
179
+ if necb_reference_hp
180
+ sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneDXCoolingSizingFactor])
181
+ sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneDXHeatingSizingFactor])
182
+ else
183
+ sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
184
+ sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])
185
+ end
144
186
  # Create a diffuser and attach the zone/diffuser pair to the air loop
145
187
  # diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model,always_on)
146
188
  add_zone_baseboards(baseboard_type: baseboard_type,
@@ -154,7 +196,9 @@ class NECB2011
154
196
  sys_name_pars = {}
155
197
  sys_name_pars['sys_hr'] = 'none'
156
198
  sys_name_pars['sys_clg'] = 'dx'
199
+ sys_name_pars['sys_clg'] = 'ashp' if necb_reference_hp
157
200
  sys_name_pars['sys_htg'] = heating_coil_type
201
+ sys_name_pars['sys_htg'] = 'ashp' if necb_reference_hp
158
202
  sys_name_pars['sys_sf'] = 'cv'
159
203
  sys_name_pars['zone_htg'] = baseboard_type
160
204
  sys_name_pars['zone_clg'] = 'none'
@@ -312,4 +312,132 @@ class NECB2011
312
312
  # puts "end add_sys6_multi_zone_built_up_with_baseboard_heating"
313
313
  return true
314
314
  end
315
+
316
+ def add_sys6_multi_zone_reference_hp_with_baseboard_heating(model:,
317
+ zones:,
318
+ heating_coil_type:,
319
+ baseboard_type:,
320
+ hw_loop:,
321
+ necb_reference_hp_supp_fuel:'DefaultFuel')
322
+
323
+ #system data
324
+ system_data = {}
325
+ system_data[:name] = 'Sys_6_VAV with Reheat'
326
+ system_data[:CentralCoolingDesignSupplyAirTemperature] = 13.0
327
+ system_data[:CentralHeatingDesignSupplyAirTemperature] = 13.1
328
+ system_data[:AllOutdoorAirinCooling] = false
329
+ system_data[:AllOutdoorAirinHeating] = false
330
+
331
+ # zone data
332
+ system_data[:system_supply_air_temperature] = 13.0
333
+ system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
334
+ system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference] = 11.0
335
+ system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
336
+ system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference] = 21.0
337
+ system_data[:ZoneDXCoolingSizingFactor] = 1.0
338
+ system_data[:ZoneDXHeatingSizingFactor] = 1.3
339
+
340
+
341
+ always_on = model.alwaysOnDiscreteSchedule
342
+
343
+ model.getBuildingStorys.sort.each do |story|
344
+ unless (BTAP::Geometry::BuildingStoreys.get_zones_from_storey(story) & zones).empty?
345
+
346
+ air_loop = common_air_loop(model: model, system_data: system_data)
347
+ air_loop.setName('Sys_6_CAV')
348
+
349
+ supply_fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
350
+ supply_fan.setName('Sys6 Supply Fan')
351
+ return_fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
352
+ return_fan.setName('Sys6 Return Fan')
353
+
354
+ htg_coil = add_onespeed_htg_DX_coil(model, always_on)
355
+ htg_coil.setName('CoilHeatingDXSingleSpeed_ashp')
356
+
357
+ clg_coil = add_onespeed_DX_coil(model, always_on)
358
+ clg_coil.setName('CoilCoolingDXSingleSpeed_ashp')
359
+
360
+ oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
361
+ oa_controller.autosizeMinimumOutdoorAirFlowRate
362
+
363
+ # Set mechanical ventilation controller outdoor air to ZoneSum (used to be defaulted to ZoneSum but now should be
364
+ # set explicitly)
365
+ oa_controller.controllerMechanicalVentilation.setSystemOutdoorAirMethod('ZoneSum')
366
+ oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)
367
+
368
+ # Add the components to the air loop
369
+ # in order from closest to zone to furthest from zone
370
+ supply_inlet_node = air_loop.supplyInletNode
371
+ supply_outlet_node = air_loop.supplyOutletNode
372
+ supply_fan.addToNode(supply_inlet_node)
373
+ htg_coil.addToNode(supply_inlet_node)
374
+ clg_coil.addToNode(supply_inlet_node)
375
+ oa_system.addToNode(supply_inlet_node)
376
+ returnAirNode = oa_system.returnAirModelObject.get.to_Node.get
377
+ return_fan.addToNode(returnAirNode)
378
+
379
+ # Add a setpoint manager to control the
380
+ # supply air to a constant temperature
381
+ sat_sch = OpenStudio::Model::ScheduleRuleset.new(model)
382
+ sat_sch.setName('Supply Air Temp')
383
+ #sat_sch.defaultDaySchedule.setName('Supply Air Temp Default')
384
+ #sat_sch.defaultDaySchedule.addValue(OpenStudio::Time.new(0, 24, 0, 0), system_data[:system_supply_air_temperature])
385
+ #sat_stpt_manager = OpenStudio::Model::SetpointManagerScheduled.new(model, sat_sch)
386
+ sat_stpt_manager = OpenStudio::Model::SetpointManagerWarmest.new(model)
387
+ sat_stpt_manager.setControlVariable("Temperature")
388
+ sat_stpt_manager.setMinimumSetpointTemperature(13)
389
+ sat_stpt_manager.setMaximumSetpointTemperature(24)
390
+ sat_stpt_manager.addToNode(supply_outlet_node)
391
+
392
+ # Make CAV terminals for each zone on this story that is in intersection with the zones array.
393
+ (BTAP::Geometry::BuildingStoreys.get_zones_from_storey(story) & zones).each do |zone|
394
+ # Zone sizing parameters
395
+ sizing_zone = zone.sizingZone
396
+ sizing_zone.setZoneCoolingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod])
397
+ sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
398
+ sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
399
+ sizing_zone.setZoneHeatingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
400
+ sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneDXCoolingSizingFactor])
401
+ sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneDXHeatingSizingFactor])
402
+
403
+ # Set zone baseboards
404
+ add_zone_baseboards(model: model,
405
+ zone: zone,
406
+ baseboard_type: baseboard_type,
407
+ hw_loop: hw_loop)
408
+
409
+ # Create CAV RH (RH based on region's default fuel type)
410
+ if necb_reference_hp_supp_fuel == 'DefaultFuel'
411
+ epw = BTAP::Environment::WeatherFile.new(model.weatherFile.get.path.get)
412
+ necb_reference_hp_supp_fuel = @standards_data['regional_fuel_use'].detect { |fuel_sources| fuel_sources['state_province_regions'].include?(epw.state_province_region) }['fueltype_set']
413
+ end
414
+ if necb_reference_hp_supp_fuel == 'NaturalGas'
415
+ rh_coil = OpenStudio::Model::CoilHeatingGas.new(model, always_on)
416
+ elsif necb_reference_hp_supp_fuel == 'Electricity' or necb_reference_hp_supp_fuel == 'FuelOilNo2'
417
+ rh_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
418
+ else #hot water coils is an option in the future
419
+ raise('Invalid fuel type selected for heat pump supplemental coil')
420
+ end
421
+ cav_rh_terminal = OpenStudio::Model::AirTerminalSingleDuctConstantVolumeReheat.new(model, always_on, rh_coil)
422
+ air_loop.addBranchForZone(zone, cav_rh_terminal.to_StraightComponent)
423
+ end
424
+ sys_name_pars = {}
425
+ sys_name_pars['sys_hr'] = 'none'
426
+ sys_name_pars['sys_htg'] = 'ashp'
427
+ sys_name_pars['sys_clg'] = 'ashp'
428
+ sys_name_pars['sys_sf'] = 'cv'
429
+ sys_name_pars['zone_htg'] = baseboard_type
430
+ sys_name_pars['zone_clg'] = 'none'
431
+ sys_name_pars['sys_rf'] = 'cv'
432
+ assign_base_sys_name(air_loop,
433
+ sys_abbr: 'sys_6',
434
+ sys_oa: 'mixed',
435
+ sys_name_pars: sys_name_pars)
436
+
437
+ end
438
+ end
439
+
440
+
441
+
442
+ end
315
443
  end
@@ -42,7 +42,7 @@ class NECB2011
42
42
 
43
43
  # puts air_loop_hvac.name.to_s
44
44
  # Design Supply Air Flow Rate: This method below reads the value from the sql file.
45
- dsafr_m3_per_s = air_loop_hvac.model.getAutosizedValue(air_loop_hvac, 'Design Supply Air Flow Rate', 'm3/s')
45
+ dsafr_m3_per_s = air_loop_hvac.autosizedDesignSupplyAirFlowRate
46
46
  min_dsafr_l_per_s = 1500
47
47
  unless dsafr_m3_per_s.empty?
48
48
  dsafr_l_per_s = dsafr_m3_per_s.get * 1000
@@ -504,21 +504,25 @@ class NECB2011
504
504
  capacity_w = boiler_hot_water_find_capacity(boiler_hot_water)
505
505
 
506
506
  # Check if secondary and/or modulating boiler required
507
- if capacity_w / 1000.0 >= 352.0
508
- if boiler_hot_water.name.to_s.include?('Primary Boiler')
509
- boiler_capacity = capacity_w
510
- boiler_hot_water.setBoilerFlowMode('LeavingSetpointModulated')
511
- boiler_hot_water.setMinimumPartLoadRatio(0.25)
512
- elsif boiler_hot_water.name.to_s.include?('Secondary Boiler')
513
- boiler_capacity = 0.001
514
- end
515
- elsif ((capacity_w / 1000.0) >= 176.0) && ((capacity_w / 1000.0) < 352.0)
516
- boiler_capacity = capacity_w / 2
517
- elsif (capacity_w / 1000.0) <= 176.0
518
- if boiler_hot_water.name.to_s.include?('Primary Boiler')
519
- boiler_capacity = capacity_w
520
- elsif boiler_hot_water.name.to_s.include?('Secondary Boiler')
521
- boiler_capacity = 0.001
507
+ # If boiler names include 'Primary Boiler' or 'Secondary Boiler' then NECB rules are applied
508
+ boiler_capacity = capacity_w
509
+ if boiler_hot_water.name.to_s.include?('Primary Boiler') || boiler_hot_water.name.to_s.include?('Secondary Boiler')
510
+ if capacity_w / 1000.0 >= 352.0
511
+ if boiler_hot_water.name.to_s.include?('Primary Boiler')
512
+ boiler_capacity = capacity_w
513
+ boiler_hot_water.setBoilerFlowMode('LeavingSetpointModulated')
514
+ boiler_hot_water.setMinimumPartLoadRatio(0.25)
515
+ elsif boiler_hot_water.name.to_s.include?('Secondary Boiler')
516
+ boiler_capacity = 0.001
517
+ end
518
+ elsif ((capacity_w / 1000.0) >= 176.0) && ((capacity_w / 1000.0) < 352.0)
519
+ boiler_capacity = capacity_w / 2
520
+ elsif (capacity_w / 1000.0) <= 176.0
521
+ if boiler_hot_water.name.to_s.include?('Primary Boiler')
522
+ boiler_capacity = capacity_w
523
+ elsif boiler_hot_water.name.to_s.include?('Secondary Boiler')
524
+ boiler_capacity = 0.001
525
+ end
522
526
  end
523
527
  end
524
528
  boiler_hot_water.setNominalCapacity(boiler_capacity)
@@ -602,14 +606,18 @@ class NECB2011
602
606
  chiller_electric_eir.setChillerFlowMode('LeavingSetpointModulated')
603
607
  chiller_electric_eir.setMinimumPartLoadRatio(0.25)
604
608
  chiller_electric_eir.setMinimumUnloadingRatio(0.25)
605
- if (capacity_w / 1000.0) < 2100.0
606
- if chiller_electric_eir.name.to_s.include? 'Primary Chiller'
607
- chiller_capacity = capacity_w
608
- elsif chiller_electric_eir.name.to_s.include? 'Secondary Chiller'
609
- chiller_capacity = 0.001
609
+ chiller_capacity = capacity_w
610
+ # If the chiller name includes 'Primary' or 'Secondary' then apply NECB rules
611
+ if (chiller_electric_eir.name.to_s.include? 'Primary') || (chiller_electric_eir.name.to_s.include? 'Secondary')
612
+ if (capacity_w / 1000.0) < 2100.0
613
+ if chiller_electric_eir.name.to_s.include? 'Primary Chiller'
614
+ chiller_capacity = capacity_w
615
+ elsif chiller_electric_eir.name.to_s.include? 'Secondary Chiller'
616
+ chiller_capacity = 0.001
617
+ end
618
+ else
619
+ chiller_capacity = capacity_w / 2.0
610
620
  end
611
- else
612
- chiller_capacity = capacity_w / 2.0
613
621
  end
614
622
  chiller_electric_eir.setReferenceCapacity(chiller_capacity)
615
623
 
@@ -1048,6 +1056,7 @@ class NECB2011
1048
1056
  heat_pump_avail_sch_sensor = OpenStudio::Model::EnergyManagementSystemSensor.new(model, heat_pump_avail_sch_var)
1049
1057
  updated_heat_pump_avail_sch = OpenStudio::Model::ScheduleConstant.new(model)
1050
1058
  multi_speed_heat_pump.setAvailabilitySchedule(updated_heat_pump_avail_sch)
1059
+ # This method will seem like an error in number of args..but this is due to swig voodoo.
1051
1060
  heat_pump_avail_sch_actuator = OpenStudio::Model::EnergyManagementSystemActuator.new(updated_heat_pump_avail_sch, 'Schedule:Constant', 'Schedule Value')
1052
1061
  heat_pump_avail_sch_prog = OpenStudio::Model::EnergyManagementSystemProgram.new(model)
1053
1062
  heat_pump_avail_sch_prog.setName("#{multi_speed_heat_pump.name.to_s.gsub(/[ +-.]/, '_')} Availability Schedule Program by Line")
@@ -1917,6 +1926,60 @@ class NECB2011
1917
1926
  clg_part_load_ratio)
1918
1927
  end
1919
1928
 
1929
+ def add_onespeed_htg_DX_coil(model, sch)
1930
+
1931
+
1932
+ htg_cap_f_of_temp = OpenStudio::Model::CurveCubic.new(model)
1933
+ htg_cap_f_of_temp.setCoefficient1Constant(0.729009)
1934
+ htg_cap_f_of_temp.setCoefficient2x(0.0319275)
1935
+ htg_cap_f_of_temp.setCoefficient3xPOW2(0.000136404)
1936
+ htg_cap_f_of_temp.setCoefficient4xPOW3(-8.748e-06)
1937
+ htg_cap_f_of_temp.setMinimumValueofx(-20.0)
1938
+ htg_cap_f_of_temp.setMaximumValueofx(20.0)
1939
+
1940
+ htg_cap_f_of_flow = OpenStudio::Model::CurveCubic.new(model)
1941
+ htg_cap_f_of_flow.setCoefficient1Constant(0.84)
1942
+ htg_cap_f_of_flow.setCoefficient2x(0.16)
1943
+ htg_cap_f_of_flow.setCoefficient3xPOW2(0.0)
1944
+ htg_cap_f_of_flow.setCoefficient4xPOW3(0.0)
1945
+ htg_cap_f_of_flow.setMinimumValueofx(0.5)
1946
+ htg_cap_f_of_flow.setMaximumValueofx(1.5)
1947
+
1948
+ htg_energy_input_ratio_f_of_temp = OpenStudio::Model::CurveCubic.new(model)
1949
+ htg_energy_input_ratio_f_of_temp.setCoefficient1Constant(1.2183)
1950
+ htg_energy_input_ratio_f_of_temp.setCoefficient2x(-0.03612)
1951
+ htg_energy_input_ratio_f_of_temp.setCoefficient3xPOW2(0.00142)
1952
+ htg_energy_input_ratio_f_of_temp.setCoefficient4xPOW3(-2.68e-05)
1953
+ htg_energy_input_ratio_f_of_temp.setMinimumValueofx(-20.0)
1954
+ htg_energy_input_ratio_f_of_temp.setMaximumValueofx(20.0)
1955
+
1956
+ htg_energy_input_ratio_f_of_flow = OpenStudio::Model::CurveQuadratic.new(model)
1957
+ htg_energy_input_ratio_f_of_flow.setCoefficient1Constant(1.3824)
1958
+ htg_energy_input_ratio_f_of_flow.setCoefficient2x(-0.4336)
1959
+ htg_energy_input_ratio_f_of_flow.setCoefficient3xPOW2(0.0512)
1960
+ htg_energy_input_ratio_f_of_flow.setMinimumValueofx(0.0)
1961
+ htg_energy_input_ratio_f_of_flow.setMaximumValueofx(1.0)
1962
+
1963
+ htg_part_load_ratio = OpenStudio::Model::CurveCubic.new(model)
1964
+ htg_part_load_ratio.setCoefficient1Constant(0.3696)
1965
+ htg_part_load_ratio.setCoefficient2x(2.3362)
1966
+ htg_part_load_ratio.setCoefficient3xPOW2(-2.9577)
1967
+ htg_part_load_ratio.setCoefficient4xPOW3(1.2596)
1968
+ htg_part_load_ratio.setMinimumValueofx(0.7)
1969
+ htg_part_load_ratio.setMaximumValueofx(1.0)
1970
+
1971
+ dx_htg_coil = OpenStudio::Model::CoilHeatingDXSingleSpeed.new(model,
1972
+ sch,
1973
+ htg_cap_f_of_temp,
1974
+ htg_cap_f_of_flow,
1975
+ htg_energy_input_ratio_f_of_temp,
1976
+ htg_energy_input_ratio_f_of_flow,
1977
+ htg_part_load_ratio)
1978
+ dx_htg_coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-10)
1979
+
1980
+ return dx_htg_coil
1981
+ end
1982
+
1920
1983
  # Zonal systems
1921
1984
  def add_zone_baseboards(baseboard_type:,
1922
1985
  hw_loop:,
@@ -1961,6 +2024,7 @@ class NECB2011
1961
2024
  fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
1962
2025
  fan.setPressureRise(640)
1963
2026
 
2027
+ # This method will seem like an error in number of args..but this is due to swig voodoo.
1964
2028
  ptac = OpenStudio::Model::ZoneHVACPackagedTerminalAirConditioner.new(model,
1965
2029
  always_on,
1966
2030
  fan,
@@ -2204,4 +2268,169 @@ class NECB2011
2204
2268
 
2205
2269
  airloop.setName(sys_name)
2206
2270
  end
2271
+
2272
+ def coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed, necb_reference_hp = false)
2273
+ # Set Rated heating capacity = 50% cooling coil capacity at -8.3 C outdoor [8.4.4.13 (2)(c)]
2274
+
2275
+ if necb_reference_hp #NECB reference heat pump rules apply
2276
+ # grab paired cooling coil
2277
+ if coil_heating_dx_single_speed.airLoopHVAC.empty?
2278
+
2279
+ if coil_heating_dx_single_speed.containingHVACComponent.is_initialized
2280
+
2281
+ containing_comp = coil_heating_dx_single_speed.containingHVACComponent.get
2282
+ if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
2283
+ clg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.get.coolingCoil
2284
+ elsif containing_comp.to_AirLoopHVACUnitarySystem.is_initialized
2285
+ unitary = containing_comp.to_AirLoopHVACUnitarySystem.get
2286
+ if unitary.coolingCoil.is_initialized
2287
+ clg_coil = unitary.coolingCoil.get
2288
+ end
2289
+ end
2290
+ # @todo Add other unitary systems
2291
+ elsif coil_heating_dx_single_speed.containingZoneHVACComponent.is_initialized
2292
+ containing_comp = coil_heating_dx_single_speed.containingZoneHVACComponent.get
2293
+ # PTHP
2294
+ if containing_comp.to_ZoneHVACPackagedTerminalHeatPump.is_initialized
2295
+ pthp = containing_comp.to_ZoneHVACPackagedTerminalHeatPump.get
2296
+ clg_coil = containing_comp.to_ZoneHVACPackagedTerminalHeatPump.get.coolingCoil
2297
+ end
2298
+ end
2299
+ elsif coil_heating_dx_single_speed.airLoopHVAC.is_initialized
2300
+ air_loop = coil_heating_dx_single_speed.airLoopHVAC.get
2301
+ # Check for the presence of any other type of cooling coil
2302
+ clg_types = ['OS:Coil:Cooling:DX:SingleSpeed',
2303
+ 'OS:Coil:Cooling:DX:TwoSpeed',
2304
+ 'OS:Coil:Cooling:DX:MultiSpeed']
2305
+ clg_types.each do |ct|
2306
+ coils = air_loop.supplyComponents(ct.to_IddObjectType)
2307
+ next if coils.empty?
2308
+ clg_coil = coils[0]
2309
+ puts "coils = air_loop.supplyComponents(ct.to_IddObjectType) #{}"
2310
+ break # Stop on first DX cooling coil found
2311
+ end
2312
+ end
2313
+
2314
+ # Paired cooling coil parameters
2315
+ clg_coil = clg_coil.to_CoilCoolingDXSingleSpeed.get
2316
+ capacity_w = coil_cooling_dx_single_speed_find_capacity(clg_coil)
2317
+ indoor_wb = 19.4 #rated indoor wb
2318
+ outdoor_db = -8.3 # outdoor db
2319
+
2320
+ # heating capacity = capacity factor (function of temp) from biquadratic curve
2321
+ # with curve limits on minimum y/outdoor db (no extrapolation)
2322
+ cooling_cap_f_temp_curve = clg_coil.totalCoolingCapacityFunctionOfTemperatureCurve
2323
+ cooling_cap_f_temp_factor_min_y = cooling_cap_f_temp_curve.evaluate(indoor_wb,outdoor_db)
2324
+ htg_cap_w_min_y = capacity_w*0.5*cooling_cap_f_temp_factor_min_y
2325
+
2326
+ # heating capacity = capacity factor (function of temp) from biquadratic curve
2327
+ # without curve limits on minimum y/outdoor db (extrapolate)
2328
+ cooling_cap_f_temp_const = 0.867905
2329
+ cooling_cap_f_temp_x = 0.0142459
2330
+ cooling_cap_f_temp_x2 = 0.00055436
2331
+ cooling_cap_f_temp_y = -0.0075575
2332
+ cooling_cap_f_temp_y2 = 3.3e-05
2333
+ cooling_cap_f_temp_xy = -0.0001918
2334
+ cooling_cap_f_temp_factor_no_min_y = cooling_cap_f_temp_const + cooling_cap_f_temp_x*indoor_wb + cooling_cap_f_temp_x2*indoor_wb**2 +
2335
+ cooling_cap_f_temp_y*outdoor_db + cooling_cap_f_temp_y2*outdoor_db**2 + cooling_cap_f_temp_xy*indoor_wb*outdoor_db
2336
+ htg_cap_w_no_min_y = capacity_w*0.5*cooling_cap_f_temp_factor_no_min_y
2337
+
2338
+ puts "capacity_w #{capacity_w}"
2339
+ puts "cooling_cap_f_temp_factor_no_min_y #{cooling_cap_f_temp_factor_no_min_y}"
2340
+ puts "cooling_cap_f_temp_factor_min_y #{cooling_cap_f_temp_factor_min_y}"
2341
+ puts "htg_cap_w_no_min_y #{htg_cap_w_no_min_y}"
2342
+ puts "htg_cap_w_min_y #{htg_cap_w_min_y}"
2343
+
2344
+ # use actual factor from -8.3 to compute rated heating capacity unless it's < 0
2345
+ if cooling_cap_f_temp_factor_no_min_y>0
2346
+ htg_cap_w = htg_cap_w_no_min_y
2347
+ else
2348
+ htg_cap_w = htg_cap_w_min_y
2349
+ end
2350
+
2351
+ # Hardsize rated capacity of heating coil
2352
+ coil_heating_dx_single_speed.setRatedTotalHeatingCapacity(htg_cap_w)
2353
+
2354
+ return htg_cap_w
2355
+ else # Do not follow NECB reference HP rule; proceed as usual
2356
+ return super(coil_heating_dx_single_speed)
2357
+ end
2358
+ end
2359
+
2360
+ # NECB reference heat pump system
2361
+ # heating type rules need to be flexible to account for
2362
+ # 1. DX htg/cooling + gas supplement htg
2363
+ # 2. Potential lack of AirLoopHVACUnitaryHeatPumpAirToAir or AirLoopHVACUnitarySystem
2364
+ # @param necb_ref_hp [Bool] if true, NECB reference model rules for heat pumps will be used.
2365
+ def coil_dx_heating_type(coil_dx, necb_reference_hp = false)
2366
+ supp_htg_type = nil
2367
+
2368
+ # If not heat pump reference case use the standard implementation.
2369
+ if !necb_reference_hp
2370
+ return super(coil_dx)
2371
+ else
2372
+ if coil_dx.airLoopHVAC.empty?
2373
+ if coil_dx.containingHVACComponent.is_initialized
2374
+ containing_comp = coil_dx.containingHVACComponent.get
2375
+ if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
2376
+ supp_htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.get.supplementalHeatingCoil
2377
+ if supp_htg_coil.to_CoilHeatingElectric.is_initialized
2378
+ supp_htg_type = 'Electric Resistance or None'
2379
+ elsif supp_htg_coil.to_CoilHeatingGas.is_initialized or supp_htg_coil.to_CoilHeatingWater.is_initialized
2380
+ supp_htg_type = 'All Other'
2381
+ else # None
2382
+ supp_htg_type = 'Electric Resistance or None'
2383
+ end
2384
+ else
2385
+ # For other virtual wrapper, use method in Standard.DXCoil
2386
+ # Or add future wrappers here
2387
+ return super
2388
+ end
2389
+ end
2390
+
2391
+ elsif coil_dx.airLoopHVAC.is_initialized # Heat pumps without a wrapper (lone DX coils in the air loop)
2392
+ airloop = coil_dx.airLoopHVAC.get
2393
+ num_of_DX_Coils = 0
2394
+ num_of_supp_coils = 0
2395
+ supp_htg_type = ''
2396
+ # Go through and determine number of each type of coils in air loop to determine supp_htg_type
2397
+ airloop.supplyComponents.each do |supply_component|
2398
+ if supply_component.to_CoilHeatingDXSingleSpeed.is_initialized or supply_component.to_CoilHeatingDXMultiSpeed.is_initialized
2399
+ supply_component.to_CoilHeatingDXVariableSpeed.is_initialized
2400
+ num_of_DX_Coils = num_of_DX_Coils + 1
2401
+ elsif supply_component.to_CoilCoolingDXSingleSpeed.is_initialized or supply_component.to_CoilCoolingDXTwoSpeed.is_initialized or
2402
+ supply_component.to_CoilCoolingDXTwoSpeed.is_initialized or supply_component.to_CoilCoolingDXVariableSpeed.is_initialized or
2403
+ supply_component.to_CoilCoolingDXMultiSpeed.is_initialized or
2404
+ supply_component.to_CoilCoolingDXCurveFitPerformance.is_initialized or
2405
+ supply_component.to_CoilCoolingDXTwoStageWithHumidityControlMode.is_initialized
2406
+ num_of_DX_Coils = num_of_DX_Coils + 1
2407
+ elsif supply_component.to_CoilHeatingGas.is_initialized or supply_component.to_CoilHeatingGasMultiStage.is_initialized or
2408
+ supply_component.to_CoilHeatingWater.is_initialized
2409
+ num_of_supp_coils = num_of_supp_coils + 1
2410
+ supp_htg_type = 'All Other'
2411
+ elsif supply_component.to_CoilHeatingElectric.is_initialized
2412
+ num_of_supp_coils = num_of_supp_coils + 1
2413
+ supp_htg_type = 'Electric Resistance or None'
2414
+ end
2415
+ end
2416
+
2417
+ #Two possible heat pump configuration
2418
+ if num_of_DX_Coils == 2 && num_of_supp_coils == 1 #Scenario 1: 1 DX htg + 1 DX clg + 1 Non-DX htg coil
2419
+ puts "scenario 1 supp_htg_type #{supp_htg_type}"
2420
+ return supp_htg_type # return supplmental heating type
2421
+ else #Scenario 2: num_of_DX_Coils < 2 or num_of_supp_coils = 0;
2422
+ puts "scenario 2 supp_htg_type #{supp_htg_type}"
2423
+ puts "num_of_DX_Coils #{num_of_DX_Coils}"
2424
+ puts "num_of_supp_coils #{num_of_supp_coils}"
2425
+ return supp_htg_type = 'Electric Resistance or None'
2426
+ end
2427
+
2428
+
2429
+
2430
+ end
2431
+ end
2432
+
2433
+
2434
+
2435
+ end
2207
2436
  end