urbanopt-cli 0.10.0 → 0.11.0

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 +39 -29
  4. data/.gitignore +1 -0
  5. data/CHANGELOG.md +17 -0
  6. data/CMakeLists.txt +7 -7
  7. data/FindOpenStudioSDK.cmake +8 -8
  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 +110 -17
  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
@@ -1,3 +1,8 @@
1
+ # *********************************************************************************
2
+ # URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
3
+ # See also https://github.com/urbanopt/urbanopt-cli/blob/develop/LICENSE.md
4
+ # *********************************************************************************
5
+
1
6
  # frozen_string_literal: true
2
7
 
3
8
  class HPXMLDefaults
@@ -6,69 +11,70 @@ class HPXMLDefaults
6
11
  # being written to the HPXML file. This will allow the custom information to
7
12
  # be used by subsequent calculations/logic.
8
13
 
9
- def self.apply(runner, hpxml, eri_version, weather, epw_file: nil, schedules_file: nil, convert_shared_systems: true)
10
- cfa = hpxml.building_construction.conditioned_floor_area
11
- nbeds = hpxml.building_construction.number_of_bedrooms
12
- ncfl = hpxml.building_construction.number_of_conditioned_floors
13
- ncfl_ag = hpxml.building_construction.number_of_conditioned_floors_above_grade
14
- has_uncond_bsmnt = hpxml.has_location(HPXML::LocationBasementUnconditioned)
15
- infil_measurement = Airflow.get_infiltration_measurement_of_interest(hpxml.air_infiltration_measurements)
14
+ def self.apply(runner, hpxml, hpxml_bldg, eri_version, weather, epw_file: nil, schedules_file: nil, convert_shared_systems: true)
15
+ cfa = hpxml_bldg.building_construction.conditioned_floor_area
16
+ nbeds = hpxml_bldg.building_construction.number_of_bedrooms
17
+ ncfl = hpxml_bldg.building_construction.number_of_conditioned_floors
18
+ ncfl_ag = hpxml_bldg.building_construction.number_of_conditioned_floors_above_grade
19
+ has_uncond_bsmnt = hpxml_bldg.has_location(HPXML::LocationBasementUnconditioned)
20
+ infil_measurement = Airflow.get_infiltration_measurement_of_interest(hpxml_bldg.air_infiltration_measurements)
16
21
 
17
22
  # Check for presence of fuels once
18
- has_fuel = {}
19
- hpxml_doc = hpxml.to_oga
20
- Constants.FossilFuels.each do |fuel|
21
- has_fuel[fuel] = hpxml.has_fuel(fuel, hpxml_doc)
22
- end
23
-
24
- apply_header(hpxml, epw_file, weather)
25
- apply_header_sizing(hpxml, weather, nbeds)
26
- apply_emissions_scenarios(hpxml, has_fuel)
27
- apply_utility_bill_scenarios(runner, hpxml, has_fuel)
28
- apply_site(hpxml)
29
- apply_neighbor_buildings(hpxml)
30
- apply_building_occupancy(hpxml, schedules_file)
31
- apply_building_construction(hpxml, cfa, nbeds, infil_measurement)
32
- apply_climate_and_risk_zones(hpxml, epw_file)
33
- apply_infiltration(hpxml, infil_measurement)
34
- apply_attics(hpxml)
35
- apply_foundations(hpxml)
36
- apply_roofs(hpxml)
37
- apply_rim_joists(hpxml)
38
- apply_walls(hpxml)
39
- apply_foundation_walls(hpxml)
40
- apply_floors(hpxml)
41
- apply_slabs(hpxml)
42
- apply_windows(hpxml)
43
- apply_skylights(hpxml)
44
- apply_doors(hpxml)
45
- apply_partition_wall_mass(hpxml)
46
- apply_furniture_mass(hpxml)
47
- apply_hvac(runner, hpxml, weather, convert_shared_systems)
48
- apply_hvac_control(hpxml, schedules_file)
49
- apply_hvac_distribution(hpxml, ncfl, ncfl_ag)
50
- apply_hvac_location(hpxml)
51
- apply_ventilation_fans(hpxml, weather, cfa, nbeds)
52
- apply_water_heaters(hpxml, nbeds, eri_version, schedules_file)
53
- apply_flue_or_chimney(hpxml)
54
- apply_hot_water_distribution(hpxml, cfa, ncfl, has_uncond_bsmnt)
55
- apply_water_fixtures(hpxml, schedules_file)
56
- apply_solar_thermal_systems(hpxml)
57
- apply_appliances(hpxml, nbeds, eri_version, schedules_file)
58
- apply_lighting(hpxml, schedules_file)
59
- apply_ceiling_fans(hpxml, nbeds, weather, schedules_file)
60
- apply_pools_and_hot_tubs(hpxml, cfa, schedules_file)
61
- apply_plug_loads(hpxml, cfa, schedules_file)
62
- apply_fuel_loads(hpxml, cfa, schedules_file)
63
- apply_pv_systems(hpxml)
64
- apply_generators(hpxml)
65
- apply_batteries(hpxml)
23
+ has_fuel = hpxml_bldg.has_fuels(Constants.FossilFuels, hpxml.to_doc)
24
+
25
+ apply_header(hpxml.header, epw_file)
26
+ apply_building(hpxml_bldg, epw_file)
27
+ apply_emissions_scenarios(hpxml.header, has_fuel)
28
+ apply_utility_bill_scenarios(runner, hpxml.header, hpxml_bldg, has_fuel)
29
+ apply_building_header(hpxml.header, hpxml_bldg, weather)
30
+ apply_building_header_sizing(hpxml_bldg, weather, nbeds)
31
+ apply_site(hpxml_bldg)
32
+ apply_neighbor_buildings(hpxml_bldg)
33
+ apply_building_occupancy(hpxml_bldg, schedules_file)
34
+ apply_building_construction(hpxml_bldg, cfa, nbeds, infil_measurement)
35
+ apply_climate_and_risk_zones(hpxml_bldg, epw_file)
36
+ apply_infiltration(hpxml_bldg, infil_measurement)
37
+ apply_attics(hpxml_bldg)
38
+ apply_foundations(hpxml_bldg)
39
+ apply_roofs(hpxml_bldg)
40
+ apply_rim_joists(hpxml_bldg)
41
+ apply_walls(hpxml_bldg)
42
+ apply_foundation_walls(hpxml_bldg)
43
+ apply_floors(hpxml_bldg)
44
+ apply_slabs(hpxml_bldg)
45
+ apply_windows(hpxml_bldg)
46
+ apply_skylights(hpxml_bldg)
47
+ apply_doors(hpxml_bldg)
48
+ apply_partition_wall_mass(hpxml_bldg)
49
+ apply_furniture_mass(hpxml_bldg)
50
+ apply_hvac(runner, hpxml_bldg, weather, convert_shared_systems)
51
+ apply_hvac_control(hpxml_bldg, schedules_file)
52
+ apply_hvac_distribution(hpxml_bldg, ncfl, ncfl_ag)
53
+ apply_hvac_location(hpxml_bldg)
54
+ apply_ventilation_fans(hpxml_bldg, weather, cfa, nbeds)
55
+ apply_water_heaters(hpxml_bldg, nbeds, eri_version, schedules_file)
56
+ apply_flue_or_chimney(hpxml_bldg)
57
+ apply_hot_water_distribution(hpxml_bldg, cfa, ncfl, has_uncond_bsmnt)
58
+ apply_water_fixtures(hpxml_bldg, schedules_file)
59
+ apply_solar_thermal_systems(hpxml_bldg)
60
+ apply_appliances(hpxml_bldg, nbeds, eri_version, schedules_file)
61
+ apply_lighting(hpxml_bldg, schedules_file)
62
+ apply_ceiling_fans(hpxml_bldg, nbeds, weather, schedules_file)
63
+ apply_pools_and_permanent_spas(hpxml_bldg, cfa, schedules_file)
64
+ apply_plug_loads(hpxml_bldg, cfa, schedules_file)
65
+ apply_fuel_loads(hpxml_bldg, cfa, schedules_file)
66
+ apply_pv_systems(hpxml_bldg)
67
+ apply_generators(hpxml_bldg)
68
+ apply_batteries(hpxml_bldg)
66
69
 
67
70
  # Do HVAC sizing after all other defaults have been applied
68
- apply_hvac_sizing(hpxml, weather, cfa)
71
+ apply_hvac_sizing(hpxml_bldg, weather, cfa)
72
+
73
+ # default detailed performance has to be after sizing to have autosized capacity information
74
+ apply_detailed_performance_data_for_var_speed_systems(hpxml_bldg)
69
75
  end
70
76
 
71
- def self.get_default_azimuths(hpxml)
77
+ def self.get_default_azimuths(hpxml_bldg)
72
78
  def self.sanitize_azimuth(azimuth)
73
79
  # Ensure 0 <= orientation < 360
74
80
  while azimuth < 0
@@ -85,8 +91,8 @@ class HPXMLDefaults
85
91
  # area, plus azimuths that are offset by 90/180/270 degrees. Used for
86
92
  # surfaces that may not have an azimuth defined (e.g., walls).
87
93
  azimuth_areas = {}
88
- (hpxml.roofs + hpxml.rim_joists + hpxml.walls + hpxml.foundation_walls +
89
- hpxml.windows + hpxml.skylights + hpxml.doors).each do |surface|
94
+ (hpxml_bldg.roofs + hpxml_bldg.rim_joists + hpxml_bldg.walls + hpxml_bldg.foundation_walls +
95
+ hpxml_bldg.windows + hpxml_bldg.skylights + hpxml_bldg.doors).each do |surface|
90
96
  az = surface.azimuth
91
97
  next if az.nil?
92
98
 
@@ -106,93 +112,46 @@ class HPXMLDefaults
106
112
 
107
113
  private
108
114
 
109
- def self.apply_header(hpxml, epw_file, weather)
110
- if hpxml.header.timestep.nil?
111
- hpxml.header.timestep = 60
112
- hpxml.header.timestep_isdefaulted = true
115
+ def self.apply_header(hpxml_header, epw_file)
116
+ if hpxml_header.timestep.nil?
117
+ hpxml_header.timestep = 60
118
+ hpxml_header.timestep_isdefaulted = true
113
119
  end
114
120
 
115
- if hpxml.header.sim_begin_month.nil?
116
- hpxml.header.sim_begin_month = 1
117
- hpxml.header.sim_begin_month_isdefaulted = true
121
+ if hpxml_header.sim_begin_month.nil?
122
+ hpxml_header.sim_begin_month = 1
123
+ hpxml_header.sim_begin_month_isdefaulted = true
118
124
  end
119
- if hpxml.header.sim_begin_day.nil?
120
- hpxml.header.sim_begin_day = 1
121
- hpxml.header.sim_begin_day_isdefaulted = true
125
+ if hpxml_header.sim_begin_day.nil?
126
+ hpxml_header.sim_begin_day = 1
127
+ hpxml_header.sim_begin_day_isdefaulted = true
122
128
  end
123
- if hpxml.header.sim_end_month.nil?
124
- hpxml.header.sim_end_month = 12
125
- hpxml.header.sim_end_month_isdefaulted = true
129
+ if hpxml_header.sim_end_month.nil?
130
+ hpxml_header.sim_end_month = 12
131
+ hpxml_header.sim_end_month_isdefaulted = true
126
132
  end
127
- if hpxml.header.sim_end_day.nil?
128
- hpxml.header.sim_end_day = 31
129
- hpxml.header.sim_end_day_isdefaulted = true
133
+ if hpxml_header.sim_end_day.nil?
134
+ hpxml_header.sim_end_day = 31
135
+ hpxml_header.sim_end_day_isdefaulted = true
130
136
  end
131
137
 
132
- sim_calendar_year = Location.get_sim_calendar_year(hpxml.header.sim_calendar_year, epw_file)
133
- if not hpxml.header.sim_calendar_year.nil?
134
- if hpxml.header.sim_calendar_year != sim_calendar_year
135
- hpxml.header.sim_calendar_year = sim_calendar_year
136
- hpxml.header.sim_calendar_year_isdefaulted = true
138
+ sim_calendar_year = Location.get_sim_calendar_year(hpxml_header.sim_calendar_year, epw_file)
139
+ if not hpxml_header.sim_calendar_year.nil?
140
+ if hpxml_header.sim_calendar_year != sim_calendar_year
141
+ hpxml_header.sim_calendar_year = sim_calendar_year
142
+ hpxml_header.sim_calendar_year_isdefaulted = true
137
143
  end
138
144
  else
139
- hpxml.header.sim_calendar_year = sim_calendar_year
140
- hpxml.header.sim_calendar_year_isdefaulted = true
141
- end
142
-
143
- if hpxml.header.dst_enabled.nil?
144
- hpxml.header.dst_enabled = true # Assume DST since it occurs in most US locations
145
- hpxml.header.dst_enabled_isdefaulted = true
146
- end
147
-
148
- if hpxml.header.dst_enabled && (not epw_file.nil?)
149
- if hpxml.header.dst_begin_month.nil? || hpxml.header.dst_begin_day.nil? || hpxml.header.dst_end_month.nil? || hpxml.header.dst_end_day.nil?
150
- if epw_file.daylightSavingStartDate.is_initialized && epw_file.daylightSavingEndDate.is_initialized
151
- # Use weather file DST dates if available
152
- dst_start_date = epw_file.daylightSavingStartDate.get
153
- dst_end_date = epw_file.daylightSavingEndDate.get
154
- hpxml.header.dst_begin_month = dst_start_date.monthOfYear.value
155
- hpxml.header.dst_begin_day = dst_start_date.dayOfMonth
156
- hpxml.header.dst_end_month = dst_end_date.monthOfYear.value
157
- hpxml.header.dst_end_day = dst_end_date.dayOfMonth
158
- else
159
- # Roughly average US dates according to https://en.wikipedia.org/wiki/Daylight_saving_time_in_the_United_States
160
- hpxml.header.dst_begin_month = 3
161
- hpxml.header.dst_begin_day = 12
162
- hpxml.header.dst_end_month = 11
163
- hpxml.header.dst_end_day = 5
164
- end
165
- hpxml.header.dst_begin_month_isdefaulted = true
166
- hpxml.header.dst_begin_day_isdefaulted = true
167
- hpxml.header.dst_end_month_isdefaulted = true
168
- hpxml.header.dst_end_day_isdefaulted = true
169
- end
170
- end
171
-
172
- if (not epw_file.nil?) && hpxml.header.state_code.nil?
173
- state_province_region = epw_file.stateProvinceRegion.upcase
174
- if /^[A-Z]{2}$/.match(state_province_region)
175
- hpxml.header.state_code = state_province_region
176
- hpxml.header.state_code_isdefaulted = true
177
- end
178
- end
179
-
180
- if (not epw_file.nil?) && hpxml.header.time_zone_utc_offset.nil?
181
- hpxml.header.time_zone_utc_offset = epw_file.timeZone
182
- hpxml.header.time_zone_utc_offset_isdefaulted = true
183
- end
184
-
185
- if hpxml.header.temperature_capacitance_multiplier.nil?
186
- hpxml.header.temperature_capacitance_multiplier = 1.0
187
- hpxml.header.temperature_capacitance_multiplier_isdefaulted = true
145
+ hpxml_header.sim_calendar_year = sim_calendar_year
146
+ hpxml_header.sim_calendar_year_isdefaulted = true
188
147
  end
189
148
 
190
- if hpxml.header.natvent_days_per_week.nil?
191
- hpxml.header.natvent_days_per_week = 3
192
- hpxml.header.natvent_days_per_week_isdefaulted = true
149
+ if hpxml_header.temperature_capacitance_multiplier.nil?
150
+ hpxml_header.temperature_capacitance_multiplier = 1.0
151
+ hpxml_header.temperature_capacitance_multiplier_isdefaulted = true
193
152
  end
194
153
 
195
- hpxml.header.unavailable_periods.each do |unavailable_period|
154
+ hpxml_header.unavailable_periods.each do |unavailable_period|
196
155
  if unavailable_period.begin_hour.nil?
197
156
  unavailable_period.begin_hour = 0
198
157
  unavailable_period.begin_hour_isdefaulted = true
@@ -206,87 +165,94 @@ class HPXMLDefaults
206
165
  unavailable_period.natvent_availability_isdefaulted = true
207
166
  end
208
167
  end
168
+ end
209
169
 
210
- if hpxml.header.shading_summer_begin_month.nil? || hpxml.header.shading_summer_begin_day.nil? || hpxml.header.shading_summer_end_month.nil? || hpxml.header.shading_summer_end_day.nil?
211
- if not weather.nil?
212
- # Default based on Building America seasons
213
- _, default_cooling_months = HVAC.get_default_heating_and_cooling_seasons(weather)
214
- begin_month, begin_day, end_month, end_day = Schedule.get_begin_and_end_dates_from_monthly_array(default_cooling_months, sim_calendar_year)
215
- if not begin_month.nil? # Check if no summer
216
- hpxml.header.shading_summer_begin_month = begin_month
217
- hpxml.header.shading_summer_begin_day = begin_day
218
- hpxml.header.shading_summer_end_month = end_month
219
- hpxml.header.shading_summer_end_day = end_day
220
- hpxml.header.shading_summer_begin_month_isdefaulted = true
221
- hpxml.header.shading_summer_begin_day_isdefaulted = true
222
- hpxml.header.shading_summer_end_month_isdefaulted = true
223
- hpxml.header.shading_summer_end_day_isdefaulted = true
224
- end
225
- end
170
+ def self.apply_building_header_sizing(hpxml_bldg, weather, nbeds)
171
+ if hpxml_bldg.header.manualj_heating_design_temp.nil?
172
+ hpxml_bldg.header.manualj_heating_design_temp = weather.design.HeatingDrybulb.round(2)
173
+ hpxml_bldg.header.manualj_heating_design_temp_isdefaulted = true
226
174
  end
227
- end
228
175
 
229
- def self.apply_header_sizing(hpxml, weather, nbeds)
230
- if hpxml.header.allow_increased_fixed_capacities.nil?
231
- hpxml.header.allow_increased_fixed_capacities = false
232
- hpxml.header.allow_increased_fixed_capacities_isdefaulted = true
176
+ if hpxml_bldg.header.manualj_cooling_design_temp.nil?
177
+ hpxml_bldg.header.manualj_cooling_design_temp = weather.design.CoolingDrybulb.round(2)
178
+ hpxml_bldg.header.manualj_cooling_design_temp_isdefaulted = true
233
179
  end
234
180
 
235
- if hpxml.header.heat_pump_sizing_methodology.nil? && (hpxml.heat_pumps.size > 0)
236
- hpxml.header.heat_pump_sizing_methodology = HPXML::HeatPumpSizingHERS
237
- hpxml.header.heat_pump_sizing_methodology_isdefaulted = true
181
+ if hpxml_bldg.header.manualj_heating_setpoint.nil?
182
+ hpxml_bldg.header.manualj_heating_setpoint = 70.0 # deg-F, per Manual J
183
+ hpxml_bldg.header.manualj_heating_setpoint_isdefaulted = true
238
184
  end
239
185
 
240
- if hpxml.header.manualj_heating_design_temp.nil?
241
- hpxml.header.manualj_heating_design_temp = weather.design.HeatingDrybulb.round(2)
242
- hpxml.header.manualj_heating_design_temp_isdefaulted = true
186
+ if hpxml_bldg.header.manualj_cooling_setpoint.nil?
187
+ hpxml_bldg.header.manualj_cooling_setpoint = 75.0 # deg-F, per Manual J
188
+ hpxml_bldg.header.manualj_cooling_setpoint_isdefaulted = true
243
189
  end
244
190
 
245
- if hpxml.header.manualj_cooling_design_temp.nil?
246
- hpxml.header.manualj_cooling_design_temp = weather.design.CoolingDrybulb.round(2)
247
- hpxml.header.manualj_cooling_design_temp_isdefaulted = true
191
+ if hpxml_bldg.header.manualj_humidity_setpoint.nil?
192
+ hpxml_bldg.header.manualj_humidity_setpoint = 0.5 # 50%
193
+ if hpxml_bldg.dehumidifiers.size > 0
194
+ hpxml_bldg.header.manualj_humidity_setpoint = [hpxml_bldg.header.manualj_humidity_setpoint, hpxml_bldg.dehumidifiers[0].rh_setpoint].min
195
+ end
196
+ hpxml_bldg.header.manualj_humidity_setpoint_isdefaulted = true
248
197
  end
249
198
 
250
- if hpxml.header.manualj_heating_setpoint.nil?
251
- hpxml.header.manualj_heating_setpoint = 70.0 # deg-F, per Manual J
252
- hpxml.header.manualj_heating_setpoint_isdefaulted = true
199
+ if hpxml_bldg.header.manualj_internal_loads_sensible.nil?
200
+ if hpxml_bldg.refrigerators.size + hpxml_bldg.freezers.size <= 1
201
+ hpxml_bldg.header.manualj_internal_loads_sensible = 2400.0 # Btuh, per Manual J
202
+ else
203
+ hpxml_bldg.header.manualj_internal_loads_sensible = 3600.0 # Btuh, per Manual J
204
+ end
205
+ hpxml_bldg.header.manualj_internal_loads_sensible_isdefaulted = true
253
206
  end
254
207
 
255
- if hpxml.header.manualj_cooling_setpoint.nil?
256
- hpxml.header.manualj_cooling_setpoint = 75.0 # deg-F, per Manual J
257
- hpxml.header.manualj_cooling_setpoint_isdefaulted = true
208
+ if hpxml_bldg.header.manualj_internal_loads_latent.nil?
209
+ hpxml_bldg.header.manualj_internal_loads_latent = 0.0 # Btuh
210
+ hpxml_bldg.header.manualj_internal_loads_latent_isdefaulted = true
258
211
  end
259
212
 
260
- if hpxml.header.manualj_humidity_setpoint.nil?
261
- hpxml.header.manualj_humidity_setpoint = 0.5 # 50%
262
- if hpxml.dehumidifiers.size > 0
263
- hpxml.header.manualj_humidity_setpoint = [hpxml.header.manualj_humidity_setpoint, hpxml.dehumidifiers[0].rh_setpoint].min
264
- end
265
- hpxml.header.manualj_humidity_setpoint_isdefaulted = true
213
+ if hpxml_bldg.header.manualj_num_occupants.nil?
214
+ hpxml_bldg.header.manualj_num_occupants = nbeds + 1 # Per Manual J
215
+ hpxml_bldg.header.manualj_num_occupants_isdefaulted = true
266
216
  end
217
+ end
267
218
 
268
- if hpxml.header.manualj_internal_loads_sensible.nil?
269
- if hpxml.refrigerators.size + hpxml.freezers.size <= 1
270
- hpxml.header.manualj_internal_loads_sensible = 2400.0 # Btuh, per Manual J
271
- else
272
- hpxml.header.manualj_internal_loads_sensible = 3600.0 # Btuh, per Manual J
273
- end
274
- hpxml.header.manualj_internal_loads_sensible_isdefaulted = true
219
+ def self.apply_building_header(hpxml_header, hpxml_bldg, weather)
220
+ if hpxml_bldg.header.natvent_days_per_week.nil?
221
+ hpxml_bldg.header.natvent_days_per_week = 3
222
+ hpxml_bldg.header.natvent_days_per_week_isdefaulted = true
275
223
  end
276
224
 
277
- if hpxml.header.manualj_internal_loads_latent.nil?
278
- hpxml.header.manualj_internal_loads_latent = 0.0 # Btuh
279
- hpxml.header.manualj_internal_loads_latent_isdefaulted = true
225
+ if hpxml_bldg.header.heat_pump_sizing_methodology.nil? && (hpxml_bldg.heat_pumps.size > 0)
226
+ hpxml_bldg.header.heat_pump_sizing_methodology = HPXML::HeatPumpSizingHERS
227
+ hpxml_bldg.header.heat_pump_sizing_methodology_isdefaulted = true
280
228
  end
281
229
 
282
- if hpxml.header.manualj_num_occupants.nil?
283
- hpxml.header.manualj_num_occupants = nbeds + 1 # Per Manual J
284
- hpxml.header.manualj_num_occupants_isdefaulted = true
230
+ if hpxml_bldg.header.allow_increased_fixed_capacities.nil?
231
+ hpxml_bldg.header.allow_increased_fixed_capacities = false
232
+ hpxml_bldg.header.allow_increased_fixed_capacities_isdefaulted = true
233
+ end
234
+
235
+ if hpxml_bldg.header.shading_summer_begin_month.nil? || hpxml_bldg.header.shading_summer_begin_day.nil? || hpxml_bldg.header.shading_summer_end_month.nil? || hpxml_bldg.header.shading_summer_end_day.nil?
236
+ if not weather.nil?
237
+ # Default based on Building America seasons
238
+ _, default_cooling_months = HVAC.get_default_heating_and_cooling_seasons(weather)
239
+ begin_month, begin_day, end_month, end_day = Schedule.get_begin_and_end_dates_from_monthly_array(default_cooling_months, hpxml_header.sim_calendar_year)
240
+ if not begin_month.nil? # Check if no summer
241
+ hpxml_bldg.header.shading_summer_begin_month = begin_month
242
+ hpxml_bldg.header.shading_summer_begin_day = begin_day
243
+ hpxml_bldg.header.shading_summer_end_month = end_month
244
+ hpxml_bldg.header.shading_summer_end_day = end_day
245
+ hpxml_bldg.header.shading_summer_begin_month_isdefaulted = true
246
+ hpxml_bldg.header.shading_summer_begin_day_isdefaulted = true
247
+ hpxml_bldg.header.shading_summer_end_month_isdefaulted = true
248
+ hpxml_bldg.header.shading_summer_end_day_isdefaulted = true
249
+ end
250
+ end
285
251
  end
286
252
  end
287
253
 
288
- def self.apply_emissions_scenarios(hpxml, has_fuel)
289
- hpxml.header.emissions_scenarios.each do |scenario|
254
+ def self.apply_emissions_scenarios(hpxml_header, has_fuel)
255
+ hpxml_header.emissions_scenarios.each do |scenario|
290
256
  # Electricity
291
257
  if not scenario.elec_schedule_filepath.nil?
292
258
  if scenario.elec_schedule_number_of_header_rows.nil?
@@ -361,15 +327,15 @@ class HPXMLDefaults
361
327
  end
362
328
  end
363
329
 
364
- def self.apply_utility_bill_scenarios(runner, hpxml, has_fuel)
365
- hpxml.header.utility_bill_scenarios.each do |scenario|
330
+ def self.apply_utility_bill_scenarios(runner, hpxml_header, hpxml_bldg, has_fuel)
331
+ hpxml_header.utility_bill_scenarios.each do |scenario|
366
332
  if scenario.elec_tariff_filepath.nil?
367
333
  if scenario.elec_fixed_charge.nil?
368
334
  scenario.elec_fixed_charge = 12.0 # https://www.nrdc.org/experts/samantha-williams/there-war-attrition-electricity-fixed-charges says $11.19/month in 2018
369
335
  scenario.elec_fixed_charge_isdefaulted = true
370
336
  end
371
337
  if scenario.elec_marginal_rate.nil?
372
- scenario.elec_marginal_rate, _ = UtilityBills.get_rates_from_eia_data(runner, hpxml.header.state_code, HPXML::FuelTypeElectricity, scenario.elec_fixed_charge)
338
+ scenario.elec_marginal_rate, _ = UtilityBills.get_rates_from_eia_data(runner, hpxml_bldg.state_code, HPXML::FuelTypeElectricity, scenario.elec_fixed_charge)
373
339
  scenario.elec_marginal_rate_isdefaulted = true
374
340
  end
375
341
  end
@@ -380,7 +346,7 @@ class HPXMLDefaults
380
346
  scenario.natural_gas_fixed_charge_isdefaulted = true
381
347
  end
382
348
  if scenario.natural_gas_marginal_rate.nil?
383
- scenario.natural_gas_marginal_rate, _ = UtilityBills.get_rates_from_eia_data(runner, hpxml.header.state_code, HPXML::FuelTypeNaturalGas, scenario.natural_gas_fixed_charge)
349
+ scenario.natural_gas_marginal_rate, _ = UtilityBills.get_rates_from_eia_data(runner, hpxml_bldg.state_code, HPXML::FuelTypeNaturalGas, scenario.natural_gas_fixed_charge)
384
350
  scenario.natural_gas_marginal_rate_isdefaulted = true
385
351
  end
386
352
  end
@@ -391,7 +357,7 @@ class HPXMLDefaults
391
357
  scenario.propane_fixed_charge_isdefaulted = true
392
358
  end
393
359
  if scenario.propane_marginal_rate.nil?
394
- scenario.propane_marginal_rate, _ = UtilityBills.get_rates_from_eia_data(runner, hpxml.header.state_code, HPXML::FuelTypePropane, nil)
360
+ scenario.propane_marginal_rate, _ = UtilityBills.get_rates_from_eia_data(runner, hpxml_bldg.state_code, HPXML::FuelTypePropane, nil)
395
361
  scenario.propane_marginal_rate_isdefaulted = true
396
362
  end
397
363
  end
@@ -402,7 +368,7 @@ class HPXMLDefaults
402
368
  scenario.fuel_oil_fixed_charge_isdefaulted = true
403
369
  end
404
370
  if scenario.fuel_oil_marginal_rate.nil?
405
- scenario.fuel_oil_marginal_rate, _ = UtilityBills.get_rates_from_eia_data(runner, hpxml.header.state_code, HPXML::FuelTypeOil, nil)
371
+ scenario.fuel_oil_marginal_rate, _ = UtilityBills.get_rates_from_eia_data(runner, hpxml_bldg.state_code, HPXML::FuelTypeOil, nil)
406
372
  scenario.fuel_oil_marginal_rate_isdefaulted = true
407
373
  end
408
374
  end
@@ -440,7 +406,7 @@ class HPXMLDefaults
440
406
  end
441
407
  end
442
408
 
443
- next unless hpxml.pv_systems.size > 0
409
+ next unless hpxml_bldg.pv_systems.size > 0
444
410
 
445
411
  if scenario.pv_compensation_type.nil?
446
412
  scenario.pv_compensation_type = HPXML::PVCompensationTypeNetMetering
@@ -472,27 +438,71 @@ class HPXMLDefaults
472
438
  end
473
439
  end
474
440
 
475
- def self.apply_site(hpxml)
476
- if hpxml.site.site_type.nil?
477
- hpxml.site.site_type = HPXML::SiteTypeSuburban
478
- hpxml.site.site_type_isdefaulted = true
441
+ def self.apply_building(hpxml_bldg, epw_file)
442
+ if (not epw_file.nil?) && hpxml_bldg.state_code.nil?
443
+ state_province_region = epw_file.stateProvinceRegion.upcase
444
+ if /^[A-Z]{2}$/.match(state_province_region)
445
+ hpxml_bldg.state_code = state_province_region
446
+ hpxml_bldg.state_code_isdefaulted = true
447
+ end
479
448
  end
480
449
 
481
- if hpxml.site.shielding_of_home.nil?
482
- hpxml.site.shielding_of_home = HPXML::ShieldingNormal
483
- hpxml.site.shielding_of_home_isdefaulted = true
450
+ if (not epw_file.nil?) && hpxml_bldg.time_zone_utc_offset.nil?
451
+ hpxml_bldg.time_zone_utc_offset = epw_file.timeZone
452
+ hpxml_bldg.time_zone_utc_offset_isdefaulted = true
484
453
  end
485
454
 
486
- if hpxml.site.ground_conductivity.nil?
487
- hpxml.site.ground_conductivity = 1.0 # Btu/hr-ft-F
488
- hpxml.site.ground_conductivity_isdefaulted = true
455
+ if hpxml_bldg.dst_enabled.nil?
456
+ hpxml_bldg.dst_enabled = true # Assume DST since it occurs in most US locations
457
+ hpxml_bldg.dst_enabled_isdefaulted = true
489
458
  end
490
459
 
491
- hpxml.site.additional_properties.aim2_shelter_coeff = Airflow.get_aim2_shelter_coefficient(hpxml.site.shielding_of_home)
460
+ if hpxml_bldg.dst_enabled && (not epw_file.nil?)
461
+ if hpxml_bldg.dst_begin_month.nil? || hpxml_bldg.dst_begin_day.nil? || hpxml_bldg.dst_end_month.nil? || hpxml_bldg.dst_end_day.nil?
462
+ if epw_file.daylightSavingStartDate.is_initialized && epw_file.daylightSavingEndDate.is_initialized
463
+ # Use weather file DST dates if available
464
+ dst_start_date = epw_file.daylightSavingStartDate.get
465
+ dst_end_date = epw_file.daylightSavingEndDate.get
466
+ hpxml_bldg.dst_begin_month = dst_start_date.monthOfYear.value
467
+ hpxml_bldg.dst_begin_day = dst_start_date.dayOfMonth
468
+ hpxml_bldg.dst_end_month = dst_end_date.monthOfYear.value
469
+ hpxml_bldg.dst_end_day = dst_end_date.dayOfMonth
470
+ else
471
+ # Roughly average US dates according to https://en.wikipedia.org/wiki/Daylight_saving_time_in_the_United_States
472
+ hpxml_bldg.dst_begin_month = 3
473
+ hpxml_bldg.dst_begin_day = 12
474
+ hpxml_bldg.dst_end_month = 11
475
+ hpxml_bldg.dst_end_day = 5
476
+ end
477
+ hpxml_bldg.dst_begin_month_isdefaulted = true
478
+ hpxml_bldg.dst_begin_day_isdefaulted = true
479
+ hpxml_bldg.dst_end_month_isdefaulted = true
480
+ hpxml_bldg.dst_end_day_isdefaulted = true
481
+ end
482
+ end
492
483
  end
493
484
 
494
- def self.apply_neighbor_buildings(hpxml)
495
- hpxml.neighbor_buildings.each do |neighbor_building|
485
+ def self.apply_site(hpxml_bldg)
486
+ if hpxml_bldg.site.site_type.nil?
487
+ hpxml_bldg.site.site_type = HPXML::SiteTypeSuburban
488
+ hpxml_bldg.site.site_type_isdefaulted = true
489
+ end
490
+
491
+ if hpxml_bldg.site.shielding_of_home.nil?
492
+ hpxml_bldg.site.shielding_of_home = HPXML::ShieldingNormal
493
+ hpxml_bldg.site.shielding_of_home_isdefaulted = true
494
+ end
495
+
496
+ if hpxml_bldg.site.ground_conductivity.nil?
497
+ hpxml_bldg.site.ground_conductivity = 1.0 # Btu/hr-ft-F
498
+ hpxml_bldg.site.ground_conductivity_isdefaulted = true
499
+ end
500
+
501
+ hpxml_bldg.site.additional_properties.aim2_shelter_coeff = Airflow.get_aim2_shelter_coefficient(hpxml_bldg.site.shielding_of_home)
502
+ end
503
+
504
+ def self.apply_neighbor_buildings(hpxml_bldg)
505
+ hpxml_bldg.neighbor_buildings.each do |neighbor_building|
496
506
  if neighbor_building.azimuth.nil?
497
507
  neighbor_building.azimuth = get_azimuth_from_orientation(neighbor_building.orientation)
498
508
  neighbor_building.azimuth_isdefaulted = true
@@ -504,93 +514,96 @@ class HPXMLDefaults
504
514
  end
505
515
  end
506
516
 
507
- def self.apply_building_occupancy(hpxml, schedules_file)
508
- if hpxml.building_occupancy.number_of_residents.nil?
509
- hpxml.building_construction.additional_properties.adjusted_number_of_bedrooms = hpxml.building_construction.number_of_bedrooms
517
+ def self.apply_building_occupancy(hpxml_bldg, schedules_file)
518
+ if hpxml_bldg.building_occupancy.number_of_residents.nil?
519
+ hpxml_bldg.building_construction.additional_properties.adjusted_number_of_bedrooms = hpxml_bldg.building_construction.number_of_bedrooms
510
520
  else
511
521
  # Set adjusted number of bedrooms for operational calculation; this is an adjustment on
512
522
  # ANSI 301 or Building America equations, which are based on number of bedrooms.
513
- hpxml.building_construction.additional_properties.adjusted_number_of_bedrooms = get_nbeds_adjusted_for_operational_calculation(hpxml)
523
+ hpxml_bldg.building_construction.additional_properties.adjusted_number_of_bedrooms = get_nbeds_adjusted_for_operational_calculation(hpxml_bldg)
514
524
  end
515
525
  schedules_file_includes_occupants = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnOccupants))
516
- if hpxml.building_occupancy.weekday_fractions.nil? && !schedules_file_includes_occupants
517
- hpxml.building_occupancy.weekday_fractions = Schedule.OccupantsWeekdayFractions
518
- hpxml.building_occupancy.weekday_fractions_isdefaulted = true
526
+ if hpxml_bldg.building_occupancy.weekday_fractions.nil? && !schedules_file_includes_occupants
527
+ hpxml_bldg.building_occupancy.weekday_fractions = Schedule.OccupantsWeekdayFractions
528
+ hpxml_bldg.building_occupancy.weekday_fractions_isdefaulted = true
519
529
  end
520
- if hpxml.building_occupancy.weekend_fractions.nil? && !schedules_file_includes_occupants
521
- hpxml.building_occupancy.weekend_fractions = Schedule.OccupantsWeekendFractions
522
- hpxml.building_occupancy.weekend_fractions_isdefaulted = true
530
+ if hpxml_bldg.building_occupancy.weekend_fractions.nil? && !schedules_file_includes_occupants
531
+ hpxml_bldg.building_occupancy.weekend_fractions = Schedule.OccupantsWeekendFractions
532
+ hpxml_bldg.building_occupancy.weekend_fractions_isdefaulted = true
523
533
  end
524
- if hpxml.building_occupancy.monthly_multipliers.nil? && !schedules_file_includes_occupants
525
- hpxml.building_occupancy.monthly_multipliers = Schedule.OccupantsMonthlyMultipliers
526
- hpxml.building_occupancy.monthly_multipliers_isdefaulted = true
534
+ if hpxml_bldg.building_occupancy.monthly_multipliers.nil? && !schedules_file_includes_occupants
535
+ hpxml_bldg.building_occupancy.monthly_multipliers = Schedule.OccupantsMonthlyMultipliers
536
+ hpxml_bldg.building_occupancy.monthly_multipliers_isdefaulted = true
527
537
  end
528
538
  end
529
539
 
530
- def self.apply_building_construction(hpxml, cfa, nbeds, infil_measurement)
531
- cond_crawl_volume = hpxml.inferred_conditioned_crawlspace_volume()
532
- if hpxml.building_construction.conditioned_building_volume.nil? && hpxml.building_construction.average_ceiling_height.nil?
540
+ def self.apply_building_construction(hpxml_bldg, cfa, nbeds, infil_measurement)
541
+ cond_crawl_volume = hpxml_bldg.inferred_conditioned_crawlspace_volume()
542
+ if hpxml_bldg.building_construction.conditioned_building_volume.nil? && hpxml_bldg.building_construction.average_ceiling_height.nil?
533
543
  if not infil_measurement.infiltration_volume.nil?
534
- hpxml.building_construction.average_ceiling_height = [infil_measurement.infiltration_volume / cfa, 8.0].min
544
+ hpxml_bldg.building_construction.average_ceiling_height = [infil_measurement.infiltration_volume / cfa, 8.0].min
535
545
  else
536
- hpxml.building_construction.average_ceiling_height = 8.0
537
- end
538
- hpxml.building_construction.average_ceiling_height_isdefaulted = true
539
- hpxml.building_construction.conditioned_building_volume = cfa * hpxml.building_construction.average_ceiling_height + cond_crawl_volume
540
- hpxml.building_construction.conditioned_building_volume_isdefaulted = true
541
- elsif hpxml.building_construction.conditioned_building_volume.nil?
542
- hpxml.building_construction.conditioned_building_volume = cfa * hpxml.building_construction.average_ceiling_height + cond_crawl_volume
543
- hpxml.building_construction.conditioned_building_volume_isdefaulted = true
544
- elsif hpxml.building_construction.average_ceiling_height.nil?
545
- hpxml.building_construction.average_ceiling_height = (hpxml.building_construction.conditioned_building_volume - cond_crawl_volume) / cfa
546
- hpxml.building_construction.average_ceiling_height_isdefaulted = true
547
- end
548
-
549
- if hpxml.building_construction.number_of_bathrooms.nil?
550
- hpxml.building_construction.number_of_bathrooms = Float(Waterheater.get_default_num_bathrooms(nbeds)).to_i
551
- hpxml.building_construction.number_of_bathrooms_isdefaulted = true
546
+ hpxml_bldg.building_construction.average_ceiling_height = 8.0
547
+ end
548
+ hpxml_bldg.building_construction.average_ceiling_height_isdefaulted = true
549
+ hpxml_bldg.building_construction.conditioned_building_volume = cfa * hpxml_bldg.building_construction.average_ceiling_height + cond_crawl_volume
550
+ hpxml_bldg.building_construction.conditioned_building_volume_isdefaulted = true
551
+ elsif hpxml_bldg.building_construction.conditioned_building_volume.nil?
552
+ hpxml_bldg.building_construction.conditioned_building_volume = cfa * hpxml_bldg.building_construction.average_ceiling_height + cond_crawl_volume
553
+ hpxml_bldg.building_construction.conditioned_building_volume_isdefaulted = true
554
+ elsif hpxml_bldg.building_construction.average_ceiling_height.nil?
555
+ hpxml_bldg.building_construction.average_ceiling_height = (hpxml_bldg.building_construction.conditioned_building_volume - cond_crawl_volume) / cfa
556
+ hpxml_bldg.building_construction.average_ceiling_height_isdefaulted = true
557
+ end
558
+ if hpxml_bldg.building_construction.number_of_bathrooms.nil?
559
+ hpxml_bldg.building_construction.number_of_bathrooms = Float(Waterheater.get_default_num_bathrooms(nbeds)).to_i
560
+ hpxml_bldg.building_construction.number_of_bathrooms_isdefaulted = true
561
+ end
562
+ if hpxml_bldg.building_construction.number_of_units.nil?
563
+ hpxml_bldg.building_construction.number_of_units = 1
564
+ hpxml_bldg.building_construction.number_of_units_isdefaulted = true
552
565
  end
553
566
  end
554
567
 
555
- def self.apply_climate_and_risk_zones(hpxml, epw_file)
556
- if (not epw_file.nil?) && hpxml.climate_and_risk_zones.climate_zone_ieccs.empty?
568
+ def self.apply_climate_and_risk_zones(hpxml_bldg, epw_file)
569
+ if (not epw_file.nil?) && hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs.empty?
557
570
  zone = Location.get_climate_zone_iecc(epw_file.wmoNumber)
558
571
  if not zone.nil?
559
- hpxml.climate_and_risk_zones.climate_zone_ieccs.add(zone: zone,
560
- year: 2006,
561
- zone_isdefaulted: true,
562
- year_isdefaulted: true)
572
+ hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs.add(zone: zone,
573
+ year: 2006,
574
+ zone_isdefaulted: true,
575
+ year_isdefaulted: true)
563
576
  end
564
577
  end
565
578
  end
566
579
 
567
- def self.apply_infiltration(hpxml, infil_measurement)
580
+ def self.apply_infiltration(hpxml_bldg, infil_measurement)
568
581
  if infil_measurement.infiltration_volume.nil?
569
- infil_measurement.infiltration_volume = hpxml.building_construction.conditioned_building_volume
582
+ infil_measurement.infiltration_volume = hpxml_bldg.building_construction.conditioned_building_volume
570
583
  infil_measurement.infiltration_volume_isdefaulted = true
571
584
  end
572
585
  if infil_measurement.infiltration_height.nil?
573
- infil_measurement.infiltration_height = hpxml.inferred_infiltration_height(infil_measurement.infiltration_volume)
586
+ infil_measurement.infiltration_height = hpxml_bldg.inferred_infiltration_height(infil_measurement.infiltration_volume)
574
587
  infil_measurement.infiltration_height_isdefaulted = true
575
588
  end
576
589
  if infil_measurement.a_ext.nil?
577
590
  if (infil_measurement.infiltration_type == HPXML::InfiltrationTypeUnitTotal) &&
578
- [HPXML::ResidentialTypeApartment, HPXML::ResidentialTypeSFA].include?(hpxml.building_construction.residential_facility_type)
579
- tot_cb_area, ext_cb_area = hpxml.compartmentalization_boundary_areas()
591
+ [HPXML::ResidentialTypeApartment, HPXML::ResidentialTypeSFA].include?(hpxml_bldg.building_construction.residential_facility_type)
592
+ tot_cb_area, ext_cb_area = hpxml_bldg.compartmentalization_boundary_areas()
580
593
  infil_measurement.a_ext = (ext_cb_area / tot_cb_area).round(5)
581
594
  infil_measurement.a_ext_isdefaulted = true
582
595
  end
583
596
  end
584
597
  end
585
598
 
586
- def self.apply_attics(hpxml)
587
- return unless hpxml.has_location(HPXML::LocationAtticVented)
599
+ def self.apply_attics(hpxml_bldg)
600
+ return unless hpxml_bldg.has_location(HPXML::LocationAtticVented)
588
601
 
589
- vented_attics = hpxml.attics.select { |a| a.attic_type == HPXML::AtticTypeVented }
602
+ vented_attics = hpxml_bldg.attics.select { |a| a.attic_type == HPXML::AtticTypeVented }
590
603
  if vented_attics.empty?
591
- hpxml.attics.add(id: 'VentedAttic',
592
- attic_type: HPXML::AtticTypeVented)
593
- vented_attics << hpxml.attics[-1]
604
+ hpxml_bldg.attics.add(id: 'VentedAttic',
605
+ attic_type: HPXML::AtticTypeVented)
606
+ vented_attics << hpxml_bldg.attics[-1]
594
607
  end
595
608
  vented_attics.each do |vented_attic|
596
609
  next unless (vented_attic.vented_attic_sla.nil? && vented_attic.vented_attic_ach.nil?)
@@ -601,26 +614,42 @@ class HPXMLDefaults
601
614
  end
602
615
  end
603
616
 
604
- def self.apply_foundations(hpxml)
605
- return unless hpxml.has_location(HPXML::LocationCrawlspaceVented)
617
+ def self.apply_foundations(hpxml_bldg)
618
+ if hpxml_bldg.has_location(HPXML::LocationCrawlspaceVented)
619
+ vented_crawls = hpxml_bldg.foundations.select { |f| f.foundation_type == HPXML::FoundationTypeCrawlspaceVented }
620
+ if vented_crawls.empty?
621
+ hpxml_bldg.foundations.add(id: 'VentedCrawlspace',
622
+ foundation_type: HPXML::FoundationTypeCrawlspaceVented)
623
+ vented_crawls << hpxml_bldg.foundations[-1]
624
+ end
625
+ vented_crawls.each do |vented_crawl|
626
+ next unless vented_crawl.vented_crawlspace_sla.nil?
606
627
 
607
- vented_crawls = hpxml.foundations.select { |f| f.foundation_type == HPXML::FoundationTypeCrawlspaceVented }
608
- if vented_crawls.empty?
609
- hpxml.foundations.add(id: 'VentedCrawlspace',
610
- foundation_type: HPXML::FoundationTypeCrawlspaceVented)
611
- vented_crawls << hpxml.foundations[-1]
628
+ vented_crawl.vented_crawlspace_sla = Airflow.get_default_vented_crawl_sla()
629
+ vented_crawl.vented_crawlspace_sla_isdefaulted = true
630
+ break # EPvalidator.xml only allows a single ventilation rate
631
+ end
612
632
  end
613
- vented_crawls.each do |vented_crawl|
614
- next unless vented_crawl.vented_crawlspace_sla.nil?
615
633
 
616
- vented_crawl.vented_crawlspace_sla = Airflow.get_default_vented_crawl_sla()
617
- vented_crawl.vented_crawlspace_sla_isdefaulted = true
618
- break # EPvalidator.xml only allows a single ventilation rate
634
+ if hpxml_bldg.has_location(HPXML::LocationManufacturedHomeUnderBelly)
635
+ belly_and_wing_foundations = hpxml_bldg.foundations.select { |f| f.foundation_type == HPXML::FoundationTypeBellyAndWing }
636
+ if belly_and_wing_foundations.empty?
637
+ hpxml_bldg.foundations.add(id: 'BellyAndWing',
638
+ foundation_type: HPXML::FoundationTypeBellyAndWing)
639
+ belly_and_wing_foundations << hpxml_bldg.foundations[-1]
640
+ end
641
+ belly_and_wing_foundations.each do |foundation|
642
+ next unless foundation.belly_wing_skirt_present.nil?
643
+
644
+ foundation.belly_wing_skirt_present_isdefaulted = true
645
+ foundation.belly_wing_skirt_present = true
646
+ break
647
+ end
619
648
  end
620
649
  end
621
650
 
622
- def self.apply_roofs(hpxml)
623
- hpxml.roofs.each do |roof|
651
+ def self.apply_roofs(hpxml_bldg)
652
+ hpxml_bldg.roofs.each do |roof|
624
653
  if roof.azimuth.nil?
625
654
  roof.azimuth = get_azimuth_from_orientation(roof.orientation)
626
655
  roof.azimuth_isdefaulted = true
@@ -673,8 +702,8 @@ class HPXMLDefaults
673
702
  end
674
703
  end
675
704
 
676
- def self.apply_rim_joists(hpxml)
677
- hpxml.rim_joists.each do |rim_joist|
705
+ def self.apply_rim_joists(hpxml_bldg)
706
+ hpxml_bldg.rim_joists.each do |rim_joist|
678
707
  if rim_joist.azimuth.nil?
679
708
  rim_joist.azimuth = get_azimuth_from_orientation(rim_joist.orientation)
680
709
  rim_joist.azimuth_isdefaulted = true
@@ -708,8 +737,8 @@ class HPXMLDefaults
708
737
  end
709
738
  end
710
739
 
711
- def self.apply_walls(hpxml)
712
- hpxml.walls.each do |wall|
740
+ def self.apply_walls(hpxml_bldg)
741
+ hpxml_bldg.walls.each do |wall|
713
742
  if wall.azimuth.nil?
714
743
  wall.azimuth = get_azimuth_from_orientation(wall.orientation)
715
744
  wall.azimuth_isdefaulted = true
@@ -757,8 +786,8 @@ class HPXMLDefaults
757
786
  end
758
787
  end
759
788
 
760
- def self.apply_foundation_walls(hpxml)
761
- hpxml.foundation_walls.each do |foundation_wall|
789
+ def self.apply_foundation_walls(hpxml_bldg)
790
+ hpxml_bldg.foundation_walls.each do |foundation_wall|
762
791
  if foundation_wall.type.nil?
763
792
  foundation_wall.type = HPXML::FoundationWallTypeSolidConcrete
764
793
  foundation_wall.type_isdefaulted = true
@@ -812,8 +841,8 @@ class HPXMLDefaults
812
841
  end
813
842
  end
814
843
 
815
- def self.apply_floors(hpxml)
816
- hpxml.floors.each do |floor|
844
+ def self.apply_floors(hpxml_bldg)
845
+ hpxml_bldg.floors.each do |floor|
817
846
  if floor.floor_or_ceiling.nil?
818
847
  if floor.is_ceiling
819
848
  floor.floor_or_ceiling = HPXML::FloorOrCeilingCeiling
@@ -843,8 +872,8 @@ class HPXMLDefaults
843
872
  end
844
873
  end
845
874
 
846
- def self.apply_slabs(hpxml)
847
- hpxml.slabs.each do |slab|
875
+ def self.apply_slabs(hpxml_bldg)
876
+ hpxml_bldg.slabs.each do |slab|
848
877
  if slab.thickness.nil?
849
878
  crawl_slab = [HPXML::LocationCrawlspaceVented, HPXML::LocationCrawlspaceUnvented].include?(slab.interior_adjacent_to)
850
879
  slab.thickness = crawl_slab ? 0.0 : 4.0
@@ -859,12 +888,22 @@ class HPXMLDefaults
859
888
  slab.carpet_fraction = conditioned_slab ? 0.8 : 0.0
860
889
  slab.carpet_fraction_isdefaulted = true
861
890
  end
891
+ if slab.connected_foundation_walls.empty?
892
+ if slab.depth_below_grade.nil?
893
+ slab.depth_below_grade = 0.0
894
+ slab.depth_below_grade_isdefaulted = true
895
+ end
896
+ else
897
+ if !slab.depth_below_grade.nil?
898
+ slab.depth_below_grade = nil # Ignore Slab/DepthBelowGrade; use values from adjacent foundation walls instead
899
+ end
900
+ end
862
901
  end
863
902
  end
864
903
 
865
- def self.apply_windows(hpxml)
904
+ def self.apply_windows(hpxml_bldg)
866
905
  default_shade_summer, default_shade_winter = Constructions.get_default_interior_shading_factors()
867
- hpxml.windows.each do |window|
906
+ hpxml_bldg.windows.each do |window|
868
907
  if window.azimuth.nil?
869
908
  window.azimuth = get_azimuth_from_orientation(window.orientation)
870
909
  window.azimuth_isdefaulted = true
@@ -931,8 +970,8 @@ class HPXMLDefaults
931
970
  end
932
971
  end
933
972
 
934
- def self.apply_skylights(hpxml)
935
- hpxml.skylights.each do |skylight|
973
+ def self.apply_skylights(hpxml_bldg)
974
+ hpxml_bldg.skylights.each do |skylight|
936
975
  if skylight.azimuth.nil?
937
976
  skylight.azimuth = get_azimuth_from_orientation(skylight.orientation)
938
977
  skylight.azimuth_isdefaulted = true
@@ -995,8 +1034,8 @@ class HPXMLDefaults
995
1034
  end
996
1035
  end
997
1036
 
998
- def self.apply_doors(hpxml)
999
- hpxml.doors.each do |door|
1037
+ def self.apply_doors(hpxml_bldg)
1038
+ hpxml_bldg.doors.each do |door|
1000
1039
  if door.azimuth.nil?
1001
1040
  door.azimuth = get_azimuth_from_orientation(door.orientation)
1002
1041
  door.azimuth_isdefaulted = true
@@ -1011,47 +1050,47 @@ class HPXMLDefaults
1011
1050
  if (not door.wall.nil?) && (not door.wall.azimuth.nil?)
1012
1051
  door.azimuth = door.wall.azimuth
1013
1052
  else
1014
- primary_azimuth = get_default_azimuths(hpxml)[0]
1053
+ primary_azimuth = get_default_azimuths(hpxml_bldg)[0]
1015
1054
  door.azimuth = primary_azimuth
1016
1055
  door.azimuth_isdefaulted = true
1017
1056
  end
1018
1057
  end
1019
1058
  end
1020
1059
 
1021
- def self.apply_partition_wall_mass(hpxml)
1022
- if hpxml.partition_wall_mass.area_fraction.nil?
1023
- hpxml.partition_wall_mass.area_fraction = 1.0
1024
- hpxml.partition_wall_mass.area_fraction_isdefaulted = true
1060
+ def self.apply_partition_wall_mass(hpxml_bldg)
1061
+ if hpxml_bldg.partition_wall_mass.area_fraction.nil?
1062
+ hpxml_bldg.partition_wall_mass.area_fraction = 1.0
1063
+ hpxml_bldg.partition_wall_mass.area_fraction_isdefaulted = true
1025
1064
  end
1026
- if hpxml.partition_wall_mass.interior_finish_type.nil?
1027
- hpxml.partition_wall_mass.interior_finish_type = HPXML::InteriorFinishGypsumBoard
1028
- hpxml.partition_wall_mass.interior_finish_type_isdefaulted = true
1065
+ if hpxml_bldg.partition_wall_mass.interior_finish_type.nil?
1066
+ hpxml_bldg.partition_wall_mass.interior_finish_type = HPXML::InteriorFinishGypsumBoard
1067
+ hpxml_bldg.partition_wall_mass.interior_finish_type_isdefaulted = true
1029
1068
  end
1030
- if hpxml.partition_wall_mass.interior_finish_thickness.nil?
1031
- hpxml.partition_wall_mass.interior_finish_thickness = 0.5
1032
- hpxml.partition_wall_mass.interior_finish_thickness_isdefaulted = true
1069
+ if hpxml_bldg.partition_wall_mass.interior_finish_thickness.nil?
1070
+ hpxml_bldg.partition_wall_mass.interior_finish_thickness = 0.5
1071
+ hpxml_bldg.partition_wall_mass.interior_finish_thickness_isdefaulted = true
1033
1072
  end
1034
1073
  end
1035
1074
 
1036
- def self.apply_furniture_mass(hpxml)
1037
- if hpxml.furniture_mass.area_fraction.nil?
1038
- hpxml.furniture_mass.area_fraction = 0.4
1039
- hpxml.furniture_mass.area_fraction_isdefaulted = true
1075
+ def self.apply_furniture_mass(hpxml_bldg)
1076
+ if hpxml_bldg.furniture_mass.area_fraction.nil?
1077
+ hpxml_bldg.furniture_mass.area_fraction = 0.4
1078
+ hpxml_bldg.furniture_mass.area_fraction_isdefaulted = true
1040
1079
  end
1041
- if hpxml.furniture_mass.type.nil?
1042
- hpxml.furniture_mass.type = HPXML::FurnitureMassTypeLightWeight
1043
- hpxml.furniture_mass.type_isdefaulted = true
1080
+ if hpxml_bldg.furniture_mass.type.nil?
1081
+ hpxml_bldg.furniture_mass.type = HPXML::FurnitureMassTypeLightWeight
1082
+ hpxml_bldg.furniture_mass.type_isdefaulted = true
1044
1083
  end
1045
1084
  end
1046
1085
 
1047
- def self.apply_hvac(runner, hpxml, weather, convert_shared_systems)
1086
+ def self.apply_hvac(runner, hpxml_bldg, weather, convert_shared_systems)
1048
1087
  if convert_shared_systems
1049
- HVAC.apply_shared_systems(hpxml)
1088
+ HVAC.apply_shared_systems(hpxml_bldg)
1050
1089
  end
1051
1090
 
1052
1091
  # Convert negative values (e.g., -1) to nil as appropriate
1053
1092
  # This is needed to support autosizing in OS-ERI, where the capacities are required inputs
1054
- hpxml.hvac_systems.each do |hvac_system|
1093
+ hpxml_bldg.hvac_systems.each do |hvac_system|
1055
1094
  if hvac_system.respond_to?(:heating_capacity) && hvac_system.heating_capacity.to_f < 0
1056
1095
  hvac_system.heating_capacity = nil
1057
1096
  end
@@ -1067,7 +1106,7 @@ class HPXMLDefaults
1067
1106
  end
1068
1107
 
1069
1108
  # Convert SEER2/HSPF2 to SEER/HSPF
1070
- hpxml.cooling_systems.each do |cooling_system|
1109
+ hpxml_bldg.cooling_systems.each do |cooling_system|
1071
1110
  next unless [HPXML::HVACTypeCentralAirConditioner,
1072
1111
  HPXML::HVACTypeMiniSplitAirConditioner].include? cooling_system.cooling_system_type
1073
1112
  next unless cooling_system.cooling_efficiency_seer.nil?
@@ -1077,7 +1116,7 @@ class HPXMLDefaults
1077
1116
  cooling_system.cooling_efficiency_seer_isdefaulted = true
1078
1117
  cooling_system.cooling_efficiency_seer2 = nil
1079
1118
  end
1080
- hpxml.heat_pumps.each do |heat_pump|
1119
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1081
1120
  next unless [HPXML::HVACTypeHeatPumpAirToAir,
1082
1121
  HPXML::HVACTypeHeatPumpMiniSplit].include? heat_pump.heat_pump_type
1083
1122
  next unless heat_pump.cooling_efficiency_seer.nil?
@@ -1087,7 +1126,7 @@ class HPXMLDefaults
1087
1126
  heat_pump.cooling_efficiency_seer_isdefaulted = true
1088
1127
  heat_pump.cooling_efficiency_seer2 = nil
1089
1128
  end
1090
- hpxml.heat_pumps.each do |heat_pump|
1129
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1091
1130
  next unless [HPXML::HVACTypeHeatPumpAirToAir,
1092
1131
  HPXML::HVACTypeHeatPumpMiniSplit].include? heat_pump.heat_pump_type
1093
1132
  next unless heat_pump.heating_efficiency_hspf.nil?
@@ -1099,13 +1138,13 @@ class HPXMLDefaults
1099
1138
  end
1100
1139
 
1101
1140
  # Default AC/HP compressor type
1102
- hpxml.cooling_systems.each do |cooling_system|
1141
+ hpxml_bldg.cooling_systems.each do |cooling_system|
1103
1142
  next unless cooling_system.compressor_type.nil?
1104
1143
 
1105
1144
  cooling_system.compressor_type = HVAC.get_default_compressor_type(cooling_system.cooling_system_type, cooling_system.cooling_efficiency_seer)
1106
1145
  cooling_system.compressor_type_isdefaulted = true
1107
1146
  end
1108
- hpxml.heat_pumps.each do |heat_pump|
1147
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1109
1148
  next unless heat_pump.compressor_type.nil?
1110
1149
 
1111
1150
  heat_pump.compressor_type = HVAC.get_default_compressor_type(heat_pump.heat_pump_type, heat_pump.cooling_efficiency_seer)
@@ -1113,23 +1152,27 @@ class HPXMLDefaults
1113
1152
  end
1114
1153
 
1115
1154
  # Default HP heating capacity retention
1116
- hpxml.heat_pumps.each do |heat_pump|
1155
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1117
1156
  next unless heat_pump.heating_capacity_retention_fraction.nil?
1118
1157
  next unless heat_pump.heating_capacity_17F.nil?
1119
1158
  next if [HPXML::HVACTypeHeatPumpGroundToAir, HPXML::HVACTypeHeatPumpWaterLoopToAir].include? heat_pump.heat_pump_type
1120
1159
 
1121
- heat_pump.heating_capacity_retention_temp = 5.0
1122
- if [HPXML::HVACCompressorTypeSingleStage, HPXML::HVACCompressorTypeTwoStage].include? heat_pump.compressor_type
1123
- heat_pump.heating_capacity_retention_fraction = 0.425
1124
- elsif [HPXML::HVACCompressorTypeVariableSpeed].include? heat_pump.compressor_type
1125
- heat_pump.heating_capacity_retention_fraction = 0.5
1160
+ if not heat_pump.heating_detailed_performance_data.empty?
1161
+ # Calculate heating capacity retention at 5F outdoor drybulb
1162
+ target_odb = 5.0
1163
+ max_capacity_47 = heat_pump.heating_detailed_performance_data.find { |dp| dp.outdoor_temperature == HVAC::AirSourceHeatRatedODB && dp.capacity_description == HPXML::CapacityDescriptionMaximum }.capacity
1164
+ heat_pump.heating_capacity_retention_fraction = (HVAC.interpolate_to_odb_table_point(heat_pump.heating_detailed_performance_data, HPXML::CapacityDescriptionMaximum, target_odb, :capacity) / max_capacity_47).round(5)
1165
+ heat_pump.heating_capacity_retention_fraction = 0.0 if heat_pump.heating_capacity_retention_fraction < 0
1166
+ heat_pump.heating_capacity_retention_temp = target_odb
1167
+ else
1168
+ heat_pump.heating_capacity_retention_temp, heat_pump.heating_capacity_retention_fraction = HVAC.get_default_heating_capacity_retention(heat_pump.compressor_type, heat_pump.heating_efficiency_hspf)
1126
1169
  end
1127
1170
  heat_pump.heating_capacity_retention_fraction_isdefaulted = true
1128
1171
  heat_pump.heating_capacity_retention_temp_isdefaulted = true
1129
1172
  end
1130
1173
 
1131
1174
  # Default HP compressor lockout temp
1132
- hpxml.heat_pumps.each do |heat_pump|
1175
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1133
1176
  next unless heat_pump.compressor_lockout_temp.nil?
1134
1177
  next unless heat_pump.backup_heating_switchover_temp.nil?
1135
1178
  next if heat_pump.heat_pump_type == HPXML::HVACTypeHeatPumpGroundToAir
@@ -1153,7 +1196,7 @@ class HPXMLDefaults
1153
1196
  end
1154
1197
 
1155
1198
  # Default HP backup lockout temp
1156
- hpxml.heat_pumps.each do |heat_pump|
1199
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1157
1200
  next if heat_pump.backup_type.nil?
1158
1201
  next unless heat_pump.backup_heating_lockout_temp.nil?
1159
1202
  next unless heat_pump.backup_heating_switchover_temp.nil?
@@ -1173,7 +1216,7 @@ class HPXMLDefaults
1173
1216
  end
1174
1217
 
1175
1218
  # Default boiler EAE
1176
- hpxml.heating_systems.each do |heating_system|
1219
+ hpxml_bldg.heating_systems.each do |heating_system|
1177
1220
  next unless heating_system.electric_auxiliary_energy.nil?
1178
1221
 
1179
1222
  heating_system.electric_auxiliary_energy_isdefaulted = true
@@ -1184,7 +1227,7 @@ class HPXMLDefaults
1184
1227
  end
1185
1228
 
1186
1229
  # Default AC/HP sensible heat ratio
1187
- hpxml.cooling_systems.each do |cooling_system|
1230
+ hpxml_bldg.cooling_systems.each do |cooling_system|
1188
1231
  next unless cooling_system.cooling_shr.nil?
1189
1232
 
1190
1233
  if cooling_system.cooling_system_type == HPXML::HVACTypeCentralAirConditioner
@@ -1205,7 +1248,7 @@ class HPXMLDefaults
1205
1248
  cooling_system.cooling_shr_isdefaulted = true
1206
1249
  end
1207
1250
  end
1208
- hpxml.heat_pumps.each do |heat_pump|
1251
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1209
1252
  next unless heat_pump.cooling_shr.nil?
1210
1253
 
1211
1254
  if heat_pump.heat_pump_type == HPXML::HVACTypeHeatPumpAirToAir
@@ -1231,7 +1274,7 @@ class HPXMLDefaults
1231
1274
  end
1232
1275
 
1233
1276
  # GSHP pump power
1234
- hpxml.heat_pumps.each do |heat_pump|
1277
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1235
1278
  next unless heat_pump.heat_pump_type == HPXML::HVACTypeHeatPumpGroundToAir
1236
1279
  next unless heat_pump.pump_watts_per_ton.nil?
1237
1280
 
@@ -1240,7 +1283,7 @@ class HPXMLDefaults
1240
1283
  end
1241
1284
 
1242
1285
  # Charge defect ratio
1243
- hpxml.cooling_systems.each do |cooling_system|
1286
+ hpxml_bldg.cooling_systems.each do |cooling_system|
1244
1287
  next unless [HPXML::HVACTypeCentralAirConditioner,
1245
1288
  HPXML::HVACTypeMiniSplitAirConditioner].include? cooling_system.cooling_system_type
1246
1289
  next unless cooling_system.charge_defect_ratio.nil?
@@ -1248,7 +1291,7 @@ class HPXMLDefaults
1248
1291
  cooling_system.charge_defect_ratio = 0.0
1249
1292
  cooling_system.charge_defect_ratio_isdefaulted = true
1250
1293
  end
1251
- hpxml.heat_pumps.each do |heat_pump|
1294
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1252
1295
  next unless [HPXML::HVACTypeHeatPumpAirToAir,
1253
1296
  HPXML::HVACTypeHeatPumpMiniSplit,
1254
1297
  HPXML::HVACTypeHeatPumpGroundToAir].include? heat_pump.heat_pump_type
@@ -1259,14 +1302,14 @@ class HPXMLDefaults
1259
1302
  end
1260
1303
 
1261
1304
  # Airflow defect ratio
1262
- hpxml.heating_systems.each do |heating_system|
1305
+ hpxml_bldg.heating_systems.each do |heating_system|
1263
1306
  next unless [HPXML::HVACTypeFurnace].include? heating_system.heating_system_type
1264
1307
  next unless heating_system.airflow_defect_ratio.nil?
1265
1308
 
1266
1309
  heating_system.airflow_defect_ratio = 0.0
1267
1310
  heating_system.airflow_defect_ratio_isdefaulted = true
1268
1311
  end
1269
- hpxml.cooling_systems.each do |cooling_system|
1312
+ hpxml_bldg.cooling_systems.each do |cooling_system|
1270
1313
  next unless [HPXML::HVACTypeCentralAirConditioner,
1271
1314
  HPXML::HVACTypeMiniSplitAirConditioner].include? cooling_system.cooling_system_type
1272
1315
  next unless cooling_system.airflow_defect_ratio.nil?
@@ -1274,7 +1317,7 @@ class HPXMLDefaults
1274
1317
  cooling_system.airflow_defect_ratio = 0.0
1275
1318
  cooling_system.airflow_defect_ratio_isdefaulted = true
1276
1319
  end
1277
- hpxml.heat_pumps.each do |heat_pump|
1320
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1278
1321
  next unless [HPXML::HVACTypeHeatPumpAirToAir,
1279
1322
  HPXML::HVACTypeHeatPumpGroundToAir,
1280
1323
  HPXML::HVACTypeHeatPumpMiniSplit].include? heat_pump.heat_pump_type
@@ -1289,7 +1332,7 @@ class HPXMLDefaults
1289
1332
  ecm_watts_per_cfm = 0.375 # W/cfm, ECM fan
1290
1333
  mini_split_ductless_watts_per_cfm = 0.07 # W/cfm
1291
1334
  mini_split_ducted_watts_per_cfm = 0.18 # W/cfm
1292
- hpxml.heating_systems.each do |heating_system|
1335
+ hpxml_bldg.heating_systems.each do |heating_system|
1293
1336
  if [HPXML::HVACTypeFurnace].include? heating_system.heating_system_type
1294
1337
  if heating_system.fan_watts_per_cfm.nil?
1295
1338
  if (not heating_system.distribution_system.nil?) && (heating_system.distribution_system.air_type == HPXML::AirTypeGravity)
@@ -1308,8 +1351,7 @@ class HPXMLDefaults
1308
1351
  end
1309
1352
  elsif [HPXML::HVACTypeWallFurnace,
1310
1353
  HPXML::HVACTypeFloorFurnace,
1311
- HPXML::HVACTypePortableHeater,
1312
- HPXML::HVACTypeFixedHeater,
1354
+ HPXML::HVACTypeSpaceHeater,
1313
1355
  HPXML::HVACTypeFireplace].include? heating_system.heating_system_type
1314
1356
  if heating_system.fan_watts.nil?
1315
1357
  heating_system.fan_watts = 0.0 # W/cfm, assume no fan power
@@ -1317,7 +1359,7 @@ class HPXMLDefaults
1317
1359
  end
1318
1360
  end
1319
1361
  end
1320
- hpxml.cooling_systems.each do |cooling_system|
1362
+ hpxml_bldg.cooling_systems.each do |cooling_system|
1321
1363
  next unless cooling_system.fan_watts_per_cfm.nil?
1322
1364
 
1323
1365
  if (not cooling_system.attached_heating_system.nil?) && (not cooling_system.attached_heating_system.fan_watts_per_cfm.nil?)
@@ -1341,7 +1383,7 @@ class HPXMLDefaults
1341
1383
  # Depends on airflow rate, so defaulted in hvac_sizing.rb
1342
1384
  end
1343
1385
  end
1344
- hpxml.heat_pumps.each do |heat_pump|
1386
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1345
1387
  next unless heat_pump.fan_watts_per_cfm.nil?
1346
1388
 
1347
1389
  if [HPXML::HVACTypeHeatPumpAirToAir].include? heat_pump.heat_pump_type
@@ -1369,7 +1411,7 @@ class HPXMLDefaults
1369
1411
  end
1370
1412
 
1371
1413
  # Crankcase heater power [Watts]
1372
- hpxml.cooling_systems.each do |cooling_system|
1414
+ hpxml_bldg.cooling_systems.each do |cooling_system|
1373
1415
  next unless [HPXML::HVACTypeCentralAirConditioner, HPXML::HVACTypeMiniSplitAirConditioner, HPXML::HVACTypeRoomAirConditioner, HPXML::HVACTypePTAC].include? cooling_system.cooling_system_type
1374
1416
  next unless cooling_system.crankcase_heater_watts.nil?
1375
1417
 
@@ -1380,7 +1422,7 @@ class HPXMLDefaults
1380
1422
  end
1381
1423
  cooling_system.crankcase_heater_watts_isdefaulted = true
1382
1424
  end
1383
- hpxml.heat_pumps.each do |heat_pump|
1425
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1384
1426
  next unless [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit, HPXML::HVACTypeHeatPumpPTHP, HPXML::HVACTypeHeatPumpRoom].include? heat_pump.heat_pump_type
1385
1427
  next unless heat_pump.crankcase_heater_watts.nil?
1386
1428
 
@@ -1393,7 +1435,7 @@ class HPXMLDefaults
1393
1435
  end
1394
1436
 
1395
1437
  # Pilot Light
1396
- hpxml.heating_systems.each do |heating_system|
1438
+ hpxml_bldg.heating_systems.each do |heating_system|
1397
1439
  next unless [HPXML::HVACTypeFurnace,
1398
1440
  HPXML::HVACTypeWallFurnace,
1399
1441
  HPXML::HVACTypeFloorFurnace,
@@ -1412,9 +1454,10 @@ class HPXMLDefaults
1412
1454
  end
1413
1455
 
1414
1456
  # Detailed HVAC performance
1415
- hpxml.cooling_systems.each do |cooling_system|
1457
+ hpxml_bldg.cooling_systems.each do |cooling_system|
1416
1458
  clg_ap = cooling_system.additional_properties
1417
1459
  if [HPXML::HVACTypeCentralAirConditioner,
1460
+ HPXML::HVACTypeMiniSplitAirConditioner,
1418
1461
  HPXML::HVACTypeRoomAirConditioner,
1419
1462
  HPXML::HVACTypePTAC].include? cooling_system.cooling_system_type
1420
1463
  if [HPXML::HVACTypeRoomAirConditioner,
@@ -1424,43 +1467,26 @@ class HPXMLDefaults
1424
1467
  use_eer = false
1425
1468
  end
1426
1469
  # Note: We use HP cooling curve so that a central AC behaves the same.
1427
- HVAC.set_num_speeds(cooling_system)
1428
- HVAC.set_fan_power_rated(cooling_system) unless use_eer
1429
- HVAC.set_cool_c_d(cooling_system, clg_ap.num_speeds)
1430
- HVAC.set_cool_curves_central_air_source(cooling_system, use_eer)
1431
- HVAC.set_cool_rated_shrs_gross(runner, cooling_system)
1432
- HVAC.set_cool_rated_eirs(cooling_system) unless use_eer
1433
-
1434
- elsif [HPXML::HVACTypeMiniSplitAirConditioner].include? cooling_system.cooling_system_type
1435
- num_speeds = 10
1436
- HVAC.set_num_speeds(cooling_system)
1437
- HVAC.set_fan_power_rated(cooling_system)
1438
-
1439
- HVAC.set_cool_c_d(cooling_system, num_speeds)
1440
- HVAC.set_cool_curves_mshp(cooling_system, num_speeds)
1441
- HVAC.set_cool_rated_shrs_gross(runner, cooling_system)
1442
- HVAC.set_cool_rated_eirs_mshp(cooling_system, num_speeds)
1443
-
1444
- HVAC.set_mshp_downselected_speed_indices(cooling_system)
1470
+ HVAC.set_fan_power_rated(cooling_system, use_eer)
1471
+ HVAC.set_cool_curves_central_air_source(runner, cooling_system, use_eer)
1445
1472
 
1446
1473
  elsif [HPXML::HVACTypeEvaporativeCooler].include? cooling_system.cooling_system_type
1447
1474
  clg_ap.effectiveness = 0.72 # Assumption from HEScore
1448
1475
 
1449
1476
  end
1450
1477
  end
1451
- hpxml.heating_systems.each do |heating_system|
1478
+ hpxml_bldg.heating_systems.each do |heating_system|
1452
1479
  next unless [HPXML::HVACTypeStove,
1453
- HPXML::HVACTypePortableHeater,
1454
- HPXML::HVACTypeFixedHeater,
1480
+ HPXML::HVACTypeSpaceHeater,
1455
1481
  HPXML::HVACTypeWallFurnace,
1456
1482
  HPXML::HVACTypeFloorFurnace,
1457
1483
  HPXML::HVACTypeFireplace].include? heating_system.heating_system_type
1458
1484
 
1459
- heating_system.additional_properties.heat_rated_cfm_per_ton = HVAC.get_default_heat_cfm_per_ton(1, true)
1485
+ heating_system.additional_properties.heat_rated_cfm_per_ton = HVAC.get_default_heat_cfm_per_ton(HPXML::HVACCompressorTypeSingleStage, true)
1460
1486
  end
1461
- hpxml.heat_pumps.each do |heat_pump|
1462
- hp_ap = heat_pump.additional_properties
1487
+ hpxml_bldg.heat_pumps.each do |heat_pump|
1463
1488
  if [HPXML::HVACTypeHeatPumpAirToAir,
1489
+ HPXML::HVACTypeHeatPumpMiniSplit,
1464
1490
  HPXML::HVACTypeHeatPumpPTHP,
1465
1491
  HPXML::HVACTypeHeatPumpRoom].include? heat_pump.heat_pump_type
1466
1492
  if [HPXML::HVACTypeHeatPumpPTHP, HPXML::HVACTypeHeatPumpRoom].include? heat_pump.heat_pump_type
@@ -1468,35 +1494,10 @@ class HPXMLDefaults
1468
1494
  else
1469
1495
  use_eer_cop = false
1470
1496
  end
1471
- HVAC.set_num_speeds(heat_pump)
1472
- HVAC.set_fan_power_rated(heat_pump) unless use_eer_cop
1497
+ HVAC.set_fan_power_rated(heat_pump, use_eer_cop)
1473
1498
  HVAC.set_heat_pump_temperatures(heat_pump, runner)
1474
-
1475
- HVAC.set_cool_c_d(heat_pump, hp_ap.num_speeds)
1476
- HVAC.set_cool_curves_central_air_source(heat_pump, use_eer_cop)
1477
- HVAC.set_cool_rated_shrs_gross(runner, heat_pump)
1478
- HVAC.set_cool_rated_eirs(heat_pump) unless use_eer_cop
1479
-
1480
- HVAC.set_heat_c_d(heat_pump, hp_ap.num_speeds)
1499
+ HVAC.set_cool_curves_central_air_source(runner, heat_pump, use_eer_cop)
1481
1500
  HVAC.set_heat_curves_central_air_source(heat_pump, use_eer_cop)
1482
- HVAC.set_heat_rated_eirs(heat_pump) unless use_eer_cop
1483
-
1484
- elsif [HPXML::HVACTypeHeatPumpMiniSplit].include? heat_pump.heat_pump_type
1485
- num_speeds = 10
1486
- HVAC.set_num_speeds(heat_pump)
1487
- HVAC.set_fan_power_rated(heat_pump)
1488
- HVAC.set_heat_pump_temperatures(heat_pump, runner)
1489
-
1490
- HVAC.set_cool_c_d(heat_pump, num_speeds)
1491
- HVAC.set_cool_curves_mshp(heat_pump, num_speeds)
1492
- HVAC.set_cool_rated_shrs_gross(runner, heat_pump)
1493
- HVAC.set_cool_rated_eirs_mshp(heat_pump, num_speeds)
1494
-
1495
- HVAC.set_heat_c_d(heat_pump, num_speeds)
1496
- HVAC.set_heat_curves_mshp(heat_pump, num_speeds)
1497
- HVAC.set_heat_rated_eirs_mshp(heat_pump, num_speeds)
1498
-
1499
- HVAC.set_mshp_downselected_speed_indices(heat_pump)
1500
1501
 
1501
1502
  elsif [HPXML::HVACTypeHeatPumpGroundToAir].include? heat_pump.heat_pump_type
1502
1503
  HVAC.set_gshp_assumptions(heat_pump, weather)
@@ -1509,8 +1510,47 @@ class HPXMLDefaults
1509
1510
  end
1510
1511
  end
1511
1512
 
1512
- def self.apply_hvac_control(hpxml, schedules_file)
1513
- hpxml.hvac_controls.each do |hvac_control|
1513
+ def self.apply_detailed_performance_data_for_var_speed_systems(hpxml_bldg)
1514
+ (hpxml_bldg.cooling_systems + hpxml_bldg.heat_pumps).each do |hvac_system|
1515
+ is_hp = hvac_system.is_a? HPXML::HeatPump
1516
+ system_type = is_hp ? hvac_system.heat_pump_type : hvac_system.cooling_system_type
1517
+ next unless [HPXML::HVACTypeCentralAirConditioner,
1518
+ HPXML::HVACTypeMiniSplitAirConditioner,
1519
+ HPXML::HVACTypeHeatPumpAirToAir,
1520
+ HPXML::HVACTypeHeatPumpMiniSplit].include? system_type
1521
+
1522
+ next unless hvac_system.compressor_type == HPXML::HVACCompressorTypeVariableSpeed
1523
+
1524
+ HVAC.drop_intermediate_speeds(hvac_system)
1525
+
1526
+ hvac_ap = hvac_system.additional_properties
1527
+ if hvac_system.cooling_detailed_performance_data.empty?
1528
+ HVAC.set_cool_detailed_performance_data(hvac_system)
1529
+ else
1530
+ # override some properties based on detailed performance data
1531
+ cool_rated_capacity = [hvac_system.cooling_capacity, 1.0].max
1532
+ cool_max_capacity = [hvac_system.cooling_detailed_performance_data.find { |dp| (dp.outdoor_temperature == HVAC::AirSourceCoolRatedODB) && (dp.capacity_description == HPXML::CapacityDescriptionMaximum) }.capacity, 1.0].max
1533
+ cool_min_capacity = [hvac_system.cooling_detailed_performance_data.find { |dp| (dp.outdoor_temperature == HVAC::AirSourceCoolRatedODB) && (dp.capacity_description == HPXML::CapacityDescriptionMinimum) }.capacity, 1.0].max
1534
+ hvac_ap.cool_capacity_ratios = [cool_min_capacity / cool_rated_capacity, cool_max_capacity / cool_rated_capacity]
1535
+ hvac_ap.cool_fan_speed_ratios = HVAC.calc_fan_speed_ratios(hvac_ap.cool_capacity_ratios, hvac_ap.cool_rated_cfm_per_ton, hvac_ap.cool_rated_airflow_rate)
1536
+ end
1537
+ if is_hp
1538
+ if hvac_system.heating_detailed_performance_data.empty?
1539
+ HVAC.set_heat_detailed_performance_data(hvac_system)
1540
+ else
1541
+ # override some properties based on detailed performance data
1542
+ heat_rated_capacity = [hvac_system.heating_capacity, 1.0].max
1543
+ heat_max_capacity = [hvac_system.heating_detailed_performance_data.find { |dp| (dp.outdoor_temperature == HVAC::AirSourceHeatRatedODB) && (dp.capacity_description == HPXML::CapacityDescriptionMaximum) }.capacity, 1.0].max
1544
+ heat_min_capacity = [hvac_system.heating_detailed_performance_data.find { |dp| (dp.outdoor_temperature == HVAC::AirSourceHeatRatedODB) && (dp.capacity_description == HPXML::CapacityDescriptionMinimum) }.capacity, 1.0].max
1545
+ hvac_ap.heat_capacity_ratios = [heat_min_capacity / heat_rated_capacity, heat_max_capacity / heat_rated_capacity]
1546
+ hvac_ap.heat_fan_speed_ratios = HVAC.calc_fan_speed_ratios(hvac_ap.heat_capacity_ratios, hvac_ap.heat_rated_cfm_per_ton, hvac_ap.heat_rated_airflow_rate)
1547
+ end
1548
+ end
1549
+ end
1550
+ end
1551
+
1552
+ def self.apply_hvac_control(hpxml_bldg, schedules_file)
1553
+ hpxml_bldg.hvac_controls.each do |hvac_control|
1514
1554
  schedules_file_includes_heating_setpoint_temp = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnHeatingSetpoint))
1515
1555
  if hvac_control.heating_setpoint_temp.nil? && hvac_control.weekday_heating_setpoints.nil? && !schedules_file_includes_heating_setpoint_temp
1516
1556
  # No heating setpoints; set a default heating setpoint for, e.g., natural ventilation
@@ -1563,8 +1603,8 @@ class HPXMLDefaults
1563
1603
  end
1564
1604
  end
1565
1605
 
1566
- def self.apply_hvac_distribution(hpxml, ncfl, ncfl_ag)
1567
- hpxml.hvac_distributions.each do |hvac_distribution|
1606
+ def self.apply_hvac_distribution(hpxml_bldg, ncfl, ncfl_ag)
1607
+ hpxml_bldg.hvac_distributions.each do |hvac_distribution|
1568
1608
  next unless hvac_distribution.distribution_system_type == HPXML::HVACDistributionTypeAir
1569
1609
  next if hvac_distribution.ducts.empty?
1570
1610
 
@@ -1585,8 +1625,8 @@ class HPXMLDefaults
1585
1625
  [supply_ducts, return_ducts].each do |ducts|
1586
1626
  ducts.each do |duct|
1587
1627
  primary_duct_area, secondary_duct_area = HVAC.get_default_duct_surface_area(duct.duct_type, ncfl_ag, cfa_served, n_returns).map { |area| area / ducts.size }
1588
- primary_duct_location, secondary_duct_location = HVAC.get_default_duct_locations(hpxml)
1589
- if primary_duct_location.nil? # If a home doesn't have any non-living spaces (outside living space), place all ducts in living space.
1628
+ primary_duct_location, secondary_duct_location = HVAC.get_default_duct_locations(hpxml_bldg)
1629
+ if primary_duct_location.nil? # If a home doesn't have any unconditioned spaces, place all ducts in conditioned space.
1590
1630
  duct.duct_surface_area = primary_duct_area + secondary_duct_area
1591
1631
  duct.duct_surface_area_isdefaulted = true
1592
1632
  duct.duct_location = secondary_duct_location
@@ -1630,10 +1670,18 @@ class HPXMLDefaults
1630
1670
  next unless duct.duct_fraction_area.nil?
1631
1671
 
1632
1672
  if duct.duct_type == HPXML::DuctTypeSupply
1633
- duct.duct_fraction_area = (duct.duct_surface_area / total_supply_area).round(3)
1673
+ if total_supply_area > 0
1674
+ duct.duct_fraction_area = (duct.duct_surface_area / total_supply_area).round(3)
1675
+ else
1676
+ duct.duct_fraction_area = (1.0 / supply_ducts.size).round(3) # Arbitrary
1677
+ end
1634
1678
  duct.duct_fraction_area_isdefaulted = true
1635
1679
  elsif duct.duct_type == HPXML::DuctTypeReturn
1636
- duct.duct_fraction_area = (duct.duct_surface_area / total_return_area).round(3)
1680
+ if total_return_area > 0
1681
+ duct.duct_fraction_area = (duct.duct_surface_area / total_return_area).round(3)
1682
+ else
1683
+ duct.duct_fraction_area = (1.0 / return_ducts.size).round(3) # Arbitrary
1684
+ end
1637
1685
  duct.duct_fraction_area_isdefaulted = true
1638
1686
  end
1639
1687
  end
@@ -1663,9 +1711,9 @@ class HPXMLDefaults
1663
1711
  end
1664
1712
  end
1665
1713
 
1666
- def self.apply_hvac_location(hpxml)
1714
+ def self.apply_hvac_location(hpxml_bldg)
1667
1715
  # This needs to come after we have applied defaults for ducts
1668
- hpxml.hvac_systems.each do |hvac_system|
1716
+ hpxml_bldg.hvac_systems.each do |hvac_system|
1669
1717
  next unless hvac_system.location.nil?
1670
1718
 
1671
1719
  hvac_system.location_isdefaulted = true
@@ -1673,7 +1721,7 @@ class HPXMLDefaults
1673
1721
  # Set default location based on distribution system
1674
1722
  dist_system = hvac_system.distribution_system
1675
1723
  if dist_system.nil?
1676
- hvac_system.location = HPXML::LocationLivingSpace
1724
+ hvac_system.location = HPXML::LocationConditionedSpace
1677
1725
  else
1678
1726
  dist_type = dist_system.distribution_system_type
1679
1727
  if dist_type == HPXML::HVACDistributionTypeAir
@@ -1687,7 +1735,7 @@ class HPXMLDefaults
1687
1735
  uncond_duct_locations[d.duct_location] += d.duct_surface_area
1688
1736
  end
1689
1737
  if uncond_duct_locations.empty?
1690
- hvac_system.location = HPXML::LocationLivingSpace
1738
+ hvac_system.location = HPXML::LocationConditionedSpace
1691
1739
  else
1692
1740
  hvac_system.location = uncond_duct_locations.key(uncond_duct_locations.values.max)
1693
1741
  if hvac_system.location == HPXML::LocationOutside
@@ -1697,7 +1745,7 @@ class HPXMLDefaults
1697
1745
  end
1698
1746
  elsif dist_type == HPXML::HVACDistributionTypeHydronic
1699
1747
  # Assume same default logic as a water heater
1700
- hvac_system.location = Waterheater.get_default_location(hpxml, hpxml.climate_and_risk_zones.climate_zone_ieccs[0])
1748
+ hvac_system.location = Waterheater.get_default_location(hpxml_bldg, hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0])
1701
1749
  elsif dist_type == HPXML::HVACDistributionTypeDSE
1702
1750
  # DSE=1 implies distribution system in conditioned space
1703
1751
  has_dse_of_one = true
@@ -1708,7 +1756,7 @@ class HPXMLDefaults
1708
1756
  has_dse_of_one = false
1709
1757
  end
1710
1758
  if has_dse_of_one
1711
- hvac_system.location = HPXML::LocationLivingSpace
1759
+ hvac_system.location = HPXML::LocationConditionedSpace
1712
1760
  else
1713
1761
  hvac_system.location = HPXML::LocationUnconditionedSpace
1714
1762
  end
@@ -1717,9 +1765,9 @@ class HPXMLDefaults
1717
1765
  end
1718
1766
  end
1719
1767
 
1720
- def self.apply_ventilation_fans(hpxml, weather, cfa, nbeds)
1768
+ def self.apply_ventilation_fans(hpxml_bldg, weather, cfa, nbeds)
1721
1769
  # Default mech vent systems
1722
- hpxml.ventilation_fans.each do |vent_fan|
1770
+ hpxml_bldg.ventilation_fans.each do |vent_fan|
1723
1771
  next unless vent_fan.used_for_whole_building_ventilation
1724
1772
 
1725
1773
  if vent_fan.is_shared_system.nil?
@@ -1731,11 +1779,11 @@ class HPXMLDefaults
1731
1779
  vent_fan.hours_in_operation_isdefaulted = true
1732
1780
  end
1733
1781
  if vent_fan.rated_flow_rate.nil? && vent_fan.tested_flow_rate.nil? && vent_fan.calculated_flow_rate.nil? && vent_fan.delivered_ventilation.nil?
1734
- if hpxml.ventilation_fans.select { |vf| vf.used_for_whole_building_ventilation && !vf.is_cfis_supplemental_fan? }.size > 1
1782
+ if hpxml_bldg.ventilation_fans.select { |vf| vf.used_for_whole_building_ventilation && !vf.is_cfis_supplemental_fan? }.size > 1
1735
1783
  fail 'Defaulting flow rates for multiple mechanical ventilation systems is currently not supported.'
1736
1784
  end
1737
1785
 
1738
- vent_fan.rated_flow_rate = Airflow.get_default_mech_vent_flow_rate(hpxml, vent_fan, weather, cfa, nbeds).round(1)
1786
+ vent_fan.rated_flow_rate = Airflow.get_default_mech_vent_flow_rate(hpxml_bldg, vent_fan, weather, cfa, nbeds).round(1)
1739
1787
  vent_fan.rated_flow_rate_isdefaulted = true
1740
1788
  end
1741
1789
  if vent_fan.fan_power.nil?
@@ -1755,7 +1803,7 @@ class HPXMLDefaults
1755
1803
  end
1756
1804
 
1757
1805
  # Default kitchen fan
1758
- hpxml.ventilation_fans.each do |vent_fan|
1806
+ hpxml_bldg.ventilation_fans.each do |vent_fan|
1759
1807
  next unless (vent_fan.used_for_local_ventilation && (vent_fan.fan_location == HPXML::LocationKitchen))
1760
1808
 
1761
1809
  if vent_fan.count.nil?
@@ -1781,11 +1829,11 @@ class HPXMLDefaults
1781
1829
  end
1782
1830
 
1783
1831
  # Default bath fans
1784
- hpxml.ventilation_fans.each do |vent_fan|
1832
+ hpxml_bldg.ventilation_fans.each do |vent_fan|
1785
1833
  next unless (vent_fan.used_for_local_ventilation && (vent_fan.fan_location == HPXML::LocationBath))
1786
1834
 
1787
1835
  if vent_fan.count.nil?
1788
- vent_fan.count = hpxml.building_construction.number_of_bathrooms
1836
+ vent_fan.count = hpxml_bldg.building_construction.number_of_bathrooms
1789
1837
  vent_fan.count_isdefaulted = true
1790
1838
  end
1791
1839
  if vent_fan.rated_flow_rate.nil? && vent_fan.tested_flow_rate.nil? && vent_fan.calculated_flow_rate.nil? && vent_fan.delivered_ventilation.nil?
@@ -1807,7 +1855,7 @@ class HPXMLDefaults
1807
1855
  end
1808
1856
 
1809
1857
  # Default whole house fan
1810
- hpxml.ventilation_fans.each do |vent_fan|
1858
+ hpxml_bldg.ventilation_fans.each do |vent_fan|
1811
1859
  next unless vent_fan.used_for_seasonal_cooling_load_reduction
1812
1860
 
1813
1861
  if vent_fan.rated_flow_rate.nil? && vent_fan.tested_flow_rate.nil? && vent_fan.calculated_flow_rate.nil? && vent_fan.delivered_ventilation.nil?
@@ -1821,8 +1869,8 @@ class HPXMLDefaults
1821
1869
  end
1822
1870
  end
1823
1871
 
1824
- def self.apply_water_heaters(hpxml, nbeds, eri_version, schedules_file)
1825
- hpxml.water_heating_systems.each do |water_heating_system|
1872
+ def self.apply_water_heaters(hpxml_bldg, nbeds, eri_version, schedules_file)
1873
+ hpxml_bldg.water_heating_systems.each do |water_heating_system|
1826
1874
  if water_heating_system.is_shared_system.nil?
1827
1875
  water_heating_system.is_shared_system = false
1828
1876
  water_heating_system.is_shared_system_isdefaulted = true
@@ -1849,11 +1897,11 @@ class HPXMLDefaults
1849
1897
  end
1850
1898
  if (water_heating_system.water_heater_type == HPXML::WaterHeaterTypeStorage)
1851
1899
  if water_heating_system.heating_capacity.nil?
1852
- water_heating_system.heating_capacity = (Waterheater.get_default_heating_capacity(water_heating_system.fuel_type, nbeds, hpxml.water_heating_systems.size, hpxml.building_construction.number_of_bathrooms) * 1000.0).round
1900
+ water_heating_system.heating_capacity = (Waterheater.get_default_heating_capacity(water_heating_system.fuel_type, nbeds, hpxml_bldg.water_heating_systems.size, hpxml_bldg.building_construction.number_of_bathrooms) * 1000.0).round
1853
1901
  water_heating_system.heating_capacity_isdefaulted = true
1854
1902
  end
1855
1903
  if water_heating_system.tank_volume.nil?
1856
- water_heating_system.tank_volume = Waterheater.get_default_tank_volume(water_heating_system.fuel_type, nbeds, hpxml.building_construction.number_of_bathrooms)
1904
+ water_heating_system.tank_volume = Waterheater.get_default_tank_volume(water_heating_system.fuel_type, nbeds, hpxml_bldg.building_construction.number_of_bathrooms)
1857
1905
  water_heating_system.tank_volume_isdefaulted = true
1858
1906
  end
1859
1907
  if water_heating_system.recovery_efficiency.nil?
@@ -1873,7 +1921,7 @@ class HPXMLDefaults
1873
1921
  end
1874
1922
  end
1875
1923
  if water_heating_system.location.nil?
1876
- water_heating_system.location = Waterheater.get_default_location(hpxml, hpxml.climate_and_risk_zones.climate_zone_ieccs[0])
1924
+ water_heating_system.location = Waterheater.get_default_location(hpxml_bldg, hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0])
1877
1925
  water_heating_system.location_isdefaulted = true
1878
1926
  end
1879
1927
  next unless water_heating_system.usage_bin.nil? && (not water_heating_system.uniform_energy_factor.nil?) # FHR & UsageBin only applies to UEF
@@ -1887,18 +1935,18 @@ class HPXMLDefaults
1887
1935
  end
1888
1936
  end
1889
1937
 
1890
- def self.apply_flue_or_chimney(hpxml)
1938
+ def self.apply_flue_or_chimney(hpxml_bldg)
1891
1939
  # This needs to come after we have applied defaults for HVAC/DHW systems
1892
- if hpxml.air_infiltration.has_flue_or_chimney_in_conditioned_space.nil?
1893
- hpxml.air_infiltration.has_flue_or_chimney_in_conditioned_space = get_default_flue_or_chimney_in_conditioned_space(hpxml)
1894
- hpxml.air_infiltration.has_flue_or_chimney_in_conditioned_space_isdefaulted = true
1940
+ if hpxml_bldg.air_infiltration.has_flue_or_chimney_in_conditioned_space.nil?
1941
+ hpxml_bldg.air_infiltration.has_flue_or_chimney_in_conditioned_space = get_default_flue_or_chimney_in_conditioned_space(hpxml_bldg)
1942
+ hpxml_bldg.air_infiltration.has_flue_or_chimney_in_conditioned_space_isdefaulted = true
1895
1943
  end
1896
1944
  end
1897
1945
 
1898
- def self.apply_hot_water_distribution(hpxml, cfa, ncfl, has_uncond_bsmnt)
1899
- return if hpxml.hot_water_distributions.size == 0
1946
+ def self.apply_hot_water_distribution(hpxml_bldg, cfa, ncfl, has_uncond_bsmnt)
1947
+ return if hpxml_bldg.hot_water_distributions.size == 0
1900
1948
 
1901
- hot_water_distribution = hpxml.hot_water_distributions[0]
1949
+ hot_water_distribution = hpxml_bldg.hot_water_distributions[0]
1902
1950
 
1903
1951
  if hot_water_distribution.pipe_r_value.nil?
1904
1952
  hot_water_distribution.pipe_r_value = 0.0
@@ -1933,30 +1981,39 @@ class HPXMLDefaults
1933
1981
  end
1934
1982
  end
1935
1983
 
1936
- def self.apply_water_fixtures(hpxml, schedules_file)
1937
- return if hpxml.hot_water_distributions.size == 0
1984
+ def self.apply_water_fixtures(hpxml_bldg, schedules_file)
1985
+ return if hpxml_bldg.hot_water_distributions.size == 0
1986
+
1987
+ hpxml_bldg.water_fixtures.each do |wf|
1988
+ next unless [HPXML::WaterFixtureTypeShowerhead, HPXML::WaterFixtureTypeFaucet].include? wf.water_fixture_type
1989
+
1990
+ if wf.low_flow.nil?
1991
+ wf.low_flow = (wf.flow_rate <= 2.0)
1992
+ wf.low_flow_isdefaulted = true
1993
+ end
1994
+ end
1938
1995
 
1939
- if hpxml.water_heating.water_fixtures_usage_multiplier.nil?
1940
- hpxml.water_heating.water_fixtures_usage_multiplier = 1.0
1941
- hpxml.water_heating.water_fixtures_usage_multiplier_isdefaulted = true
1996
+ if hpxml_bldg.water_heating.water_fixtures_usage_multiplier.nil?
1997
+ hpxml_bldg.water_heating.water_fixtures_usage_multiplier = 1.0
1998
+ hpxml_bldg.water_heating.water_fixtures_usage_multiplier_isdefaulted = true
1942
1999
  end
1943
2000
  schedules_file_includes_fixtures = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnHotWaterFixtures))
1944
- if hpxml.water_heating.water_fixtures_weekday_fractions.nil? && !schedules_file_includes_fixtures
1945
- hpxml.water_heating.water_fixtures_weekday_fractions = Schedule.FixturesWeekdayFractions
1946
- hpxml.water_heating.water_fixtures_weekday_fractions_isdefaulted = true
2001
+ if hpxml_bldg.water_heating.water_fixtures_weekday_fractions.nil? && !schedules_file_includes_fixtures
2002
+ hpxml_bldg.water_heating.water_fixtures_weekday_fractions = Schedule.FixturesWeekdayFractions
2003
+ hpxml_bldg.water_heating.water_fixtures_weekday_fractions_isdefaulted = true
1947
2004
  end
1948
- if hpxml.water_heating.water_fixtures_weekend_fractions.nil? && !schedules_file_includes_fixtures
1949
- hpxml.water_heating.water_fixtures_weekend_fractions = Schedule.FixturesWeekendFractions
1950
- hpxml.water_heating.water_fixtures_weekend_fractions_isdefaulted = true
2005
+ if hpxml_bldg.water_heating.water_fixtures_weekend_fractions.nil? && !schedules_file_includes_fixtures
2006
+ hpxml_bldg.water_heating.water_fixtures_weekend_fractions = Schedule.FixturesWeekendFractions
2007
+ hpxml_bldg.water_heating.water_fixtures_weekend_fractions_isdefaulted = true
1951
2008
  end
1952
- if hpxml.water_heating.water_fixtures_monthly_multipliers.nil? && !schedules_file_includes_fixtures
1953
- hpxml.water_heating.water_fixtures_monthly_multipliers = Schedule.FixturesMonthlyMultipliers
1954
- hpxml.water_heating.water_fixtures_monthly_multipliers_isdefaulted = true
2009
+ if hpxml_bldg.water_heating.water_fixtures_monthly_multipliers.nil? && !schedules_file_includes_fixtures
2010
+ hpxml_bldg.water_heating.water_fixtures_monthly_multipliers = Schedule.FixturesMonthlyMultipliers
2011
+ hpxml_bldg.water_heating.water_fixtures_monthly_multipliers_isdefaulted = true
1955
2012
  end
1956
2013
  end
1957
2014
 
1958
- def self.apply_solar_thermal_systems(hpxml)
1959
- hpxml.solar_thermal_systems.each do |solar_thermal_system|
2015
+ def self.apply_solar_thermal_systems(hpxml_bldg)
2016
+ hpxml_bldg.solar_thermal_systems.each do |solar_thermal_system|
1960
2017
  if solar_thermal_system.collector_azimuth.nil?
1961
2018
  solar_thermal_system.collector_azimuth = get_azimuth_from_orientation(solar_thermal_system.collector_orientation)
1962
2019
  solar_thermal_system.collector_azimuth_isdefaulted = true
@@ -1972,8 +2029,8 @@ class HPXMLDefaults
1972
2029
  end
1973
2030
  end
1974
2031
 
1975
- def self.apply_pv_systems(hpxml)
1976
- hpxml.pv_systems.each do |pv_system|
2032
+ def self.apply_pv_systems(hpxml_bldg)
2033
+ hpxml_bldg.pv_systems.each do |pv_system|
1977
2034
  if pv_system.array_azimuth.nil?
1978
2035
  pv_system.array_azimuth = get_azimuth_from_orientation(pv_system.array_orientation)
1979
2036
  pv_system.array_azimuth_isdefaulted = true
@@ -2003,7 +2060,7 @@ class HPXMLDefaults
2003
2060
  pv_system.system_losses_fraction_isdefaulted = true
2004
2061
  end
2005
2062
  end
2006
- hpxml.inverters.each do |inverter|
2063
+ hpxml_bldg.inverters.each do |inverter|
2007
2064
  if inverter.inverter_efficiency.nil?
2008
2065
  inverter.inverter_efficiency = PV.get_default_inv_eff()
2009
2066
  inverter.inverter_efficiency_isdefaulted = true
@@ -2011,8 +2068,8 @@ class HPXMLDefaults
2011
2068
  end
2012
2069
  end
2013
2070
 
2014
- def self.apply_generators(hpxml)
2015
- hpxml.generators.each do |generator|
2071
+ def self.apply_generators(hpxml_bldg)
2072
+ hpxml_bldg.generators.each do |generator|
2016
2073
  if generator.is_shared_system.nil?
2017
2074
  generator.is_shared_system = false
2018
2075
  generator.is_shared_system_isdefaulted = true
@@ -2020,9 +2077,9 @@ class HPXMLDefaults
2020
2077
  end
2021
2078
  end
2022
2079
 
2023
- def self.apply_batteries(hpxml)
2024
- default_values = Battery.get_battery_default_values(hpxml.has_location(HPXML::LocationGarage))
2025
- hpxml.batteries.each do |battery|
2080
+ def self.apply_batteries(hpxml_bldg)
2081
+ default_values = Battery.get_battery_default_values(hpxml_bldg.has_location(HPXML::LocationGarage))
2082
+ hpxml_bldg.batteries.each do |battery|
2026
2083
  if battery.location.nil?
2027
2084
  battery.location = default_values[:location]
2028
2085
  battery.location_isdefaulted = true
@@ -2077,16 +2134,16 @@ class HPXMLDefaults
2077
2134
  end
2078
2135
  end
2079
2136
 
2080
- def self.apply_appliances(hpxml, nbeds, eri_version, schedules_file)
2137
+ def self.apply_appliances(hpxml_bldg, nbeds, eri_version, schedules_file)
2081
2138
  # Default clothes washer
2082
- if hpxml.clothes_washers.size > 0
2083
- clothes_washer = hpxml.clothes_washers[0]
2139
+ if hpxml_bldg.clothes_washers.size > 0
2140
+ clothes_washer = hpxml_bldg.clothes_washers[0]
2084
2141
  if clothes_washer.is_shared_appliance.nil?
2085
2142
  clothes_washer.is_shared_appliance = false
2086
2143
  clothes_washer.is_shared_appliance_isdefaulted = true
2087
2144
  end
2088
2145
  if clothes_washer.location.nil?
2089
- clothes_washer.location = HPXML::LocationLivingSpace
2146
+ clothes_washer.location = HPXML::LocationConditionedSpace
2090
2147
  clothes_washer.location_isdefaulted = true
2091
2148
  end
2092
2149
  if clothes_washer.rated_annual_kwh.nil?
@@ -2126,14 +2183,14 @@ class HPXMLDefaults
2126
2183
  end
2127
2184
 
2128
2185
  # Default clothes dryer
2129
- if hpxml.clothes_dryers.size > 0
2130
- clothes_dryer = hpxml.clothes_dryers[0]
2186
+ if hpxml_bldg.clothes_dryers.size > 0
2187
+ clothes_dryer = hpxml_bldg.clothes_dryers[0]
2131
2188
  if clothes_dryer.is_shared_appliance.nil?
2132
2189
  clothes_dryer.is_shared_appliance = false
2133
2190
  clothes_dryer.is_shared_appliance_isdefaulted = true
2134
2191
  end
2135
2192
  if clothes_dryer.location.nil?
2136
- clothes_dryer.location = HPXML::LocationLivingSpace
2193
+ clothes_dryer.location = HPXML::LocationConditionedSpace
2137
2194
  clothes_dryer.location_isdefaulted = true
2138
2195
  end
2139
2196
  if clothes_dryer.combined_energy_factor.nil? && clothes_dryer.energy_factor.nil?
@@ -2174,14 +2231,14 @@ class HPXMLDefaults
2174
2231
  end
2175
2232
 
2176
2233
  # Default dishwasher
2177
- if hpxml.dishwashers.size > 0
2178
- dishwasher = hpxml.dishwashers[0]
2234
+ if hpxml_bldg.dishwashers.size > 0
2235
+ dishwasher = hpxml_bldg.dishwashers[0]
2179
2236
  if dishwasher.is_shared_appliance.nil?
2180
2237
  dishwasher.is_shared_appliance = false
2181
2238
  dishwasher.is_shared_appliance_isdefaulted = true
2182
2239
  end
2183
2240
  if dishwasher.location.nil?
2184
- dishwasher.location = HPXML::LocationLivingSpace
2241
+ dishwasher.location = HPXML::LocationConditionedSpace
2185
2242
  dishwasher.location_isdefaulted = true
2186
2243
  end
2187
2244
  if dishwasher.place_setting_capacity.nil?
@@ -2219,14 +2276,14 @@ class HPXMLDefaults
2219
2276
  end
2220
2277
 
2221
2278
  # Default refrigerators
2222
- if hpxml.refrigerators.size == 1
2223
- hpxml.refrigerators[0].primary_indicator = true
2224
- hpxml.refrigerators[0].primary_indicator_isdefaulted = true
2279
+ if hpxml_bldg.refrigerators.size == 1
2280
+ hpxml_bldg.refrigerators[0].primary_indicator = true
2281
+ hpxml_bldg.refrigerators[0].primary_indicator_isdefaulted = true
2225
2282
  end
2226
- hpxml.refrigerators.each do |refrigerator|
2283
+ hpxml_bldg.refrigerators.each do |refrigerator|
2227
2284
  if not refrigerator.primary_indicator # extra refrigerator
2228
2285
  if refrigerator.location.nil?
2229
- refrigerator.location = HotWaterAndAppliances.get_default_extra_refrigerator_and_freezer_locations(hpxml)
2286
+ refrigerator.location = HotWaterAndAppliances.get_default_extra_refrigerator_and_freezer_locations(hpxml_bldg)
2230
2287
  refrigerator.location_isdefaulted = true
2231
2288
  end
2232
2289
  if refrigerator.rated_annual_kwh.nil?
@@ -2249,7 +2306,7 @@ class HPXMLDefaults
2249
2306
  end
2250
2307
  else # primary refrigerator
2251
2308
  if refrigerator.location.nil?
2252
- refrigerator.location = HPXML::LocationLivingSpace
2309
+ refrigerator.location = HPXML::LocationConditionedSpace
2253
2310
  refrigerator.location_isdefaulted = true
2254
2311
  end
2255
2312
  if refrigerator.rated_annual_kwh.nil?
@@ -2278,9 +2335,9 @@ class HPXMLDefaults
2278
2335
  end
2279
2336
 
2280
2337
  # Default freezer
2281
- hpxml.freezers.each do |freezer|
2338
+ hpxml_bldg.freezers.each do |freezer|
2282
2339
  if freezer.location.nil?
2283
- freezer.location = HotWaterAndAppliances.get_default_extra_refrigerator_and_freezer_locations(hpxml)
2340
+ freezer.location = HotWaterAndAppliances.get_default_extra_refrigerator_and_freezer_locations(hpxml_bldg)
2284
2341
  freezer.location_isdefaulted = true
2285
2342
  end
2286
2343
  if freezer.rated_annual_kwh.nil?
@@ -2308,10 +2365,10 @@ class HPXMLDefaults
2308
2365
  end
2309
2366
 
2310
2367
  # Default cooking range
2311
- if hpxml.cooking_ranges.size > 0
2312
- cooking_range = hpxml.cooking_ranges[0]
2368
+ if hpxml_bldg.cooking_ranges.size > 0
2369
+ cooking_range = hpxml_bldg.cooking_ranges[0]
2313
2370
  if cooking_range.location.nil?
2314
- cooking_range.location = HPXML::LocationLivingSpace
2371
+ cooking_range.location = HPXML::LocationConditionedSpace
2315
2372
  cooking_range.location_isdefaulted = true
2316
2373
  end
2317
2374
  if cooking_range.is_induction.nil?
@@ -2339,8 +2396,8 @@ class HPXMLDefaults
2339
2396
  end
2340
2397
 
2341
2398
  # Default oven
2342
- if hpxml.ovens.size > 0
2343
- oven = hpxml.ovens[0]
2399
+ if hpxml_bldg.ovens.size > 0
2400
+ oven = hpxml_bldg.ovens[0]
2344
2401
  if oven.is_convection.nil?
2345
2402
  default_values = HotWaterAndAppliances.get_range_oven_default_values()
2346
2403
  oven.is_convection = default_values[:is_convection]
@@ -2349,91 +2406,91 @@ class HPXMLDefaults
2349
2406
  end
2350
2407
  end
2351
2408
 
2352
- def self.apply_lighting(hpxml, schedules_file)
2353
- return if hpxml.lighting_groups.empty?
2409
+ def self.apply_lighting(hpxml_bldg, schedules_file)
2410
+ return if hpxml_bldg.lighting_groups.empty?
2354
2411
 
2355
- if hpxml.lighting.interior_usage_multiplier.nil?
2356
- hpxml.lighting.interior_usage_multiplier = 1.0
2357
- hpxml.lighting.interior_usage_multiplier_isdefaulted = true
2412
+ if hpxml_bldg.lighting.interior_usage_multiplier.nil?
2413
+ hpxml_bldg.lighting.interior_usage_multiplier = 1.0
2414
+ hpxml_bldg.lighting.interior_usage_multiplier_isdefaulted = true
2358
2415
  end
2359
- if hpxml.lighting.garage_usage_multiplier.nil?
2360
- hpxml.lighting.garage_usage_multiplier = 1.0
2361
- hpxml.lighting.garage_usage_multiplier_isdefaulted = true
2416
+ if hpxml_bldg.lighting.garage_usage_multiplier.nil?
2417
+ hpxml_bldg.lighting.garage_usage_multiplier = 1.0
2418
+ hpxml_bldg.lighting.garage_usage_multiplier_isdefaulted = true
2362
2419
  end
2363
- if hpxml.lighting.exterior_usage_multiplier.nil?
2364
- hpxml.lighting.exterior_usage_multiplier = 1.0
2365
- hpxml.lighting.exterior_usage_multiplier_isdefaulted = true
2420
+ if hpxml_bldg.lighting.exterior_usage_multiplier.nil?
2421
+ hpxml_bldg.lighting.exterior_usage_multiplier = 1.0
2422
+ hpxml_bldg.lighting.exterior_usage_multiplier_isdefaulted = true
2366
2423
  end
2367
2424
  # Schedules from T24 2016 Residential ACM Appendix C Table 8 Exterior Lighting Hourly Multiplier (Weekdays and weekends)
2368
2425
  default_exterior_lighting_weekday_fractions = Schedule.LightingExteriorWeekdayFractions
2369
2426
  default_exterior_lighting_weekend_fractions = Schedule.LightingExteriorWeekendFractions
2370
2427
  default_exterior_lighting_monthly_multipliers = Schedule.LightingExteriorMonthlyMultipliers
2371
- if hpxml.has_location(HPXML::LocationGarage)
2428
+ if hpxml_bldg.has_location(HPXML::LocationGarage)
2372
2429
  schedules_file_includes_lighting_garage = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnLightingGarage))
2373
- if hpxml.lighting.garage_weekday_fractions.nil? && !schedules_file_includes_lighting_garage
2374
- hpxml.lighting.garage_weekday_fractions = default_exterior_lighting_weekday_fractions
2375
- hpxml.lighting.garage_weekday_fractions_isdefaulted = true
2430
+ if hpxml_bldg.lighting.garage_weekday_fractions.nil? && !schedules_file_includes_lighting_garage
2431
+ hpxml_bldg.lighting.garage_weekday_fractions = default_exterior_lighting_weekday_fractions
2432
+ hpxml_bldg.lighting.garage_weekday_fractions_isdefaulted = true
2376
2433
  end
2377
- if hpxml.lighting.garage_weekend_fractions.nil? && !schedules_file_includes_lighting_garage
2378
- hpxml.lighting.garage_weekend_fractions = default_exterior_lighting_weekend_fractions
2379
- hpxml.lighting.garage_weekend_fractions_isdefaulted = true
2434
+ if hpxml_bldg.lighting.garage_weekend_fractions.nil? && !schedules_file_includes_lighting_garage
2435
+ hpxml_bldg.lighting.garage_weekend_fractions = default_exterior_lighting_weekend_fractions
2436
+ hpxml_bldg.lighting.garage_weekend_fractions_isdefaulted = true
2380
2437
  end
2381
- if hpxml.lighting.garage_monthly_multipliers.nil? && !schedules_file_includes_lighting_garage
2382
- hpxml.lighting.garage_monthly_multipliers = default_exterior_lighting_monthly_multipliers
2383
- hpxml.lighting.garage_monthly_multipliers_isdefaulted = true
2438
+ if hpxml_bldg.lighting.garage_monthly_multipliers.nil? && !schedules_file_includes_lighting_garage
2439
+ hpxml_bldg.lighting.garage_monthly_multipliers = default_exterior_lighting_monthly_multipliers
2440
+ hpxml_bldg.lighting.garage_monthly_multipliers_isdefaulted = true
2384
2441
  end
2385
2442
  end
2386
2443
  schedules_file_includes_lighting_exterior = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnLightingExterior))
2387
- if hpxml.lighting.exterior_weekday_fractions.nil? && !schedules_file_includes_lighting_exterior
2388
- hpxml.lighting.exterior_weekday_fractions = default_exterior_lighting_weekday_fractions
2389
- hpxml.lighting.exterior_weekday_fractions_isdefaulted = true
2444
+ if hpxml_bldg.lighting.exterior_weekday_fractions.nil? && !schedules_file_includes_lighting_exterior
2445
+ hpxml_bldg.lighting.exterior_weekday_fractions = default_exterior_lighting_weekday_fractions
2446
+ hpxml_bldg.lighting.exterior_weekday_fractions_isdefaulted = true
2390
2447
  end
2391
- if hpxml.lighting.exterior_weekend_fractions.nil? && !schedules_file_includes_lighting_exterior
2392
- hpxml.lighting.exterior_weekend_fractions = default_exterior_lighting_weekend_fractions
2393
- hpxml.lighting.exterior_weekend_fractions_isdefaulted = true
2448
+ if hpxml_bldg.lighting.exterior_weekend_fractions.nil? && !schedules_file_includes_lighting_exterior
2449
+ hpxml_bldg.lighting.exterior_weekend_fractions = default_exterior_lighting_weekend_fractions
2450
+ hpxml_bldg.lighting.exterior_weekend_fractions_isdefaulted = true
2394
2451
  end
2395
- if hpxml.lighting.exterior_monthly_multipliers.nil? && !schedules_file_includes_lighting_exterior
2396
- hpxml.lighting.exterior_monthly_multipliers = default_exterior_lighting_monthly_multipliers
2397
- hpxml.lighting.exterior_monthly_multipliers_isdefaulted = true
2452
+ if hpxml_bldg.lighting.exterior_monthly_multipliers.nil? && !schedules_file_includes_lighting_exterior
2453
+ hpxml_bldg.lighting.exterior_monthly_multipliers = default_exterior_lighting_monthly_multipliers
2454
+ hpxml_bldg.lighting.exterior_monthly_multipliers_isdefaulted = true
2398
2455
  end
2399
- if hpxml.lighting.holiday_exists
2400
- if hpxml.lighting.holiday_kwh_per_day.nil?
2456
+ if hpxml_bldg.lighting.holiday_exists
2457
+ if hpxml_bldg.lighting.holiday_kwh_per_day.nil?
2401
2458
  # From LA100 repo (2017)
2402
- if hpxml.building_construction.residential_facility_type == HPXML::ResidentialTypeSFD
2403
- hpxml.lighting.holiday_kwh_per_day = 1.1
2459
+ if hpxml_bldg.building_construction.residential_facility_type == HPXML::ResidentialTypeSFD
2460
+ hpxml_bldg.lighting.holiday_kwh_per_day = 1.1
2404
2461
  else # Multifamily and others
2405
- hpxml.lighting.holiday_kwh_per_day = 0.55
2462
+ hpxml_bldg.lighting.holiday_kwh_per_day = 0.55
2406
2463
  end
2407
- hpxml.lighting.holiday_kwh_per_day_isdefaulted = true
2464
+ hpxml_bldg.lighting.holiday_kwh_per_day_isdefaulted = true
2408
2465
  end
2409
- if hpxml.lighting.holiday_period_begin_month.nil?
2410
- hpxml.lighting.holiday_period_begin_month = 11
2411
- hpxml.lighting.holiday_period_begin_month_isdefaulted = true
2412
- hpxml.lighting.holiday_period_begin_day = 24
2413
- hpxml.lighting.holiday_period_begin_day_isdefaulted = true
2466
+ if hpxml_bldg.lighting.holiday_period_begin_month.nil?
2467
+ hpxml_bldg.lighting.holiday_period_begin_month = 11
2468
+ hpxml_bldg.lighting.holiday_period_begin_month_isdefaulted = true
2469
+ hpxml_bldg.lighting.holiday_period_begin_day = 24
2470
+ hpxml_bldg.lighting.holiday_period_begin_day_isdefaulted = true
2414
2471
  end
2415
- if hpxml.lighting.holiday_period_end_day.nil?
2416
- hpxml.lighting.holiday_period_end_month = 1
2417
- hpxml.lighting.holiday_period_end_month_isdefaulted = true
2418
- hpxml.lighting.holiday_period_end_day = 6
2419
- hpxml.lighting.holiday_period_end_day_isdefaulted = true
2472
+ if hpxml_bldg.lighting.holiday_period_end_day.nil?
2473
+ hpxml_bldg.lighting.holiday_period_end_month = 1
2474
+ hpxml_bldg.lighting.holiday_period_end_month_isdefaulted = true
2475
+ hpxml_bldg.lighting.holiday_period_end_day = 6
2476
+ hpxml_bldg.lighting.holiday_period_end_day_isdefaulted = true
2420
2477
  end
2421
2478
  schedules_file_includes_lighting_holiday_exterior = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnLightingExteriorHoliday))
2422
- if hpxml.lighting.holiday_weekday_fractions.nil? && !schedules_file_includes_lighting_holiday_exterior
2423
- hpxml.lighting.holiday_weekday_fractions = Schedule.LightingExteriorHolidayWeekdayFractions
2424
- hpxml.lighting.holiday_weekday_fractions_isdefaulted = true
2479
+ if hpxml_bldg.lighting.holiday_weekday_fractions.nil? && !schedules_file_includes_lighting_holiday_exterior
2480
+ hpxml_bldg.lighting.holiday_weekday_fractions = Schedule.LightingExteriorHolidayWeekdayFractions
2481
+ hpxml_bldg.lighting.holiday_weekday_fractions_isdefaulted = true
2425
2482
  end
2426
- if hpxml.lighting.holiday_weekend_fractions.nil? && !schedules_file_includes_lighting_holiday_exterior
2427
- hpxml.lighting.holiday_weekend_fractions = Schedule.LightingExteriorHolidayWeekendFractions
2428
- hpxml.lighting.holiday_weekend_fractions_isdefaulted = true
2483
+ if hpxml_bldg.lighting.holiday_weekend_fractions.nil? && !schedules_file_includes_lighting_holiday_exterior
2484
+ hpxml_bldg.lighting.holiday_weekend_fractions = Schedule.LightingExteriorHolidayWeekendFractions
2485
+ hpxml_bldg.lighting.holiday_weekend_fractions_isdefaulted = true
2429
2486
  end
2430
2487
  end
2431
2488
  end
2432
2489
 
2433
- def self.apply_ceiling_fans(hpxml, nbeds, weather, schedules_file)
2434
- return if hpxml.ceiling_fans.size == 0
2490
+ def self.apply_ceiling_fans(hpxml_bldg, nbeds, weather, schedules_file)
2491
+ return if hpxml_bldg.ceiling_fans.size == 0
2435
2492
 
2436
- ceiling_fan = hpxml.ceiling_fans[0]
2493
+ ceiling_fan = hpxml_bldg.ceiling_fans[0]
2437
2494
  if ceiling_fan.efficiency.nil?
2438
2495
  medium_cfm = 3000.0
2439
2496
  ceiling_fan.efficiency = medium_cfm / HVAC.get_default_ceiling_fan_power()
@@ -2458,9 +2515,9 @@ class HPXMLDefaults
2458
2515
  end
2459
2516
  end
2460
2517
 
2461
- def self.apply_pools_and_hot_tubs(hpxml, cfa, schedules_file)
2462
- nbeds = hpxml.building_construction.additional_properties.adjusted_number_of_bedrooms
2463
- hpxml.pools.each do |pool|
2518
+ def self.apply_pools_and_permanent_spas(hpxml_bldg, cfa, schedules_file)
2519
+ nbeds = hpxml_bldg.building_construction.additional_properties.adjusted_number_of_bedrooms
2520
+ hpxml_bldg.pools.each do |pool|
2464
2521
  next if pool.type == HPXML::TypeNone
2465
2522
 
2466
2523
  if pool.pump_type != HPXML::TypeNone
@@ -2516,66 +2573,66 @@ class HPXMLDefaults
2516
2573
  end
2517
2574
  end
2518
2575
 
2519
- hpxml.hot_tubs.each do |hot_tub|
2520
- next if hot_tub.type == HPXML::TypeNone
2576
+ hpxml_bldg.permanent_spas.each do |spa|
2577
+ next if spa.type == HPXML::TypeNone
2521
2578
 
2522
- if hot_tub.pump_type != HPXML::TypeNone
2579
+ if spa.pump_type != HPXML::TypeNone
2523
2580
  # Pump
2524
- if hot_tub.pump_kwh_per_year.nil?
2525
- hot_tub.pump_kwh_per_year = MiscLoads.get_hot_tub_pump_default_values(cfa, nbeds)
2526
- hot_tub.pump_kwh_per_year_isdefaulted = true
2581
+ if spa.pump_kwh_per_year.nil?
2582
+ spa.pump_kwh_per_year = MiscLoads.get_permanent_spa_pump_default_values(cfa, nbeds)
2583
+ spa.pump_kwh_per_year_isdefaulted = true
2527
2584
  end
2528
- if hot_tub.pump_usage_multiplier.nil?
2529
- hot_tub.pump_usage_multiplier = 1.0
2530
- hot_tub.pump_usage_multiplier_isdefaulted = true
2585
+ if spa.pump_usage_multiplier.nil?
2586
+ spa.pump_usage_multiplier = 1.0
2587
+ spa.pump_usage_multiplier_isdefaulted = true
2531
2588
  end
2532
- schedules_file_includes_hot_tub_pump = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnHotTubPump))
2533
- if hot_tub.pump_weekday_fractions.nil? && !schedules_file_includes_hot_tub_pump
2534
- hot_tub.pump_weekday_fractions = Schedule.HotTubPumpWeekdayFractions
2535
- hot_tub.pump_weekday_fractions_isdefaulted = true
2589
+ schedules_file_includes_permanent_spa_pump = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnPermanentSpaPump))
2590
+ if spa.pump_weekday_fractions.nil? && !schedules_file_includes_permanent_spa_pump
2591
+ spa.pump_weekday_fractions = Schedule.PermanentSpaPumpWeekdayFractions
2592
+ spa.pump_weekday_fractions_isdefaulted = true
2536
2593
  end
2537
- if hot_tub.pump_weekend_fractions.nil? && !schedules_file_includes_hot_tub_pump
2538
- hot_tub.pump_weekend_fractions = Schedule.HotTubPumpWeekendFractions
2539
- hot_tub.pump_weekend_fractions_isdefaulted = true
2594
+ if spa.pump_weekend_fractions.nil? && !schedules_file_includes_permanent_spa_pump
2595
+ spa.pump_weekend_fractions = Schedule.PermanentSpaPumpWeekendFractions
2596
+ spa.pump_weekend_fractions_isdefaulted = true
2540
2597
  end
2541
- if hot_tub.pump_monthly_multipliers.nil? && !schedules_file_includes_hot_tub_pump
2542
- hot_tub.pump_monthly_multipliers = Schedule.HotTubPumpMonthlyMultipliers
2543
- hot_tub.pump_monthly_multipliers_isdefaulted = true
2598
+ if spa.pump_monthly_multipliers.nil? && !schedules_file_includes_permanent_spa_pump
2599
+ spa.pump_monthly_multipliers = Schedule.PermanentSpaPumpMonthlyMultipliers
2600
+ spa.pump_monthly_multipliers_isdefaulted = true
2544
2601
  end
2545
2602
  end
2546
2603
 
2547
- next unless hot_tub.heater_type != HPXML::TypeNone
2604
+ next unless spa.heater_type != HPXML::TypeNone
2548
2605
 
2549
2606
  # Heater
2550
- if hot_tub.heater_load_value.nil?
2551
- default_heater_load_units, default_heater_load_value = MiscLoads.get_hot_tub_heater_default_values(cfa, nbeds, hot_tub.heater_type)
2552
- hot_tub.heater_load_units = default_heater_load_units
2553
- hot_tub.heater_load_value = default_heater_load_value
2554
- hot_tub.heater_load_value_isdefaulted = true
2607
+ if spa.heater_load_value.nil?
2608
+ default_heater_load_units, default_heater_load_value = MiscLoads.get_permanent_spa_heater_default_values(cfa, nbeds, spa.heater_type)
2609
+ spa.heater_load_units = default_heater_load_units
2610
+ spa.heater_load_value = default_heater_load_value
2611
+ spa.heater_load_value_isdefaulted = true
2555
2612
  end
2556
- if hot_tub.heater_usage_multiplier.nil?
2557
- hot_tub.heater_usage_multiplier = 1.0
2558
- hot_tub.heater_usage_multiplier_isdefaulted = true
2613
+ if spa.heater_usage_multiplier.nil?
2614
+ spa.heater_usage_multiplier = 1.0
2615
+ spa.heater_usage_multiplier_isdefaulted = true
2559
2616
  end
2560
- schedules_file_includes_hot_tub_heater = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnHotTubHeater))
2561
- if hot_tub.heater_weekday_fractions.nil? && !schedules_file_includes_hot_tub_heater
2562
- hot_tub.heater_weekday_fractions = Schedule.HotTubHeaterWeekdayFractions
2563
- hot_tub.heater_weekday_fractions_isdefaulted = true
2617
+ schedules_file_includes_permanent_spa_heater = (schedules_file.nil? ? false : schedules_file.includes_col_name(SchedulesFile::ColumnPermanentSpaHeater))
2618
+ if spa.heater_weekday_fractions.nil? && !schedules_file_includes_permanent_spa_heater
2619
+ spa.heater_weekday_fractions = Schedule.PermanentSpaHeaterWeekdayFractions
2620
+ spa.heater_weekday_fractions_isdefaulted = true
2564
2621
  end
2565
- if hot_tub.heater_weekend_fractions.nil? && !schedules_file_includes_hot_tub_heater
2566
- hot_tub.heater_weekend_fractions = Schedule.HotTubHeaterWeekendFractions
2567
- hot_tub.heater_weekend_fractions_isdefaulted = true
2622
+ if spa.heater_weekend_fractions.nil? && !schedules_file_includes_permanent_spa_heater
2623
+ spa.heater_weekend_fractions = Schedule.PermanentSpaHeaterWeekendFractions
2624
+ spa.heater_weekend_fractions_isdefaulted = true
2568
2625
  end
2569
- if hot_tub.heater_monthly_multipliers.nil? && !schedules_file_includes_hot_tub_heater
2570
- hot_tub.heater_monthly_multipliers = Schedule.HotTubHeaterMonthlyMultipliers
2571
- hot_tub.heater_monthly_multipliers_isdefaulted = true
2626
+ if spa.heater_monthly_multipliers.nil? && !schedules_file_includes_permanent_spa_heater
2627
+ spa.heater_monthly_multipliers = Schedule.PermanentSpaHeaterMonthlyMultipliers
2628
+ spa.heater_monthly_multipliers_isdefaulted = true
2572
2629
  end
2573
2630
  end
2574
2631
  end
2575
2632
 
2576
- def self.apply_plug_loads(hpxml, cfa, schedules_file)
2577
- nbeds = hpxml.building_construction.additional_properties.adjusted_number_of_bedrooms
2578
- hpxml.plug_loads.each do |plug_load|
2633
+ def self.apply_plug_loads(hpxml_bldg, cfa, schedules_file)
2634
+ nbeds = hpxml_bldg.building_construction.additional_properties.adjusted_number_of_bedrooms
2635
+ hpxml_bldg.plug_loads.each do |plug_load|
2579
2636
  if plug_load.plug_load_type == HPXML::PlugLoadTypeOther
2580
2637
  default_annual_kwh, default_sens_frac, default_lat_frac = MiscLoads.get_residual_mels_default_values(cfa)
2581
2638
  if plug_load.kwh_per_year.nil?
@@ -2692,9 +2749,9 @@ class HPXMLDefaults
2692
2749
  end
2693
2750
  end
2694
2751
 
2695
- def self.apply_fuel_loads(hpxml, cfa, schedules_file)
2696
- nbeds = hpxml.building_construction.additional_properties.adjusted_number_of_bedrooms
2697
- hpxml.fuel_loads.each do |fuel_load|
2752
+ def self.apply_fuel_loads(hpxml_bldg, cfa, schedules_file)
2753
+ nbeds = hpxml_bldg.building_construction.additional_properties.adjusted_number_of_bedrooms
2754
+ hpxml_bldg.fuel_loads.each do |fuel_load|
2698
2755
  if fuel_load.fuel_load_type == HPXML::FuelLoadTypeGrill
2699
2756
  if fuel_load.therm_per_year.nil?
2700
2757
  fuel_load.therm_per_year = MiscLoads.get_gas_grill_default_values(cfa, nbeds)
@@ -2781,13 +2838,13 @@ class HPXMLDefaults
2781
2838
  end
2782
2839
  end
2783
2840
 
2784
- def self.apply_hvac_sizing(hpxml, weather, cfa)
2785
- hvac_systems = HVAC.get_hpxml_hvac_systems(hpxml)
2841
+ def self.apply_hvac_sizing(hpxml_bldg, weather, cfa)
2842
+ hvac_systems = HVAC.get_hpxml_hvac_systems(hpxml_bldg)
2786
2843
 
2787
2844
  # Calculate building design loads and equipment capacities/airflows
2788
- bldg_design_loads, all_hvac_sizing_values = HVACSizing.calculate(weather, hpxml, cfa, hvac_systems)
2845
+ bldg_design_loads, all_hvac_sizing_values = HVACSizing.calculate(weather, hpxml_bldg, cfa, hvac_systems)
2789
2846
 
2790
- hvacpl = hpxml.hvac_plant
2847
+ hvacpl = hpxml_bldg.hvac_plant
2791
2848
  tol = 10 # Btuh
2792
2849
 
2793
2850
  # Assign heating design loads to HPXML object
@@ -2854,17 +2911,28 @@ class HPXMLDefaults
2854
2911
 
2855
2912
  # Heating capacities
2856
2913
  if htg_sys.heating_capacity.nil? || ((htg_sys.heating_capacity - hvac_sizing_values.Heat_Capacity).abs >= 1.0)
2914
+ scaling_factor = hvac_sizing_values.Heat_Capacity.round / htg_sys.heating_capacity unless htg_sys.heating_capacity.nil?
2857
2915
  # Heating capacity @ 17F
2858
2916
  if htg_sys.is_a? HPXML::HeatPump
2859
2917
  if (not htg_sys.heating_capacity.nil?) && (not htg_sys.heating_capacity_17F.nil?)
2860
2918
  # Fixed value entered; scale w/ heating_capacity in case allow_increased_fixed_capacities=true
2861
- htg_cap_17f = htg_sys.heating_capacity_17F * hvac_sizing_values.Heat_Capacity.round / htg_sys.heating_capacity
2919
+ htg_cap_17f = htg_sys.heating_capacity_17F * scaling_factor
2862
2920
  if (htg_sys.heating_capacity_17F - htg_cap_17f).abs >= 1.0
2863
2921
  htg_sys.heating_capacity_17F = htg_cap_17f.round
2864
2922
  htg_sys.heating_capacity_17F_isdefaulted = true
2865
2923
  end
2866
2924
  end
2867
2925
  end
2926
+ if not htg_sys.heating_detailed_performance_data.empty?
2927
+ # Fixed values entered; Scale w/ heating_capacity in case allow_increased_fixed_capacities=true
2928
+ htg_sys.heating_detailed_performance_data.each do |dp|
2929
+ htg_cap_dp = dp.capacity * scaling_factor
2930
+ if (dp.capacity - htg_cap_dp).abs >= 1.0
2931
+ dp.capacity = htg_cap_dp.round
2932
+ dp.capacity_isdefaulted = true
2933
+ end
2934
+ end
2935
+ end
2868
2936
  htg_sys.heating_capacity = hvac_sizing_values.Heat_Capacity.round
2869
2937
  htg_sys.heating_capacity_isdefaulted = true
2870
2938
  end
@@ -2897,10 +2965,21 @@ class HPXMLDefaults
2897
2965
  end
2898
2966
 
2899
2967
  # Cooling system
2900
- next unless not clg_sys.nil?
2968
+ next if clg_sys.nil?
2901
2969
 
2902
2970
  # Cooling capacities
2903
2971
  if clg_sys.cooling_capacity.nil? || ((clg_sys.cooling_capacity - hvac_sizing_values.Cool_Capacity).abs >= 1.0)
2972
+ if not clg_sys.cooling_detailed_performance_data.empty?
2973
+ scaling_factor = hvac_sizing_values.Cool_Capacity.round / clg_sys.cooling_capacity unless clg_sys.cooling_capacity.nil?
2974
+ # Fixed values entered; Scale w/ cooling_capacity in case allow_increased_fixed_capacities=true
2975
+ clg_sys.cooling_detailed_performance_data.each do |dp|
2976
+ clg_cap_dp = dp.capacity * scaling_factor
2977
+ if (dp.capacity - clg_cap_dp).abs >= 1.0
2978
+ dp.capacity = clg_cap_dp.round
2979
+ dp.capacity_isdefaulted = true
2980
+ end
2981
+ end
2982
+ end
2904
2983
  clg_sys.cooling_capacity = hvac_sizing_values.Cool_Capacity.round
2905
2984
  clg_sys.cooling_capacity_isdefaulted = true
2906
2985
  end
@@ -2967,9 +3046,9 @@ class HPXMLDefaults
2967
3046
  end
2968
3047
  end
2969
3048
 
2970
- def self.get_nbeds_adjusted_for_operational_calculation(hpxml)
2971
- n_occs = hpxml.building_occupancy.number_of_residents
2972
- unit_type = hpxml.building_construction.residential_facility_type
3049
+ def self.get_nbeds_adjusted_for_operational_calculation(hpxml_bldg)
3050
+ n_occs = hpxml_bldg.building_occupancy.number_of_residents
3051
+ unit_type = hpxml_bldg.building_construction.residential_facility_type
2973
3052
  if [HPXML::ResidentialTypeApartment, HPXML::ResidentialTypeSFA].include? unit_type
2974
3053
  return -0.68 + 1.09 * n_occs
2975
3054
  elsif [HPXML::ResidentialTypeSFD, HPXML::ResidentialTypeManufactured].include? unit_type
@@ -2979,9 +3058,9 @@ class HPXMLDefaults
2979
3058
  end
2980
3059
  end
2981
3060
 
2982
- def self.get_default_flue_or_chimney_in_conditioned_space(hpxml)
3061
+ def self.get_default_flue_or_chimney_in_conditioned_space(hpxml_bldg)
2983
3062
  # Check for atmospheric heating system in conditioned space
2984
- hpxml.heating_systems.each do |heating_system|
3063
+ hpxml_bldg.heating_systems.each do |heating_system|
2985
3064
  next unless HPXML::conditioned_locations_this_unit.include? heating_system.location
2986
3065
 
2987
3066
  if [HPXML::HVACTypeFurnace,
@@ -2989,7 +3068,7 @@ class HPXMLDefaults
2989
3068
  HPXML::HVACTypeWallFurnace,
2990
3069
  HPXML::HVACTypeFloorFurnace,
2991
3070
  HPXML::HVACTypeStove,
2992
- HPXML::HVACTypeFixedHeater].include? heating_system.heating_system_type
3071
+ HPXML::HVACTypeSpaceHeater].include? heating_system.heating_system_type
2993
3072
  if not heating_system.heating_efficiency_afue.nil?
2994
3073
  next if heating_system.heating_efficiency_afue >= 0.89
2995
3074
  elsif not heating_system.heating_efficiency_percent.nil?
@@ -3005,7 +3084,7 @@ class HPXMLDefaults
3005
3084
  end
3006
3085
 
3007
3086
  # Check for atmospheric water heater in conditioned space
3008
- hpxml.water_heating_systems.each do |water_heating_system|
3087
+ hpxml_bldg.water_heating_systems.each do |water_heating_system|
3009
3088
  next unless HPXML::conditioned_locations_this_unit.include? water_heating_system.location
3010
3089
 
3011
3090
  if not water_heating_system.energy_factor.nil?