openstudio-standards 0.2.16 → 0.2.17.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/manage_OpenStudio_Standards.rb +31 -4
  3. data/lib/openstudio-standards/btap/geometry.rb +1 -1
  4. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +354 -2
  5. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +79 -0
  6. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.College.rb +1 -1
  7. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Laboratory.rb +1 -1
  8. data/lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb +3313 -0
  9. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +12 -0
  10. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +3 -4
  11. data/lib/openstudio-standards/prototypes/common/objects/Prototype.SizingSystem.rb +1 -1
  12. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +167 -93
  13. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +2 -4
  14. data/lib/openstudio-standards/prototypes/common/prototype_metaprogramming.rb +1 -0
  15. data/lib/openstudio-standards/refs/references.rb +3 -0
  16. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +279 -6
  17. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +50 -2
  18. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +4 -0
  19. data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -1
  20. data/lib/openstudio-standards/standards/Standards.Construction.rb +185 -3
  21. data/lib/openstudio-standards/standards/Standards.Fan.rb +14 -6
  22. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +1 -0
  23. data/lib/openstudio-standards/standards/Standards.Model.rb +1751 -383
  24. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +130 -9
  25. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +50 -3
  26. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +44 -0
  27. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +27 -0
  28. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +543 -0
  29. data/lib/openstudio-standards/standards/Standards.Space.rb +665 -15
  30. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +141 -4
  31. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +2 -1
  32. data/lib/openstudio-standards/standards/Standards.Surface.rb +117 -0
  33. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +197 -49
  34. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +41 -0
  35. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.Model.rb +6 -8
  36. 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
  37. 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
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +5 -5
  47. 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
  48. 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
  49. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.constructions.json +2 -2
  50. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.fans.json +12 -0
  51. 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
  52. 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
  53. 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
  54. 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
  55. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirLoopHVAC.rb +1 -0
  56. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +792 -0
  57. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctParallelPIUReheat.rb +10 -0
  58. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctVAVReheat.rb +31 -0
  59. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.BoilerHotWater.rb +91 -0
  60. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +84 -0
  61. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +145 -0
  62. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +106 -0
  63. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +71 -0
  64. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +194 -0
  65. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +120 -0
  66. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTower.rb +110 -0
  67. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTowerVariableSpeed.rb +5 -0
  68. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Fan.rb +73 -0
  69. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +5 -0
  70. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +5 -0
  71. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanVariableVolume.rb +24 -0
  72. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanZoneExhaust.rb +5 -0
  73. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.HeatExchangerSensLat.rb +55 -0
  74. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +3045 -0
  75. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlanarSurface.rb +187 -0
  76. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +450 -0
  77. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Space.rb +106 -0
  78. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +666 -0
  79. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Surface.rb +54 -0
  80. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ThermalZone.rb +168 -0
  81. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ZoneHVACComponent.rb +132 -0
  82. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +239 -0
  83. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +176 -0
  84. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.rb +25 -0
  85. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.boilers.json +52 -0
  86. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.chillers.json +112 -0
  87. 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
  88. 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
  89. 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
  90. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.furnaces.json +43 -0
  91. 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
  92. 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
  93. 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
  94. 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
  95. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.motors.json +264 -0
  96. 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
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. 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
  105. 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
  106. 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
  107. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.climate_zone_sets.json +210 -0
  108. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.curves.json +18329 -0
  109. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.fans.json +340 -0
  110. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.materials.json +49924 -0
  111. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/baseline_building_rotation_exception.md +44 -0
  112. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/check_pump_power_and_control.md +71 -0
  113. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/dcv.md +68 -0
  114. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/dcv_implementation.png +0 -0
  115. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/elevators.md +14 -0
  116. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/exhaust_air_energy_recovery.md +36 -0
  117. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/f_c_factors.md +19 -0
  118. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/fan_power_credits.md +15 -0
  119. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/preheat_coil.md +59 -0
  120. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/pump_power_control.md +46 -0
  121. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/return_air_type.md +31 -0
  122. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_baseline_wwr.md +191 -0
  123. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_hw_and_chw_supply_water_temp_reset_control.md +24 -0
  124. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_num_boilers_chillers_towers.md +49 -0
  125. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_plug_load_measures.md +80 -0
  126. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_space_lpd.md +73 -0
  127. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/unenclosed_and_unconditioned_spaces.md +11 -0
  128. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/unmet_load_hours.md +20 -0
  129. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/vav_parallel_piu_terminals_fan_control.md +23 -0
  130. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/vav_terminals_min_flow_setpoint.md +21 -0
  131. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_airloop_hvac.csv +1 -0
  132. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_airloop_hvac_doas.csv +1 -0
  133. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_building.csv +1 -0
  134. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_design_specification_outdoor_air.csv +1 -0
  135. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_electric_equipment.csv +1 -0
  136. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_exterior_lights.csv +1 -0
  137. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_gas_equipment.csv +1 -0
  138. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_lights.csv +1 -0
  139. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_space.csv +1 -0
  140. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_spacetype.csv +1 -0
  141. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_thermal_zone.csv +1 -0
  142. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_connections.csv +1 -0
  143. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_equipment.csv +1 -0
  144. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_equipment_definition.csv +1 -0
  145. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_zone_hvac.csv +1 -0
  146. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_zone_infiltration.csv +1 -0
  147. data/lib/openstudio-standards/standards/cbes/data/cbes.fans.json +12 -0
  148. data/lib/openstudio-standards/standards/deer/data/deer.fans.json +12 -0
  149. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps.json +1 -1
  150. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps_heating.json +1 -1
  151. data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +24 -11
  152. data/lib/openstudio-standards/standards/necb/ECMS/erv.rb +13 -15
  153. data/lib/openstudio-standards/standards/necb/NECB2011/data/province_map.json +17 -0
  154. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +1 -1
  155. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +1 -1
  156. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +2 -2
  157. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +6 -5
  158. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +3 -2
  159. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +2 -3
  160. data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +2 -2
  161. data/lib/openstudio-standards/standards/necb/NECB2020/data/space_types.json +33 -924
  162. data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +15 -15
  163. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +135 -29
  164. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +16 -4
  165. data/lib/openstudio-standards/standards/necb/common/neb_end_use_prices.csv +40 -42
  166. data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
  167. data/lib/openstudio-standards/standards/necb/common/space_type_upgrade_map.json +89 -89
  168. data/lib/openstudio-standards/utilities/array.rb +11 -0
  169. data/lib/openstudio-standards/utilities/logging.rb +48 -0
  170. data/lib/openstudio-standards/utilities/object_info.rb +20 -0
  171. data/lib/openstudio-standards/utilities/schedule_translator.rb +348 -0
  172. data/lib/openstudio-standards/utilities/sqlfile.rb +68 -0
  173. data/lib/openstudio-standards/version.rb +2 -2
  174. data/lib/openstudio-standards/weather/Weather.Model.rb +42 -55
  175. data/lib/openstudio-standards/weather/Weather.stat_file.rb +1 -1
  176. data/lib/openstudio-standards.rb +35 -1
  177. metadata +111 -6
  178. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  179. data/data/standards/OpenStudio_Standards-ashrae_90_1_28Jan2022.xlsx +0 -0
  180. data/data/standards/OpenStudio_Standards-ashrae_90_1_28_Jan2022_2.xlsx +0 -0
  181. data/data/standards/openstudio_standards_duplicates_log.csv +0 -143
@@ -75,7 +75,8 @@ class Standard
75
75
  plr_req = fan_variable_volume_part_load_fan_power_limitation?(fan)
76
76
  # Part Load Fan Pressure Control
77
77
  if plr_req
78
- fan_variable_volume_set_control_type(fan, 'Multi Zone VAV with VSD and SP Setpoint Reset')
78
+ vsd_curve_type = air_loop_hvac_set_vsd_curve_type
79
+ fan_variable_volume_set_control_type(fan, vsd_curve_type)
79
80
  # No Part Load Fan Pressure Control
80
81
  else
81
82
  fan_variable_volume_set_control_type(fan, 'Multi Zone VAV with discharge dampers')
@@ -194,6 +195,12 @@ class Standard
194
195
  # Economizers
195
196
  if air_loop_hvac_prm_baseline_economizer_required?(air_loop_hvac, climate_zone)
196
197
  air_loop_hvac_apply_prm_baseline_economizer(air_loop_hvac, climate_zone)
198
+ else
199
+ # Make sure if economizer is not required then the OA controller should have No Economizer
200
+ oa_sys = air_loop_hvac.airLoopHVACOutdoorAirSystem
201
+ if oa_sys.is_initialized
202
+ oa_sys.get.getControllerOutdoorAir.setEconomizerControlType('NoEconomizer')
203
+ end
197
204
  end
198
205
 
199
206
  # Multizone VAV Systems
@@ -216,7 +223,8 @@ class Standard
216
223
  end
217
224
 
218
225
  # Unoccupied shutdown
219
- air_loop_hvac_enable_unoccupied_fan_shutoff(air_loop_hvac)
226
+ occ_threshold = air_loop_hvac_unoccupied_threshold
227
+ air_loop_hvac_enable_unoccupied_fan_shutoff(air_loop_hvac, occ_threshold)
220
228
 
221
229
  return true
222
230
  end
@@ -349,6 +357,12 @@ class Standard
349
357
  return true
350
358
  end
351
359
 
360
+ # Set default fan curve to be VSD with static pressure reset
361
+ # @return [string] name of appropriate curve for this code version
362
+ def air_loop_hvac_set_vsd_curve_type
363
+ return 'Multi Zone VAV with VSD and SP Setpoint Reset'
364
+ end
365
+
352
366
  # Calculate and apply the performance rating method baseline fan power to this air loop.
353
367
  # Fan motor efficiency will be set, and then fan pressure rise adjusted so that the
354
368
  # fan power is the maximum allowable.
@@ -1128,7 +1142,7 @@ class Standard
1128
1142
  # Determine if the airloop includes hydronic cooling coils
1129
1143
  #
1130
1144
  # @param air_loop_hvac [OpenStudio::Model::AirLoopHVAC] air loop
1131
- # @return [Bool] returns true if hydronic coolings coils are included on the airloop
1145
+ # @return [Bool] returns true if hydronic cooling coils are included on the airloop
1132
1146
  def air_loop_hvac_include_hydronic_cooling_coil?(air_loop_hvac)
1133
1147
  air_loop_hvac.supplyComponents.each do |comp|
1134
1148
  return true if comp.to_CoilCoolingWater.is_initialized
@@ -1136,6 +1150,82 @@ class Standard
1136
1150
  return false
1137
1151
  end
1138
1152
 
1153
+ # Determine if the airloop includes cooling coils
1154
+ #
1155
+ # @return [Bool] returns true if cooling coils are included on the airloop
1156
+ def air_loop_hvac_include_cooling_coil?(air_loop_hvac)
1157
+ air_loop_hvac.supplyComponents.each do |comp|
1158
+ return true if comp.to_CoilCoolingWater.is_initialized
1159
+ return true if comp.to_CoilCoolingWater.is_initialized
1160
+ return true if comp.to_CoilCoolingCooledBeam.is_initialized
1161
+ return true if comp.to_CoilCoolingDXMultiSpeed.is_initialized
1162
+ return true if comp.to_CoilCoolingDXSingleSpeed.is_initialized
1163
+ return true if comp.to_CoilCoolingDXTwoSpeed.is_initialized
1164
+ return true if comp.to_CoilCoolingDXTwoStageWithHumidityControlMode.is_initialized
1165
+ return true if comp.to_CoilCoolingDXVariableRefrigerantFlow.is_initialized
1166
+ return true if comp.to_CoilCoolingDXVariableSpeed.is_initialized
1167
+ return true if comp.to_CoilCoolingFourPipeBeam.is_initialized
1168
+ return true if comp.to_CoilCoolingLowTempRadiantConstFlow.is_initialized
1169
+ return true if comp.to_CoilCoolingLowTempRadiantVarFlow.is_initialized
1170
+ return true if comp.to_CoilCoolingWater.is_initialized
1171
+ return true if comp.to_CoilCoolingWaterToAirHeatPumpEquationFit.is_initialized
1172
+ return true if comp.to_CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.is_initialized
1173
+
1174
+ if comp.to_AirLoopHVACUnitarySystem.is_initialized
1175
+ unitary_system = comp.to_AirLoopHVACUnitarySystem.get
1176
+ if unitary_system.coolingCoil.is_initialized
1177
+ cooling_coil = unitary_system.coolingCoil.get
1178
+ return true if cooling_coil.to_CoilCoolingWater.is_initialized
1179
+ return true if cooling_coil.to_CoilCoolingWater.is_initialized
1180
+ return true if cooling_coil.to_CoilCoolingCooledBeam.is_initialized
1181
+ return true if cooling_coil.to_CoilCoolingDXMultiSpeed.is_initialized
1182
+ return true if cooling_coil.to_CoilCoolingDXSingleSpeed.is_initialized
1183
+ return true if cooling_coil.to_CoilCoolingDXTwoSpeed.is_initialized
1184
+ return true if cooling_coil.to_CoilCoolingDXTwoStageWithHumidityControlMode.is_initialized
1185
+ return true if cooling_coil.to_CoilCoolingDXVariableRefrigerantFlow.is_initialized
1186
+ return true if cooling_coil.to_CoilCoolingDXVariableSpeed.is_initialized
1187
+ return true if cooling_coil.to_CoilCoolingFourPipeBeam.is_initialized
1188
+ return true if cooling_coil.to_CoilCoolingLowTempRadiantConstFlow.is_initialized
1189
+ return true if cooling_coil.to_CoilCoolingLowTempRadiantVarFlow.is_initialized
1190
+ return true if cooling_coil.to_CoilCoolingWater.is_initialized
1191
+ return true if cooling_coil.to_CoilCoolingWaterToAirHeatPumpEquationFit.is_initialized
1192
+ return true if cooling_coil.to_CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.is_initialized
1193
+ end
1194
+ end
1195
+ end
1196
+ return false
1197
+ end
1198
+
1199
+ # Determine if the airloop includes evaporative coolers
1200
+ #
1201
+ # @return [Bool] returns true if evaporative coolers are included on the airloop
1202
+ def air_loop_hvac_include_evaporative_cooler?(air_loop_hvac)
1203
+ air_loop_hvac.supplyComponents.each do |comp|
1204
+ return true if comp.to_EvaporativeCoolerDirectResearchSpecial.is_initialized
1205
+ return true if comp.to_EvaporativeCoolerIndirectResearchSpecial.is_initialized
1206
+ end
1207
+ return false
1208
+ end
1209
+
1210
+ # Determine if the airloop includes an air-economizer
1211
+ #
1212
+ # @return [Bool] returns true if the airloop has an air-economizer
1213
+ def air_loop_hvac_include_economizer?(air_loop_hvac)
1214
+ return false unless air_loop_hvac.airLoopHVACOutdoorAirSystem.is_initialized
1215
+
1216
+ # Get OA system
1217
+ air_loop_hvac_oa_system = air_loop_hvac.airLoopHVACOutdoorAirSystem.get
1218
+
1219
+ # Get OA controller
1220
+ air_loop_hvac_oa_controller = air_loop_hvac_oa_system.getControllerOutdoorAir
1221
+
1222
+ # Get economizer type
1223
+ economizer_type = air_loop_hvac_oa_controller.getEconomizerControlType.to_s
1224
+ return false if economizer_type == 'NoEconomizer'
1225
+
1226
+ return true
1227
+ end
1228
+
1139
1229
  # Determine if the airloop includes WSHP cooling coils
1140
1230
  #
1141
1231
  # @param air_loop_hvac [OpenStudio::Model::AirLoopHVAC] air loop
@@ -3159,11 +3249,26 @@ class Standard
3159
3249
  return 0.15
3160
3250
  end
3161
3251
 
3252
+ # Determine if the air loop serves parallel PIU air terminals
3253
+ #
3254
+ # @param air_loop_hvac [OpenStudio::Model::AirLoopHVAC] air loop
3255
+ def air_loop_hvac_has_parallel_piu_air_terminals?(air_loop_hvac)
3256
+ has_parallel_piu_terminals = false
3257
+ air_loop_hvac.thermalZones.each do |zone|
3258
+ zone.equipment.each do |equipment|
3259
+ # Get the object type
3260
+ obj_type = equipment.iddObjectType.valueName.to_s
3261
+ if obj_type == 'OS_AirTerminal_SingleDuct_ParallelPIU_Reheat'
3262
+ return true
3263
+ end
3264
+ end
3265
+ end
3266
+
3267
+ return has_parallel_piu_terminals
3268
+ end
3269
+
3162
3270
  # Shut off the system during unoccupied periods.
3163
3271
  # During these times, systems will cycle on briefly if temperature drifts below setpoint.
3164
- # For systems with fan-powered terminals, the whole system (not just the terminal fans) will cycle on.
3165
- # Terminal-only night cycling is not used because the terminals cannot provide cooling,
3166
- # so terminal-only night cycling leads to excessive unmet cooling hours during unoccupied periods.
3167
3272
  # If the system already has a schedule other than Always-On, no change will be made.
3168
3273
  # If the system has an Always-On schedule assigned, a new schedule will be created.
3169
3274
  # In this case, occupied is defined as the total percent occupancy for the loop for all zones served.
@@ -3173,7 +3278,37 @@ class Standard
3173
3278
  # @return [Bool] returns true if successful, false if not
3174
3279
  def air_loop_hvac_enable_unoccupied_fan_shutoff(air_loop_hvac, min_occ_pct = 0.05)
3175
3280
  # Set the system to night cycle
3281
+ # The fan of a parallel PIU terminal are set to only cycle during heating operation
3282
+ # This is achieved using the CycleOnAnyCoolingOrHeatingZone; During cooling operation
3283
+ # the load is met by running the central system which stays off during heating
3284
+ # operation
3176
3285
  air_loop_hvac.setNightCycleControlType('CycleOnAny')
3286
+ if air_loop_hvac_has_parallel_piu_air_terminals?(air_loop_hvac)
3287
+ avail_mgrs = air_loop_hvac.availabilityManagers
3288
+ if !avail_mgrs.nil?
3289
+ avail_mgrs.each do |avail_mgr|
3290
+ if avail_mgr.to_AvailabilityManagerNightCycle.is_initialized
3291
+ avail_mgr_nc = avail_mgr.to_AvailabilityManagerNightCycle.get
3292
+ avail_mgr_nc.setControlType('CycleOnAnyCoolingOrHeatingZone')
3293
+ zones = air_loop_hvac.thermalZones
3294
+ avail_mgr_nc.setCoolingControlThermalZones(zones)
3295
+ avail_mgr_nc.setHeatingZoneFansOnlyThermalZones(zones)
3296
+ end
3297
+ end
3298
+ end
3299
+ end
3300
+
3301
+ model = air_loop_hvac.model
3302
+ # Check if schedule was stored in an additionalProperties field of the air loop
3303
+ air_loop_name = air_loop_hvac.name
3304
+ if air_loop_hvac.hasAdditionalProperties
3305
+ if air_loop_hvac.additionalProperties.hasFeature('fan_sched_name')
3306
+ fan_sched_name = air_loop_hvac.additionalProperties.getFeatureAsString('fan_sched_name').get
3307
+ fan_sched = model.getScheduleRulesetByName(fan_sched_name).get
3308
+ air_loop_hvac.setAvailabilitySchedule(fan_sched)
3309
+ return true
3310
+ end
3311
+ end
3177
3312
 
3178
3313
  # Check if already using a schedule other than always on
3179
3314
  avail_sch = air_loop_hvac.availabilitySchedule
@@ -3534,6 +3669,118 @@ class Standard
3534
3669
  return dx_clg
3535
3670
  end
3536
3671
 
3672
+ # Get return fan power for airloop
3673
+ #
3674
+ # @param model [OpenStudio::model::AirLoopHVAC] AirLoopHVAC object
3675
+ # @return [Float] Fan power
3676
+ def air_loop_hvac_get_return_fan_power(air_loop)
3677
+ return_fan_power = 0
3678
+
3679
+ if air_loop.returnFan.is_initialized
3680
+ # Get return fan
3681
+ fan = air_loop.returnFan.get
3682
+
3683
+ # Get fan object
3684
+ if fan.to_FanConstantVolume.is_initialized
3685
+ fan = fan.to_FanConstantVolume.get
3686
+ elsif fan.to_FanVariableVolume.is_initialized
3687
+ fan = fan.to_FanVariableVolume.get
3688
+ elsif fan.to_FanOnOff.is_initialized
3689
+ fan = fan.to_FanOnOff.get
3690
+ end
3691
+
3692
+ # Get fan power
3693
+ return_fan_power += fan_fanpower(fan)
3694
+ end
3695
+
3696
+ return return_fan_power
3697
+ end
3698
+
3699
+ # Get supply fan power for airloop
3700
+ #
3701
+ # @param model [OpenStudio::model::AirLoopHVAC] AirLoopHVAC object
3702
+ # @return [Float] Fan power
3703
+ def air_loop_hvac_get_supply_fan_power(air_loop)
3704
+ supply_fan_power = 0
3705
+
3706
+ # Get fan
3707
+ fan = air_loop_hvac_get_supply_fan(air_loop)
3708
+
3709
+ if !fan.nil?
3710
+ # Get fan power
3711
+ supply_fan_power += fan_fanpower(fan)
3712
+ end
3713
+
3714
+ return supply_fan_power
3715
+ end
3716
+
3717
+ # Get supply fan for airloop
3718
+ #
3719
+ # @param model [OpenStudio::model::AirLoopHVAC] AirLoopHVAC object
3720
+ # @return fan
3721
+ def air_loop_hvac_get_supply_fan(air_loop)
3722
+ fan = nil
3723
+ if air_loop.supplyFan.is_initialized
3724
+ # Get return fan
3725
+ fan = air_loop.supplyFan.get
3726
+
3727
+ # Get fan object
3728
+ if fan.to_FanConstantVolume.is_initialized
3729
+ fan = fan.to_FanConstantVolume.get
3730
+ elsif fan.to_FanVariableVolume.is_initialized
3731
+ fan = fan.to_FanVariableVolume.get
3732
+ elsif fan.to_FanOnOff.is_initialized
3733
+ fan = fan.to_FanOnOff.get
3734
+ end
3735
+
3736
+ else
3737
+ air_loop.supplyComponents.each do |comp|
3738
+ if comp.to_AirLoopHVACUnitarySystem.is_initialized
3739
+ fan = comp.to_AirLoopHVACUnitarySystem.get.supplyFan
3740
+ next if fan.empty?
3741
+
3742
+ # Get fan object
3743
+ fan = fan.get
3744
+ if fan.to_FanConstantVolume.is_initialized
3745
+ fan = fan.to_FanConstantVolume.get
3746
+ elsif fan.to_FanVariableVolume.is_initialized
3747
+ fan = fan.to_FanVariableVolume.get
3748
+ elsif fan.to_FanOnOff.is_initialized
3749
+ fan = fan.to_FanOnOff.get
3750
+ end
3751
+ end
3752
+ end
3753
+ end
3754
+ return fan
3755
+ end
3756
+
3757
+ # Get relief fan power for airloop
3758
+ #
3759
+ # @param model [OpenStudio::model::AirLoopHVAC] AirLoopHVAC object
3760
+ # @return [Float] Fan power
3761
+ def air_loop_hvac_get_relief_fan_power(air_loop)
3762
+ relief_fan_power = 0
3763
+
3764
+ if air_loop.reliefFan.is_initialized
3765
+ # Get return fan
3766
+ fan = air_loop.reliefFan.get
3767
+
3768
+ # Get fan object
3769
+ if fan.to_FanConstantVolume.is_initialized
3770
+ fan = fan.to_FanConstantVolume.get
3771
+ elsif fan.to_FanVariableVolume.is_initialized
3772
+ fan = fan.to_FanVariableVolume.get
3773
+ elsif fan.to_FanOnOff.is_initialized
3774
+ fan = fan.to_FanOnOff.get
3775
+ end
3776
+
3777
+ # Get fan power
3778
+ relief_fan_power += fan_fanpower(fan)
3779
+ end
3780
+
3781
+ return relief_fan_power
3782
+ end
3783
+
3537
3784
  # Add occupant standby controls to air loop
3538
3785
  # When the thermostat schedule is setup or setback
3539
3786
  # the ventilation is shutoff. Currently this is done
@@ -3584,4 +3831,30 @@ class Standard
3584
3831
  end
3585
3832
  return simple_transfer_air
3586
3833
  end
3834
+
3835
+ # Get the return air plenum zone object for an air loop, if it exists
3836
+ #
3837
+ # @param air_loop_hvac [OpenStudio::Model::AirLoopHVAC] OpenStudio AirLoopHVAC object
3838
+ # @return [OpenStudio::Model::ThermalZone] OpenStudio thermal zone object of the return air plenum zone
3839
+ # when an air loop uses a return air plenum, nil otherwise
3840
+ def air_loop_hvac_return_air_plenum(air_loop_hvac)
3841
+ # Get return air node
3842
+ return_air_node = air_loop_hvac.demandOutletNode
3843
+
3844
+ # Check if node is connected to a return plenum object
3845
+ air_loop_hvac.model.getAirLoopHVACReturnPlenums.each do |return_plenum|
3846
+ air_loop_hvac.model.getAirLoopHVACZoneMixers.each do |zone_air_mixer|
3847
+ inlets = zone_air_mixer.inletModelObjects
3848
+ inlets.each do |inlet|
3849
+ if inlet.to_Node.get == return_plenum.outletModelObject.get.to_Node.get
3850
+ if zone_air_mixer.outletModelObject.get.to_Node.get == return_air_node
3851
+ return return_plenum.thermalZone.get
3852
+ end
3853
+ end
3854
+ end
3855
+ end
3856
+ end
3857
+
3858
+ return nil
3859
+ end
3587
3860
  end
@@ -11,9 +11,14 @@ class Standard
11
11
  # Determine the fan sizing flow rate, min flow rate,
12
12
  # and W/cfm
13
13
  sec_flow_frac = 0.5
14
- min_flow_frac = 0.3
14
+ min_flow_frac = air_terminal_single_duct_parallel_reheat_piu_minimum_primary_airflow_fraction(air_terminal_single_duct_parallel_piu_reheat)
15
15
  fan_efficacy_w_per_cfm = 0.35
16
16
 
17
+ # Set the fan on flow fraction
18
+ unless air_terminal_single_duct_parallel_piu_reheat_fan_on_flow_fraction.nil?
19
+ air_terminal_single_duct_parallel_piu_reheat.setFanOnFlowFraction(air_terminal_single_duct_parallel_piu_reheat_fan_on_flow_fraction)
20
+ end
21
+
17
22
  # Convert efficacy to metric
18
23
  # 1 cfm = 0.0004719 m^3/s
19
24
  fan_efficacy_w_per_m3_per_s = fan_efficacy_w_per_cfm / 0.0004719
@@ -32,7 +37,6 @@ class Standard
32
37
  max_sec_flow_rate_cfm = OpenStudio.convert(max_sec_flow_rate_m3_per_s, 'm^3/s', 'ft^3/min').get
33
38
 
34
39
  # Set the minimum flow fraction
35
- # @todo Also compare to min OA requirement
36
40
  air_terminal_single_duct_parallel_piu_reheat.setMinimumPrimaryAirFlowFraction(min_flow_frac)
37
41
 
38
42
  # Get the fan
@@ -58,4 +62,48 @@ class Standard
58
62
 
59
63
  return true
60
64
  end
65
+
66
+ # Return the fan on flow fraction for a parallel PIU terminal.
67
+ #
68
+ # When returning nil, the fan on flow fraction will be set to
69
+ # be autosize in the EnergyPlus model; OpenStudio assumes that
70
+ # the default is "autosize". When autosized, this input is set
71
+ # to be the same as the minimum primary air flow fraction which
72
+ # means that the secondary fan will be on when the primary air
73
+ # flow is at the minimum flow fraction.
74
+ #
75
+ # @return [Float] returns nil or a float representing the fraction
76
+ def air_terminal_single_duct_parallel_piu_reheat_fan_on_flow_fraction
77
+ return nil
78
+ end
79
+
80
+ # Specifies the minimum primary air flow fraction for PFB boxes.
81
+ #
82
+ # @param air_terminal_single_duct_parallel_piu_reheat [OpenStudio::Model::AirTerminalSingleDuctParallelPIUReheat] air terminal object
83
+ # @return [Double] minimum primaru air flow fraction
84
+ def air_terminal_single_duct_parallel_reheat_piu_minimum_primary_airflow_fraction(air_terminal_single_duct_parallel_piu_reheat)
85
+ min_primary_airflow_fraction = 0.3
86
+ return min_primary_airflow_fraction
87
+ end
88
+
89
+ # Set the minimum primary air flow fraction based on OA rate of the space and the template.
90
+ #
91
+ # @param air_terminal_single_duct_parallel_piu_reheat [OpenStudio::Model::AirTerminalSingleDuctParallelPIUReheat] the air terminal object
92
+ # @param zone_min_oa [Double] the zone outdoor air flow rate, in m^3/s.
93
+ # @return [Bool] returns true if successful, false if not
94
+ def air_terminal_single_duct_parallel_piu_reheat_apply_minimum_primary_airflow_fraction(air_terminal_single_duct_parallel_piu_reheat, zone_min_oa = nil)
95
+ # Minimum primary air flow
96
+ min_primary_airflow_frac = air_terminal_single_duct_parallel_reheat_piu_minimum_primary_airflow_fraction(air_terminal_single_duct_parallel_piu_reheat)
97
+ air_terminal_single_duct_parallel_piu_reheat.setMinimumPrimaryAirFlowFraction(min_primary_airflow_frac)
98
+ OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.AirTerminalSingleDuctParallelPIUReheat', "For #{air_terminal_single_duct_parallel_piu_reheat.name}: set minimum primary air flow fraction to #{min_primary_airflow_frac}.")
99
+
100
+ # Minimum OA flow rate
101
+ # If specified, set the primary air flow fraction as
102
+ unless zone_min_oa.nil?
103
+ min_primary_airflow_frac = [min_primary_airflow_frac, zone_min_oa / air_terminal_single_duct_parallel_piu_reheat.autosizedMaximumPrimaryAirFlowRate.get].max
104
+ air_terminal_single_duct_parallel_piu_reheat.setMinimumPrimaryAirFlowFraction(min_primary_airflow_frac)
105
+ end
106
+
107
+ return true
108
+ end
61
109
  end
@@ -25,11 +25,15 @@ class Standard
25
25
  name = chiller_electric_eir.name.get
26
26
  condenser_type = nil
27
27
  compressor_type = nil
28
+ absorption_type = nil
28
29
  if cooling_type == 'AirCooled'
29
30
  if name.include?('WithCondenser')
30
31
  condenser_type = 'WithCondenser'
31
32
  elsif name.include?('WithoutCondenser')
32
33
  condenser_type = 'WithoutCondenser'
34
+ else
35
+ # default to 'WithCondenser' if not an absorption chiller
36
+ condenser_type = 'WithCondenser' if absorption_type.nil?
33
37
  end
34
38
  elsif cooling_type == 'WaterCooled'
35
39
  if name.include?('Reciprocating')
@@ -103,7 +103,6 @@ class Standard
103
103
  # @param sql_db_vars_map [Hash] hash map
104
104
  # @return [Hash] hash of coil objects
105
105
  def coil_cooling_water_to_air_heat_pump_apply_efficiency_and_curves(coil_cooling_water_to_air_heat_pump, sql_db_vars_map)
106
-
107
106
  # Get the search criteria
108
107
  search_criteria = {}
109
108
  search_criteria['template'] = template
@@ -186,8 +186,8 @@ class Standard
186
186
  # This is the desired R-value of the insulation.
187
187
  ins_r_value_si = target_r_value_si - film_coeff_r_value_si
188
188
  if ins_r_value_si <= 0.0
189
- OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.Construction', "Requested U-value of #{target_u_value_ip} Btu/ft^2*hr*R for #{construction.name} is too high given the film coefficients of U-#{film_coeff_u_value_ip.round(2)} Btu/ft^2*hr*R; U-value will not be modified.")
190
- return false
189
+ ins_r_value_si = 0.001
190
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.Construction', "Requested U-value of #{target_u_value_ip} Btu/ft^2*hr*R for #{construction.name} is too high given the film coefficients of U-#{film_coeff_u_value_ip.round(2)} Btu/ft^2*hr*R.")
191
191
  end
192
192
  ins_u_value_si = 1.0 / ins_r_value_si
193
193
 
@@ -252,6 +252,7 @@ class Standard
252
252
  end
253
253
 
254
254
  # Not simple unless the layer is a SimpleGlazing material
255
+ # if construction.layers.first.to_SimpleGlazing.empty?
255
256
  if construction.layers.first.to_SimpleGlazing.empty?
256
257
  return false
257
258
  end
@@ -283,6 +284,39 @@ class Standard
283
284
  return true
284
285
  end
285
286
 
287
+ # Set the surface specific F-factor parameters of a construction
288
+ #
289
+ # @param construction [OpenStudio::Model::FFactorGroundFloorConstruction] OpenStudio F-factor construction object
290
+ # @param target_f_factor_ip [Float] Targeted F-Factor in IP units
291
+ # @param surface [OpenStudio::Model::Surface] OpenStudio surface object
292
+ # @return [Bool] returns true if successful, false if not
293
+ def construction_set_surface_slab_f_factor(construction, target_f_factor_ip, surface)
294
+ # Get space associated with surface
295
+ space = surface.space.get
296
+
297
+ # Find this space's exposed floor area and perimeter. NOTE: this assumes only only floor per space.
298
+ perimeter, area = model_get_f_floor_geometry(space)
299
+
300
+ if area == 0
301
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Construction', "Area for #{surface.name} was calculated to be 0 m2, slab f-factor cannot be set.")
302
+ return false
303
+ end
304
+
305
+ # Change construction name
306
+ construction.setName("#{construction.name}_#{surface.name}_#{target_f_factor_ip}")
307
+
308
+ # Set properties
309
+ f_factor_si = target_f_factor_ip * OpenStudio.convert(1.0, 'Btu/ft*h*R', 'W/m*K').get
310
+ construction.setFFactor(f_factor_si)
311
+ construction.setArea(area)
312
+ construction.setPerimeterExposed(perimeter)
313
+
314
+ # Set surface outside boundary condition
315
+ surface.setOutsideBoundaryCondition('GroundFCfactorMethod')
316
+
317
+ return true
318
+ end
319
+
286
320
  # Set the C-Factor of an underground wall to a specified value.
287
321
  # Assumes continuous exterior insulation and modifies
288
322
  # the insulation layer according to the values from 90.1-2004
@@ -306,6 +340,36 @@ class Standard
306
340
  return true
307
341
  end
308
342
 
343
+ # Set the surface specific C-factor parameters of a construction
344
+ #
345
+ # @param construction [OpenStudio::Model::CFactorUndergroundWallConstruction] OpenStudio C-factor construction object
346
+ # @param target_c_factor_ip [Float] Targeted C-Factor in IP units
347
+ # @param surface [OpenStudio::Model::Surface] OpenStudio surface object
348
+ # @return [Bool] returns true if successful, false if not
349
+ def construction_set_surface_underground_wall_c_factor(construction, target_c_factor_ip, surface)
350
+ # Get space associated with surface
351
+ space = surface.space.get
352
+
353
+ # Get height of the first below grade wall in this space.
354
+ below_grade_wall_height = model_get_space_below_grade_wall_height(space)
355
+
356
+ if below_grade_wall_height == 0
357
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Construction', "Below grade wall height for #{surface.name} was calculated to be 0 m2, below grade wall c-factor cannot be set.")
358
+ return false
359
+ end
360
+
361
+ # Change construction name
362
+ construction.setName("#{construction.name}_#{surface.name}_#{target_c_factor_ip}")
363
+
364
+ # Set properties
365
+ c_factor_si = target_c_factor_ip * OpenStudio.convert(1.0, 'Btu/ft^2*h*R', 'W/m^2*K').get
366
+ construction.setCFactor(c_factor_si)
367
+ construction.setHeight(below_grade_wall_height)
368
+
369
+ # Set surface outside boundary condition
370
+ surface.setOutsideBoundaryCondition('GroundFCfactorMethod')
371
+ end
372
+
309
373
  # Get the SHGC as calculated by EnergyPlus.
310
374
  # Only applies to fenestration constructions.
311
375
  #
@@ -462,6 +526,124 @@ class Standard
462
526
  return u_factor_w_per_m2_k
463
527
  end
464
528
 
529
+ # Calculate the fenestration U-Factor base on the glass, frame,
530
+ # and divider performance and area calculated by EnergyPlus.
531
+ #
532
+ # @param [OpenStudio:Model:Construction] Openstudio Construction object
533
+ #
534
+ # @return [Double] the U-Factor in W/m^2*K
535
+ def construction_calculated_fenestration_u_factor_w_frame(construction)
536
+ construction_name = construction.name.get.to_s
537
+
538
+ u_factor_w_per_m2_k = nil
539
+
540
+ sql = construction.model.sqlFile
541
+
542
+ if sql.is_initialized
543
+ sql = sql.get
544
+
545
+ row_query = "SELECT RowName
546
+ FROM tabulardatawithstrings
547
+ WHERE ReportName='EnvelopeSummary'
548
+ AND ReportForString='Entire Facility'
549
+ AND TableName='Exterior Fenestration'
550
+ AND Value='#{construction_name.upcase}'"
551
+
552
+ row_id = sql.execAndReturnFirstString(row_query)
553
+
554
+ if row_id.is_initialized
555
+ row_id = row_id.get
556
+ else
557
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.Construction', "U-Factor row ID not found for construction: #{construction_name}.")
558
+ row_id = 9999
559
+ end
560
+
561
+ # Glass U-Factor
562
+ glass_u_factor_query = "SELECT Value
563
+ FROM tabulardatawithstrings
564
+ WHERE ReportName='EnvelopeSummary'
565
+ AND ReportForString='Entire Facility'
566
+ AND TableName='Exterior Fenestration'
567
+ AND ColumnName='Glass U-Factor'
568
+ AND RowName='#{row_id}'"
569
+
570
+ glass_u_factor_w_per_m2_k = sql.execAndReturnFirstDouble(glass_u_factor_query)
571
+
572
+ glass_u_factor_w_per_m2_k = glass_u_factor_w_per_m2_k.is_initialized ? glass_u_factor_w_per_m2_k.get : 0.0
573
+
574
+ # Glass area
575
+ glass_area_query = "SELECT Value
576
+ FROM tabulardatawithstrings
577
+ WHERE ReportName='EnvelopeSummary'
578
+ AND ReportForString='Entire Facility'
579
+ AND TableName='Exterior Fenestration'
580
+ AND ColumnName='Glass Area'
581
+ AND RowName='#{row_id}'"
582
+
583
+ glass_area_m2 = sql.execAndReturnFirstDouble(glass_area_query)
584
+
585
+ glass_area_m2 = glass_area_m2.is_initialized ? glass_area_m2.get : 0.0
586
+
587
+ # Frame conductance
588
+ frame_conductance_query = "SELECT Value
589
+ FROM tabulardatawithstrings
590
+ WHERE ReportName='EnvelopeSummary'
591
+ AND ReportForString='Entire Facility'
592
+ AND TableName='Exterior Fenestration'
593
+ AND ColumnName='Frame Conductance'
594
+ AND RowName='#{row_id}'"
595
+
596
+ frame_conductance_w_per_m2_k = sql.execAndReturnFirstDouble(frame_conductance_query)
597
+
598
+ frame_conductance_w_per_m2_k = frame_conductance_w_per_m2_k.is_initialized ? frame_conductance_w_per_m2_k.get : 0.0
599
+
600
+ # Frame area
601
+ frame_area_query = "SELECT Value
602
+ FROM tabulardatawithstrings
603
+ WHERE ReportName='EnvelopeSummary'
604
+ AND ReportForString='Entire Facility'
605
+ AND TableName='Exterior Fenestration'
606
+ AND ColumnName='Frame Area'
607
+ AND RowName='#{row_id}'"
608
+
609
+ frame_area_m2 = sql.execAndReturnFirstDouble(frame_area_query)
610
+
611
+ frame_area_m2 = frame_area_m2.is_initialized ? frame_area_m2.get : 0.0
612
+
613
+ # Divider conductance
614
+ divider_conductance_query = "SELECT Value
615
+ FROM tabulardatawithstrings
616
+ WHERE ReportName='EnvelopeSummary'
617
+ AND ReportForString='Entire Facility'
618
+ AND TableName='Exterior Fenestration'
619
+ AND ColumnName='Divider Conductance'
620
+ AND RowName='#{row_id}'"
621
+
622
+ divider_conductance_w_per_m2_k = sql.execAndReturnFirstDouble(divider_conductance_query)
623
+
624
+ divider_conductance_w_per_m2_k = divider_conductance_w_per_m2_k.is_initialized ? divider_conductance_w_per_m2_k.get : 0.0
625
+
626
+ # Divider area
627
+ divider_area_query = "SELECT Value
628
+ FROM tabulardatawithstrings
629
+ WHERE ReportName='EnvelopeSummary'
630
+ AND ReportForString='Entire Facility'
631
+ AND TableName='Exterior Fenestration'
632
+ AND ColumnName='Divder Area'
633
+ AND RowName='#{row_id}'"
634
+
635
+ divider_area_m2 = sql.execAndReturnFirstDouble(divider_area_query)
636
+
637
+ divider_area_m2 = divider_area_m2.is_initialized ? divider_area_m2.get : 0.0
638
+
639
+ u_factor_w_per_m2_k = (glass_u_factor_w_per_m2_k * glass_area_m2 + frame_conductance_w_per_m2_k * frame_area_m2 + divider_conductance_w_per_m2_k * divider_area_m2) / (glass_area_m2 + frame_area_m2 + divider_area_m2)
640
+ else
641
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Construction', 'Model has no sql file containing results, cannot lookup data.')
642
+ end
643
+
644
+ return u_factor_w_per_m2_k
645
+ end
646
+
465
647
  # find and get the insulation layer for a construction
466
648
  #
467
649
  # @param construction [OpenStudio::Model::Construction] construction object
@@ -505,7 +687,7 @@ class Standard
505
687
  # @param is_percentage [Bool] toggle is percentage
506
688
  # @return [Hash] json information
507
689
  def change_construction_properties_in_model(model, values, is_percentage = false)
508
- puts JSON.pretty_generate(values)
690
+ # puts JSON.pretty_generate(values)
509
691
  # copy orginal model for reporting.
510
692
  before_measure_model = BTAP::FileIO.deep_copy(model)
511
693
  # report change as Info