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
@@ -18,17 +18,45 @@ class Standard
18
18
  # and the value is the newly created construction.
19
19
  # This can be used to avoid creating duplicate constructions.
20
20
  # @todo Align the standard construction enumerations in the
21
- # spreadsheet with the enumerations in OpenStudio (follow CBECC-Com).
22
- def planar_surface_apply_standard_construction(planar_surface, climate_zone, previous_construction_map = {})
21
+ # spreadsheet with the enumerations in OpenStudio (follow CBECC-Com).
22
+ def planar_surface_apply_standard_construction(planar_surface, climate_zone, previous_construction_map = {}, wwr_building_type = nil, wwr_info = {}, surface_category)
23
23
  # Skip surfaces not in a space
24
24
  return previous_construction_map if planar_surface.space.empty?
25
25
 
26
26
  space = planar_surface.space.get
27
+ if surface_category == 'ExteriorSubSurface'
28
+ surface_type = planar_surface.subSurfaceType
29
+ else
30
+ surface_type = planar_surface.surfaceType
31
+ end
27
32
 
28
33
  # Skip surfaces that don't have a construction
29
- return previous_construction_map if planar_surface.construction.empty?
34
+ # return previous_construction_map if planar_surface.construction.empty?
35
+ if !planar_surface.construction.empty?
36
+ construction = planar_surface.construction.get
37
+ else
38
+ # Get appropriate default construction if not defined inside surface object
39
+ construction = nil
40
+ space_type = space.spaceType.get
41
+ if space.defaultConstructionSet.is_initialized
42
+ cons_set = space.defaultConstructionSet.get
43
+ construction = get_default_surface_cons_from_surface_type(surface_category, surface_type, cons_set)
44
+ end
45
+ if construction.nil? && space_type.defaultConstructionSet.is_initialized
46
+ cons_set = space_type.defaultConstructionSet.get
47
+ construction = get_default_surface_cons_from_surface_type(surface_category, surface_type, cons_set)
48
+ end
49
+ if construction.nil? && space.buildingStory.get.defaultConstructionSet.is_initialized
50
+ cons_set = space.buildingStory.get.defaultConstructionSet.get
51
+ construction = get_default_surface_cons_from_surface_type(surface_category, surface_type, cons_set)
52
+ end
53
+ if construction.nil? && space.model.building.get.defaultConstructionSet.is_initialized
54
+ cons_set = space.model.building.get.defaultConstructionSet.get
55
+ construction = get_default_surface_cons_from_surface_type(surface_category, surface_type, cons_set)
56
+ end
30
57
 
31
- construction = planar_surface.construction.get
58
+ return previous_construction_map if construction.nil?
59
+ end
32
60
 
33
61
  # Determine if residential or nonresidential
34
62
  # based on the space type.
@@ -43,6 +71,7 @@ class Standard
43
71
  # Get the intended surface type
44
72
  standards_info = construction.standardsInformation
45
73
  surf_type = standards_info.intendedSurfaceType
74
+
46
75
  if surf_type.empty?
47
76
  OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlanarSurface', "Could not determine the intended surface type for #{planar_surface.name} from #{construction.name}. This surface will not have the standard applied.")
48
77
  return previous_construction_map
@@ -54,23 +83,32 @@ class Standard
54
83
  # Mapping is between standards-defined enumerations and the
55
84
  # enumerations available in OpenStudio.
56
85
  stds_type = nil
57
- # Windows
58
- if surf_type == 'ExteriorWindow'
86
+ # Windows and Glass Doors
87
+ if surf_type == 'ExteriorWindow' || surf_type == 'GlassDoor'
59
88
  stds_type = standards_info.fenestrationFrameType
60
89
  if stds_type.is_initialized
61
90
  stds_type = stds_type.get
91
+ if !wwr_building_type.nil?
92
+ stds_type = 'Any Vertical Glazing'
93
+ end
62
94
  case stds_type
63
95
  when 'Metal Framing', 'Metal Framing with Thermal Break'
64
96
  stds_type = 'Metal framing (all other)'
65
97
  when 'Non-Metal Framing'
66
98
  stds_type = 'Nonmetal framing (all)'
99
+ when 'Any Vertical Glazing'
100
+ stds_type = 'Any Vertical Glazing'
67
101
  else
68
102
  OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlanarSurface', "The standards fenestration frame type #{stds_type} cannot be used on #{surf_type} in #{planar_surface.name}. This surface will not have the standard applied.")
69
103
  return previous_construction_map
70
104
  end
71
105
  else
72
- OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlanarSurface', "Could not determine the standards fenestration frame type for #{planar_surface.name} from #{construction.name}. This surface will not have the standard applied.")
73
- return previous_construction_map
106
+ if !wwr_building_type.nil?
107
+ stds_type = 'Any Vertical Glazing'
108
+ else
109
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlanarSurface', "Could not determine the standards fenestration frame type for #{planar_surface.name} from #{construction.name}. This surface will not have the standard applied.")
110
+ return previous_construction_map
111
+ end
74
112
  end
75
113
  # Skylights
76
114
  elsif surf_type == 'Skylight'
@@ -120,8 +158,20 @@ class Standard
120
158
 
121
159
  # Check if the construction type was already created.
122
160
  # If yes, use that construction. If no, make a new one.
161
+
162
+ # for multi-building type - search for the surface wwr type
163
+ surface_std_wwr_type = wwr_building_type
123
164
  new_construction = nil
124
165
  type = [template, climate_zone, surf_type, stds_type, occ_type]
166
+ # Only apply the surface_std_wwr_type update when wwr_building_type has Truthy values
167
+ if !wwr_building_type.nil? && (surf_type == 'ExteriorWindow' || surf_type == 'GlassDoor')
168
+ space = planar_surface.space.get
169
+ if space.hasAdditionalProperties && space.additionalProperties.hasFeature('building_type_for_wwr')
170
+ surface_std_wwr_type = space.additionalProperties.getFeatureAsString('building_type_for_wwr').get
171
+ end
172
+ type.push(surface_std_wwr_type)
173
+ end
174
+
125
175
  if previous_construction_map[type]
126
176
  new_construction = previous_construction_map[type]
127
177
  else
@@ -129,7 +179,9 @@ class Standard
129
179
  climate_zone_set,
130
180
  surf_type,
131
181
  stds_type,
132
- occ_type)
182
+ occ_type,
183
+ wwr_building_type: surface_std_wwr_type,
184
+ wwr_info: wwr_info)
133
185
  if !new_construction == false
134
186
  previous_construction_map[type] = new_construction
135
187
  end
@@ -146,4 +198,73 @@ class Standard
146
198
 
147
199
  return previous_construction_map
148
200
  end
201
+
202
+ # Get appropriate construction object based on type of surface or subsurface
203
+ # @author: Doug Maddox, PNNL
204
+ # @param: surface_category [string] type of surface: this is not an OpenStudio string
205
+ # @param: surface_type [string] SubSurfaceType: this is an OpenStudio string
206
+ # @param: cons_set [object] DefaultSubSurfaceConstructions object
207
+ # @return: [object] Construction object
208
+ def get_default_surface_cons_from_surface_type(surface_category, surface_type, cons_set)
209
+ # Get DefaultSurfaceContstructions or DefaultSubSurfaceConstructions object
210
+ if surface_category == 'ExteriorSurface'
211
+ cons_list = cons_set.defaultExteriorSurfaceConstructions.get
212
+ elsif surface_category == 'GroundSurface'
213
+ cons_list = cons_set.defaultGroundContactSurfaceConstructions.get
214
+ elsif surface_category == 'ExteriorSubSurface'
215
+ cons_list = cons_set.defaultExteriorSubSurfaceConstructions.get
216
+ else
217
+ cons_list = nil
218
+ end
219
+
220
+ cons = nil
221
+ case surface_type
222
+ when 'FixedWindow'
223
+ if cons_list.fixedWindowConstruction.is_initialized
224
+ cons = cons_list.fixedWindowConstruction.get
225
+ end
226
+ when 'OperableWindow'
227
+ if cons_list.operableWindowConstruction.is_initialized
228
+ cons = cons_list.operableWindowConstruction.get
229
+ end
230
+ when 'Door'
231
+ if cons_list.doorConstruction.is_initialized
232
+ cons = cons_list.doorConstruction.get
233
+ end
234
+ when 'GlassDoor'
235
+ if cons_list.glassDoorConstruction.is_initialized
236
+ cons = cons_list.glassDoorConstruction.get
237
+ end
238
+ when 'OverheadDoor'
239
+ if cons_list.overheadDoorConstruction.is_initialized
240
+ cons = cons_list.overheadDoorConstruction.get
241
+ end
242
+ when 'Skylight'
243
+ if cons_list.skylightConstruction.is_initialized
244
+ cons = cons_list.skylightConstruction.get
245
+ end
246
+ when 'TubularDaylightDome'
247
+ if cons_list.tubularDaylightDomeConstruction.is_initialized
248
+ cons = cons_list.tubularDaylightDomeConstruction.get
249
+ end
250
+ when 'TubularDaylightDiffuser'
251
+ if cons_list.tubularDaylightDiffuserConstruction.is_initialized
252
+ cons = cons_list.tubularDaylightDiffuserConstruction.get
253
+ end
254
+ when 'Floor'
255
+ if cons_list.floorConstruction.is_initialized
256
+ cons = cons_list.floorConstruction.get
257
+ end
258
+ when 'Wall'
259
+ if cons_list.wallConstruction.is_initialized
260
+ cons = cons_list.wallConstruction.get
261
+ end
262
+ when 'Roof'
263
+ if cons_list.roofConstruction.is_initialized
264
+ cons = cons_list.roofConstruction.get
265
+ end
266
+ end
267
+
268
+ return cons
269
+ end
149
270
  end
@@ -11,6 +11,53 @@ class Standard
11
11
  # plant_loop_enable_supply_water_temperature_reset(plant_loop) if plant_loop_supply_water_temperature_reset_required?(plant_loop)
12
12
  end
13
13
 
14
+ # Apply sizing and controls to chilled water loop
15
+ #
16
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
17
+ # @param chilled_water_loop [OpenStudio::Model::PlantLoop] chilled water loop
18
+ # @param dsgn_sup_wtr_temp [Double] design chilled water supply T
19
+ # @param dsgn_sup_wtr_temp_delt [Double] design chilled water supply delta T
20
+ # @return [Bool] returns true if successful, false if not
21
+ def chw_sizing_control(model, chilled_water_loop, dsgn_sup_wtr_temp, dsgn_sup_wtr_temp_delt)
22
+ # chilled water loop sizing and controls
23
+ if dsgn_sup_wtr_temp.nil?
24
+ dsgn_sup_wtr_temp = 44.0
25
+ dsgn_sup_wtr_temp_c = OpenStudio.convert(dsgn_sup_wtr_temp, 'F', 'C').get
26
+ else
27
+ dsgn_sup_wtr_temp_c = OpenStudio.convert(dsgn_sup_wtr_temp, 'F', 'C').get
28
+ end
29
+ if dsgn_sup_wtr_temp_delt.nil?
30
+ dsgn_sup_wtr_temp_delt_k = OpenStudio.convert(10.1, 'R', 'K').get
31
+ else
32
+ dsgn_sup_wtr_temp_delt_k = OpenStudio.convert(dsgn_sup_wtr_temp_delt, 'R', 'K').get
33
+ end
34
+ chilled_water_loop.setMinimumLoopTemperature(1.0)
35
+ chilled_water_loop.setMaximumLoopTemperature(40.0)
36
+ sizing_plant = chilled_water_loop.sizingPlant
37
+ sizing_plant.setLoopType('Cooling')
38
+ sizing_plant.setDesignLoopExitTemperature(dsgn_sup_wtr_temp_c)
39
+ sizing_plant.setLoopDesignTemperatureDifference(dsgn_sup_wtr_temp_delt_k)
40
+ chw_temp_sch = model_add_constant_schedule_ruleset(model,
41
+ dsgn_sup_wtr_temp_c,
42
+ name = "#{chilled_water_loop.name} Temp - #{dsgn_sup_wtr_temp.round(0)}F")
43
+ chw_stpt_manager = OpenStudio::Model::SetpointManagerScheduled.new(model, chw_temp_sch)
44
+ chw_stpt_manager.setName("#{chilled_water_loop.name} Setpoint Manager")
45
+ chw_stpt_manager.addToNode(chilled_water_loop.supplyOutletNode)
46
+ # @todo Yixing check the CHW Setpoint from standards
47
+ # @todo Should be a OutdoorAirReset, see the changes I've made in Standards.PlantLoop.apply_prm_baseline_temperatures
48
+
49
+ return true
50
+ end
51
+
52
+ # Set configuration in model for chilled water primary/secondary loop interface
53
+ #
54
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
55
+ # @return [String] common_pipe or heat_exchanger
56
+ def plant_loop_set_chw_pri_sec_configuration(model)
57
+ pri_sec_config = 'common_pipe'
58
+ return pri_sec_config
59
+ end
60
+
14
61
  # Determine if the plant loop is variable flow.
15
62
  # Returns true if primary and/or secondary pumps are variable speed.
16
63
  #
@@ -771,7 +818,7 @@ class Standard
771
818
  end
772
819
  end
773
820
 
774
- # Modify all the secondary pumps
821
+ # Modify all the secondary pumps besides constant pumps
775
822
  plant_loop.demandComponents.each do |sc|
776
823
  if sc.to_PumpVariableSpeed.is_initialized
777
824
  pump = sc.to_PumpVariableSpeed.get
@@ -914,9 +961,9 @@ class Standard
914
961
  # Splits the single chiller used for the initial sizing run
915
962
  # into multiple separate chillers based on Appendix G.
916
963
  #
917
- # @param plant_loop [OpenStudio::Model::PlantLoop] chilled water loop
964
+ # @param plant_loop_args [Array] chilled water loop (OpenStudio::Model::PlantLoop), sizing run directory
918
965
  # @return [Bool] returns true if successful, false if not
919
- def plant_loop_apply_prm_number_of_chillers(plant_loop)
966
+ def plant_loop_apply_prm_number_of_chillers(plant_loop, sizing_run_dir = nil)
920
967
  # Skip non-cooling plants
921
968
  return true unless plant_loop.sizingPlant.loopType == 'Cooling'
922
969
 
@@ -1,6 +1,50 @@
1
1
  class Standard
2
2
  # @!group ScheduleCompact
3
3
 
4
+ # Returns the min and max value in a design day (heating or cooling) from a Compact schedule
5
+ #
6
+ # @author Weili Xu, PNNL
7
+ # @param schedule_compact [OpenStudio::Model::ScheduleCompact] schedule ruleset object
8
+ # @param type [String] 'winter' will enable the winter design day search, 'summer' enables summer design day search
9
+ # @return [Hash] Hash has two keys, min and max.
10
+ def schedule_compact_design_day_min_max_value(schedule_compact, type = 'winter')
11
+ vals = []
12
+ design_day_flag = false
13
+ prev_str = ''
14
+ schedule_compact.extensibleGroups.each do |eg|
15
+ if design_day_flag && prev_str.include?('until')
16
+ val = eg.getDouble(0)
17
+ if val.is_initialized
18
+ vals << val.get
19
+ end
20
+ end
21
+
22
+ str = eg.getString(0)
23
+ if str.is_initialized
24
+ prev_str = str.get.downcase
25
+ if prev_str.include?('for:')
26
+ # Process a new day schedule, turn the flag off.
27
+ design_day_flag = false
28
+ # in the same line, if there is design day label and matches the type, turn the flag back on.
29
+ if prev_str.include?(type) || prev_str.include?('alldays')
30
+ design_day_flag = true
31
+ end
32
+ end
33
+ end
34
+ end
35
+
36
+ # Error if no values were found
37
+ if vals.size.zero?
38
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio::standards::ScheduleCompact', "Could not find any value in #{schedule_compact.name} design day schedule when determining min and max.")
39
+ result = { 'min' => 999.9, 'max' => 999.9 }
40
+ return result
41
+ end
42
+
43
+ result = { 'min' => vals.min, 'max' => vals.max }
44
+
45
+ return result
46
+ end
47
+
4
48
  # Returns the min and max value for this schedule.
5
49
  #
6
50
  # @author Andrew Parker, NREL.
@@ -26,3 +26,30 @@ class Standard
26
26
  return result
27
27
  end
28
28
  end
29
+
30
+ # Create a sequential array of values from a ScheduleConstant object
31
+ # Will actually include 24 extra values if model year is a leap year
32
+ # Will also include 24 values at end of array representing the holiday day schedule
33
+ # Intended use is for storing fan schedules to hash of ZoneName:SchedArray so schedules
34
+ # can be saved when HVAC objects are deleted
35
+ # @author Doug Maddox, PNNL
36
+ # @param [object] model
37
+ # @param [Object] schedule_ruleset
38
+ # @return [Array<Double>] Array of sequential hourly values for year + 24 hours at end for holiday
39
+ def get_8760_values_from_schedule_constant(model, schedule_constant)
40
+ yd = model.getYearDescription
41
+ start_date = yd.makeDate(1, 1)
42
+ sch_value = schedule_constant.value
43
+
44
+ # Start with 365 days + 24 hrs for holiday
45
+ hrs_per_year = 8759 + 24
46
+ # Add 24 hours if leap year
47
+ hrs_per_year += 24 if start_date.isLeapYear
48
+
49
+ values = []
50
+ (0..hrs_per_year).each do |ihr|
51
+ values << sch_value
52
+ end
53
+
54
+ return values
55
+ end