openstudio-standards 0.2.16 → 0.2.17.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  3. data/data/standards/manage_OpenStudio_Standards.rb +31 -4
  4. data/data/standards/openstudio_standards_duplicates_log.csv +4 -142
  5. data/lib/openstudio-standards/btap/btap_result.rb +138 -138
  6. data/lib/openstudio-standards/btap/economics.rb +58 -53
  7. data/lib/openstudio-standards/btap/envelope.rb +1 -1
  8. data/lib/openstudio-standards/btap/fileio.rb +12 -12
  9. data/lib/openstudio-standards/btap/geometry.rb +1 -1
  10. data/lib/openstudio-standards/btap/measures.rb +63 -59
  11. data/lib/openstudio-standards/btap/vintagizer.rb +1 -1
  12. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +354 -2
  13. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +79 -0
  14. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.College.rb +1 -1
  15. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Laboratory.rb +1 -1
  16. data/lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb +3313 -0
  17. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +12 -0
  18. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +3 -4
  19. data/lib/openstudio-standards/prototypes/common/objects/Prototype.SizingSystem.rb +10 -4
  20. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +217 -115
  21. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +2 -4
  22. data/lib/openstudio-standards/prototypes/common/prototype_metaprogramming.rb +1 -0
  23. data/lib/openstudio-standards/refs/references.rb +3 -0
  24. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +294 -7
  25. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +50 -2
  26. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +4 -0
  27. data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -1
  28. data/lib/openstudio-standards/standards/Standards.Construction.rb +185 -3
  29. data/lib/openstudio-standards/standards/Standards.Fan.rb +14 -6
  30. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +1 -0
  31. data/lib/openstudio-standards/standards/Standards.Model.rb +1752 -384
  32. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +131 -10
  33. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +50 -3
  34. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +44 -0
  35. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +27 -0
  36. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +543 -0
  37. data/lib/openstudio-standards/standards/Standards.Space.rb +665 -15
  38. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +141 -4
  39. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +2 -1
  40. data/lib/openstudio-standards/standards/Standards.Surface.rb +117 -0
  41. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +197 -49
  42. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +44 -2
  43. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.Model.rb +6 -8
  44. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/ashrae_90_1.schedules.json +45 -45
  45. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/comstock_ashrae_90_1_2004.spc_typ.json +7 -7
  46. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/ashrae_90_1.schedules.json +45 -45
  47. 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 +7 -7
  48. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/ashrae_90_1.schedules.json +45 -45
  49. 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 +9 -9
  50. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/ashrae_90_1.schedules.json +45 -45
  51. 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 +4 -4
  52. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/ashrae_90_1.schedules.json +45 -45
  53. 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 +5 -5
  54. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +48 -45
  55. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ZoneHVACComponent.rb +2 -1
  56. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/ashrae_90_1.schedules.json +45 -45
  57. 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 +5 -5
  58. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.constructions.json +2 -2
  59. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.entryways.json +8 -8
  60. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.fans.json +12 -0
  61. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.parking.json +2 -2
  62. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/ashrae_90_1.schedules.json +45 -45
  63. 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 +10 -10
  64. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirLoopHVAC.rb +11 -0
  65. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/ashrae_90_1.schedules.json +45 -45
  66. 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 +10 -10
  67. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirLoopHVAC.rb +11 -0
  68. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirLoopHVAC.rb +1 -0
  69. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +792 -0
  70. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctParallelPIUReheat.rb +10 -0
  71. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctVAVReheat.rb +31 -0
  72. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.BoilerHotWater.rb +91 -0
  73. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +84 -0
  74. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +145 -0
  75. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +106 -0
  76. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +71 -0
  77. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +194 -0
  78. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +120 -0
  79. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTower.rb +110 -0
  80. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTowerVariableSpeed.rb +5 -0
  81. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Fan.rb +73 -0
  82. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +5 -0
  83. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +5 -0
  84. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanVariableVolume.rb +24 -0
  85. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanZoneExhaust.rb +5 -0
  86. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.HeatExchangerSensLat.rb +55 -0
  87. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +3045 -0
  88. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlanarSurface.rb +187 -0
  89. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +454 -0
  90. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Space.rb +106 -0
  91. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +666 -0
  92. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Surface.rb +54 -0
  93. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ThermalZone.rb +168 -0
  94. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ZoneHVACComponent.rb +132 -0
  95. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +239 -0
  96. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +176 -0
  97. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.rb +25 -0
  98. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.boilers.json +52 -0
  99. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.chillers.json +112 -0
  100. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.climate_zone_sets.json +210 -0
  101. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.construction_properties.json +10384 -0
  102. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.construction_sets.json +133 -0
  103. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.furnaces.json +43 -0
  104. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_pumps.json +119 -0
  105. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_pumps_heating.json +130 -0
  106. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_rejection.json +13 -0
  107. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.lpd_space_type.json +568 -0
  108. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.motors.json +264 -0
  109. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_baseline_hvac.json +439 -0
  110. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_constructions.json +685 -0
  111. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_economizers.json +213 -0
  112. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_ext_ltg.json +32 -0
  113. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_heat_type.json +136 -0
  114. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_hvac_bldg_type.json +32 -0
  115. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_interior_lighting.json +1837 -0
  116. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_swh_bldg_type.json +184 -0
  117. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_wwr_bldg_type.json +84 -0
  118. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.unitary_acs.json +148 -0
  119. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.water_heaters.json +157 -0
  120. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.climate_zone_sets.json +210 -0
  121. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.curves.json +18329 -0
  122. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.fans.json +340 -0
  123. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.materials.json +49924 -0
  124. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/baseline_building_rotation_exception.md +44 -0
  125. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/check_pump_power_and_control.md +71 -0
  126. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/dcv.md +68 -0
  127. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/dcv_implementation.png +0 -0
  128. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/elevators.md +14 -0
  129. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/exhaust_air_energy_recovery.md +36 -0
  130. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/f_c_factors.md +19 -0
  131. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/fan_power_credits.md +15 -0
  132. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/preheat_coil.md +59 -0
  133. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/pump_power_control.md +46 -0
  134. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/return_air_type.md +31 -0
  135. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_baseline_wwr.md +191 -0
  136. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_hw_and_chw_supply_water_temp_reset_control.md +24 -0
  137. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_num_boilers_chillers_towers.md +49 -0
  138. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_plug_load_measures.md +80 -0
  139. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_space_lpd.md +73 -0
  140. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/unenclosed_and_unconditioned_spaces.md +11 -0
  141. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/unmet_load_hours.md +20 -0
  142. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/vav_parallel_piu_terminals_fan_control.md +23 -0
  143. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/vav_terminals_min_flow_setpoint.md +21 -0
  144. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_airloop_hvac.csv +1 -0
  145. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_airloop_hvac_doas.csv +1 -0
  146. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_building.csv +1 -0
  147. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_design_specification_outdoor_air.csv +1 -0
  148. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_electric_equipment.csv +1 -0
  149. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_exterior_lights.csv +1 -0
  150. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_gas_equipment.csv +1 -0
  151. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_lights.csv +1 -0
  152. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_space.csv +1 -0
  153. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_spacetype.csv +1 -0
  154. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_thermal_zone.csv +1 -0
  155. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_connections.csv +1 -0
  156. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_equipment.csv +1 -0
  157. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_equipment_definition.csv +1 -0
  158. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_zone_hvac.csv +1 -0
  159. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_zone_infiltration.csv +1 -0
  160. data/lib/openstudio-standards/standards/cbes/data/cbes.fans.json +12 -0
  161. data/lib/openstudio-standards/standards/deer/data/deer.fans.json +12 -0
  162. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +5 -1
  163. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps.json +1 -1
  164. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps_heating.json +1 -1
  165. data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +24 -11
  166. data/lib/openstudio-standards/standards/necb/ECMS/erv.rb +13 -15
  167. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +8 -4
  168. data/lib/openstudio-standards/standards/necb/ECMS/nv.rb +8 -2
  169. data/lib/openstudio-standards/standards/necb/NECB2011/data/province_map.json +17 -0
  170. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +1 -1
  171. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +1 -1
  172. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +2 -2
  173. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +6 -5
  174. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +7 -2
  175. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +2 -3
  176. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +4 -4
  177. data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +2 -2
  178. data/lib/openstudio-standards/standards/necb/NECB2020/data/space_types.json +33 -924
  179. data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +15 -15
  180. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +135 -29
  181. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +16 -4
  182. data/lib/openstudio-standards/standards/necb/common/neb_end_use_prices.csv +40 -42
  183. data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
  184. data/lib/openstudio-standards/standards/necb/common/space_type_upgrade_map.json +89 -89
  185. data/lib/openstudio-standards/utilities/array.rb +11 -0
  186. data/lib/openstudio-standards/utilities/logging.rb +48 -0
  187. data/lib/openstudio-standards/utilities/object_info.rb +20 -0
  188. data/lib/openstudio-standards/utilities/schedule_translator.rb +348 -0
  189. data/lib/openstudio-standards/utilities/sqlfile.rb +68 -0
  190. data/lib/openstudio-standards/version.rb +2 -2
  191. data/lib/openstudio-standards/weather/Weather.Model.rb +42 -55
  192. data/lib/openstudio-standards/weather/Weather.stat_file.rb +1 -1
  193. data/lib/openstudio-standards.rb +35 -1
  194. metadata +111 -4
  195. data/data/standards/OpenStudio_Standards-ashrae_90_1_28Jan2022.xlsx +0 -0
  196. data/data/standards/OpenStudio_Standards-ashrae_90_1_28_Jan2022_2.xlsx +0 -0
@@ -24,28 +24,28 @@ require "#{File.dirname(__FILE__)}/btap"
24
24
 
25
25
  class OSMArg
26
26
  ARGUMENT_TYPES = [
27
- "BOOL",
28
- "STRING",
29
- "INTEGER",
30
- "FLOAT",
27
+ "BOOL",
28
+ "STRING",
29
+ "INTEGER",
30
+ "FLOAT",
31
31
  "STRINGCHOICE",
32
- "WSCHOICE"
32
+ "WSCHOICE"
33
33
  ]
34
-
35
-
36
-
37
- attr_accessor :runner,
38
- :variable_name,
34
+
35
+
36
+
37
+ attr_accessor :runner,
38
+ :variable_name,
39
39
  :type,
40
- :required,
40
+ :required,
41
41
  :model_dependant,
42
- :display_name,
43
- :default_value,
44
- :min_value,
45
- :max_value,
46
- :string_choice_array,
42
+ :display_name,
43
+ :default_value,
44
+ :min_value,
45
+ :max_value,
46
+ :string_choice_array,
47
47
  :os_object_type
48
-
48
+
49
49
  def self.bool( variable_name,display_name,required,default_value )
50
50
  raise "#{default_value} defaut value is not a bool." unless default_value.is_a?(Bool)
51
51
  default_value.respond_to?(:to_s)
@@ -53,47 +53,47 @@ class OSMArg
53
53
  arg.default_value = default_value
54
54
  return arg
55
55
  end
56
-
56
+
57
57
  def self.string( variable_name,display_name,required,default_value )
58
58
  raise "#{default_value} defaut value is not a string." unless default_value.respond_to?(:to_s)
59
59
  arg = OSMArg.new( "STRING", variable_name, display_name, required)
60
60
  arg.default_value = default_value
61
61
  return arg
62
62
  end
63
-
63
+
64
64
  def self.integer( variable_name,display_name,required,default_value,min_value,max_value )
65
65
  raise "#{default_value} defaut value is not a integer." unless default_value.respond_to?(:to_i)
66
66
  arg = OSMArg.new( "INTEGER", variable_name, display_name, required)
67
67
  arg.default_value = default_value
68
68
  arg.min_value = min_value
69
69
  arg.max_value = max_value
70
- return arg
70
+ return arg
71
71
  end
72
-
72
+
73
73
  def self.float( variable_name, display_name, required,default_value,min_value, max_value )
74
74
  raise "#{default_value} defaut value is not a float." unless default_value.respond_to?(:to_f)
75
75
  arg = OSMArg.new( "INTEGER", variable_name, display_name, required)
76
76
  arg.default_value = default_value
77
77
  arg.min_value = min_value
78
78
  arg.max_value = max_value
79
- return arg
79
+ return arg
80
80
  end
81
-
81
+
82
82
  def self.choice(variable_name,display_name,required,default_value,string_choice_array)
83
- raise "#{default_value} defaut value is not an array." unless default_value.is_a?(Array)
83
+ raise "#{default_value} defaut value is not an array." unless default_value.is_a?(Array)
84
84
  arg = OSMArg.new( "STRINGCHOICE", variable_name, display_name, required)
85
85
  arg.default_value = default_value
86
86
  arg.string_choice_array = string_choice_array
87
87
  return arg
88
88
  end
89
-
89
+
90
90
  def self.wschoice( variable_name, display_name, required, default_value, os_object_type)
91
91
  arg = OSMArg.new( "WSCHOICE", variable_name, display_name, required )
92
92
  arg.default_value = default_value
93
93
  arg.os_object_type = os_object_type
94
- return arg
94
+ return arg
95
95
  end
96
-
96
+
97
97
  def initialize( type, variable_name, display_name, required )
98
98
  self.type = type
99
99
  self.variable_name = variable_name
@@ -106,9 +106,9 @@ class OSMArg
106
106
  self.model_dependant = false
107
107
  end
108
108
  return self
109
- end
109
+ end
110
110
  end
111
-
111
+
112
112
 
113
113
 
114
114
 
@@ -116,10 +116,10 @@ end
116
116
  module BTAP
117
117
  module Measures
118
118
  module OSMeasures
119
-
120
-
121
-
122
-
119
+
120
+
121
+
122
+
123
123
  class BTAPModelUserScript < OpenStudio::Ruleset::ModelUserScript
124
124
  #if and E+ measure replace OpenStudio::Ruleset::ModelUserScript with OpenStudio::Ruleset::WorkspaceUserScript
125
125
  #Array containing information of all inputs required by measure.
@@ -134,8 +134,8 @@ module BTAP
134
134
  "BTAPModelUserScript"
135
135
  OSMArgument.new
136
136
  end
137
-
138
- #this method will output the ruby macro to perform the change.
137
+
138
+ #this method will output the ruby macro to perform the change.
139
139
  def generate_ruby_macro(model,runner)
140
140
  if @file == nil or @file == ""
141
141
  @file = "Enter_Path_To_#{self.class.name}_measure.rb_File!"
@@ -190,8 +190,8 @@ module BTAP
190
190
  if not runner.validateUserArguments(self.arguments(model),user_arguments)
191
191
  return false
192
192
  end
193
-
194
- #Set argument to instance variables.
193
+
194
+ #Set argument to instance variables.
195
195
  self.argument_getter(model, runner,user_arguments)
196
196
  #will run the childs method measure_code
197
197
  result = self.measure_code(model,runner)
@@ -201,7 +201,7 @@ module BTAP
201
201
 
202
202
  def argument_setter(model,args)
203
203
  #***boilerplate code starts. Do not edit...
204
-
204
+
205
205
 
206
206
  #iterate through array of hashes and make arguments based on type and set
207
207
  # max and min values where applicable.
@@ -247,7 +247,7 @@ module BTAP
247
247
  unless @argument_array == nil
248
248
  @argument_array.each do |row|
249
249
  name = row.variable_name
250
-
250
+
251
251
  case row.type
252
252
  when "BOOL"
253
253
  value = runner.getBoolArgumentValue(name, user_arguments)
@@ -269,7 +269,7 @@ module BTAP
269
269
  value = runner.getDoubleArgumentValue(name, user_arguments)
270
270
  instance_variable_set("@#{name}",value)
271
271
  @arg_table << [name,value]
272
-
272
+
273
273
  if ( not row.min_value.nil? and instance_variable_get("@#{name}") < row.min_value ) or ( not row.max_value.nil? and instance_variable_get("@#{name}") > row.max_value )
274
274
  runner.registerError("#{row.display_name} must be greater than or equal to #{row.min_value} and less than or equal to #{row.max_value}. You entered #{instance_variable_get("@#{name}")}.")
275
275
  return false
@@ -288,10 +288,10 @@ module BTAP
288
288
  end #end do
289
289
  end
290
290
  return @arg_table
291
- end
292
-
291
+ end
292
+
293
293
  end
294
- #Measure Template simplified.
294
+ #Measure Template simplified.
295
295
  class TemplateModelMeasure < BTAPModelUserScript
296
296
 
297
297
  def name
@@ -391,14 +391,14 @@ module BTAP
391
391
  def run(model, runner, user_arguments)
392
392
  #run the super
393
393
  parent_method_is_true = super(model, runner, user_arguments)
394
-
395
-
394
+
395
+
396
396
  ###############
397
-
398
- #Set Archetype name in runner.
397
+
398
+ #Set Archetype name in runner.
399
399
  runner.registerValue('archetype_name',@archetype_name)
400
-
401
- #Set path to OSM files.
400
+
401
+ #Set path to OSM files.
402
402
  alternative_model_path = OpenStudio::Path.new("#{File.dirname(__FILE__)}/#{@archetype_name}.osm")
403
403
  #load model and test.
404
404
  translator = OpenStudio::OSVersion::VersionTranslator.new
@@ -561,7 +561,7 @@ module BTAP
561
561
  model = self.load_base_model_building()
562
562
  self.set_weather_file(model)
563
563
  self.set_hourly_output(model)
564
-
564
+
565
565
  model,log = self.apply_ecms(model,@csv_data)
566
566
  BTAP::FileIO::save_osm( model, "#{output_folder}/#{BTAP::FileIO::get_name(model)}.osm") unless output_folder.nil?
567
567
  File.open("#{output_folder}/#{BTAP::FileIO::get_name(model)}.log", 'w') { |file| file.write(log) } unless output_folder.nil?
@@ -621,7 +621,7 @@ module BTAP
621
621
  "cost_per_building"
622
622
  ]
623
623
  self.set_instance_variables( measure_values )
624
-
624
+
625
625
  #cost per building and building area
626
626
  building = model.building.get
627
627
  raise ("you did not enter a cost for measure #{@measure_id}. All measures must have a cost of at least 0.0 . Please add a cost_per_building field.") if @cost_per_building.nil?
@@ -753,7 +753,7 @@ module BTAP
753
753
  @total_building_construction_set_cost
754
754
  )
755
755
 
756
- #Give adiabatic surfaces a construction. Does not matter what. This is a bug in Openstudio that leave these surfaces unassigned by the default construction set.
756
+ #Give adiabatic surfaces a construction. Does not matter what. This is a bug in OpenStudio that leave these surfaces unassigned by the default construction set.
757
757
  all_adiabatic_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(model.getSurfaces, "Adiabatic")
758
758
  unless all_adiabatic_surfaces.empty?
759
759
  BTAP::Geometry::Surfaces::set_surfaces_construction( all_adiabatic_surfaces, model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.get.wallConstruction.get)
@@ -772,7 +772,7 @@ module BTAP
772
772
  "infiltration_flow_per_exterior_area",
773
773
  "infiltration_air_changes_per_hour"
774
774
  ]
775
-
775
+
776
776
  #Set all the above instance variables to the @csv_data values or, if not set or == 'na', to nil.
777
777
  self.set_instance_variables(measure_values)
778
778
 
@@ -811,7 +811,7 @@ module BTAP
811
811
  fan.setMotorEfficiency( @fan_motor_eff ) unless @fan_motor_eff.nil?
812
812
  log << fan.name.get.to_s << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
813
813
  end
814
-
814
+
815
815
  end
816
816
 
817
817
  case @fan_volume_type
@@ -975,7 +975,9 @@ module BTAP
975
975
  model.getCoilCoolingDXSingleSpeeds.sort.each do |cooling_coil|
976
976
  cooling_coil.setRatedCOP( OpenStudio::OptionalDouble.new( @cop ) ) unless @cop.nil?
977
977
  cop = "NA"
978
- cop = cooling_coil.ratedCOP.get unless cooling_coil.ratedCOP.empty?
978
+ # Prior to 3.5.0, it was an optional double, now it's a double
979
+ cop_ = OpenStudio::OptionalDouble.new(cooling_coil.ratedCOP)
980
+ cop = cop_.get unless cop_.empty?
979
981
  log << cooling_coil.name.get.to_s << ",#{cop}\n"
980
982
 
981
983
  end
@@ -987,9 +989,11 @@ module BTAP
987
989
  cooling_coil.setRatedHighSpeedCOP( @cop ) unless @cop.nil?
988
990
  cooling_coil.setRatedLowSpeedCOP( @cop ) unless @cop.nil?
989
991
  cop_high = "NA"
990
- cop_high = cooling_coil.ratedHighSpeedCOP.get unless cooling_coil.ratedHighSpeedCOP.empty?
992
+ cop_ = OpenStudio::OptionalDouble.new(cooling_coil.ratedHighSpeedCOP)
993
+ cop_high = cop_.get unless cop_.empty?
991
994
  cop_low = "NA"
992
- cop_low = cooling_coil.ratedLowSpeedCOP.get unless cooling_coil.ratedLowSpeedCOP.empty?
995
+ cop_ = OpenStudio::OptionalDouble.new(cooling_coil.ratedLowSpeedCOP)
996
+ cop_low = cop_.get unless cop_.empty?
993
997
  log << cooling_coil.name.get.to_s << ",#{cop_high},#{cop_low}\n"
994
998
  end
995
999
  end
@@ -1296,8 +1300,8 @@ module BTAP
1296
1300
  @erv_nominal_electric_power,
1297
1301
  @erv_economizer_lockout.to_bool
1298
1302
  ).each { |erv| log << erv.to_s }
1299
-
1300
-
1303
+
1304
+
1301
1305
  #Add setpoint manager to all OA object in airloops.
1302
1306
  model.getHeatExchangerAirToAirSensibleAndLatents.sort.each do |erv|
1303
1307
 
@@ -99,7 +99,7 @@ class Vintagizer
99
99
  new_construction_set.setName(construction_id)
100
100
  constructions_model.building.get.setDefaultConstructionSet( new_construction_set.clone( constructions_model ).to_DefaultConstructionSet.get )
101
101
 
102
- #Give adiabatic surfaces a construction. Does not matter what. This is a bug in Openstudio that leave these surfaces unassigned by the default construction set.
102
+ #Give adiabatic surfaces a construction. Does not matter what. This is a bug in OpenStudio that leave these surfaces unassigned by the default construction set.
103
103
  all_adiabatic_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(constructions_model.getSurfaces, "Adiabatic")
104
104
  BTAP::Geometry::Surfaces::set_surfaces_construction( all_adiabatic_surfaces, constructions_model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.get.wallConstruction.get)
105
105
 
@@ -196,6 +196,358 @@ class OpenStudio::Model::Model
196
196
 
197
197
  end
198
198
 
199
+ # Get type of heat for coil for Appendix G system type selections
200
+ #
201
+ # @param heating_coil [object]
202
+ # @return string description of heat type: Fuel, Electric, District, HeatPump, Solar, Mixed
203
+ def coil_heat_type(heating_coil)
204
+ fuels = []
205
+ heat_type = ''
206
+ # Get the object type
207
+ obj_type = heating_coil.iddObjectType.valueName.to_s
208
+ case obj_type
209
+ when 'OS_Coil_Heating_DX_MultiSpeed'
210
+ heat_type = 'HeatPump'
211
+ when 'OS_Coil_Heating_DX_SingleSpeed'
212
+ heat_type = 'HeatPump'
213
+ when 'OS_Coil_Heating_DX_VariableRefrigerantFlow'
214
+ heat_type = 'HeatPump'
215
+ when 'OS_Coil_Heating_DX_VariableSpeed'
216
+ heat_type = 'HeatPump'
217
+ when 'OS_Coil_Heating_Desuperheater'
218
+ heat_type = 'Electric'
219
+ when 'OS_Coil_Heating_Electric'
220
+ heat_type = 'Electric'
221
+ when 'OS_Coil_Heating_Gas'
222
+ heat_type = 'Fuel'
223
+ when 'OS_Coil_Heating_Gas_MultiStage'
224
+ heat_type = 'Fuel'
225
+ when 'OS_Coil_Heating_Water'
226
+ heating_coil = heating_coil.to_CoilHeatingWater.get
227
+ if heating_coil.plantLoop.is_initialized
228
+ fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
229
+ end
230
+ when 'OS_Coil_Heating_Water_BaseboardRadiant'
231
+ heating_coil = heating_coil.to_CoilHeatingWaterBaseboardRadiant.get
232
+ if heating_coil.plantLoop.is_initialized
233
+ fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
234
+ end
235
+ when 'OS_Coil_Heating_WaterToAirHeatPump_EquationFit'
236
+ fuels << 'Electricity'
237
+ heating_coil = heating_coil.to_CoilHeatingWaterToAirHeatPumpEquationFit.get
238
+ if heating_coil.plantLoop.is_initialized
239
+ fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
240
+ end
241
+ when 'OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit'
242
+ fuels << 'Electricity'
243
+ heating_coil = heating_coil.to_CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.get
244
+ if heating_coil.plantLoop.is_initialized
245
+ fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
246
+ end
247
+ when 'OS_Coil_Heating_LowTemperatureRadiant_ConstantFlow'
248
+ heating_coil = heating_coil.to_CoilHeatingLowTempRadiantConstFlow.get
249
+ if heating_coil.plantLoop.is_initialized
250
+ fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
251
+ end
252
+ when 'OS_Coil_Heating_LowTemperatureRadiant_VariableFlow'
253
+ heating_coil = heating_coil.to_CoilHeatingLowTempRadiantVarFlow.get
254
+ if heating_coil.plantLoop.is_initialized
255
+ fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
256
+ end
257
+ when 'OS_Coil_WaterHeating_AirToWaterHeatPump'
258
+ heat_type = 'Electricity'
259
+ when 'OS_Coil_WaterHeating_Desuperheater'
260
+ heat_type = 'Electricity'
261
+ else
262
+ OpenStudio::logFree(OpenStudio::Debug, 'openstudio.sizing.Model', "No heating fuel types found for #{obj_type}")
263
+ end
264
+
265
+ has_electric = false
266
+ has_fuel = false
267
+ has_district = false
268
+ has_solar = false
269
+ has_hp = false
270
+ if fuels.size > 0
271
+ fuels.sort.each do |fuel|
272
+ case fuel
273
+ when 'Electricity'
274
+ has_electric = true
275
+ when 'DistrictHeating'
276
+ has_district = true
277
+ when 'SolarEnergy'
278
+ has_solar = true
279
+ when 'NaturalGas', 'PropaneGas', 'Coal', 'Diesel'
280
+ has_fuel = true
281
+ when 'FuelOilNo1', 'FuelOilNo2'
282
+ has_fuel = true
283
+ end
284
+ end
285
+ end
286
+
287
+ # Choose only one heat type, or Mixed if there are multiple
288
+ if heat_type == ''
289
+ if has_fuel == true
290
+ heat_type = 'Fuel'
291
+ end
292
+ if has_district == true && heat_type != 'District'
293
+ if heat_type == ''
294
+ heat_type = 'District'
295
+ else
296
+ heat_type = 'Mixed'
297
+ end
298
+ end
299
+ if has_electric == true && heat_type != 'Electric'
300
+ if heat_type == ''
301
+ heat_type = 'Electric'
302
+ else
303
+ heat_type = 'Mixed'
304
+ end
305
+ end
306
+ if has_solar == true && heat_type != 'Solar'
307
+ if heat_type == ''
308
+ heat_type = 'Solar'
309
+ else
310
+ heat_type = 'Mixed'
311
+ end
312
+ end
313
+ if has_hp == true && heat_type != 'HeatPump'
314
+ if heat_type == ''
315
+ heat_type = 'HeatPump'
316
+ elsif heat_type != 'HeatPump'
317
+ heat_type = 'Mixed'
318
+ end
319
+ end
320
+ end
321
+
322
+ return heat_type
323
+ end
324
+
325
+ # Get primary type of heat for one air loop for Appendix G system type selections
326
+ #
327
+ # @param air_loop [object]
328
+ # @return string description of heat type: Fuel, Electric, District, HeatPump, Solar, Mixed
329
+ def airloop_primary_heat_type(air_loop)
330
+
331
+ heat_types = []
332
+ air_loop.supplyComponents.each do |component|
333
+ # Get the object type
334
+ obj_type = component.iddObjectType.valueName.to_s
335
+ case obj_type
336
+ when 'OS_AirLoopHVAC_UnitaryHeatCool_VAVChangeoverBypass'
337
+ component = component.to_AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass.get
338
+ heat_types << self.coil_heat_type(component.heatingCoil)
339
+ when 'OS_AirLoopHVAC_UnitaryHeatPump_AirToAir'
340
+ component = component.to_AirLoopHVACUnitaryHeatPumpAirToAir.get
341
+ heat_types << self.coil_heat_type(component.heatingCoil)
342
+ when 'OS_AirLoopHVAC_UnitaryHeatPump_AirToAir_MultiSpeed'
343
+ component = component.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get
344
+ heat_types << self.coil_heat_type(component.heatingCoil)
345
+ when 'OS_AirLoopHVAC_UnitarySystem'
346
+ component = component.to_AirLoopHVACUnitarySystem.get
347
+ if component.heatingCoil.is_initialized
348
+ heat_types << self.coil_heat_type(component.heatingCoil.get)
349
+ end
350
+ when 'OS_Coil_Heating_DX_MultiSpeed'
351
+ heat_types << self.coil_heat_type(component)
352
+ when 'OS_Coil_Heating_DX_SingleSpeed'
353
+ heat_types << self.coil_heat_type(component)
354
+ when 'OS_Coil_Heating_DX_VariableSpeed'
355
+ heat_types << self.coil_heat_type(component)
356
+ when 'OS_Coil_Heating_Desuperheater'
357
+ heat_types << self.coil_heat_type(component)
358
+ when 'OS_Coil_Heating_Electric'
359
+ heat_types << self.coil_heat_type(component)
360
+ when 'OS_Coil_Heating_Gas'
361
+ heat_types << self.coil_heat_type(component)
362
+ when 'OS_Coil_Heating_Gas_MultiStage'
363
+ heat_types << self.coil_heat_type(component)
364
+ when 'OS_Coil_Heating_Water'
365
+ heat_types << self.coil_heat_type(component)
366
+ when 'OS_Coil_Heating_WaterToAirHeatPump_EquationFit'
367
+ heat_types << self.coil_heat_type(component)
368
+ when 'OS_Coil_Heating_WaterToAirHeatPump_VariableSpeed_EquationFit'
369
+ heat_types << self.coil_heat_type(component)
370
+ when 'OS_Coil_WaterHeating_AirToWaterHeatPump'
371
+ heat_types << self.coil_heat_type(component)
372
+ when 'OS_Coil_WaterHeating_Desuperheater'
373
+ heat_types << self.coil_heat_type(component)
374
+ when 'OS_Node', 'OS_Fan_ConstantVolume', 'OS_Fan_VariableVolume', 'OS_AirLoopHVAC_OutdoorAirSystem'
375
+ # To avoid extraneous debug messages
376
+ else
377
+ #OpenStudio::logFree(OpenStudio::Debug, 'openstudio.sizing.Model', "No heating fuel types found for #{obj_type}")
378
+ end
379
+ end
380
+
381
+ has_electric = false
382
+ has_fuel = false
383
+ has_district = false
384
+ has_solar = false
385
+ has_hp = false
386
+ has_mixed = false
387
+ if heat_types.size > 0
388
+ heat_types.sort.each do |heat_type|
389
+ case heat_type
390
+ when 'Electricity', 'Electric'
391
+ has_electric = true
392
+ when 'DistrictHeating', 'District'
393
+ has_district = true
394
+ when 'SolarEnergy', 'Solar'
395
+ has_solar = true
396
+ when 'NaturalGas', 'Fuel', 'PropaneGas', 'Coal', 'Diesel'
397
+ has_fuel = true
398
+ when 'FuelOilNo1', 'FuelOilNo2'
399
+ has_fuel = true
400
+ when 'HeatPump'
401
+ has_hp = true
402
+ when 'Mixed'
403
+ has_mixed = true
404
+ end
405
+ end
406
+ end
407
+
408
+ # Choose only one heat type, or Mixed if there are multiple
409
+ heat_type = ''
410
+ if has_mixed == true
411
+ heat_type = 'Mixed'
412
+ end
413
+ if has_fuel == true && heat_type != 'Fuel'
414
+ if heat_type == ''
415
+ heat_type = 'Fuel'
416
+ else
417
+ heat_type = 'Mixed'
418
+ end
419
+ end
420
+ if has_district == true && heat_type != 'District'
421
+ if heat_type == ''
422
+ heat_type = 'District'
423
+ else
424
+ heat_type = 'Mixed'
425
+ end
426
+ end
427
+ if has_electric == true && heat_type != 'Electric'
428
+ if heat_type == ''
429
+ heat_type = 'Electric'
430
+ else
431
+ heat_type = 'Mixed'
432
+ end
433
+ end
434
+ if has_solar == true && heat_type != 'Solar'
435
+ if heat_type == ''
436
+ heat_type = 'Solar'
437
+ else
438
+ heat_type = 'Mixed'
439
+ end
440
+ end
441
+ if has_hp == true && heat_type != 'HeatPump'
442
+ # Assume any additional heat types are supplemental
443
+ heat_type = 'HeatPump'
444
+ end
445
+
446
+ return heat_type
447
+
448
+ end
449
+
450
+ # Get primary type of heat for one air loop for Appendix G system type selections
451
+ #
452
+ # @param air_loop [object]
453
+ # @return string description of heat type: Fuel, Electric, District, HeatPump, Solar, Mixed
454
+ def zone_equipment_heat_type(zone)
455
+ fuels = []
456
+ heat_type = ''
457
+ # Get the heating fuels for all zone HVAC equipment
458
+ zone.equipment.each do |equipment|
459
+ # Get the object type
460
+ obj_type = equipment.iddObjectType.valueName.to_s
461
+ case obj_type
462
+ when 'OS_AirTerminal_SingleDuct_ConstantVolume_FourPipeInduction'
463
+ equipment = equipment.to_AirTerminalSingleDuctConstantVolumeFourPipeInduction.get
464
+ heat_type = self.coil_heat_type(equipment.heatingCoil)
465
+ when 'OS_AirTerminal_SingleDuct_ConstantVolume_Reheat'
466
+ equipment = equipment.to_AirTerminalSingleDuctConstantVolumeReheat.get
467
+ heat_type = self.coil_heat_type(equipment.reheatCoil)
468
+ when 'OS_AirTerminal_SingleDuct_InletSideMixer'
469
+ # TODO
470
+ when 'OS_AirTerminal_SingleDuct_ParallelPIU_Reheat'
471
+ equipment = equipment.to_AirTerminalSingleDuctParallelPIUReheat.get
472
+ heat_type = self.coil_heat_type(equipment.reheatCoil)
473
+ when 'OS_AirTerminal_SingleDuct_SeriesPIU_Reheat'
474
+ equipment = equipment.to_AirTerminalSingleDuctSeriesPIUReheat.get
475
+ heat_type = self.coil_heat_type(equipment.reheatCoil)
476
+ when 'OS_AirTerminal_SingleDuct_VAVHeatAndCool_Reheat'
477
+ equipment = equipment.to_AirTerminalSingleDuctVAVHeatAndCoolReheat.get
478
+ heat_type = self.coil_heat_type(equipment.reheatCoil)
479
+ when 'OS_AirTerminal_SingleDuct_VAV_Reheat'
480
+ equipment = equipment.to_AirTerminalSingleDuctVAVReheat.get
481
+ heat_type = self.coil_heat_type(equipment.reheatCoil)
482
+ when 'OS_ZoneHVAC_Baseboard_Convective_Water'
483
+ equipment = equipment.to_ZoneHVACBaseboardConvectiveWater.get
484
+ heat_type = self.coil_heat_type(equipment.heatingCoil)
485
+ when 'OS_ZoneHVAC_Baseboard_RadiantConvective_Water'
486
+ equipment = equipment.to_ZoneHVACBaseboardRadiantConvectiveWater.get
487
+ heat_type = self.coil_heat_type(equipment.heatingCoil)
488
+ when 'OS_ZoneHVAC_FourPipeFanCoil'
489
+ equipment = equipment.to_ZoneHVACFourPipeFanCoil.get
490
+ heat_type = self.coil_heat_type(equipment.heatingCoil)
491
+ when 'OS_ZoneHVAC_LowTemperatureRadiant_ConstantFlow'
492
+ equipment = equipment.to_ZoneHVACLowTempRadiantConstFlow.get
493
+ heat_type = self.coil_heat_type(equipment.heatingCoil)
494
+ when 'OS_ZoneHVAC_LowTemperatureRadiant_VariableFlow'
495
+ equipment = equipment.to_ZoneHVACLowTempRadiantVarFlow.get
496
+ heat_type = self.coil_heat_type(equipment.heatingCoil)
497
+ when 'OS_ZoneHVAC_UnitHeater'
498
+ equipment = equipment.to_ZoneHVACUnitHeater.get
499
+ heat_type = self.coil_heat_type(equipment.heatingCoil)
500
+ when 'OS_ZoneHVAC_UnitVentilator'
501
+ equipment = equipment.to_ZoneHVACUnitVentilator.get
502
+ if equipment.heatingCoil.is_initialized
503
+ heat_type = self.coil_heat_type(equipment.heatingCoil.get)
504
+ end
505
+ when 'OS_ZoneHVAC_Baseboard_Convective_Electric'
506
+ heat_type = 'Electric'
507
+ when 'OS_ZoneHVAC_Baseboard_RadiantConvective_Electric'
508
+ heat_type = 'Electric'
509
+ when 'OS_ZoneHVAC_HighTemperatureRadiant'
510
+ equipment = equipment.to_ZoneHVACHighTemperatureRadiant.get
511
+ case equipment.fuelType
512
+ when 'Electricity'
513
+ heat_type = 'Electric'
514
+ when 'DistrictHeating', 'District'
515
+ heat_type = 'District'
516
+ when 'SolarEnergy', 'Solar'
517
+ heat_type = 'Solar'
518
+ when 'NaturalGas', 'Fuel', 'PropaneGas', 'Coal', 'Diesel'
519
+ heat_type = 'Fuel'
520
+ when 'FuelOilNo1', 'FuelOilNo2'
521
+ heat_type = 'Fuel'
522
+ when 'HeatPump'
523
+ heat_type = 'HeatPump'
524
+ else
525
+ heat_type = 'Other'
526
+ end
527
+ when 'OS_ZoneHVAC_IdealLoadsAirSystem'
528
+ heat_type = 'District'
529
+ when 'OS_ZoneHVAC_LowTemperatureRadiant_Electric'
530
+ heat_type = 'Electric'
531
+ when 'OS_ZoneHVAC_PackagedTerminalAirConditioner'
532
+ equipment = equipment.to_ZoneHVACPackagedTerminalAirConditioner.get
533
+ heat_type = self.coil_heating_fuels(equipment.heatingCoil)
534
+ when 'OS_ZoneHVAC_PackagedTerminalHeatPump'
535
+ heat_type = 'HeatPump'
536
+ when 'OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlow'
537
+ heat_type = 'HeatPump'
538
+ when 'OS_ZoneHVAC_WaterToAirHeatPump'
539
+ # We also go check what fuel serves the loop on which the WSHP heating coil is
540
+ equipment = equipment.to_ZoneHVACWaterToAirHeatPump.get
541
+ heat_type = self.coil_heat_type(equipment.heatingCoil)
542
+ else
543
+ OpenStudio::logFree(OpenStudio::Debug, 'openstudio.sizing.Model', "No heat type found for #{obj_type}") end
544
+ end
545
+
546
+ return heat_type
547
+
548
+ end
549
+
550
+
199
551
  # Get the cooling fuel type of a cooling coil
200
552
  def coil_cooling_fuels(cooling_coil)
201
553
  fuels = []
@@ -276,10 +628,10 @@ class OpenStudio::Model::Model
276
628
  fuels += self.coil_heating_fuels(equipment.reheatCoil)
277
629
  when 'OS_AirTerminal_SingleDuct_InletSideMixer'
278
630
  # @todo complete method
279
- when 'OS_AirTerminal_SingleDuct_ParallelPIUReheat'
631
+ when 'OS_AirTerminal_SingleDuct_ParallelPIU_Reheat'
280
632
  equipment = equipment.to_AirTerminalSingleDuctParallelPIUReheat.get
281
633
  fuels += self.coil_heating_fuels(equipment.reheatCoil)
282
- when 'OS_AirTerminal_SingleDuct_SeriesPIUReheat'
634
+ when 'OS_AirTerminal_SingleDuct_SeriesPIU_Reheat'
283
635
  equipment = equipment.to_AirTerminalSingleDuctSeriesPIUReheat.get
284
636
  fuels += self.coil_heating_fuels(equipment.reheatCoil)
285
637
  when 'OS_AirTerminal_SingleDuct_VAVHeatAndCool_Reheat'