urbanopt-cli 0.10.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (712) hide show
  1. checksums.yaml +4 -4
  2. data/.github/release.yml +24 -0
  3. data/.github/workflows/nightly_ci_build.yml +37 -33
  4. data/.gitignore +1 -0
  5. data/CHANGELOG.md +25 -0
  6. data/CMakeLists.txt +7 -7
  7. data/FindOpenStudioSDK.cmake +10 -10
  8. data/LICENSE.md +8 -35
  9. data/README.md +25 -10
  10. data/example_files/Gemfile +9 -9
  11. data/example_files/example_project_combined.json +6 -2
  12. data/example_files/example_project_with_ghe.json +859 -0
  13. data/example_files/mappers/Baseline.rb +39 -415
  14. data/example_files/mappers/ChilledWaterStorage.rb +1 -1
  15. data/example_files/mappers/CreateBar.rb +1 -1
  16. data/example_files/mappers/EvCharging.rb +1 -1
  17. data/example_files/mappers/FlexibleHotWater.rb +1 -1
  18. data/example_files/mappers/Floorspace.rb +1 -1
  19. data/example_files/mappers/HighEfficiency.rb +1 -1
  20. data/example_files/mappers/HighEfficiencyCreateBar.rb +1 -1
  21. data/example_files/mappers/HighEfficiencyFloorspace.rb +1 -1
  22. data/example_files/mappers/PeakHoursMelsShedding.rb +1 -1
  23. data/example_files/mappers/PeakHoursThermostatAdjust.rb +1 -1
  24. data/example_files/mappers/ThermalStorage.rb +1 -1
  25. data/example_files/mappers/base_workflow.osw +11 -4
  26. data/example_files/mappers/residential/template/util.rb +138 -0
  27. data/example_files/mappers/residential/util.rb +276 -0
  28. data/example_files/measures/BuildResidentialModel/measure.rb +118 -230
  29. data/example_files/measures/BuildResidentialModel/measure.xml +344 -233
  30. data/example_files/measures/BuildResidentialModel/resources/geometry.rb +7 -2
  31. data/example_files/measures/BuildResidentialModel/resources/unit_conversions.rb +5 -0
  32. data/example_files/measures/BuildResidentialModel/resources/util.rb +5 -0
  33. data/example_files/measures/BuildResidentialModel/tests/test_build_residential_model.rb +344 -0
  34. data/example_files/measures/BuildResidentialModel/tests/xml_building/17/feature1.xml +2112 -0
  35. data/example_files/measures/BuildResidentialModel/tests/xml_building/17/feature2.xml +2112 -0
  36. data/example_files/osm_building/7.osm +0 -2
  37. data/example_files/osm_building/8.osm +0 -2
  38. data/example_files/osm_building/9.osm +0 -2
  39. data/example_files/python_deps/dependencies.json +4 -3
  40. data/example_files/resources/hpxml-measures/.gitattributes +3 -0
  41. data/example_files/resources/hpxml-measures/.github/pull_request_template.md +2 -2
  42. data/example_files/resources/hpxml-measures/.github/workflows/add_to_project.yml +17 -0
  43. data/example_files/resources/hpxml-measures/.github/workflows/config.yml +37 -8
  44. data/example_files/resources/hpxml-measures/.gitignore +1 -0
  45. data/example_files/resources/hpxml-measures/.readthedocs.yml +6 -2
  46. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/README.md +5596 -0
  47. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/README.md.erb +41 -0
  48. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/measure.rb +1324 -1035
  49. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/measure.xml +325 -236
  50. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/resources/geometry.rb +119 -152
  51. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{build_residential_hpxml_test.rb → test_build_residential_hpxml.rb} +225 -107
  52. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/README.md +96 -0
  53. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/README.md.erb +41 -0
  54. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/measure.rb +73 -31
  55. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/measure.xml +60 -40
  56. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/resources/README.md +48 -23
  57. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/resources/constants.rb +5 -0
  58. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/resources/schedules.rb +6 -12
  59. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/tests/{build_residential_schedule_file_test.rb → test_build_residential_schedule_file.rb} +162 -35
  60. data/example_files/resources/hpxml-measures/Changelog.md +57 -1
  61. data/example_files/resources/hpxml-measures/Gemfile +1 -1
  62. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/README.md +83 -0
  63. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/README.md.erb +41 -0
  64. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb +1081 -878
  65. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/measure.xml +258 -204
  66. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/airflow.rb +205 -178
  67. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/battery.rb +43 -18
  68. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/constants.rb +37 -112
  69. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/constructions.rb +34 -73
  70. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/data/Xing_okstate_0664D_13659_Table_A-3.csv +4165 -0
  71. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/data/unavailable_periods.csv +2 -2
  72. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/energyplus.rb +5 -1
  73. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/generator.rb +13 -7
  74. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/geometry.rb +95 -42
  75. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hotwater_appliances.rb +132 -108
  76. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml.rb +1695 -1267
  77. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_defaults.rb +668 -589
  78. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_schema/HPXML.xsd +304 -553
  79. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_schematron/EPvalidator.xml +197 -112
  80. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hvac.rb +1140 -1745
  81. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hvac_sizing.rb +412 -325
  82. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/lighting.rb +56 -48
  83. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/location.rb +49 -38
  84. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/materials.rb +5 -0
  85. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb +17 -1
  86. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/minitest_helper.rb +5 -0
  87. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/misc_loads.rb +94 -78
  88. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/output.rb +60 -2
  89. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/psychrometrics.rb +6 -1
  90. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/pv.rb +11 -5
  91. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-non-stochastic.csv +1 -1
  92. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic-30-mins.csv +52561 -0
  93. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_2.csv +8761 -0
  94. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_3.csv +8761 -0
  95. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_4.csv +8761 -0
  96. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_5.csv +8761 -0
  97. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_6.csv +8761 -0
  98. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedules.rb +129 -137
  99. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/simcontrols.rb +12 -21
  100. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/unit_conversions.rb +5 -0
  101. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/util.rb +7 -2
  102. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/utility_bills.rb +6 -1
  103. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/version.rb +7 -2
  104. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/waterheater.rb +179 -144
  105. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/weather.rb +129 -71
  106. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/xmlhelper.rb +5 -0
  107. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/xmlvalidator.rb +23 -6
  108. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_airflow.rb +129 -118
  109. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_battery.rb +25 -20
  110. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_defaults.rb +2282 -2239
  111. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_enclosure.rb +395 -204
  112. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_generator.rb +12 -7
  113. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hotwater_appliance.rb +56 -51
  114. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hvac.rb +369 -230
  115. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hvac_sizing.rb +371 -191
  116. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_lighting.rb +27 -20
  117. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_location.rb +55 -5
  118. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_miscloads.rb +35 -30
  119. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_pv.rb +13 -8
  120. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_schedules.rb +107 -93
  121. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_simcontrols.rb +11 -6
  122. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_validation.rb +757 -573
  123. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_water_heater.rb +77 -72
  124. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_weather.rb +36 -6
  125. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/util.rb +5 -0
  126. data/example_files/resources/hpxml-measures/README.md +2 -0
  127. data/example_files/resources/hpxml-measures/Rakefile +10 -3
  128. data/example_files/resources/hpxml-measures/ReportSimulationOutput/README.md +787 -0
  129. data/example_files/resources/hpxml-measures/ReportSimulationOutput/README.md.erb +41 -0
  130. data/example_files/resources/hpxml-measures/ReportSimulationOutput/measure.rb +730 -418
  131. data/example_files/resources/hpxml-measures/ReportSimulationOutput/measure.xml +1215 -9
  132. data/example_files/resources/hpxml-measures/ReportSimulationOutput/tests/{output_report_test.rb → test_report_sim_output.rb} +130 -299
  133. data/example_files/resources/hpxml-measures/ReportUtilityBills/README.md +87 -0
  134. data/example_files/resources/hpxml-measures/ReportUtilityBills/README.md.erb +41 -0
  135. data/example_files/resources/hpxml-measures/ReportUtilityBills/measure.rb +261 -89
  136. data/example_files/resources/hpxml-measures/ReportUtilityBills/measure.xml +179 -94
  137. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/Average_retail_price_of_electricity.csv +68 -68
  138. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/NG_PRI_SUM_A_EPG0_PRS_DMCF_A.csv +3 -2
  139. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/PET_PRI_WFR_A_EPD2F_PRS_DPGAL_W.csv +713 -685
  140. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/PET_PRI_WFR_A_EPLLPA_PRS_DPGAL_W.csv +716 -688
  141. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/README.md +5 -2
  142. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/util.rb +18 -9
  143. data/example_files/resources/hpxml-measures/ReportUtilityBills/tests/test_report_utility_bills.rb +1308 -0
  144. data/example_files/resources/hpxml-measures/docs/requirements.txt +5 -0
  145. data/example_files/resources/hpxml-measures/docs/source/conf.py +1 -2
  146. data/example_files/resources/hpxml-measures/docs/source/intro.rst +3 -20
  147. data/example_files/resources/hpxml-measures/docs/source/usage_instructions.rst +1 -1
  148. data/example_files/resources/hpxml-measures/docs/source/workflow_inputs.rst +917 -564
  149. data/example_files/resources/hpxml-measures/docs/source/workflow_outputs.rst +79 -42
  150. data/example_files/resources/hpxml-measures/tasks.rb +2305 -2055
  151. data/example_files/resources/hpxml-measures/workflow/hpxml_inputs.json +270 -587
  152. data/example_files/resources/hpxml-measures/workflow/real_homes/house001.xml +559 -557
  153. data/example_files/resources/hpxml-measures/workflow/real_homes/house002.xml +522 -520
  154. data/example_files/resources/hpxml-measures/workflow/real_homes/house003.xml +534 -532
  155. data/example_files/resources/hpxml-measures/workflow/real_homes/house004.xml +547 -545
  156. data/example_files/resources/hpxml-measures/workflow/real_homes/house005.xml +546 -544
  157. data/example_files/resources/hpxml-measures/workflow/real_homes/house006.xml +603 -623
  158. data/example_files/resources/hpxml-measures/workflow/real_homes/house007.xml +613 -633
  159. data/example_files/resources/hpxml-measures/workflow/real_homes/house008.xml +699 -721
  160. data/example_files/resources/hpxml-measures/workflow/real_homes/house009.xml +662 -661
  161. data/example_files/resources/hpxml-measures/workflow/real_homes/house010.xml +657 -677
  162. data/example_files/resources/hpxml-measures/workflow/real_homes/house011.xml +470 -467
  163. data/example_files/resources/hpxml-measures/workflow/real_homes/house012.xml +441 -438
  164. data/example_files/resources/hpxml-measures/workflow/real_homes/house013.xml +468 -465
  165. data/example_files/resources/hpxml-measures/workflow/real_homes/house014.xml +469 -466
  166. data/example_files/resources/hpxml-measures/workflow/real_homes/house015.xml +468 -465
  167. data/example_files/resources/hpxml-measures/workflow/real_homes/house016.xml +717 -714
  168. data/example_files/resources/hpxml-measures/workflow/real_homes/house017.xml +647 -645
  169. data/example_files/resources/hpxml-measures/workflow/real_homes/house018.xml +569 -566
  170. data/example_files/resources/hpxml-measures/workflow/real_homes/house019.xml +602 -599
  171. data/example_files/resources/hpxml-measures/workflow/real_homes/house020.xml +630 -627
  172. data/example_files/resources/hpxml-measures/workflow/real_homes/house021.xml +776 -774
  173. data/example_files/resources/hpxml-measures/workflow/real_homes/house022.xml +670 -667
  174. data/example_files/resources/hpxml-measures/workflow/real_homes/house023.xml +632 -629
  175. data/example_files/resources/hpxml-measures/workflow/real_homes/house024.xml +731 -729
  176. data/example_files/resources/hpxml-measures/workflow/real_homes/house025.xml +672 -669
  177. data/example_files/resources/hpxml-measures/workflow/real_homes/house026.xml +667 -644
  178. data/example_files/resources/hpxml-measures/workflow/real_homes/house027.xml +646 -644
  179. data/example_files/resources/hpxml-measures/workflow/real_homes/house028.xml +690 -688
  180. data/example_files/resources/hpxml-measures/workflow/real_homes/house029.xml +701 -699
  181. data/example_files/resources/hpxml-measures/workflow/real_homes/house030.xml +637 -615
  182. data/example_files/resources/hpxml-measures/workflow/real_homes/house031.xml +690 -688
  183. data/example_files/resources/hpxml-measures/workflow/real_homes/house032.xml +557 -554
  184. data/example_files/resources/hpxml-measures/workflow/real_homes/house033.xml +534 -531
  185. data/example_files/resources/hpxml-measures/workflow/real_homes/house034.xml +636 -635
  186. data/example_files/resources/hpxml-measures/workflow/real_homes/house035.xml +616 -613
  187. data/example_files/resources/hpxml-measures/workflow/real_homes/house036.xml +601 -598
  188. data/example_files/resources/hpxml-measures/workflow/real_homes/house037.xml +581 -578
  189. data/example_files/resources/hpxml-measures/workflow/real_homes/house038.xml +624 -622
  190. data/example_files/resources/hpxml-measures/workflow/real_homes/house039.xml +584 -582
  191. data/example_files/resources/hpxml-measures/workflow/real_homes/house040.xml +631 -629
  192. data/example_files/resources/hpxml-measures/workflow/real_homes/house041.xml +922 -921
  193. data/example_files/resources/hpxml-measures/workflow/real_homes/house042.xml +855 -853
  194. data/example_files/resources/hpxml-measures/workflow/real_homes/house043.xml +739 -737
  195. data/example_files/resources/hpxml-measures/workflow/real_homes/house044.xml +798 -796
  196. data/example_files/resources/hpxml-measures/workflow/real_homes/house045.xml +696 -694
  197. data/example_files/resources/hpxml-measures/workflow/real_homes/house046.xml +487 -483
  198. data/example_files/resources/hpxml-measures/workflow/real_homes/house047.xml +443 -440
  199. data/example_files/resources/hpxml-measures/workflow/real_homes/house048.xml +688 -686
  200. data/example_files/resources/hpxml-measures/workflow/real_homes/house049.xml +722 -720
  201. data/example_files/resources/hpxml-measures/workflow/real_homes/house050.xml +619 -617
  202. data/example_files/resources/hpxml-measures/workflow/run_simulation.rb +13 -20
  203. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-coal.xml +9 -9
  204. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier-ief-portable.xml +11 -12
  205. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier-ief-whole-home.xml +11 -12
  206. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier-multiple.xml +12 -13
  207. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier.xml +11 -12
  208. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-gas.xml +9 -9
  209. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-modified.xml +9 -9
  210. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-none.xml +4 -4
  211. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-oil.xml +9 -9
  212. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-propane.xml +9 -9
  213. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-wood.xml +9 -9
  214. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-cathedral.xml +11 -11
  215. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-conditioned.xml +10 -10
  216. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-flat.xml +9 -9
  217. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-radiant-barrier.xml +10 -11
  218. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-unvented-insulated-roof.xml +9 -9
  219. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-vented.xml +8 -8
  220. data/example_files/resources/hpxml-measures/workflow/sample_files/base-battery-scheduled.xml +571 -569
  221. data/example_files/resources/hpxml-measures/workflow/sample_files/base-battery.xml +9 -9
  222. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-multifamily-buffer-space.xml → base-bldgtype-mf-unit-adjacent-to-multifamily-buffer-space.xml} +5 -5
  223. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-multiple.xml → base-bldgtype-mf-unit-adjacent-to-multiple.xml} +17 -17
  224. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-non-freezing-space.xml → base-bldgtype-mf-unit-adjacent-to-non-freezing-space.xml} +5 -5
  225. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-other-heated-space.xml → base-bldgtype-mf-unit-adjacent-to-other-heated-space.xml} +5 -5
  226. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-other-housing-unit.xml → base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml} +5 -5
  227. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-infil-compartmentalization-test.xml → base-bldgtype-mf-unit-infil-compartmentalization-test.xml} +461 -461
  228. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-residents-1.xml → base-bldgtype-mf-unit-residents-1.xml} +453 -453
  229. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-chiller-baseboard.xml → base-bldgtype-mf-unit-shared-boiler-chiller-baseboard.xml} +11 -11
  230. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-chiller-fan-coil-ducted.xml → base-bldgtype-mf-unit-shared-boiler-chiller-fan-coil-ducted.xml} +11 -11
  231. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-chiller-fan-coil.xml → base-bldgtype-mf-unit-shared-boiler-chiller-fan-coil.xml} +11 -11
  232. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-chiller-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-boiler-chiller-water-loop-heat-pump.xml} +11 -11
  233. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-cooling-tower-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-boiler-cooling-tower-water-loop-heat-pump.xml} +11 -11
  234. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-baseboard.xml → base-bldgtype-mf-unit-shared-boiler-only-baseboard.xml} +11 -11
  235. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-fan-coil-ducted.xml → base-bldgtype-mf-unit-shared-boiler-only-fan-coil-ducted.xml} +11 -11
  236. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-fan-coil-eae.xml → base-bldgtype-mf-unit-shared-boiler-only-fan-coil-eae.xml} +11 -11
  237. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-mf-unit-shared-boiler-only-fan-coil-fireplace-elec.xml +433 -0
  238. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-fan-coil.xml → base-bldgtype-mf-unit-shared-boiler-only-fan-coil.xml} +11 -11
  239. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-boiler-only-water-loop-heat-pump.xml} +11 -11
  240. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-chiller-only-baseboard.xml → base-bldgtype-mf-unit-shared-chiller-only-baseboard.xml} +11 -11
  241. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-chiller-only-fan-coil-ducted.xml → base-bldgtype-mf-unit-shared-chiller-only-fan-coil-ducted.xml} +11 -11
  242. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-chiller-only-fan-coil.xml → base-bldgtype-mf-unit-shared-chiller-only-fan-coil.xml} +11 -11
  243. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-chiller-only-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-chiller-only-water-loop-heat-pump.xml} +11 -11
  244. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-cooling-tower-only-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-cooling-tower-only-water-loop-heat-pump.xml} +11 -11
  245. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-generator.xml → base-bldgtype-mf-unit-shared-generator.xml} +13 -13
  246. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-ground-loop-ground-to-air-heat-pump.xml → base-bldgtype-mf-unit-shared-ground-loop-ground-to-air-heat-pump.xml} +13 -13
  247. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-laundry-room-multiple-water-heaters.xml → base-bldgtype-mf-unit-shared-laundry-room-multiple-water-heaters.xml} +480 -480
  248. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-laundry-room.xml → base-bldgtype-mf-unit-shared-laundry-room.xml} +10 -10
  249. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-mechvent-multiple.xml → base-bldgtype-mf-unit-shared-mechvent-multiple.xml} +15 -15
  250. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-mechvent-preconditioning.xml → base-bldgtype-mf-unit-shared-mechvent-preconditioning.xml} +13 -13
  251. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-mechvent.xml → base-bldgtype-mf-unit-shared-mechvent.xml} +13 -13
  252. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-pv.xml → base-bldgtype-mf-unit-shared-pv.xml} +13 -13
  253. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-water-heater-recirc.xml → base-bldgtype-mf-unit-shared-water-heater-recirc.xml} +13 -13
  254. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-water-heater.xml → base-bldgtype-mf-unit-shared-water-heater.xml} +13 -13
  255. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily.xml → base-bldgtype-mf-unit.xml} +13 -13
  256. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-attached-2stories.xml → base-bldgtype-sfa-unit-2stories.xml} +610 -610
  257. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-attached-atticroof-cathedral.xml → base-bldgtype-sfa-unit-atticroof-cathedral.xml} +558 -558
  258. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-attached-infil-compartmentalization-test.xml → base-bldgtype-sfa-unit-infil-compartmentalization-test.xml} +610 -610
  259. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-attached.xml → base-bldgtype-sfa-unit.xml} +610 -610
  260. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-combi-tankless-outside.xml +8 -8
  261. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-combi-tankless.xml +9 -9
  262. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-2-speed.xml +9 -9
  263. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-gshp.xml +9 -9
  264. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-hpwh.xml +9 -9
  265. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-tankless.xml +9 -9
  266. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-var-speed.xml +9 -9
  267. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater.xml +9 -9
  268. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-dwhr.xml +9 -9
  269. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-detailed-setpoints.xml +507 -505
  270. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-dse.xml +9 -9
  271. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-outside.xml +8 -8
  272. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-standbyloss.xml +9 -9
  273. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-with-solar-fraction.xml +9 -9
  274. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect.xml +9 -9
  275. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-electric.xml +9 -9
  276. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-gas.xml +9 -9
  277. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-hpwh.xml +9 -9
  278. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-indirect.xml +9 -9
  279. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-low-flow-fixtures.xml +12 -10
  280. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-multiple.xml +14 -14
  281. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-none.xml +5 -5
  282. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-demand.xml +9 -9
  283. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-manual.xml +9 -9
  284. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-nocontrol.xml +9 -9
  285. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-temperature.xml +9 -9
  286. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-timer.xml +9 -9
  287. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-evacuated-tube.xml +9 -9
  288. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-flat-plate.xml +9 -9
  289. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-ics.xml +9 -9
  290. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-fraction.xml +9 -9
  291. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-indirect-flat-plate.xml +9 -9
  292. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-thermosyphon-flat-plate.xml +9 -9
  293. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-coal.xml +9 -9
  294. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-detailed-setpoints.xml +12 -10
  295. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-elec-uef.xml +9 -9
  296. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas-outside.xml +8 -8
  297. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas-uef-fhr.xml +9 -9
  298. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas-uef.xml +9 -9
  299. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas.xml +9 -9
  300. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-detailed-schedules.xml +13 -11
  301. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-operating-mode-heat-pump-only.xml +9 -9
  302. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-outside.xml +8 -8
  303. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-uef.xml +9 -9
  304. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-with-solar-fraction.xml +9 -9
  305. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-with-solar.xml +9 -9
  306. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump.xml +9 -9
  307. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-model-type-stratified-detailed-occupancy-stochastic.xml +12 -10
  308. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-model-type-stratified.xml +9 -9
  309. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-oil.xml +9 -9
  310. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-wood.xml +9 -9
  311. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-detailed-setpoints.xml +12 -10
  312. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric-outside.xml +8 -8
  313. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric-uef.xml +9 -9
  314. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric.xml +9 -9
  315. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-uef.xml +9 -9
  316. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-with-solar-fraction.xml +9 -9
  317. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-with-solar.xml +9 -9
  318. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas.xml +9 -9
  319. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-propane.xml +9 -9
  320. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-2stories-garage.xml +13 -14
  321. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-2stories.xml +11 -11
  322. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-1.xml +9 -9
  323. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-2.xml +9 -9
  324. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-4.xml +9 -9
  325. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-5.xml +9 -9
  326. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-ceilingtypes.xml +576 -576
  327. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-floortypes.xml +519 -519
  328. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-garage.xml +4 -5
  329. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-ach-house-pressure.xml +9 -9
  330. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-cfm-house-pressure.xml +9 -9
  331. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-cfm50.xml +9 -9
  332. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-ela.xml +548 -548
  333. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-flue.xml +9 -9
  334. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-natural-ach.xml +9 -9
  335. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-natural-cfm.xml +551 -551
  336. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-orientations.xml +9 -9
  337. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-overhangs.xml +9 -9
  338. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-rooftypes.xml +9 -9
  339. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights-physical-properties.xml +9 -9
  340. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights-shading.xml +9 -9
  341. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights-storms.xml +9 -9
  342. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights.xml +9 -9
  343. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-split-level.xml +10 -11
  344. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-thermal-mass.xml +9 -9
  345. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-walltypes.xml +19 -19
  346. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-natural-ventilation-availability.xml +555 -553
  347. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-none.xml +9 -9
  348. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-physical-properties.xml +9 -9
  349. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-shading-seasons.xml +560 -558
  350. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-shading.xml +9 -9
  351. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-storms.xml +9 -9
  352. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-ambient.xml +10 -10
  353. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-basement-garage.xml +10 -11
  354. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-belly-wing-no-skirt.xml +496 -0
  355. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-belly-wing-skirt.xml +496 -0
  356. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-complex.xml +18 -18
  357. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-schedules-simple-power-outage-natvent-unavailable.xml → base-foundation-conditioned-basement-slab-insulation-full.xml} +552 -564
  358. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-conditioned-basement-slab-insulation.xml +9 -9
  359. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-conditioned-basement-wall-insulation.xml +555 -555
  360. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-conditioned-crawlspace.xml +8 -8
  361. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-multiple.xml +5 -5
  362. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-slab.xml +10 -11
  363. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-above-grade.xml +4 -4
  364. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-assembly-r.xml +4 -4
  365. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-wall-insulation.xml +4 -4
  366. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement.xml +4 -4
  367. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unvented-crawlspace.xml +9 -9
  368. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-vented-crawlspace-above-grade.xml +558 -0
  369. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-vented-crawlspace.xml +9 -9
  370. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-walkout-basement.xml +15 -15
  371. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-cooling-only.xml +9 -9
  372. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-heating-capacity-17f.xml +552 -552
  373. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-heating-only.xml +9 -9
  374. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures.xml +562 -562
  375. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-seer2-hspf2.xml +557 -557
  376. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed.xml +9 -9
  377. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-2-speed.xml +9 -9
  378. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed-backup-boiler-hvac-seasons.xml +586 -586
  379. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed-backup-boiler-switchover-temperature.xml +9 -9
  380. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed-backup-boiler.xml +9 -9
  381. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed-backup-furnace.xml +9 -9
  382. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-air-to-air-heat-pump-var-speed-sizing-methodology-acca.xml → base-hvac-air-to-air-heat-pump-var-speed-detailed-performance-other-temperatures.xml} +89 -13
  383. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-air-to-air-heat-pump-var-speed-sizing-methodology-hers.xml → base-hvac-air-to-air-heat-pump-var-speed-detailed-performance.xml} +107 -13
  384. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed.xml +9 -9
  385. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-sizing-controls.xml +567 -565
  386. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize.xml +9 -9
  387. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-coal-only.xml +9 -9
  388. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-elec-only.xml +9 -9
  389. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-gas-central-ac-1-speed.xml +9 -9
  390. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-gas-only-pilot.xml +512 -512
  391. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-gas-only.xml +9 -9
  392. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-oil-only.xml +9 -9
  393. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-propane-only.xml +9 -9
  394. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-wood-only.xml +9 -9
  395. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-1-speed-seer2.xml +536 -536
  396. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-1-speed.xml +9 -9
  397. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-2-speed.xml +9 -9
  398. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-central-ac-only-var-speed.xml → base-hvac-central-ac-only-var-speed-detailed-performance.xml} +49 -10
  399. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-var-speed.xml +9 -9
  400. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-plus-air-to-air-heat-pump-heating.xml +9 -9
  401. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dse.xml +9 -9
  402. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed-lockout-temperatures.xml +559 -559
  403. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed.xml +9 -9
  404. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-2-speed.xml +9 -9
  405. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-var-speed.xml +9 -9
  406. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-mini-split-heat-pump-ducted.xml +9 -9
  407. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-area-fractions.xml +11 -12
  408. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-area-multipliers.xml +558 -558
  409. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-buried.xml +554 -554
  410. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-furnace-gas-room-ac.xml → base-hvac-ducts-defaults.xml} +28 -14
  411. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-effective-rvalue.xml +552 -552
  412. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-leakage-cfm50.xml +9 -9
  413. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-leakage-percent.xml +9 -9
  414. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-elec-resistance-only.xml +9 -9
  415. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-furnace-gas.xml +9 -9
  416. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-only-ducted.xml +9 -9
  417. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-only.xml +9 -9
  418. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-fireplace-wood-only.xml +9 -9
  419. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-floor-furnace-propane-only.xml +15 -10
  420. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-coal-only.xml +9 -9
  421. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-elec-central-ac-1-speed.xml +9 -9
  422. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-elec-only.xml +9 -9
  423. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-central-ac-2-speed.xml +9 -9
  424. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-central-ac-var-speed.xml +9 -9
  425. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-only-detailed-setpoints.xml +12 -10
  426. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-only-pilot.xml +541 -541
  427. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-only.xml +9 -9
  428. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-room-ac.xml +9 -9
  429. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-oil-only.xml +9 -9
  430. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-propane-only.xml +9 -9
  431. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-wood-only.xml +9 -9
  432. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-x3-dse.xml +9 -9
  433. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ground-to-air-heat-pump-cooling-only.xml +9 -9
  434. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ground-to-air-heat-pump-heating-only.xml +9 -9
  435. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ground-to-air-heat-pump.xml +9 -9
  436. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-air-to-air-heat-pump-1-speed.xml +9 -9
  437. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-air-to-air-heat-pump-2-speed.xml +9 -9
  438. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-air-to-air-heat-pump-1-speed-autosized-backup.xml → base-hvac-install-quality-air-to-air-heat-pump-var-speed-detailed-performance.xml} +650 -556
  439. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-air-to-air-heat-pump-var-speed.xml +9 -9
  440. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-furnace-gas-central-ac-1-speed.xml +9 -9
  441. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-furnace-gas-central-ac-2-speed.xml +9 -9
  442. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-furnace-gas-central-ac-var-speed.xml +9 -9
  443. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-furnace-gas-only.xml +9 -9
  444. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-ground-to-air-heat-pump.xml +9 -9
  445. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-mini-split-air-conditioner-only-ducted.xml +9 -9
  446. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-mini-split-heat-pump-ducted.xml +9 -9
  447. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-air-conditioner-only-ducted.xml +9 -9
  448. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-mini-split-air-conditioner-only-ducted.xml → base-hvac-mini-split-air-conditioner-only-ductless-detailed-performance.xml} +50 -49
  449. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-air-conditioner-only-ductless.xml +9 -9
  450. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted-cooling-only.xml +9 -9
  451. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-mini-split-heat-pump-ducted-sizing-methodology-maxload.xml → base-hvac-mini-split-heat-pump-ducted-detailed-performance.xml} +109 -14
  452. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted-heating-only.xml +9 -9
  453. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted.xml +9 -9
  454. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless-backup-baseboard.xml +524 -524
  455. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-dual-fuel-mini-split-heat-pump-ducted-backup-hardsized.xml → base-hvac-mini-split-heat-pump-ductless-backup-furnace-ducts-defaults.xml} +560 -552
  456. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless-backup-furnace.xml +563 -563
  457. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless-backup-stove.xml +9 -9
  458. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-dual-fuel-mini-split-heat-pump-ducted.xml → base-hvac-mini-split-heat-pump-ductless-detailed-performance.xml} +108 -60
  459. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless-heating-capacity-17f.xml +505 -505
  460. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless.xml +9 -9
  461. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-multiple.xml +9 -9
  462. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-none.xml +10 -11
  463. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ptac-with-heating-electricity.xml +9 -9
  464. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ptac-with-heating-natural-gas.xml +504 -504
  465. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ptac.xml +9 -9
  466. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-pthp-heating-capacity-17f.xml +512 -512
  467. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-pthp.xml +9 -9
  468. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only-33percent.xml +9 -9
  469. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only-ceer.xml +9 -9
  470. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only-detailed-setpoints.xml +12 -10
  471. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only.xml +9 -9
  472. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-with-heating.xml +504 -504
  473. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-with-reverse-cycle.xml +517 -517
  474. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-seasons.xml +9 -9
  475. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-setpoints-daily-schedules.xml +9 -9
  476. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-setpoints-daily-setbacks.xml +9 -9
  477. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-setpoints.xml +9 -9
  478. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-fixed-heater-gas-only.xml → base-hvac-space-heater-gas-only.xml} +10 -10
  479. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-stove-oil-only.xml +9 -9
  480. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-stove-wood-pellets-only.xml +9 -9
  481. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-undersized.xml +9 -9
  482. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-wall-furnace-elec-only.xml +9 -9
  483. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-ceiling-fans.xml +9 -9
  484. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-holiday.xml +9 -9
  485. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-kwh-per-year.xml +531 -528
  486. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-mixed.xml +536 -536
  487. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-none-ceiling-fans.xml +515 -515
  488. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-none.xml +9 -9
  489. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-AMY-2012.xml +9 -9
  490. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-baltimore-md.xml +9 -9
  491. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-capetown-zaf.xml +9 -9
  492. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-dallas-tx.xml +10 -11
  493. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-duluth-mn.xml +4 -4
  494. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-helena-mt.xml +9 -9
  495. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-honolulu-hi.xml +10 -11
  496. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-miami-fl.xml +10 -11
  497. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-phoenix-az.xml +10 -11
  498. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-portland-or.xml +9 -9
  499. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-balanced.xml +9 -9
  500. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-bath-kitchen-fans.xml +9 -9
  501. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-airflow-fraction-zero.xml +9 -9
  502. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-dse.xml +9 -9
  503. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-evap-cooler-only-ducted.xml +9 -9
  504. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-supplemental-fan-exhaust.xml +576 -576
  505. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-supplemental-fan-supply.xml +576 -576
  506. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis.xml +9 -9
  507. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-erv-atre-asre.xml +9 -9
  508. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-erv.xml +9 -9
  509. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-exhaust-rated-flow-rate.xml +9 -9
  510. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-exhaust.xml +9 -9
  511. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-hrv-asre.xml +9 -9
  512. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-hrv.xml +9 -9
  513. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-multiple.xml +9 -9
  514. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-supply.xml +9 -9
  515. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-whole-house-fan.xml +9 -9
  516. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-additional-properties.xml +21 -19
  517. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills-pv-detailed-only.xml +605 -605
  518. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills-pv-mixed.xml +587 -587
  519. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills-pv.xml +9 -9
  520. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills.xml +9 -9
  521. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-defaults.xml +3 -3
  522. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-emissions.xml +9 -9
  523. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-generators-battery-scheduled.xml +587 -585
  524. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-generators-battery.xml +584 -584
  525. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-generators.xml +9 -9
  526. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-ground-conductivity.xml +555 -555
  527. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-large-uncommon.xml +26 -26
  528. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-large-uncommon2.xml +26 -26
  529. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-none.xml +9 -9
  530. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-neighbor-shading-bldgtype-multifamily.xml +508 -508
  531. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-neighbor-shading.xml +9 -9
  532. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-shielding-of-home.xml +9 -9
  533. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-schedules-simple-power-outage-natvent-available.xml → base-misc-unit-multiplier.xml} +553 -564
  534. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-usage-multiplier.xml +26 -26
  535. data/example_files/resources/hpxml-measures/workflow/sample_files/base-multiple-mf-units.xml +2755 -0
  536. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-multiple-buildings.xml → base-multiple-sfd-buildings.xml} +31 -22
  537. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery-ah.xml +9 -9
  538. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery-garage.xml +4 -5
  539. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery-round-trip-efficiency.xml +597 -597
  540. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery-scheduled.xml +599 -597
  541. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery.xml +9 -9
  542. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-generators-battery-scheduled.xml +615 -613
  543. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-generators-battery.xml +612 -612
  544. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-generators.xml +596 -596
  545. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv.xml +9 -9
  546. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-0-runperiod-1-month.xml +559 -559
  547. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-0.xml +555 -555
  548. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-1-misc-loads-large-uncommon.xml +616 -616
  549. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-1-misc-loads-large-uncommon2.xml +616 -616
  550. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-1.xml +547 -547
  551. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-5.xml +515 -515
  552. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-all-10-mins.xml +14 -12
  553. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-crankcase-heater-40w.xml → base-schedules-detailed-mixed-timesteps-power-outage.xml} +565 -555
  554. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-schedules-detailed-occupancy-stochastic-vacancy-year-round.xml → base-schedules-detailed-mixed-timesteps.xml} +554 -563
  555. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-occupancy-stochastic-10-mins.xml +12 -10
  556. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-occupancy-stochastic-power-outage.xml +566 -564
  557. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-occupancy-stochastic-vacancy.xml +12 -10
  558. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-occupancy-stochastic.xml +12 -10
  559. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-setpoints-daily-schedules.xml +12 -10
  560. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-setpoints-daily-setbacks.xml +12 -10
  561. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-setpoints.xml +12 -10
  562. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-simple-power-outage.xml +619 -619
  563. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-simple-vacancy.xml +618 -618
  564. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-simple.xml +9 -9
  565. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-calendar-year-custom.xml +9 -9
  566. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-daylight-saving-custom.xml +9 -9
  567. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-daylight-saving-disabled.xml +9 -9
  568. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-runperiod-1-month.xml +9 -9
  569. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-temperature-capacitance-multiplier.xml +553 -553
  570. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-10-mins-occupancy-stochastic-10-mins.xml +12 -10
  571. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-10-mins-occupancy-stochastic-60-mins.xml +12 -10
  572. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-10-mins.xml +9 -9
  573. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-30-mins.xml +552 -552
  574. data/example_files/resources/hpxml-measures/workflow/sample_files/base.xml +9 -9
  575. data/example_files/resources/hpxml-measures/workflow/template-build-and-run-hpxml-with-stochastic-occupancy.osw +2 -0
  576. data/example_files/resources/hpxml-measures/workflow/template-run-hpxml-with-stochastic-occupancy-subset.osw +2 -0
  577. data/example_files/resources/hpxml-measures/workflow/template-run-hpxml-with-stochastic-occupancy.osw +2 -0
  578. data/example_files/resources/hpxml-measures/workflow/template-run-hpxml.osw +4 -1
  579. data/example_files/resources/hpxml-measures/workflow/tests/ACCA_Examples/Long_Residence.xml +385 -385
  580. data/example_files/resources/hpxml-measures/workflow/tests/ACCA_Examples/Vatilo_Residence.xml +378 -380
  581. data/example_files/resources/hpxml-measures/workflow/tests/ACCA_Examples/Victor_Residence.xml +369 -369
  582. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L100AC.xml +7 -7
  583. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L100AL.xml +7 -7
  584. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L110AC.xml +7 -7
  585. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L110AL.xml +7 -7
  586. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L120AC.xml +7 -7
  587. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L120AL.xml +7 -7
  588. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L130AC.xml +7 -7
  589. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L130AL.xml +7 -7
  590. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L140AC.xml +7 -7
  591. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L140AL.xml +7 -7
  592. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L150AC.xml +7 -7
  593. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L150AL.xml +7 -7
  594. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L155AC.xml +7 -7
  595. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L155AL.xml +7 -7
  596. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L160AC.xml +7 -7
  597. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L160AL.xml +7 -7
  598. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L170AC.xml +7 -7
  599. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L170AL.xml +7 -7
  600. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L200AC.xml +7 -7
  601. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L200AL.xml +7 -7
  602. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L202AC.xml +7 -7
  603. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L202AL.xml +7 -7
  604. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L302XC.xml +7 -8
  605. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L304XC.xml +7 -8
  606. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L322XC.xml +6 -6
  607. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L324XC.xml +6 -6
  608. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_sizing.csv +363 -0
  609. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_workflow_simulations1.csv +281 -0
  610. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_workflow_simulations1_bills.csv +281 -0
  611. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_workflow_simulations2.csv +141 -0
  612. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_workflow_simulations2_bills.csv +141 -0
  613. data/example_files/resources/hpxml-measures/workflow/tests/compare.py +12 -6
  614. data/example_files/resources/hpxml-measures/workflow/tests/util.rb +1141 -0
  615. data/example_files/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
  616. data/example_files/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
  617. data/example_files/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
  618. data/example_files/weather/USA_FL_MacDill.AFB.747880_TMY3.ddy +536 -0
  619. data/example_files/weather/USA_FL_MacDill.AFB.747880_TMY3.epw +8768 -0
  620. data/example_files/weather/USA_FL_MacDill.AFB.747880_TMY3.stat +553 -0
  621. data/example_files/weather/USA_GA_Atlanta-Hartsfield-Jackson.Intl.AP.722190_TMY3-cache.csv +35 -0
  622. data/example_files/weather/USA_GA_Atlanta-Hartsfield-Jackson.Intl.AP.722190_TMY3.ddy +536 -0
  623. data/example_files/weather/USA_GA_Atlanta-Hartsfield-Jackson.Intl.AP.722190_TMY3.epw +8768 -0
  624. data/example_files/weather/USA_GA_Atlanta-Hartsfield-Jackson.Intl.AP.722190_TMY3.stat +553 -0
  625. data/example_files/weather/USA_NY_Buffalo-Greater.Buffalo.Intl.AP.725280_TMY3-cache.csv +35 -0
  626. data/example_files/xml_building/17/README.md +4 -2
  627. data/example_files/xml_building/17/feature.xml +2112 -0
  628. data/lib/uo_cli/version.rb +1 -1
  629. data/lib/uo_cli.rb +122 -22
  630. data/uo_cli.gemspec +6 -8
  631. metadata +130 -177
  632. data/Jenkinsfile +0 -10
  633. data/example_files/base_workflow_res.osw +0 -276
  634. data/example_files/resources/hpxml-measures/ReportUtilityBills/tests/utility_bills_test.rb +0 -1226
  635. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-oil-location-miami-fl.xml +0 -551
  636. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-propane-location-portland-or.xml +0 -551
  637. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-cooling-only.xml +0 -544
  638. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-heating-only.xml +0 -550
  639. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-sizing-methodology-acca.xml +0 -552
  640. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-sizing-methodology-hers.xml +0 -552
  641. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-sizing-methodology-maxload-miami-fl.xml +0 -552
  642. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-sizing-methodology-maxload.xml +0 -552
  643. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-2-speed-sizing-methodology-acca.xml +0 -552
  644. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-2-speed-sizing-methodology-hers.xml +0 -552
  645. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-2-speed-sizing-methodology-maxload.xml +0 -552
  646. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-var-speed-backup-boiler.xml +0 -569
  647. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-var-speed-backup-furnace.xml +0 -599
  648. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-var-speed-sizing-methodology-maxload.xml +0 -552
  649. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-boiler-elec-only.xml +0 -506
  650. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-boiler-gas-central-ac-1-speed.xml +0 -560
  651. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-boiler-gas-only.xml +0 -507
  652. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-central-ac-only-1-speed.xml +0 -536
  653. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-central-ac-only-2-speed.xml +0 -536
  654. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-central-ac-plus-air-to-air-heat-pump-heating.xml +0 -565
  655. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-dual-fuel-air-to-air-heat-pump-1-speed-sizing-methodology-acca.xml +0 -553
  656. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-dual-fuel-air-to-air-heat-pump-1-speed-sizing-methodology-hers.xml +0 -553
  657. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-dual-fuel-air-to-air-heat-pump-1-speed-sizing-methodology-maxload.xml +0 -553
  658. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-elec-resistance-only.xml +0 -497
  659. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-evap-cooler-furnace-gas.xml +0 -544
  660. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-floor-furnace-propane-only.xml +0 -500
  661. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-furnace-elec-only.xml +0 -536
  662. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-furnace-gas-central-ac-2-speed.xml +0 -551
  663. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-furnace-gas-central-ac-var-speed.xml +0 -551
  664. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-furnace-gas-only.xml +0 -536
  665. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-cooling-only.xml +0 -546
  666. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-heating-only.xml +0 -552
  667. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-sizing-methodology-acca.xml +0 -554
  668. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-sizing-methodology-hers.xml +0 -554
  669. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-sizing-methodology-maxload.xml +0 -554
  670. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ducted-cooling-only.xml +0 -543
  671. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ducted-heating-only.xml +0 -549
  672. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ducted-sizing-methodology-acca.xml +0 -551
  673. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ducted-sizing-methodology-hers.xml +0 -551
  674. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ductless-backup-baseboard.xml +0 -519
  675. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ductless-backup-stove.xml +0 -522
  676. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ptac-with-heating.xml +0 -503
  677. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ptac.xml +0 -496
  678. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-pthp-sizing-methodology-acca.xml +0 -518
  679. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-pthp-sizing-methodology-hers.xml +0 -518
  680. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-pthp-sizing-methodology-maxload.xml +0 -518
  681. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-only.xml +0 -496
  682. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-with-heating.xml +0 -503
  683. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-with-reverse-cycle-sizing-methodology-acca.xml +0 -518
  684. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-with-reverse-cycle-sizing-methodology-hers.xml +0 -518
  685. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-with-reverse-cycle-sizing-methodology-maxload.xml +0 -518
  686. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-stove-oil-only.xml +0 -500
  687. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-wall-furnace-elec-only.xml +0 -500
  688. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-floor-furnace-propane-only-pilot-light.xml +0 -506
  689. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-portable-heater-gas-only.xml +0 -501
  690. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-undersized-allow-increased-fixed-capacities.xml +0 -556
  691. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills-none.xml +0 -548
  692. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-simple-vacancy-year-round.xml +0 -619
  693. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results.csv +0 -475
  694. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_bills.csv +0 -475
  695. data/example_files/resources/hpxml-measures/workflow/tests/hpxml_translator_test.rb +0 -1313
  696. data/example_files/resources/measure-info.json +0 -26
  697. data/example_files/resources/meta_measure.rb +0 -301
  698. data/example_files/xml_building/17/unit 1.xml +0 -580
  699. data/example_files/xml_building/17/unit 2.xml +0 -553
  700. data/example_files/xml_building/17/unit 3.xml +0 -553
  701. data/example_files/xml_building/17/unit 4.xml +0 -580
  702. /data/example_files/{residential → mappers/residential/template/iecc}/clothes_dryer.tsv +0 -0
  703. /data/example_files/{residential → mappers/residential/template/iecc}/clothes_washer.tsv +0 -0
  704. /data/example_files/{residential → mappers/residential/template/iecc}/cooling_system.tsv +0 -0
  705. /data/example_files/{residential → mappers/residential/template/iecc}/dishwasher.tsv +0 -0
  706. /data/example_files/{residential → mappers/residential/template/iecc}/enclosure.tsv +0 -0
  707. /data/example_files/{residential → mappers/residential/template/iecc}/heat_pump.tsv +0 -0
  708. /data/example_files/{residential → mappers/residential/template/iecc}/heating_system.tsv +0 -0
  709. /data/example_files/{residential → mappers/residential/template/iecc}/mechanical_ventilation.tsv +0 -0
  710. /data/example_files/{residential → mappers/residential/template/iecc}/refrigerator.tsv +0 -0
  711. /data/example_files/{residential → mappers/residential/template/iecc}/water_heater.tsv +0 -0
  712. /data/example_files/resources/hpxml-measures/ReportUtilityBills/tests/{JacksonElectricMemberCorp-ResidentialSeniorCitizenLowIncomeAssistance.json → Detailed Rate.json} +0 -0
@@ -49,69 +49,69 @@ def create_hpxmls
49
49
  measures = {}
50
50
  measures['BuildResidentialHPXML'] = [json_input]
51
51
 
52
- # Re-generate stochastic schedule CSV?
53
- csv_path = json_input['schedules_filepaths'].to_s.split(',').map(&:strip).find { |fp| fp.include? 'occupancy-stochastic' }
54
- if (not csv_path.nil?) && (not schedules_regenerated.include? csv_path)
55
- sch_args = { 'hpxml_path' => hpxml_path,
56
- 'output_csv_path' => csv_path,
57
- 'hpxml_output_path' => hpxml_path }
58
- measures['BuildResidentialScheduleFile'] = [sch_args]
59
- schedules_regenerated << csv_path
60
- end
61
-
62
52
  measures_dir = File.dirname(__FILE__)
63
53
  model = OpenStudio::Model::Model.new
64
54
  runner = OpenStudio::Measure::OSRunner.new(OpenStudio::WorkflowJSON.new)
65
55
 
66
- # Apply measure
67
- success = apply_measures(measures_dir, measures, runner, model)
68
-
69
- # Report errors
70
- runner.result.stepErrors.each do |s|
71
- puts "Error: #{s}"
56
+ num_apply_measures = 1
57
+ if hpxml_path.include?('base-multiple-sfd-buildings')
58
+ num_apply_measures = 3
59
+ elsif hpxml_path.include?('base-multiple-mf-units')
60
+ num_apply_measures = 6
72
61
  end
73
62
 
74
- if not success
75
- puts "\nError: Did not successfully generate #{hpxml_file}."
76
- exit!
63
+ for i in 1..num_apply_measures
64
+ measures['BuildResidentialHPXML'][0]['existing_hpxml_path'] = hpxml_path if i > 1
65
+ if hpxml_path.include?('base-multiple-sfd-buildings') || hpxml_path.include?('base-multiple-mf-units')
66
+ suffix = "_#{i}" if i > 1
67
+ measures['BuildResidentialHPXML'][0]['schedules_filepaths'] = "../../HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic#{suffix}.csv"
68
+ end
69
+ if hpxml_path.include?('base-multiple-mf-units')
70
+ measures['BuildResidentialHPXML'][0]['geometry_foundation_type'] = (i <= 2 ? 'UnconditionedBasement' : 'AboveApartment')
71
+ measures['BuildResidentialHPXML'][0]['geometry_attic_type'] = (i >= 5 ? 'VentedAttic' : 'BelowApartment')
72
+ end
73
+
74
+ # Re-generate stochastic schedule CSV?
75
+ csv_path = json_input['schedules_filepaths'].to_s.split(',').map(&:strip).find { |fp| fp.include? 'occupancy-stochastic' }
76
+ if (not csv_path.nil?) && (not schedules_regenerated.include? csv_path)
77
+ sch_args = { 'hpxml_path' => hpxml_path,
78
+ 'output_csv_path' => csv_path,
79
+ 'hpxml_output_path' => hpxml_path,
80
+ 'building_id' => "MyBuilding#{suffix}" }
81
+ measures['BuildResidentialScheduleFile'] = [sch_args]
82
+ schedules_regenerated << csv_path
83
+ end
84
+
85
+ # Apply measure
86
+ success = apply_measures(measures_dir, measures, runner, model)
87
+
88
+ # Report errors
89
+ runner.result.stepErrors.each do |s|
90
+ puts "Error: #{s}"
91
+ end
92
+
93
+ if not success
94
+ puts "\nError: Did not successfully generate #{hpxml_filename}."
95
+ exit!
96
+ end
77
97
  end
78
98
 
79
- hpxml = HPXML.new(hpxml_path: hpxml_path)
99
+ hpxml = HPXML.new(hpxml_path: hpxml_path, building_id: 'ALL')
80
100
  if hpxml_path.include? 'ASHRAE_Standard_140'
81
101
  apply_hpxml_modification_ashrae_140(hpxml)
82
102
  else
83
103
  apply_hpxml_modification(File.basename(hpxml_path), hpxml)
84
104
  end
85
- hpxml_doc = hpxml.to_oga()
86
-
87
- if hpxml_path.include? 'base-multiple-buildings.xml'
88
- # HPXML class doesn't support multiple buildings, so we'll stitch together manually.
89
- hpxml_element = XMLHelper.get_element(hpxml_doc, '/HPXML')
90
- building_element = XMLHelper.get_element(hpxml_element, 'Building')
91
- for i in 2..3
92
- new_building_element = Marshal.load(Marshal.dump(building_element)) # Deep copy
93
-
94
- # Make all IDs unique so the HPXML is valid
95
- new_building_element.each_node do |node|
96
- next unless node.is_a?(Oga::XML::Element)
97
-
98
- if not XMLHelper.get_attribute_value(node, 'id').nil?
99
- XMLHelper.add_attribute(node, 'id', "#{XMLHelper.get_attribute_value(node, 'id')}_#{i}")
100
- elsif not XMLHelper.get_attribute_value(node, 'idref').nil?
101
- XMLHelper.add_attribute(node, 'idref', "#{XMLHelper.get_attribute_value(node, 'idref')}_#{i}")
102
- end
103
- end
104
-
105
- hpxml_element.children << new_building_element
106
- end
107
- end
105
+ hpxml_doc = hpxml.to_doc()
108
106
 
109
107
  XMLHelper.write_file(hpxml_doc, hpxml_path)
110
108
 
111
109
  errors, _warnings = XMLValidator.validate_against_schema(hpxml_path, schema_validator)
112
110
  next unless errors.size > 0
113
111
 
114
- puts errors.to_s
112
+ errors.each do |s|
113
+ puts "Error: #{s}"
114
+ end
115
115
  puts "\nError: Did not successfully validate #{hpxml_filename}."
116
116
  exit!
117
117
  end
@@ -139,94 +139,97 @@ def apply_hpxml_modification_ashrae_140(hpxml)
139
139
  hpxml.header.created_date_and_time = Time.new(2000, 1, 1, 0, 0, 0, '-07:00').strftime('%Y-%m-%dT%H:%M:%S%:z') # Hard-code to prevent diffs
140
140
  hpxml.header.apply_ashrae140_assumptions = true
141
141
 
142
- # --------------------- #
143
- # HPXML BuildingSummary #
144
- # --------------------- #
142
+ hpxml.buildings.each do |hpxml_bldg|
143
+ # --------------------- #
144
+ # HPXML BuildingSummary #
145
+ # --------------------- #
145
146
 
146
- hpxml.site.azimuth_of_front_of_home = nil
147
- hpxml.building_construction.average_ceiling_height = nil
147
+ hpxml_bldg.site.azimuth_of_front_of_home = nil
148
+ hpxml_bldg.building_construction.average_ceiling_height = nil
148
149
 
149
- # --------------- #
150
- # HPXML Enclosure #
151
- # --------------- #
150
+ # --------------- #
151
+ # HPXML Enclosure #
152
+ # --------------- #
152
153
 
153
- hpxml.attics[0].vented_attic_ach = 2.4
154
- hpxml.foundations.reverse_each do |foundation|
155
- foundation.delete
156
- end
157
- hpxml.roofs.each do |roof|
158
- if roof.roof_color == HPXML::ColorReflective
159
- roof.solar_absorptance = 0.2
160
- else
161
- roof.solar_absorptance = 0.6
154
+ hpxml_bldg.attics[0].vented_attic_ach = 2.4
155
+ hpxml_bldg.foundations.reverse_each do |foundation|
156
+ foundation.delete
162
157
  end
163
- roof.emittance = 0.9
164
- roof.roof_color = nil
165
- end
166
- (hpxml.walls + hpxml.rim_joists).each do |wall|
167
- if wall.color == HPXML::ColorReflective
168
- wall.solar_absorptance = 0.2
169
- else
170
- wall.solar_absorptance = 0.6
158
+ hpxml_bldg.roofs.each do |roof|
159
+ if roof.roof_color == HPXML::ColorReflective
160
+ roof.solar_absorptance = 0.2
161
+ else
162
+ roof.solar_absorptance = 0.6
163
+ end
164
+ roof.emittance = 0.9
165
+ roof.roof_color = nil
171
166
  end
172
- wall.emittance = 0.9
173
- wall.color = nil
174
- if wall.is_a?(HPXML::Wall)
175
- if wall.attic_wall_type == HPXML::AtticWallTypeGable
176
- wall.insulation_assembly_r_value = 2.15
167
+ (hpxml_bldg.walls + hpxml_bldg.rim_joists).each do |wall|
168
+ if wall.color == HPXML::ColorReflective
169
+ wall.solar_absorptance = 0.2
177
170
  else
178
- wall.interior_finish_type = HPXML::InteriorFinishGypsumBoard
179
- wall.interior_finish_thickness = 0.5
171
+ wall.solar_absorptance = 0.6
172
+ end
173
+ wall.emittance = 0.9
174
+ wall.color = nil
175
+ if wall.is_a?(HPXML::Wall)
176
+ if wall.attic_wall_type == HPXML::AtticWallTypeGable
177
+ wall.insulation_assembly_r_value = 2.15
178
+ else
179
+ wall.interior_finish_type = HPXML::InteriorFinishGypsumBoard
180
+ wall.interior_finish_thickness = 0.5
181
+ end
180
182
  end
181
183
  end
182
- end
183
- hpxml.floors.each do |floor|
184
- next unless floor.is_ceiling
184
+ hpxml_bldg.floors.each do |floor|
185
+ next unless floor.is_ceiling
185
186
 
186
- floor.interior_finish_type = HPXML::InteriorFinishGypsumBoard
187
- floor.interior_finish_thickness = 0.5
188
- end
189
- hpxml.foundation_walls.each do |fwall|
190
- if fwall.insulation_interior_r_value == 0
191
- fwall.interior_finish_type = HPXML::InteriorFinishNone
192
- else
193
- fwall.interior_finish_type = HPXML::InteriorFinishGypsumBoard
194
- fwall.interior_finish_thickness = 0.5
187
+ floor.interior_finish_type = HPXML::InteriorFinishGypsumBoard
188
+ floor.interior_finish_thickness = 0.5
195
189
  end
196
- end
197
- if hpxml.doors.size == 1
198
- hpxml.doors[0].area /= 2.0
199
- hpxml.doors << hpxml.doors[0].dup
200
- hpxml.doors[1].azimuth = 0
201
- hpxml.doors[1].id = 'Door2'
202
- end
203
- hpxml.windows.each do |window|
204
- next if window.overhangs_depth.nil?
190
+ hpxml_bldg.foundation_walls.each do |fwall|
191
+ if fwall.insulation_interior_r_value == 0
192
+ fwall.interior_finish_type = HPXML::InteriorFinishNone
193
+ else
194
+ fwall.interior_finish_type = HPXML::InteriorFinishGypsumBoard
195
+ fwall.interior_finish_thickness = 0.5
196
+ end
197
+ end
198
+ if hpxml_bldg.doors.size == 1
199
+ hpxml_bldg.doors[0].area /= 2.0
200
+ hpxml_bldg.doors << hpxml_bldg.doors[0].dup
201
+ hpxml_bldg.doors[1].azimuth = 0
202
+ hpxml_bldg.doors[1].id = 'Door2'
203
+ end
204
+ hpxml_bldg.windows.each do |window|
205
+ next if window.overhangs_depth.nil?
205
206
 
206
- window.overhangs_distance_to_bottom_of_window = 6.0
207
- end
207
+ window.overhangs_distance_to_bottom_of_window = 6.0
208
+ end
208
209
 
209
- # ---------- #
210
- # HPXML HVAC #
211
- # ---------- #
210
+ # ---------- #
211
+ # HPXML HVAC #
212
+ # ---------- #
212
213
 
213
- hpxml.hvac_controls.add(id: "HVACControl#{hpxml.hvac_controls.size + 1}",
214
- heating_setpoint_temp: 68.0,
215
- cooling_setpoint_temp: 78.0)
214
+ hpxml_bldg.hvac_controls.add(id: "HVACControl#{hpxml_bldg.hvac_controls.size + 1}",
215
+ heating_setpoint_temp: 68.0,
216
+ cooling_setpoint_temp: 78.0)
216
217
 
217
- # --------------- #
218
- # HPXML MiscLoads #
219
- # --------------- #
218
+ # --------------- #
219
+ # HPXML MiscLoads #
220
+ # --------------- #
220
221
 
221
- if hpxml.plug_loads[0].kwh_per_year > 0
222
- hpxml.plug_loads[0].weekday_fractions = '0.0203, 0.0203, 0.0203, 0.0203, 0.0203, 0.0339, 0.0426, 0.0852, 0.0497, 0.0304, 0.0304, 0.0406, 0.0304, 0.0254, 0.0264, 0.0264, 0.0386, 0.0416, 0.0447, 0.0700, 0.0700, 0.0731, 0.0731, 0.0660'
223
- hpxml.plug_loads[0].weekend_fractions = '0.0203, 0.0203, 0.0203, 0.0203, 0.0203, 0.0339, 0.0426, 0.0852, 0.0497, 0.0304, 0.0304, 0.0406, 0.0304, 0.0254, 0.0264, 0.0264, 0.0386, 0.0416, 0.0447, 0.0700, 0.0700, 0.0731, 0.0731, 0.0660'
224
- hpxml.plug_loads[0].monthly_multipliers = '1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0'
222
+ next unless hpxml_bldg.plug_loads[0].kwh_per_year > 0
223
+
224
+ hpxml_bldg.plug_loads[0].weekday_fractions = '0.0203, 0.0203, 0.0203, 0.0203, 0.0203, 0.0339, 0.0426, 0.0852, 0.0497, 0.0304, 0.0304, 0.0406, 0.0304, 0.0254, 0.0264, 0.0264, 0.0386, 0.0416, 0.0447, 0.0700, 0.0700, 0.0731, 0.0731, 0.0660'
225
+ hpxml_bldg.plug_loads[0].weekend_fractions = '0.0203, 0.0203, 0.0203, 0.0203, 0.0203, 0.0339, 0.0426, 0.0852, 0.0497, 0.0304, 0.0304, 0.0406, 0.0304, 0.0254, 0.0264, 0.0264, 0.0386, 0.0416, 0.0447, 0.0700, 0.0700, 0.0731, 0.0731, 0.0660'
226
+ hpxml_bldg.plug_loads[0].monthly_multipliers = '1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0'
225
227
  end
226
228
  end
227
229
 
228
230
  def apply_hpxml_modification(hpxml_file, hpxml)
229
231
  # Set detailed HPXML values for sample files
232
+ hpxml_bldg = hpxml.buildings[0]
230
233
 
231
234
  # ------------ #
232
235
  # HPXML Header #
@@ -238,1949 +241,2232 @@ def apply_hpxml_modification(hpxml_file, hpxml)
238
241
 
239
242
  # Logic that can only be applied based on the file name
240
243
  if ['base-hvac-undersized-allow-increased-fixed-capacities.xml'].include? hpxml_file
241
- hpxml.header.allow_increased_fixed_capacities = true
244
+ hpxml_bldg.header.allow_increased_fixed_capacities = true
242
245
  elsif ['base-misc-emissions.xml'].include? hpxml_file
243
- hpxml.header.egrid_region = 'Western'
244
- hpxml.header.egrid_subregion = 'RMPA'
245
- hpxml.header.cambium_region_gea = 'RMPAc'
246
+ hpxml_bldg.egrid_region = 'Western'
247
+ hpxml_bldg.egrid_subregion = 'RMPA'
248
+ hpxml_bldg.cambium_region_gea = 'RMPAc'
246
249
  end
247
250
 
248
- # --------------------- #
249
- # HPXML BuildingSummary #
250
- # --------------------- #
251
-
252
- # General logic for all files
253
- hpxml.site.fuels = [HPXML::FuelTypeElectricity, HPXML::FuelTypeNaturalGas]
254
-
255
- # Logic that can only be applied based on the file name
256
- if ['base-schedules-simple.xml',
257
- 'base-schedules-simple-vacancy.xml',
258
- 'base-schedules-simple-vacancy-year-round.xml',
259
- 'base-schedules-simple-power-outage.xml',
260
- 'base-misc-loads-large-uncommon.xml',
261
- 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
262
- hpxml.building_occupancy.weekday_fractions = '0.061, 0.061, 0.061, 0.061, 0.061, 0.061, 0.061, 0.053, 0.025, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.018, 0.033, 0.054, 0.054, 0.054, 0.061, 0.061, 0.061'
263
- hpxml.building_occupancy.weekend_fractions = '0.061, 0.061, 0.061, 0.061, 0.061, 0.061, 0.061, 0.053, 0.025, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.018, 0.033, 0.054, 0.054, 0.054, 0.061, 0.061, 0.061'
264
- hpxml.building_occupancy.monthly_multipliers = '1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0'
265
- elsif ['base-misc-defaults.xml'].include? hpxml_file
266
- hpxml.building_construction.average_ceiling_height = nil
267
- hpxml.building_construction.conditioned_building_volume = nil
268
- elsif ['base-atticroof-cathedral.xml'].include? hpxml_file
269
- hpxml.building_construction.number_of_conditioned_floors = 2
270
- hpxml.building_construction.number_of_conditioned_floors_above_grade = 1
271
- hpxml.building_construction.conditioned_floor_area = 2700
272
- hpxml.attics[0].attic_type = HPXML::AtticTypeCathedral
273
- elsif ['base-atticroof-conditioned.xml'].include? hpxml_file
274
- hpxml.building_construction.conditioned_building_volume = 23850
275
- hpxml.air_infiltration_measurements[0].infiltration_volume = hpxml.building_construction.conditioned_building_volume
276
- hpxml.air_infiltration_measurements[0].infiltration_height = 15.0
277
- elsif ['base-enclosure-split-level.xml'].include? hpxml_file
278
- hpxml.building_construction.number_of_conditioned_floors = 1.5
279
- hpxml.building_construction.number_of_conditioned_floors_above_grade = 1.5
280
- elsif ['base-foundation-walkout-basement.xml'].include? hpxml_file
281
- hpxml.building_construction.number_of_conditioned_floors_above_grade = 2
282
- elsif ['base-foundation-basement-garage.xml'].include? hpxml_file
283
- hpxml.building_construction.conditioned_floor_area -= 400 * 2
284
- hpxml.building_construction.conditioned_building_volume -= 400 * 2 * 8
285
- hpxml.air_infiltration_measurements[0].infiltration_volume = hpxml.building_construction.conditioned_building_volume
286
- elsif ['base-bldgtype-multifamily-infil-compartmentalization-test.xml'].include? hpxml_file
287
- hpxml.air_infiltration_measurements[0].a_ext = 0.2
251
+ if ['base-hvac-autosize-sizing-controls.xml'].include? hpxml_file
252
+ hpxml_bldg.header.manualj_heating_design_temp = 0
253
+ hpxml_bldg.header.manualj_cooling_design_temp = 100
254
+ hpxml_bldg.header.manualj_heating_setpoint = 60
255
+ hpxml_bldg.header.manualj_cooling_setpoint = 80
256
+ hpxml_bldg.header.manualj_humidity_setpoint = 0.55
257
+ hpxml_bldg.header.manualj_internal_loads_sensible = 4000
258
+ hpxml_bldg.header.manualj_internal_loads_latent = 200
259
+ hpxml_bldg.header.manualj_num_occupants = 5
288
260
  end
289
-
290
- # --------------- #
291
- # HPXML Enclosure #
292
- # --------------- #
293
-
294
- # General logic for all files
295
- (hpxml.roofs + hpxml.walls + hpxml.rim_joists).each do |surface|
296
- surface.solar_absorptance = 0.7
297
- surface.emittance = 0.92
298
- if surface.is_a? HPXML::Roof
299
- surface.roof_color = nil
300
- else
301
- surface.color = nil
302
- end
261
+ if ['base-hvac-air-to-air-heat-pump-var-speed-detailed-performance.xml'].include? hpxml_file
262
+ # YORK HMH7
263
+ # https://ashp.neep.org/#!/product/64253/7/25000///0
264
+ clg_perf_data = hpxml_bldg.heat_pumps[0].cooling_detailed_performance_data
265
+ htg_perf_data = hpxml_bldg.heat_pumps[0].heating_detailed_performance_data
266
+ clg_perf_data.add(outdoor_temperature: 95.0,
267
+ capacity: 11700,
268
+ capacity_description: HPXML::CapacityDescriptionMinimum,
269
+ efficiency_cop: 4.47)
270
+ clg_perf_data.add(outdoor_temperature: 95.0,
271
+ capacity: 36000,
272
+ capacity_description: HPXML::CapacityDescriptionMaximum,
273
+ efficiency_cop: 2.71)
274
+ clg_perf_data.add(outdoor_temperature: 82.0,
275
+ capacity: 13200,
276
+ capacity_description: HPXML::CapacityDescriptionMinimum,
277
+ efficiency_cop: 6.34)
278
+ clg_perf_data.add(outdoor_temperature: 82.0,
279
+ capacity: 40000,
280
+ capacity_description: HPXML::CapacityDescriptionMaximum,
281
+ efficiency_cop: 3.53)
282
+ htg_perf_data.add(outdoor_temperature: 47.0,
283
+ capacity: 10000,
284
+ capacity_description: HPXML::CapacityDescriptionMinimum,
285
+ efficiency_cop: 4.73)
286
+ htg_perf_data.add(outdoor_temperature: 47.0,
287
+ capacity: 36000,
288
+ capacity_description: HPXML::CapacityDescriptionMaximum,
289
+ efficiency_cop: 3.44)
290
+ htg_perf_data.add(outdoor_temperature: 17.0,
291
+ capacity: 4200,
292
+ capacity_description: HPXML::CapacityDescriptionMinimum,
293
+ efficiency_cop: 1.84)
294
+ htg_perf_data.add(outdoor_temperature: 17.0,
295
+ capacity: 24800,
296
+ capacity_description: HPXML::CapacityDescriptionMaximum,
297
+ efficiency_cop: 2.66)
298
+ htg_perf_data.add(outdoor_temperature: 5.0,
299
+ capacity: 1900,
300
+ capacity_description: HPXML::CapacityDescriptionMinimum,
301
+ efficiency_cop: 0.81)
302
+ htg_perf_data.add(outdoor_temperature: 5.0,
303
+ capacity: 19900,
304
+ capacity_description: HPXML::CapacityDescriptionMaximum,
305
+ efficiency_cop: 2.28)
303
306
  end
304
- hpxml.roofs.each do |roof|
305
- next unless roof.interior_adjacent_to == HPXML::LocationLivingSpace
306
-
307
- roof.interior_finish_type = HPXML::InteriorFinishGypsumBoard
307
+ if ['base-hvac-install-quality-air-to-air-heat-pump-var-speed-detailed-performance.xml'].include? hpxml_file
308
+ # YORK HMH7
309
+ # https://ashp.neep.org/#!/product/64253/7/25000///0
310
+ clg_perf_data = hpxml_bldg.heat_pumps[0].cooling_detailed_performance_data
311
+ htg_perf_data = hpxml_bldg.heat_pumps[0].heating_detailed_performance_data
312
+ clg_perf_data.add(outdoor_temperature: 95.0,
313
+ capacity: 11700,
314
+ capacity_description: HPXML::CapacityDescriptionMinimum,
315
+ efficiency_cop: 4.47)
316
+ clg_perf_data.add(outdoor_temperature: 95.0,
317
+ capacity: 36000,
318
+ capacity_description: HPXML::CapacityDescriptionMaximum,
319
+ efficiency_cop: 2.71)
320
+ clg_perf_data.add(outdoor_temperature: 82.0,
321
+ capacity: 13200,
322
+ capacity_description: HPXML::CapacityDescriptionMinimum,
323
+ efficiency_cop: 6.34)
324
+ clg_perf_data.add(outdoor_temperature: 82.0,
325
+ capacity: 40000,
326
+ capacity_description: HPXML::CapacityDescriptionMaximum,
327
+ efficiency_cop: 3.53)
328
+ htg_perf_data.add(outdoor_temperature: 47.0,
329
+ capacity: 10000,
330
+ capacity_description: HPXML::CapacityDescriptionMinimum,
331
+ efficiency_cop: 4.73)
332
+ htg_perf_data.add(outdoor_temperature: 47.0,
333
+ capacity: 36000,
334
+ capacity_description: HPXML::CapacityDescriptionMaximum,
335
+ efficiency_cop: 3.44)
336
+ htg_perf_data.add(outdoor_temperature: 17.0,
337
+ capacity: 4200,
338
+ capacity_description: HPXML::CapacityDescriptionMinimum,
339
+ efficiency_cop: 1.84)
340
+ htg_perf_data.add(outdoor_temperature: 17.0,
341
+ capacity: 24800,
342
+ capacity_description: HPXML::CapacityDescriptionMaximum,
343
+ efficiency_cop: 2.66)
344
+ htg_perf_data.add(outdoor_temperature: 5.0,
345
+ capacity: 1900,
346
+ capacity_description: HPXML::CapacityDescriptionMinimum,
347
+ efficiency_cop: 0.81)
348
+ htg_perf_data.add(outdoor_temperature: 5.0,
349
+ capacity: 19900,
350
+ capacity_description: HPXML::CapacityDescriptionMaximum,
351
+ efficiency_cop: 2.28)
352
+ hpxml_bldg.heat_pumps[0].airflow_defect_ratio = -0.25
353
+ hpxml_bldg.heat_pumps[0].charge_defect_ratio = -0.25
308
354
  end
309
- (hpxml.walls + hpxml.foundation_walls + hpxml.floors).each do |surface|
310
- if surface.is_a?(HPXML::FoundationWall) && surface.interior_adjacent_to != HPXML::LocationBasementConditioned
311
- surface.interior_finish_type = HPXML::InteriorFinishNone
312
- end
313
- next unless [HPXML::LocationLivingSpace,
314
- HPXML::LocationBasementConditioned].include?(surface.interior_adjacent_to) &&
315
- [HPXML::LocationOutside,
316
- HPXML::LocationGround,
317
- HPXML::LocationGarage,
318
- HPXML::LocationAtticUnvented,
319
- HPXML::LocationAtticVented,
320
- HPXML::LocationOtherHousingUnit,
321
- HPXML::LocationBasementConditioned].include?(surface.exterior_adjacent_to)
322
- next if surface.is_a?(HPXML::Floor) && surface.is_floor
323
-
324
- surface.interior_finish_type = HPXML::InteriorFinishGypsumBoard
355
+ if ['base-hvac-air-to-air-heat-pump-var-speed-detailed-performance-other-temperatures.xml'].include? hpxml_file
356
+ clg_perf_data = hpxml_bldg.heat_pumps[0].cooling_detailed_performance_data
357
+ htg_perf_data = hpxml_bldg.heat_pumps[0].heating_detailed_performance_data
358
+ clg_perf_data.add(outdoor_temperature: 95.0,
359
+ capacity: 11700,
360
+ capacity_description: HPXML::CapacityDescriptionMinimum,
361
+ efficiency_cop: 4.47)
362
+ clg_perf_data.add(outdoor_temperature: 95.0,
363
+ capacity: 36000,
364
+ capacity_description: HPXML::CapacityDescriptionMaximum,
365
+ efficiency_cop: 2.71)
366
+ clg_perf_data.add(outdoor_temperature: 105.0,
367
+ capacity: 10000,
368
+ capacity_description: HPXML::CapacityDescriptionMinimum,
369
+ efficiency_cop: 3.9)
370
+ clg_perf_data.add(outdoor_temperature: 105.0,
371
+ capacity: 30000,
372
+ capacity_description: HPXML::CapacityDescriptionMaximum,
373
+ efficiency_cop: 2.3)
374
+ htg_perf_data.add(outdoor_temperature: 47.0,
375
+ capacity: 10000,
376
+ capacity_description: HPXML::CapacityDescriptionMinimum,
377
+ efficiency_cop: 4.73)
378
+ htg_perf_data.add(outdoor_temperature: 47.0,
379
+ capacity: 36000,
380
+ capacity_description: HPXML::CapacityDescriptionMaximum,
381
+ efficiency_cop: 3.44)
382
+ htg_perf_data.add(outdoor_temperature: 55.0,
383
+ capacity: 12000,
384
+ capacity_description: HPXML::CapacityDescriptionMinimum,
385
+ efficiency_cop: 5.5)
386
+ htg_perf_data.add(outdoor_temperature: 55.0,
387
+ capacity: 45000,
388
+ capacity_description: HPXML::CapacityDescriptionMaximum,
389
+ efficiency_cop: 4.0)
325
390
  end
326
- hpxml.attics.each do |attic|
327
- if attic.attic_type == HPXML::AtticTypeUnvented
328
- attic.within_infiltration_volume = false
329
- elsif attic.attic_type == HPXML::AtticTypeVented
330
- attic.vented_attic_sla = 0.003
331
- end
391
+ if ['base-hvac-central-ac-only-var-speed-detailed-performance.xml'].include? hpxml_file
392
+ clg_perf_data = hpxml_bldg.cooling_systems[0].cooling_detailed_performance_data
393
+ clg_perf_data.add(outdoor_temperature: 95.0,
394
+ capacity: 11700,
395
+ capacity_description: HPXML::CapacityDescriptionMinimum,
396
+ efficiency_cop: 4.47)
397
+ clg_perf_data.add(outdoor_temperature: 95.0,
398
+ capacity: 36000,
399
+ capacity_description: HPXML::CapacityDescriptionMaximum,
400
+ efficiency_cop: 2.71)
401
+ clg_perf_data.add(outdoor_temperature: 82.0,
402
+ capacity: 13200,
403
+ capacity_description: HPXML::CapacityDescriptionMinimum,
404
+ efficiency_cop: 6.34)
405
+ clg_perf_data.add(outdoor_temperature: 82.0,
406
+ capacity: 40000,
407
+ capacity_description: HPXML::CapacityDescriptionMaximum,
408
+ efficiency_cop: 3.53)
332
409
  end
333
- hpxml.foundations.each do |foundation|
334
- if foundation.foundation_type == HPXML::FoundationTypeCrawlspaceUnvented
335
- foundation.within_infiltration_volume = false
336
- elsif foundation.foundation_type == HPXML::FoundationTypeCrawlspaceVented
337
- foundation.vented_crawlspace_sla = 0.00667
338
- end
410
+ if ['base-hvac-mini-split-air-conditioner-only-ductless-detailed-performance.xml'].include? hpxml_file
411
+ clg_perf_data = hpxml_bldg.cooling_systems[0].cooling_detailed_performance_data
412
+ clg_perf_data.add(outdoor_temperature: 95.0,
413
+ capacity: 10372,
414
+ capacity_description: HPXML::CapacityDescriptionMinimum,
415
+ efficiency_cop: 4.05)
416
+ clg_perf_data.add(outdoor_temperature: 95.0,
417
+ capacity: 42653,
418
+ capacity_description: HPXML::CapacityDescriptionMaximum,
419
+ efficiency_cop: 3.27)
420
+ clg_perf_data.add(outdoor_temperature: 82.0,
421
+ capacity: 19456,
422
+ capacity_description: HPXML::CapacityDescriptionMinimum,
423
+ efficiency_cop: 8.03)
424
+ clg_perf_data.add(outdoor_temperature: 82.0,
425
+ capacity: 40093,
426
+ capacity_description: HPXML::CapacityDescriptionMaximum,
427
+ efficiency_cop: 3.27)
428
+ end
429
+ if ['base-hvac-mini-split-heat-pump-ducted-detailed-performance.xml'].include? hpxml_file
430
+ # FUJITSU Halcyon Single-room Mini-Split Systems Slim
431
+ # https://ashp.neep.org/#!/product/25352/7/25000///0
432
+ clg_perf_data = hpxml_bldg.heat_pumps[0].cooling_detailed_performance_data
433
+ htg_perf_data = hpxml_bldg.heat_pumps[0].heating_detailed_performance_data
434
+ clg_perf_data.add(outdoor_temperature: 95.0,
435
+ capacity: 9600,
436
+ capacity_description: HPXML::CapacityDescriptionMinimum,
437
+ efficiency_cop: 4.02)
438
+ clg_perf_data.add(outdoor_temperature: 95.0,
439
+ capacity: 39000,
440
+ capacity_description: HPXML::CapacityDescriptionMaximum,
441
+ efficiency_cop: 2.86)
442
+ clg_perf_data.add(outdoor_temperature: 82.0,
443
+ capacity: 10224,
444
+ capacity_description: HPXML::CapacityDescriptionMinimum,
445
+ efficiency_cop: 4.61)
446
+ clg_perf_data.add(outdoor_temperature: 82.0,
447
+ capacity: 41587,
448
+ capacity_description: HPXML::CapacityDescriptionMaximum,
449
+ efficiency_cop: 3.29)
450
+ htg_perf_data.add(outdoor_temperature: 47.0,
451
+ capacity: 9200,
452
+ capacity_description: HPXML::CapacityDescriptionMinimum,
453
+ efficiency_cop: 4.35)
454
+ htg_perf_data.add(outdoor_temperature: 47.0,
455
+ capacity: 48000,
456
+ capacity_description: HPXML::CapacityDescriptionMaximum,
457
+ efficiency_cop: 3.21)
458
+ htg_perf_data.add(outdoor_temperature: 17.0,
459
+ capacity: 7063,
460
+ capacity_description: HPXML::CapacityDescriptionMinimum,
461
+ efficiency_cop: 2.92)
462
+ htg_perf_data.add(outdoor_temperature: 17.0,
463
+ capacity: 36800,
464
+ capacity_description: HPXML::CapacityDescriptionMaximum,
465
+ efficiency_cop: 2.15)
466
+ htg_perf_data.add(outdoor_temperature: 5.0,
467
+ capacity: 6310,
468
+ capacity_description: HPXML::CapacityDescriptionMinimum,
469
+ efficiency_cop: 2.60)
470
+ htg_perf_data.add(outdoor_temperature: 5.0,
471
+ capacity: 32920,
472
+ capacity_description: HPXML::CapacityDescriptionMaximum,
473
+ efficiency_cop: 1.93)
339
474
  end
340
- hpxml.skylights.each do |skylight|
341
- skylight.interior_shading_factor_summer = 1.0
342
- skylight.interior_shading_factor_winter = 1.0
475
+ if ['base-hvac-mini-split-heat-pump-ductless-detailed-performance.xml'].include? hpxml_file
476
+ # BOSCH Bosch Climate 5000 ductless minisplit series
477
+ # https://ashp.neep.org/#!/product/66076/7/25000///0
478
+ clg_perf_data = hpxml_bldg.heat_pumps[0].cooling_detailed_performance_data
479
+ htg_perf_data = hpxml_bldg.heat_pumps[0].heating_detailed_performance_data
480
+ clg_perf_data.add(outdoor_temperature: 95.0,
481
+ capacity: 10372,
482
+ capacity_description: HPXML::CapacityDescriptionMinimum,
483
+ efficiency_cop: 4.05)
484
+ clg_perf_data.add(outdoor_temperature: 95.0,
485
+ capacity: 42653,
486
+ capacity_description: HPXML::CapacityDescriptionMaximum,
487
+ efficiency_cop: 3.27)
488
+ clg_perf_data.add(outdoor_temperature: 82.0,
489
+ capacity: 19456,
490
+ capacity_description: HPXML::CapacityDescriptionMinimum,
491
+ efficiency_cop: 8.03)
492
+ clg_perf_data.add(outdoor_temperature: 82.0,
493
+ capacity: 40093,
494
+ capacity_description: HPXML::CapacityDescriptionMaximum,
495
+ efficiency_cop: 3.27)
496
+ htg_perf_data.add(outdoor_temperature: 47.0,
497
+ capacity: 12143,
498
+ capacity_description: HPXML::CapacityDescriptionMinimum,
499
+ efficiency_cop: 4.81)
500
+ htg_perf_data.add(outdoor_temperature: 47.0,
501
+ capacity: 56499,
502
+ capacity_description: HPXML::CapacityDescriptionMaximum,
503
+ efficiency_cop: 3.17)
504
+ htg_perf_data.add(outdoor_temperature: 17.0,
505
+ capacity: 7414,
506
+ capacity_description: HPXML::CapacityDescriptionMinimum,
507
+ efficiency_cop: 1.96)
508
+ htg_perf_data.add(outdoor_temperature: 17.0,
509
+ capacity: 43387,
510
+ capacity_description: HPXML::CapacityDescriptionMaximum,
511
+ efficiency_cop: 2.31)
512
+ htg_perf_data.add(outdoor_temperature: 5.0,
513
+ capacity: 8130,
514
+ capacity_description: HPXML::CapacityDescriptionMinimum,
515
+ efficiency_cop: 1.71)
516
+ htg_perf_data.add(outdoor_temperature: 5.0,
517
+ capacity: 36037,
518
+ capacity_description: HPXML::CapacityDescriptionMaximum,
519
+ efficiency_cop: 1.96)
343
520
  end
344
521
 
345
- # Logic that can only be applied based on the file name
346
- if ['base-bldgtype-multifamily-adjacent-to-multifamily-buffer-space.xml',
347
- 'base-bldgtype-multifamily-adjacent-to-non-freezing-space.xml',
348
- 'base-bldgtype-multifamily-adjacent-to-other-heated-space.xml',
349
- 'base-bldgtype-multifamily-adjacent-to-other-housing-unit.xml'].include? hpxml_file
350
- if hpxml_file == 'base-bldgtype-multifamily-adjacent-to-multifamily-buffer-space.xml'
351
- adjacent_to = HPXML::LocationOtherMultifamilyBufferSpace
352
- elsif hpxml_file == 'base-bldgtype-multifamily-adjacent-to-non-freezing-space.xml'
353
- adjacent_to = HPXML::LocationOtherNonFreezingSpace
354
- elsif hpxml_file == 'base-bldgtype-multifamily-adjacent-to-other-heated-space.xml'
355
- adjacent_to = HPXML::LocationOtherHeatedSpace
356
- elsif hpxml_file == 'base-bldgtype-multifamily-adjacent-to-other-housing-unit.xml'
357
- adjacent_to = HPXML::LocationOtherHousingUnit
358
- end
359
- wall = hpxml.walls.select { |w|
360
- w.interior_adjacent_to == HPXML::LocationLivingSpace &&
361
- w.exterior_adjacent_to == HPXML::LocationOtherHousingUnit
362
- }[0]
363
- wall.exterior_adjacent_to = adjacent_to
364
- hpxml.floors[0].exterior_adjacent_to = adjacent_to
365
- hpxml.floors[1].exterior_adjacent_to = adjacent_to
366
- if hpxml_file != 'base-bldgtype-multifamily-adjacent-to-other-housing-unit.xml'
367
- wall.insulation_assembly_r_value = 23
368
- hpxml.floors[0].insulation_assembly_r_value = 18.7
369
- hpxml.floors[1].insulation_assembly_r_value = 18.7
370
- end
371
- hpxml.windows.each do |window|
372
- window.area = (window.area * 0.35).round(1)
373
- end
374
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
375
- wall_idref: wall.id,
376
- area: 20,
377
- azimuth: 0,
378
- r_value: 4.4)
379
- hpxml.hvac_distributions[0].ducts[0].duct_location = adjacent_to
380
- hpxml.hvac_distributions[0].ducts[1].duct_location = adjacent_to
381
- hpxml.water_heating_systems[0].location = adjacent_to
382
- hpxml.clothes_washers[0].location = adjacent_to
383
- hpxml.clothes_dryers[0].location = adjacent_to
384
- hpxml.dishwashers[0].location = adjacent_to
385
- hpxml.refrigerators[0].location = adjacent_to
386
- hpxml.cooking_ranges[0].location = adjacent_to
387
- elsif ['base-bldgtype-multifamily-adjacent-to-multiple.xml'].include? hpxml_file
388
- wall = hpxml.walls.select { |w|
389
- w.interior_adjacent_to == HPXML::LocationLivingSpace &&
390
- w.exterior_adjacent_to == HPXML::LocationOtherHousingUnit
391
- }[0]
392
- wall.delete
393
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
394
- exterior_adjacent_to: HPXML::LocationOtherHeatedSpace,
395
- interior_adjacent_to: HPXML::LocationLivingSpace,
396
- wall_type: HPXML::WallTypeWoodStud,
397
- area: 100,
398
- solar_absorptance: 0.7,
399
- emittance: 0.92,
400
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
401
- insulation_assembly_r_value: 23.0)
402
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
403
- exterior_adjacent_to: HPXML::LocationOtherMultifamilyBufferSpace,
404
- interior_adjacent_to: HPXML::LocationLivingSpace,
405
- wall_type: HPXML::WallTypeWoodStud,
406
- area: 100,
407
- solar_absorptance: 0.7,
408
- emittance: 0.92,
409
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
410
- insulation_assembly_r_value: 23.0)
411
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
412
- exterior_adjacent_to: HPXML::LocationOtherNonFreezingSpace,
413
- interior_adjacent_to: HPXML::LocationLivingSpace,
414
- wall_type: HPXML::WallTypeWoodStud,
415
- area: 100,
416
- solar_absorptance: 0.7,
417
- emittance: 0.92,
418
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
419
- insulation_assembly_r_value: 23.0)
420
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
421
- exterior_adjacent_to: HPXML::LocationOtherHousingUnit,
422
- interior_adjacent_to: HPXML::LocationLivingSpace,
423
- wall_type: HPXML::WallTypeWoodStud,
424
- area: 100,
425
- solar_absorptance: 0.7,
426
- emittance: 0.92,
427
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
428
- insulation_assembly_r_value: 4.0)
429
- hpxml.floors[0].delete
430
- hpxml.floors[0].id = 'Floor1'
431
- hpxml.floors[0].insulation_id = 'Floor1Insulation'
432
- hpxml.floors.add(id: "Floor#{hpxml.floors.size + 1}",
433
- exterior_adjacent_to: HPXML::LocationOtherNonFreezingSpace,
434
- interior_adjacent_to: HPXML::LocationLivingSpace,
435
- floor_type: HPXML::FloorTypeWoodFrame,
436
- area: 550,
437
- insulation_assembly_r_value: 18.7,
438
- floor_or_ceiling: HPXML::FloorOrCeilingFloor)
439
- hpxml.floors.add(id: "Floor#{hpxml.floors.size + 1}",
440
- exterior_adjacent_to: HPXML::LocationOtherMultifamilyBufferSpace,
441
- interior_adjacent_to: HPXML::LocationLivingSpace,
442
- floor_type: HPXML::FloorTypeWoodFrame,
443
- area: 200,
444
- insulation_assembly_r_value: 18.7,
445
- floor_or_ceiling: HPXML::FloorOrCeilingFloor)
446
- hpxml.floors.add(id: "Floor#{hpxml.floors.size + 1}",
447
- exterior_adjacent_to: HPXML::LocationOtherHeatedSpace,
448
- interior_adjacent_to: HPXML::LocationLivingSpace,
449
- floor_type: HPXML::FloorTypeWoodFrame,
450
- area: 150,
451
- insulation_assembly_r_value: 2.1,
452
- floor_or_ceiling: HPXML::FloorOrCeilingFloor)
453
- wall = hpxml.walls.select { |w|
454
- w.interior_adjacent_to == HPXML::LocationLivingSpace &&
455
- w.exterior_adjacent_to == HPXML::LocationOtherMultifamilyBufferSpace
456
- }[0]
457
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
458
- area: 50,
459
- azimuth: 270,
460
- ufactor: 0.33,
461
- shgc: 0.45,
462
- fraction_operable: 0.67,
463
- wall_idref: wall.id)
464
- wall = hpxml.walls.select { |w|
465
- w.interior_adjacent_to == HPXML::LocationLivingSpace &&
466
- w.exterior_adjacent_to == HPXML::LocationOtherHeatedSpace
467
- }[0]
468
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
469
- wall_idref: wall.id,
470
- area: 20,
471
- azimuth: 0,
472
- r_value: 4.4)
473
- wall = hpxml.walls.select { |w|
474
- w.interior_adjacent_to == HPXML::LocationLivingSpace &&
475
- w.exterior_adjacent_to == HPXML::LocationOtherHousingUnit
476
- }[0]
477
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
478
- wall_idref: wall.id,
479
- area: 20,
480
- azimuth: 0,
481
- r_value: 4.4)
482
- elsif ['base-enclosure-orientations.xml'].include? hpxml_file
483
- hpxml.windows.each do |window|
484
- window.orientation = { 0 => 'north', 90 => 'east', 180 => 'south', 270 => 'west' }[window.azimuth]
485
- window.azimuth = nil
486
- end
487
- hpxml.doors[0].delete
488
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
489
- wall_idref: 'Wall1',
490
- area: 20,
491
- orientation: HPXML::OrientationNorth,
492
- r_value: 4.4)
493
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
494
- wall_idref: 'Wall1',
495
- area: 20,
496
- orientation: HPXML::OrientationSouth,
497
- r_value: 4.4)
498
- elsif ['base-foundation-unconditioned-basement.xml'].include? hpxml_file
499
- hpxml.foundations[0].within_infiltration_volume = false
500
- elsif ['base-atticroof-conditioned.xml'].include? hpxml_file
501
- hpxml.attics.add(id: "Attic#{hpxml.attics.size + 1}",
502
- attic_type: HPXML::AtticTypeUnvented,
503
- within_infiltration_volume: false)
504
- hpxml.roofs.each do |roof|
505
- roof.area = 1006.0 / hpxml.roofs.size
506
- roof.insulation_assembly_r_value = 25.8
507
- end
508
- hpxml.roofs.add(id: "Roof#{hpxml.roofs.size + 1}",
509
- interior_adjacent_to: HPXML::LocationAtticUnvented,
510
- area: 504,
511
- roof_type: HPXML::RoofTypeAsphaltShingles,
512
- solar_absorptance: 0.7,
513
- emittance: 0.92,
514
- pitch: 6,
515
- radiant_barrier: false,
516
- insulation_assembly_r_value: 2.3)
517
- hpxml.rim_joists.each do |rim_joist|
518
- rim_joist.area = 116.0 / hpxml.rim_joists.size
519
- end
520
- hpxml.walls.each do |wall|
521
- wall.area = 1200.0 / hpxml.walls.size
522
- end
523
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
524
- exterior_adjacent_to: HPXML::LocationAtticUnvented,
525
- interior_adjacent_to: HPXML::LocationLivingSpace,
526
- wall_type: HPXML::WallTypeWoodStud,
527
- area: 316,
528
- solar_absorptance: 0.7,
529
- emittance: 0.92,
530
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
531
- insulation_assembly_r_value: 23.0)
532
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
533
- exterior_adjacent_to: HPXML::LocationOutside,
534
- interior_adjacent_to: HPXML::LocationLivingSpace,
535
- wall_type: HPXML::WallTypeWoodStud,
536
- siding: HPXML::SidingTypeWood,
537
- area: 240,
538
- solar_absorptance: 0.7,
539
- emittance: 0.92,
540
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
541
- insulation_assembly_r_value: 22.3)
542
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
543
- exterior_adjacent_to: HPXML::LocationOutside,
544
- interior_adjacent_to: HPXML::LocationAtticUnvented,
545
- attic_wall_type: HPXML::AtticWallTypeGable,
546
- wall_type: HPXML::WallTypeWoodStud,
547
- siding: HPXML::SidingTypeWood,
548
- area: 50,
549
- solar_absorptance: 0.7,
550
- emittance: 0.92,
551
- insulation_assembly_r_value: 4.0)
552
- hpxml.foundation_walls.each do |foundation_wall|
553
- foundation_wall.area = 1200.0 / hpxml.foundation_walls.size
554
- end
555
- hpxml.floors.add(id: "Floor#{hpxml.floors.size + 1}",
556
- exterior_adjacent_to: HPXML::LocationAtticUnvented,
557
- interior_adjacent_to: HPXML::LocationLivingSpace,
558
- floor_type: HPXML::FloorTypeWoodFrame,
559
- area: 450,
560
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
561
- insulation_assembly_r_value: 39.3,
562
- floor_or_ceiling: HPXML::FloorOrCeilingCeiling)
563
- hpxml.slabs[0].area = 1350
564
- hpxml.slabs[0].exposed_perimeter = 150
565
- hpxml.windows[1].area = 108
566
- hpxml.windows[3].area = 108
567
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
568
- area: 12,
569
- azimuth: 90,
570
- ufactor: 0.33,
571
- shgc: 0.45,
572
- fraction_operable: 0,
573
- wall_idref: hpxml.walls[-2].id)
574
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
575
- area: 62,
576
- azimuth: 270,
577
- ufactor: 0.3,
578
- shgc: 0.45,
579
- fraction_operable: 0,
580
- wall_idref: hpxml.walls[-2].id)
581
- elsif ['base-foundation-unconditioned-basement-above-grade.xml'].include? hpxml_file
582
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
583
- area: 20,
584
- azimuth: 0,
585
- ufactor: 0.33,
586
- shgc: 0.45,
587
- fraction_operable: 0.0,
588
- wall_idref: hpxml.foundation_walls[0].id)
589
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
590
- area: 10,
591
- azimuth: 90,
592
- ufactor: 0.33,
593
- shgc: 0.45,
594
- fraction_operable: 0.0,
595
- wall_idref: hpxml.foundation_walls[0].id)
596
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
597
- area: 20,
598
- azimuth: 180,
599
- ufactor: 0.33,
600
- shgc: 0.45,
601
- fraction_operable: 0.0,
602
- wall_idref: hpxml.foundation_walls[0].id)
603
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
604
- area: 10,
605
- azimuth: 270,
606
- ufactor: 0.33,
607
- shgc: 0.45,
608
- fraction_operable: 0.0,
609
- wall_idref: hpxml.foundation_walls[0].id)
610
- elsif ['base-enclosure-skylights-physical-properties.xml'].include? hpxml_file
611
- hpxml.skylights[0].ufactor = nil
612
- hpxml.skylights[0].shgc = nil
613
- hpxml.skylights[0].glass_layers = HPXML::WindowLayersSinglePane
614
- hpxml.skylights[0].frame_type = HPXML::WindowFrameTypeWood
615
- hpxml.skylights[0].glass_type = HPXML::WindowGlassTypeTinted
616
- hpxml.skylights[1].ufactor = nil
617
- hpxml.skylights[1].shgc = nil
618
- hpxml.skylights[1].glass_layers = HPXML::WindowLayersDoublePane
619
- hpxml.skylights[1].frame_type = HPXML::WindowFrameTypeMetal
620
- hpxml.skylights[1].thermal_break = true
621
- hpxml.skylights[1].glass_type = HPXML::WindowGlassTypeLowE
622
- hpxml.skylights[1].gas_fill = HPXML::WindowGasKrypton
623
- elsif ['base-enclosure-skylights-shading.xml'].include? hpxml_file
624
- hpxml.skylights[0].exterior_shading_factor_summer = 0.1
625
- hpxml.skylights[0].exterior_shading_factor_winter = 0.9
626
- hpxml.skylights[0].interior_shading_factor_summer = 0.01
627
- hpxml.skylights[0].interior_shading_factor_winter = 0.99
628
- hpxml.skylights[1].exterior_shading_factor_summer = 0.5
629
- hpxml.skylights[1].exterior_shading_factor_winter = 0.0
630
- hpxml.skylights[1].interior_shading_factor_summer = 0.5
631
- hpxml.skylights[1].interior_shading_factor_winter = 1.0
632
- elsif ['base-enclosure-windows-physical-properties.xml'].include? hpxml_file
633
- hpxml.windows[0].ufactor = nil
634
- hpxml.windows[0].shgc = nil
635
- hpxml.windows[0].glass_layers = HPXML::WindowLayersSinglePane
636
- hpxml.windows[0].frame_type = HPXML::WindowFrameTypeWood
637
- hpxml.windows[0].glass_type = HPXML::WindowGlassTypeTinted
638
- hpxml.windows[1].ufactor = nil
639
- hpxml.windows[1].shgc = nil
640
- hpxml.windows[1].glass_layers = HPXML::WindowLayersDoublePane
641
- hpxml.windows[1].frame_type = HPXML::WindowFrameTypeVinyl
642
- hpxml.windows[1].glass_type = HPXML::WindowGlassTypeReflective
643
- hpxml.windows[1].gas_fill = HPXML::WindowGasAir
644
- hpxml.windows[2].ufactor = nil
645
- hpxml.windows[2].shgc = nil
646
- hpxml.windows[2].glass_layers = HPXML::WindowLayersDoublePane
647
- hpxml.windows[2].frame_type = HPXML::WindowFrameTypeMetal
648
- hpxml.windows[2].thermal_break = true
649
- hpxml.windows[2].glass_type = HPXML::WindowGlassTypeLowE
650
- hpxml.windows[2].gas_fill = HPXML::WindowGasArgon
651
- hpxml.windows[3].ufactor = nil
652
- hpxml.windows[3].shgc = nil
653
- hpxml.windows[3].glass_layers = HPXML::WindowLayersGlassBlock
654
- elsif ['base-enclosure-windows-shading.xml'].include? hpxml_file
655
- hpxml.windows[1].exterior_shading_factor_summer = 0.5
656
- hpxml.windows[1].exterior_shading_factor_winter = 0.5
657
- hpxml.windows[1].interior_shading_factor_summer = 0.5
658
- hpxml.windows[1].interior_shading_factor_winter = 0.5
659
- hpxml.windows[2].exterior_shading_factor_summer = 0.1
660
- hpxml.windows[2].exterior_shading_factor_winter = 0.9
661
- hpxml.windows[2].interior_shading_factor_summer = 0.01
662
- hpxml.windows[2].interior_shading_factor_winter = 0.99
663
- hpxml.windows[3].exterior_shading_factor_summer = 0.0
664
- hpxml.windows[3].exterior_shading_factor_winter = 1.0
665
- hpxml.windows[3].interior_shading_factor_summer = 0.0
666
- hpxml.windows[3].interior_shading_factor_winter = 1.0
667
- elsif ['base-enclosure-thermal-mass.xml'].include? hpxml_file
668
- hpxml.partition_wall_mass.area_fraction = 0.8
669
- hpxml.partition_wall_mass.interior_finish_type = HPXML::InteriorFinishGypsumBoard
670
- hpxml.partition_wall_mass.interior_finish_thickness = 0.25
671
- hpxml.furniture_mass.area_fraction = 0.8
672
- hpxml.furniture_mass.type = HPXML::FurnitureMassTypeHeavyWeight
673
- elsif ['base-misc-defaults.xml'].include? hpxml_file
674
- hpxml.attics.reverse_each do |attic|
675
- attic.delete
676
- end
677
- hpxml.foundations.reverse_each do |foundation|
678
- foundation.delete
679
- end
680
- hpxml.air_infiltration_measurements[0].infiltration_volume = nil
681
- (hpxml.roofs + hpxml.walls + hpxml.rim_joists).each do |surface|
682
- surface.solar_absorptance = nil
683
- surface.emittance = nil
522
+ hpxml.buildings.each do |hpxml_bldg|
523
+ # Logic that can only be applied based on the file name
524
+ if ['base-misc-emissions.xml'].include? hpxml_file
525
+ hpxml_bldg.egrid_region = 'Western'
526
+ hpxml_bldg.egrid_subregion = 'RMPA'
527
+ hpxml_bldg.cambium_region_gea = 'RMPAc'
528
+ end
529
+
530
+ # --------------------- #
531
+ # HPXML BuildingSummary #
532
+ # --------------------- #
533
+
534
+ # General logic for all files
535
+ hpxml_bldg.site.fuels = [HPXML::FuelTypeElectricity, HPXML::FuelTypeNaturalGas]
536
+
537
+ # Logic that can only be applied based on the file name
538
+ if ['base-schedules-simple.xml',
539
+ 'base-schedules-simple-vacancy.xml',
540
+ 'base-schedules-simple-power-outage.xml',
541
+ 'base-misc-loads-large-uncommon.xml',
542
+ 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
543
+ hpxml_bldg.building_occupancy.weekday_fractions = '0.061, 0.061, 0.061, 0.061, 0.061, 0.061, 0.061, 0.053, 0.025, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.018, 0.033, 0.054, 0.054, 0.054, 0.061, 0.061, 0.061'
544
+ hpxml_bldg.building_occupancy.weekend_fractions = '0.061, 0.061, 0.061, 0.061, 0.061, 0.061, 0.061, 0.053, 0.025, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.018, 0.033, 0.054, 0.054, 0.054, 0.061, 0.061, 0.061'
545
+ hpxml_bldg.building_occupancy.monthly_multipliers = '1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0'
546
+ elsif ['base-misc-defaults.xml'].include? hpxml_file
547
+ hpxml_bldg.building_construction.average_ceiling_height = nil
548
+ hpxml_bldg.building_construction.conditioned_building_volume = nil
549
+ elsif ['base-atticroof-cathedral.xml'].include? hpxml_file
550
+ hpxml_bldg.building_construction.number_of_conditioned_floors = 2
551
+ hpxml_bldg.building_construction.number_of_conditioned_floors_above_grade = 1
552
+ hpxml_bldg.building_construction.conditioned_floor_area = 2700
553
+ hpxml_bldg.attics[0].attic_type = HPXML::AtticTypeCathedral
554
+ elsif ['base-atticroof-conditioned.xml'].include? hpxml_file
555
+ hpxml_bldg.building_construction.conditioned_building_volume = 23850
556
+ hpxml_bldg.air_infiltration_measurements[0].infiltration_volume = hpxml_bldg.building_construction.conditioned_building_volume
557
+ hpxml_bldg.air_infiltration_measurements[0].infiltration_height = 15.0
558
+ elsif ['base-enclosure-split-level.xml'].include? hpxml_file
559
+ hpxml_bldg.building_construction.number_of_conditioned_floors = 1.5
560
+ hpxml_bldg.building_construction.number_of_conditioned_floors_above_grade = 1.5
561
+ elsif ['base-foundation-walkout-basement.xml'].include? hpxml_file
562
+ hpxml_bldg.building_construction.number_of_conditioned_floors_above_grade = 2
563
+ elsif ['base-foundation-basement-garage.xml'].include? hpxml_file
564
+ hpxml_bldg.building_construction.conditioned_floor_area -= 400 * 2
565
+ hpxml_bldg.building_construction.conditioned_building_volume -= 400 * 2 * 8
566
+ hpxml_bldg.air_infiltration_measurements[0].infiltration_volume = hpxml_bldg.building_construction.conditioned_building_volume
567
+ elsif ['base-bldgtype-mf-unit-infil-compartmentalization-test.xml'].include? hpxml_file
568
+ hpxml_bldg.air_infiltration_measurements[0].a_ext = 0.2
569
+ end
570
+
571
+ # --------------- #
572
+ # HPXML Enclosure #
573
+ # --------------- #
574
+
575
+ # General logic for all files
576
+ (hpxml_bldg.roofs + hpxml_bldg.walls + hpxml_bldg.rim_joists).each do |surface|
577
+ surface.solar_absorptance = 0.7
578
+ surface.emittance = 0.92
684
579
  if surface.is_a? HPXML::Roof
685
- surface.radiant_barrier = nil
580
+ surface.roof_color = nil
581
+ else
582
+ surface.color = nil
686
583
  end
687
584
  end
688
- (hpxml.walls + hpxml.foundation_walls).each do |wall|
689
- wall.interior_finish_type = nil
690
- end
691
- hpxml.foundation_walls.each do |fwall|
692
- fwall.length = fwall.area / fwall.height
693
- fwall.area = nil
694
- end
695
- hpxml.doors[0].azimuth = nil
696
- elsif ['base-enclosure-2stories.xml',
697
- 'base-enclosure-2stories-garage.xml',
698
- 'base-hvac-ducts-area-fractions.xml'].include? hpxml_file
699
- hpxml.rim_joists << hpxml.rim_joists[-1].dup
700
- hpxml.rim_joists[-1].id = "RimJoist#{hpxml.rim_joists.size}"
701
- hpxml.rim_joists[-1].insulation_id = "RimJoist#{hpxml.rim_joists.size}Insulation"
702
- hpxml.rim_joists[-1].interior_adjacent_to = HPXML::LocationLivingSpace
703
- hpxml.rim_joists[-1].area = 116
704
- elsif ['base-foundation-conditioned-basement-wall-insulation.xml'].include? hpxml_file
705
- hpxml.foundation_walls.each do |foundation_wall|
706
- foundation_wall.insulation_interior_r_value = 10
707
- foundation_wall.insulation_interior_distance_to_top = 1
708
- foundation_wall.insulation_interior_distance_to_bottom = 8
709
- foundation_wall.insulation_exterior_r_value = 8.9
710
- foundation_wall.insulation_exterior_distance_to_top = 1
711
- foundation_wall.insulation_exterior_distance_to_bottom = 8
712
- end
713
- elsif ['base-foundation-walkout-basement.xml'].include? hpxml_file
714
- hpxml.foundation_walls.reverse_each do |foundation_wall|
715
- foundation_wall.delete
716
- end
717
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
718
- exterior_adjacent_to: HPXML::LocationGround,
719
- interior_adjacent_to: HPXML::LocationBasementConditioned,
720
- height: 8,
721
- area: 480,
722
- thickness: 8,
723
- depth_below_grade: 7,
724
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
725
- insulation_interior_r_value: 0,
726
- insulation_exterior_distance_to_top: 0,
727
- insulation_exterior_distance_to_bottom: 8,
728
- insulation_exterior_r_value: 8.9)
729
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
730
- exterior_adjacent_to: HPXML::LocationGround,
731
- interior_adjacent_to: HPXML::LocationBasementConditioned,
732
- height: 4,
733
- area: 120,
734
- thickness: 8,
735
- depth_below_grade: 3,
736
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
737
- insulation_interior_r_value: 0,
738
- insulation_exterior_distance_to_top: 0,
739
- insulation_exterior_distance_to_bottom: 4,
740
- insulation_exterior_r_value: 8.9)
741
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
742
- exterior_adjacent_to: HPXML::LocationGround,
743
- interior_adjacent_to: HPXML::LocationBasementConditioned,
744
- height: 2,
745
- area: 60,
746
- thickness: 8,
747
- depth_below_grade: 1,
748
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
749
- insulation_interior_r_value: 0,
750
- insulation_exterior_distance_to_top: 0,
751
- insulation_exterior_distance_to_bottom: 2,
752
- insulation_exterior_r_value: 8.9)
753
- hpxml.foundation_walls.each do |foundation_wall|
754
- hpxml.foundations[0].attached_to_foundation_wall_idrefs << foundation_wall.id
755
- end
756
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
757
- area: 20,
758
- azimuth: 0,
759
- ufactor: 0.33,
760
- shgc: 0.45,
761
- fraction_operable: 0.0,
762
- wall_idref: hpxml.foundation_walls[-1].id)
763
- elsif ['base-foundation-multiple.xml'].include? hpxml_file
764
- hpxml.foundations.add(id: "Foundation#{hpxml.foundations.size + 1}",
765
- foundation_type: HPXML::FoundationTypeCrawlspaceUnvented,
766
- within_infiltration_volume: false)
767
- hpxml.rim_joists.each do |rim_joist|
768
- next unless rim_joist.exterior_adjacent_to == HPXML::LocationOutside
769
-
770
- rim_joist.exterior_adjacent_to = HPXML::LocationCrawlspaceUnvented
771
- rim_joist.siding = nil
772
- end
773
- hpxml.rim_joists.add(id: "RimJoist#{hpxml.rim_joists.size + 1}",
774
- exterior_adjacent_to: HPXML::LocationOutside,
775
- interior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
776
- siding: HPXML::SidingTypeWood,
777
- area: 81,
778
- solar_absorptance: 0.7,
779
- emittance: 0.92,
780
- insulation_assembly_r_value: 4.0)
781
- hpxml.foundation_walls.each do |foundation_wall|
782
- foundation_wall.area /= 2.0
783
- end
784
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
785
- exterior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
786
- interior_adjacent_to: HPXML::LocationBasementUnconditioned,
787
- height: 8,
788
- area: 360,
789
- thickness: 8,
790
- depth_below_grade: 4,
791
- insulation_interior_r_value: 0,
792
- insulation_exterior_r_value: 0)
793
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
794
- exterior_adjacent_to: HPXML::LocationGround,
795
- interior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
796
- height: 4,
797
- area: 600,
798
- thickness: 8,
799
- depth_below_grade: 3,
800
- insulation_interior_r_value: 0,
801
- insulation_exterior_r_value: 0)
802
- hpxml.floors[0].area = 675
803
- hpxml.floors.add(id: "Floor#{hpxml.floors.size + 1}",
804
- exterior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
805
- interior_adjacent_to: HPXML::LocationLivingSpace,
806
- floor_type: HPXML::FloorTypeWoodFrame,
807
- area: 675,
808
- insulation_assembly_r_value: 18.7,
809
- floor_or_ceiling: HPXML::FloorOrCeilingFloor)
810
- hpxml.slabs[0].area = 675
811
- hpxml.slabs[0].exposed_perimeter = 75
812
- hpxml.slabs.add(id: "Slab#{hpxml.slabs.size + 1}",
813
- interior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
814
- area: 675,
815
- thickness: 0,
816
- exposed_perimeter: 75,
817
- perimeter_insulation_depth: 0,
818
- under_slab_insulation_width: 0,
819
- perimeter_insulation_r_value: 0,
820
- under_slab_insulation_r_value: 0,
821
- carpet_fraction: 0,
822
- carpet_r_value: 0)
823
- elsif ['base-foundation-complex.xml'].include? hpxml_file
824
- hpxml.foundation_walls.reverse_each do |foundation_wall|
825
- foundation_wall.delete
826
- end
827
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
828
- exterior_adjacent_to: HPXML::LocationGround,
829
- interior_adjacent_to: HPXML::LocationBasementConditioned,
830
- height: 8,
831
- area: 160,
832
- thickness: 8,
833
- depth_below_grade: 7,
834
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
835
- insulation_interior_r_value: 0,
836
- insulation_exterior_r_value: 0.0)
837
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
838
- exterior_adjacent_to: HPXML::LocationGround,
839
- interior_adjacent_to: HPXML::LocationBasementConditioned,
840
- height: 8,
841
- area: 240,
842
- thickness: 8,
843
- depth_below_grade: 7,
844
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
845
- insulation_interior_r_value: 0,
846
- insulation_exterior_distance_to_top: 0,
847
- insulation_exterior_distance_to_bottom: 8,
848
- insulation_exterior_r_value: 8.9)
849
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
850
- exterior_adjacent_to: HPXML::LocationGround,
851
- interior_adjacent_to: HPXML::LocationBasementConditioned,
852
- height: 4,
853
- area: 160,
854
- thickness: 8,
855
- depth_below_grade: 3,
856
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
857
- insulation_interior_r_value: 0,
858
- insulation_exterior_r_value: 0.0)
859
- hpxml.foundation_walls.add(id: "FoundationWall#{hpxml.foundation_walls.size + 1}",
860
- exterior_adjacent_to: HPXML::LocationGround,
861
- interior_adjacent_to: HPXML::LocationBasementConditioned,
862
- height: 4,
863
- area: 200,
864
- thickness: 8,
865
- depth_below_grade: 3,
866
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
867
- insulation_interior_r_value: 0,
868
- insulation_exterior_distance_to_top: 0,
869
- insulation_exterior_distance_to_bottom: 4,
870
- insulation_exterior_r_value: 8.9)
871
- hpxml.foundation_walls.each do |foundation_wall|
872
- hpxml.foundations[0].attached_to_foundation_wall_idrefs << foundation_wall.id
873
- end
874
- hpxml.slabs.reverse_each do |slab|
875
- slab.delete
876
- end
877
- hpxml.slabs.add(id: "Slab#{hpxml.slabs.size + 1}",
878
- interior_adjacent_to: HPXML::LocationBasementConditioned,
879
- area: 675,
880
- thickness: 4,
881
- exposed_perimeter: 75,
882
- perimeter_insulation_depth: 0,
883
- under_slab_insulation_width: 0,
884
- perimeter_insulation_r_value: 0,
885
- under_slab_insulation_r_value: 0,
886
- carpet_fraction: 0,
887
- carpet_r_value: 0)
888
- hpxml.slabs.add(id: "Slab#{hpxml.slabs.size + 1}",
889
- interior_adjacent_to: HPXML::LocationBasementConditioned,
890
- area: 675,
891
- thickness: 4,
892
- exposed_perimeter: 75,
893
- perimeter_insulation_depth: 1,
894
- under_slab_insulation_width: 0,
895
- perimeter_insulation_r_value: 5,
896
- under_slab_insulation_r_value: 0,
897
- carpet_fraction: 0,
898
- carpet_r_value: 0)
899
- hpxml.slabs.each do |slab|
900
- hpxml.foundations[0].attached_to_slab_idrefs << slab.id
901
- end
902
- elsif ['base-foundation-basement-garage.xml'].include? hpxml_file
903
- hpxml.roofs[0].area += 670
904
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
905
- exterior_adjacent_to: HPXML::LocationGarage,
906
- interior_adjacent_to: HPXML::LocationBasementConditioned,
907
- wall_type: HPXML::WallTypeWoodStud,
908
- area: 320,
909
- solar_absorptance: 0.7,
910
- emittance: 0.92,
911
- interior_finish_type: HPXML::InteriorFinishGypsumBoard,
912
- insulation_assembly_r_value: 23)
913
- hpxml.foundations[0].attached_to_wall_idrefs << hpxml.walls[-1].id
914
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
915
- exterior_adjacent_to: HPXML::LocationOutside,
916
- interior_adjacent_to: HPXML::LocationGarage,
917
- wall_type: HPXML::WallTypeWoodStud,
918
- siding: HPXML::SidingTypeWood,
919
- area: 320,
920
- solar_absorptance: 0.7,
921
- emittance: 0.92,
922
- insulation_assembly_r_value: 4)
923
- hpxml.floors.add(id: "Floor#{hpxml.floors.size + 1}",
924
- exterior_adjacent_to: HPXML::LocationGarage,
925
- interior_adjacent_to: HPXML::LocationLivingSpace,
926
- floor_type: HPXML::FloorTypeWoodFrame,
927
- area: 400,
928
- insulation_assembly_r_value: 39.3,
929
- floor_or_ceiling: HPXML::FloorOrCeilingFloor)
930
- hpxml.slabs[0].area -= 400
931
- hpxml.slabs[0].exposed_perimeter -= 40
932
- hpxml.slabs.add(id: "Slab#{hpxml.slabs.size + 1}",
933
- interior_adjacent_to: HPXML::LocationGarage,
934
- area: 400,
935
- thickness: 4,
936
- exposed_perimeter: 40,
937
- perimeter_insulation_depth: 0,
938
- under_slab_insulation_width: 0,
939
- depth_below_grade: 0,
940
- perimeter_insulation_r_value: 0,
941
- under_slab_insulation_r_value: 0,
942
- carpet_fraction: 0,
943
- carpet_r_value: 0)
944
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
945
- wall_idref: hpxml.walls[-3].id,
946
- area: 70,
947
- azimuth: 180,
948
- r_value: 4.4)
949
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
950
- wall_idref: hpxml.walls[-2].id,
951
- area: 4,
952
- azimuth: 0,
953
- r_value: 4.4)
954
- elsif ['base-enclosure-ceilingtypes.xml'].include? hpxml_file
955
- exterior_adjacent_to = hpxml.floors[0].exterior_adjacent_to
956
- area = hpxml.floors[0].area
957
- hpxml.floors.reverse_each do |floor|
958
- floor.delete
959
- end
960
- floors_map = { HPXML::FloorTypeSIP => 16.1,
961
- HPXML::FloorTypeConcrete => 3.2,
962
- HPXML::FloorTypeSteelFrame => 8.1 }
963
- floors_map.each_with_index do |(floor_type, assembly_r), _i|
964
- hpxml.floors.add(id: "Floor#{hpxml.floors.size + 1}",
965
- exterior_adjacent_to: exterior_adjacent_to,
966
- interior_adjacent_to: HPXML::LocationLivingSpace,
967
- floor_type: floor_type,
968
- area: area / floors_map.size,
969
- insulation_assembly_r_value: assembly_r,
970
- floor_or_ceiling: HPXML::FloorOrCeilingCeiling)
971
- end
972
- elsif ['base-enclosure-floortypes.xml'].include? hpxml_file
973
- exterior_adjacent_to = hpxml.floors[0].exterior_adjacent_to
974
- area = hpxml.floors[0].area
975
- ceiling = hpxml.floors[1].dup
976
- hpxml.floors.reverse_each do |floor|
977
- floor.delete
585
+ hpxml_bldg.roofs.each do |roof|
586
+ next unless roof.interior_adjacent_to == HPXML::LocationConditionedSpace
587
+
588
+ roof.interior_finish_type = HPXML::InteriorFinishGypsumBoard
978
589
  end
979
- floors_map = { HPXML::FloorTypeSIP => 16.1,
980
- HPXML::FloorTypeConcrete => 3.2,
981
- HPXML::FloorTypeSteelFrame => 8.1 }
982
- floors_map.each_with_index do |(floor_type, assembly_r), _i|
983
- hpxml.floors.add(id: "Floor#{hpxml.floors.size + 1}",
984
- exterior_adjacent_to: exterior_adjacent_to,
985
- interior_adjacent_to: HPXML::LocationLivingSpace,
986
- floor_type: floor_type,
987
- area: area / floors_map.size,
988
- insulation_assembly_r_value: assembly_r,
989
- floor_or_ceiling: HPXML::FloorOrCeilingFloor)
590
+ (hpxml_bldg.walls + hpxml_bldg.foundation_walls + hpxml_bldg.floors).each do |surface|
591
+ if surface.is_a?(HPXML::FoundationWall) && surface.interior_adjacent_to != HPXML::LocationBasementConditioned
592
+ surface.interior_finish_type = HPXML::InteriorFinishNone
593
+ end
594
+ next unless [HPXML::LocationConditionedSpace,
595
+ HPXML::LocationBasementConditioned].include?(surface.interior_adjacent_to) &&
596
+ [HPXML::LocationOutside,
597
+ HPXML::LocationGround,
598
+ HPXML::LocationGarage,
599
+ HPXML::LocationAtticUnvented,
600
+ HPXML::LocationAtticVented,
601
+ HPXML::LocationOtherHousingUnit,
602
+ HPXML::LocationBasementConditioned].include?(surface.exterior_adjacent_to)
603
+ next if surface.is_a?(HPXML::Floor) && surface.is_floor
604
+
605
+ surface.interior_finish_type = HPXML::InteriorFinishGypsumBoard
606
+ end
607
+ hpxml_bldg.attics.each do |attic|
608
+ if attic.attic_type == HPXML::AtticTypeUnvented
609
+ attic.within_infiltration_volume = false
610
+ elsif attic.attic_type == HPXML::AtticTypeVented
611
+ attic.vented_attic_sla = 0.003
612
+ end
990
613
  end
991
- hpxml.floors << ceiling
992
- hpxml.floors[-1].id = "Floor#{hpxml.floors.size}"
993
- hpxml.floors[-1].insulation_id = "Floor#{hpxml.floors.size}Insulation"
994
- elsif ['base-enclosure-walltypes.xml'].include? hpxml_file
995
- hpxml.rim_joists.reverse_each do |rim_joist|
996
- rim_joist.delete
614
+ hpxml_bldg.foundations.each do |foundation|
615
+ if foundation.foundation_type == HPXML::FoundationTypeCrawlspaceUnvented
616
+ foundation.within_infiltration_volume = false
617
+ elsif foundation.foundation_type == HPXML::FoundationTypeCrawlspaceVented
618
+ foundation.vented_crawlspace_sla = 0.00667
619
+ end
997
620
  end
998
- siding_types = [[HPXML::SidingTypeAluminum, HPXML::ColorDark],
999
- [HPXML::SidingTypeAsbestos, HPXML::ColorMedium],
1000
- [HPXML::SidingTypeBrick, HPXML::ColorReflective],
1001
- [HPXML::SidingTypeCompositeShingle, HPXML::ColorDark],
1002
- [HPXML::SidingTypeFiberCement, HPXML::ColorMediumDark],
1003
- [HPXML::SidingTypeMasonite, HPXML::ColorLight],
1004
- [HPXML::SidingTypeStucco, HPXML::ColorMedium],
1005
- [HPXML::SidingTypeSyntheticStucco, HPXML::ColorMediumDark],
1006
- [HPXML::SidingTypeVinyl, HPXML::ColorLight],
1007
- [HPXML::SidingTypeNone, HPXML::ColorMedium]]
1008
- siding_types.each do |siding_type|
1009
- hpxml.rim_joists.add(id: "RimJoist#{hpxml.rim_joists.size + 1}",
621
+ hpxml_bldg.skylights.each do |skylight|
622
+ skylight.interior_shading_factor_summer = 1.0
623
+ skylight.interior_shading_factor_winter = 1.0
624
+ end
625
+
626
+ # Logic that can only be applied based on the file name
627
+ if ['base-bldgtype-mf-unit-adjacent-to-multifamily-buffer-space.xml',
628
+ 'base-bldgtype-mf-unit-adjacent-to-non-freezing-space.xml',
629
+ 'base-bldgtype-mf-unit-adjacent-to-other-heated-space.xml',
630
+ 'base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml'].include? hpxml_file
631
+ if hpxml_file == 'base-bldgtype-mf-unit-adjacent-to-multifamily-buffer-space.xml'
632
+ adjacent_to = HPXML::LocationOtherMultifamilyBufferSpace
633
+ elsif hpxml_file == 'base-bldgtype-mf-unit-adjacent-to-non-freezing-space.xml'
634
+ adjacent_to = HPXML::LocationOtherNonFreezingSpace
635
+ elsif hpxml_file == 'base-bldgtype-mf-unit-adjacent-to-other-heated-space.xml'
636
+ adjacent_to = HPXML::LocationOtherHeatedSpace
637
+ elsif hpxml_file == 'base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml'
638
+ adjacent_to = HPXML::LocationOtherHousingUnit
639
+ end
640
+ wall = hpxml_bldg.walls.select { |w|
641
+ w.interior_adjacent_to == HPXML::LocationConditionedSpace &&
642
+ w.exterior_adjacent_to == HPXML::LocationOtherHousingUnit
643
+ }[0]
644
+ wall.exterior_adjacent_to = adjacent_to
645
+ hpxml_bldg.floors[0].exterior_adjacent_to = adjacent_to
646
+ hpxml_bldg.floors[1].exterior_adjacent_to = adjacent_to
647
+ if hpxml_file != 'base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml'
648
+ wall.insulation_assembly_r_value = 23
649
+ hpxml_bldg.floors[0].insulation_assembly_r_value = 18.7
650
+ hpxml_bldg.floors[1].insulation_assembly_r_value = 18.7
651
+ end
652
+ hpxml_bldg.windows.each do |window|
653
+ window.area = (window.area * 0.35).round(1)
654
+ end
655
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
656
+ wall_idref: wall.id,
657
+ area: 20,
658
+ azimuth: 0,
659
+ r_value: 4.4)
660
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_location = adjacent_to
661
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_location = adjacent_to
662
+ hpxml_bldg.water_heating_systems[0].location = adjacent_to
663
+ hpxml_bldg.clothes_washers[0].location = adjacent_to
664
+ hpxml_bldg.clothes_dryers[0].location = adjacent_to
665
+ hpxml_bldg.dishwashers[0].location = adjacent_to
666
+ hpxml_bldg.refrigerators[0].location = adjacent_to
667
+ hpxml_bldg.cooking_ranges[0].location = adjacent_to
668
+ elsif ['base-bldgtype-mf-unit-adjacent-to-multiple.xml'].include? hpxml_file
669
+ wall = hpxml_bldg.walls.select { |w|
670
+ w.interior_adjacent_to == HPXML::LocationConditionedSpace &&
671
+ w.exterior_adjacent_to == HPXML::LocationOtherHousingUnit
672
+ }[0]
673
+ wall.delete
674
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
675
+ exterior_adjacent_to: HPXML::LocationOtherHeatedSpace,
676
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
677
+ wall_type: HPXML::WallTypeWoodStud,
678
+ area: 100,
679
+ solar_absorptance: 0.7,
680
+ emittance: 0.92,
681
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
682
+ insulation_assembly_r_value: 23.0)
683
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
684
+ exterior_adjacent_to: HPXML::LocationOtherMultifamilyBufferSpace,
685
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
686
+ wall_type: HPXML::WallTypeWoodStud,
687
+ area: 100,
688
+ solar_absorptance: 0.7,
689
+ emittance: 0.92,
690
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
691
+ insulation_assembly_r_value: 23.0)
692
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
693
+ exterior_adjacent_to: HPXML::LocationOtherNonFreezingSpace,
694
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
695
+ wall_type: HPXML::WallTypeWoodStud,
696
+ area: 100,
697
+ solar_absorptance: 0.7,
698
+ emittance: 0.92,
699
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
700
+ insulation_assembly_r_value: 23.0)
701
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
702
+ exterior_adjacent_to: HPXML::LocationOtherHousingUnit,
703
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
704
+ wall_type: HPXML::WallTypeWoodStud,
705
+ area: 100,
706
+ solar_absorptance: 0.7,
707
+ emittance: 0.92,
708
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
709
+ insulation_assembly_r_value: 4.0)
710
+ hpxml_bldg.floors[0].delete
711
+ hpxml_bldg.floors[0].id = 'Floor1'
712
+ hpxml_bldg.floors[0].insulation_id = 'Floor1Insulation'
713
+ hpxml_bldg.floors.add(id: "Floor#{hpxml_bldg.floors.size + 1}",
714
+ exterior_adjacent_to: HPXML::LocationOtherNonFreezingSpace,
715
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
716
+ floor_type: HPXML::FloorTypeWoodFrame,
717
+ area: 550,
718
+ insulation_assembly_r_value: 18.7,
719
+ floor_or_ceiling: HPXML::FloorOrCeilingFloor)
720
+ hpxml_bldg.floors.add(id: "Floor#{hpxml_bldg.floors.size + 1}",
721
+ exterior_adjacent_to: HPXML::LocationOtherMultifamilyBufferSpace,
722
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
723
+ floor_type: HPXML::FloorTypeWoodFrame,
724
+ area: 200,
725
+ insulation_assembly_r_value: 18.7,
726
+ floor_or_ceiling: HPXML::FloorOrCeilingFloor)
727
+ hpxml_bldg.floors.add(id: "Floor#{hpxml_bldg.floors.size + 1}",
728
+ exterior_adjacent_to: HPXML::LocationOtherHeatedSpace,
729
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
730
+ floor_type: HPXML::FloorTypeWoodFrame,
731
+ area: 150,
732
+ insulation_assembly_r_value: 2.1,
733
+ floor_or_ceiling: HPXML::FloorOrCeilingFloor)
734
+ wall = hpxml_bldg.walls.select { |w|
735
+ w.interior_adjacent_to == HPXML::LocationConditionedSpace &&
736
+ w.exterior_adjacent_to == HPXML::LocationOtherMultifamilyBufferSpace
737
+ }[0]
738
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
739
+ area: 50,
740
+ azimuth: 270,
741
+ ufactor: 0.33,
742
+ shgc: 0.45,
743
+ fraction_operable: 0.67,
744
+ wall_idref: wall.id)
745
+ wall = hpxml_bldg.walls.select { |w|
746
+ w.interior_adjacent_to == HPXML::LocationConditionedSpace &&
747
+ w.exterior_adjacent_to == HPXML::LocationOtherHeatedSpace
748
+ }[0]
749
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
750
+ wall_idref: wall.id,
751
+ area: 20,
752
+ azimuth: 0,
753
+ r_value: 4.4)
754
+ wall = hpxml_bldg.walls.select { |w|
755
+ w.interior_adjacent_to == HPXML::LocationConditionedSpace &&
756
+ w.exterior_adjacent_to == HPXML::LocationOtherHousingUnit
757
+ }[0]
758
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
759
+ wall_idref: wall.id,
760
+ area: 20,
761
+ azimuth: 0,
762
+ r_value: 4.4)
763
+ elsif ['base-enclosure-orientations.xml'].include? hpxml_file
764
+ hpxml_bldg.windows.each do |window|
765
+ window.orientation = { 0 => 'north', 90 => 'east', 180 => 'south', 270 => 'west' }[window.azimuth]
766
+ window.azimuth = nil
767
+ end
768
+ hpxml_bldg.doors[0].delete
769
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
770
+ wall_idref: 'Wall1',
771
+ area: 20,
772
+ orientation: HPXML::OrientationNorth,
773
+ r_value: 4.4)
774
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
775
+ wall_idref: 'Wall1',
776
+ area: 20,
777
+ orientation: HPXML::OrientationSouth,
778
+ r_value: 4.4)
779
+ elsif ['base-foundation-unconditioned-basement.xml'].include? hpxml_file
780
+ hpxml_bldg.foundations[0].within_infiltration_volume = false
781
+ elsif ['base-atticroof-conditioned.xml'].include? hpxml_file
782
+ hpxml_bldg.attics.add(id: "Attic#{hpxml_bldg.attics.size + 1}",
783
+ attic_type: HPXML::AtticTypeUnvented,
784
+ within_infiltration_volume: false)
785
+ hpxml_bldg.roofs.each do |roof|
786
+ roof.area = 1006.0 / hpxml_bldg.roofs.size
787
+ roof.insulation_assembly_r_value = 25.8
788
+ end
789
+ hpxml_bldg.roofs.add(id: "Roof#{hpxml_bldg.roofs.size + 1}",
790
+ interior_adjacent_to: HPXML::LocationAtticUnvented,
791
+ area: 504,
792
+ roof_type: HPXML::RoofTypeAsphaltShingles,
793
+ solar_absorptance: 0.7,
794
+ emittance: 0.92,
795
+ pitch: 6,
796
+ radiant_barrier: false,
797
+ insulation_assembly_r_value: 2.3)
798
+ hpxml_bldg.rim_joists.each do |rim_joist|
799
+ rim_joist.area = 116.0 / hpxml_bldg.rim_joists.size
800
+ end
801
+ hpxml_bldg.walls.each do |wall|
802
+ wall.area = 1200.0 / hpxml_bldg.walls.size
803
+ end
804
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
805
+ exterior_adjacent_to: HPXML::LocationAtticUnvented,
806
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
807
+ wall_type: HPXML::WallTypeWoodStud,
808
+ area: 316,
809
+ solar_absorptance: 0.7,
810
+ emittance: 0.92,
811
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
812
+ insulation_assembly_r_value: 23.0)
813
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
814
+ exterior_adjacent_to: HPXML::LocationOutside,
815
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
816
+ wall_type: HPXML::WallTypeWoodStud,
817
+ siding: HPXML::SidingTypeWood,
818
+ area: 240,
819
+ solar_absorptance: 0.7,
820
+ emittance: 0.92,
821
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
822
+ insulation_assembly_r_value: 22.3)
823
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
1010
824
  exterior_adjacent_to: HPXML::LocationOutside,
825
+ interior_adjacent_to: HPXML::LocationAtticUnvented,
826
+ attic_wall_type: HPXML::AtticWallTypeGable,
827
+ wall_type: HPXML::WallTypeWoodStud,
828
+ siding: HPXML::SidingTypeWood,
829
+ area: 50,
830
+ solar_absorptance: 0.7,
831
+ emittance: 0.92,
832
+ insulation_assembly_r_value: 4.0)
833
+ hpxml_bldg.foundation_walls.each do |foundation_wall|
834
+ foundation_wall.area = 1200.0 / hpxml_bldg.foundation_walls.size
835
+ end
836
+ hpxml_bldg.floors.add(id: "Floor#{hpxml_bldg.floors.size + 1}",
837
+ exterior_adjacent_to: HPXML::LocationAtticUnvented,
838
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
839
+ floor_type: HPXML::FloorTypeWoodFrame,
840
+ area: 450,
841
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
842
+ insulation_assembly_r_value: 39.3,
843
+ floor_or_ceiling: HPXML::FloorOrCeilingCeiling)
844
+ hpxml_bldg.slabs[0].area = 1350
845
+ hpxml_bldg.slabs[0].exposed_perimeter = 150
846
+ hpxml_bldg.windows[1].area = 108
847
+ hpxml_bldg.windows[3].area = 108
848
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
849
+ area: 12,
850
+ azimuth: 90,
851
+ ufactor: 0.33,
852
+ shgc: 0.45,
853
+ fraction_operable: 0,
854
+ wall_idref: hpxml_bldg.walls[-2].id)
855
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
856
+ area: 62,
857
+ azimuth: 270,
858
+ ufactor: 0.3,
859
+ shgc: 0.45,
860
+ fraction_operable: 0,
861
+ wall_idref: hpxml_bldg.walls[-2].id)
862
+ elsif ['base-foundation-unconditioned-basement-above-grade.xml'].include? hpxml_file
863
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
864
+ area: 20,
865
+ azimuth: 0,
866
+ ufactor: 0.33,
867
+ shgc: 0.45,
868
+ fraction_operable: 0.0,
869
+ wall_idref: hpxml_bldg.foundation_walls[0].id)
870
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
871
+ area: 10,
872
+ azimuth: 90,
873
+ ufactor: 0.33,
874
+ shgc: 0.45,
875
+ fraction_operable: 0.0,
876
+ wall_idref: hpxml_bldg.foundation_walls[0].id)
877
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
878
+ area: 20,
879
+ azimuth: 180,
880
+ ufactor: 0.33,
881
+ shgc: 0.45,
882
+ fraction_operable: 0.0,
883
+ wall_idref: hpxml_bldg.foundation_walls[0].id)
884
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
885
+ area: 10,
886
+ azimuth: 270,
887
+ ufactor: 0.33,
888
+ shgc: 0.45,
889
+ fraction_operable: 0.0,
890
+ wall_idref: hpxml_bldg.foundation_walls[0].id)
891
+ elsif ['base-enclosure-skylights-physical-properties.xml'].include? hpxml_file
892
+ hpxml_bldg.skylights[0].ufactor = nil
893
+ hpxml_bldg.skylights[0].shgc = nil
894
+ hpxml_bldg.skylights[0].glass_layers = HPXML::WindowLayersSinglePane
895
+ hpxml_bldg.skylights[0].frame_type = HPXML::WindowFrameTypeWood
896
+ hpxml_bldg.skylights[0].glass_type = HPXML::WindowGlassTypeTinted
897
+ hpxml_bldg.skylights[1].ufactor = nil
898
+ hpxml_bldg.skylights[1].shgc = nil
899
+ hpxml_bldg.skylights[1].glass_layers = HPXML::WindowLayersDoublePane
900
+ hpxml_bldg.skylights[1].frame_type = HPXML::WindowFrameTypeMetal
901
+ hpxml_bldg.skylights[1].thermal_break = true
902
+ hpxml_bldg.skylights[1].glass_type = HPXML::WindowGlassTypeLowE
903
+ hpxml_bldg.skylights[1].gas_fill = HPXML::WindowGasKrypton
904
+ elsif ['base-enclosure-skylights-shading.xml'].include? hpxml_file
905
+ hpxml_bldg.skylights[0].exterior_shading_factor_summer = 0.1
906
+ hpxml_bldg.skylights[0].exterior_shading_factor_winter = 0.9
907
+ hpxml_bldg.skylights[0].interior_shading_factor_summer = 0.01
908
+ hpxml_bldg.skylights[0].interior_shading_factor_winter = 0.99
909
+ hpxml_bldg.skylights[1].exterior_shading_factor_summer = 0.5
910
+ hpxml_bldg.skylights[1].exterior_shading_factor_winter = 0.0
911
+ hpxml_bldg.skylights[1].interior_shading_factor_summer = 0.5
912
+ hpxml_bldg.skylights[1].interior_shading_factor_winter = 1.0
913
+ elsif ['base-enclosure-windows-physical-properties.xml'].include? hpxml_file
914
+ hpxml_bldg.windows[0].ufactor = nil
915
+ hpxml_bldg.windows[0].shgc = nil
916
+ hpxml_bldg.windows[0].glass_layers = HPXML::WindowLayersSinglePane
917
+ hpxml_bldg.windows[0].frame_type = HPXML::WindowFrameTypeWood
918
+ hpxml_bldg.windows[0].glass_type = HPXML::WindowGlassTypeTinted
919
+ hpxml_bldg.windows[1].ufactor = nil
920
+ hpxml_bldg.windows[1].shgc = nil
921
+ hpxml_bldg.windows[1].glass_layers = HPXML::WindowLayersDoublePane
922
+ hpxml_bldg.windows[1].frame_type = HPXML::WindowFrameTypeVinyl
923
+ hpxml_bldg.windows[1].glass_type = HPXML::WindowGlassTypeReflective
924
+ hpxml_bldg.windows[1].gas_fill = HPXML::WindowGasAir
925
+ hpxml_bldg.windows[2].ufactor = nil
926
+ hpxml_bldg.windows[2].shgc = nil
927
+ hpxml_bldg.windows[2].glass_layers = HPXML::WindowLayersDoublePane
928
+ hpxml_bldg.windows[2].frame_type = HPXML::WindowFrameTypeMetal
929
+ hpxml_bldg.windows[2].thermal_break = true
930
+ hpxml_bldg.windows[2].glass_type = HPXML::WindowGlassTypeLowE
931
+ hpxml_bldg.windows[2].gas_fill = HPXML::WindowGasArgon
932
+ hpxml_bldg.windows[3].ufactor = nil
933
+ hpxml_bldg.windows[3].shgc = nil
934
+ hpxml_bldg.windows[3].glass_layers = HPXML::WindowLayersGlassBlock
935
+ elsif ['base-enclosure-windows-shading.xml'].include? hpxml_file
936
+ hpxml_bldg.windows[1].exterior_shading_factor_summer = 0.5
937
+ hpxml_bldg.windows[1].exterior_shading_factor_winter = 0.5
938
+ hpxml_bldg.windows[1].interior_shading_factor_summer = 0.5
939
+ hpxml_bldg.windows[1].interior_shading_factor_winter = 0.5
940
+ hpxml_bldg.windows[2].exterior_shading_factor_summer = 0.1
941
+ hpxml_bldg.windows[2].exterior_shading_factor_winter = 0.9
942
+ hpxml_bldg.windows[2].interior_shading_factor_summer = 0.01
943
+ hpxml_bldg.windows[2].interior_shading_factor_winter = 0.99
944
+ hpxml_bldg.windows[3].exterior_shading_factor_summer = 0.0
945
+ hpxml_bldg.windows[3].exterior_shading_factor_winter = 1.0
946
+ hpxml_bldg.windows[3].interior_shading_factor_summer = 0.0
947
+ hpxml_bldg.windows[3].interior_shading_factor_winter = 1.0
948
+ elsif ['base-enclosure-thermal-mass.xml'].include? hpxml_file
949
+ hpxml_bldg.partition_wall_mass.area_fraction = 0.8
950
+ hpxml_bldg.partition_wall_mass.interior_finish_type = HPXML::InteriorFinishGypsumBoard
951
+ hpxml_bldg.partition_wall_mass.interior_finish_thickness = 0.25
952
+ hpxml_bldg.furniture_mass.area_fraction = 0.8
953
+ hpxml_bldg.furniture_mass.type = HPXML::FurnitureMassTypeHeavyWeight
954
+ elsif ['base-misc-defaults.xml'].include? hpxml_file
955
+ hpxml_bldg.attics.reverse_each do |attic|
956
+ attic.delete
957
+ end
958
+ hpxml_bldg.foundations.reverse_each do |foundation|
959
+ foundation.delete
960
+ end
961
+ hpxml_bldg.air_infiltration_measurements[0].infiltration_volume = nil
962
+ (hpxml_bldg.roofs + hpxml_bldg.walls + hpxml_bldg.rim_joists).each do |surface|
963
+ surface.solar_absorptance = nil
964
+ surface.emittance = nil
965
+ if surface.is_a? HPXML::Roof
966
+ surface.radiant_barrier = nil
967
+ end
968
+ end
969
+ (hpxml_bldg.walls + hpxml_bldg.foundation_walls).each do |wall|
970
+ wall.interior_finish_type = nil
971
+ end
972
+ hpxml_bldg.foundation_walls.each do |fwall|
973
+ fwall.length = fwall.area / fwall.height
974
+ fwall.area = nil
975
+ end
976
+ hpxml_bldg.doors[0].azimuth = nil
977
+ elsif ['base-enclosure-2stories.xml',
978
+ 'base-enclosure-2stories-garage.xml',
979
+ 'base-hvac-ducts-area-fractions.xml'].include? hpxml_file
980
+ hpxml_bldg.rim_joists << hpxml_bldg.rim_joists[-1].dup
981
+ hpxml_bldg.rim_joists[-1].id = "RimJoist#{hpxml_bldg.rim_joists.size}"
982
+ hpxml_bldg.rim_joists[-1].insulation_id = "RimJoist#{hpxml_bldg.rim_joists.size}Insulation"
983
+ hpxml_bldg.rim_joists[-1].interior_adjacent_to = HPXML::LocationConditionedSpace
984
+ hpxml_bldg.rim_joists[-1].area = 116
985
+ elsif ['base-foundation-conditioned-basement-wall-insulation.xml'].include? hpxml_file
986
+ hpxml_bldg.foundation_walls.each do |foundation_wall|
987
+ foundation_wall.insulation_interior_r_value = 10
988
+ foundation_wall.insulation_interior_distance_to_top = 1
989
+ foundation_wall.insulation_interior_distance_to_bottom = 8
990
+ foundation_wall.insulation_exterior_r_value = 8.9
991
+ foundation_wall.insulation_exterior_distance_to_top = 1
992
+ foundation_wall.insulation_exterior_distance_to_bottom = 8
993
+ end
994
+ elsif ['base-foundation-walkout-basement.xml'].include? hpxml_file
995
+ hpxml_bldg.foundation_walls.reverse_each do |foundation_wall|
996
+ foundation_wall.delete
997
+ end
998
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
999
+ exterior_adjacent_to: HPXML::LocationGround,
1000
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1001
+ height: 8,
1002
+ area: 480,
1003
+ thickness: 8,
1004
+ depth_below_grade: 7,
1005
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
1006
+ insulation_interior_r_value: 0,
1007
+ insulation_exterior_distance_to_top: 0,
1008
+ insulation_exterior_distance_to_bottom: 8,
1009
+ insulation_exterior_r_value: 8.9)
1010
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
1011
+ exterior_adjacent_to: HPXML::LocationGround,
1012
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1013
+ height: 8,
1014
+ area: 240,
1015
+ thickness: 8,
1016
+ depth_below_grade: 3,
1017
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
1018
+ insulation_interior_r_value: 0,
1019
+ insulation_exterior_distance_to_top: 0,
1020
+ insulation_exterior_distance_to_bottom: 8,
1021
+ insulation_exterior_r_value: 8.9)
1022
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
1023
+ exterior_adjacent_to: HPXML::LocationGround,
1024
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1025
+ height: 8,
1026
+ area: 240,
1027
+ thickness: 8,
1028
+ depth_below_grade: 1,
1029
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
1030
+ insulation_interior_r_value: 0,
1031
+ insulation_exterior_distance_to_top: 0,
1032
+ insulation_exterior_distance_to_bottom: 8,
1033
+ insulation_exterior_r_value: 8.9)
1034
+ hpxml_bldg.foundation_walls.each do |foundation_wall|
1035
+ hpxml_bldg.foundations[0].attached_to_foundation_wall_idrefs << foundation_wall.id
1036
+ end
1037
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
1038
+ area: 20,
1039
+ azimuth: 0,
1040
+ ufactor: 0.33,
1041
+ shgc: 0.45,
1042
+ fraction_operable: 0.0,
1043
+ wall_idref: hpxml_bldg.foundation_walls[-1].id)
1044
+ elsif ['base-foundation-multiple.xml'].include? hpxml_file
1045
+ hpxml_bldg.foundations.add(id: "Foundation#{hpxml_bldg.foundations.size + 1}",
1046
+ foundation_type: HPXML::FoundationTypeCrawlspaceUnvented,
1047
+ within_infiltration_volume: false)
1048
+ hpxml_bldg.rim_joists.each do |rim_joist|
1049
+ next unless rim_joist.exterior_adjacent_to == HPXML::LocationOutside
1050
+
1051
+ rim_joist.exterior_adjacent_to = HPXML::LocationCrawlspaceUnvented
1052
+ rim_joist.siding = nil
1053
+ end
1054
+ hpxml_bldg.rim_joists.add(id: "RimJoist#{hpxml_bldg.rim_joists.size + 1}",
1055
+ exterior_adjacent_to: HPXML::LocationOutside,
1056
+ interior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
1057
+ siding: HPXML::SidingTypeWood,
1058
+ area: 81,
1059
+ solar_absorptance: 0.7,
1060
+ emittance: 0.92,
1061
+ insulation_assembly_r_value: 4.0)
1062
+ hpxml_bldg.foundation_walls.each do |foundation_wall|
1063
+ foundation_wall.area /= 2.0
1064
+ end
1065
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
1066
+ exterior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
1067
+ interior_adjacent_to: HPXML::LocationBasementUnconditioned,
1068
+ height: 8,
1069
+ area: 360,
1070
+ thickness: 8,
1071
+ depth_below_grade: 4,
1072
+ insulation_interior_r_value: 0,
1073
+ insulation_exterior_r_value: 0)
1074
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
1075
+ exterior_adjacent_to: HPXML::LocationGround,
1076
+ interior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
1077
+ height: 4,
1078
+ area: 600,
1079
+ thickness: 8,
1080
+ depth_below_grade: 3,
1081
+ insulation_interior_r_value: 0,
1082
+ insulation_exterior_r_value: 0)
1083
+ hpxml_bldg.floors[0].area = 675
1084
+ hpxml_bldg.floors.add(id: "Floor#{hpxml_bldg.floors.size + 1}",
1085
+ exterior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
1086
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
1087
+ floor_type: HPXML::FloorTypeWoodFrame,
1088
+ area: 675,
1089
+ insulation_assembly_r_value: 18.7,
1090
+ floor_or_ceiling: HPXML::FloorOrCeilingFloor)
1091
+ hpxml_bldg.slabs[0].area = 675
1092
+ hpxml_bldg.slabs[0].exposed_perimeter = 75
1093
+ hpxml_bldg.slabs.add(id: "Slab#{hpxml_bldg.slabs.size + 1}",
1094
+ interior_adjacent_to: HPXML::LocationCrawlspaceUnvented,
1095
+ area: 675,
1096
+ thickness: 0,
1097
+ exposed_perimeter: 75,
1098
+ perimeter_insulation_depth: 0,
1099
+ under_slab_insulation_width: 0,
1100
+ perimeter_insulation_r_value: 0,
1101
+ under_slab_insulation_r_value: 0,
1102
+ carpet_fraction: 0,
1103
+ carpet_r_value: 0)
1104
+ elsif ['base-foundation-complex.xml'].include? hpxml_file
1105
+ hpxml_bldg.foundation_walls.reverse_each do |foundation_wall|
1106
+ foundation_wall.delete
1107
+ end
1108
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
1109
+ exterior_adjacent_to: HPXML::LocationGround,
1110
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1111
+ height: 8,
1112
+ area: 160,
1113
+ thickness: 8,
1114
+ depth_below_grade: 7,
1115
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
1116
+ insulation_interior_r_value: 0,
1117
+ insulation_exterior_r_value: 0.0)
1118
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
1119
+ exterior_adjacent_to: HPXML::LocationGround,
1120
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1121
+ height: 8,
1122
+ area: 240,
1123
+ thickness: 8,
1124
+ depth_below_grade: 7,
1125
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
1126
+ insulation_interior_r_value: 0,
1127
+ insulation_exterior_distance_to_top: 0,
1128
+ insulation_exterior_distance_to_bottom: 8,
1129
+ insulation_exterior_r_value: 8.9)
1130
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
1131
+ exterior_adjacent_to: HPXML::LocationGround,
1132
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1133
+ height: 8,
1134
+ area: 320,
1135
+ thickness: 8,
1136
+ depth_below_grade: 3,
1137
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
1138
+ insulation_interior_r_value: 0,
1139
+ insulation_exterior_r_value: 0.0)
1140
+ hpxml_bldg.foundation_walls.add(id: "FoundationWall#{hpxml_bldg.foundation_walls.size + 1}",
1141
+ exterior_adjacent_to: HPXML::LocationGround,
1142
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1143
+ height: 8,
1144
+ area: 400,
1145
+ thickness: 8,
1146
+ depth_below_grade: 3,
1147
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
1148
+ insulation_interior_r_value: 0,
1149
+ insulation_exterior_distance_to_top: 0,
1150
+ insulation_exterior_distance_to_bottom: 8,
1151
+ insulation_exterior_r_value: 8.9)
1152
+ hpxml_bldg.foundation_walls.each do |foundation_wall|
1153
+ hpxml_bldg.foundations[0].attached_to_foundation_wall_idrefs << foundation_wall.id
1154
+ end
1155
+ hpxml_bldg.slabs.reverse_each do |slab|
1156
+ slab.delete
1157
+ end
1158
+ hpxml_bldg.slabs.add(id: "Slab#{hpxml_bldg.slabs.size + 1}",
1159
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1160
+ area: 1150,
1161
+ thickness: 4,
1162
+ exposed_perimeter: 120,
1163
+ perimeter_insulation_depth: 0,
1164
+ under_slab_insulation_width: 0,
1165
+ perimeter_insulation_r_value: 0,
1166
+ under_slab_insulation_r_value: 0,
1167
+ carpet_fraction: 0,
1168
+ carpet_r_value: 0)
1169
+ hpxml_bldg.slabs.add(id: "Slab#{hpxml_bldg.slabs.size + 1}",
1011
1170
  interior_adjacent_to: HPXML::LocationBasementConditioned,
1012
- siding: siding_type[0],
1013
- color: siding_type[1],
1014
- area: 116 / siding_types.size,
1171
+ area: 200,
1172
+ thickness: 4,
1173
+ exposed_perimeter: 30,
1174
+ perimeter_insulation_depth: 1,
1175
+ under_slab_insulation_width: 0,
1176
+ perimeter_insulation_r_value: 5,
1177
+ under_slab_insulation_r_value: 0,
1178
+ carpet_fraction: 0,
1179
+ carpet_r_value: 0)
1180
+ hpxml_bldg.slabs.each do |slab|
1181
+ hpxml_bldg.foundations[0].attached_to_slab_idrefs << slab.id
1182
+ end
1183
+ elsif ['base-foundation-basement-garage.xml'].include? hpxml_file
1184
+ hpxml_bldg.roofs[0].area += 670
1185
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
1186
+ exterior_adjacent_to: HPXML::LocationGarage,
1187
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1188
+ wall_type: HPXML::WallTypeWoodStud,
1189
+ area: 320,
1190
+ solar_absorptance: 0.7,
1015
1191
  emittance: 0.92,
1016
- insulation_assembly_r_value: 23.0)
1017
- hpxml.foundations[0].attached_to_rim_joist_idrefs << hpxml.rim_joists[-1].id
1018
- end
1019
- gable_walls = hpxml.walls.select { |w| w.interior_adjacent_to == HPXML::LocationAtticUnvented }
1020
- hpxml.walls.reverse_each do |wall|
1021
- wall.delete
1022
- end
1023
- walls_map = { HPXML::WallTypeCMU => 12,
1024
- HPXML::WallTypeDoubleWoodStud => 28.7,
1025
- HPXML::WallTypeICF => 21,
1026
- HPXML::WallTypeLog => 7.1,
1027
- HPXML::WallTypeSIP => 16.1,
1028
- HPXML::WallTypeConcrete => 1.35,
1029
- HPXML::WallTypeSteelStud => 8.1,
1030
- HPXML::WallTypeStone => 5.4,
1031
- HPXML::WallTypeStrawBale => 58.8,
1032
- HPXML::WallTypeBrick => 7.9,
1033
- HPXML::WallTypeAdobe => 5.0 }
1034
- siding_types = [[HPXML::SidingTypeAluminum, HPXML::ColorReflective],
1035
- [HPXML::SidingTypeAsbestos, HPXML::ColorLight],
1036
- [HPXML::SidingTypeBrick, HPXML::ColorMediumDark],
1037
- [HPXML::SidingTypeCompositeShingle, HPXML::ColorReflective],
1038
- [HPXML::SidingTypeFiberCement, HPXML::ColorMedium],
1039
- [HPXML::SidingTypeMasonite, HPXML::ColorDark],
1040
- [HPXML::SidingTypeStucco, HPXML::ColorLight],
1041
- [HPXML::SidingTypeSyntheticStucco, HPXML::ColorMedium],
1042
- [HPXML::SidingTypeVinyl, HPXML::ColorDark],
1043
- [HPXML::SidingTypeNone, HPXML::ColorMedium]]
1044
- int_finish_types = [[HPXML::InteriorFinishGypsumBoard, 0.5],
1045
- [HPXML::InteriorFinishGypsumBoard, 1.0],
1046
- [HPXML::InteriorFinishGypsumCompositeBoard, 0.5],
1047
- [HPXML::InteriorFinishPlaster, 0.5],
1048
- [HPXML::InteriorFinishWood, 0.5],
1049
- [HPXML::InteriorFinishNone, nil]]
1050
- walls_map.each_with_index do |(wall_type, assembly_r), i|
1051
- hpxml.walls.add(id: "Wall#{hpxml.walls.size + 1}",
1052
- exterior_adjacent_to: HPXML::LocationOutside,
1053
- interior_adjacent_to: HPXML::LocationLivingSpace,
1054
- wall_type: wall_type,
1055
- siding: siding_types[i % siding_types.size][0],
1056
- color: siding_types[i % siding_types.size][1],
1057
- area: 1200 / walls_map.size,
1058
- emittance: 0.92,
1059
- interior_finish_type: int_finish_types[i % int_finish_types.size][0],
1060
- interior_finish_thickness: int_finish_types[i % int_finish_types.size][1],
1061
- insulation_assembly_r_value: assembly_r)
1062
- end
1063
- gable_walls.each do |gable_wall|
1064
- hpxml.walls << gable_wall
1065
- hpxml.walls[-1].id = "Wall#{hpxml.walls.size}"
1066
- hpxml.walls[-1].insulation_id = "Wall#{hpxml.walls.size}Insulation"
1067
- hpxml.attics[0].attached_to_wall_idrefs << hpxml.walls[-1].id
1068
- end
1069
- hpxml.windows.reverse_each do |window|
1070
- window.delete
1071
- end
1072
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
1073
- area: 108 / 8,
1074
- azimuth: 0,
1075
- ufactor: 0.33,
1076
- shgc: 0.45,
1077
- fraction_operable: 0.67,
1078
- wall_idref: 'Wall1')
1079
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
1080
- area: 72 / 8,
1081
- azimuth: 90,
1082
- ufactor: 0.33,
1083
- shgc: 0.45,
1084
- fraction_operable: 0.67,
1085
- wall_idref: 'Wall2')
1086
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
1087
- area: 108 / 8,
1088
- azimuth: 180,
1089
- ufactor: 0.33,
1090
- shgc: 0.45,
1091
- fraction_operable: 0.67,
1092
- wall_idref: 'Wall3')
1093
- hpxml.windows.add(id: "Window#{hpxml.windows.size + 1}",
1094
- area: 72 / 8,
1095
- azimuth: 270,
1096
- ufactor: 0.33,
1097
- shgc: 0.45,
1098
- fraction_operable: 0.67,
1099
- wall_idref: 'Wall4')
1100
- hpxml.doors.reverse_each do |door|
1101
- door.delete
1102
- end
1103
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
1104
- wall_idref: 'Wall9',
1105
- area: 20,
1106
- azimuth: 0,
1107
- r_value: 4.4)
1108
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
1109
- wall_idref: 'Wall10',
1110
- area: 20,
1111
- azimuth: 180,
1112
- r_value: 4.4)
1113
- elsif ['base-enclosure-rooftypes.xml'].include? hpxml_file
1114
- hpxml.roofs.reverse_each do |roof|
1115
- roof.delete
1192
+ interior_finish_type: HPXML::InteriorFinishGypsumBoard,
1193
+ insulation_assembly_r_value: 23)
1194
+ hpxml_bldg.foundations[0].attached_to_wall_idrefs << hpxml_bldg.walls[-1].id
1195
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
1196
+ exterior_adjacent_to: HPXML::LocationOutside,
1197
+ interior_adjacent_to: HPXML::LocationGarage,
1198
+ wall_type: HPXML::WallTypeWoodStud,
1199
+ siding: HPXML::SidingTypeWood,
1200
+ area: 320,
1201
+ solar_absorptance: 0.7,
1202
+ emittance: 0.92,
1203
+ insulation_assembly_r_value: 4)
1204
+ hpxml_bldg.floors.add(id: "Floor#{hpxml_bldg.floors.size + 1}",
1205
+ exterior_adjacent_to: HPXML::LocationGarage,
1206
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
1207
+ floor_type: HPXML::FloorTypeWoodFrame,
1208
+ area: 400,
1209
+ insulation_assembly_r_value: 39.3,
1210
+ floor_or_ceiling: HPXML::FloorOrCeilingFloor)
1211
+ hpxml_bldg.slabs[0].area -= 400
1212
+ hpxml_bldg.slabs[0].exposed_perimeter -= 40
1213
+ hpxml_bldg.slabs.add(id: "Slab#{hpxml_bldg.slabs.size + 1}",
1214
+ interior_adjacent_to: HPXML::LocationGarage,
1215
+ area: 400,
1216
+ thickness: 4,
1217
+ exposed_perimeter: 40,
1218
+ perimeter_insulation_depth: 0,
1219
+ under_slab_insulation_width: 0,
1220
+ perimeter_insulation_r_value: 0,
1221
+ under_slab_insulation_r_value: 0,
1222
+ carpet_fraction: 0,
1223
+ carpet_r_value: 0)
1224
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
1225
+ wall_idref: hpxml_bldg.walls[-3].id,
1226
+ area: 70,
1227
+ azimuth: 180,
1228
+ r_value: 4.4)
1229
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
1230
+ wall_idref: hpxml_bldg.walls[-2].id,
1231
+ area: 4,
1232
+ azimuth: 0,
1233
+ r_value: 4.4)
1234
+ elsif ['base-enclosure-ceilingtypes.xml'].include? hpxml_file
1235
+ exterior_adjacent_to = hpxml_bldg.floors[0].exterior_adjacent_to
1236
+ area = hpxml_bldg.floors[0].area
1237
+ hpxml_bldg.floors.reverse_each do |floor|
1238
+ floor.delete
1239
+ end
1240
+ floors_map = { HPXML::FloorTypeSIP => 16.1,
1241
+ HPXML::FloorTypeConcrete => 3.2,
1242
+ HPXML::FloorTypeSteelFrame => 8.1 }
1243
+ floors_map.each_with_index do |(floor_type, assembly_r), _i|
1244
+ hpxml_bldg.floors.add(id: "Floor#{hpxml_bldg.floors.size + 1}",
1245
+ exterior_adjacent_to: exterior_adjacent_to,
1246
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
1247
+ floor_type: floor_type,
1248
+ area: area / floors_map.size,
1249
+ insulation_assembly_r_value: assembly_r,
1250
+ floor_or_ceiling: HPXML::FloorOrCeilingCeiling)
1251
+ end
1252
+ elsif ['base-enclosure-floortypes.xml'].include? hpxml_file
1253
+ exterior_adjacent_to = hpxml_bldg.floors[0].exterior_adjacent_to
1254
+ area = hpxml_bldg.floors[0].area
1255
+ ceiling = hpxml_bldg.floors[1].dup
1256
+ hpxml_bldg.floors.reverse_each do |floor|
1257
+ floor.delete
1258
+ end
1259
+ floors_map = { HPXML::FloorTypeSIP => 16.1,
1260
+ HPXML::FloorTypeConcrete => 3.2,
1261
+ HPXML::FloorTypeSteelFrame => 8.1 }
1262
+ floors_map.each_with_index do |(floor_type, assembly_r), _i|
1263
+ hpxml_bldg.floors.add(id: "Floor#{hpxml_bldg.floors.size + 1}",
1264
+ exterior_adjacent_to: exterior_adjacent_to,
1265
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
1266
+ floor_type: floor_type,
1267
+ area: area / floors_map.size,
1268
+ insulation_assembly_r_value: assembly_r,
1269
+ floor_or_ceiling: HPXML::FloorOrCeilingFloor)
1270
+ end
1271
+ hpxml_bldg.floors << ceiling
1272
+ hpxml_bldg.floors[-1].id = "Floor#{hpxml_bldg.floors.size}"
1273
+ hpxml_bldg.floors[-1].insulation_id = "Floor#{hpxml_bldg.floors.size}Insulation"
1274
+ elsif ['base-enclosure-walltypes.xml'].include? hpxml_file
1275
+ hpxml_bldg.rim_joists.reverse_each do |rim_joist|
1276
+ rim_joist.delete
1277
+ end
1278
+ siding_types = [[HPXML::SidingTypeAluminum, HPXML::ColorDark],
1279
+ [HPXML::SidingTypeAsbestos, HPXML::ColorMedium],
1280
+ [HPXML::SidingTypeBrick, HPXML::ColorReflective],
1281
+ [HPXML::SidingTypeCompositeShingle, HPXML::ColorDark],
1282
+ [HPXML::SidingTypeFiberCement, HPXML::ColorMediumDark],
1283
+ [HPXML::SidingTypeMasonite, HPXML::ColorLight],
1284
+ [HPXML::SidingTypeStucco, HPXML::ColorMedium],
1285
+ [HPXML::SidingTypeSyntheticStucco, HPXML::ColorMediumDark],
1286
+ [HPXML::SidingTypeVinyl, HPXML::ColorLight],
1287
+ [HPXML::SidingTypeNone, HPXML::ColorMedium]]
1288
+ siding_types.each do |siding_type|
1289
+ hpxml_bldg.rim_joists.add(id: "RimJoist#{hpxml_bldg.rim_joists.size + 1}",
1290
+ exterior_adjacent_to: HPXML::LocationOutside,
1291
+ interior_adjacent_to: HPXML::LocationBasementConditioned,
1292
+ siding: siding_type[0],
1293
+ color: siding_type[1],
1294
+ area: 116 / siding_types.size,
1295
+ emittance: 0.92,
1296
+ insulation_assembly_r_value: 23.0)
1297
+ hpxml_bldg.foundations[0].attached_to_rim_joist_idrefs << hpxml_bldg.rim_joists[-1].id
1298
+ end
1299
+ gable_walls = hpxml_bldg.walls.select { |w| w.interior_adjacent_to == HPXML::LocationAtticUnvented }
1300
+ hpxml_bldg.walls.reverse_each do |wall|
1301
+ wall.delete
1302
+ end
1303
+ walls_map = { HPXML::WallTypeCMU => 12,
1304
+ HPXML::WallTypeDoubleWoodStud => 28.7,
1305
+ HPXML::WallTypeICF => 21,
1306
+ HPXML::WallTypeLog => 7.1,
1307
+ HPXML::WallTypeSIP => 16.1,
1308
+ HPXML::WallTypeConcrete => 1.35,
1309
+ HPXML::WallTypeSteelStud => 8.1,
1310
+ HPXML::WallTypeStone => 5.4,
1311
+ HPXML::WallTypeStrawBale => 58.8,
1312
+ HPXML::WallTypeBrick => 7.9,
1313
+ HPXML::WallTypeAdobe => 5.0 }
1314
+ siding_types = [[HPXML::SidingTypeAluminum, HPXML::ColorReflective],
1315
+ [HPXML::SidingTypeAsbestos, HPXML::ColorLight],
1316
+ [HPXML::SidingTypeBrick, HPXML::ColorMediumDark],
1317
+ [HPXML::SidingTypeCompositeShingle, HPXML::ColorReflective],
1318
+ [HPXML::SidingTypeFiberCement, HPXML::ColorMedium],
1319
+ [HPXML::SidingTypeMasonite, HPXML::ColorDark],
1320
+ [HPXML::SidingTypeStucco, HPXML::ColorLight],
1321
+ [HPXML::SidingTypeSyntheticStucco, HPXML::ColorMedium],
1322
+ [HPXML::SidingTypeVinyl, HPXML::ColorDark],
1323
+ [HPXML::SidingTypeNone, HPXML::ColorMedium]]
1324
+ int_finish_types = [[HPXML::InteriorFinishGypsumBoard, 0.5],
1325
+ [HPXML::InteriorFinishGypsumBoard, 1.0],
1326
+ [HPXML::InteriorFinishGypsumCompositeBoard, 0.5],
1327
+ [HPXML::InteriorFinishPlaster, 0.5],
1328
+ [HPXML::InteriorFinishWood, 0.5],
1329
+ [HPXML::InteriorFinishNone, nil]]
1330
+ walls_map.each_with_index do |(wall_type, assembly_r), i|
1331
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
1332
+ exterior_adjacent_to: HPXML::LocationOutside,
1333
+ interior_adjacent_to: HPXML::LocationConditionedSpace,
1334
+ wall_type: wall_type,
1335
+ siding: siding_types[i % siding_types.size][0],
1336
+ color: siding_types[i % siding_types.size][1],
1337
+ area: 1200 / walls_map.size,
1338
+ emittance: 0.92,
1339
+ interior_finish_type: int_finish_types[i % int_finish_types.size][0],
1340
+ interior_finish_thickness: int_finish_types[i % int_finish_types.size][1],
1341
+ insulation_assembly_r_value: assembly_r)
1342
+ end
1343
+ gable_walls.each do |gable_wall|
1344
+ hpxml_bldg.walls << gable_wall
1345
+ hpxml_bldg.walls[-1].id = "Wall#{hpxml_bldg.walls.size}"
1346
+ hpxml_bldg.walls[-1].insulation_id = "Wall#{hpxml_bldg.walls.size}Insulation"
1347
+ hpxml_bldg.attics[0].attached_to_wall_idrefs << hpxml_bldg.walls[-1].id
1348
+ end
1349
+ hpxml_bldg.windows.reverse_each do |window|
1350
+ window.delete
1351
+ end
1352
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
1353
+ area: 108 / 8,
1354
+ azimuth: 0,
1355
+ ufactor: 0.33,
1356
+ shgc: 0.45,
1357
+ fraction_operable: 0.67,
1358
+ wall_idref: 'Wall1')
1359
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
1360
+ area: 72 / 8,
1361
+ azimuth: 90,
1362
+ ufactor: 0.33,
1363
+ shgc: 0.45,
1364
+ fraction_operable: 0.67,
1365
+ wall_idref: 'Wall2')
1366
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
1367
+ area: 108 / 8,
1368
+ azimuth: 180,
1369
+ ufactor: 0.33,
1370
+ shgc: 0.45,
1371
+ fraction_operable: 0.67,
1372
+ wall_idref: 'Wall3')
1373
+ hpxml_bldg.windows.add(id: "Window#{hpxml_bldg.windows.size + 1}",
1374
+ area: 72 / 8,
1375
+ azimuth: 270,
1376
+ ufactor: 0.33,
1377
+ shgc: 0.45,
1378
+ fraction_operable: 0.67,
1379
+ wall_idref: 'Wall4')
1380
+ hpxml_bldg.doors.reverse_each do |door|
1381
+ door.delete
1382
+ end
1383
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
1384
+ wall_idref: 'Wall9',
1385
+ area: 20,
1386
+ azimuth: 0,
1387
+ r_value: 4.4)
1388
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
1389
+ wall_idref: 'Wall10',
1390
+ area: 20,
1391
+ azimuth: 180,
1392
+ r_value: 4.4)
1393
+ elsif ['base-enclosure-rooftypes.xml'].include? hpxml_file
1394
+ hpxml_bldg.roofs.reverse_each do |roof|
1395
+ roof.delete
1396
+ end
1397
+ roof_types = [[HPXML::RoofTypeClayTile, HPXML::ColorLight],
1398
+ [HPXML::RoofTypeMetal, HPXML::ColorReflective],
1399
+ [HPXML::RoofTypeWoodShingles, HPXML::ColorDark],
1400
+ [HPXML::RoofTypeShingles, HPXML::ColorMediumDark],
1401
+ [HPXML::RoofTypePlasticRubber, HPXML::ColorLight],
1402
+ [HPXML::RoofTypeEPS, HPXML::ColorMedium],
1403
+ [HPXML::RoofTypeConcrete, HPXML::ColorLight],
1404
+ [HPXML::RoofTypeCool, HPXML::ColorReflective]]
1405
+ int_finish_types = [[HPXML::InteriorFinishGypsumBoard, 0.5],
1406
+ [HPXML::InteriorFinishPlaster, 0.5],
1407
+ [HPXML::InteriorFinishWood, 0.5]]
1408
+ roof_types.each_with_index do |roof_type, i|
1409
+ hpxml_bldg.roofs.add(id: "Roof#{hpxml_bldg.roofs.size + 1}",
1410
+ interior_adjacent_to: HPXML::LocationAtticUnvented,
1411
+ area: 1509.3 / roof_types.size,
1412
+ roof_type: roof_type[0],
1413
+ roof_color: roof_type[1],
1414
+ emittance: 0.92,
1415
+ pitch: 6,
1416
+ radiant_barrier: false,
1417
+ interior_finish_type: int_finish_types[i % int_finish_types.size][0],
1418
+ interior_finish_thickness: int_finish_types[i % int_finish_types.size][1],
1419
+ insulation_assembly_r_value: roof_type[0] == HPXML::RoofTypeEPS ? 7.0 : 2.3)
1420
+ hpxml_bldg.attics[0].attached_to_roof_idrefs << hpxml_bldg.roofs[-1].id
1421
+ end
1422
+ elsif ['base-enclosure-overhangs.xml'].include? hpxml_file
1423
+ # Test relaxed overhangs validation; https://github.com/NREL/OpenStudio-HPXML/issues/866
1424
+ hpxml_bldg.windows.each do |window|
1425
+ next unless window.overhangs_depth.nil?
1426
+
1427
+ window.overhangs_depth = 0.0
1428
+ window.overhangs_distance_to_top_of_window = 0.0
1429
+ window.overhangs_distance_to_bottom_of_window = 0.0
1430
+ end
1116
1431
  end
1117
- roof_types = [[HPXML::RoofTypeClayTile, HPXML::ColorLight],
1118
- [HPXML::RoofTypeMetal, HPXML::ColorReflective],
1119
- [HPXML::RoofTypeWoodShingles, HPXML::ColorDark],
1120
- [HPXML::RoofTypeShingles, HPXML::ColorMediumDark],
1121
- [HPXML::RoofTypePlasticRubber, HPXML::ColorLight],
1122
- [HPXML::RoofTypeEPS, HPXML::ColorMedium],
1123
- [HPXML::RoofTypeConcrete, HPXML::ColorLight],
1124
- [HPXML::RoofTypeCool, HPXML::ColorReflective]]
1125
- int_finish_types = [[HPXML::InteriorFinishGypsumBoard, 0.5],
1126
- [HPXML::InteriorFinishPlaster, 0.5],
1127
- [HPXML::InteriorFinishWood, 0.5]]
1128
- roof_types.each_with_index do |roof_type, i|
1129
- hpxml.roofs.add(id: "Roof#{hpxml.roofs.size + 1}",
1130
- interior_adjacent_to: HPXML::LocationAtticUnvented,
1131
- area: 1509.3 / roof_types.size,
1132
- roof_type: roof_type[0],
1133
- roof_color: roof_type[1],
1134
- emittance: 0.92,
1135
- pitch: 6,
1136
- radiant_barrier: false,
1137
- interior_finish_type: int_finish_types[i % int_finish_types.size][0],
1138
- interior_finish_thickness: int_finish_types[i % int_finish_types.size][1],
1139
- insulation_assembly_r_value: roof_type[0] == HPXML::RoofTypeEPS ? 7.0 : 2.3)
1140
- hpxml.attics[0].attached_to_roof_idrefs << hpxml.roofs[-1].id
1432
+ if ['base-enclosure-2stories-garage.xml',
1433
+ 'base-enclosure-garage.xml'].include? hpxml_file
1434
+ grg_wall = hpxml_bldg.walls.select { |w|
1435
+ w.interior_adjacent_to == HPXML::LocationGarage &&
1436
+ w.exterior_adjacent_to == HPXML::LocationOutside
1437
+ }[0]
1438
+ hpxml_bldg.doors.add(id: "Door#{hpxml_bldg.doors.size + 1}",
1439
+ wall_idref: grg_wall.id,
1440
+ area: 70,
1441
+ azimuth: 180,
1442
+ r_value: 4.4)
1443
+ end
1444
+ if ['base-misc-neighbor-shading-bldgtype-multifamily.xml'].include? hpxml_file
1445
+ wall = hpxml_bldg.walls.select { |w| w.azimuth == hpxml_bldg.neighbor_buildings[0].azimuth }[0]
1446
+ wall.exterior_adjacent_to = HPXML::LocationOtherHeatedSpace
1447
+ end
1448
+ if ['base-foundation-vented-crawlspace-above-grade.xml'].include? hpxml_file
1449
+ # Convert FoundationWall to Wall to test a foundation with only Wall elements
1450
+ fwall = hpxml_bldg.foundation_walls[0]
1451
+ hpxml_bldg.walls.add(id: "Wall#{hpxml_bldg.walls.size + 1}",
1452
+ exterior_adjacent_to: HPXML::LocationOutside,
1453
+ interior_adjacent_to: fwall.interior_adjacent_to,
1454
+ wall_type: HPXML::WallTypeConcrete,
1455
+ area: fwall.area,
1456
+ insulation_assembly_r_value: 10.1)
1457
+ hpxml_bldg.foundations[0].attached_to_wall_idrefs << hpxml_bldg.walls[-1].id
1458
+ hpxml_bldg.foundation_walls[0].delete
1459
+ end
1460
+
1461
+ # ---------- #
1462
+ # HPXML HVAC #
1463
+ # ---------- #
1464
+
1465
+ # General logic
1466
+ hpxml_bldg.heating_systems.each do |heating_system|
1467
+ if heating_system.heating_system_type == HPXML::HVACTypeBoiler &&
1468
+ heating_system.heating_system_fuel == HPXML::FuelTypeNaturalGas &&
1469
+ !heating_system.is_shared_system
1470
+ heating_system.electric_auxiliary_energy = 200
1471
+ elsif [HPXML::HVACTypeFloorFurnace,
1472
+ HPXML::HVACTypeWallFurnace,
1473
+ HPXML::HVACTypeFireplace,
1474
+ HPXML::HVACTypeSpaceHeater].include? heating_system.heating_system_type
1475
+ heating_system.fan_watts = 0
1476
+ elsif [HPXML::HVACTypeStove].include? heating_system.heating_system_type
1477
+ heating_system.fan_watts = 40
1478
+ end
1141
1479
  end
1142
- elsif ['base-enclosure-overhangs.xml'].include? hpxml_file
1143
- # Test relaxed overhangs validation; https://github.com/NREL/OpenStudio-HPXML/issues/866
1144
- hpxml.windows.each do |window|
1145
- next unless window.overhangs_depth.nil?
1146
-
1147
- window.overhangs_depth = 0.0
1148
- window.overhangs_distance_to_top_of_window = 0.0
1149
- window.overhangs_distance_to_bottom_of_window = 0.0
1480
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1481
+ if heat_pump.heat_pump_type == HPXML::HVACTypeHeatPumpGroundToAir
1482
+ heat_pump.pump_watts_per_ton = 30.0
1483
+ end
1150
1484
  end
1151
- end
1152
- if ['base-enclosure-2stories-garage.xml',
1153
- 'base-enclosure-garage.xml'].include? hpxml_file
1154
- grg_wall = hpxml.walls.select { |w|
1155
- w.interior_adjacent_to == HPXML::LocationGarage &&
1156
- w.exterior_adjacent_to == HPXML::LocationOutside
1157
- }[0]
1158
- hpxml.doors.add(id: "Door#{hpxml.doors.size + 1}",
1159
- wall_idref: grg_wall.id,
1160
- area: 70,
1161
- azimuth: 180,
1162
- r_value: 4.4)
1163
- end
1164
- if ['base-misc-neighbor-shading-bldgtype-multifamily.xml'].include? hpxml_file
1165
- wall = hpxml.walls.select { |w| w.azimuth == hpxml.neighbor_buildings[0].azimuth }[0]
1166
- wall.exterior_adjacent_to = HPXML::LocationOtherHeatedSpace
1167
- end
1168
1485
 
1169
- # ---------- #
1170
- # HPXML HVAC #
1171
- # ---------- #
1172
-
1173
- # General logic
1174
- hpxml.heating_systems.each do |heating_system|
1175
- if heating_system.heating_system_type == HPXML::HVACTypeBoiler &&
1176
- heating_system.heating_system_fuel == HPXML::FuelTypeNaturalGas &&
1177
- !heating_system.is_shared_system
1178
- heating_system.electric_auxiliary_energy = 200
1179
- elsif [HPXML::HVACTypeFloorFurnace,
1180
- HPXML::HVACTypeWallFurnace,
1181
- HPXML::HVACTypeFireplace,
1182
- HPXML::HVACTypeFixedHeater,
1183
- HPXML::HVACTypePortableHeater].include? heating_system.heating_system_type
1184
- heating_system.fan_watts = 0
1185
- elsif [HPXML::HVACTypeStove].include? heating_system.heating_system_type
1186
- heating_system.fan_watts = 40
1486
+ # Logic that can only be applied based on the file name
1487
+ if hpxml_file.include?('chiller') || hpxml_file.include?('cooling-tower')
1488
+ # Handle chiller/cooling tower
1489
+ if hpxml_file.include? 'chiller'
1490
+ hpxml_bldg.cooling_systems.add(id: "CoolingSystem#{hpxml_bldg.cooling_systems.size + 1}",
1491
+ cooling_system_type: HPXML::HVACTypeChiller,
1492
+ cooling_system_fuel: HPXML::FuelTypeElectricity,
1493
+ is_shared_system: true,
1494
+ number_of_units_served: 6,
1495
+ cooling_capacity: 24000 * 6,
1496
+ cooling_efficiency_kw_per_ton: 0.9,
1497
+ fraction_cool_load_served: 1.0,
1498
+ primary_system: true)
1499
+ elsif hpxml_file.include? 'cooling-tower'
1500
+ hpxml_bldg.cooling_systems.add(id: "CoolingSystem#{hpxml_bldg.cooling_systems.size + 1}",
1501
+ cooling_system_type: HPXML::HVACTypeCoolingTower,
1502
+ cooling_system_fuel: HPXML::FuelTypeElectricity,
1503
+ is_shared_system: true,
1504
+ number_of_units_served: 6,
1505
+ fraction_cool_load_served: 1.0,
1506
+ primary_system: true)
1507
+ end
1508
+ if hpxml_file.include? 'boiler'
1509
+ hpxml_bldg.hvac_controls[0].cooling_setpoint_temp = 78.0
1510
+ hpxml_bldg.cooling_systems[-1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1511
+ else
1512
+ hpxml_bldg.hvac_controls.add(id: "HVACControl#{hpxml_bldg.hvac_controls.size + 1}",
1513
+ control_type: HPXML::HVACControlTypeManual,
1514
+ cooling_setpoint_temp: 78.0)
1515
+ if hpxml_file.include? 'baseboard'
1516
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1517
+ distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1518
+ hydronic_type: HPXML::HydronicTypeBaseboard)
1519
+ hpxml_bldg.cooling_systems[-1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1520
+ end
1521
+ end
1187
1522
  end
1188
- end
1189
- hpxml.heat_pumps.each do |heat_pump|
1190
- if heat_pump.heat_pump_type == HPXML::HVACTypeHeatPumpGroundToAir
1191
- heat_pump.pump_watts_per_ton = 30.0
1523
+ if hpxml_file.include?('water-loop-heat-pump') || (hpxml_file.include?('fan-coil') && !hpxml_file.include?('fireplace-elec'))
1524
+ # Handle WLHP/ducted fan coil
1525
+ hpxml_bldg.hvac_distributions.reverse_each do |hvac_distribution|
1526
+ hvac_distribution.delete
1527
+ end
1528
+ if hpxml_file.include? 'water-loop-heat-pump'
1529
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1530
+ distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1531
+ hydronic_type: HPXML::HydronicTypeWaterLoop)
1532
+ hpxml_bldg.heat_pumps.add(id: "HeatPump#{hpxml_bldg.heat_pumps.size + 1}",
1533
+ heat_pump_type: HPXML::HVACTypeHeatPumpWaterLoopToAir,
1534
+ heat_pump_fuel: HPXML::FuelTypeElectricity)
1535
+ if hpxml_file.include? 'boiler'
1536
+ hpxml_bldg.heat_pumps[-1].heating_capacity = 24000
1537
+ hpxml_bldg.heat_pumps[-1].heating_efficiency_cop = 4.4
1538
+ hpxml_bldg.heating_systems[-1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1539
+ end
1540
+ if hpxml_file.include?('chiller') || hpxml_file.include?('cooling-tower')
1541
+ hpxml_bldg.heat_pumps[-1].cooling_capacity = 24000
1542
+ hpxml_bldg.heat_pumps[-1].cooling_efficiency_eer = 12.8
1543
+ hpxml_bldg.cooling_systems[-1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1544
+ end
1545
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1546
+ distribution_system_type: HPXML::HVACDistributionTypeAir,
1547
+ air_type: HPXML::AirTypeRegularVelocity)
1548
+ hpxml_bldg.heat_pumps[-1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1549
+ elsif hpxml_file.include? 'fan-coil'
1550
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1551
+ distribution_system_type: HPXML::HVACDistributionTypeAir,
1552
+ air_type: HPXML::AirTypeFanCoil)
1553
+
1554
+ if hpxml_file.include? 'boiler'
1555
+ hpxml_bldg.heating_systems[-1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1556
+ end
1557
+ if hpxml_file.include?('chiller') || hpxml_file.include?('cooling-tower')
1558
+ hpxml_bldg.cooling_systems[-1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1559
+ end
1560
+ end
1561
+ if hpxml_file.include?('water-loop-heat-pump') || hpxml_file.include?('fan-coil-ducted')
1562
+ hpxml_bldg.hvac_distributions[-1].duct_leakage_measurements.add(duct_type: HPXML::DuctTypeSupply,
1563
+ duct_leakage_units: HPXML::UnitsCFM25,
1564
+ duct_leakage_value: 15,
1565
+ duct_leakage_total_or_to_outside: HPXML::DuctLeakageToOutside)
1566
+ hpxml_bldg.hvac_distributions[-1].duct_leakage_measurements.add(duct_type: HPXML::DuctTypeReturn,
1567
+ duct_leakage_units: HPXML::UnitsCFM25,
1568
+ duct_leakage_value: 10,
1569
+ duct_leakage_total_or_to_outside: HPXML::DuctLeakageToOutside)
1570
+ hpxml_bldg.hvac_distributions[-1].ducts.add(id: "Ducts#{hpxml_bldg.hvac_distributions[-1].ducts.size + 1}",
1571
+ duct_type: HPXML::DuctTypeSupply,
1572
+ duct_insulation_r_value: 0,
1573
+ duct_location: HPXML::LocationOtherMultifamilyBufferSpace,
1574
+ duct_surface_area: 50)
1575
+ hpxml_bldg.hvac_distributions[-1].ducts.add(id: "Ducts#{hpxml_bldg.hvac_distributions[-1].ducts.size + 1}",
1576
+ duct_type: HPXML::DuctTypeReturn,
1577
+ duct_insulation_r_value: 0,
1578
+ duct_location: HPXML::LocationOtherMultifamilyBufferSpace,
1579
+ duct_surface_area: 20)
1580
+ end
1192
1581
  end
1193
- end
1194
-
1195
- # Logic that can only be applied based on the file name
1196
- if hpxml_file.include?('chiller') || hpxml_file.include?('cooling-tower')
1197
- # Handle chiller/cooling tower
1198
- if hpxml_file.include? 'chiller'
1199
- hpxml.cooling_systems.add(id: "CoolingSystem#{hpxml.cooling_systems.size + 1}",
1200
- cooling_system_type: HPXML::HVACTypeChiller,
1201
- cooling_system_fuel: HPXML::FuelTypeElectricity,
1202
- is_shared_system: true,
1203
- number_of_units_served: 6,
1204
- cooling_capacity: 24000 * 6,
1205
- cooling_efficiency_kw_per_ton: 0.9,
1206
- fraction_cool_load_served: 1.0,
1207
- primary_system: true)
1208
- elsif hpxml_file.include? 'cooling-tower'
1209
- hpxml.cooling_systems.add(id: "CoolingSystem#{hpxml.cooling_systems.size + 1}",
1210
- cooling_system_type: HPXML::HVACTypeCoolingTower,
1211
- cooling_system_fuel: HPXML::FuelTypeElectricity,
1582
+ if hpxml_file.include? 'shared-ground-loop'
1583
+ hpxml_bldg.heating_systems.reverse_each do |heating_system|
1584
+ heating_system.delete
1585
+ end
1586
+ hpxml_bldg.cooling_systems.reverse_each do |cooling_system|
1587
+ cooling_system.delete
1588
+ end
1589
+ hpxml_bldg.heat_pumps.add(id: "HeatPump#{hpxml_bldg.heat_pumps.size + 1}",
1590
+ distribution_system_idref: hpxml_bldg.hvac_distributions[-1].id,
1591
+ heat_pump_type: HPXML::HVACTypeHeatPumpGroundToAir,
1592
+ heat_pump_fuel: HPXML::FuelTypeElectricity,
1593
+ backup_type: HPXML::HeatPumpBackupTypeIntegrated,
1594
+ backup_heating_fuel: HPXML::FuelTypeElectricity,
1212
1595
  is_shared_system: true,
1213
1596
  number_of_units_served: 6,
1214
- fraction_cool_load_served: 1.0,
1215
- primary_system: true)
1216
- end
1217
- if hpxml_file.include? 'boiler'
1218
- hpxml.hvac_controls[0].cooling_setpoint_temp = 78.0
1219
- hpxml.cooling_systems[-1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1597
+ backup_heating_efficiency_percent: 1.0,
1598
+ fraction_heat_load_served: 1,
1599
+ fraction_cool_load_served: 1,
1600
+ heating_efficiency_cop: 3.6,
1601
+ cooling_efficiency_eer: 16.6,
1602
+ heating_capacity: 12000,
1603
+ cooling_capacity: 12000,
1604
+ backup_heating_capacity: 12000,
1605
+ cooling_shr: 0.73,
1606
+ primary_heating_system: true,
1607
+ primary_cooling_system: true,
1608
+ pump_watts_per_ton: 0.0)
1609
+
1610
+ end
1611
+ if hpxml_file.include? 'eae'
1612
+ hpxml_bldg.heating_systems[0].electric_auxiliary_energy = 500.0
1220
1613
  else
1221
- hpxml.hvac_controls.add(id: "HVACControl#{hpxml.hvac_controls.size + 1}",
1222
- control_type: HPXML::HVACControlTypeManual,
1223
- cooling_setpoint_temp: 78.0)
1224
- if hpxml_file.include? 'baseboard'
1225
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1226
- distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1227
- hydronic_type: HPXML::HydronicTypeBaseboard)
1228
- hpxml.cooling_systems[-1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1229
- end
1230
- end
1231
- end
1232
- if hpxml_file.include?('water-loop-heat-pump') || hpxml_file.include?('fan-coil')
1233
- # Handle WLHP/ducted fan coil
1234
- hpxml.hvac_distributions.reverse_each do |hvac_distribution|
1235
- hvac_distribution.delete
1236
- end
1237
- if hpxml_file.include? 'water-loop-heat-pump'
1238
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1239
- distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1240
- hydronic_type: HPXML::HydronicTypeWaterLoop)
1241
- hpxml.heat_pumps.add(id: "HeatPump#{hpxml.heat_pumps.size + 1}",
1242
- heat_pump_type: HPXML::HVACTypeHeatPumpWaterLoopToAir,
1243
- heat_pump_fuel: HPXML::FuelTypeElectricity)
1244
- if hpxml_file.include? 'boiler'
1245
- hpxml.heat_pumps[-1].heating_capacity = 24000
1246
- hpxml.heat_pumps[-1].heating_efficiency_cop = 4.4
1247
- hpxml.heating_systems[-1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1614
+ if hpxml_file.include? 'shared-boiler'
1615
+ hpxml_bldg.heating_systems[0].shared_loop_watts = 600
1248
1616
  end
1249
1617
  if hpxml_file.include?('chiller') || hpxml_file.include?('cooling-tower')
1250
- hpxml.heat_pumps[-1].cooling_capacity = 24000
1251
- hpxml.heat_pumps[-1].cooling_efficiency_eer = 12.8
1252
- hpxml.cooling_systems[-1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1253
- end
1254
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1255
- distribution_system_type: HPXML::HVACDistributionTypeAir,
1256
- air_type: HPXML::AirTypeRegularVelocity)
1257
- hpxml.heat_pumps[-1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1258
- elsif hpxml_file.include? 'fan-coil'
1259
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1260
- distribution_system_type: HPXML::HVACDistributionTypeAir,
1261
- air_type: HPXML::AirTypeFanCoil)
1262
-
1263
- if hpxml_file.include? 'boiler'
1264
- hpxml.heating_systems[-1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1618
+ hpxml_bldg.cooling_systems[0].shared_loop_watts = 600
1265
1619
  end
1266
- if hpxml_file.include?('chiller') || hpxml_file.include?('cooling-tower')
1267
- hpxml.cooling_systems[-1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1620
+ if hpxml_file.include? 'shared-ground-loop'
1621
+ hpxml_bldg.heat_pumps[0].shared_loop_watts = 600
1622
+ end
1623
+ if hpxml_file.include? 'fan-coil'
1624
+ if hpxml_file.include? 'boiler'
1625
+ hpxml_bldg.heating_systems[0].fan_coil_watts = 150
1626
+ end
1627
+ if hpxml_file.include? 'chiller'
1628
+ hpxml_bldg.cooling_systems[0].fan_coil_watts = 150
1629
+ end
1268
1630
  end
1269
1631
  end
1270
- if hpxml_file.include?('water-loop-heat-pump') || hpxml_file.include?('fan-coil-ducted')
1271
- hpxml.hvac_distributions[-1].duct_leakage_measurements.add(duct_type: HPXML::DuctTypeSupply,
1272
- duct_leakage_units: HPXML::UnitsCFM25,
1273
- duct_leakage_value: 15,
1274
- duct_leakage_total_or_to_outside: HPXML::DuctLeakageToOutside)
1275
- hpxml.hvac_distributions[-1].duct_leakage_measurements.add(duct_type: HPXML::DuctTypeReturn,
1276
- duct_leakage_units: HPXML::UnitsCFM25,
1277
- duct_leakage_value: 10,
1278
- duct_leakage_total_or_to_outside: HPXML::DuctLeakageToOutside)
1279
- hpxml.hvac_distributions[-1].ducts.add(id: "Ducts#{hpxml.hvac_distributions[-1].ducts.size + 1}",
1280
- duct_type: HPXML::DuctTypeSupply,
1281
- duct_insulation_r_value: 0,
1282
- duct_location: HPXML::LocationOtherMultifamilyBufferSpace,
1283
- duct_surface_area: 50)
1284
- hpxml.hvac_distributions[-1].ducts.add(id: "Ducts#{hpxml.hvac_distributions[-1].ducts.size + 1}",
1285
- duct_type: HPXML::DuctTypeReturn,
1286
- duct_insulation_r_value: 0,
1287
- duct_location: HPXML::LocationOtherMultifamilyBufferSpace,
1288
- duct_surface_area: 20)
1289
- end
1290
- end
1291
- if hpxml_file.include? 'shared-ground-loop'
1292
- hpxml.heating_systems.reverse_each do |heating_system|
1293
- heating_system.delete
1294
- end
1295
- hpxml.cooling_systems.reverse_each do |cooling_system|
1296
- cooling_system.delete
1297
- end
1298
- hpxml.heat_pumps.add(id: "HeatPump#{hpxml.heat_pumps.size + 1}",
1299
- distribution_system_idref: hpxml.hvac_distributions[-1].id,
1300
- heat_pump_type: HPXML::HVACTypeHeatPumpGroundToAir,
1301
- heat_pump_fuel: HPXML::FuelTypeElectricity,
1302
- backup_type: HPXML::HeatPumpBackupTypeIntegrated,
1303
- backup_heating_fuel: HPXML::FuelTypeElectricity,
1304
- is_shared_system: true,
1305
- number_of_units_served: 6,
1306
- backup_heating_efficiency_percent: 1.0,
1307
- fraction_heat_load_served: 1,
1308
- fraction_cool_load_served: 1,
1309
- heating_efficiency_cop: 3.6,
1310
- cooling_efficiency_eer: 16.6,
1311
- heating_capacity: 12000,
1312
- cooling_capacity: 12000,
1313
- backup_heating_capacity: 12000,
1314
- cooling_shr: 0.73,
1315
- primary_heating_system: true,
1316
- primary_cooling_system: true,
1317
- pump_watts_per_ton: 0.0)
1318
-
1319
- end
1320
- if hpxml_file.include? 'eae'
1321
- hpxml.heating_systems[0].electric_auxiliary_energy = 500.0
1322
- else
1323
- if hpxml_file.include? 'shared-boiler'
1324
- hpxml.heating_systems[0].shared_loop_watts = 600
1325
- end
1326
- if hpxml_file.include?('chiller') || hpxml_file.include?('cooling-tower')
1327
- hpxml.cooling_systems[0].shared_loop_watts = 600
1328
- end
1329
- if hpxml_file.include? 'shared-ground-loop'
1330
- hpxml.heat_pumps[0].shared_loop_watts = 600
1331
- end
1332
- if hpxml_file.include? 'fan-coil'
1333
- if hpxml_file.include? 'boiler'
1334
- hpxml.heating_systems[0].fan_coil_watts = 150
1632
+ if hpxml_file.include? 'install-quality'
1633
+ hpxml_bldg.hvac_systems.each do |hvac_system|
1634
+ hvac_system.fan_watts_per_cfm = 0.365
1335
1635
  end
1336
- if hpxml_file.include? 'chiller'
1337
- hpxml.cooling_systems[0].fan_coil_watts = 150
1636
+ elsif ['base-hvac-setpoints-daily-setbacks.xml'].include? hpxml_file
1637
+ hpxml_bldg.hvac_controls[0].heating_setback_temp = 66
1638
+ hpxml_bldg.hvac_controls[0].heating_setback_hours_per_week = 7 * 7
1639
+ hpxml_bldg.hvac_controls[0].heating_setback_start_hour = 23 # 11pm
1640
+ hpxml_bldg.hvac_controls[0].cooling_setup_temp = 80
1641
+ hpxml_bldg.hvac_controls[0].cooling_setup_hours_per_week = 6 * 7
1642
+ hpxml_bldg.hvac_controls[0].cooling_setup_start_hour = 9 # 9am
1643
+ elsif ['base-hvac-dse.xml',
1644
+ 'base-dhw-indirect-dse.xml',
1645
+ 'base-mechvent-cfis-dse.xml'].include? hpxml_file
1646
+ hpxml_bldg.hvac_distributions[0].distribution_system_type = HPXML::HVACDistributionTypeDSE
1647
+ hpxml_bldg.hvac_distributions[0].annual_heating_dse = 0.8
1648
+ hpxml_bldg.hvac_distributions[0].annual_cooling_dse = 0.7
1649
+ elsif ['base-hvac-furnace-x3-dse.xml'].include? hpxml_file
1650
+ hpxml_bldg.hvac_distributions[0].distribution_system_type = HPXML::HVACDistributionTypeDSE
1651
+ hpxml_bldg.hvac_distributions[0].annual_heating_dse = 0.8
1652
+ hpxml_bldg.hvac_distributions[0].annual_cooling_dse = 0.7
1653
+ hpxml_bldg.hvac_distributions << hpxml_bldg.hvac_distributions[0].dup
1654
+ hpxml_bldg.hvac_distributions[1].id = "HVACDistribution#{hpxml_bldg.hvac_distributions.size}"
1655
+ hpxml_bldg.hvac_distributions[1].annual_cooling_dse = 1.0
1656
+ hpxml_bldg.hvac_distributions << hpxml_bldg.hvac_distributions[0].dup
1657
+ hpxml_bldg.hvac_distributions[2].id = "HVACDistribution#{hpxml_bldg.hvac_distributions.size}"
1658
+ hpxml_bldg.hvac_distributions[2].annual_cooling_dse = 1.0
1659
+ hpxml_bldg.heating_systems[0].primary_system = false
1660
+ hpxml_bldg.heating_systems << hpxml_bldg.heating_systems[0].dup
1661
+ hpxml_bldg.heating_systems[1].id = "HeatingSystem#{hpxml_bldg.heating_systems.size}"
1662
+ hpxml_bldg.heating_systems[1].distribution_system_idref = hpxml_bldg.hvac_distributions[1].id
1663
+ hpxml_bldg.heating_systems << hpxml_bldg.heating_systems[0].dup
1664
+ hpxml_bldg.heating_systems[2].id = "HeatingSystem#{hpxml_bldg.heating_systems.size}"
1665
+ hpxml_bldg.heating_systems[2].distribution_system_idref = hpxml_bldg.hvac_distributions[2].id
1666
+ hpxml_bldg.heating_systems[2].primary_system = true
1667
+ for i in 0..2
1668
+ hpxml_bldg.heating_systems[i].heating_capacity /= 3.0
1669
+ # Test a file where sum is slightly greater than 1
1670
+ if i < 2
1671
+ hpxml_bldg.heating_systems[i].fraction_heat_load_served = 0.33
1672
+ else
1673
+ hpxml_bldg.heating_systems[i].fraction_heat_load_served = 0.35
1674
+ end
1338
1675
  end
1339
- end
1340
- end
1341
- if hpxml_file.include? 'install-quality'
1342
- hpxml.hvac_systems.each do |hvac_system|
1343
- hvac_system.fan_watts_per_cfm = 0.365
1344
- end
1345
- elsif ['base-hvac-setpoints-daily-setbacks.xml'].include? hpxml_file
1346
- hpxml.hvac_controls[0].heating_setback_temp = 66
1347
- hpxml.hvac_controls[0].heating_setback_hours_per_week = 7 * 7
1348
- hpxml.hvac_controls[0].heating_setback_start_hour = 23 # 11pm
1349
- hpxml.hvac_controls[0].cooling_setup_temp = 80
1350
- hpxml.hvac_controls[0].cooling_setup_hours_per_week = 6 * 7
1351
- hpxml.hvac_controls[0].cooling_setup_start_hour = 9 # 9am
1352
- elsif ['base-hvac-dse.xml',
1353
- 'base-dhw-indirect-dse.xml',
1354
- 'base-mechvent-cfis-dse.xml'].include? hpxml_file
1355
- hpxml.hvac_distributions[0].distribution_system_type = HPXML::HVACDistributionTypeDSE
1356
- hpxml.hvac_distributions[0].annual_heating_dse = 0.8
1357
- hpxml.hvac_distributions[0].annual_cooling_dse = 0.7
1358
- elsif ['base-hvac-furnace-x3-dse.xml'].include? hpxml_file
1359
- hpxml.hvac_distributions[0].distribution_system_type = HPXML::HVACDistributionTypeDSE
1360
- hpxml.hvac_distributions[0].annual_heating_dse = 0.8
1361
- hpxml.hvac_distributions[0].annual_cooling_dse = 0.7
1362
- hpxml.hvac_distributions << hpxml.hvac_distributions[0].dup
1363
- hpxml.hvac_distributions[1].id = "HVACDistribution#{hpxml.hvac_distributions.size}"
1364
- hpxml.hvac_distributions[1].annual_cooling_dse = 1.0
1365
- hpxml.hvac_distributions << hpxml.hvac_distributions[0].dup
1366
- hpxml.hvac_distributions[2].id = "HVACDistribution#{hpxml.hvac_distributions.size}"
1367
- hpxml.hvac_distributions[2].annual_cooling_dse = 1.0
1368
- hpxml.heating_systems[0].primary_system = false
1369
- hpxml.heating_systems << hpxml.heating_systems[0].dup
1370
- hpxml.heating_systems[1].id = "HeatingSystem#{hpxml.heating_systems.size}"
1371
- hpxml.heating_systems[1].distribution_system_idref = hpxml.hvac_distributions[1].id
1372
- hpxml.heating_systems << hpxml.heating_systems[0].dup
1373
- hpxml.heating_systems[2].id = "HeatingSystem#{hpxml.heating_systems.size}"
1374
- hpxml.heating_systems[2].distribution_system_idref = hpxml.hvac_distributions[2].id
1375
- hpxml.heating_systems[2].primary_system = true
1376
- for i in 0..2
1377
- hpxml.heating_systems[i].heating_capacity /= 3.0
1378
- # Test a file where sum is slightly greater than 1
1379
- if i < 2
1380
- hpxml.heating_systems[i].fraction_heat_load_served = 0.33
1676
+ elsif ['base-hvac-ducts-area-fractions.xml'].include? hpxml_file
1677
+ hpxml_bldg.hvac_distributions[0].ducts[2].duct_location = HPXML::LocationExteriorWall
1678
+ hpxml_bldg.hvac_distributions[0].ducts[2].duct_insulation_r_value = 4.0
1679
+ elsif ['base-enclosure-2stories.xml',
1680
+ 'base-enclosure-2stories-garage.xml'].include? hpxml_file
1681
+ hpxml_bldg.hvac_distributions[0].ducts << hpxml_bldg.hvac_distributions[0].ducts[0].dup
1682
+ hpxml_bldg.hvac_distributions[0].ducts[-1].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size}"
1683
+ hpxml_bldg.hvac_distributions[0].ducts << hpxml_bldg.hvac_distributions[0].ducts[1].dup
1684
+ hpxml_bldg.hvac_distributions[0].ducts[-1].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size}"
1685
+ hpxml_bldg.hvac_distributions[0].ducts[2].duct_location = HPXML::LocationExteriorWall
1686
+ hpxml_bldg.hvac_distributions[0].ducts[2].duct_surface_area = 37.5
1687
+ hpxml_bldg.hvac_distributions[0].ducts[3].duct_location = HPXML::LocationConditionedSpace
1688
+ hpxml_bldg.hvac_distributions[0].ducts[3].duct_surface_area = 12.5
1689
+ if hpxml_file == 'base-hvac-ducts-area-fractions.xml'
1690
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_surface_area = nil
1691
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_surface_area = nil
1692
+ hpxml_bldg.hvac_distributions[0].ducts[2].duct_surface_area = nil
1693
+ hpxml_bldg.hvac_distributions[0].ducts[3].duct_surface_area = nil
1694
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_fraction_area = 0.75
1695
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_fraction_area = 0.75
1696
+ hpxml_bldg.hvac_distributions[0].ducts[2].duct_fraction_area = 0.25
1697
+ hpxml_bldg.hvac_distributions[0].ducts[3].duct_fraction_area = 0.25
1698
+ hpxml_bldg.hvac_distributions[0].conditioned_floor_area_served = 4050.0
1699
+ hpxml_bldg.hvac_distributions[0].number_of_return_registers = 3
1700
+ end
1701
+ elsif ['base-hvac-ducts-effective-rvalue.xml'].include? hpxml_file
1702
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_insulation_r_value = nil
1703
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_insulation_r_value = nil
1704
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_effective_r_value = 4.5
1705
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_effective_r_value = 1.7
1706
+ elsif ['base-hvac-multiple.xml'].include? hpxml_file
1707
+ hpxml_bldg.hvac_distributions.reverse_each do |hvac_distribution|
1708
+ hvac_distribution.delete
1709
+ end
1710
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1711
+ distribution_system_type: HPXML::HVACDistributionTypeAir,
1712
+ air_type: HPXML::AirTypeRegularVelocity)
1713
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements.add(duct_type: HPXML::DuctTypeSupply,
1714
+ duct_leakage_units: HPXML::UnitsCFM25,
1715
+ duct_leakage_value: 75,
1716
+ duct_leakage_total_or_to_outside: HPXML::DuctLeakageToOutside)
1717
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements.add(duct_type: HPXML::DuctTypeReturn,
1718
+ duct_leakage_units: HPXML::UnitsCFM25,
1719
+ duct_leakage_value: 25,
1720
+ duct_leakage_total_or_to_outside: HPXML::DuctLeakageToOutside)
1721
+ hpxml_bldg.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 1}",
1722
+ duct_type: HPXML::DuctTypeSupply,
1723
+ duct_insulation_r_value: 8,
1724
+ duct_location: HPXML::LocationAtticUnvented,
1725
+ duct_surface_area: 75)
1726
+ hpxml_bldg.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 1}",
1727
+ duct_type: HPXML::DuctTypeSupply,
1728
+ duct_insulation_r_value: 8,
1729
+ duct_location: HPXML::LocationOutside,
1730
+ duct_surface_area: 75)
1731
+ hpxml_bldg.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 1}",
1732
+ duct_type: HPXML::DuctTypeReturn,
1733
+ duct_insulation_r_value: 4,
1734
+ duct_location: HPXML::LocationAtticUnvented,
1735
+ duct_surface_area: 25)
1736
+ hpxml_bldg.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 1}",
1737
+ duct_type: HPXML::DuctTypeReturn,
1738
+ duct_insulation_r_value: 4,
1739
+ duct_location: HPXML::LocationOutside,
1740
+ duct_surface_area: 25)
1741
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1742
+ distribution_system_type: HPXML::HVACDistributionTypeAir,
1743
+ air_type: HPXML::AirTypeRegularVelocity)
1744
+ hpxml_bldg.hvac_distributions[-1].duct_leakage_measurements << hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[0].dup
1745
+ hpxml_bldg.hvac_distributions[-1].duct_leakage_measurements << hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[1].dup
1746
+ for i in 0..3
1747
+ hpxml_bldg.hvac_distributions[-1].ducts << hpxml_bldg.hvac_distributions[0].ducts[i].dup
1748
+ hpxml_bldg.hvac_distributions[-1].ducts[-1].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + i + 1}"
1749
+ end
1750
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1751
+ distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1752
+ hydronic_type: HPXML::HydronicTypeBaseboard)
1753
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1754
+ distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1755
+ hydronic_type: HPXML::HydronicTypeBaseboard)
1756
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1757
+ distribution_system_type: HPXML::HVACDistributionTypeAir,
1758
+ air_type: HPXML::AirTypeRegularVelocity)
1759
+ hpxml_bldg.hvac_distributions[-1].duct_leakage_measurements << hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[0].dup
1760
+ hpxml_bldg.hvac_distributions[-1].duct_leakage_measurements << hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[1].dup
1761
+ for i in 0..3
1762
+ hpxml_bldg.hvac_distributions[-1].ducts << hpxml_bldg.hvac_distributions[0].ducts[i].dup
1763
+ hpxml_bldg.hvac_distributions[-1].ducts[-1].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size * 2 + i + 1}"
1764
+ end
1765
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1766
+ distribution_system_type: HPXML::HVACDistributionTypeAir,
1767
+ air_type: HPXML::AirTypeRegularVelocity)
1768
+ hpxml_bldg.hvac_distributions[-1].duct_leakage_measurements << hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[0].dup
1769
+ hpxml_bldg.hvac_distributions[-1].duct_leakage_measurements << hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[1].dup
1770
+ for i in 0..3
1771
+ hpxml_bldg.hvac_distributions[-1].ducts << hpxml_bldg.hvac_distributions[0].ducts[i].dup
1772
+ hpxml_bldg.hvac_distributions[-1].ducts[-1].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size * 3 + i + 1}"
1773
+ end
1774
+ hpxml_bldg.heating_systems.reverse_each do |heating_system|
1775
+ heating_system.delete
1776
+ end
1777
+ hpxml_bldg.heating_systems.add(id: "HeatingSystem#{hpxml_bldg.heating_systems.size + 1}",
1778
+ distribution_system_idref: hpxml_bldg.hvac_distributions[0].id,
1779
+ heating_system_type: HPXML::HVACTypeFurnace,
1780
+ heating_system_fuel: HPXML::FuelTypeElectricity,
1781
+ heating_capacity: 6400,
1782
+ heating_efficiency_afue: 1,
1783
+ fraction_heat_load_served: 0.1)
1784
+ hpxml_bldg.heating_systems.add(id: "HeatingSystem#{hpxml_bldg.heating_systems.size + 1}",
1785
+ distribution_system_idref: hpxml_bldg.hvac_distributions[1].id,
1786
+ heating_system_type: HPXML::HVACTypeFurnace,
1787
+ heating_system_fuel: HPXML::FuelTypeNaturalGas,
1788
+ heating_capacity: 6400,
1789
+ heating_efficiency_afue: 0.92,
1790
+ fraction_heat_load_served: 0.1)
1791
+ hpxml_bldg.heating_systems.add(id: "HeatingSystem#{hpxml_bldg.heating_systems.size + 1}",
1792
+ distribution_system_idref: hpxml_bldg.hvac_distributions[2].id,
1793
+ heating_system_type: HPXML::HVACTypeBoiler,
1794
+ heating_system_fuel: HPXML::FuelTypeElectricity,
1795
+ heating_capacity: 6400,
1796
+ heating_efficiency_afue: 1,
1797
+ fraction_heat_load_served: 0.1)
1798
+ hpxml_bldg.heating_systems.add(id: "HeatingSystem#{hpxml_bldg.heating_systems.size + 1}",
1799
+ distribution_system_idref: hpxml_bldg.hvac_distributions[3].id,
1800
+ heating_system_type: HPXML::HVACTypeBoiler,
1801
+ heating_system_fuel: HPXML::FuelTypeNaturalGas,
1802
+ heating_capacity: 6400,
1803
+ heating_efficiency_afue: 0.92,
1804
+ fraction_heat_load_served: 0.1,
1805
+ electric_auxiliary_energy: 200)
1806
+ hpxml_bldg.heating_systems.add(id: "HeatingSystem#{hpxml_bldg.heating_systems.size + 1}",
1807
+ heating_system_type: HPXML::HVACTypeElectricResistance,
1808
+ heating_system_fuel: HPXML::FuelTypeElectricity,
1809
+ heating_capacity: 6400,
1810
+ heating_efficiency_percent: 1,
1811
+ fraction_heat_load_served: 0.1)
1812
+ hpxml_bldg.heating_systems.add(id: "HeatingSystem#{hpxml_bldg.heating_systems.size + 1}",
1813
+ heating_system_type: HPXML::HVACTypeStove,
1814
+ heating_system_fuel: HPXML::FuelTypeOil,
1815
+ heating_capacity: 6400,
1816
+ heating_efficiency_percent: 0.8,
1817
+ fraction_heat_load_served: 0.1,
1818
+ fan_watts: 40.0)
1819
+ hpxml_bldg.heating_systems.add(id: "HeatingSystem#{hpxml_bldg.heating_systems.size + 1}",
1820
+ heating_system_type: HPXML::HVACTypeWallFurnace,
1821
+ heating_system_fuel: HPXML::FuelTypePropane,
1822
+ heating_capacity: 6400,
1823
+ heating_efficiency_afue: 0.8,
1824
+ fraction_heat_load_served: 0.1,
1825
+ fan_watts: 0.0)
1826
+ hpxml_bldg.cooling_systems[0].distribution_system_idref = hpxml_bldg.hvac_distributions[1].id
1827
+ hpxml_bldg.cooling_systems[0].fraction_cool_load_served = 0.1333
1828
+ hpxml_bldg.cooling_systems[0].cooling_capacity *= 0.1333
1829
+ hpxml_bldg.cooling_systems[0].primary_system = false
1830
+ hpxml_bldg.cooling_systems.add(id: "CoolingSystem#{hpxml_bldg.cooling_systems.size + 1}",
1831
+ cooling_system_type: HPXML::HVACTypeRoomAirConditioner,
1832
+ cooling_system_fuel: HPXML::FuelTypeElectricity,
1833
+ cooling_capacity: 9600,
1834
+ fraction_cool_load_served: 0.1333,
1835
+ cooling_efficiency_eer: 8.5,
1836
+ cooling_shr: 0.65)
1837
+ hpxml_bldg.cooling_systems.add(id: "CoolingSystem#{hpxml_bldg.cooling_systems.size + 1}",
1838
+ cooling_system_type: HPXML::HVACTypePTAC,
1839
+ cooling_system_fuel: HPXML::FuelTypeElectricity,
1840
+ cooling_capacity: 9600,
1841
+ fraction_cool_load_served: 0.1333,
1842
+ cooling_efficiency_eer: 10.7,
1843
+ cooling_shr: 0.65)
1844
+ hpxml_bldg.heat_pumps.add(id: "HeatPump#{hpxml_bldg.heat_pumps.size + 1}",
1845
+ distribution_system_idref: hpxml_bldg.hvac_distributions[4].id,
1846
+ heat_pump_type: HPXML::HVACTypeHeatPumpAirToAir,
1847
+ heat_pump_fuel: HPXML::FuelTypeElectricity,
1848
+ heating_capacity: 4800,
1849
+ cooling_capacity: 4800,
1850
+ backup_type: HPXML::HeatPumpBackupTypeIntegrated,
1851
+ backup_heating_fuel: HPXML::FuelTypeElectricity,
1852
+ backup_heating_capacity: 3412,
1853
+ backup_heating_efficiency_percent: 1.0,
1854
+ fraction_heat_load_served: 0.1,
1855
+ fraction_cool_load_served: 0.2,
1856
+ heating_efficiency_hspf: 7.7,
1857
+ cooling_efficiency_seer: 13,
1858
+ heating_capacity_17F: 4800 * 0.6,
1859
+ cooling_shr: 0.73,
1860
+ compressor_type: HPXML::HVACCompressorTypeSingleStage)
1861
+ hpxml_bldg.heat_pumps.add(id: "HeatPump#{hpxml_bldg.heat_pumps.size + 1}",
1862
+ distribution_system_idref: hpxml_bldg.hvac_distributions[5].id,
1863
+ heat_pump_type: HPXML::HVACTypeHeatPumpGroundToAir,
1864
+ heat_pump_fuel: HPXML::FuelTypeElectricity,
1865
+ heating_capacity: 4800,
1866
+ cooling_capacity: 4800,
1867
+ backup_type: HPXML::HeatPumpBackupTypeIntegrated,
1868
+ backup_heating_fuel: HPXML::FuelTypeElectricity,
1869
+ backup_heating_capacity: 3412,
1870
+ backup_heating_efficiency_percent: 1.0,
1871
+ fraction_heat_load_served: 0.1,
1872
+ fraction_cool_load_served: 0.2,
1873
+ heating_efficiency_cop: 3.6,
1874
+ cooling_efficiency_eer: 16.6,
1875
+ cooling_shr: 0.73,
1876
+ pump_watts_per_ton: 30.0)
1877
+ hpxml_bldg.heat_pumps.add(id: "HeatPump#{hpxml_bldg.heat_pumps.size + 1}",
1878
+ heat_pump_type: HPXML::HVACTypeHeatPumpMiniSplit,
1879
+ heat_pump_fuel: HPXML::FuelTypeElectricity,
1880
+ heating_capacity: 4800,
1881
+ cooling_capacity: 4800,
1882
+ backup_type: HPXML::HeatPumpBackupTypeIntegrated,
1883
+ backup_heating_fuel: HPXML::FuelTypeElectricity,
1884
+ backup_heating_capacity: 3412,
1885
+ backup_heating_efficiency_percent: 1.0,
1886
+ fraction_heat_load_served: 0.1,
1887
+ fraction_cool_load_served: 0.2,
1888
+ heating_efficiency_hspf: 10,
1889
+ cooling_efficiency_seer: 19,
1890
+ heating_capacity_17F: 4800 * 0.6,
1891
+ cooling_shr: 0.73,
1892
+ primary_cooling_system: true,
1893
+ primary_heating_system: true)
1894
+ elsif ['base-mechvent-multiple.xml',
1895
+ 'base-bldgtype-mf-unit-shared-mechvent-multiple.xml'].include? hpxml_file
1896
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1897
+ distribution_system_type: HPXML::HVACDistributionTypeAir,
1898
+ air_type: HPXML::AirTypeRegularVelocity)
1899
+ hpxml_bldg.hvac_distributions[1].duct_leakage_measurements << hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[0].dup
1900
+ hpxml_bldg.hvac_distributions[1].duct_leakage_measurements << hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[1].dup
1901
+ hpxml_bldg.hvac_distributions[1].ducts << hpxml_bldg.hvac_distributions[0].ducts[0].dup
1902
+ hpxml_bldg.hvac_distributions[1].ducts << hpxml_bldg.hvac_distributions[0].ducts[1].dup
1903
+ hpxml_bldg.hvac_distributions[1].ducts[0].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 1}"
1904
+ hpxml_bldg.hvac_distributions[1].ducts[1].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 2}"
1905
+ hpxml_bldg.heating_systems[0].heating_capacity /= 2.0
1906
+ hpxml_bldg.heating_systems[0].fraction_heat_load_served /= 2.0
1907
+ hpxml_bldg.heating_systems[0].primary_system = false
1908
+ hpxml_bldg.heating_systems << hpxml_bldg.heating_systems[0].dup
1909
+ hpxml_bldg.heating_systems[1].id = "HeatingSystem#{hpxml_bldg.heating_systems.size}"
1910
+ hpxml_bldg.heating_systems[1].distribution_system_idref = hpxml_bldg.hvac_distributions[1].id
1911
+ hpxml_bldg.heating_systems[1].primary_system = true
1912
+ hpxml_bldg.cooling_systems[0].fraction_cool_load_served /= 2.0
1913
+ hpxml_bldg.cooling_systems[0].cooling_capacity /= 2.0
1914
+ hpxml_bldg.cooling_systems[0].primary_system = false
1915
+ hpxml_bldg.cooling_systems << hpxml_bldg.cooling_systems[0].dup
1916
+ hpxml_bldg.cooling_systems[1].id = "CoolingSystem#{hpxml_bldg.cooling_systems.size}"
1917
+ hpxml_bldg.cooling_systems[1].distribution_system_idref = hpxml_bldg.hvac_distributions[1].id
1918
+ hpxml_bldg.cooling_systems[1].primary_system = true
1919
+ elsif ['base-bldgtype-mf-unit-adjacent-to-multiple.xml'].include? hpxml_file
1920
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_location = HPXML::LocationOtherHousingUnit
1921
+ hpxml_bldg.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 1}",
1922
+ duct_type: HPXML::DuctTypeSupply,
1923
+ duct_insulation_r_value: 4,
1924
+ duct_location: HPXML::LocationRoofDeck,
1925
+ duct_surface_area: 150)
1926
+ hpxml_bldg.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 1}",
1927
+ duct_type: HPXML::DuctTypeReturn,
1928
+ duct_insulation_r_value: 0,
1929
+ duct_location: HPXML::LocationRoofDeck,
1930
+ duct_surface_area: 50)
1931
+ elsif ['base-appliances-dehumidifier-multiple.xml'].include? hpxml_file
1932
+ hpxml_bldg.dehumidifiers[0].fraction_served = 0.5
1933
+ hpxml_bldg.dehumidifiers.add(id: 'Dehumidifier2',
1934
+ type: HPXML::DehumidifierTypePortable,
1935
+ capacity: 30,
1936
+ energy_factor: 1.6,
1937
+ rh_setpoint: 0.5,
1938
+ fraction_served: 0.25,
1939
+ location: HPXML::LocationConditionedSpace)
1940
+ end
1941
+ if ['base-hvac-air-to-air-heat-pump-var-speed-backup-furnace.xml',
1942
+ 'base-hvac-autosize-air-to-air-heat-pump-var-speed-backup-furnace.xml'].include? hpxml_file
1943
+ # Switch backup boiler with hydronic distribution to backup furnace with air distribution
1944
+ hpxml_bldg.heating_systems[0].heating_system_type = HPXML::HVACTypeFurnace
1945
+ hpxml_bldg.hvac_distributions[0].distribution_system_type = HPXML::HVACDistributionTypeAir
1946
+ hpxml_bldg.hvac_distributions[0].air_type = HPXML::AirTypeRegularVelocity
1947
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements << hpxml_bldg.hvac_distributions[1].duct_leakage_measurements[0].dup
1948
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements << hpxml_bldg.hvac_distributions[1].duct_leakage_measurements[1].dup
1949
+ hpxml_bldg.hvac_distributions[0].ducts << hpxml_bldg.hvac_distributions[1].ducts[0].dup
1950
+ hpxml_bldg.hvac_distributions[0].ducts << hpxml_bldg.hvac_distributions[1].ducts[1].dup
1951
+ hpxml_bldg.hvac_distributions[1].ducts[0].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 1}"
1952
+ hpxml_bldg.hvac_distributions[1].ducts[1].id = "Ducts#{hpxml_bldg.hvac_distributions[0].ducts.size + 2}"
1953
+ end
1954
+ if ['base-hvac-ducts-area-multipliers.xml'].include? hpxml_file
1955
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_surface_area_multiplier = 0.5
1956
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_surface_area_multiplier = 1.5
1957
+ end
1958
+ if hpxml_file.include? 'heating-capacity-17f'
1959
+ hpxml_bldg.heat_pumps[0].heating_capacity_17F = hpxml_bldg.heat_pumps[0].heating_capacity * hpxml_bldg.heat_pumps[0].heating_capacity_retention_fraction
1960
+ hpxml_bldg.heat_pumps[0].heating_capacity_retention_fraction = nil
1961
+ hpxml_bldg.heat_pumps[0].heating_capacity_retention_temp = nil
1962
+ end
1963
+
1964
+ # ------------------ #
1965
+ # HPXML WaterHeating #
1966
+ # ------------------ #
1967
+
1968
+ # Logic that can only be applied based on the file name
1969
+ if ['base-schedules-simple.xml',
1970
+ 'base-schedules-simple-vacancy.xml',
1971
+ 'base-schedules-simple-power-outage.xml',
1972
+ 'base-misc-loads-large-uncommon.xml',
1973
+ 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
1974
+ hpxml_bldg.water_heating.water_fixtures_weekday_fractions = '0.012, 0.006, 0.004, 0.005, 0.010, 0.034, 0.078, 0.087, 0.080, 0.067, 0.056, 0.047, 0.040, 0.035, 0.033, 0.031, 0.039, 0.051, 0.060, 0.060, 0.055, 0.048, 0.038, 0.026'
1975
+ hpxml_bldg.water_heating.water_fixtures_weekend_fractions = '0.012, 0.006, 0.004, 0.005, 0.010, 0.034, 0.078, 0.087, 0.080, 0.067, 0.056, 0.047, 0.040, 0.035, 0.033, 0.031, 0.039, 0.051, 0.060, 0.060, 0.055, 0.048, 0.038, 0.026'
1976
+ hpxml_bldg.water_heating.water_fixtures_monthly_multipliers = '1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0'
1977
+ elsif ['base-bldgtype-mf-unit-shared-water-heater-recirc.xml'].include? hpxml_file
1978
+ hpxml_bldg.hot_water_distributions[0].has_shared_recirculation = true
1979
+ hpxml_bldg.hot_water_distributions[0].shared_recirculation_number_of_units_served = 6
1980
+ hpxml_bldg.hot_water_distributions[0].shared_recirculation_pump_power = 220
1981
+ hpxml_bldg.hot_water_distributions[0].shared_recirculation_control_type = HPXML::DHWRecirControlTypeTimer
1982
+ elsif ['base-bldgtype-mf-unit-shared-laundry-room.xml',
1983
+ 'base-bldgtype-mf-unit-shared-laundry-room-multiple-water-heaters.xml'].include? hpxml_file
1984
+ hpxml_bldg.water_heating_systems.reverse_each do |water_heating_system|
1985
+ water_heating_system.delete
1986
+ end
1987
+ hpxml_bldg.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size + 1}",
1988
+ is_shared_system: true,
1989
+ number_of_units_served: 6,
1990
+ fuel_type: HPXML::FuelTypeNaturalGas,
1991
+ water_heater_type: HPXML::WaterHeaterTypeStorage,
1992
+ location: HPXML::LocationConditionedSpace,
1993
+ tank_volume: 120,
1994
+ fraction_dhw_load_served: 1.0,
1995
+ heating_capacity: 40000,
1996
+ energy_factor: 0.59,
1997
+ recovery_efficiency: 0.76,
1998
+ temperature: 125.0)
1999
+ if hpxml_file == 'base-bldgtype-mf-unit-shared-laundry-room-multiple-water-heaters.xml'
2000
+ hpxml_bldg.water_heating_systems[0].fraction_dhw_load_served /= 2.0
2001
+ hpxml_bldg.water_heating_systems[0].tank_volume /= 2.0
2002
+ hpxml_bldg.water_heating_systems[0].number_of_units_served /= 2.0
2003
+ hpxml_bldg.water_heating_systems << hpxml_bldg.water_heating_systems[0].dup
2004
+ hpxml_bldg.water_heating_systems[1].id = "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size}"
2005
+ end
2006
+ elsif ['base-dhw-tank-gas-uef-fhr.xml'].include? hpxml_file
2007
+ hpxml_bldg.water_heating_systems[0].first_hour_rating = 56.0
2008
+ hpxml_bldg.water_heating_systems[0].usage_bin = nil
2009
+ elsif ['base-dhw-tankless-electric-outside.xml'].include? hpxml_file
2010
+ hpxml_bldg.water_heating_systems[0].performance_adjustment = 0.92
2011
+ elsif ['base-dhw-multiple.xml'].include? hpxml_file
2012
+ hpxml_bldg.water_heating_systems[0].fraction_dhw_load_served = 0.2
2013
+ hpxml_bldg.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size + 1}",
2014
+ fuel_type: HPXML::FuelTypeNaturalGas,
2015
+ water_heater_type: HPXML::WaterHeaterTypeStorage,
2016
+ location: HPXML::LocationConditionedSpace,
2017
+ tank_volume: 50,
2018
+ fraction_dhw_load_served: 0.2,
2019
+ heating_capacity: 40000,
2020
+ energy_factor: 0.59,
2021
+ recovery_efficiency: 0.76,
2022
+ temperature: 125.0)
2023
+ hpxml_bldg.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size + 1}",
2024
+ fuel_type: HPXML::FuelTypeElectricity,
2025
+ water_heater_type: HPXML::WaterHeaterTypeHeatPump,
2026
+ location: HPXML::LocationConditionedSpace,
2027
+ tank_volume: 80,
2028
+ fraction_dhw_load_served: 0.2,
2029
+ energy_factor: 2.3,
2030
+ temperature: 125.0)
2031
+ hpxml_bldg.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size + 1}",
2032
+ fuel_type: HPXML::FuelTypeElectricity,
2033
+ water_heater_type: HPXML::WaterHeaterTypeTankless,
2034
+ location: HPXML::LocationConditionedSpace,
2035
+ fraction_dhw_load_served: 0.2,
2036
+ energy_factor: 0.99,
2037
+ temperature: 125.0)
2038
+ hpxml_bldg.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size + 1}",
2039
+ fuel_type: HPXML::FuelTypeNaturalGas,
2040
+ water_heater_type: HPXML::WaterHeaterTypeTankless,
2041
+ location: HPXML::LocationConditionedSpace,
2042
+ fraction_dhw_load_served: 0.1,
2043
+ energy_factor: 0.82,
2044
+ temperature: 125.0)
2045
+ hpxml_bldg.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size + 1}",
2046
+ water_heater_type: HPXML::WaterHeaterTypeCombiStorage,
2047
+ location: HPXML::LocationConditionedSpace,
2048
+ tank_volume: 50,
2049
+ fraction_dhw_load_served: 0.1,
2050
+ related_hvac_idref: 'HeatingSystem1',
2051
+ temperature: 125.0)
2052
+ hpxml_bldg.solar_thermal_systems.add(id: "SolarThermalSystem#{hpxml_bldg.solar_thermal_systems.size + 1}",
2053
+ system_type: HPXML::SolarThermalSystemType,
2054
+ water_heating_system_idref: nil, # Apply to all water heaters
2055
+ solar_fraction: 0.65)
2056
+ end
2057
+ if ['base-dhw-low-flow-fixtures.xml'].include? hpxml_file
2058
+ hpxml_bldg.water_fixtures[0].count = 2
2059
+ hpxml_bldg.water_fixtures[1].low_flow = nil
2060
+ hpxml_bldg.water_fixtures[1].flow_rate = 2.0
2061
+ hpxml_bldg.water_fixtures[1].count = 3
2062
+ end
2063
+
2064
+ # -------------------- #
2065
+ # HPXML VentilationFan #
2066
+ # -------------------- #
2067
+
2068
+ # Logic that can only be applied based on the file name
2069
+ if ['base-bldgtype-mf-unit-shared-mechvent-multiple.xml'].include? hpxml_file
2070
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2071
+ fan_type: HPXML::MechVentTypeSupply,
2072
+ is_shared_system: true,
2073
+ in_unit_flow_rate: 100,
2074
+ calculated_flow_rate: 1000,
2075
+ hours_in_operation: 24,
2076
+ fan_power: 300,
2077
+ used_for_whole_building_ventilation: true,
2078
+ fraction_recirculation: 0.0,
2079
+ preheating_fuel: HPXML::FuelTypeNaturalGas,
2080
+ preheating_efficiency_cop: 0.92,
2081
+ preheating_fraction_load_served: 0.8,
2082
+ precooling_fuel: HPXML::FuelTypeElectricity,
2083
+ precooling_efficiency_cop: 4.0,
2084
+ precooling_fraction_load_served: 0.8)
2085
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2086
+ fan_type: HPXML::MechVentTypeERV,
2087
+ is_shared_system: true,
2088
+ in_unit_flow_rate: 50,
2089
+ delivered_ventilation: 500,
2090
+ hours_in_operation: 24,
2091
+ total_recovery_efficiency: 0.48,
2092
+ sensible_recovery_efficiency: 0.72,
2093
+ fan_power: 150,
2094
+ used_for_whole_building_ventilation: true,
2095
+ fraction_recirculation: 0.4,
2096
+ preheating_fuel: HPXML::FuelTypeNaturalGas,
2097
+ preheating_efficiency_cop: 0.87,
2098
+ preheating_fraction_load_served: 1.0,
2099
+ precooling_fuel: HPXML::FuelTypeElectricity,
2100
+ precooling_efficiency_cop: 3.5,
2101
+ precooling_fraction_load_served: 1.0)
2102
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2103
+ fan_type: HPXML::MechVentTypeHRV,
2104
+ is_shared_system: true,
2105
+ in_unit_flow_rate: 50,
2106
+ rated_flow_rate: 500,
2107
+ hours_in_operation: 24,
2108
+ sensible_recovery_efficiency: 0.72,
2109
+ fan_power: 150,
2110
+ used_for_whole_building_ventilation: true,
2111
+ fraction_recirculation: 0.3,
2112
+ preheating_fuel: HPXML::FuelTypeElectricity,
2113
+ preheating_efficiency_cop: 4.0,
2114
+ precooling_fuel: HPXML::FuelTypeElectricity,
2115
+ precooling_efficiency_cop: 4.5,
2116
+ preheating_fraction_load_served: 1.0,
2117
+ precooling_fraction_load_served: 1.0)
2118
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2119
+ fan_type: HPXML::MechVentTypeBalanced,
2120
+ is_shared_system: true,
2121
+ in_unit_flow_rate: 30,
2122
+ tested_flow_rate: 300,
2123
+ hours_in_operation: 24,
2124
+ fan_power: 150,
2125
+ used_for_whole_building_ventilation: true,
2126
+ fraction_recirculation: 0.3,
2127
+ preheating_fuel: HPXML::FuelTypeElectricity,
2128
+ preheating_efficiency_cop: 3.5,
2129
+ precooling_fuel: HPXML::FuelTypeElectricity,
2130
+ precooling_efficiency_cop: 4.0,
2131
+ preheating_fraction_load_served: 0.9,
2132
+ precooling_fraction_load_served: 1.0)
2133
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2134
+ fan_type: HPXML::MechVentTypeExhaust,
2135
+ is_shared_system: true,
2136
+ in_unit_flow_rate: 70,
2137
+ rated_flow_rate: 700,
2138
+ hours_in_operation: 8,
2139
+ fan_power: 300,
2140
+ used_for_whole_building_ventilation: true,
2141
+ fraction_recirculation: 0.0)
2142
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2143
+ fan_type: HPXML::MechVentTypeExhaust,
2144
+ tested_flow_rate: 50,
2145
+ hours_in_operation: 14,
2146
+ fan_power: 10,
2147
+ used_for_whole_building_ventilation: true)
2148
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2149
+ fan_type: HPXML::MechVentTypeCFIS,
2150
+ tested_flow_rate: 160,
2151
+ hours_in_operation: 8,
2152
+ fan_power: 150,
2153
+ used_for_whole_building_ventilation: true,
2154
+ cfis_addtl_runtime_operating_mode: HPXML::CFISModeAirHandler,
2155
+ distribution_system_idref: 'HVACDistribution1')
2156
+ elsif ['base-mechvent-multiple.xml'].include? hpxml_file
2157
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2158
+ rated_flow_rate: 2000,
2159
+ fan_power: 150,
2160
+ used_for_seasonal_cooling_load_reduction: true)
2161
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2162
+ fan_type: HPXML::MechVentTypeSupply,
2163
+ tested_flow_rate: 12.5,
2164
+ hours_in_operation: 14,
2165
+ fan_power: 2.5,
2166
+ used_for_whole_building_ventilation: true)
2167
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2168
+ fan_type: HPXML::MechVentTypeExhaust,
2169
+ tested_flow_rate: 30.0,
2170
+ fan_power: 7.5,
2171
+ used_for_whole_building_ventilation: true)
2172
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2173
+ fan_type: HPXML::MechVentTypeBalanced,
2174
+ tested_flow_rate: 27.5,
2175
+ hours_in_operation: 24,
2176
+ fan_power: 15,
2177
+ used_for_whole_building_ventilation: true)
2178
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2179
+ fan_type: HPXML::MechVentTypeERV,
2180
+ tested_flow_rate: 12.5,
2181
+ hours_in_operation: 24,
2182
+ total_recovery_efficiency: 0.48,
2183
+ sensible_recovery_efficiency: 0.72,
2184
+ fan_power: 6.25,
2185
+ used_for_whole_building_ventilation: true)
2186
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2187
+ fan_type: HPXML::MechVentTypeHRV,
2188
+ tested_flow_rate: 15,
2189
+ hours_in_operation: 24,
2190
+ sensible_recovery_efficiency: 0.72,
2191
+ fan_power: 7.5,
2192
+ used_for_whole_building_ventilation: true)
2193
+ hpxml_bldg.ventilation_fans.reverse_each do |vent_fan|
2194
+ vent_fan.fan_power /= 2.0
2195
+ vent_fan.rated_flow_rate /= 2.0 unless vent_fan.rated_flow_rate.nil?
2196
+ vent_fan.tested_flow_rate /= 2.0 unless vent_fan.tested_flow_rate.nil?
2197
+ hpxml_bldg.ventilation_fans << vent_fan.dup
2198
+ hpxml_bldg.ventilation_fans[-1].id = "VentilationFan#{hpxml_bldg.ventilation_fans.size}"
2199
+ hpxml_bldg.ventilation_fans[-1].start_hour = vent_fan.start_hour - 1 unless vent_fan.start_hour.nil?
2200
+ hpxml_bldg.ventilation_fans[-1].hours_in_operation = vent_fan.hours_in_operation - 1 unless vent_fan.hours_in_operation.nil?
2201
+ end
2202
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2203
+ fan_type: HPXML::MechVentTypeCFIS,
2204
+ tested_flow_rate: 40,
2205
+ hours_in_operation: 8,
2206
+ fan_power: 37.5,
2207
+ used_for_whole_building_ventilation: true,
2208
+ cfis_addtl_runtime_operating_mode: HPXML::CFISModeAirHandler,
2209
+ distribution_system_idref: 'HVACDistribution1')
2210
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2211
+ fan_type: HPXML::MechVentTypeCFIS,
2212
+ tested_flow_rate: 42.5,
2213
+ hours_in_operation: 8,
2214
+ fan_power: 37.5,
2215
+ used_for_whole_building_ventilation: true,
2216
+ cfis_addtl_runtime_operating_mode: HPXML::CFISModeSupplementalFan,
2217
+ cfis_supplemental_fan_idref: hpxml_bldg.ventilation_fans.find { |f| f.fan_type == HPXML::MechVentTypeExhaust }.id,
2218
+ distribution_system_idref: 'HVACDistribution2')
2219
+ # Test ventilation system w/ zero airflow and hours
2220
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2221
+ fan_type: HPXML::MechVentTypeHRV,
2222
+ tested_flow_rate: 0,
2223
+ hours_in_operation: 24,
2224
+ sensible_recovery_efficiency: 0.72,
2225
+ fan_power: 7.5,
2226
+ used_for_whole_building_ventilation: true)
2227
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2228
+ fan_type: HPXML::MechVentTypeHRV,
2229
+ tested_flow_rate: 15,
2230
+ hours_in_operation: 0,
2231
+ sensible_recovery_efficiency: 0.72,
2232
+ fan_power: 7.5,
2233
+ used_for_whole_building_ventilation: true)
2234
+ elsif ['base-mechvent-cfis-airflow-fraction-zero.xml'].include? hpxml_file
2235
+ hpxml_bldg.ventilation_fans[0].cfis_vent_mode_airflow_fraction = 0.0
2236
+ elsif ['base-mechvent-cfis-supplemental-fan-exhaust.xml',
2237
+ 'base-mechvent-cfis-supplemental-fan-supply.xml'].include? hpxml_file
2238
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
2239
+ tested_flow_rate: 120,
2240
+ fan_power: 30,
2241
+ used_for_whole_building_ventilation: true)
2242
+ if hpxml_file == 'base-mechvent-cfis-supplemental-fan-exhaust.xml'
2243
+ hpxml_bldg.ventilation_fans[-1].fan_type = HPXML::MechVentTypeExhaust
1381
2244
  else
1382
- hpxml.heating_systems[i].fraction_heat_load_served = 0.35
2245
+ hpxml_bldg.ventilation_fans[-1].fan_type = HPXML::MechVentTypeSupply
1383
2246
  end
1384
- end
1385
- elsif ['base-enclosure-2stories.xml',
1386
- 'base-enclosure-2stories-garage.xml',
1387
- 'base-hvac-ducts-area-fractions.xml'].include? hpxml_file
1388
- hpxml.hvac_distributions[0].ducts << hpxml.hvac_distributions[0].ducts[0].dup
1389
- hpxml.hvac_distributions[0].ducts[-1].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size}"
1390
- hpxml.hvac_distributions[0].ducts << hpxml.hvac_distributions[0].ducts[1].dup
1391
- hpxml.hvac_distributions[0].ducts[-1].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size}"
1392
- hpxml.hvac_distributions[0].ducts[2].duct_location = HPXML::LocationExteriorWall
1393
- hpxml.hvac_distributions[0].ducts[2].duct_surface_area = 37.5
1394
- hpxml.hvac_distributions[0].ducts[3].duct_location = HPXML::LocationLivingSpace
1395
- hpxml.hvac_distributions[0].ducts[3].duct_surface_area = 12.5
1396
- if hpxml_file == 'base-hvac-ducts-area-fractions.xml'
1397
- hpxml.hvac_distributions[0].ducts[0].duct_surface_area = nil
1398
- hpxml.hvac_distributions[0].ducts[1].duct_surface_area = nil
1399
- hpxml.hvac_distributions[0].ducts[2].duct_surface_area = nil
1400
- hpxml.hvac_distributions[0].ducts[3].duct_surface_area = nil
1401
- hpxml.hvac_distributions[0].ducts[0].duct_fraction_area = 0.75
1402
- hpxml.hvac_distributions[0].ducts[1].duct_fraction_area = 0.75
1403
- hpxml.hvac_distributions[0].ducts[2].duct_fraction_area = 0.25
1404
- hpxml.hvac_distributions[0].ducts[3].duct_fraction_area = 0.25
1405
- hpxml.hvac_distributions[0].conditioned_floor_area_served = 4050.0
1406
- hpxml.hvac_distributions[0].number_of_return_registers = 3
1407
- end
1408
- elsif ['base-hvac-ducts-effective-rvalue.xml'].include? hpxml_file
1409
- hpxml.hvac_distributions[0].ducts[0].duct_insulation_r_value = nil
1410
- hpxml.hvac_distributions[0].ducts[1].duct_insulation_r_value = nil
1411
- hpxml.hvac_distributions[0].ducts[0].duct_effective_r_value = 4.5
1412
- hpxml.hvac_distributions[0].ducts[1].duct_effective_r_value = 1.7
1413
- elsif ['base-hvac-multiple.xml'].include? hpxml_file
1414
- hpxml.hvac_distributions.reverse_each do |hvac_distribution|
1415
- hvac_distribution.delete
1416
- end
1417
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1418
- distribution_system_type: HPXML::HVACDistributionTypeAir,
1419
- air_type: HPXML::AirTypeRegularVelocity)
1420
- hpxml.hvac_distributions[0].duct_leakage_measurements.add(duct_type: HPXML::DuctTypeSupply,
1421
- duct_leakage_units: HPXML::UnitsCFM25,
1422
- duct_leakage_value: 75,
1423
- duct_leakage_total_or_to_outside: HPXML::DuctLeakageToOutside)
1424
- hpxml.hvac_distributions[0].duct_leakage_measurements.add(duct_type: HPXML::DuctTypeReturn,
1425
- duct_leakage_units: HPXML::UnitsCFM25,
1426
- duct_leakage_value: 25,
1427
- duct_leakage_total_or_to_outside: HPXML::DuctLeakageToOutside)
1428
- hpxml.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml.hvac_distributions[0].ducts.size + 1}",
1429
- duct_type: HPXML::DuctTypeSupply,
1430
- duct_insulation_r_value: 8,
1431
- duct_location: HPXML::LocationAtticUnvented,
1432
- duct_surface_area: 75)
1433
- hpxml.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml.hvac_distributions[0].ducts.size + 1}",
1434
- duct_type: HPXML::DuctTypeSupply,
1435
- duct_insulation_r_value: 8,
1436
- duct_location: HPXML::LocationOutside,
1437
- duct_surface_area: 75)
1438
- hpxml.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml.hvac_distributions[0].ducts.size + 1}",
1439
- duct_type: HPXML::DuctTypeReturn,
1440
- duct_insulation_r_value: 4,
1441
- duct_location: HPXML::LocationAtticUnvented,
1442
- duct_surface_area: 25)
1443
- hpxml.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml.hvac_distributions[0].ducts.size + 1}",
1444
- duct_type: HPXML::DuctTypeReturn,
1445
- duct_insulation_r_value: 4,
1446
- duct_location: HPXML::LocationOutside,
1447
- duct_surface_area: 25)
1448
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1449
- distribution_system_type: HPXML::HVACDistributionTypeAir,
1450
- air_type: HPXML::AirTypeRegularVelocity)
1451
- hpxml.hvac_distributions[-1].duct_leakage_measurements << hpxml.hvac_distributions[0].duct_leakage_measurements[0].dup
1452
- hpxml.hvac_distributions[-1].duct_leakage_measurements << hpxml.hvac_distributions[0].duct_leakage_measurements[1].dup
1453
- for i in 0..3
1454
- hpxml.hvac_distributions[-1].ducts << hpxml.hvac_distributions[0].ducts[i].dup
1455
- hpxml.hvac_distributions[-1].ducts[-1].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size + i + 1}"
1456
- end
1457
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1458
- distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1459
- hydronic_type: HPXML::HydronicTypeBaseboard)
1460
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1461
- distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1462
- hydronic_type: HPXML::HydronicTypeBaseboard)
1463
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1464
- distribution_system_type: HPXML::HVACDistributionTypeAir,
1465
- air_type: HPXML::AirTypeRegularVelocity)
1466
- hpxml.hvac_distributions[-1].duct_leakage_measurements << hpxml.hvac_distributions[0].duct_leakage_measurements[0].dup
1467
- hpxml.hvac_distributions[-1].duct_leakage_measurements << hpxml.hvac_distributions[0].duct_leakage_measurements[1].dup
1468
- for i in 0..3
1469
- hpxml.hvac_distributions[-1].ducts << hpxml.hvac_distributions[0].ducts[i].dup
1470
- hpxml.hvac_distributions[-1].ducts[-1].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size * 2 + i + 1}"
1471
- end
1472
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1473
- distribution_system_type: HPXML::HVACDistributionTypeAir,
1474
- air_type: HPXML::AirTypeRegularVelocity)
1475
- hpxml.hvac_distributions[-1].duct_leakage_measurements << hpxml.hvac_distributions[0].duct_leakage_measurements[0].dup
1476
- hpxml.hvac_distributions[-1].duct_leakage_measurements << hpxml.hvac_distributions[0].duct_leakage_measurements[1].dup
1477
- for i in 0..3
1478
- hpxml.hvac_distributions[-1].ducts << hpxml.hvac_distributions[0].ducts[i].dup
1479
- hpxml.hvac_distributions[-1].ducts[-1].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size * 3 + i + 1}"
1480
- end
1481
- hpxml.heating_systems.reverse_each do |heating_system|
1482
- heating_system.delete
1483
- end
1484
- hpxml.heating_systems.add(id: "HeatingSystem#{hpxml.heating_systems.size + 1}",
1485
- distribution_system_idref: hpxml.hvac_distributions[0].id,
1486
- heating_system_type: HPXML::HVACTypeFurnace,
1487
- heating_system_fuel: HPXML::FuelTypeElectricity,
1488
- heating_capacity: 6400,
1489
- heating_efficiency_afue: 1,
1490
- fraction_heat_load_served: 0.1)
1491
- hpxml.heating_systems.add(id: "HeatingSystem#{hpxml.heating_systems.size + 1}",
1492
- distribution_system_idref: hpxml.hvac_distributions[1].id,
1493
- heating_system_type: HPXML::HVACTypeFurnace,
1494
- heating_system_fuel: HPXML::FuelTypeNaturalGas,
1495
- heating_capacity: 6400,
1496
- heating_efficiency_afue: 0.92,
1497
- fraction_heat_load_served: 0.1)
1498
- hpxml.heating_systems.add(id: "HeatingSystem#{hpxml.heating_systems.size + 1}",
1499
- distribution_system_idref: hpxml.hvac_distributions[2].id,
1500
- heating_system_type: HPXML::HVACTypeBoiler,
1501
- heating_system_fuel: HPXML::FuelTypeElectricity,
1502
- heating_capacity: 6400,
1503
- heating_efficiency_afue: 1,
1504
- fraction_heat_load_served: 0.1)
1505
- hpxml.heating_systems.add(id: "HeatingSystem#{hpxml.heating_systems.size + 1}",
1506
- distribution_system_idref: hpxml.hvac_distributions[3].id,
1507
- heating_system_type: HPXML::HVACTypeBoiler,
1508
- heating_system_fuel: HPXML::FuelTypeNaturalGas,
1509
- heating_capacity: 6400,
1510
- heating_efficiency_afue: 0.92,
1511
- fraction_heat_load_served: 0.1,
1512
- electric_auxiliary_energy: 200)
1513
- hpxml.heating_systems.add(id: "HeatingSystem#{hpxml.heating_systems.size + 1}",
1514
- heating_system_type: HPXML::HVACTypeElectricResistance,
1515
- heating_system_fuel: HPXML::FuelTypeElectricity,
1516
- heating_capacity: 6400,
1517
- heating_efficiency_percent: 1,
1518
- fraction_heat_load_served: 0.1)
1519
- hpxml.heating_systems.add(id: "HeatingSystem#{hpxml.heating_systems.size + 1}",
1520
- heating_system_type: HPXML::HVACTypeStove,
1521
- heating_system_fuel: HPXML::FuelTypeOil,
1522
- heating_capacity: 6400,
1523
- heating_efficiency_percent: 0.8,
1524
- fraction_heat_load_served: 0.1,
1525
- fan_watts: 40.0)
1526
- hpxml.heating_systems.add(id: "HeatingSystem#{hpxml.heating_systems.size + 1}",
1527
- heating_system_type: HPXML::HVACTypeWallFurnace,
1528
- heating_system_fuel: HPXML::FuelTypePropane,
1529
- heating_capacity: 6400,
1530
- heating_efficiency_afue: 0.8,
1531
- fraction_heat_load_served: 0.1,
1532
- fan_watts: 0.0)
1533
- hpxml.cooling_systems[0].distribution_system_idref = hpxml.hvac_distributions[1].id
1534
- hpxml.cooling_systems[0].fraction_cool_load_served = 0.1333
1535
- hpxml.cooling_systems[0].cooling_capacity *= 0.1333
1536
- hpxml.cooling_systems[0].primary_system = false
1537
- hpxml.cooling_systems.add(id: "CoolingSystem#{hpxml.cooling_systems.size + 1}",
1538
- cooling_system_type: HPXML::HVACTypeRoomAirConditioner,
1539
- cooling_system_fuel: HPXML::FuelTypeElectricity,
1540
- cooling_capacity: 9600,
1541
- fraction_cool_load_served: 0.1333,
1542
- cooling_efficiency_eer: 8.5,
1543
- cooling_shr: 0.65)
1544
- hpxml.cooling_systems.add(id: "CoolingSystem#{hpxml.cooling_systems.size + 1}",
1545
- cooling_system_type: HPXML::HVACTypePTAC,
1546
- cooling_system_fuel: HPXML::FuelTypeElectricity,
1547
- cooling_capacity: 9600,
1548
- fraction_cool_load_served: 0.1333,
1549
- cooling_efficiency_eer: 10.7,
1550
- cooling_shr: 0.65)
1551
- hpxml.heat_pumps.add(id: "HeatPump#{hpxml.heat_pumps.size + 1}",
1552
- distribution_system_idref: hpxml.hvac_distributions[4].id,
1553
- heat_pump_type: HPXML::HVACTypeHeatPumpAirToAir,
1554
- heat_pump_fuel: HPXML::FuelTypeElectricity,
1555
- heating_capacity: 4800,
1556
- cooling_capacity: 4800,
1557
- backup_type: HPXML::HeatPumpBackupTypeIntegrated,
1558
- backup_heating_fuel: HPXML::FuelTypeElectricity,
1559
- backup_heating_capacity: 3412,
1560
- backup_heating_efficiency_percent: 1.0,
1561
- fraction_heat_load_served: 0.1,
1562
- fraction_cool_load_served: 0.2,
1563
- heating_efficiency_hspf: 7.7,
1564
- cooling_efficiency_seer: 13,
1565
- heating_capacity_17F: 4800 * 0.6,
1566
- cooling_shr: 0.73,
1567
- compressor_type: HPXML::HVACCompressorTypeSingleStage)
1568
- hpxml.heat_pumps.add(id: "HeatPump#{hpxml.heat_pumps.size + 1}",
1569
- distribution_system_idref: hpxml.hvac_distributions[5].id,
1570
- heat_pump_type: HPXML::HVACTypeHeatPumpGroundToAir,
1571
- heat_pump_fuel: HPXML::FuelTypeElectricity,
1572
- heating_capacity: 4800,
1573
- cooling_capacity: 4800,
1574
- backup_type: HPXML::HeatPumpBackupTypeIntegrated,
1575
- backup_heating_fuel: HPXML::FuelTypeElectricity,
1576
- backup_heating_capacity: 3412,
1577
- backup_heating_efficiency_percent: 1.0,
1578
- fraction_heat_load_served: 0.1,
1579
- fraction_cool_load_served: 0.2,
1580
- heating_efficiency_cop: 3.6,
1581
- cooling_efficiency_eer: 16.6,
1582
- cooling_shr: 0.73,
1583
- pump_watts_per_ton: 30.0)
1584
- hpxml.heat_pumps.add(id: "HeatPump#{hpxml.heat_pumps.size + 1}",
1585
- heat_pump_type: HPXML::HVACTypeHeatPumpMiniSplit,
1586
- heat_pump_fuel: HPXML::FuelTypeElectricity,
1587
- heating_capacity: 4800,
1588
- cooling_capacity: 4800,
1589
- backup_type: HPXML::HeatPumpBackupTypeIntegrated,
1590
- backup_heating_fuel: HPXML::FuelTypeElectricity,
1591
- backup_heating_capacity: 3412,
1592
- backup_heating_efficiency_percent: 1.0,
1593
- fraction_heat_load_served: 0.1,
1594
- fraction_cool_load_served: 0.2,
1595
- heating_efficiency_hspf: 10,
1596
- cooling_efficiency_seer: 19,
1597
- heating_capacity_17F: 4800 * 0.6,
1598
- cooling_shr: 0.73,
1599
- primary_cooling_system: true,
1600
- primary_heating_system: true)
1601
- elsif ['base-mechvent-multiple.xml',
1602
- 'base-bldgtype-multifamily-shared-mechvent-multiple.xml'].include? hpxml_file
1603
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
1604
- distribution_system_type: HPXML::HVACDistributionTypeAir,
1605
- air_type: HPXML::AirTypeRegularVelocity)
1606
- hpxml.hvac_distributions[1].duct_leakage_measurements << hpxml.hvac_distributions[0].duct_leakage_measurements[0].dup
1607
- hpxml.hvac_distributions[1].duct_leakage_measurements << hpxml.hvac_distributions[0].duct_leakage_measurements[1].dup
1608
- hpxml.hvac_distributions[1].ducts << hpxml.hvac_distributions[0].ducts[0].dup
1609
- hpxml.hvac_distributions[1].ducts << hpxml.hvac_distributions[0].ducts[1].dup
1610
- hpxml.hvac_distributions[1].ducts[0].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size + 1}"
1611
- hpxml.hvac_distributions[1].ducts[1].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size + 2}"
1612
- hpxml.heating_systems[0].heating_capacity /= 2.0
1613
- hpxml.heating_systems[0].fraction_heat_load_served /= 2.0
1614
- hpxml.heating_systems[0].primary_system = false
1615
- hpxml.heating_systems << hpxml.heating_systems[0].dup
1616
- hpxml.heating_systems[1].id = "HeatingSystem#{hpxml.heating_systems.size}"
1617
- hpxml.heating_systems[1].distribution_system_idref = hpxml.hvac_distributions[1].id
1618
- hpxml.heating_systems[1].primary_system = true
1619
- hpxml.cooling_systems[0].fraction_cool_load_served /= 2.0
1620
- hpxml.cooling_systems[0].cooling_capacity /= 2.0
1621
- hpxml.cooling_systems[0].primary_system = false
1622
- hpxml.cooling_systems << hpxml.cooling_systems[0].dup
1623
- hpxml.cooling_systems[1].id = "CoolingSystem#{hpxml.cooling_systems.size}"
1624
- hpxml.cooling_systems[1].distribution_system_idref = hpxml.hvac_distributions[1].id
1625
- hpxml.cooling_systems[1].primary_system = true
1626
- elsif ['base-bldgtype-multifamily-adjacent-to-multiple.xml'].include? hpxml_file
1627
- hpxml.hvac_distributions[0].ducts[1].duct_location = HPXML::LocationOtherHousingUnit
1628
- hpxml.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml.hvac_distributions[0].ducts.size + 1}",
1629
- duct_type: HPXML::DuctTypeSupply,
1630
- duct_insulation_r_value: 4,
1631
- duct_location: HPXML::LocationRoofDeck,
1632
- duct_surface_area: 150)
1633
- hpxml.hvac_distributions[0].ducts.add(id: "Ducts#{hpxml.hvac_distributions[0].ducts.size + 1}",
1634
- duct_type: HPXML::DuctTypeReturn,
1635
- duct_insulation_r_value: 0,
1636
- duct_location: HPXML::LocationRoofDeck,
1637
- duct_surface_area: 50)
1638
- elsif ['base-appliances-dehumidifier-multiple.xml'].include? hpxml_file
1639
- hpxml.dehumidifiers[0].fraction_served = 0.5
1640
- hpxml.dehumidifiers.add(id: 'Dehumidifier2',
1641
- type: HPXML::DehumidifierTypePortable,
1642
- capacity: 30,
1643
- energy_factor: 1.6,
1644
- rh_setpoint: 0.5,
1645
- fraction_served: 0.25,
1646
- location: HPXML::LocationLivingSpace)
1647
- end
1648
- if ['base-hvac-air-to-air-heat-pump-var-speed-backup-furnace.xml',
1649
- 'base-hvac-autosize-air-to-air-heat-pump-var-speed-backup-furnace.xml'].include? hpxml_file
1650
- # Switch backup boiler with hydronic distribution to backup furnace with air distribution
1651
- hpxml.heating_systems[0].heating_system_type = HPXML::HVACTypeFurnace
1652
- hpxml.hvac_distributions[0].distribution_system_type = HPXML::HVACDistributionTypeAir
1653
- hpxml.hvac_distributions[0].air_type = HPXML::AirTypeRegularVelocity
1654
- hpxml.hvac_distributions[0].duct_leakage_measurements << hpxml.hvac_distributions[1].duct_leakage_measurements[0].dup
1655
- hpxml.hvac_distributions[0].duct_leakage_measurements << hpxml.hvac_distributions[1].duct_leakage_measurements[1].dup
1656
- hpxml.hvac_distributions[0].ducts << hpxml.hvac_distributions[1].ducts[0].dup
1657
- hpxml.hvac_distributions[0].ducts << hpxml.hvac_distributions[1].ducts[1].dup
1658
- hpxml.hvac_distributions[1].ducts[0].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size + 1}"
1659
- hpxml.hvac_distributions[1].ducts[1].id = "Ducts#{hpxml.hvac_distributions[0].ducts.size + 2}"
1660
- end
1661
- if ['base-hvac-ducts-area-multipliers.xml'].include? hpxml_file
1662
- hpxml.hvac_distributions[0].ducts[0].duct_surface_area_multiplier = 0.5
1663
- hpxml.hvac_distributions[0].ducts[1].duct_surface_area_multiplier = 1.5
1664
- end
1665
- if ['base-hvac-autosize-sizing-controls.xml'].include? hpxml_file
1666
- hpxml.header.manualj_heating_design_temp = 0
1667
- hpxml.header.manualj_cooling_design_temp = 100
1668
- hpxml.header.manualj_heating_setpoint = 60
1669
- hpxml.header.manualj_cooling_setpoint = 80
1670
- hpxml.header.manualj_humidity_setpoint = 0.55
1671
- hpxml.header.manualj_internal_loads_sensible = 4000
1672
- hpxml.header.manualj_internal_loads_latent = 200
1673
- hpxml.header.manualj_num_occupants = 5
1674
- end
1675
- if hpxml_file.include? 'heating-capacity-17f'
1676
- hpxml.heat_pumps[0].heating_capacity_17F = hpxml.heat_pumps[0].heating_capacity * hpxml.heat_pumps[0].heating_capacity_retention_fraction
1677
- hpxml.heat_pumps[0].heating_capacity_retention_fraction = nil
1678
- hpxml.heat_pumps[0].heating_capacity_retention_temp = nil
1679
- end
1680
-
1681
- # ------------------ #
1682
- # HPXML WaterHeating #
1683
- # ------------------ #
1684
-
1685
- # Logic that can only be applied based on the file name
1686
- if ['base-schedules-simple.xml',
1687
- 'base-schedules-simple-vacancy.xml',
1688
- 'base-schedules-simple-vacancy-year-round.xml',
1689
- 'base-schedules-simple-power-outage.xml',
1690
- 'base-misc-loads-large-uncommon.xml',
1691
- 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
1692
- hpxml.water_heating.water_fixtures_weekday_fractions = '0.012, 0.006, 0.004, 0.005, 0.010, 0.034, 0.078, 0.087, 0.080, 0.067, 0.056, 0.047, 0.040, 0.035, 0.033, 0.031, 0.039, 0.051, 0.060, 0.060, 0.055, 0.048, 0.038, 0.026'
1693
- hpxml.water_heating.water_fixtures_weekend_fractions = '0.012, 0.006, 0.004, 0.005, 0.010, 0.034, 0.078, 0.087, 0.080, 0.067, 0.056, 0.047, 0.040, 0.035, 0.033, 0.031, 0.039, 0.051, 0.060, 0.060, 0.055, 0.048, 0.038, 0.026'
1694
- hpxml.water_heating.water_fixtures_monthly_multipliers = '1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0'
1695
- elsif ['base-bldgtype-multifamily-shared-water-heater-recirc.xml'].include? hpxml_file
1696
- hpxml.hot_water_distributions[0].has_shared_recirculation = true
1697
- hpxml.hot_water_distributions[0].shared_recirculation_number_of_units_served = 6
1698
- hpxml.hot_water_distributions[0].shared_recirculation_pump_power = 220
1699
- hpxml.hot_water_distributions[0].shared_recirculation_control_type = HPXML::DHWRecirControlTypeTimer
1700
- elsif ['base-bldgtype-multifamily-shared-laundry-room.xml',
1701
- 'base-bldgtype-multifamily-shared-laundry-room-multiple-water-heaters.xml'].include? hpxml_file
1702
- hpxml.water_heating_systems.reverse_each do |water_heating_system|
1703
- water_heating_system.delete
1704
- end
1705
- hpxml.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml.water_heating_systems.size + 1}",
1706
- is_shared_system: true,
1707
- number_of_units_served: 6,
1708
- fuel_type: HPXML::FuelTypeNaturalGas,
1709
- water_heater_type: HPXML::WaterHeaterTypeStorage,
1710
- location: HPXML::LocationLivingSpace,
1711
- tank_volume: 120,
1712
- fraction_dhw_load_served: 1.0,
1713
- heating_capacity: 40000,
1714
- energy_factor: 0.59,
1715
- recovery_efficiency: 0.76,
1716
- temperature: 125.0)
1717
- if hpxml_file == 'base-bldgtype-multifamily-shared-laundry-room-multiple-water-heaters.xml'
1718
- hpxml.water_heating_systems[0].fraction_dhw_load_served /= 2.0
1719
- hpxml.water_heating_systems[0].tank_volume /= 2.0
1720
- hpxml.water_heating_systems[0].number_of_units_served /= 2.0
1721
- hpxml.water_heating_systems << hpxml.water_heating_systems[0].dup
1722
- hpxml.water_heating_systems[1].id = "WaterHeatingSystem#{hpxml.water_heating_systems.size}"
1723
- end
1724
- elsif ['base-dhw-tank-gas-uef-fhr.xml'].include? hpxml_file
1725
- hpxml.water_heating_systems[0].first_hour_rating = 56.0
1726
- hpxml.water_heating_systems[0].usage_bin = nil
1727
- elsif ['base-dhw-tankless-electric-outside.xml'].include? hpxml_file
1728
- hpxml.water_heating_systems[0].performance_adjustment = 0.92
1729
- elsif ['base-dhw-multiple.xml'].include? hpxml_file
1730
- hpxml.water_heating_systems[0].fraction_dhw_load_served = 0.2
1731
- hpxml.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml.water_heating_systems.size + 1}",
1732
- fuel_type: HPXML::FuelTypeNaturalGas,
1733
- water_heater_type: HPXML::WaterHeaterTypeStorage,
1734
- location: HPXML::LocationLivingSpace,
1735
- tank_volume: 50,
1736
- fraction_dhw_load_served: 0.2,
1737
- heating_capacity: 40000,
1738
- energy_factor: 0.59,
1739
- recovery_efficiency: 0.76,
1740
- temperature: 125.0)
1741
- hpxml.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml.water_heating_systems.size + 1}",
1742
- fuel_type: HPXML::FuelTypeElectricity,
1743
- water_heater_type: HPXML::WaterHeaterTypeHeatPump,
1744
- location: HPXML::LocationLivingSpace,
1745
- tank_volume: 80,
1746
- fraction_dhw_load_served: 0.2,
1747
- energy_factor: 2.3,
1748
- temperature: 125.0)
1749
- hpxml.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml.water_heating_systems.size + 1}",
1750
- fuel_type: HPXML::FuelTypeElectricity,
1751
- water_heater_type: HPXML::WaterHeaterTypeTankless,
1752
- location: HPXML::LocationLivingSpace,
1753
- fraction_dhw_load_served: 0.2,
1754
- energy_factor: 0.99,
1755
- temperature: 125.0)
1756
- hpxml.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml.water_heating_systems.size + 1}",
1757
- fuel_type: HPXML::FuelTypeNaturalGas,
1758
- water_heater_type: HPXML::WaterHeaterTypeTankless,
1759
- location: HPXML::LocationLivingSpace,
1760
- fraction_dhw_load_served: 0.1,
1761
- energy_factor: 0.82,
1762
- temperature: 125.0)
1763
- hpxml.water_heating_systems.add(id: "WaterHeatingSystem#{hpxml.water_heating_systems.size + 1}",
1764
- water_heater_type: HPXML::WaterHeaterTypeCombiStorage,
1765
- location: HPXML::LocationLivingSpace,
1766
- tank_volume: 50,
1767
- fraction_dhw_load_served: 0.1,
1768
- related_hvac_idref: 'HeatingSystem1',
1769
- temperature: 125.0)
1770
- hpxml.solar_thermal_systems.add(id: "SolarThermalSystem#{hpxml.solar_thermal_systems.size + 1}",
1771
- system_type: HPXML::SolarThermalSystemType,
1772
- water_heating_system_idref: nil, # Apply to all water heaters
1773
- solar_fraction: 0.65)
1774
- end
1775
-
1776
- # -------------------- #
1777
- # HPXML VentilationFan #
1778
- # -------------------- #
1779
-
1780
- # Logic that can only be applied based on the file name
1781
- if ['base-bldgtype-multifamily-shared-mechvent-multiple.xml'].include? hpxml_file
1782
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1783
- fan_type: HPXML::MechVentTypeSupply,
1784
- is_shared_system: true,
1785
- in_unit_flow_rate: 100,
1786
- calculated_flow_rate: 1000,
1787
- hours_in_operation: 24,
1788
- fan_power: 300,
1789
- used_for_whole_building_ventilation: true,
1790
- fraction_recirculation: 0.0,
1791
- preheating_fuel: HPXML::FuelTypeNaturalGas,
1792
- preheating_efficiency_cop: 0.92,
1793
- preheating_fraction_load_served: 0.8,
1794
- precooling_fuel: HPXML::FuelTypeElectricity,
1795
- precooling_efficiency_cop: 4.0,
1796
- precooling_fraction_load_served: 0.8)
1797
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1798
- fan_type: HPXML::MechVentTypeERV,
1799
- is_shared_system: true,
1800
- in_unit_flow_rate: 50,
1801
- delivered_ventilation: 500,
1802
- hours_in_operation: 24,
1803
- total_recovery_efficiency: 0.48,
1804
- sensible_recovery_efficiency: 0.72,
1805
- fan_power: 150,
1806
- used_for_whole_building_ventilation: true,
1807
- fraction_recirculation: 0.4,
1808
- preheating_fuel: HPXML::FuelTypeNaturalGas,
1809
- preheating_efficiency_cop: 0.87,
1810
- preheating_fraction_load_served: 1.0,
1811
- precooling_fuel: HPXML::FuelTypeElectricity,
1812
- precooling_efficiency_cop: 3.5,
1813
- precooling_fraction_load_served: 1.0)
1814
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1815
- fan_type: HPXML::MechVentTypeHRV,
1816
- is_shared_system: true,
1817
- in_unit_flow_rate: 50,
1818
- rated_flow_rate: 500,
1819
- hours_in_operation: 24,
1820
- sensible_recovery_efficiency: 0.72,
1821
- fan_power: 150,
1822
- used_for_whole_building_ventilation: true,
1823
- fraction_recirculation: 0.3,
1824
- preheating_fuel: HPXML::FuelTypeElectricity,
1825
- preheating_efficiency_cop: 4.0,
1826
- precooling_fuel: HPXML::FuelTypeElectricity,
1827
- precooling_efficiency_cop: 4.5,
1828
- preheating_fraction_load_served: 1.0,
1829
- precooling_fraction_load_served: 1.0)
1830
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1831
- fan_type: HPXML::MechVentTypeBalanced,
1832
- is_shared_system: true,
1833
- in_unit_flow_rate: 30,
1834
- tested_flow_rate: 300,
1835
- hours_in_operation: 24,
1836
- fan_power: 150,
1837
- used_for_whole_building_ventilation: true,
1838
- fraction_recirculation: 0.3,
1839
- preheating_fuel: HPXML::FuelTypeElectricity,
1840
- preheating_efficiency_cop: 3.5,
1841
- precooling_fuel: HPXML::FuelTypeElectricity,
1842
- precooling_efficiency_cop: 4.0,
1843
- preheating_fraction_load_served: 0.9,
1844
- precooling_fraction_load_served: 1.0)
1845
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1846
- fan_type: HPXML::MechVentTypeExhaust,
1847
- is_shared_system: true,
1848
- in_unit_flow_rate: 70,
1849
- rated_flow_rate: 700,
1850
- hours_in_operation: 8,
1851
- fan_power: 300,
1852
- used_for_whole_building_ventilation: true,
1853
- fraction_recirculation: 0.0)
1854
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1855
- fan_type: HPXML::MechVentTypeExhaust,
1856
- tested_flow_rate: 50,
1857
- hours_in_operation: 14,
1858
- fan_power: 10,
1859
- used_for_whole_building_ventilation: true)
1860
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1861
- fan_type: HPXML::MechVentTypeCFIS,
1862
- tested_flow_rate: 160,
1863
- hours_in_operation: 8,
1864
- fan_power: 150,
1865
- used_for_whole_building_ventilation: true,
1866
- cfis_addtl_runtime_operating_mode: HPXML::CFISModeAirHandler,
1867
- distribution_system_idref: 'HVACDistribution1')
1868
- elsif ['base-mechvent-multiple.xml'].include? hpxml_file
1869
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1870
- rated_flow_rate: 2000,
1871
- fan_power: 150,
1872
- used_for_seasonal_cooling_load_reduction: true)
1873
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1874
- fan_type: HPXML::MechVentTypeSupply,
1875
- tested_flow_rate: 12.5,
1876
- hours_in_operation: 14,
1877
- fan_power: 2.5,
1878
- used_for_whole_building_ventilation: true)
1879
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1880
- fan_type: HPXML::MechVentTypeExhaust,
1881
- tested_flow_rate: 30.0,
1882
- fan_power: 7.5,
1883
- used_for_whole_building_ventilation: true)
1884
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1885
- fan_type: HPXML::MechVentTypeBalanced,
1886
- tested_flow_rate: 27.5,
1887
- hours_in_operation: 24,
1888
- fan_power: 15,
1889
- used_for_whole_building_ventilation: true)
1890
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1891
- fan_type: HPXML::MechVentTypeERV,
1892
- tested_flow_rate: 12.5,
1893
- hours_in_operation: 24,
1894
- total_recovery_efficiency: 0.48,
1895
- sensible_recovery_efficiency: 0.72,
1896
- fan_power: 6.25,
1897
- used_for_whole_building_ventilation: true)
1898
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1899
- fan_type: HPXML::MechVentTypeHRV,
1900
- tested_flow_rate: 15,
1901
- hours_in_operation: 24,
1902
- sensible_recovery_efficiency: 0.72,
1903
- fan_power: 7.5,
1904
- used_for_whole_building_ventilation: true)
1905
- hpxml.ventilation_fans.reverse_each do |vent_fan|
1906
- vent_fan.fan_power /= 2.0
1907
- vent_fan.rated_flow_rate /= 2.0 unless vent_fan.rated_flow_rate.nil?
1908
- vent_fan.tested_flow_rate /= 2.0 unless vent_fan.tested_flow_rate.nil?
1909
- hpxml.ventilation_fans << vent_fan.dup
1910
- hpxml.ventilation_fans[-1].id = "VentilationFan#{hpxml.ventilation_fans.size}"
1911
- hpxml.ventilation_fans[-1].start_hour = vent_fan.start_hour - 1 unless vent_fan.start_hour.nil?
1912
- hpxml.ventilation_fans[-1].hours_in_operation = vent_fan.hours_in_operation - 1 unless vent_fan.hours_in_operation.nil?
1913
- end
1914
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1915
- fan_type: HPXML::MechVentTypeCFIS,
1916
- tested_flow_rate: 40,
1917
- hours_in_operation: 8,
1918
- fan_power: 37.5,
1919
- used_for_whole_building_ventilation: true,
1920
- cfis_addtl_runtime_operating_mode: HPXML::CFISModeAirHandler,
1921
- distribution_system_idref: 'HVACDistribution1')
1922
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1923
- fan_type: HPXML::MechVentTypeCFIS,
1924
- tested_flow_rate: 42.5,
1925
- hours_in_operation: 8,
1926
- fan_power: 37.5,
1927
- used_for_whole_building_ventilation: true,
1928
- cfis_addtl_runtime_operating_mode: HPXML::CFISModeSupplementalFan,
1929
- cfis_supplemental_fan_idref: hpxml.ventilation_fans.find { |f| f.fan_type == HPXML::MechVentTypeExhaust }.id,
1930
- distribution_system_idref: 'HVACDistribution2')
1931
- # Test ventilation system w/ zero airflow and hours
1932
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1933
- fan_type: HPXML::MechVentTypeHRV,
1934
- tested_flow_rate: 0,
1935
- hours_in_operation: 24,
1936
- sensible_recovery_efficiency: 0.72,
1937
- fan_power: 7.5,
1938
- used_for_whole_building_ventilation: true)
1939
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1940
- fan_type: HPXML::MechVentTypeHRV,
1941
- tested_flow_rate: 15,
1942
- hours_in_operation: 0,
1943
- sensible_recovery_efficiency: 0.72,
1944
- fan_power: 7.5,
1945
- used_for_whole_building_ventilation: true)
1946
- elsif ['base-mechvent-cfis-airflow-fraction-zero.xml'].include? hpxml_file
1947
- hpxml.ventilation_fans[0].cfis_vent_mode_airflow_fraction = 0.0
1948
- elsif ['base-mechvent-cfis-supplemental-fan-exhaust.xml',
1949
- 'base-mechvent-cfis-supplemental-fan-supply.xml'].include? hpxml_file
1950
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1951
- tested_flow_rate: 120,
1952
- fan_power: 30,
1953
- used_for_whole_building_ventilation: true)
1954
- if hpxml_file == 'base-mechvent-cfis-supplemental-fan-exhaust.xml'
1955
- hpxml.ventilation_fans[-1].fan_type = HPXML::MechVentTypeExhaust
1956
- else
1957
- hpxml.ventilation_fans[-1].fan_type = HPXML::MechVentTypeSupply
1958
- end
1959
- hpxml.ventilation_fans[0].cfis_addtl_runtime_operating_mode = HPXML::CFISModeSupplementalFan
1960
- hpxml.ventilation_fans[0].cfis_supplemental_fan_idref = hpxml.ventilation_fans[1].id
1961
- end
1962
-
1963
- # ---------------- #
1964
- # HPXML Generation #
1965
- # ---------------- #
1966
-
1967
- # Logic that can only be applied based on the file name
1968
- if ['base-misc-defaults.xml'].include? hpxml_file
1969
- hpxml.pv_systems[0].year_modules_manufactured = 2015
1970
- elsif ['base-misc-generators.xml',
1971
- 'base-misc-generators-battery.xml',
1972
- 'base-misc-generators-battery-scheduled.xml',
1973
- 'base-pv-generators.xml',
1974
- 'base-pv-generators-battery.xml',
1975
- 'base-pv-generators-battery-scheduled.xml'].include? hpxml_file
1976
- hpxml.generators.add(id: "Generator#{hpxml.generators.size + 1}",
1977
- fuel_type: HPXML::FuelTypeNaturalGas,
1978
- annual_consumption_kbtu: 8500,
1979
- annual_output_kwh: 1200)
1980
- hpxml.generators.add(id: "Generator#{hpxml.generators.size + 1}",
1981
- fuel_type: HPXML::FuelTypeOil,
1982
- annual_consumption_kbtu: 8500,
1983
- annual_output_kwh: 1200)
1984
- elsif ['base-bldgtype-multifamily-shared-generator.xml'].include? hpxml_file
1985
- hpxml.generators.add(id: "Generator#{hpxml.generators.size + 1}",
1986
- is_shared_system: true,
1987
- fuel_type: HPXML::FuelTypePropane,
1988
- annual_consumption_kbtu: 85000,
1989
- annual_output_kwh: 12000,
1990
- number_of_bedrooms_served: 18)
1991
- end
1992
-
1993
- # ------------- #
1994
- # HPXML Battery #
1995
- # ------------- #
1996
-
1997
- if ['base-pv-battery-lifetime-model.xml'].include? hpxml_file
1998
- hpxml.batteries[0].lifetime_model = HPXML::BatteryLifetimeModelKandlerSmith
1999
- elsif ['base-pv-battery-ah.xml'].include? hpxml_file
2000
- default_values = Battery.get_battery_default_values()
2001
- hpxml.batteries[0].nominal_capacity_ah = Battery.get_Ah_from_kWh(hpxml.batteries[0].nominal_capacity_kwh,
2002
- default_values[:nominal_voltage])
2003
- hpxml.batteries[0].usable_capacity_ah = hpxml.batteries[0].nominal_capacity_ah * default_values[:usable_fraction]
2004
- hpxml.batteries[0].nominal_capacity_kwh = nil
2005
- hpxml.batteries[0].usable_capacity_kwh = nil
2006
- end
2007
-
2008
- # ---------------- #
2009
- # HPXML Appliances #
2010
- # ---------------- #
2247
+ hpxml_bldg.ventilation_fans[0].cfis_addtl_runtime_operating_mode = HPXML::CFISModeSupplementalFan
2248
+ hpxml_bldg.ventilation_fans[0].cfis_supplemental_fan_idref = hpxml_bldg.ventilation_fans[1].id
2249
+ end
2250
+
2251
+ # ---------------- #
2252
+ # HPXML Generation #
2253
+ # ---------------- #
2254
+
2255
+ # Logic that can only be applied based on the file name
2256
+ if ['base-misc-defaults.xml'].include? hpxml_file
2257
+ hpxml_bldg.pv_systems[0].year_modules_manufactured = 2015
2258
+ elsif ['base-misc-generators.xml',
2259
+ 'base-misc-generators-battery.xml',
2260
+ 'base-misc-generators-battery-scheduled.xml',
2261
+ 'base-pv-generators.xml',
2262
+ 'base-pv-generators-battery.xml',
2263
+ 'base-pv-generators-battery-scheduled.xml'].include? hpxml_file
2264
+ hpxml_bldg.generators.add(id: "Generator#{hpxml_bldg.generators.size + 1}",
2265
+ fuel_type: HPXML::FuelTypeNaturalGas,
2266
+ annual_consumption_kbtu: 8500,
2267
+ annual_output_kwh: 1200)
2268
+ hpxml_bldg.generators.add(id: "Generator#{hpxml_bldg.generators.size + 1}",
2269
+ fuel_type: HPXML::FuelTypeOil,
2270
+ annual_consumption_kbtu: 8500,
2271
+ annual_output_kwh: 1200)
2272
+ elsif ['base-bldgtype-mf-unit-shared-generator.xml'].include? hpxml_file
2273
+ hpxml_bldg.generators.add(id: "Generator#{hpxml_bldg.generators.size + 1}",
2274
+ is_shared_system: true,
2275
+ fuel_type: HPXML::FuelTypePropane,
2276
+ annual_consumption_kbtu: 85000,
2277
+ annual_output_kwh: 12000,
2278
+ number_of_bedrooms_served: 18)
2279
+ end
2280
+
2281
+ # ------------- #
2282
+ # HPXML Battery #
2283
+ # ------------- #
2284
+
2285
+ if ['base-pv-battery-lifetime-model.xml'].include? hpxml_file
2286
+ hpxml_bldg.batteries[0].lifetime_model = HPXML::BatteryLifetimeModelKandlerSmith
2287
+ elsif ['base-pv-battery-ah.xml'].include? hpxml_file
2288
+ default_values = Battery.get_battery_default_values()
2289
+ hpxml_bldg.batteries[0].nominal_capacity_ah = Battery.get_Ah_from_kWh(hpxml_bldg.batteries[0].nominal_capacity_kwh,
2290
+ default_values[:nominal_voltage])
2291
+ hpxml_bldg.batteries[0].usable_capacity_ah = hpxml_bldg.batteries[0].nominal_capacity_ah * default_values[:usable_fraction]
2292
+ hpxml_bldg.batteries[0].nominal_capacity_kwh = nil
2293
+ hpxml_bldg.batteries[0].usable_capacity_kwh = nil
2294
+ end
2295
+
2296
+ # ---------------- #
2297
+ # HPXML Appliances #
2298
+ # ---------------- #
2299
+
2300
+ # Logic that can only be applied based on the file name
2301
+ if ['base-schedules-simple.xml',
2302
+ 'base-schedules-simple-vacancy.xml',
2303
+ 'base-schedules-simple-power-outage.xml',
2304
+ 'base-misc-loads-large-uncommon.xml',
2305
+ 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
2306
+ hpxml_bldg.clothes_washers[0].weekday_fractions = '0.009, 0.007, 0.004, 0.004, 0.007, 0.011, 0.022, 0.049, 0.073, 0.086, 0.084, 0.075, 0.067, 0.060, 0.049, 0.052, 0.050, 0.049, 0.049, 0.049, 0.049, 0.047, 0.032, 0.017'
2307
+ hpxml_bldg.clothes_washers[0].weekend_fractions = '0.009, 0.007, 0.004, 0.004, 0.007, 0.011, 0.022, 0.049, 0.073, 0.086, 0.084, 0.075, 0.067, 0.060, 0.049, 0.052, 0.050, 0.049, 0.049, 0.049, 0.049, 0.047, 0.032, 0.017'
2308
+ hpxml_bldg.clothes_washers[0].monthly_multipliers = '1.011, 1.002, 1.022, 1.020, 1.022, 0.996, 0.999, 0.999, 0.996, 0.964, 0.959, 1.011'
2309
+ hpxml_bldg.clothes_dryers[0].weekday_fractions = '0.010, 0.006, 0.004, 0.002, 0.004, 0.006, 0.016, 0.032, 0.048, 0.068, 0.078, 0.081, 0.074, 0.067, 0.057, 0.061, 0.055, 0.054, 0.051, 0.051, 0.052, 0.054, 0.044, 0.024'
2310
+ hpxml_bldg.clothes_dryers[0].weekend_fractions = '0.010, 0.006, 0.004, 0.002, 0.004, 0.006, 0.016, 0.032, 0.048, 0.068, 0.078, 0.081, 0.074, 0.067, 0.057, 0.061, 0.055, 0.054, 0.051, 0.051, 0.052, 0.054, 0.044, 0.024'
2311
+ hpxml_bldg.clothes_dryers[0].monthly_multipliers = '1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0'
2312
+ hpxml_bldg.dishwashers[0].weekday_fractions = '0.015, 0.007, 0.005, 0.003, 0.003, 0.010, 0.020, 0.031, 0.058, 0.065, 0.056, 0.048, 0.041, 0.046, 0.036, 0.038, 0.038, 0.049, 0.087, 0.111, 0.090, 0.067, 0.044, 0.031'
2313
+ hpxml_bldg.dishwashers[0].weekend_fractions = '0.015, 0.007, 0.005, 0.003, 0.003, 0.010, 0.020, 0.031, 0.058, 0.065, 0.056, 0.048, 0.041, 0.046, 0.036, 0.038, 0.038, 0.049, 0.087, 0.111, 0.090, 0.067, 0.044, 0.031'
2314
+ hpxml_bldg.dishwashers[0].monthly_multipliers = '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097'
2315
+ hpxml_bldg.refrigerators[0].weekday_fractions = '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041'
2316
+ hpxml_bldg.refrigerators[0].weekend_fractions = '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041'
2317
+ hpxml_bldg.refrigerators[0].monthly_multipliers = '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837'
2318
+ hpxml_bldg.cooking_ranges[0].weekday_fractions = '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011'
2319
+ hpxml_bldg.cooking_ranges[0].weekend_fractions = '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011'
2320
+ hpxml_bldg.cooking_ranges[0].monthly_multipliers = '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097'
2321
+ end
2322
+ if ['base-misc-loads-large-uncommon.xml',
2323
+ 'base-misc-loads-large-uncommon2.xml',
2324
+ 'base-misc-usage-multiplier.xml'].include? hpxml_file
2325
+ if hpxml_file != 'base-misc-usage-multiplier.xml'
2326
+ hpxml_bldg.refrigerators.add(id: "Refrigerator#{hpxml_bldg.refrigerators.size + 1}",
2327
+ rated_annual_kwh: 800,
2328
+ primary_indicator: false)
2329
+ end
2330
+ hpxml_bldg.freezers.add(id: "Freezer#{hpxml_bldg.freezers.size + 1}",
2331
+ location: HPXML::LocationConditionedSpace,
2332
+ rated_annual_kwh: 400)
2333
+ if hpxml_file == 'base-misc-usage-multiplier.xml'
2334
+ hpxml_bldg.freezers[-1].usage_multiplier = 0.9
2335
+ end
2336
+ (hpxml_bldg.refrigerators + hpxml_bldg.freezers).each do |appliance|
2337
+ next if appliance.is_a?(HPXML::Refrigerator) && hpxml_file == 'base-misc-usage-multiplier.xml'
2011
2338
 
2012
- # Logic that can only be applied based on the file name
2013
- if ['base-schedules-simple.xml',
2014
- 'base-schedules-simple-vacancy.xml',
2015
- 'base-schedules-simple-vacancy-year-round.xml',
2016
- 'base-schedules-simple-power-outage.xml',
2017
- 'base-misc-loads-large-uncommon.xml',
2018
- 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
2019
- hpxml.clothes_washers[0].weekday_fractions = '0.009, 0.007, 0.004, 0.004, 0.007, 0.011, 0.022, 0.049, 0.073, 0.086, 0.084, 0.075, 0.067, 0.060, 0.049, 0.052, 0.050, 0.049, 0.049, 0.049, 0.049, 0.047, 0.032, 0.017'
2020
- hpxml.clothes_washers[0].weekend_fractions = '0.009, 0.007, 0.004, 0.004, 0.007, 0.011, 0.022, 0.049, 0.073, 0.086, 0.084, 0.075, 0.067, 0.060, 0.049, 0.052, 0.050, 0.049, 0.049, 0.049, 0.049, 0.047, 0.032, 0.017'
2021
- hpxml.clothes_washers[0].monthly_multipliers = '1.011, 1.002, 1.022, 1.020, 1.022, 0.996, 0.999, 0.999, 0.996, 0.964, 0.959, 1.011'
2022
- hpxml.clothes_dryers[0].weekday_fractions = '0.010, 0.006, 0.004, 0.002, 0.004, 0.006, 0.016, 0.032, 0.048, 0.068, 0.078, 0.081, 0.074, 0.067, 0.057, 0.061, 0.055, 0.054, 0.051, 0.051, 0.052, 0.054, 0.044, 0.024'
2023
- hpxml.clothes_dryers[0].weekend_fractions = '0.010, 0.006, 0.004, 0.002, 0.004, 0.006, 0.016, 0.032, 0.048, 0.068, 0.078, 0.081, 0.074, 0.067, 0.057, 0.061, 0.055, 0.054, 0.051, 0.051, 0.052, 0.054, 0.044, 0.024'
2024
- hpxml.clothes_dryers[0].monthly_multipliers = '1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0'
2025
- hpxml.dishwashers[0].weekday_fractions = '0.015, 0.007, 0.005, 0.003, 0.003, 0.010, 0.020, 0.031, 0.058, 0.065, 0.056, 0.048, 0.041, 0.046, 0.036, 0.038, 0.038, 0.049, 0.087, 0.111, 0.090, 0.067, 0.044, 0.031'
2026
- hpxml.dishwashers[0].weekend_fractions = '0.015, 0.007, 0.005, 0.003, 0.003, 0.010, 0.020, 0.031, 0.058, 0.065, 0.056, 0.048, 0.041, 0.046, 0.036, 0.038, 0.038, 0.049, 0.087, 0.111, 0.090, 0.067, 0.044, 0.031'
2027
- hpxml.dishwashers[0].monthly_multipliers = '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097'
2028
- hpxml.refrigerators[0].weekday_fractions = '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041'
2029
- hpxml.refrigerators[0].weekend_fractions = '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041'
2030
- hpxml.refrigerators[0].monthly_multipliers = '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837'
2031
- hpxml.cooking_ranges[0].weekday_fractions = '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011'
2032
- hpxml.cooking_ranges[0].weekend_fractions = '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011'
2033
- hpxml.cooking_ranges[0].monthly_multipliers = '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097'
2034
- end
2035
- if ['base-misc-loads-large-uncommon.xml',
2036
- 'base-misc-loads-large-uncommon2.xml',
2037
- 'base-misc-usage-multiplier.xml'].include? hpxml_file
2038
- if hpxml_file != 'base-misc-usage-multiplier.xml'
2039
- hpxml.refrigerators.add(id: "Refrigerator#{hpxml.refrigerators.size + 1}",
2040
- rated_annual_kwh: 800,
2041
- primary_indicator: false)
2042
- end
2043
- hpxml.freezers.add(id: "Freezer#{hpxml.freezers.size + 1}",
2044
- location: HPXML::LocationLivingSpace,
2045
- rated_annual_kwh: 400)
2046
- if hpxml_file == 'base-misc-usage-multiplier.xml'
2047
- hpxml.freezers[-1].usage_multiplier = 0.9
2048
- end
2049
- (hpxml.refrigerators + hpxml.freezers).each do |appliance|
2050
- next if appliance.is_a?(HPXML::Refrigerator) && hpxml_file == 'base-misc-usage-multiplier.xml'
2339
+ appliance.weekday_fractions = '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041'
2340
+ appliance.weekend_fractions = '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041'
2341
+ appliance.monthly_multipliers = '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837'
2342
+ end
2343
+ hpxml_bldg.pools[0].pump_weekday_fractions = '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003'
2344
+ hpxml_bldg.pools[0].pump_weekend_fractions = '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003'
2345
+ hpxml_bldg.pools[0].pump_monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2346
+ hpxml_bldg.pools[0].heater_weekday_fractions = '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003'
2347
+ hpxml_bldg.pools[0].heater_weekend_fractions = '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003'
2348
+ hpxml_bldg.pools[0].heater_monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2349
+ hpxml_bldg.permanent_spas[0].pump_weekday_fractions = '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024'
2350
+ hpxml_bldg.permanent_spas[0].pump_weekend_fractions = '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024'
2351
+ hpxml_bldg.permanent_spas[0].pump_monthly_multipliers = '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837'
2352
+ hpxml_bldg.permanent_spas[0].heater_weekday_fractions = '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024'
2353
+ hpxml_bldg.permanent_spas[0].heater_weekend_fractions = '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024'
2354
+ hpxml_bldg.permanent_spas[0].heater_monthly_multipliers = '0.921, 0.928, 0.921, 0.915, 0.921, 1.160, 1.158, 1.158, 1.160, 0.921, 0.915, 0.921'
2355
+ end
2356
+ if ['base-bldgtype-mf-unit-shared-laundry-room.xml',
2357
+ 'base-bldgtype-mf-unit-shared-laundry-room-multiple-water-heaters.xml'].include? hpxml_file
2358
+ hpxml_bldg.clothes_washers[0].is_shared_appliance = true
2359
+ hpxml_bldg.clothes_washers[0].location = HPXML::LocationOtherHeatedSpace
2360
+ hpxml_bldg.clothes_dryers[0].location = HPXML::LocationOtherHeatedSpace
2361
+ hpxml_bldg.clothes_dryers[0].is_shared_appliance = true
2362
+ hpxml_bldg.dishwashers[0].is_shared_appliance = true
2363
+ hpxml_bldg.dishwashers[0].location = HPXML::LocationOtherHeatedSpace
2364
+ if hpxml_file == 'base-bldgtype-mf-unit-shared-laundry-room.xml'
2365
+ hpxml_bldg.clothes_washers[0].water_heating_system_idref = hpxml_bldg.water_heating_systems[0].id
2366
+ hpxml_bldg.dishwashers[0].water_heating_system_idref = hpxml_bldg.water_heating_systems[0].id
2367
+ elsif hpxml_file == 'base-bldgtype-mf-unit-shared-laundry-room-multiple-water-heaters.xml'
2368
+ hpxml_bldg.clothes_washers[0].hot_water_distribution_idref = hpxml_bldg.hot_water_distributions[0].id
2369
+ hpxml_bldg.dishwashers[0].hot_water_distribution_idref = hpxml_bldg.hot_water_distributions[0].id
2370
+ end
2371
+ elsif ['base-misc-defaults.xml'].include? hpxml_file
2372
+ hpxml_bldg.refrigerators[0].primary_indicator = nil
2373
+ end
2374
+
2375
+ # -------------- #
2376
+ # HPXML Lighting #
2377
+ # -------------- #
2378
+
2379
+ # Logic that can only be applied based on the file name
2380
+ if ['base-lighting-ceiling-fans.xml'].include? hpxml_file
2381
+ hpxml_bldg.ceiling_fans[0].weekday_fractions = '0.057, 0.057, 0.057, 0.057, 0.057, 0.057, 0.057, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.057, 0.057, 0.057, 0.057, 0.057, 0.057'
2382
+ hpxml_bldg.ceiling_fans[0].weekend_fractions = '0.057, 0.057, 0.057, 0.057, 0.057, 0.057, 0.057, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.057, 0.057, 0.057, 0.057, 0.057, 0.057'
2383
+ hpxml_bldg.ceiling_fans[0].monthly_multipliers = '0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0'
2384
+ elsif ['base-lighting-holiday.xml'].include? hpxml_file
2385
+ hpxml_bldg.lighting.holiday_weekday_fractions = '0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.008, 0.098, 0.168, 0.194, 0.284, 0.192, 0.037, 0.019'
2386
+ hpxml_bldg.lighting.holiday_weekend_fractions = '0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.008, 0.098, 0.168, 0.194, 0.284, 0.192, 0.037, 0.019'
2387
+ elsif ['base-schedules-simple.xml',
2388
+ 'base-schedules-simple-vacancy.xml',
2389
+ 'base-schedules-simple-power-outage.xml',
2390
+ 'base-misc-loads-large-uncommon.xml',
2391
+ 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
2392
+ hpxml_bldg.lighting.interior_weekday_fractions = '0.124, 0.074, 0.050, 0.050, 0.053, 0.140, 0.330, 0.420, 0.430, 0.424, 0.411, 0.394, 0.382, 0.378, 0.378, 0.379, 0.386, 0.412, 0.484, 0.619, 0.783, 0.880, 0.597, 0.249'
2393
+ hpxml_bldg.lighting.interior_weekend_fractions = '0.124, 0.074, 0.050, 0.050, 0.053, 0.140, 0.330, 0.420, 0.430, 0.424, 0.411, 0.394, 0.382, 0.378, 0.378, 0.379, 0.386, 0.412, 0.484, 0.619, 0.783, 0.880, 0.597, 0.249'
2394
+ hpxml_bldg.lighting.interior_monthly_multipliers = '1.075, 1.064951905, 1.0375, 1.0, 0.9625, 0.935048095, 0.925, 0.935048095, 0.9625, 1.0, 1.0375, 1.064951905'
2395
+ hpxml_bldg.lighting.exterior_weekday_fractions = '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063'
2396
+ hpxml_bldg.lighting.exterior_weekend_fractions = '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059'
2397
+ hpxml_bldg.lighting.exterior_monthly_multipliers = '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248'
2398
+ hpxml_bldg.lighting.garage_weekday_fractions = '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063'
2399
+ hpxml_bldg.lighting.garage_weekend_fractions = '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059'
2400
+ hpxml_bldg.lighting.garage_monthly_multipliers = '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248'
2401
+ elsif ['base-lighting-kwh-per-year.xml'].include? hpxml_file
2402
+ ltg_kwhs_per_year = { HPXML::LocationInterior => 1500,
2403
+ HPXML::LocationExterior => 150,
2404
+ HPXML::LocationGarage => 0 }
2405
+ hpxml_bldg.lighting_groups.clear
2406
+ ltg_kwhs_per_year.each do |location, kwh_per_year|
2407
+ hpxml_bldg.lighting_groups.add(id: "LightingGroup#{hpxml_bldg.lighting_groups.size + 1}",
2408
+ location: location,
2409
+ kwh_per_year: kwh_per_year)
2410
+ end
2411
+ elsif ['base-lighting-mixed.xml'].include? hpxml_file
2412
+ hpxml_bldg.lighting_groups.reverse_each do |lg|
2413
+ next unless lg.location == HPXML::LocationExterior
2051
2414
 
2052
- appliance.weekday_fractions = '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041'
2053
- appliance.weekend_fractions = '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041'
2054
- appliance.monthly_multipliers = '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837'
2055
- end
2056
- hpxml.pools[0].pump_weekday_fractions = '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003'
2057
- hpxml.pools[0].pump_weekend_fractions = '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003'
2058
- hpxml.pools[0].pump_monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2059
- hpxml.pools[0].heater_weekday_fractions = '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003'
2060
- hpxml.pools[0].heater_weekend_fractions = '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003'
2061
- hpxml.pools[0].heater_monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2062
- hpxml.hot_tubs[0].pump_weekday_fractions = '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024'
2063
- hpxml.hot_tubs[0].pump_weekend_fractions = '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024'
2064
- hpxml.hot_tubs[0].pump_monthly_multipliers = '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837'
2065
- hpxml.hot_tubs[0].heater_weekday_fractions = '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024'
2066
- hpxml.hot_tubs[0].heater_weekend_fractions = '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024'
2067
- hpxml.hot_tubs[0].heater_monthly_multipliers = '0.921, 0.928, 0.921, 0.915, 0.921, 1.160, 1.158, 1.158, 1.160, 0.921, 0.915, 0.921'
2068
- end
2069
- if ['base-bldgtype-multifamily-shared-laundry-room.xml',
2070
- 'base-bldgtype-multifamily-shared-laundry-room-multiple-water-heaters.xml'].include? hpxml_file
2071
- hpxml.clothes_washers[0].is_shared_appliance = true
2072
- hpxml.clothes_washers[0].location = HPXML::LocationOtherHeatedSpace
2073
- hpxml.clothes_dryers[0].location = HPXML::LocationOtherHeatedSpace
2074
- hpxml.clothes_dryers[0].is_shared_appliance = true
2075
- hpxml.dishwashers[0].is_shared_appliance = true
2076
- hpxml.dishwashers[0].location = HPXML::LocationOtherHeatedSpace
2077
- if hpxml_file == 'base-bldgtype-multifamily-shared-laundry-room.xml'
2078
- hpxml.clothes_washers[0].water_heating_system_idref = hpxml.water_heating_systems[0].id
2079
- hpxml.dishwashers[0].water_heating_system_idref = hpxml.water_heating_systems[0].id
2080
- elsif hpxml_file == 'base-bldgtype-multifamily-shared-laundry-room-multiple-water-heaters.xml'
2081
- hpxml.clothes_washers[0].hot_water_distribution_idref = hpxml.hot_water_distributions[0].id
2082
- hpxml.dishwashers[0].hot_water_distribution_idref = hpxml.hot_water_distributions[0].id
2415
+ lg.delete
2416
+ end
2417
+ hpxml_bldg.lighting_groups.each_with_index do |lg, i|
2418
+ lg.id = "LightingGroup#{i + 1}"
2419
+ end
2420
+ hpxml_bldg.lighting_groups.add(id: "LightingGroup#{hpxml_bldg.lighting_groups.size + 1}",
2421
+ location: HPXML::LocationExterior,
2422
+ kwh_per_year: 150)
2423
+ elsif ['base-foundation-basement-garage.xml'].include? hpxml_file
2424
+ int_lighting_groups = hpxml_bldg.lighting_groups.select { |lg| lg.location == HPXML::LocationInterior }
2425
+ int_lighting_groups.each do |lg|
2426
+ hpxml_bldg.lighting_groups << lg.dup
2427
+ hpxml_bldg.lighting_groups[-1].location = HPXML::LocationGarage
2428
+ hpxml_bldg.lighting_groups[-1].id = "LightingGroup#{hpxml_bldg.lighting_groups.size}"
2429
+ end
2083
2430
  end
2084
- elsif ['base-misc-defaults.xml'].include? hpxml_file
2085
- hpxml.refrigerators[0].primary_indicator = nil
2086
- end
2087
2431
 
2088
- # -------------- #
2089
- # HPXML Lighting #
2090
- # -------------- #
2432
+ # --------------- #
2433
+ # HPXML MiscLoads #
2434
+ # --------------- #
2091
2435
 
2092
- # Logic that can only be applied based on the file name
2093
- if ['base-lighting-ceiling-fans.xml'].include? hpxml_file
2094
- hpxml.ceiling_fans[0].weekday_fractions = '0.057, 0.057, 0.057, 0.057, 0.057, 0.057, 0.057, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.057, 0.057, 0.057, 0.057, 0.057, 0.057'
2095
- hpxml.ceiling_fans[0].weekend_fractions = '0.057, 0.057, 0.057, 0.057, 0.057, 0.057, 0.057, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.024, 0.057, 0.057, 0.057, 0.057, 0.057, 0.057'
2096
- hpxml.ceiling_fans[0].monthly_multipliers = '0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0'
2097
- elsif ['base-lighting-holiday.xml'].include? hpxml_file
2098
- hpxml.lighting.holiday_weekday_fractions = '0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.008, 0.098, 0.168, 0.194, 0.284, 0.192, 0.037, 0.019'
2099
- hpxml.lighting.holiday_weekend_fractions = '0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.008, 0.098, 0.168, 0.194, 0.284, 0.192, 0.037, 0.019'
2100
- elsif ['base-schedules-simple.xml',
2101
- 'base-schedules-simple-vacancy.xml',
2102
- 'base-schedules-simple-vacancy-year-round.xml',
2103
- 'base-schedules-simple-power-outage.xml',
2104
- 'base-misc-loads-large-uncommon.xml',
2105
- 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
2106
- hpxml.lighting.interior_weekday_fractions = '0.124, 0.074, 0.050, 0.050, 0.053, 0.140, 0.330, 0.420, 0.430, 0.424, 0.411, 0.394, 0.382, 0.378, 0.378, 0.379, 0.386, 0.412, 0.484, 0.619, 0.783, 0.880, 0.597, 0.249'
2107
- hpxml.lighting.interior_weekend_fractions = '0.124, 0.074, 0.050, 0.050, 0.053, 0.140, 0.330, 0.420, 0.430, 0.424, 0.411, 0.394, 0.382, 0.378, 0.378, 0.379, 0.386, 0.412, 0.484, 0.619, 0.783, 0.880, 0.597, 0.249'
2108
- hpxml.lighting.interior_monthly_multipliers = '1.075, 1.064951905, 1.0375, 1.0, 0.9625, 0.935048095, 0.925, 0.935048095, 0.9625, 1.0, 1.0375, 1.064951905'
2109
- hpxml.lighting.exterior_weekday_fractions = '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063'
2110
- hpxml.lighting.exterior_weekend_fractions = '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059'
2111
- hpxml.lighting.exterior_monthly_multipliers = '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248'
2112
- hpxml.lighting.garage_weekday_fractions = '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063'
2113
- hpxml.lighting.garage_weekend_fractions = '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059'
2114
- hpxml.lighting.garage_monthly_multipliers = '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248'
2115
- elsif ['base-lighting-kwh-per-year.xml'].include? hpxml_file
2116
- ltg_kwhs_per_year = { HPXML::LocationInterior => 1500,
2117
- HPXML::LocationExterior => 150,
2118
- HPXML::LocationGarage => 0 }
2119
- hpxml.lighting_groups.clear
2120
- ltg_kwhs_per_year.each do |location, kwh_per_year|
2121
- hpxml.lighting_groups.add(id: "LightingGroup#{hpxml.lighting_groups.size + 1}",
2122
- location: location,
2123
- kwh_per_year: kwh_per_year)
2436
+ # Logic that can only be applied based on the file name
2437
+ if ['base-schedules-simple.xml',
2438
+ 'base-schedules-simple-vacancy.xml',
2439
+ 'base-schedules-simple-power-outage.xml',
2440
+ 'base-misc-loads-large-uncommon.xml',
2441
+ 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
2442
+ hpxml_bldg.plug_loads[0].weekday_fractions = '0.045, 0.019, 0.01, 0.001, 0.001, 0.001, 0.005, 0.009, 0.018, 0.026, 0.032, 0.038, 0.04, 0.041, 0.043, 0.045, 0.05, 0.055, 0.07, 0.085, 0.097, 0.108, 0.089, 0.07'
2443
+ hpxml_bldg.plug_loads[0].weekend_fractions = '0.045, 0.019, 0.01, 0.001, 0.001, 0.001, 0.005, 0.009, 0.018, 0.026, 0.032, 0.038, 0.04, 0.041, 0.043, 0.045, 0.05, 0.055, 0.07, 0.085, 0.097, 0.108, 0.089, 0.07'
2444
+ hpxml_bldg.plug_loads[0].monthly_multipliers = '1.137, 1.129, 0.961, 0.969, 0.961, 0.993, 0.996, 0.96, 0.993, 0.867, 0.86, 1.137'
2445
+ hpxml_bldg.plug_loads[1].weekday_fractions = '0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036'
2446
+ hpxml_bldg.plug_loads[1].weekend_fractions = '0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036'
2447
+ hpxml_bldg.plug_loads[1].monthly_multipliers = '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248'
2124
2448
  end
2125
- elsif ['base-lighting-mixed.xml'].include? hpxml_file
2126
- hpxml.lighting_groups.reverse_each do |lg|
2127
- next unless lg.location == HPXML::LocationExterior
2449
+ next unless ['base-misc-loads-large-uncommon.xml',
2450
+ 'base-misc-loads-large-uncommon2.xml',
2451
+ 'base-misc-usage-multiplier.xml'].include? hpxml_file
2128
2452
 
2129
- lg.delete
2130
- end
2131
- hpxml.lighting_groups.each_with_index do |lg, i|
2132
- lg.id = "LightingGroup#{i + 1}"
2133
- end
2134
- hpxml.lighting_groups.add(id: "LightingGroup#{hpxml.lighting_groups.size + 1}",
2135
- location: HPXML::LocationExterior,
2136
- kwh_per_year: 150)
2137
- elsif ['base-foundation-basement-garage.xml'].include? hpxml_file
2138
- int_lighting_groups = hpxml.lighting_groups.select { |lg| lg.location == HPXML::LocationInterior }
2139
- int_lighting_groups.each do |lg|
2140
- hpxml.lighting_groups << lg.dup
2141
- hpxml.lighting_groups[-1].location = HPXML::LocationGarage
2142
- hpxml.lighting_groups[-1].id = "LightingGroup#{hpxml.lighting_groups.size}"
2143
- end
2144
- end
2145
-
2146
- # --------------- #
2147
- # HPXML MiscLoads #
2148
- # --------------- #
2149
-
2150
- # Logic that can only be applied based on the file name
2151
- if ['base-schedules-simple.xml',
2152
- 'base-schedules-simple-vacancy.xml',
2153
- 'base-schedules-simple-vacancy-year-round.xml',
2154
- 'base-schedules-simple-power-outage.xml',
2155
- 'base-misc-loads-large-uncommon.xml',
2156
- 'base-misc-loads-large-uncommon2.xml'].include? hpxml_file
2157
- hpxml.plug_loads[0].weekday_fractions = '0.045, 0.019, 0.01, 0.001, 0.001, 0.001, 0.005, 0.009, 0.018, 0.026, 0.032, 0.038, 0.04, 0.041, 0.043, 0.045, 0.05, 0.055, 0.07, 0.085, 0.097, 0.108, 0.089, 0.07'
2158
- hpxml.plug_loads[0].weekend_fractions = '0.045, 0.019, 0.01, 0.001, 0.001, 0.001, 0.005, 0.009, 0.018, 0.026, 0.032, 0.038, 0.04, 0.041, 0.043, 0.045, 0.05, 0.055, 0.07, 0.085, 0.097, 0.108, 0.089, 0.07'
2159
- hpxml.plug_loads[0].monthly_multipliers = '1.137, 1.129, 0.961, 0.969, 0.961, 0.993, 0.996, 0.96, 0.993, 0.867, 0.86, 1.137'
2160
- hpxml.plug_loads[1].weekday_fractions = '0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036'
2161
- hpxml.plug_loads[1].weekend_fractions = '0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036'
2162
- hpxml.plug_loads[1].monthly_multipliers = '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248'
2163
- end
2164
- if ['base-misc-loads-large-uncommon.xml',
2165
- 'base-misc-loads-large-uncommon2.xml',
2166
- 'base-misc-usage-multiplier.xml'].include? hpxml_file
2167
2453
  if hpxml_file != 'base-misc-usage-multiplier.xml'
2168
- hpxml.plug_loads[2].weekday_fractions = '0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042'
2169
- hpxml.plug_loads[2].weekend_fractions = '0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042'
2170
- hpxml.plug_loads[2].monthly_multipliers = '1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1'
2171
- hpxml.plug_loads[3].weekday_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2172
- hpxml.plug_loads[3].weekend_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2173
- hpxml.plug_loads[3].monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2174
- end
2175
- hpxml.fuel_loads[0].weekday_fractions = '0.004, 0.001, 0.001, 0.002, 0.007, 0.012, 0.029, 0.046, 0.044, 0.041, 0.044, 0.046, 0.042, 0.038, 0.049, 0.059, 0.110, 0.161, 0.115, 0.070, 0.044, 0.019, 0.013, 0.007'
2176
- hpxml.fuel_loads[0].weekend_fractions = '0.004, 0.001, 0.001, 0.002, 0.007, 0.012, 0.029, 0.046, 0.044, 0.041, 0.044, 0.046, 0.042, 0.038, 0.049, 0.059, 0.110, 0.161, 0.115, 0.070, 0.044, 0.019, 0.013, 0.007'
2177
- hpxml.fuel_loads[0].monthly_multipliers = '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097'
2178
- hpxml.fuel_loads[1].weekday_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2179
- hpxml.fuel_loads[1].weekend_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2180
- hpxml.fuel_loads[1].monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2181
- hpxml.fuel_loads[2].weekday_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2182
- hpxml.fuel_loads[2].weekend_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2183
- hpxml.fuel_loads[2].monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2454
+ hpxml_bldg.plug_loads[2].weekday_fractions = '0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042'
2455
+ hpxml_bldg.plug_loads[2].weekend_fractions = '0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042'
2456
+ hpxml_bldg.plug_loads[2].monthly_multipliers = '1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1'
2457
+ hpxml_bldg.plug_loads[3].weekday_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2458
+ hpxml_bldg.plug_loads[3].weekend_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2459
+ hpxml_bldg.plug_loads[3].monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2460
+ end
2461
+ hpxml_bldg.fuel_loads[0].weekday_fractions = '0.004, 0.001, 0.001, 0.002, 0.007, 0.012, 0.029, 0.046, 0.044, 0.041, 0.044, 0.046, 0.042, 0.038, 0.049, 0.059, 0.110, 0.161, 0.115, 0.070, 0.044, 0.019, 0.013, 0.007'
2462
+ hpxml_bldg.fuel_loads[0].weekend_fractions = '0.004, 0.001, 0.001, 0.002, 0.007, 0.012, 0.029, 0.046, 0.044, 0.041, 0.044, 0.046, 0.042, 0.038, 0.049, 0.059, 0.110, 0.161, 0.115, 0.070, 0.044, 0.019, 0.013, 0.007'
2463
+ hpxml_bldg.fuel_loads[0].monthly_multipliers = '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097'
2464
+ hpxml_bldg.fuel_loads[1].weekday_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2465
+ hpxml_bldg.fuel_loads[1].weekend_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2466
+ hpxml_bldg.fuel_loads[1].monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2467
+ hpxml_bldg.fuel_loads[2].weekday_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2468
+ hpxml_bldg.fuel_loads[2].weekend_fractions = '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065'
2469
+ hpxml_bldg.fuel_loads[2].monthly_multipliers = '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154'
2184
2470
  end
2185
2471
  end
2186
2472
 
@@ -2273,47 +2559,11 @@ if ARGV[0].to_sym == :update_measures
2273
2559
 
2274
2560
  # Update measures XMLs
2275
2561
  puts 'Updating measure.xmls...'
2276
- require 'oga'
2277
2562
  Dir['**/measure.xml'].each do |measure_xml|
2278
- for n_attempt in 1..5 # For some reason CLI randomly generates errors, so try multiple times
2279
- measure_dir = File.dirname(measure_xml)
2280
- command = "#{OpenStudio.getOpenStudioCLI} measure -u '#{measure_dir}'"
2281
- system(command, [:out, :err] => File::NULL)
2282
-
2283
- # Check for error
2284
- xml_doc = XMLHelper.parse_file(measure_xml)
2285
- err_val = XMLHelper.get_value(xml_doc, '/measure/error', :string)
2286
- if err_val.nil?
2287
- err_val = XMLHelper.get_value(xml_doc, '/error', :string)
2288
- end
2289
- if err_val.nil?
2290
- break # Successfully updated
2291
- else
2292
- if n_attempt == 5
2293
- fail "#{measure_xml}: #{err_val}" # Error generated all 5 times, fail
2294
- else
2295
- # Remove error from measure XML, try again
2296
- orig_lines = File.readlines(measure_xml)
2297
- new_lines = []
2298
- inside_error = false
2299
- orig_lines.each do |l|
2300
- if l.include? '<error>'
2301
- inside_error = true
2302
- end
2303
- if l.include? '</error>'
2304
- inside_error = false
2305
- next
2306
- end
2307
- next if inside_error
2308
-
2309
- new_lines << l
2310
- end
2311
- File.open(measure_xml, 'w') do |file|
2312
- file.puts new_lines
2313
- end
2314
- end
2315
- end
2316
- end
2563
+ measure_dir = File.dirname(measure_xml)
2564
+ # Using classic to work around https://github.com/NREL/OpenStudio/issues/5045
2565
+ command = "#{OpenStudio.getOpenStudioCLI} classic measure -u '#{measure_dir}'"
2566
+ system(command, [:out, :err] => File::NULL)
2317
2567
  end
2318
2568
 
2319
2569
  puts 'Done.'
@@ -2352,21 +2602,21 @@ if ARGV[0].to_sym == :create_release_zips
2352
2602
 
2353
2603
  files = ['Changelog.md',
2354
2604
  'LICENSE.md',
2355
- 'BuildResidentialHPXML/measure.*',
2605
+ 'BuildResidentialHPXML/*.*',
2356
2606
  'BuildResidentialHPXML/resources/**/*.*',
2357
- 'BuildResidentialScheduleFile/measure.*',
2607
+ 'BuildResidentialScheduleFile/*.*',
2358
2608
  'BuildResidentialScheduleFile/resources/**/*.*',
2359
- 'HPXMLtoOpenStudio/measure.*',
2609
+ 'HPXMLtoOpenStudio/*.*',
2360
2610
  'HPXMLtoOpenStudio/resources/**/*.*',
2361
- 'ReportSimulationOutput/measure.*',
2611
+ 'ReportSimulationOutput/*.*',
2362
2612
  'ReportSimulationOutput/resources/**/*.*',
2363
- 'ReportUtilityBills/measure.*',
2613
+ 'ReportUtilityBills/*.*',
2364
2614
  'ReportUtilityBills/resources/**/*.*',
2365
2615
  'weather/*.*',
2366
2616
  'workflow/*.*',
2367
2617
  'workflow/real_homes/*.xml',
2368
2618
  'workflow/sample_files/*.xml',
2369
- 'workflow/tests/*test*.rb',
2619
+ 'workflow/tests/*.rb',
2370
2620
  'workflow/tests/**/*.xml',
2371
2621
  'workflow/tests/**/*.csv',
2372
2622
  'documentation/index.html',