openstudio-standards 0.8.3 → 0.8.5.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. checksums.yaml +4 -4
  2. data/data/geometry/ASHRAECollege.osm +30 -30
  3. data/data/geometry/ASHRAECourthouse.osm +22 -22
  4. data/data/geometry/ASHRAESmallOfficeDetailed.osm +2 -2
  5. data/data/geometry/DEER_Asm.osm +1 -1
  6. data/data/geometry/DEER_ECC.osm +1 -1
  7. data/data/geometry/DEER_EPr.osm +1 -1
  8. data/data/geometry/DEER_ERC.osm +1 -1
  9. data/data/geometry/DEER_ESe.osm +1 -1
  10. data/data/geometry/DEER_EUn.osm +1 -1
  11. data/data/geometry/DEER_Hsp.osm +1 -1
  12. data/data/geometry/DEER_Htl.osm +1 -1
  13. data/data/geometry/DEER_MBT.osm +1 -1
  14. data/data/geometry/DEER_MFm.osm +1 -1
  15. data/data/geometry/DEER_Nrs.osm +1 -1
  16. data/data/geometry/DEER_OfL.osm +1 -1
  17. data/data/geometry/DEER_OfS.osm +1 -1
  18. data/data/geometry/DEER_RFF.osm +1 -1
  19. data/data/geometry/DEER_RSD.osm +1 -1
  20. data/data/geometry/DEER_Rt3.osm +1 -1
  21. data/data/geometry/DEER_RtS.osm +1 -1
  22. data/data/standards/export_OpenStudio_libraries.rb +2 -3
  23. data/data/standards/test_performance_expected_dd_results.csv +42 -42
  24. data/lib/openstudio-standards/btap/NECB_building_types.csv +35 -0
  25. data/lib/openstudio-standards/btap/NECB_space_types.csv +109 -0
  26. data/lib/openstudio-standards/btap/activity.rb +480 -0
  27. data/lib/openstudio-standards/btap/attributes.rb +166 -0
  28. data/lib/openstudio-standards/btap/bridging.rb +561 -1402
  29. data/lib/openstudio-standards/btap/btap.rb +4 -2
  30. data/lib/openstudio-standards/btap/btap_test_helper.rb +86 -0
  31. data/lib/openstudio-standards/btap/carbon/btap_carbon.rb +177 -0
  32. data/lib/openstudio-standards/btap/common_paths.rb +81 -0
  33. data/lib/openstudio-standards/btap/common_resources/ConstructionProperties.csv +52 -0
  34. data/lib/openstudio-standards/btap/common_resources/Constructions.csv +37 -0
  35. data/lib/openstudio-standards/btap/common_resources/carbon_frame.csv +35 -0
  36. data/lib/openstudio-standards/btap/common_resources/carbon_glazing.csv +35 -0
  37. data/lib/openstudio-standards/btap/common_resources/carbon_opaque.csv +164 -0
  38. data/lib/openstudio-standards/btap/common_resources/construction_sets.csv +1270 -0
  39. data/lib/openstudio-standards/btap/common_resources/constructions_glazing.csv +121 -0
  40. data/lib/openstudio-standards/btap/common_resources/constructions_opaque.csv +2256 -0
  41. data/lib/openstudio-standards/btap/common_resources/costs.csv +1897 -0
  42. data/lib/openstudio-standards/btap/common_resources/costs_local_factors.csv +2315 -0
  43. data/lib/openstudio-standards/btap/common_resources/hvac_vent_ahu.csv +925 -0
  44. data/lib/openstudio-standards/btap/common_resources/lighting.csv +364 -0
  45. data/lib/openstudio-standards/btap/common_resources/lighting_sets.csv +2667 -0
  46. data/lib/openstudio-standards/btap/common_resources/locations.csv +75 -0
  47. data/lib/openstudio-standards/btap/common_resources/materials_glazing.csv +35 -0
  48. data/lib/openstudio-standards/btap/common_resources/materials_hvac.csv +1686 -0
  49. data/lib/openstudio-standards/btap/common_resources/materials_lighting.csv +267 -0
  50. data/lib/openstudio-standards/btap/common_resources/materials_opaque.csv +164 -0
  51. data/lib/openstudio-standards/btap/costing/README.md +502 -0
  52. data/lib/openstudio-standards/btap/costing/btap_costing.rb +469 -0
  53. data/lib/openstudio-standards/btap/costing/btap_measure_helper.rb +359 -0
  54. data/lib/openstudio-standards/btap/costing/btap_workflow.rb +117 -0
  55. data/lib/openstudio-standards/btap/costing/copy_test_results_files_to_expected_results.rb +11 -0
  56. data/lib/openstudio-standards/btap/costing/cost_building_from_file.rb +136 -0
  57. data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +173 -0
  58. data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +354 -0
  59. data/lib/openstudio-standards/btap/costing/dcv_costing.rb +314 -0
  60. data/lib/openstudio-standards/btap/costing/dummy.epw +8768 -0
  61. data/lib/openstudio-standards/btap/costing/dummy.osm +5320 -0
  62. data/lib/openstudio-standards/btap/costing/envelope_costing.rb +215 -0
  63. data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +2584 -0
  64. data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +156 -0
  65. data/lib/openstudio-standards/btap/costing/lighting_costing.rb +209 -0
  66. data/lib/openstudio-standards/btap/costing/mech_sizing.json +502 -0
  67. data/lib/openstudio-standards/btap/costing/neb_end_use_prices.csv +42 -0
  68. data/lib/openstudio-standards/btap/costing/necb_2011_spacetype_info.csv +225 -0
  69. data/lib/openstudio-standards/btap/costing/necb_reference_runs.csv +28705 -0
  70. data/lib/openstudio-standards/btap/costing/nv_costing.rb +547 -0
  71. data/lib/openstudio-standards/btap/costing/parallel_tests.rb +92 -0
  72. data/lib/openstudio-standards/btap/costing/pv_ground_costing.rb +687 -0
  73. data/lib/openstudio-standards/btap/costing/shw_costing.rb +705 -0
  74. data/lib/openstudio-standards/btap/costing/test_list.txt +15 -0
  75. data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +27 -0
  76. data/lib/openstudio-standards/btap/costing/test_run_costing_tests.rb +80 -0
  77. data/lib/openstudio-standards/btap/costing/ventilation_costing.rb +2616 -0
  78. data/lib/openstudio-standards/btap/geometry.rb +86 -6
  79. data/lib/openstudio-standards/btap/structure.rb +657 -0
  80. data/lib/openstudio-standards/constructions/modify.rb +2 -1
  81. data/lib/openstudio-standards/create_typical/create_typical.rb +17 -33
  82. data/lib/openstudio-standards/create_typical/space_type_ratios.rb +36 -36
  83. data/lib/openstudio-standards/equipment/create_transformer.rb +104 -0
  84. data/lib/openstudio-standards/equipment/create_typical_equipment.rb +117 -0
  85. data/lib/openstudio-standards/equipment/data/electric_equipment_space_types.json +1514 -0
  86. data/lib/openstudio-standards/equipment/data/gas_equipment_space_types.json +227 -0
  87. data/lib/openstudio-standards/exterior_lighting/create.rb +22 -22
  88. data/lib/openstudio-standards/exterior_lighting/information.rb +3 -2
  89. data/lib/openstudio-standards/hvac/components/air_conditioner_vrf.rb +482 -0
  90. data/lib/openstudio-standards/hvac/components/air_terminal.rb +31 -0
  91. data/lib/openstudio-standards/hvac/components/boiler_hot_water.rb +163 -0
  92. data/lib/openstudio-standards/hvac/components/central_air_source_heat_pump.rb +220 -0
  93. data/lib/openstudio-standards/hvac/components/chiller.rb +25 -0
  94. data/lib/openstudio-standards/hvac/components/coil.rb +276 -0
  95. data/lib/openstudio-standards/hvac/components/coil_cooling_dx_multi_speed.rb +40 -0
  96. data/lib/openstudio-standards/hvac/components/coil_cooling_dx_single_speed.rb +300 -0
  97. data/lib/openstudio-standards/hvac/components/coil_cooling_dx_two_speed.rb +187 -0
  98. data/lib/openstudio-standards/hvac/components/coil_cooling_water.rb +80 -0
  99. data/lib/openstudio-standards/hvac/components/coil_cooling_water_to_air_heat_pump_equation_fit.rb +182 -0
  100. data/lib/openstudio-standards/hvac/components/coil_heating_dx_single_speed.rb +220 -0
  101. data/lib/openstudio-standards/hvac/components/coil_heating_electric.rb +56 -0
  102. data/lib/openstudio-standards/hvac/components/coil_heating_gas.rb +90 -0
  103. data/lib/openstudio-standards/hvac/components/coil_heating_gas_multi_stage.rb +33 -0
  104. data/lib/openstudio-standards/hvac/components/coil_heating_water.rb +98 -0
  105. data/lib/openstudio-standards/hvac/components/coil_heating_water_to_air_heat_pump_equation_fit.rb +147 -0
  106. data/lib/openstudio-standards/hvac/components/component.rb +39 -0
  107. data/lib/openstudio-standards/{standards/ashrae_90_1/data/ashrae_90_1.fans.json → hvac/components/data/fans.json} +6 -6
  108. data/lib/openstudio-standards/hvac/components/fan.rb +363 -0
  109. data/lib/openstudio-standards/hvac/components/heat_exchanger_air_to_air.rb +203 -0
  110. data/lib/openstudio-standards/hvac/components/pump.rb +181 -0
  111. data/lib/openstudio-standards/hvac/controls/radiant_system_controls.rb +594 -0
  112. data/lib/openstudio-standards/hvac/conversions.rb +222 -0
  113. data/lib/openstudio-standards/hvac/curves.rb +192 -0
  114. data/lib/openstudio-standards/hvac/helpers.rb +357 -0
  115. data/lib/openstudio-standards/hvac/setpoint_managers/information.rb +4 -4
  116. data/lib/openstudio-standards/interior_lighting/create_lights.rb +52 -0
  117. data/lib/openstudio-standards/interior_lighting/create_typical_interior_lighting.rb +254 -0
  118. data/lib/openstudio-standards/interior_lighting/data/convert_lighting_data.rb +249 -0
  119. data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.csv +96 -0
  120. data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.json +1429 -0
  121. data/lib/openstudio-standards/interior_lighting/data/lighting_technology.csv +46 -0
  122. data/lib/openstudio-standards/interior_lighting/data/lighting_technology.json +859 -0
  123. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
  124. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
  125. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
  126. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +4 -4
  127. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
  128. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +4 -4
  129. data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
  130. data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
  131. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +6 -7
  132. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +15 -15
  133. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +4 -4
  134. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +5 -5
  135. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +6 -6
  136. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +7 -7
  137. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +4 -4
  138. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +6 -6
  139. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +5 -1
  140. data/lib/openstudio-standards/prototypes/common/data/prototype_space_type_map.json +2594 -0
  141. data/lib/openstudio-standards/prototypes/common/data/thermostat_schedule_lookup.json +2108 -0
  142. data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirTerminalSingleDuctVAVReheat.rb +33 -0
  143. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +0 -140
  144. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +1 -73
  145. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +1 -69
  146. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +0 -116
  147. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +0 -61
  148. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +2 -2
  149. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +128 -13
  150. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +606 -607
  151. data/lib/openstudio-standards/prototypes/common/prototype_space_type_map.rb +41 -0
  152. data/lib/openstudio-standards/prototypes/common/space_type_equipment_map.rb +184 -0
  153. data/lib/openstudio-standards/prototypes/common/space_type_thermostat_schedule_map.rb +116 -0
  154. data/lib/openstudio-standards/qaqc/hvac.rb +12 -12
  155. data/lib/openstudio-standards/refrigeration/create_compressor.rb +2 -5
  156. data/lib/openstudio-standards/refrigeration/data/refrigeration_compressors.csv +4 -4
  157. data/lib/openstudio-standards/service_water_heating/create_water_heater.rb +1 -2
  158. data/lib/openstudio-standards/service_water_heating/create_water_use.rb +5 -5
  159. data/lib/openstudio-standards/space_type/data/level_1_space_types.json +612 -0
  160. data/lib/openstudio-standards/space_type/standards_space_type.rb +53 -0
  161. data/lib/openstudio-standards/standards/Standards.AirConditionerVariableRefrigerantFlow.rb +8 -26
  162. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +13 -13
  163. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +0 -24
  164. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +6 -43
  165. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +7 -24
  166. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +19 -44
  167. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +25 -50
  168. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +25 -33
  169. data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +9 -22
  170. data/lib/openstudio-standards/standards/Standards.CoilDX.rb +15 -157
  171. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +2 -2
  172. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +18 -105
  173. data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +3 -23
  174. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +0 -24
  175. data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +2 -86
  176. data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +0 -107
  177. data/lib/openstudio-standards/standards/Standards.Model.rb +45 -20
  178. data/lib/openstudio-standards/standards/Standards.People.rb +113 -0
  179. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +11 -11
  180. data/lib/openstudio-standards/standards/Standards.Pump.rb +2 -147
  181. data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +57 -41
  182. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +30 -153
  183. data/lib/openstudio-standards/standards/Standards.Ventilation.rb +74 -0
  184. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +1 -1
  185. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PlantLoop.rb +4 -4
  186. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps_heating.json +3 -3
  187. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +37 -112
  188. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/comstock_ashrae_90_1_2007.spc_typ.json +37 -102
  189. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps_heating.json +3 -3
  190. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +37 -112
  191. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
  192. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/comstock_ashrae_90_1_2010.spc_typ.json +37 -37
  193. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps_heating.json +6 -6
  194. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +37 -37
  195. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
  196. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.BoilerHotWater.rb +1 -1
  197. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/comstock_ashrae_90_1_2013.spc_typ.json +37 -102
  198. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps_heating.json +6 -6
  199. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +37 -37
  200. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
  201. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.BoilerHotWater.rb +1 -1
  202. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/comstock_ashrae_90_1_2016.spc_typ.json +45 -109
  203. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps_heating.json +6 -6
  204. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +37 -37
  205. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +1 -1
  206. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
  207. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.BoilerHotWater.rb +1 -1
  208. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoilHeatingGas.rb +1 -1
  209. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/comstock_ashrae_90_1_2019.spc_typ.json +45 -109
  210. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps_heating.json +6 -6
  211. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +37 -37
  212. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.curves.json +0 -200
  213. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/comstock_doe_ref_1980_2004.spc_typ.json +37 -37
  214. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.spc_typ.json +37 -37
  215. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/comstock_doe_ref_pre_1980.spc_typ.json +37 -37
  216. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.spc_typ.json +37 -37
  217. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
  218. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +5 -5
  219. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
  220. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +5 -5
  221. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +1 -1
  222. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +2 -2
  223. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +2 -68
  224. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +2 -35
  225. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +42 -0
  226. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +5 -2
  227. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +2 -2
  228. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -2
  229. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +3 -3
  230. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +1 -1
  231. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +1 -0
  232. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019_WaterHeaterMixed.rb +2 -4
  233. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.curves.json +0 -200
  234. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.fans.json +5 -5
  235. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/ashrae_90_1_prm.UserData.rb +7 -1
  236. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_enums.rb +0 -1
  237. data/lib/openstudio-standards/standards/cbes/data/cbes.curves.json +0 -200
  238. data/lib/openstudio-standards/standards/deer/data/deer.curves.json +0 -200
  239. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +21 -37
  240. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +12 -11
  241. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +68 -27
  242. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +64 -25
  243. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +9 -14
  244. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +4 -4
  245. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +1 -1
  246. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +115 -112
  247. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +637 -249
  248. data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +16 -12
  249. data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +799 -46
  250. data/lib/openstudio-standards/standards/necb/NECB2011/data/chillers.json +33 -51
  251. data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +75 -7
  252. data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +25 -1
  253. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartmentMult.osm +14272 -0
  254. data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +21 -15
  255. data/lib/openstudio-standards/standards/necb/NECB2011/data/necb_2015_table_c1.json +1 -1
  256. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +437 -437
  257. data/lib/openstudio-standards/standards/necb/NECB2011/data/systems.json +516 -0
  258. data/lib/openstudio-standards/standards/necb/NECB2011/data/systems_including_sys5.json +588 -0
  259. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_namer.rb +489 -0
  260. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +18 -6
  261. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +48 -5
  262. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +2 -2
  263. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +35 -27
  264. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +34 -23
  265. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +8 -6
  266. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +68 -150
  267. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +444 -134
  268. data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +61 -1
  269. data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +10 -2
  270. data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +636 -636
  271. data/lib/openstudio-standards/standards/necb/NECB2015/data/unitary_acs.json +38 -38
  272. data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +17 -8
  273. data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +636 -636
  274. data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +71 -71
  275. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +16 -6
  276. data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +60 -61
  277. data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +30 -30
  278. data/lib/openstudio-standards/standards/necb/README.md +343 -0
  279. data/lib/openstudio-standards/standards/necb/common/btap_analysis.rb +79 -0
  280. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +206 -32
  281. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +75 -43
  282. data/lib/openstudio-standards/standards/necb/common/eccc_electric_grid_intensity_20250311.csv +14 -0
  283. data/lib/openstudio-standards/standards/necb/common/nir_gas_grid_intensity_20250311.csv +14 -0
  284. data/lib/openstudio-standards/standards/necb/common/system_types.yaml +0 -0
  285. data/lib/openstudio-standards/thermal_zone/{thermal_zone.rb → information.rb} +12 -45
  286. data/lib/openstudio-standards/thermal_zone/thermostat_schedules.rb +152 -0
  287. data/lib/openstudio-standards/utilities/logging.rb +18 -14
  288. data/lib/openstudio-standards/version.rb +1 -1
  289. data/lib/openstudio-standards/weather/modify.rb +2 -2
  290. data/lib/openstudio-standards/weather/stat_file.rb +2 -2
  291. data/lib/openstudio-standards.rb +67 -38
  292. metadata +141 -50
  293. data/lib/openstudio-standards/hvac/components/create.rb +0 -169
  294. data/lib/openstudio-standards/hvac/components/modify.rb +0 -42
  295. data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +0 -438
  296. data/lib/openstudio-standards/prototypes/common/objects/Prototype.BoilerHotWater.rb +0 -123
  297. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CentralAirSourceHeatPump.rb +0 -216
  298. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXSingleSpeed.rb +0 -273
  299. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXTwoSpeed.rb +0 -159
  300. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWater.rb +0 -77
  301. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -154
  302. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +0 -214
  303. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingElectric.rb +0 -53
  304. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingGas.rb +0 -72
  305. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWater.rb +0 -95
  306. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -125
  307. data/lib/openstudio-standards/prototypes/common/objects/Prototype.ControllerWaterCoil.rb +0 -17
  308. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.transformers.rb +0 -90
  309. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Pump.rb +0 -4
  310. data/lib/openstudio-standards/prototypes/common/objects/Prototype.PumpVariableSpeed.rb +0 -70
  311. data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +0 -590
  312. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +0 -901
  313. data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -5
  314. data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -5
  315. data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -5
  316. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +0 -5
  317. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +0 -55
  318. data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -5
  319. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +0 -5
  320. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +0 -5
  321. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanZoneExhaust.rb +0 -5
  322. data/lib/openstudio-standards/standards/cbes/data/cbes.fans.json +0 -328
  323. data/lib/openstudio-standards/standards/deer/data/deer.fans.json +0 -328
  324. /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PumpVariableSpeed.rb +0 -0
  325. /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.PumpVariableSpeed.rb +0 -0
  326. /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.PumpVariableSpeed.rb +0 -0
  327. /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PumpVariableSpeed.rb +0 -0
  328. /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +0 -0
  329. /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Pump.rb +0 -0
  330. /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +0 -0
@@ -69,11 +69,9 @@ class NECB2011
69
69
  # Remove any Thermal zones assigned before
70
70
  model.getThermalZones.each(&:remove)
71
71
  # create new thermal zones one to one with spaces.
72
- model_create_thermal_zones(model)
72
+ model_create_thermal_zones(model, space_multiplier_map)
73
73
  # do a sizing run.
74
- if model_run_sizing_run(model, "#{sizing_run_dir}/autozone") == false
75
- raise('autorun sizing run failed!')
76
- end
74
+ try_sizing_run(model: model, sizing_run_dir: sizing_run_dir, sizing_run_subdir: 'autozone')
77
75
 
78
76
  # collect sizing information on each space.
79
77
  store_space_sizing_loads(model)
@@ -94,11 +92,17 @@ class NECB2011
94
92
  # Organizes Zones and assigns them to appropriate systems according to NECB 2011-17 systems spacetype rules in Sec 8.
95
93
  # requires requires fuel type to be assigned for each system aspect. Defaults to gas hydronic.
96
94
  def apply_systems(model:,
95
+ hvac_system_primary:,
96
+ hvac_system_dwelling_units:,
97
+ hvac_system_washrooms:,
98
+ hvac_system_corridor:,
99
+ hvac_system_storage:,
97
100
  sizing_run_dir:,
98
101
  shw_scale:,
99
102
  baseline_system_zones_map_option:)
100
103
  raise('validation of model failed.') unless validate_initial_model(model)
101
-
104
+ # Store fuel type information in case hvac_system_primary requires a reset
105
+ init_fuel_type = get_fuel_type_information()
102
106
  # Check to see if model is using another vintage of spacetypes. If so overwrite the @standards for the object with the
103
107
  # other spacetype data. This is required for correct system mapping.
104
108
  template = determine_spacetype_vintage(model)
@@ -108,23 +112,33 @@ class NECB2011
108
112
  end
109
113
 
110
114
  # do a sizing run.
111
- if model_run_sizing_run(model, "#{sizing_run_dir}/autozone_systems") == false
112
- raise('autorun sizing run failed!')
113
- end
115
+ try_sizing_run(model: model, sizing_run_dir: sizing_run_dir, sizing_run_subdir: 'autozone_systems')
114
116
 
115
117
  # collect sizing information on each space.
116
118
  store_space_sizing_loads(model)
117
119
 
118
-
119
120
  # remove idealair from zones if any.
120
121
  model.getZoneHVACIdealLoadsAirSystems.each(&:remove)
121
- @hw_loop = create_hw_loop_if_required(self.fuel_type_set.baseboard_type,
122
- self.fuel_type_set.boiler_fueltype,
123
- self.fuel_type_set.backup_boiler_fueltype,
124
- self.fuel_type_set.mau_heating_coil_type,
125
- model)
122
+ @hw_loop = create_hw_loop_if_required(baseboard_type: self.fuel_type_set.baseboard_type,
123
+ boiler_fueltype: self.fuel_type_set.boiler_fueltype,
124
+ backup_boiler_fueltype: self.fuel_type_set.backup_boiler_fueltype,
125
+ mau_heating_coil_type: self.fuel_type_set.mau_heating_coil_type,
126
+ heating_coil_type_sys2: self.fuel_type_set.heating_coil_type_sys2,
127
+ heating_coil_type_sys3: self.fuel_type_set.heating_coil_type_sys3,
128
+ heating_coil_type_sys4: self.fuel_type_set.heating_coil_type_sys4,
129
+ heating_coil_type_sys6: self.fuel_type_set.heating_coil_type_sys6,
130
+ model: model,
131
+ hvac_system_primary: hvac_system_primary,
132
+ hvac_system_dwelling_units: hvac_system_dwelling_units,
133
+ hvac_system_washrooms: hvac_system_washrooms,
134
+ hvac_system_corridor: hvac_system_corridor,
135
+ hvac_system_storage: hvac_system_storage
136
+ )
137
+ # Determine if dwelling units, wet spaces, storage spaces, and wild spaces should have their own space or be part of common spaces
138
+ common_system_spaces = spaces_to_add_to_common_system(model: model, hvac_system_dwelling_units: hvac_system_dwelling_units, hvac_system_washrooms: hvac_system_washrooms, hvac_system_corridor: hvac_system_corridor, hvac_system_storage: hvac_system_storage)
126
139
  # Rule that all dwelling units have their own zone and system.
127
140
  auto_system_dwelling_units(model: model,
141
+ hvac_system_dwelling_units: hvac_system_dwelling_units,
128
142
  necb_reference_hp: self.fuel_type_set.necb_reference_hp,
129
143
  necb_reference_hp_supp_fuel: self.fuel_type_set.necb_reference_hp_supp_fuel,
130
144
  baseboard_type: self.fuel_type_set.baseboard_type,
@@ -138,45 +152,56 @@ class NECB2011
138
152
  mau_cooling_type: self.fuel_type_set.mau_cooling_type,
139
153
  mau_heating_coil_type: self.fuel_type_set.mau_heating_coil_type,
140
154
  mau_type: self.fuel_type_set.mau_type,
141
- baseline_system_zones_map_option: baseline_system_zones_map_option)
155
+ baseline_system_zones_map_option: baseline_system_zones_map_option,
156
+ init_fuel_type: init_fuel_type)
142
157
 
143
158
  # Assign a single system 4 for all wet spaces.. and assign the control zone to the one with the largest load.
144
- auto_system_wet_spaces(baseboard_type: self.fuel_type_set.baseboard_type,
159
+ auto_system_wet_spaces(hvac_system_washrooms: hvac_system_washrooms,
160
+ baseboard_type: self.fuel_type_set.baseboard_type,
145
161
  necb_reference_hp: self.fuel_type_set.necb_reference_hp,
146
162
  necb_reference_hp_supp_fuel: self.fuel_type_set.necb_reference_hp_supp_fuel,
147
163
  boiler_fueltype: self.fuel_type_set.boiler_fueltype,
148
164
  heating_coil_type_sys4: self.fuel_type_set.heating_coil_type_sys4,
149
- model: model)
165
+ model: model,
166
+ init_fuel_type: init_fuel_type)
150
167
 
151
168
  # Assign a single system 4 for all storage spaces.. and assign the control zone to the one with the largest load.
152
- auto_system_storage_spaces(baseboard_type: self.fuel_type_set.baseboard_type,
169
+ auto_system_storage_spaces(hvac_system_storage: hvac_system_storage,
170
+ baseboard_type: self.fuel_type_set.baseboard_type,
153
171
  necb_reference_hp: self.fuel_type_set.necb_reference_hp,
154
172
  necb_reference_hp_supp_fuel: self.fuel_type_set.necb_reference_hp_supp_fuel,
155
173
  boiler_fueltype: self.fuel_type_set.boiler_fueltype,
156
174
  heating_coil_type_sys4: self.fuel_type_set.heating_coil_type_sys4,
157
- model: model)
175
+ model: model,
176
+ init_fuel_type: init_fuel_type)
158
177
 
159
178
  # Assign the wild spaces to a single system 4 system with a control zone with the largest load.
160
- auto_system_wild_spaces(baseboard_type: self.fuel_type_set.baseboard_type,
179
+ auto_system_wild_spaces(hvac_system_corridor: hvac_system_corridor,
180
+ baseboard_type: self.fuel_type_set.baseboard_type,
161
181
  necb_reference_hp: self.fuel_type_set.necb_reference_hp,
162
182
  necb_reference_hp_supp_fuel: self.fuel_type_set.necb_reference_hp_supp_fuel,
163
183
  heating_coil_type_sys4: self.fuel_type_set.heating_coil_type_sys4,
164
- model: model)
184
+ model: model,
185
+ init_fuel_type: init_fuel_type)
165
186
  # do the regular assignment for the rest and group where possible.
166
187
  auto_system_all_other_spaces(model: model,
188
+ hvac_system_primary: hvac_system_primary,
167
189
  necb_reference_hp: self.fuel_type_set.necb_reference_hp,
168
190
  necb_reference_hp_supp_fuel: self.fuel_type_set.necb_reference_hp_supp_fuel,
169
191
  baseboard_type: self.fuel_type_set.baseboard_type,
170
192
  boiler_fueltype: self.fuel_type_set.boiler_fueltype,
171
193
  chiller_type: self.fuel_type_set.chiller_type,
172
194
  fan_type: self.fuel_type_set.fan_type,
195
+ heating_coil_type_sys2: self.fuel_type_set.heating_coil_type_sys2,
173
196
  heating_coil_type_sys3: self.fuel_type_set.heating_coil_type_sys3,
174
197
  heating_coil_type_sys4: self.fuel_type_set.heating_coil_type_sys4,
175
198
  hw_loop: @hw_loop,
176
199
  heating_coil_type_sys6: self.fuel_type_set.heating_coil_type_sys6,
177
200
  mau_cooling_type: self.fuel_type_set.mau_cooling_type,
178
201
  mau_heating_coil_type: self.fuel_type_set.mau_heating_coil_type,
179
- mau_type: self.fuel_type_set.mau_type
202
+ mau_type: self.fuel_type_set.mau_type,
203
+ common_system_spaces: common_system_spaces,
204
+ init_fuel_type: init_fuel_type
180
205
  )
181
206
  model_add_swh(model: model,
182
207
  shw_scale: shw_scale)
@@ -207,7 +232,7 @@ class NECB2011
207
232
  def stored_space_heating_load(space)
208
233
  if @stored_space_heating_sizing_loads.nil?
209
234
  # do a sizing run.
210
- raise('autorun sizing run failed!') if model_run_sizing_run(space.model, "#{Dir.pwd}/autozone") == false
235
+ try_sizing_run(model: space.model, sizing_run_dir: "#{Dir.pwd}", sizing_run_subdir: 'autozone')
211
236
 
212
237
  # collect sizing information on each space.
213
238
  store_space_sizing_loads(space.model)
@@ -219,7 +244,7 @@ class NECB2011
219
244
  def stored_space_cooling_load(space)
220
245
  if @stored_space_cooling_sizing_loads.nil?
221
246
  # do a sizing run.
222
- raise('autorun sizing run failed!') if model_run_sizing_run(space.model, "#{Dir.pwd}/autozone") == false
247
+ try_sizing_run(model: space.model, sizing_run_dir: "#{Dir.pwd}", sizing_run_subdir: 'autozone')
223
248
 
224
249
  # collect sizing information on each space.
225
250
  store_space_sizing_loads(space.model)
@@ -317,15 +342,6 @@ class NECB2011
317
342
  ideal_loads = OpenStudio::Model::ZoneHVACIdealLoadsAirSystem.new(model)
318
343
  ideal_loads.addToThermalZone(zone)
319
344
  end
320
- # Go through other spaces to see if there are similar spaces with similar loads on the same floor that can be grouped.
321
- model.getSpaces.select { |s| is_an_necb_wet_space?(s) }.each do |space_target|
322
- if space_target.thermalZone.empty?
323
- if are_space_loads_similar?(space_1: space, space_2: space_target) && space.buildingStory.get == space_target.buildingStory.get # added since chris needs zones to not span floors for costing.
324
- adjust_wildcard_spacetype_schedule(space: space_target, schedule: dominant_schedule, lights_type: lights_type, lights_scale: lights_scale)
325
- space_target.setThermalZone(zone)
326
- end
327
- end
328
- end
329
345
  wet_zone_array << zone
330
346
  end
331
347
  return wet_zone_array
@@ -366,14 +382,6 @@ class NECB2011
366
382
  ideal_loads = OpenStudio::Model::ZoneHVACIdealLoadsAirSystem.new(model)
367
383
  ideal_loads.addToThermalZone(zone)
368
384
  end
369
- # Go through other spaces and if you find something with similar loads on the same floor, add it to the zone.
370
- model.getSpaces.select { |curr_space| !is_a_necb_dwelling_unit?(curr_space) && !is_an_necb_wildcard_space?(curr_space) }.each do |space_target|
371
- if space_target.thermalZone.empty?
372
- if are_space_loads_similar?(space_1: space, space_2: space_target) && space.buildingStory.get == space_target.buildingStory.get # added since chris needs zones to not span floors for costing.
373
- space_target.setThermalZone(zone)
374
- end
375
- end
376
- end
377
385
  other_tz_array << zone
378
386
  end
379
387
  return other_tz_array
@@ -421,15 +429,6 @@ class NECB2011
421
429
  ideal_loads = OpenStudio::Model::ZoneHVACIdealLoadsAirSystem.new(model)
422
430
  ideal_loads.addToThermalZone(zone)
423
431
  end
424
- # Go through other spaces and if you find something with similar loads on the same floor, add it to the zone.
425
- model.getSpaces.select { |curr_space| is_an_necb_wildcard_space?(curr_space) && !is_an_necb_wet_space?(curr_space) }.each do |space_target|
426
- if space_target.thermalZone.empty?
427
- if are_space_loads_similar?(space_1: space, space_2: space_target) &&
428
- (space.buildingStory.get == space_target.buildingStory.get) # added since chris needs zones to not span floors for costing.
429
- space_target.setThermalZone(zone)
430
- end
431
- end
432
- end
433
432
  other_tz_array << zone
434
433
  end
435
434
  return other_tz_array
@@ -504,16 +503,6 @@ class NECB2011
504
503
  ideal_loads = OpenStudio::Model::ZoneHVACIdealLoadsAirSystem.new(model)
505
504
  ideal_loads.addToThermalZone(zone)
506
505
  end
507
- # Go through other spaces to see if there are similar spaces with similar loads on the same floor that can be grouped.
508
- model.getSpaces.select { |s| is_an_necb_wildcard_space?(s) && !is_an_necb_wet_space?(s) }.each do |space_target|
509
- if space_target.thermalZone.empty?
510
- if are_space_loads_similar?(space_1: space, space_2: space_target) &&
511
- space.buildingStory.get == space_target.buildingStory.get # added since chris needs zones to not span floors for costing.
512
- adjust_wildcard_spacetype_schedule(space: space_target, schedule: dominant_floor_schedule, lights_type: @lights_type, lights_scale: @lights_scale)
513
- space_target.setThermalZone(zone)
514
- end
515
- end
516
- end
517
506
  wild_zone_array << zone
518
507
  end
519
508
  return wild_zone_array
@@ -636,6 +625,8 @@ class NECB2011
636
625
 
637
626
  # Check to see if this is a wildcard space that the NECB does not have a specified schedule or system for.
638
627
  def is_an_necb_wildcard_space?(space)
628
+ # Avoid including washrooms and locker rooms as both wildcard and wet spaces
629
+ return nil if space.spaceType.get.standardsSpaceType.get.include?('Locker room') || space.spaceType.get.standardsSpaceType.get.include?('Washroom')
639
630
  space_type_table = @standards_data['space_types']
640
631
  space_type_data = model_find_object(space_type_table,
641
632
  'template' => self.class.name,
@@ -748,7 +739,8 @@ class NECB2011
748
739
  new_spacetype.setStandardsSpaceType(new_spacetype_name)
749
740
  new_spacetype.setName("#{space.spaceType.get.standardsBuildingType.get} #{new_spacetype_name}")
750
741
  space_type_apply_internal_loads(space_type: new_spacetype, lights_type: lights_type, lights_scale: lights_scale)
751
- space_type_apply_internal_load_schedules(new_spacetype, true, true, true, true, true, true)
742
+ space_type_apply_internal_load_schedules(new_spacetype)
743
+ space_type_apply_thermostat_schedules(new_spacetype)
752
744
  end
753
745
  space.setSpaceType(new_spacetype)
754
746
  # sanity check.
@@ -822,35 +814,92 @@ class NECB2011
822
814
  ################################################# NECB Systems
823
815
 
824
816
  # Method will create a hot water loop if systems default fuel and medium sources require it.
825
- def create_hw_loop_if_required(baseboard_type, boiler_fueltype, backup_boiler_fueltype, mau_heating_coil_type, model)
817
+ def create_hw_loop_if_required(baseboard_type:, boiler_fueltype:, backup_boiler_fueltype:, mau_heating_coil_type:, model:, hvac_system_primary: nil, hvac_system_dwelling_units: nil, hvac_system_washrooms: nil, hvac_system_corridor: nil, hvac_system_storage: nil, heating_coil_type_sys2:, heating_coil_type_sys3:, heating_coil_type_sys4:, heating_coil_type_sys6:)
826
818
  # get systems that will be used in the model based on the space types to determine if a hw_loop is required.
827
- systems_used = []
828
- model.getSpaces.sort.each do |space|
829
- systems_used << get_necb_spacetype_system_selection(space)
830
- systems_used.uniq!
831
- end
832
819
 
833
- # See if we need to create a hot water loop based on fueltype and systems used.
834
820
  hw_loop_needed = false
835
- systems_used.each do |system|
836
- case system.to_s
837
- when '2', '5', '7'
838
- hw_loop_needed = true
839
- when '1', '6'
840
- if (mau_heating_coil_type == 'Hot Water') || (baseboard_type == 'Hot Water')
841
- hw_loop_needed = true
842
- end
843
- when '3', '4'
844
- if (mau_heating_coil_type == 'Hot Water') || (baseboard_type == 'Hot Water')
845
- hw_loop_needed = true if baseboard_type == 'Hot Water'
846
- end
821
+
822
+ # Create a boiler if the air loop will use fancoils for heating
823
+ hw_loop_needed = true if self.fuel_type_set.force_airloop_hot_water
824
+
825
+ # Create a boiler if one is forced by the user
826
+ hw_loop_needed = true if self.fuel_type_set.force_boiler
827
+
828
+ # Find Dwelling Units and determine if a HW loop is needed
829
+ dwelling_units = model.getSpaces.select { |space| is_a_necb_dwelling_unit?(space) }
830
+ unless dwelling_units.empty?
831
+ # If no dwelling unit hvac system is defined then check if a HW loop is needed based on the system type.
832
+ if hvac_system_dwelling_units.nil? || hvac_system_dwelling_units.to_s.downcase == 'necb_default'
833
+ hw_loop_needed = hw_loop_required_from_spaces(spaces: dwelling_units, mau_heating_coil_type: mau_heating_coil_type, baseboard_type: baseboard_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
834
+ else
835
+ # If a dwelling unit hvac system is defined then find it in the hvac_types array and check if it requires a HW loop based on the 'needs_boiler' item.
836
+ hvac_system_data = self.standards_data['hvac_types'].find { |system| system['description'] == hvac_system_dwelling_units }
837
+ hw_loop_needed = true if hvac_system_data["needs_boiler"].to_bool unless hw_loop_needed
838
+ hw_loop_needed = boiler_required_from_heating_coils(sys_type: hvac_system_data["system"].to_s, mau_heating_coil_type: mau_heating_coil_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
847
839
  end
848
- if hw_loop_needed
849
- # just need one true condition to need a boiler.
850
- break
840
+ end
841
+
842
+ # Find washrooms and determine if a HW loop is needed
843
+ washroom_spaces = model.getSpaces.select { |space| is_an_necb_wet_space?(space) }
844
+ unless washroom_spaces.empty?
845
+ # If no washroom hvac system is defined then check if a HW loop is needed based on the system type.
846
+ if hvac_system_washrooms.nil? || hvac_system_washrooms.to_s.downcase == 'necb_default'
847
+ hw_loop_needed = hw_loop_required_from_spaces(spaces: washroom_spaces, mau_heating_coil_type: mau_heating_coil_type, baseboard_type: baseboard_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
848
+ else
849
+ # If a washroom hvac system is defined then find it in the hvac_types array and check if it requires a HW loop based on the 'needs_boiler' item.
850
+ hvac_system_data = self.standards_data['hvac_types'].find { |system| system['description'] == hvac_system_washrooms }
851
+ hw_loop_needed = true if hvac_system_data["needs_boiler"].to_bool unless hw_loop_needed
852
+ hw_loop_needed = boiler_required_from_heating_coils(sys_type: hvac_system_data["system"].to_s, mau_heating_coil_type: mau_heating_coil_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
851
853
  end
852
- # each
853
854
  end
855
+
856
+ # Find corridors and determine if a HW loop is needed
857
+ corridor_spaces = model.getSpaces.select { |space| is_an_necb_wildcard_space?(space) }
858
+ unless corridor_spaces.empty?
859
+ # If no corridor hvac system is defined then check if a HW loop is needed based on the system type.
860
+ if hvac_system_corridor.nil? || hvac_system_corridor.to_s.downcase == 'necb_default'
861
+ hw_loop_needed = hw_loop_required_from_spaces(spaces: corridor_spaces, mau_heating_coil_type: mau_heating_coil_type, baseboard_type: baseboard_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
862
+ else
863
+ # If a corridor hvac system is defined then find it in the hvac_types array and check if it requires a HW loop based on the 'needs_boiler' item.
864
+ hvac_system_data = self.standards_data['hvac_types'].find { |system| system['description'] == hvac_system_corridor }
865
+ hw_loop_needed = true if hvac_system_data["needs_boiler"].to_bool unless hw_loop_needed
866
+ hw_loop_needed = boiler_required_from_heating_coils(sys_type: hvac_system_data["system"].to_s, mau_heating_coil_type: mau_heating_coil_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
867
+ end
868
+ end
869
+
870
+ # Find storage spaces and determine if a HW loop is needed
871
+ storage_spaces = model.getSpaces.select { |space| is_an_necb_storage_space?(space) }
872
+ unless storage_spaces.empty?
873
+ # If no storage space hvac system is defined then check if a HW loop is needed based on the system type.
874
+ if hvac_system_storage.nil? || hvac_system_storage.to_s.downcase == 'necb_default'
875
+ hw_loop_needed = hw_loop_required_from_spaces(spaces: storage_spaces, mau_heating_coil_type: mau_heating_coil_type, baseboard_type: baseboard_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
876
+ else
877
+ # If a storage space hvac system is defined then find it in the hvac_types array and check if it requires a HW loop based on the 'needs_boiler' item.
878
+ hvac_system_data = self.standards_data['hvac_types'].find { |system| system['description'] == hvac_system_storage }
879
+ hw_loop_needed = true if hvac_system_data["needs_boiler"].to_bool unless hw_loop_needed
880
+ hw_loop_needed = boiler_required_from_heating_coils(sys_type: hvac_system_data["system"].to_s, mau_heating_coil_type: mau_heating_coil_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
881
+ end
882
+ end
883
+
884
+ # Find if a HW loop is needed for the remaining spaces
885
+ other_spaces = model.getSpaces.select do |space|
886
+ !is_an_necb_wet_space?(space) &&
887
+ !is_a_necb_dwelling_unit?(space) &&
888
+ !is_an_necb_wildcard_space?(space) &&
889
+ !is_an_necb_storage_space?(space)
890
+ end
891
+ unless other_spaces.empty?
892
+ # If a hvac system is defined for the remaining spaces then check if a HW loop is needed based on the system type
893
+ if hvac_system_primary.nil? || hvac_system_primary.to_s.downcase == 'necb_default'
894
+ hw_loop_needed = hw_loop_required_from_spaces(spaces: other_spaces, mau_heating_coil_type: mau_heating_coil_type, baseboard_type: baseboard_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
895
+ else
896
+ # If an hvac system is defined for the remaining spaces then find it in the hvac_types array and check if it requires a HW loop based on the 'needs_boiler' item.
897
+ hvac_system_data = self.standards_data['hvac_types'].find { |system| system['description'] == hvac_system_primary }
898
+ hw_loop_needed = true if hvac_system_data["needs_boiler"].to_bool unless hw_loop_needed
899
+ hw_loop_needed = boiler_required_from_heating_coils(sys_type: hvac_system_data["system"].to_s, mau_heating_coil_type: mau_heating_coil_type, heating_coil_type_sys2: heating_coil_type_sys2, heating_coil_type_sys3: heating_coil_type_sys3, heating_coil_type_sys4: heating_coil_type_sys4, heating_coil_type_sys6: heating_coil_type_sys6) unless hw_loop_needed
900
+ end
901
+ end
902
+
854
903
  # create hw_loop as needed.. Assuming one loop per model.
855
904
  if hw_loop_needed
856
905
  @hw_loop = OpenStudio::Model::PlantLoop.new(model)
@@ -863,14 +912,16 @@ class NECB2011
863
912
  # Default method to create a necb system and assign array of zones to be supported by it. It will try to bring zones with
864
913
  # similar loads on the same airloops and set control zones where possible for single zone systems and will create monolithic
865
914
  # system 6 multizones where possible.
866
- def create_necb_system(baseboard_type:,
915
+ def create_necb_system(hvac_system_primary: 'NECB_Default',
916
+ baseboard_type:,
867
917
  boiler_fueltype:,
868
918
  chiller_type:,
869
919
  fan_type:,
920
+ hw_loop:,
921
+ heating_coil_type_sys2:,
870
922
  heating_coil_type_sys3:,
871
923
  heating_coil_type_sys4:,
872
924
  heating_coil_type_sys6:,
873
- hw_loop:,
874
925
  mau_cooling_type:,
875
926
  mau_heating_coil_type:,
876
927
  mau_type:,
@@ -880,9 +931,28 @@ class NECB2011
880
931
  necb_reference_hp_supp_fuel:'DefaultFuel')
881
932
  # The goal is to minimize the number of system when possible.
882
933
  system_zones_hash = {}
934
+ system_selection = nil
883
935
  zones.each do |zone|
884
- system_zones_hash[get_necb_thermal_zone_system_selection(zone)] = [] if system_zones_hash[get_necb_thermal_zone_system_selection(zone)].nil?
885
- system_zones_hash[get_necb_thermal_zone_system_selection(zone)] << zone
936
+ # Define the system type based on the space type data or use the custom one (hvac_system_primary) if is defined.
937
+ if hvac_system_primary.nil? || hvac_system_primary.to_s.downcase == 'necb_default'
938
+ system_selection = get_necb_thermal_zone_system_selection(zone)
939
+ else
940
+ zone_space_count = 0
941
+ null_space_count = 0
942
+ zone.spaces.sort.each do |space|
943
+ zone_space_count += 1
944
+ null_space_count += 1 if space.spaceType.get.name.to_s.downcase.include?("undefined")
945
+ end
946
+ system_data = @standards_data['hvac_types']
947
+ selected_systems = system_data.select { |ind_system| ind_system["description"].to_s.downcase == hvac_system_primary.to_s.downcase }
948
+ raise ("Could not find the provided HVAC system name in the HVAC system library. Please check the spelling of HVAC system name you defined. Provided HVAC system name: #{hvac_system_primary}") if selected_systems.empty?
949
+ raise ("More than one HVAC systems match the provided HVAC system name. Please check the spelling of the provided HVAC system name. Provided HVAC system name: #{hvac_system_primary}") if selected_systems.size > 1
950
+ system_selection = selected_systems[0]["system"][4].to_i
951
+ # Do not inculde zones exclusively containing undefined spaces
952
+ system_selection = nil if null_space_count > 0 && zone_space_count == null_space_count
953
+ end
954
+ system_zones_hash[system_selection] = [] if system_zones_hash[system_selection].nil?
955
+ system_zones_hash[system_selection] << zone
886
956
  end
887
957
  # puts JSON.pretty_generate(system_zones_hash)
888
958
  # go through each system and zones pairs to
@@ -892,86 +962,141 @@ class NECB2011
892
962
  # Do nothing no system assigned to zone. Used for Unconditioned spaces
893
963
  when 1
894
964
  group_similar_zones_together(sys_zones).each do |curr_zones|
895
- mau_air_loop = add_sys1_unitary_ac_baseboard_heating(model: model,
896
- necb_reference_hp: necb_reference_hp,
897
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
898
- zones: curr_zones,
899
- mau_type: mau_type,
900
- mau_heating_coil_type: mau_heating_coil_type,
901
- baseboard_type: baseboard_type,
902
- hw_loop: @hw_loop,
903
- multispeed: false)
965
+ if hvac_system_primary == 'NECB_Default' or hvac_system_primary.nil?
966
+ mau_air_loop = add_sys1_unitary_ac_baseboard_heating(model: model,
967
+ necb_reference_hp: necb_reference_hp,
968
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
969
+ zones: curr_zones,
970
+ mau_type: mau_type,
971
+ mau_heating_coil_type: mau_heating_coil_type,
972
+ baseboard_type: baseboard_type,
973
+ hw_loop: @hw_loop,
974
+ multispeed: false)
975
+ else
976
+ create_hvac_by_name( model: model,
977
+ hvac_system_name: hvac_system_primary,
978
+ hw_loop: @hw_loop,
979
+ zones: curr_zones
980
+ )
981
+ end
904
982
  end
983
+
905
984
  when 2
906
985
  group_similar_zones_together(sys_zones).each do |curr_zones|
907
- add_sys2_FPFC_sys5_TPFC(model: model,
908
- zones: curr_zones,
909
- chiller_type: chiller_type,
910
- mau_cooling_type: mau_cooling_type,
911
- fan_coil_type: 'FPFC',
912
- hw_loop: @hw_loop)
986
+ if hvac_system_primary == 'NECB_Default' or hvac_system_primary.nil?
987
+ add_sys2_FPFC_sys5_TPFC(model: model,
988
+ zones: curr_zones,
989
+ chiller_type: chiller_type,
990
+ mau_cooling_type: mau_cooling_type,
991
+ fan_coil_type: 'FPFC',
992
+ hw_loop: @hw_loop)
993
+ else
994
+ create_hvac_by_name( model: model,
995
+ hvac_system_name: hvac_system_primary,
996
+ hw_loop: @hw_loop,
997
+ zones: curr_zones
998
+ )
999
+ end
913
1000
  end
914
1001
  when 3
915
1002
  group_similar_zones_together(sys_zones).each do |curr_zones|
916
- add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
917
- necb_reference_hp: necb_reference_hp,
918
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
919
- zones: curr_zones,
920
- heating_coil_type: heating_coil_type_sys3,
921
- baseboard_type: baseboard_type,
922
- hw_loop: @hw_loop,
923
- multispeed: false)
1003
+ if hvac_system_primary == 'NECB_Default' or hvac_system_primary.nil?
1004
+ add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
1005
+ necb_reference_hp: necb_reference_hp,
1006
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1007
+ zones: curr_zones,
1008
+ heating_coil_type: heating_coil_type_sys3,
1009
+ baseboard_type: baseboard_type,
1010
+ hw_loop: @hw_loop,
1011
+ multispeed: false)
1012
+ else
1013
+ create_hvac_by_name( model: model,
1014
+ hvac_system_name: hvac_system_primary,
1015
+ hw_loop: @hw_loop,
1016
+ zones: curr_zones
1017
+ )
1018
+ end
924
1019
  end
1020
+
925
1021
  when 4
926
1022
  group_similar_zones_together(sys_zones).each do |curr_zones|
927
- add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
928
- necb_reference_hp: necb_reference_hp,
929
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
930
- zones: curr_zones,
931
- heating_coil_type: heating_coil_type_sys4,
932
- baseboard_type: baseboard_type,
933
- hw_loop: @hw_loop)
934
- # add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
935
- # zones: zones,
936
- # heating_coil_type: heating_coil_type_sys4,
937
- # baseboard_type: baseboard_type,
938
- # hw_loop: @hw_loop,
939
- # multispeed: false)
1023
+ if hvac_system_primary == 'NECB_Default' or hvac_system_primary.nil?
1024
+ add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
1025
+ necb_reference_hp: necb_reference_hp,
1026
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1027
+ zones: curr_zones,
1028
+ heating_coil_type: heating_coil_type_sys4,
1029
+ baseboard_type: baseboard_type,
1030
+ hw_loop: @hw_loop)
1031
+ else
1032
+ create_hvac_by_name( model: model,
1033
+ hvac_system_name: hvac_system_primary,
1034
+ hw_loop: @hw_loop,
1035
+ zones: curr_zones
1036
+ )
1037
+ end
940
1038
  end
1039
+
941
1040
  when 5
942
1041
  group_similar_zones_together(sys_zones).each do |curr_zones|
943
- add_sys2_FPFC_sys5_TPFC(model: model,
944
- zones: curr_zones,
945
- chiller_type: chiller_type,
946
- mau_cooling_type: mau_cooling_type,
947
- fan_coil_type: 'TPFC',
948
- hw_loop: @hw_loop)
1042
+ if hvac_system_primary == 'NECB_Default' or hvac_system_primary.nil?
1043
+ add_sys2_FPFC_sys5_TPFC(model: model,
1044
+ zones: curr_zones,
1045
+ chiller_type: chiller_type,
1046
+ mau_cooling_type: mau_cooling_type,
1047
+ fan_coil_type: 'TPFC',
1048
+ hw_loop: @hw_loop)
1049
+ else
1050
+ create_hvac_by_name( model: model,
1051
+ hvac_system_name: hvac_system_primary,
1052
+ hw_loop: @hw_loop,
1053
+ zones: curr_zones
1054
+ )
1055
+ end
949
1056
  end
1057
+
950
1058
  when 6
951
- if necb_reference_hp
952
- add_sys6_multi_zone_reference_hp_with_baseboard_heating(model: model,
953
- zones: sys_zones,
954
- heating_coil_type: heating_coil_type_sys6,
955
- baseboard_type: baseboard_type,
956
- hw_loop:@hw_loop,
957
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel)
958
- else
959
- add_sys6_multi_zone_built_up_system_with_baseboard_heating(model: model,
1059
+ if hvac_system_primary == 'NECB_Default' or hvac_system_primary.nil?
1060
+ if necb_reference_hp
1061
+ add_sys6_multi_zone_reference_hp_with_baseboard_heating(model: model,
960
1062
  zones: sys_zones,
961
1063
  heating_coil_type: heating_coil_type_sys6,
962
1064
  baseboard_type: baseboard_type,
963
- chiller_type: chiller_type,
964
- fan_type: fan_type,
965
- hw_loop: @hw_loop)
1065
+ hw_loop:@hw_loop,
1066
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel)
1067
+ else
1068
+ add_sys6_multi_zone_built_up_system_with_baseboard_heating(model: model,
1069
+ zones: sys_zones,
1070
+ heating_coil_type: heating_coil_type_sys6,
1071
+ baseboard_type: baseboard_type,
1072
+ chiller_type: chiller_type,
1073
+ fan_type: fan_type,
1074
+ hw_loop: @hw_loop)
1075
+ end
1076
+ else
1077
+ create_hvac_by_name( model: model,
1078
+ hvac_system_name: hvac_system_primary,
1079
+ hw_loop: @hw_loop,
1080
+ zones: sys_zones
1081
+ )
966
1082
  end
1083
+
967
1084
  when 7
968
1085
  group_similar_zones_together(sys_zones).each do |curr_zones|
969
- add_sys2_FPFC_sys5_TPFC(model: model,
970
- zones: curr_zones,
971
- chiller_type: chiller_type,
972
- fan_coil_type: 'FPFC',
973
- mau_cooling_type: mau_cooling_type,
974
- hw_loop: @hw_loop)
1086
+ if hvac_system_primary == 'NECB_Default' or hvac_system_primary.nil?
1087
+ add_sys2_FPFC_sys5_TPFC(model: model,
1088
+ zones: curr_zones,
1089
+ chiller_type: chiller_type,
1090
+ fan_coil_type: 'FPFC',
1091
+ mau_cooling_type: mau_cooling_type,
1092
+ hw_loop: @hw_loop)
1093
+ else
1094
+ create_hvac_by_name( model: model,
1095
+ hvac_system_name: hvac_system_primary,
1096
+ hw_loop: @hw_loop,
1097
+ zones: curr_zones
1098
+ )
1099
+ end
975
1100
  end
976
1101
  end
977
1102
  end
@@ -979,11 +1104,13 @@ class NECB2011
979
1104
 
980
1105
  # This method will deal with all non wet, non-wild, and non-dwelling units thermal zones.
981
1106
  def auto_system_all_other_spaces(baseboard_type:,
982
- necb_reference_hp:false,
983
- necb_reference_hp_supp_fuel:'DefaultFuel',
1107
+ hvac_system_primary:,
1108
+ necb_reference_hp: false,
1109
+ necb_reference_hp_supp_fuel: 'DefaultFuel',
984
1110
  boiler_fueltype:,
985
1111
  chiller_type:,
986
1112
  fan_type:,
1113
+ heating_coil_type_sys2:,
987
1114
  heating_coil_type_sys3:,
988
1115
  heating_coil_type_sys4:,
989
1116
  heating_coil_type_sys6:,
@@ -991,24 +1118,43 @@ class NECB2011
991
1118
  mau_cooling_type:,
992
1119
  mau_heating_coil_type:,
993
1120
  mau_type:,
994
- model:)
995
-
1121
+ model:,
1122
+ common_system_spaces: [],
1123
+ init_fuel_type:)
1124
+ # Reset fuel type set to those defined by the user
1125
+ fuel_type_set.reset_default_fuel_info(init_fuel_type: init_fuel_type)
1126
+ # Set fuel type info based on hvac_system_primary (if set)
1127
+ unless hvac_system_primary.nil? || hvac_system_primary.to_s.downcase == 'necb_default'
1128
+ fuel_type_set.set_fuel_to_hvac_system_primary(hvac_system_primary: hvac_system_primary, standards_data: @standards_data)
1129
+ mau_type = fuel_type_set.mau_type unless fuel_type_set.mau_type.nil?
1130
+ mau_heating_coil_type = fuel_type_set.mau_heating_coil_type unless fuel_type_set.mau_heating_coil_type.nil? || fuel_type_set.force_airloop_hot_water
1131
+ necb_reference_hp = fuel_type_set.necb_reference_hp unless fuel_type_set.necb_reference_hp.nil?
1132
+ necb_reference_hp_supp_fuel = fuel_type_set.necb_reference_hp_supp_fuel unless fuel_type_set.necb_reference_hp_supp_fuel.nil? || fuel_type_set.force_airloop_hot_water
1133
+ heating_coil_type_sys4 = fuel_type_set.heating_coil_type_sys4 unless fuel_type_set.heating_coil_type_sys4.nil? || fuel_type_set.force_airloop_hot_water
1134
+ end
996
1135
  zones = []
997
1136
  other_spaces = model.getSpaces.select do |space|
1137
+ !is_an_necb_wet_space?(space) &&
998
1138
  !is_a_necb_dwelling_unit?(space) &&
999
1139
  !is_an_necb_wildcard_space?(space) &&
1000
1140
  !is_an_necb_storage_space?(space)
1001
1141
  end
1142
+ # Add any dwelling units, washrooms, cooridors, or storage spaces to the list of other spaces if a non-default system type was assigned to them
1143
+ unless common_system_spaces.empty? || common_system_spaces.nil?
1144
+ other_spaces = other_spaces + common_system_spaces
1145
+ end
1002
1146
  other_spaces.each do |space|
1003
1147
  zones << space.thermalZone.get
1004
1148
  end
1005
1149
  zones.uniq!
1006
1150
 
1007
1151
  # since dwelling units are all zoned 1:1 to space:zone we simply add the zone to the appropriate btap system.
1008
- create_necb_system(baseboard_type: baseboard_type,
1152
+ create_necb_system(hvac_system_primary: hvac_system_primary,
1153
+ baseboard_type: baseboard_type,
1009
1154
  boiler_fueltype: boiler_fueltype,
1010
1155
  chiller_type: chiller_type,
1011
1156
  fan_type: fan_type,
1157
+ heating_coil_type_sys2: heating_coil_type_sys2,
1012
1158
  heating_coil_type_sys3: heating_coil_type_sys3,
1013
1159
  heating_coil_type_sys4: heating_coil_type_sys4,
1014
1160
  heating_coil_type_sys6: heating_coil_type_sys6,
@@ -1020,12 +1166,16 @@ class NECB2011
1020
1166
  zones: zones,
1021
1167
  necb_reference_hp: necb_reference_hp,
1022
1168
  necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel)
1169
+ # Reset fuel type set back to those defined by the user
1170
+ fuel_type_set.reset_default_fuel_info(init_fuel_type: init_fuel_type)
1023
1171
  end
1024
1172
 
1025
1173
  # This method will ensure that all dwelling units are assigned to a system 1 or 3.
1026
1174
  # There is an option to have a shared AHU or not.
1027
1175
 
1028
- def auto_system_dwelling_units(baseboard_type:,
1176
+ def auto_system_dwelling_units(
1177
+ hvac_system_dwelling_units:,
1178
+ baseboard_type:,
1029
1179
  necb_reference_hp:false,
1030
1180
  necb_reference_hp_supp_fuel:'DefaultFuel',
1031
1181
  boiler_fueltype:,
@@ -1039,7 +1189,10 @@ class NECB2011
1039
1189
  mau_heating_coil_type:,
1040
1190
  mau_type:,
1041
1191
  model:,
1042
- baseline_system_zones_map_option:)
1192
+ baseline_system_zones_map_option:,
1193
+ init_fuel_type:)
1194
+ # Reset fuel type set to those defined by the user
1195
+ fuel_type_set.reset_default_fuel_info(init_fuel_type: init_fuel_type)
1043
1196
  system_zones_hash = {}
1044
1197
  # Determine if dwelling units have a shared AHU. If user entered building stories > 4 then set to true.
1045
1198
  if baseline_system_zones_map_option == 'one_sys_per_dwelling_unit'
@@ -1054,75 +1207,100 @@ class NECB2011
1054
1207
  end
1055
1208
  zones.uniq!
1056
1209
 
1057
- # sort system 1 or 3 used for each dwelling unit as per T8.4.4.8.A NECB 2011-17
1058
- zones.each do |zone|
1059
- system_zones_hash[get_necb_thermal_zone_system_selection(zone)] = [] if system_zones_hash[get_necb_thermal_zone_system_selection(zone)].nil?
1060
- system_zones_hash[get_necb_thermal_zone_system_selection(zone)] << zone
1061
- end
1210
+ if hvac_system_dwelling_units.to_s.downcase == 'necb_default' || hvac_system_dwelling_units.nil?
1062
1211
 
1063
- # go through each system and zones pairs to
1064
- system_zones_hash.each_pair do |system, sys_zones|
1065
- case system
1066
- when 1
1067
- if dwelling_shared_ahu
1068
- add_sys1_unitary_ac_baseboard_heating(model: model,
1069
- necb_reference_hp: necb_reference_hp,
1070
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1071
- zones: sys_zones,
1072
- mau_type: mau_type,
1073
- mau_heating_coil_type: mau_heating_coil_type,
1074
- baseboard_type: baseboard_type,
1075
- hw_loop: @hw_loop,
1076
- multispeed: false)
1077
- else
1078
- # Create a separate air loop for each unit.
1079
- sys_zones.each do |zone|
1212
+ # sort system 1 or 3 used for each dwelling unit as per T8.4.4.8.A NECB 2011-17
1213
+ zones.each do |zone|
1214
+ system_zones_hash[get_necb_thermal_zone_system_selection(zone)] = [] if system_zones_hash[get_necb_thermal_zone_system_selection(zone)].nil?
1215
+ system_zones_hash[get_necb_thermal_zone_system_selection(zone)] << zone
1216
+ end # zone
1217
+
1218
+ # go through each system and zones pairs to
1219
+ system_zones_hash.each_pair do |system, sys_zones|
1220
+ case system
1221
+ when 1
1222
+ if dwelling_shared_ahu
1080
1223
  add_sys1_unitary_ac_baseboard_heating(model: model,
1081
1224
  necb_reference_hp: necb_reference_hp,
1082
1225
  necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1083
- zones: [zone],
1226
+ zones: sys_zones,
1084
1227
  mau_type: mau_type,
1085
1228
  mau_heating_coil_type: mau_heating_coil_type,
1086
1229
  baseboard_type: baseboard_type,
1087
1230
  hw_loop: @hw_loop,
1088
1231
  multispeed: false)
1089
- end
1090
- end
1091
-
1092
- when 3
1093
- if dwelling_shared_ahu
1094
- add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
1095
- necb_reference_hp: necb_reference_hp,
1096
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1097
- zones: sys_zones,
1098
- heating_coil_type: heating_coil_type_sys3,
1099
- baseboard_type: baseboard_type,
1100
- hw_loop: @hw_loop,
1101
- multispeed: false)
1102
- else
1103
- # Create a separate air loop for each unit.
1104
- sys_zones.each do |zone|
1232
+ else
1233
+ # Create a separate air loop for each unit.
1234
+ sys_zones.each do |zone|
1235
+ add_sys1_unitary_ac_baseboard_heating(model: model,
1236
+ necb_reference_hp: necb_reference_hp,
1237
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1238
+ zones: [zone],
1239
+ mau_type: mau_type,
1240
+ mau_heating_coil_type: mau_heating_coil_type,
1241
+ baseboard_type: baseboard_type,
1242
+ hw_loop: @hw_loop,
1243
+ multispeed: false)
1244
+ end # if
1245
+ end # when 1
1246
+
1247
+ when 3
1248
+ if dwelling_shared_ahu
1105
1249
  add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
1106
1250
  necb_reference_hp: necb_reference_hp,
1107
1251
  necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1108
- zones: [zone],
1252
+ zones: sys_zones,
1109
1253
  heating_coil_type: heating_coil_type_sys3,
1110
1254
  baseboard_type: baseboard_type,
1111
1255
  hw_loop: @hw_loop,
1112
1256
  multispeed: false)
1113
- end
1114
- end
1115
- end
1116
- end
1257
+ else
1258
+
1259
+ # Create a separate air loop for each unit.
1260
+ sys_zones.each do |zone|
1261
+ add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
1262
+ necb_reference_hp: necb_reference_hp,
1263
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1264
+ zones: [zone],
1265
+ heating_coil_type: heating_coil_type_sys3,
1266
+ baseboard_type: baseboard_type,
1267
+ hw_loop: @hw_loop,
1268
+ multispeed: false)
1269
+ end # end zone
1270
+ end # end if
1271
+ end # end when 3
1272
+ end # Sys_zone loop
1273
+ # else # New HVAC system
1274
+ # system_zones_hash.each_pair do |system, sys_zones|
1275
+ # if dwelling_shared_ahu
1276
+ # create_hvac_by_name( model: model,
1277
+ # hvac_system_name: hvac_system_dwelling_units,
1278
+ # zones: sys_zones,
1279
+ # hw_loop: @hw_loop) # Add this method to create the system.
1280
+ # else
1281
+ # # Create a separate air loop for each unit.
1282
+ # sys_zones.each do |zone|
1283
+ # create_hvac_by_name( model: model,
1284
+ # hvac_system_name: hvac_system_dwelling_units,
1285
+ # zones: [zone],
1286
+ # hw_loop: @hw_loop) # Add this method to create the system.
1287
+ # end # zone
1288
+ # end # if
1289
+ # end # Sys_zone loop
1290
+ end # if new HVAC system
1117
1291
  end
1118
1292
 
1119
1293
  # All wet spaces will be on their own system 4 AHU.
1120
- def auto_system_wet_spaces(baseboard_type:,
1294
+ def auto_system_wet_spaces(hvac_system_washrooms: 'NECB_Default',
1295
+ baseboard_type:,
1121
1296
  necb_reference_hp:false,
1122
1297
  necb_reference_hp_supp_fuel:'DefaultFuel',
1123
1298
  boiler_fueltype:,
1124
1299
  heating_coil_type_sys4:,
1125
- model:)
1300
+ model:,
1301
+ init_fuel_type:)
1302
+ # Reset fuel type set to those defined by the user
1303
+ fuel_type_set.reset_default_fuel_info(init_fuel_type: init_fuel_type)
1126
1304
  # Determine what zones are wet zones.
1127
1305
  wet_tz = []
1128
1306
  wet_spaces = model.getSpaces.select { |space| is_an_necb_wet_space?(space) }
@@ -1130,29 +1308,33 @@ class NECB2011
1130
1308
  wet_tz.uniq!
1131
1309
  # create a system 4 for the wet zones.
1132
1310
  return if wet_tz.empty?
1133
-
1134
- add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
1135
- necb_reference_hp: necb_reference_hp,
1136
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1137
- zones: wet_tz,
1138
- heating_coil_type: heating_coil_type_sys4,
1139
- baseboard_type: baseboard_type,
1140
- hw_loop: @hw_loop)
1141
- # add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
1142
- # zones: wet_tz,
1143
- # heating_coil_type: heating_coil_type_sys4,
1144
- # baseboard_type: baseboard_type,
1145
- # hw_loop: @hw_loop,
1146
- # multispeed: false)
1311
+ if hvac_system_washrooms.to_s.downcase == 'necb_default' || hvac_system_washrooms.nil?
1312
+ add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
1313
+ necb_reference_hp: necb_reference_hp,
1314
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1315
+ zones: wet_tz,
1316
+ heating_coil_type: heating_coil_type_sys4,
1317
+ baseboard_type: baseboard_type,
1318
+ hw_loop: @hw_loop)
1319
+ #else
1320
+ # create_hvac_by_name( model: model,
1321
+ # hvac_system_name: hvac_system_washrooms,
1322
+ # zones: wet_tz,
1323
+ # hw_loop: @hw_loop) # Add this method to create the system.
1324
+ end
1147
1325
  end
1148
1326
 
1149
1327
  # All wet spaces will be on their own system 4 AHU.
1150
- def auto_system_storage_spaces(baseboard_type:,
1328
+ def auto_system_storage_spaces(hvac_system_storage: 'NECB_Default',
1329
+ baseboard_type:,
1151
1330
  necb_reference_hp:false,
1152
1331
  necb_reference_hp_supp_fuel:'DefaultFuel',
1153
1332
  boiler_fueltype:,
1154
1333
  heating_coil_type_sys4:,
1155
- model:)
1334
+ model:,
1335
+ init_fuel_type:)
1336
+ # Reset fuel type set to those defined by the user
1337
+ fuel_type_set.reset_default_fuel_info(init_fuel_type: init_fuel_type)
1156
1338
  # Determine what zones are storage zones.
1157
1339
  tz = []
1158
1340
  storage_spaces = model.getSpaces.select { |space| is_an_necb_storage_space?(space) }
@@ -1160,29 +1342,34 @@ class NECB2011
1160
1342
  tz.uniq!
1161
1343
 
1162
1344
  return if tz.empty?
1345
+ if hvac_system_storage.to_s.downcase == 'necb_default' || hvac_system_storage.nil?
1346
+ # create a system 4 for the zones.
1347
+ add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
1348
+ necb_reference_hp: necb_reference_hp,
1349
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1350
+ zones: tz,
1351
+ heating_coil_type: heating_coil_type_sys4,
1352
+ baseboard_type: baseboard_type,
1353
+ hw_loop: @hw_loop)
1354
+ #else
1355
+ # create_hvac_by_name(model: model,
1356
+ # hvac_system_name: hvac_system_storage,
1357
+ # zones: tz,
1358
+ # hw_loop: @hw_loop) # Add this method to create the system.
1359
+ end
1163
1360
 
1164
- # create a system 4 for the zones.
1165
- add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
1166
- necb_reference_hp: necb_reference_hp,
1167
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1168
- zones: tz,
1169
- heating_coil_type: heating_coil_type_sys4,
1170
- baseboard_type: baseboard_type,
1171
- hw_loop: @hw_loop)
1172
- # add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
1173
- # zones: tz,
1174
- # heating_coil_type: heating_coil_type_sys4,
1175
- # baseboard_type: baseboard_type,
1176
- # hw_loop: @hw_loop,
1177
- # multispeed: true)
1178
1361
  end
1179
1362
 
1180
1363
  # All wild spaces will be on a single system 4 ahu with the largests heating load zone being the control zone.
1181
- def auto_system_wild_spaces(baseboard_type:,
1182
- necb_reference_hp:false,
1183
- necb_reference_hp_supp_fuel:'Defaultfuel',
1364
+ def auto_system_wild_spaces(hvac_system_corridor: 'NECB_Default',
1365
+ baseboard_type:,
1366
+ necb_reference_hp: false,
1367
+ necb_reference_hp_supp_fuel: 'Defaultfuel',
1184
1368
  heating_coil_type_sys4:,
1185
- model:)
1369
+ model:,
1370
+ init_fuel_type:)
1371
+ # Reset fuel type set to those defined by the user
1372
+ fuel_type_set.reset_default_fuel_info(init_fuel_type: init_fuel_type)
1186
1373
 
1187
1374
  zones = []
1188
1375
  wild_spaces = model.getSpaces.select { |space| !is_an_necb_wet_space?(space) && is_an_necb_wildcard_space?(space) }
@@ -1191,20 +1378,21 @@ class NECB2011
1191
1378
 
1192
1379
  return if zones.empty?
1193
1380
 
1194
- # create a system 4 for the wild zones.
1195
- add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
1196
- necb_reference_hp: necb_reference_hp,
1197
- necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1198
- zones: zones,
1199
- heating_coil_type: heating_coil_type_sys4,
1200
- baseboard_type: baseboard_type,
1201
- hw_loop: @hw_loop)
1202
- # add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model: model,
1203
- # zones: zones,
1204
- # heating_coil_type: heating_coil_type_sys4,
1205
- # baseboard_type: baseboard_type,
1206
- # hw_loop: @hw_loop,
1207
- # multispeed: true)
1381
+ if hvac_system_corridor.to_s.downcase == 'necb_default' || hvac_system_corridor.nil?
1382
+ # create a system 4 for the wild zones.
1383
+ add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
1384
+ necb_reference_hp: necb_reference_hp,
1385
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1386
+ zones: zones,
1387
+ heating_coil_type: heating_coil_type_sys4,
1388
+ baseboard_type: baseboard_type,
1389
+ hw_loop: @hw_loop)
1390
+ #else
1391
+ # create_hvac_by_name( model: model,
1392
+ # hvac_system_name: hvac_system_corridor,
1393
+ # zones: zones,
1394
+ # hw_loop: @hw_loop) # Add this method to create the system.
1395
+ end
1208
1396
  end
1209
1397
 
1210
1398
  # This method will determine the control zone from the last sizing run space loads.
@@ -1265,4 +1453,204 @@ class NECB2011
1265
1453
  rendering_color.setRenderingBlueValue(random.rand(255))
1266
1454
  return rendering_color
1267
1455
  end
1456
+
1457
+ def create_hvac_by_name(model:, hvac_system_name:, zones:, hw_loop: nil)
1458
+ # Get the HVAC system properties
1459
+ # Get the HVAC system properties from lib/openstudio-standards/standards/necb/NECB2011/data/systems.json from description field.
1460
+ hvac_system_data = self.standards_data['hvac_types'].find { |system| system['description'] == hvac_system_name }
1461
+ raise("Could not find hvac_system_data for #{hvac_system_name}") if hvac_system_data.nil?
1462
+ necb_reference_hp_supp_fuel = hvac_system_data['necb_reference_hp_supp_fuel']
1463
+ necb_reference_hp_supp_fuel = 'Hot Water' if self.fuel_type_set.force_airloop_hot_water
1464
+ mau_heating_coil_type = hvac_system_data['mau_heating_type']
1465
+ baseboard_type = hvac_system_data['baseboard_type']
1466
+ baseboard_type = self.fuel_type_set.baseboard_type if self.fuel_type_set.force_boiler
1467
+ heating_coil_type = hvac_system_data['heating_coil_type']
1468
+
1469
+ case hvac_system_data['system']
1470
+ when 'sys_1'
1471
+ mau_heating_coil_type = self.fuel_type_set.mau_heating_coil_type if self.fuel_type_set.force_airloop_hot_water && mau_heating_coil_type != 'DX'
1472
+ add_sys1_unitary_ac_baseboard_heating_single_speed(
1473
+ model: model,
1474
+ necb_reference_hp: hvac_system_data['necb_reference_hp'],
1475
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1476
+ zones: zones,
1477
+ mau_type: hvac_system_data['mau_type'],
1478
+ mau_heating_coil_type: mau_heating_coil_type,
1479
+ baseboard_type: baseboard_type,
1480
+ hw_loop: hw_loop
1481
+ )
1482
+ when 'sys_2'
1483
+ add_sys2_FPFC_sys5_TPFC( model: model,
1484
+ zones:zones,
1485
+ chiller_type: hvac_system_data['chiller_type'],
1486
+ fan_coil_type: hvac_system_data['fan_coil_type'],
1487
+ mau_cooling_type: hvac_system_data['mau_cooling_type'],
1488
+ hw_loop: hw_loop)
1489
+ when 'sys_3'
1490
+ heating_coil_type = self.fuel_type_set.heating_coil_type_sys3 if self.fuel_type_set.force_airloop_hot_water && heating_coil_type != 'DX'
1491
+ add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating_single_speed(
1492
+ model: model,
1493
+ necb_reference_hp: hvac_system_data['necb_reference_hp'],
1494
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1495
+ zones: zones,
1496
+ heating_coil_type: heating_coil_type,
1497
+ baseboard_type: baseboard_type,
1498
+ hw_loop: hw_loop,
1499
+ new_auto_zoner: true)
1500
+ when 'sys_4'
1501
+ heating_coil_type = self.fuel_type_set.heating_coil_type_sys4 if self.fuel_type_set.force_airloop_hot_water && heating_coil_type != 'DX'
1502
+ add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model: model,
1503
+ necb_reference_hp: hvac_system_data['necb_reference_hp'],
1504
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel,
1505
+ zones: zones,
1506
+ heating_coil_type: heating_coil_type,
1507
+ baseboard_type: baseboard_type,
1508
+ hw_loop: hw_loop)
1509
+ when 'sys_5'
1510
+ add_sys2_FPFC_sys5_TPFC( model: model,
1511
+ zones:zones,
1512
+ chiller_type: hvac_system_data['chiller_type'],
1513
+ fan_coil_type: hvac_system_data['fan_coil_type'],
1514
+ mau_cooling_type: hvac_system_data['mau_cooling_type'],
1515
+ hw_loop: hw_loop)
1516
+ when 'sys_6'
1517
+ heating_coil_type = self.fuel_type_set.heating_coil_type_sys6 if self.fuel_type_set.force_airloop_hot_water && heating_coil_type != 'DX'
1518
+ if heating_coil_type == 'DX'
1519
+ add_sys6_multi_zone_reference_hp_with_baseboard_heating(model: model,
1520
+ zones: zones,
1521
+ heating_coil_type: heating_coil_type,
1522
+ baseboard_type: baseboard_type,
1523
+ hw_loop: hw_loop,
1524
+ necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel)
1525
+ else
1526
+ add_sys6_multi_zone_built_up_system_with_baseboard_heating(
1527
+ model:model,
1528
+ zones:zones,
1529
+ heating_coil_type: heating_coil_type,
1530
+ baseboard_type: baseboard_type,
1531
+ chiller_type: hvac_system_data['chiller_type'],
1532
+ fan_type: hvac_system_data['fan_type'],
1533
+ hw_loop: hw_loop
1534
+ )
1535
+ end
1536
+ end
1537
+
1538
+ end
1539
+
1540
+ # Method will check if the spaces passed to it will require a hot water loop based on their associated system type.
1541
+ def hw_loop_required_from_spaces(spaces:, mau_heating_coil_type:, baseboard_type:, heating_coil_type_sys2:, heating_coil_type_sys3:, heating_coil_type_sys4:, heating_coil_type_sys6:)
1542
+ hw_loop_needed = false
1543
+ systems_used = []
1544
+
1545
+ # Find the space type for each space and get the system type associated with each space type
1546
+ spaces.sort.each do |space|
1547
+ space_system = get_necb_spacetype_system_selection(space)
1548
+ space_system = 4 if space_system.nil? && (is_an_necb_storage_space?(space) || is_an_necb_wet_space?(space) || is_an_necb_wildcard_space?(space))
1549
+ systems_used << space_system
1550
+ systems_used.uniq!
1551
+ end
1552
+
1553
+ # See if we need to create a hot water loop based on fueltype and systems used.
1554
+ systems_used.each do |system|
1555
+ case system.to_s
1556
+ when '2', '5', '7'
1557
+ hw_loop_needed = true
1558
+ when '1', '6'
1559
+ if (mau_heating_coil_type == 'Hot Water') || (baseboard_type == 'Hot Water') || (mau_heating_coil_type == 'HotWater') || baseboard_type == 'HotWater' || (heating_coil_type_sys6 == 'HotWater') || (heating_coil_type_sys6 == 'Hot Water')
1560
+ hw_loop_needed = true
1561
+ end
1562
+ when '3', '4'
1563
+ if (mau_heating_coil_type == 'Hot Water') || (baseboard_type == 'Hot Water') || (mau_heating_coil_type == 'HotWater') || baseboard_type == 'HotWater' || (heating_coil_type_sys4 == 'HotWater') || (heating_coil_type_sys4 == 'Hot Water') || (heating_coil_type_sys3 == 'HotWater') || (heating_coil_type_sys3 == 'Hot Water')
1564
+ hw_loop_needed = true if baseboard_type == 'Hot Water'
1565
+ hw_loop_needed = true if (mau_heating_coil_type == 'Hot Water') || (mau_heating_coil_type == 'HotWater') || (heating_coil_type_sys4 == 'HotWater') || (heating_coil_type_sys4 == 'Hot Water') || (heating_coil_type_sys3 == 'HotWater') || (heating_coil_type_sys3 == 'Hot Water')
1566
+ end
1567
+ end
1568
+ if hw_loop_needed
1569
+ # just need one true condition to need a boiler.
1570
+ break
1571
+ end
1572
+ # each
1573
+ end
1574
+ return hw_loop_needed
1575
+ end
1576
+
1577
+ # Method to determine if dwelling_units, washrooms, corridors, or storage spaces should be added to the common HVAC system.
1578
+ def spaces_to_add_to_common_system(model:, hvac_system_dwelling_units: nil, hvac_system_washrooms: nil, hvac_system_corridor: nil, hvac_system_storage: nil)
1579
+ common_spaces = []
1580
+ # Find Dwelling Units and determine if they should be added
1581
+ dwelling_units = model.getSpaces.select { |space| is_a_necb_dwelling_unit?(space) }
1582
+ unless dwelling_units.empty? || hvac_system_dwelling_units.nil? || hvac_system_dwelling_units.to_s.downcase == 'necb_default'
1583
+ # If a dwelling unit hvac system is defined and dwelling units are present then add them to them to the common_spaces
1584
+ common_spaces = common_spaces + dwelling_units
1585
+ end
1586
+
1587
+ # Find washrooms and determine if they should be added
1588
+ washroom_spaces = model.getSpaces.select { |space| is_an_necb_wet_space?(space) }
1589
+ unless washroom_spaces.empty? || hvac_system_washrooms.nil? || hvac_system_washrooms.to_s.downcase == 'necb_default'
1590
+ # If a washroom hvac system is defined and washrooms/wet spaces are present then add them to the common_spaces
1591
+ common_spaces = common_spaces + washroom_spaces
1592
+ end
1593
+
1594
+ # Find corridors and determine if they should be added
1595
+ corridor_spaces = model.getSpaces.select { |space| is_an_necb_wildcard_space?(space) }
1596
+ unless corridor_spaces.empty? || hvac_system_corridor.nil? || hvac_system_corridor.to_s.downcase == 'necb_default'
1597
+ # If a corridor hvac system is defined and corridors are present then add them to the common spaces
1598
+ common_spaces = common_spaces + corridor_spaces
1599
+ end
1600
+
1601
+ # Find storage spaces and determine if they should be added
1602
+ storage_spaces = model.getSpaces.select { |space| is_an_necb_storage_space?(space) }
1603
+ unless storage_spaces.empty? || hvac_system_storage.nil? || hvac_system_storage.to_s.downcase == 'necb_default'
1604
+ # If a storage space hvac system is defined and storage spaces are present then add them to the common spaces
1605
+ common_spaces = common_spaces + storage_spaces
1606
+ end
1607
+ return common_spaces
1608
+ end
1609
+
1610
+ def get_fuel_type_information()
1611
+ init_fuel_type = {
1612
+ name: fuel_type_set.name,
1613
+ boiler_fueltype: fuel_type_set.boiler_fueltype,
1614
+ backup_boiler_fueltype: fuel_type_set.backup_boiler_fueltype,
1615
+ primary_boiler_cap_frac: fuel_type_set.primary_boiler_cap_frac,
1616
+ secondary_boiler_cap_frac: fuel_type_set.secondary_boiler_cap_frac,
1617
+ baseboard_type: fuel_type_set.baseboard_type,
1618
+ mau_type: fuel_type_set.mau_type,
1619
+ mau_heating_coil_type: fuel_type_set.mau_heating_coil_type,
1620
+ mau_cooling_type: fuel_type_set.mau_cooling_type,
1621
+ chiller_type: fuel_type_set.chiller_type,
1622
+ heating_coil_type_sys2: fuel_type_set.heating_coil_type_sys2,
1623
+ heating_coil_type_sys3: fuel_type_set.heating_coil_type_sys3,
1624
+ heating_coil_type_sys4: fuel_type_set.heating_coil_type_sys4,
1625
+ heating_coil_type_sys6: fuel_type_set.heating_coil_type_sys6,
1626
+ necb_reference_hp: fuel_type_set.necb_reference_hp,
1627
+ necb_reference_hp_supp_fuel: fuel_type_set.necb_reference_hp_supp_fuel,
1628
+ fan_type: fuel_type_set.fan_type,
1629
+ ecm_fueltype: fuel_type_set.ecm_fueltype,
1630
+ swh_fueltype: fuel_type_set.swh_fueltype,
1631
+ force_boiler: fuel_type_set.force_boiler,
1632
+ force_airloop_hot_water: fuel_type_set.force_airloop_hot_water
1633
+ }
1634
+ return init_fuel_type
1635
+ end
1636
+
1637
+ def boiler_required_from_heating_coils(sys_type:, mau_heating_coil_type:, heating_coil_type_sys2:, heating_coil_type_sys3:, heating_coil_type_sys4:, heating_coil_type_sys6:)
1638
+ requires_boiler = false
1639
+ case sys_type.to_s
1640
+ when 'sys_1'
1641
+ requires_boiler = true if mau_heating_coil_type.to_s == "Hot Water" || mau_heating_coil_type.to_s == "HotWater"
1642
+ when 'sys_2'
1643
+ requires_boiler = true if heating_coil_type_sys2.to_s == "Hot Water" || heating_coil_type_sys2.to_s == "HotWater"
1644
+ when 'sys_3'
1645
+ requires_boiler = true if heating_coil_type_sys3.to_s == "Hot Water" || heating_coil_type_sys3.to_s == "HotWater"
1646
+ when 'sys_4'
1647
+ requires_boiler = true if heating_coil_type_sys4.to_s == "Hot Water" || heating_coil_type_sys4.to_s == "HotWater"
1648
+ when 'sys_6'
1649
+ requires_boiler = true if heating_coil_type_sys6.to_s == "Hot Water" || heating_coil_type_sys6.to_s == "HotWater"
1650
+ else
1651
+ requires_boiler = false
1652
+ end
1653
+ return requires_boiler
1654
+ end
1655
+
1268
1656
  end