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,12 +1,17 @@
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 HVACSizing
4
- def self.calculate(weather, hpxml, cfa, hvac_systems)
9
+ def self.calculate(weather, hpxml_bldg, cfa, hvac_systems)
5
10
  # Calculates heating/cooling design loads, and selects equipment
6
11
  # values (e.g., capacities, airflows) specific to each HVAC system.
7
12
  # Calculations generally follow ACCA Manual J/S.
8
13
 
9
- @hpxml = hpxml
14
+ @hpxml_bldg = hpxml_bldg
10
15
  @cfa = cfa
11
16
 
12
17
  process_site_calcs_and_design_temps(weather)
@@ -83,14 +88,14 @@ class HVACSizing
83
88
  @daily_range_temp_adjust = [4, 0, -5]
84
89
 
85
90
  # Manual J inside conditions
86
- @cool_setpoint = @hpxml.header.manualj_cooling_setpoint
87
- @heat_setpoint = @hpxml.header.manualj_heating_setpoint
91
+ @cool_setpoint = @hpxml_bldg.header.manualj_cooling_setpoint
92
+ @heat_setpoint = @hpxml_bldg.header.manualj_heating_setpoint
88
93
 
89
94
  @cool_design_grains = UnitConversions.convert(weather.design.CoolingHumidityRatio, 'lbm/lbm', 'grains')
90
95
 
91
96
  # Calculate the design temperature differences
92
- @ctd = [@hpxml.header.manualj_cooling_design_temp - @cool_setpoint, 0.0].max
93
- @htd = [@heat_setpoint - @hpxml.header.manualj_heating_design_temp, 0.0].max
97
+ @ctd = [@hpxml_bldg.header.manualj_cooling_design_temp - @cool_setpoint, 0.0].max
98
+ @htd = [@heat_setpoint - @hpxml_bldg.header.manualj_heating_design_temp, 0.0].max
94
99
 
95
100
  # Calculate the average Daily Temperature Range (DTR) to determine the class (low, medium, high)
96
101
  dtr = weather.design.DailyTemperatureRange
@@ -124,7 +129,7 @@ class HVACSizing
124
129
 
125
130
  # Inside air density
126
131
  avg_setpoint = (@cool_setpoint + @heat_setpoint) / 2.0
127
- @inside_air_dens = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * (avg_setpoint + 460.0))
132
+ @inside_air_dens = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * UnitConversions.convert(avg_setpoint, 'F', 'R'))
128
133
 
129
134
  # Design Temperatures
130
135
 
@@ -132,11 +137,11 @@ class HVACSizing
132
137
  @heat_design_temps = {}
133
138
 
134
139
  locations = []
135
- (@hpxml.roofs + @hpxml.rim_joists + @hpxml.walls + @hpxml.foundation_walls + @hpxml.floors + @hpxml.slabs).each do |surface|
140
+ (@hpxml_bldg.roofs + @hpxml_bldg.rim_joists + @hpxml_bldg.walls + @hpxml_bldg.foundation_walls + @hpxml_bldg.floors + @hpxml_bldg.slabs).each do |surface|
136
141
  locations << surface.interior_adjacent_to
137
142
  locations << surface.exterior_adjacent_to
138
143
  end
139
- @hpxml.hvac_distributions.each do |hvac_dist|
144
+ @hpxml_bldg.hvac_distributions.each do |hvac_dist|
140
145
  hvac_dist.ducts.each do |duct|
141
146
  locations << duct.duct_location
142
147
  end
@@ -146,15 +151,16 @@ class HVACSizing
146
151
  next if [HPXML::LocationGround].include? location
147
152
 
148
153
  if [HPXML::LocationOtherHousingUnit, HPXML::LocationOtherHeatedSpace, HPXML::LocationOtherMultifamilyBufferSpace,
149
- HPXML::LocationOtherNonFreezingSpace, HPXML::LocationExteriorWall, HPXML::LocationUnderSlab].include? location
150
- @cool_design_temps[location] = calculate_scheduled_space_design_temps(location, @cool_setpoint, @hpxml.header.manualj_cooling_design_temp, weather.data.GroundMonthlyTemps.max)
151
- @heat_design_temps[location] = calculate_scheduled_space_design_temps(location, @heat_setpoint, @hpxml.header.manualj_heating_design_temp, weather.data.GroundMonthlyTemps.min)
152
- elsif [HPXML::LocationOutside, HPXML::LocationRoofDeck].include? location
153
- @cool_design_temps[location] = @hpxml.header.manualj_cooling_design_temp
154
- @heat_design_temps[location] = @hpxml.header.manualj_heating_design_temp
154
+ HPXML::LocationOtherNonFreezingSpace, HPXML::LocationExteriorWall, HPXML::LocationUnderSlab,
155
+ HPXML::LocationManufacturedHomeBelly].include? location
156
+ @cool_design_temps[location] = calculate_scheduled_space_design_temps(location, @cool_setpoint, @hpxml_bldg.header.manualj_cooling_design_temp, weather.data.ShallowGroundMonthlyTemps.max)
157
+ @heat_design_temps[location] = calculate_scheduled_space_design_temps(location, @heat_setpoint, @hpxml_bldg.header.manualj_heating_design_temp, weather.data.ShallowGroundMonthlyTemps.min)
158
+ elsif [HPXML::LocationOutside, HPXML::LocationRoofDeck, HPXML::LocationManufacturedHomeUnderBelly].include? location
159
+ @cool_design_temps[location] = @hpxml_bldg.header.manualj_cooling_design_temp
160
+ @heat_design_temps[location] = @hpxml_bldg.header.manualj_heating_design_temp
155
161
  elsif HPXML::conditioned_locations.include? location
156
- @cool_design_temps[location] = process_design_temp_cooling(weather, HPXML::LocationLivingSpace)
157
- @heat_design_temps[location] = process_design_temp_heating(weather, HPXML::LocationLivingSpace)
162
+ @cool_design_temps[location] = process_design_temp_cooling(weather, HPXML::LocationConditionedSpace)
163
+ @heat_design_temps[location] = process_design_temp_heating(weather, HPXML::LocationConditionedSpace)
158
164
  else
159
165
  @cool_design_temps[location] = process_design_temp_cooling(weather, location)
160
166
  @heat_design_temps[location] = process_design_temp_heating(weather, location)
@@ -163,34 +169,34 @@ class HVACSizing
163
169
  end
164
170
 
165
171
  def self.process_design_temp_heating(weather, location)
166
- if location == HPXML::LocationLivingSpace
172
+ if location == HPXML::LocationConditionedSpace
167
173
  heat_temp = @heat_setpoint
168
174
 
169
175
  elsif location == HPXML::LocationGarage
170
- heat_temp = @hpxml.header.manualj_heating_design_temp + 13.0
176
+ heat_temp = @hpxml_bldg.header.manualj_heating_design_temp + 13.0
171
177
 
172
178
  elsif (location == HPXML::LocationAtticUnvented) || (location == HPXML::LocationAtticVented)
173
179
 
174
- attic_floors = @hpxml.floors.select { |f| f.is_ceiling && [f.interior_adjacent_to, f.exterior_adjacent_to].include?(location) }
180
+ attic_floors = @hpxml_bldg.floors.select { |f| f.is_ceiling && [f.interior_adjacent_to, f.exterior_adjacent_to].include?(location) }
175
181
  avg_floor_rvalue = calculate_average_r_value(attic_floors)
176
182
 
177
- attic_roofs = @hpxml.roofs.select { |r| r.interior_adjacent_to == location }
183
+ attic_roofs = @hpxml_bldg.roofs.select { |r| r.interior_adjacent_to == location }
178
184
  avg_roof_rvalue = calculate_average_r_value(attic_roofs)
179
185
 
180
186
  if avg_floor_rvalue < avg_roof_rvalue
181
187
  # Attic is considered to be encapsulated. MJ8 says to use an attic
182
188
  # temperature of 95F, however alternative approaches are permissible
183
189
  if location == HPXML::LocationAtticVented
184
- heat_temp = @hpxml.header.manualj_heating_design_temp
190
+ heat_temp = @hpxml_bldg.header.manualj_heating_design_temp
185
191
  else
186
- heat_temp = calculate_space_design_temps(location, weather, @heat_setpoint, @hpxml.header.manualj_heating_design_temp, weather.data.GroundMonthlyTemps.min)
192
+ heat_temp = calculate_space_design_temps(location, weather, @heat_setpoint, @hpxml_bldg.header.manualj_heating_design_temp, weather.data.ShallowGroundMonthlyTemps.min)
187
193
  end
188
194
  else
189
- heat_temp = @hpxml.header.manualj_heating_design_temp
195
+ heat_temp = @hpxml_bldg.header.manualj_heating_design_temp
190
196
  end
191
197
 
192
198
  elsif [HPXML::LocationBasementUnconditioned, HPXML::LocationCrawlspaceUnvented, HPXML::LocationCrawlspaceVented].include? location
193
- heat_temp = calculate_space_design_temps(location, weather, @heat_setpoint, @hpxml.header.manualj_heating_design_temp, weather.data.GroundMonthlyTemps.min)
199
+ heat_temp = calculate_space_design_temps(location, weather, @heat_setpoint, @hpxml_bldg.header.manualj_heating_design_temp, weather.data.ShallowGroundMonthlyTemps.min)
194
200
 
195
201
  end
196
202
 
@@ -200,19 +206,19 @@ class HVACSizing
200
206
  end
201
207
 
202
208
  def self.process_design_temp_cooling(weather, location)
203
- if location == HPXML::LocationLivingSpace
209
+ if location == HPXML::LocationConditionedSpace
204
210
  cool_temp = @cool_setpoint
205
211
 
206
212
  elsif location == HPXML::LocationGarage
207
213
  # Calculate fraction of garage under conditioned space
208
214
  area_total = 0.0
209
215
  area_conditioned = 0.0
210
- @hpxml.roofs.each do |roof|
216
+ @hpxml_bldg.roofs.each do |roof|
211
217
  next unless roof.interior_adjacent_to == location
212
218
 
213
219
  area_total += roof.area
214
220
  end
215
- @hpxml.floors.each do |floor|
221
+ @hpxml_bldg.floors.each do |floor|
216
222
  next unless [floor.interior_adjacent_to, floor.exterior_adjacent_to].include? location
217
223
 
218
224
  area_total += floor.area
@@ -225,36 +231,36 @@ class HVACSizing
225
231
  end
226
232
 
227
233
  # Calculate the garage cooling design temperature based on Table 4C
228
- # Linearly interpolate between having living space over the garage and not having living space above the garage
234
+ # Linearly interpolate between having conditioned space over the garage and not having conditioned space above the garage
229
235
  if @daily_range_num == 0.0
230
- cool_temp = (@hpxml.header.manualj_cooling_design_temp +
236
+ cool_temp = (@hpxml_bldg.header.manualj_cooling_design_temp +
231
237
  (11.0 * garage_frac_under_conditioned) +
232
238
  (22.0 * (1.0 - garage_frac_under_conditioned)))
233
239
  elsif @daily_range_num == 1.0
234
- cool_temp = (@hpxml.header.manualj_cooling_design_temp +
240
+ cool_temp = (@hpxml_bldg.header.manualj_cooling_design_temp +
235
241
  (6.0 * garage_frac_under_conditioned) +
236
242
  (17.0 * (1.0 - garage_frac_under_conditioned)))
237
243
  elsif @daily_range_num == 2.0
238
- cool_temp = (@hpxml.header.manualj_cooling_design_temp +
244
+ cool_temp = (@hpxml_bldg.header.manualj_cooling_design_temp +
239
245
  (1.0 * garage_frac_under_conditioned) +
240
246
  (12.0 * (1.0 - garage_frac_under_conditioned)))
241
247
  end
242
248
 
243
249
  elsif (location == HPXML::LocationAtticUnvented) || (location == HPXML::LocationAtticVented)
244
250
 
245
- attic_floors = @hpxml.floors.select { |f| f.is_ceiling && [f.interior_adjacent_to, f.exterior_adjacent_to].include?(location) }
251
+ attic_floors = @hpxml_bldg.floors.select { |f| f.is_ceiling && [f.interior_adjacent_to, f.exterior_adjacent_to].include?(location) }
246
252
  avg_floor_rvalue = calculate_average_r_value(attic_floors)
247
253
 
248
- attic_roofs = @hpxml.roofs.select { |r| r.interior_adjacent_to == location }
254
+ attic_roofs = @hpxml_bldg.roofs.select { |r| r.interior_adjacent_to == location }
249
255
  avg_roof_rvalue = calculate_average_r_value(attic_roofs)
250
256
 
251
257
  if avg_floor_rvalue < avg_roof_rvalue
252
258
  # Attic is considered to be encapsulated. MJ8 says to use an attic
253
259
  # temperature of 95F, however alternative approaches are permissible
254
260
  if location == HPXML::LocationAtticVented
255
- cool_temp = @hpxml.header.manualj_cooling_design_temp + 40.0 # This is the number from a California study with dark shingle roof and similar ventilation.
261
+ cool_temp = @hpxml_bldg.header.manualj_cooling_design_temp + 40.0 # This is the number from a California study with dark shingle roof and similar ventilation.
256
262
  else
257
- cool_temp = calculate_space_design_temps(location, weather, @cool_setpoint, @hpxml.header.manualj_cooling_design_temp, weather.data.GroundMonthlyTemps.max, true)
263
+ cool_temp = calculate_space_design_temps(location, weather, @cool_setpoint, @hpxml_bldg.header.manualj_cooling_design_temp, weather.data.ShallowGroundMonthlyTemps.max, true)
258
264
  end
259
265
 
260
266
  else
@@ -263,16 +269,16 @@ class HVACSizing
263
269
  tot_roof_area = 0.0
264
270
  cool_temp = 0.0
265
271
 
266
- @hpxml.roofs.each do |roof|
272
+ @hpxml_bldg.roofs.each do |roof|
267
273
  next unless roof.interior_adjacent_to == location
268
274
 
269
275
  tot_roof_area += roof.net_area
270
276
 
271
277
  if location == HPXML::LocationAtticUnvented
272
278
  if not roof.radiant_barrier
273
- cool_temp += (150.0 + (@hpxml.header.manualj_cooling_design_temp - 95.0) + @daily_range_temp_adjust[@daily_range_num]) * roof.net_area
279
+ cool_temp += (150.0 + (@hpxml_bldg.header.manualj_cooling_design_temp - 95.0) + @daily_range_temp_adjust[@daily_range_num]) * roof.net_area
274
280
  else
275
- cool_temp += (130.0 + (@hpxml.header.manualj_cooling_design_temp - 95.0) + @daily_range_temp_adjust[@daily_range_num]) * roof.net_area
281
+ cool_temp += (130.0 + (@hpxml_bldg.header.manualj_cooling_design_temp - 95.0) + @daily_range_temp_adjust[@daily_range_num]) * roof.net_area
276
282
  end
277
283
  else
278
284
  if not roof.radiant_barrier
@@ -334,11 +340,11 @@ class HVACSizing
334
340
  cool_temp /= tot_roof_area
335
341
 
336
342
  # Adjust base CLTD for cooling design temperature and daily range
337
- cool_temp += (@hpxml.header.manualj_cooling_design_temp - 95.0) + @daily_range_temp_adjust[@daily_range_num]
343
+ cool_temp += (@hpxml_bldg.header.manualj_cooling_design_temp - 95.0) + @daily_range_temp_adjust[@daily_range_num]
338
344
  end
339
345
 
340
346
  elsif [HPXML::LocationBasementUnconditioned, HPXML::LocationCrawlspaceUnvented, HPXML::LocationCrawlspaceVented].include? location
341
- cool_temp = calculate_space_design_temps(location, weather, @cool_setpoint, @hpxml.header.manualj_cooling_design_temp, weather.data.GroundMonthlyTemps.max)
347
+ cool_temp = calculate_space_design_temps(location, weather, @cool_setpoint, @hpxml_bldg.header.manualj_cooling_design_temp, weather.data.ShallowGroundMonthlyTemps.max)
342
348
 
343
349
  end
344
350
 
@@ -481,7 +487,7 @@ class HVACSizing
481
487
  alp_load = 0.0 # Average Load Procedure (ALP) Load
482
488
  afl_hr = [0.0] * 12 # Initialize Hourly Aggregate Fenestration Load (AFL)
483
489
 
484
- @hpxml.windows.each do |window|
490
+ @hpxml_bldg.windows.each do |window|
485
491
  next unless window.wall.is_exterior_thermal_boundary
486
492
 
487
493
  window_summer_sf = window.interior_shading_factor_summer * window.exterior_shading_factor_summer
@@ -615,7 +621,7 @@ class HVACSizing
615
621
  alp_load = 0.0 # Average Load Procedure (ALP) Load
616
622
  afl_hr = [0.0] * 12 # Initialize Hourly Aggregate Fenestration Load (AFL)
617
623
 
618
- @hpxml.skylights.each do |skylight|
624
+ @hpxml_bldg.skylights.each do |skylight|
619
625
  skylight_summer_sf = skylight.interior_shading_factor_summer * skylight.exterior_shading_factor_summer
620
626
  skylight_true_azimuth = get_true_azimuth(skylight.azimuth)
621
627
  cnt225 = (skylight_true_azimuth / 22.5).round.to_i
@@ -705,7 +711,7 @@ class HVACSizing
705
711
  bldg_design_loads.Heat_Doors = 0.0
706
712
  bldg_design_loads.Cool_Doors = 0.0
707
713
 
708
- @hpxml.doors.each do |door|
714
+ @hpxml_bldg.doors.each do |door|
709
715
  next unless door.is_thermal_boundary
710
716
 
711
717
  if door.wall.is_exterior
@@ -728,7 +734,7 @@ class HVACSizing
728
734
  bldg_design_loads.Cool_Walls = 0.0
729
735
 
730
736
  # Above-Grade Walls
731
- (@hpxml.walls + @hpxml.rim_joists).each do |wall|
737
+ (@hpxml_bldg.walls + @hpxml_bldg.rim_joists).each do |wall|
732
738
  next unless wall.is_thermal_boundary
733
739
 
734
740
  wall_group = get_wall_group(wall)
@@ -774,7 +780,7 @@ class HVACSizing
774
780
 
775
781
  if @ctd >= 10.0
776
782
  # Adjust the CLTD for different cooling design temperatures
777
- cltd += (@hpxml.header.manualj_cooling_design_temp - 95.0)
783
+ cltd += (@hpxml_bldg.header.manualj_cooling_design_temp - 95.0)
778
784
  # Adjust the CLTD for daily temperature range
779
785
  cltd += @daily_range_temp_adjust[@daily_range_num]
780
786
  else
@@ -794,7 +800,7 @@ class HVACSizing
794
800
  end
795
801
 
796
802
  # Foundation walls
797
- @hpxml.foundation_walls.each do |foundation_wall|
803
+ @hpxml_bldg.foundation_walls.each do |foundation_wall|
798
804
  next unless foundation_wall.is_exterior_thermal_boundary
799
805
 
800
806
  u_wall_with_soil, _u_wall_without_soil = get_foundation_wall_properties(foundation_wall)
@@ -811,7 +817,7 @@ class HVACSizing
811
817
  bldg_design_loads.Cool_Roofs = 0.0
812
818
 
813
819
  # Roofs
814
- @hpxml.roofs.each do |roof|
820
+ @hpxml_bldg.roofs.each do |roof|
815
821
  next unless roof.is_thermal_boundary
816
822
 
817
823
  # Base CLTD for conditioned roofs (Roof-Joist-Ceiling Sandwiches) taken from MJ8 Figure A12-16
@@ -849,7 +855,7 @@ class HVACSizing
849
855
  end
850
856
 
851
857
  # Adjust base CLTD for different CTD or DR
852
- cltd += (@hpxml.header.manualj_cooling_design_temp - 95.0) + @daily_range_temp_adjust[@daily_range_num]
858
+ cltd += (@hpxml_bldg.header.manualj_cooling_design_temp - 95.0) + @daily_range_temp_adjust[@daily_range_num]
853
859
 
854
860
  bldg_design_loads.Cool_Roofs += (1.0 / roof.insulation_assembly_r_value) * roof.net_area * cltd
855
861
  bldg_design_loads.Heat_Roofs += (1.0 / roof.insulation_assembly_r_value) * roof.net_area * @htd
@@ -864,7 +870,7 @@ class HVACSizing
864
870
  bldg_design_loads.Heat_Ceilings = 0.0
865
871
  bldg_design_loads.Cool_Ceilings = 0.0
866
872
 
867
- @hpxml.floors.each do |floor|
873
+ @hpxml_bldg.floors.each do |floor|
868
874
  next unless floor.is_ceiling
869
875
  next unless floor.is_thermal_boundary
870
876
 
@@ -887,7 +893,7 @@ class HVACSizing
887
893
  bldg_design_loads.Heat_Floors = 0.0
888
894
  bldg_design_loads.Cool_Floors = 0.0
889
895
 
890
- @hpxml.floors.each do |floor|
896
+ @hpxml_bldg.floors.each do |floor|
891
897
  next unless floor.is_floor
892
898
  next unless floor.is_thermal_boundary
893
899
 
@@ -901,7 +907,7 @@ class HVACSizing
901
907
 
902
908
  sum_ua_wall = 0.0
903
909
  sum_a_wall = 0.0
904
- @hpxml.foundation_walls.each do |foundation_wall|
910
+ @hpxml_bldg.foundation_walls.each do |foundation_wall|
905
911
  next unless foundation_wall.is_exterior && foundation_wall.interior_adjacent_to == adjacent_space
906
912
 
907
913
  _u_wall_with_soil, u_wall_without_soil = get_foundation_wall_properties(foundation_wall)
@@ -909,7 +915,7 @@ class HVACSizing
909
915
  sum_a_wall += foundation_wall.net_area
910
916
  sum_ua_wall += (u_wall_without_soil * foundation_wall.net_area)
911
917
  end
912
- @hpxml.walls.each do |wall|
918
+ @hpxml_bldg.walls.each do |wall|
913
919
  next unless wall.is_exterior && wall.interior_adjacent_to == adjacent_space
914
920
 
915
921
  sum_a_wall += wall.net_area
@@ -948,16 +954,16 @@ class HVACSizing
948
954
 
949
955
  bldg_design_loads.Heat_Slabs = 0.0
950
956
 
951
- @hpxml.slabs.each do |slab|
957
+ @hpxml_bldg.slabs.each do |slab|
952
958
  next unless slab.is_thermal_boundary
953
959
 
954
- if slab.interior_adjacent_to == HPXML::LocationLivingSpace # Slab-on-grade
955
- f_value = calc_slab_f_value(slab, @hpxml.site.ground_conductivity)
960
+ if slab.interior_adjacent_to == HPXML::LocationConditionedSpace # Slab-on-grade
961
+ f_value = calc_slab_f_value(slab, @hpxml_bldg.site.ground_conductivity)
956
962
  bldg_design_loads.Heat_Slabs += f_value * slab.exposed_perimeter * @htd
957
963
  elsif HPXML::conditioned_below_grade_locations.include? slab.interior_adjacent_to
958
964
  # Based on MJ 8th Ed. A12-7 and ASHRAE HoF 2013 pg 18.31 Eq 40
959
965
  slab_is_insulated = false
960
- if slab.under_slab_insulation_width > 0 && slab.under_slab_insulation_r_value > 0
966
+ if slab.under_slab_insulation_width.to_f > 0 && slab.under_slab_insulation_r_value > 0
961
967
  slab_is_insulated = true
962
968
  elsif slab.perimeter_insulation_depth > 0 && slab.perimeter_insulation_r_value > 0
963
969
  slab_is_insulated = true
@@ -966,8 +972,8 @@ class HVACSizing
966
972
  end
967
973
  k_soil = 0.8 # Value from ASHRAE HoF, probably used by Manual J
968
974
  r_other = 1.47 # Value from ASHRAE HoF, probably used by Manual J
969
- foundation_walls = @hpxml.foundation_walls.select { |fw| fw.is_thermal_boundary }
970
- z_f = foundation_walls.map { |fw| fw.depth_below_grade }.sum(0.0) / foundation_walls.size # Average below-grade depth
975
+ ext_fnd_walls = @hpxml_bldg.foundation_walls.select { |fw| fw.is_exterior }
976
+ z_f = ext_fnd_walls.map { |fw| fw.depth_below_grade * (fw.area / fw.height) }.sum(0.0) / ext_fnd_walls.map { |fw| fw.area / fw.height }.sum # Weighted-average (by length) below-grade depth
971
977
  sqrt_term = [slab.exposed_perimeter**2 - 16.0 * slab.area, 0.0].max
972
978
  length = slab.exposed_perimeter / 4.0 + Math.sqrt(sqrt_term) / 4.0
973
979
  width = slab.exposed_perimeter / 4.0 - Math.sqrt(sqrt_term) / 4.0
@@ -988,15 +994,15 @@ class HVACSizing
988
994
  Heating and Cooling Loads: Infiltration & Ventilation
989
995
  '''
990
996
 
991
- sla, _ach50, _nach, _volume, _height, a_ext = Airflow.get_values_from_air_infiltration_measurements(@hpxml, @cfa, weather)
997
+ sla, _ach50, _nach, _volume, _height, a_ext = Airflow.get_values_from_air_infiltration_measurements(@hpxml_bldg, @cfa, weather)
992
998
  sla *= a_ext
993
999
  ela = sla * @cfa
994
1000
 
995
- ncfl_ag = @hpxml.building_construction.number_of_conditioned_floors_above_grade
1001
+ ncfl_ag = @hpxml_bldg.building_construction.number_of_conditioned_floors_above_grade
996
1002
 
997
1003
  # Set stack/wind coefficients from Tables 5D/5E
998
1004
  c_s = 0.015 * ncfl_ag
999
- c_w_base = [0.0133 * @hpxml.site.additional_properties.aim2_shelter_coeff - 0.0027, 0.0].max # Linear relationship between shelter coefficient and c_w coefficients by shielding class
1005
+ c_w_base = [0.0133 * @hpxml_bldg.site.additional_properties.aim2_shelter_coeff - 0.0027, 0.0].max # Linear relationship between shelter coefficient and c_w coefficients by shielding class
1000
1006
  c_w = c_w_base * ncfl_ag**0.4
1001
1007
 
1002
1008
  ela_in2 = UnitConversions.convert(ela, 'ft^2', 'in^2')
@@ -1024,8 +1030,8 @@ class HVACSizing
1024
1030
  Cooling Load: Internal Gains
1025
1031
  '''
1026
1032
 
1027
- bldg_design_loads.Cool_IntGains_Sens = @hpxml.header.manualj_internal_loads_sensible + 230.0 * @hpxml.header.manualj_num_occupants
1028
- bldg_design_loads.Cool_IntGains_Lat = @hpxml.header.manualj_internal_loads_latent + 200.0 * @hpxml.header.manualj_num_occupants
1033
+ bldg_design_loads.Cool_IntGains_Sens = @hpxml_bldg.header.manualj_internal_loads_sensible + 230.0 * @hpxml_bldg.header.manualj_num_occupants
1034
+ bldg_design_loads.Cool_IntGains_Lat = @hpxml_bldg.header.manualj_internal_loads_latent + 200.0 * @hpxml_bldg.header.manualj_num_occupants
1029
1035
  end
1030
1036
 
1031
1037
  def self.aggregate_loads(bldg_design_loads)
@@ -1133,22 +1139,18 @@ class HVACSizing
1133
1139
  end
1134
1140
 
1135
1141
  def self.apply_hvac_heat_pump_logic(hvac_sizing_values, hvac_cooling)
1136
- # If HERS/MaxLoad methodology, uses at least the larger of heating and cooling loads for heat pump sizing (required for ERI).
1137
1142
  return unless hvac_cooling.is_a? HPXML::HeatPump
1138
1143
  return if @fraction_cool_load_served == 0
1139
1144
  return if @fraction_heat_load_served == 0
1140
1145
 
1141
- if (@hpxml.header.heat_pump_sizing_methodology != HPXML::HeatPumpSizingACCA)
1146
+ if @hpxml_bldg.header.heat_pump_sizing_methodology != HPXML::HeatPumpSizingACCA
1147
+ # If HERS/MaxLoad methodology, use at least the larger of heating/cooling loads for heat pump sizing.
1142
1148
  # Note: Heat_Load_Supp should NOT be adjusted; we only want to adjust the HP capacity, not the HP backup heating capacity.
1143
1149
  max_load = [hvac_sizing_values.Heat_Load, hvac_sizing_values.Cool_Load_Tot].max
1144
1150
  hvac_sizing_values.Heat_Load = max_load
1145
1151
  hvac_sizing_values.Cool_Load_Sens *= max_load / hvac_sizing_values.Cool_Load_Tot
1146
1152
  hvac_sizing_values.Cool_Load_Lat *= max_load / hvac_sizing_values.Cool_Load_Tot
1147
1153
  hvac_sizing_values.Cool_Load_Tot = max_load
1148
-
1149
- # Override Manual S oversize allowances:
1150
- @oversize_limit = 1.0
1151
- @oversize_delta = 0.0
1152
1154
  end
1153
1155
  end
1154
1156
 
@@ -1162,17 +1164,18 @@ class HVACSizing
1162
1164
  dse_Fregain = 0.0
1163
1165
 
1164
1166
  elsif [HPXML::LocationOtherHousingUnit, HPXML::LocationOtherHeatedSpace, HPXML::LocationOtherMultifamilyBufferSpace,
1165
- HPXML::LocationOtherNonFreezingSpace, HPXML::LocationExteriorWall, HPXML::LocationUnderSlab].include? duct.duct_location
1167
+ HPXML::LocationOtherNonFreezingSpace, HPXML::LocationExteriorWall, HPXML::LocationUnderSlab,
1168
+ HPXML::LocationManufacturedHomeBelly].include? duct.duct_location
1166
1169
  space_values = Geometry.get_temperature_scheduled_space_values(duct.duct_location)
1167
1170
  dse_Fregain = space_values[:f_regain]
1168
1171
 
1169
1172
  elsif [HPXML::LocationBasementUnconditioned, HPXML::LocationCrawlspaceVented, HPXML::LocationCrawlspaceUnvented].include? duct.duct_location
1170
1173
 
1171
- ceilings = @hpxml.floors.select { |f| f.is_floor && [f.interior_adjacent_to, f.exterior_adjacent_to].include?(duct.duct_location) }
1174
+ ceilings = @hpxml_bldg.floors.select { |f| f.is_floor && [f.interior_adjacent_to, f.exterior_adjacent_to].include?(duct.duct_location) }
1172
1175
  avg_ceiling_rvalue = calculate_average_r_value(ceilings)
1173
1176
  ceiling_insulated = (avg_ceiling_rvalue > 4)
1174
1177
 
1175
- walls = @hpxml.foundation_walls.select { |f| [f.interior_adjacent_to, f.exterior_adjacent_to].include? duct.duct_location }
1178
+ walls = @hpxml_bldg.foundation_walls.select { |f| [f.interior_adjacent_to, f.exterior_adjacent_to].include? duct.duct_location }
1176
1179
  avg_wall_rvalue = calculate_average_r_value(walls)
1177
1180
  walls_insulated = (avg_wall_rvalue > 4)
1178
1181
 
@@ -1335,11 +1338,9 @@ class HVACSizing
1335
1338
 
1336
1339
  if not hvac_cooling.nil?
1337
1340
  hvac_cooling_ap = hvac_cooling.additional_properties
1341
+ is_ducted = !hvac_cooling.distribution_system.nil?
1338
1342
  end
1339
1343
 
1340
- # Calculate the air flow rate required for design conditions
1341
- hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Cool_Load_Sens, (@cool_setpoint - @leaving_air_temp))
1342
-
1343
1344
  if hvac_sizing_values.Cool_Load_Tot <= 0
1344
1345
 
1345
1346
  hvac_sizing_values.Cool_Capacity = 0.0
@@ -1347,18 +1348,32 @@ class HVACSizing
1347
1348
  hvac_sizing_values.Cool_Airflow = 0.0
1348
1349
 
1349
1350
  elsif [HPXML::HVACTypeCentralAirConditioner,
1350
- HPXML::HVACTypeHeatPumpAirToAir].include? @cooling_type
1351
-
1352
- entering_temp = @hpxml.header.manualj_cooling_design_temp
1353
- hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap)
1354
- coefficients = hvac_cooling_ap.cool_cap_ft_spec[hvac_cooling_speed]
1351
+ HPXML::HVACTypeHeatPumpAirToAir].include?(@cooling_type) ||
1352
+ ([HPXML::HVACTypeMiniSplitAirConditioner,
1353
+ HPXML::HVACTypeHeatPumpMiniSplit].include?(@cooling_type) && is_ducted)
1354
+ # For central systems, the installer can take steps to try to meet both sensible and latent loads,
1355
+ # such as different indoor/outdoor coil combinations and different blower settings.
1356
+ # Ductless systems don't offer this flexibility.
1357
+
1358
+ entering_temp = @hpxml_bldg.header.manualj_cooling_design_temp
1359
+ hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap, true)
1360
+ if hvac_cooling.compressor_type == HPXML::HVACCompressorTypeVariableSpeed
1361
+ idb_adj = adjust_indoor_condition_var_speed(entering_temp, @wetbulb_indoor_cooling, :clg)
1362
+ odb_adj = adjust_outdoor_condition_var_speed(hvac_cooling.cooling_detailed_performance_data, entering_temp, hvac_cooling, :clg)
1363
+ total_cap_curve_value = odb_adj * idb_adj
1364
+ else
1365
+ coefficients = hvac_cooling_ap.cool_cap_ft_spec[hvac_cooling_speed]
1366
+ total_cap_curve_value = MathTools.biquadratic(@wetbulb_indoor_cooling, entering_temp, coefficients)
1367
+ end
1355
1368
 
1356
- total_cap_curve_value = MathTools.biquadratic(@wetbulb_indoor_cooling, entering_temp, coefficients)
1357
1369
  cool_cap_rated = hvac_sizing_values.Cool_Load_Tot / total_cap_curve_value
1358
1370
 
1359
1371
  hvac_cooling_shr = hvac_cooling_ap.cool_rated_shrs_gross[hvac_cooling_speed]
1360
1372
  sens_cap_rated = cool_cap_rated * hvac_cooling_shr
1361
1373
 
1374
+ # Calculate the air flow rate required for design conditions
1375
+ hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Cool_Load_Sens, (@cool_setpoint - @leaving_air_temp), cool_cap_rated)
1376
+
1362
1377
  sensible_cap_curve_value = process_curve_fit(hvac_sizing_values.Cool_Airflow, hvac_sizing_values.Cool_Load_Tot, entering_temp)
1363
1378
  sens_cap_design = sens_cap_rated * sensible_cap_curve_value
1364
1379
  lat_cap_design = [hvac_sizing_values.Cool_Load_Tot - sens_cap_design, 1.0].max
@@ -1370,7 +1385,13 @@ class HVACSizing
1370
1385
  d_sens = shr_biquadratic[5]
1371
1386
 
1372
1387
  # Adjust Sizing
1373
- if lat_cap_design < hvac_sizing_values.Cool_Load_Lat
1388
+ if hvac_cooling.is_a?(HPXML::HeatPump) && (@hpxml_bldg.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingHERS)
1389
+ hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot
1390
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1391
+
1392
+ cool_load_sens_cap_design = hvac_sizing_values.Cool_Capacity_Sens * sensible_cap_curve_value
1393
+
1394
+ elsif lat_cap_design < hvac_sizing_values.Cool_Load_Lat
1374
1395
  # Size by MJ8 Latent load, return to rated conditions
1375
1396
 
1376
1397
  # Solve for the new sensible and total capacity at design conditions:
@@ -1379,10 +1400,13 @@ class HVACSizing
1379
1400
  # substituting in CFM = cool_load_sens_cap_design / (1.1 * ACF * (cool_setpoint - LAT))
1380
1401
 
1381
1402
  cool_load_sens_cap_design = hvac_sizing_values.Cool_Load_Lat / ((total_cap_curve_value / hvac_cooling_shr - \
1382
- (UnitConversions.convert(b_sens, 'ton', 'Btu/hr') + UnitConversions.convert(d_sens, 'ton', 'Btu/hr') * entering_temp) / \
1403
+ (b_sens + d_sens * entering_temp) / \
1383
1404
  (1.1 * @acf * (@cool_setpoint - @leaving_air_temp))) / \
1384
1405
  (a_sens + c_sens * entering_temp) - 1.0)
1385
1406
 
1407
+ # Ensure equipment is not being undersized
1408
+ cool_load_sens_cap_design = [cool_load_sens_cap_design, @undersize_limit * hvac_sizing_values.Cool_Load_Sens].max
1409
+
1386
1410
  cool_cap_design = cool_load_sens_cap_design + hvac_sizing_values.Cool_Load_Lat
1387
1411
 
1388
1412
  # The SHR of the equipment at the design condition
@@ -1397,16 +1421,13 @@ class HVACSizing
1397
1421
  # Limit total capacity to oversize limit
1398
1422
  cool_cap_design = [cool_cap_design, @oversize_limit * hvac_sizing_values.Cool_Load_Tot].min
1399
1423
 
1400
- # Determine the final sensible capacity at design using the SHR
1401
- cool_load_sens_cap_design = shr_design * cool_cap_design
1402
-
1403
- # Calculate the final air flow rate using final sensible capacity at design
1404
- hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(cool_load_sens_cap_design, (@cool_setpoint - @leaving_air_temp))
1405
-
1406
1424
  # Determine rated capacities
1407
1425
  hvac_sizing_values.Cool_Capacity = cool_cap_design / total_cap_curve_value
1408
1426
  hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1409
1427
 
1428
+ # Determine the final sensible capacity at design using the SHR
1429
+ cool_load_sens_cap_design = shr_design * cool_cap_design
1430
+
1410
1431
  elsif sens_cap_design < @undersize_limit * hvac_sizing_values.Cool_Load_Sens
1411
1432
  # Size by MJ8 Sensible load, return to rated conditions, find Sens with SHRRated. Limit total
1412
1433
  # capacity to oversizing limit
@@ -1431,56 +1452,67 @@ class HVACSizing
1431
1452
 
1432
1453
  # Recalculate the air flow rate in case the oversizing limit has been used
1433
1454
  cool_load_sens_cap_design = hvac_sizing_values.Cool_Capacity_Sens * sensible_cap_curve_value
1434
- hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(cool_load_sens_cap_design, (@cool_setpoint - @leaving_air_temp))
1435
1455
 
1436
1456
  else
1437
1457
  hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot / total_cap_curve_value
1438
1458
  hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1439
1459
 
1440
1460
  cool_load_sens_cap_design = hvac_sizing_values.Cool_Capacity_Sens * sensible_cap_curve_value
1441
- hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(cool_load_sens_cap_design, (@cool_setpoint - @leaving_air_temp))
1442
1461
  end
1443
1462
 
1444
- # Ensure the air flow rate is in between 200 and 500 cfm/ton.
1445
- # Reset the air flow rate (with a safety margin), if required.
1446
- if hvac_sizing_values.Cool_Airflow / UnitConversions.convert(hvac_sizing_values.Cool_Capacity, 'Btu/hr', 'ton') > 500
1447
- hvac_sizing_values.Cool_Airflow = 499.0 * UnitConversions.convert(hvac_sizing_values.Cool_Capacity, 'Btu/hr', 'ton') # CFM
1448
- elsif hvac_sizing_values.Cool_Airflow / UnitConversions.convert(hvac_sizing_values.Cool_Capacity, 'Btu/hr', 'ton') < 200
1449
- hvac_sizing_values.Cool_Airflow = 201.0 * UnitConversions.convert(hvac_sizing_values.Cool_Capacity, 'Btu/hr', 'ton') # CFM
1450
- end
1463
+ # Calculate the final air flow rate using final sensible capacity at design
1464
+ hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(cool_load_sens_cap_design, (@cool_setpoint - @leaving_air_temp), hvac_sizing_values.Cool_Capacity)
1451
1465
 
1452
1466
  elsif [HPXML::HVACTypeHeatPumpMiniSplit,
1453
- HPXML::HVACTypeMiniSplitAirConditioner].include? @cooling_type
1454
-
1455
- entering_temp = @hpxml.header.manualj_cooling_design_temp
1456
- hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap)
1457
- coefficients = hvac_cooling_ap.cool_cap_ft_spec[hvac_cooling_speed]
1467
+ HPXML::HVACTypeMiniSplitAirConditioner].include?(@cooling_type) && !is_ducted
1458
1468
 
1459
- total_cap_curve_value = MathTools.biquadratic(@wetbulb_indoor_cooling, entering_temp, coefficients)
1469
+ hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap, true)
1460
1470
  hvac_cooling_shr = hvac_cooling_ap.cool_rated_shrs_gross[hvac_cooling_speed]
1461
1471
 
1462
- hvac_sizing_values.Cool_Capacity = (hvac_sizing_values.Cool_Load_Tot / total_cap_curve_value)
1463
- hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1464
- hvac_sizing_values.Cool_Airflow = calc_airflow_rate_user(hvac_sizing_values.Cool_Capacity, hvac_cooling_ap.cool_rated_cfm_per_ton[-1], hvac_cooling_ap.cool_capacity_ratios[-1])
1472
+ if hvac_cooling.is_a?(HPXML::HeatPump) && (@hpxml_bldg.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingHERS)
1473
+ hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot
1474
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1475
+ else
1476
+ entering_temp = @hpxml_bldg.header.manualj_cooling_design_temp
1477
+ idb_adj = adjust_indoor_condition_var_speed(entering_temp, @wetbulb_indoor_cooling, :clg)
1478
+ odb_adj = adjust_outdoor_condition_var_speed(hvac_cooling.cooling_detailed_performance_data, entering_temp, hvac_cooling, :clg)
1479
+ total_cap_curve_value = odb_adj * idb_adj
1480
+
1481
+ hvac_sizing_values.Cool_Capacity = (hvac_sizing_values.Cool_Load_Tot / total_cap_curve_value)
1482
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1483
+ end
1484
+
1485
+ hvac_sizing_values.Cool_Airflow = calc_airflow_rate_user(hvac_sizing_values.Cool_Capacity, hvac_cooling_ap.cool_rated_cfm_per_ton[hvac_cooling_speed], hvac_cooling_ap.cool_capacity_ratios[hvac_cooling_speed])
1465
1486
 
1466
1487
  elsif [HPXML::HVACTypeRoomAirConditioner,
1467
1488
  HPXML::HVACTypePTAC,
1468
1489
  HPXML::HVACTypeHeatPumpPTHP,
1469
1490
  HPXML::HVACTypeHeatPumpRoom].include? @cooling_type
1470
1491
 
1471
- entering_temp = @hpxml.header.manualj_cooling_design_temp
1472
- hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap)
1473
- total_cap_curve_value = MathTools.biquadratic(@wetbulb_indoor_cooling, entering_temp, hvac_cooling_ap.cool_cap_ft_spec[hvac_cooling_speed])
1492
+ hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap, true)
1474
1493
  hvac_cooling_shr = hvac_cooling_ap.cool_rated_shrs_gross[hvac_cooling_speed]
1475
1494
 
1476
- hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot / total_cap_curve_value
1477
- hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1478
- hvac_sizing_values.Cool_Airflow = calc_airflow_rate_user(hvac_sizing_values.Cool_Capacity, hvac_cooling_ap.cool_rated_cfm_per_ton[hvac_cooling_speed], 1.0)
1495
+ if hvac_cooling.is_a?(HPXML::HeatPump) && (@hpxml_bldg.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingHERS)
1496
+ hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot
1497
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1498
+ else
1499
+ entering_temp = @hpxml_bldg.header.manualj_cooling_design_temp
1500
+ total_cap_curve_value = MathTools.biquadratic(@wetbulb_indoor_cooling, entering_temp, hvac_cooling_ap.cool_cap_ft_spec[hvac_cooling_speed])
1501
+
1502
+ hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot / total_cap_curve_value
1503
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1504
+ end
1505
+
1506
+ hvac_sizing_values.Cool_Airflow = calc_airflow_rate_user(hvac_sizing_values.Cool_Capacity, hvac_cooling_ap.cool_rated_cfm_per_ton[0], 1.0)
1479
1507
 
1480
1508
  elsif HPXML::HVACTypeHeatPumpGroundToAir == @cooling_type
1509
+
1481
1510
  coil_bf = gshp_coil_bf
1482
1511
  entering_temp = hvac_cooling_ap.design_chw
1483
- hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap)
1512
+ hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap, true)
1513
+
1514
+ # Calculate the air flow rate required for design conditions
1515
+ hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Cool_Load_Sens, (@cool_setpoint - @leaving_air_temp))
1484
1516
 
1485
1517
  # Neglecting the water flow rate for now because it's not available yet. Air flow rate is pre-adjusted values.
1486
1518
  design_wb_temp = UnitConversions.convert(@wetbulb_indoor_cooling, 'f', 'k')
@@ -1495,29 +1527,34 @@ class HVACSizing
1495
1527
  bypass_factor_curve_value = MathTools.biquadratic(@wetbulb_indoor_cooling, @cool_setpoint, gshp_coil_bf_ft_spec)
1496
1528
  hvac_cooling_shr = hvac_cooling_ap.cool_rated_shrs_gross[hvac_cooling_speed]
1497
1529
 
1498
- hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot / total_cap_curve_value # Note: cool_cap_design = hvac_sizing_values.Cool_Load_Tot
1499
- hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1530
+ if @hpxml_bldg.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingHERS
1531
+ hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot
1532
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1533
+ else
1534
+ hvac_sizing_values.Cool_Capacity = hvac_sizing_values.Cool_Load_Tot / total_cap_curve_value # Note: cool_cap_design = hvac_sizing_values.Cool_Load_Tot
1535
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1500
1536
 
1501
- cool_load_sens_cap_design = (hvac_sizing_values.Cool_Capacity_Sens * sensible_cap_curve_value /
1502
- (1.0 + (1.0 - coil_bf * bypass_factor_curve_value) *
1503
- (80.0 - @cool_setpoint) / (@cool_setpoint - @leaving_air_temp)))
1504
- cool_load_lat_cap_design = hvac_sizing_values.Cool_Load_Tot - cool_load_sens_cap_design
1537
+ cool_load_sens_cap_design = (hvac_sizing_values.Cool_Capacity_Sens * sensible_cap_curve_value /
1538
+ (1.0 + (1.0 - coil_bf * bypass_factor_curve_value) *
1539
+ (80.0 - @cool_setpoint) / (@cool_setpoint - @leaving_air_temp)))
1540
+ cool_load_lat_cap_design = hvac_sizing_values.Cool_Load_Tot - cool_load_sens_cap_design
1505
1541
 
1506
- # Adjust Sizing so that coil sensible at design >= CoolingLoad_Sens, and coil latent at design >= CoolingLoad_Lat, and equipment SHRRated is maintained.
1507
- cool_load_sens_cap_design = [cool_load_sens_cap_design, hvac_sizing_values.Cool_Load_Sens].max
1508
- cool_load_lat_cap_design = [cool_load_lat_cap_design, hvac_sizing_values.Cool_Load_Lat].max
1509
- cool_cap_design = cool_load_sens_cap_design + cool_load_lat_cap_design
1542
+ # Adjust Sizing so that coil sensible at design >= CoolingLoad_Sens, and coil latent at design >= CoolingLoad_Lat, and equipment SHRRated is maintained.
1543
+ cool_load_sens_cap_design = [cool_load_sens_cap_design, hvac_sizing_values.Cool_Load_Sens].max
1544
+ cool_load_lat_cap_design = [cool_load_lat_cap_design, hvac_sizing_values.Cool_Load_Lat].max
1545
+ cool_cap_design = cool_load_sens_cap_design + cool_load_lat_cap_design
1510
1546
 
1511
- # Limit total capacity via oversizing limit
1512
- cool_cap_design = [cool_cap_design, @oversize_limit * hvac_sizing_values.Cool_Load_Tot].min
1513
- hvac_sizing_values.Cool_Capacity = cool_cap_design / total_cap_curve_value
1514
- hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1547
+ # Limit total capacity via oversizing limit
1548
+ cool_cap_design = [cool_cap_design, @oversize_limit * hvac_sizing_values.Cool_Load_Tot].min
1549
+ hvac_sizing_values.Cool_Capacity = cool_cap_design / total_cap_curve_value
1550
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_shr
1551
+ end
1515
1552
 
1516
1553
  # Recalculate the air flow rate in case the oversizing limit has been used
1517
1554
  cool_load_sens_cap_design = (hvac_sizing_values.Cool_Capacity_Sens * sensible_cap_curve_value /
1518
1555
  (1.0 + (1.0 - coil_bf * bypass_factor_curve_value) *
1519
1556
  (80.0 - @cool_setpoint) / (@cool_setpoint - @leaving_air_temp)))
1520
- hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(cool_load_sens_cap_design, (@cool_setpoint - @leaving_air_temp))
1557
+ hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(cool_load_sens_cap_design, (@cool_setpoint - @leaving_air_temp), hvac_sizing_values.Cool_Capacity)
1521
1558
 
1522
1559
  elsif HPXML::HVACTypeEvaporativeCooler == @cooling_type
1523
1560
 
@@ -1552,6 +1589,7 @@ class HVACSizing
1552
1589
 
1553
1590
  if not hvac_heating.nil?
1554
1591
  hvac_heating_ap = hvac_heating.additional_properties
1592
+ is_ducted = !hvac_heating.distribution_system.nil?
1555
1593
  end
1556
1594
 
1557
1595
  if hvac_sizing_values.Heat_Load <= 0
@@ -1559,24 +1597,32 @@ class HVACSizing
1559
1597
  hvac_sizing_values.Heat_Capacity = 0.0
1560
1598
  hvac_sizing_values.Heat_Capacity_Supp = 0.0
1561
1599
  hvac_sizing_values.Heat_Airflow = 0.0
1562
- hvac_sizing_values.Heat_Airflow_Supp = 0.0
1563
1600
 
1564
1601
  elsif [HPXML::HVACTypeHeatPumpAirToAir,
1565
1602
  HPXML::HVACTypeHeatPumpMiniSplit,
1566
1603
  HPXML::HVACTypeHeatPumpPTHP,
1567
1604
  HPXML::HVACTypeHeatPumpRoom].include? @heating_type
1568
- process_heat_pump_adjustment(hvac_sizing_values, weather, hvac_heating, total_cap_curve_value, hvac_system)
1605
+
1606
+ hvac_heating_speed = get_sizing_speed(hvac_heating_ap, false)
1607
+ if hvac_heating.is_a?(HPXML::HeatPump) && (@hpxml_bldg.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingHERS)
1608
+ hvac_sizing_values.Heat_Capacity = hvac_sizing_values.Heat_Load
1609
+ else
1610
+ process_heat_pump_adjustment(hvac_sizing_values, weather, hvac_heating, total_cap_curve_value, hvac_system, hvac_heating_speed)
1611
+ end
1612
+
1569
1613
  hvac_sizing_values.Heat_Capacity_Supp = hvac_sizing_values.Heat_Load_Supp
1570
- if @heating_type == HPXML::HVACTypeHeatPumpAirToAir
1571
- hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint))
1614
+ if (@heating_type == HPXML::HVACTypeHeatPumpAirToAir) || (@heating_type == HPXML::HVACTypeHeatPumpMiniSplit && is_ducted)
1615
+ hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint), hvac_sizing_values.Heat_Capacity)
1572
1616
  else
1573
- hvac_sizing_values.Heat_Airflow = calc_airflow_rate_user(hvac_sizing_values.Heat_Capacity, hvac_heating_ap.heat_rated_cfm_per_ton[-1], hvac_heating_ap.heat_capacity_ratios[-1])
1617
+ hvac_sizing_values.Heat_Airflow = calc_airflow_rate_user(hvac_sizing_values.Heat_Capacity, hvac_heating_ap.heat_rated_cfm_per_ton[hvac_heating_speed], hvac_heating_ap.heat_capacity_ratios[hvac_heating_speed])
1574
1618
  end
1575
- hvac_sizing_values.Heat_Airflow_Supp = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity_Supp, (@backup_supply_air_temp - @heat_setpoint))
1576
1619
 
1577
1620
  elsif [HPXML::HVACTypeHeatPumpGroundToAir].include? @heating_type
1578
1621
 
1579
- if hvac_sizing_values.Cool_Capacity > 0
1622
+ if @hpxml_bldg.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingHERS
1623
+ hvac_sizing_values.Heat_Capacity = hvac_sizing_values.Heat_Load
1624
+ hvac_sizing_values.Heat_Capacity_Supp = hvac_sizing_values.Heat_Load_Supp
1625
+ elsif hvac_sizing_values.Cool_Capacity > 0
1580
1626
  hvac_sizing_values.Heat_Capacity = hvac_sizing_values.Heat_Load
1581
1627
  hvac_sizing_values.Heat_Capacity_Supp = hvac_sizing_values.Heat_Load_Supp
1582
1628
 
@@ -1593,33 +1639,29 @@ class HVACSizing
1593
1639
  cool_load_sens_cap_design = (hvac_sizing_values.Cool_Capacity_Sens * sensible_cap_curve_value /
1594
1640
  (1.0 + (1.0 - gshp_coil_bf * bypass_factor_curve_value) *
1595
1641
  (80.0 - @cool_setpoint) / (@cool_setpoint - @leaving_air_temp)))
1596
- hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(cool_load_sens_cap_design, (@cool_setpoint - @leaving_air_temp))
1642
+ hvac_sizing_values.Cool_Airflow = calc_airflow_rate_manual_s(cool_load_sens_cap_design, (@cool_setpoint - @leaving_air_temp), hvac_sizing_values.Cool_Capacity)
1597
1643
  else
1598
1644
  hvac_sizing_values.Heat_Capacity = hvac_sizing_values.Heat_Load
1599
1645
  hvac_sizing_values.Heat_Capacity_Supp = hvac_sizing_values.Heat_Load_Supp
1600
1646
  end
1601
1647
  hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint))
1602
- hvac_sizing_values.Heat_Airflow_Supp = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity_Supp, (@backup_supply_air_temp - @heat_setpoint))
1603
1648
 
1604
1649
  elsif [HPXML::HVACTypeHeatPumpWaterLoopToAir].include? @heating_type
1605
1650
 
1606
1651
  hvac_sizing_values.Heat_Capacity = hvac_sizing_values.Heat_Load
1607
1652
  hvac_sizing_values.Heat_Capacity_Supp = hvac_sizing_values.Heat_Load_Supp
1608
1653
 
1609
- hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint))
1610
- hvac_sizing_values.Heat_Airflow_Supp = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity_Supp, (@backup_supply_air_temp - @heat_setpoint))
1654
+ hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint), hvac_sizing_values.Heat_Capacity)
1611
1655
 
1612
1656
  elsif (@heating_type == HPXML::HVACTypeFurnace) || ((not hvac_cooling.nil?) && hvac_cooling.has_integrated_heating)
1613
1657
 
1614
1658
  hvac_sizing_values.Heat_Capacity = hvac_sizing_values.Heat_Load
1615
1659
  hvac_sizing_values.Heat_Capacity_Supp = 0.0
1616
1660
 
1617
- hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint))
1618
- hvac_sizing_values.Heat_Airflow_Supp = 0.0
1661
+ hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint), hvac_sizing_values.Heat_Capacity)
1619
1662
 
1620
1663
  elsif [HPXML::HVACTypeStove,
1621
- HPXML::HVACTypePortableHeater,
1622
- HPXML::HVACTypeFixedHeater,
1664
+ HPXML::HVACTypeSpaceHeater,
1623
1665
  HPXML::HVACTypeWallFurnace,
1624
1666
  HPXML::HVACTypeFloorFurnace,
1625
1667
  HPXML::HVACTypeFireplace].include? @heating_type
@@ -1632,9 +1674,8 @@ class HVACSizing
1632
1674
  hvac_sizing_values.Heat_Airflow = UnitConversions.convert(hvac_sizing_values.Heat_Capacity, 'Btu/hr', 'ton') * hvac_heating_ap.heat_rated_cfm_per_ton[0]
1633
1675
  else
1634
1676
  # Autosized airflow rate
1635
- hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint))
1677
+ hvac_sizing_values.Heat_Airflow = calc_airflow_rate_manual_s(hvac_sizing_values.Heat_Capacity, (@supply_air_temp - @heat_setpoint), hvac_sizing_values.Heat_Capacity)
1636
1678
  end
1637
- hvac_sizing_values.Heat_Airflow_Supp = 0.0
1638
1679
 
1639
1680
  elsif [HPXML::HVACTypeBoiler,
1640
1681
  HPXML::HVACTypeElectricResistance].include? @heating_type
@@ -1642,14 +1683,12 @@ class HVACSizing
1642
1683
  hvac_sizing_values.Heat_Capacity = hvac_sizing_values.Heat_Load
1643
1684
  hvac_sizing_values.Heat_Capacity_Supp = 0.0
1644
1685
  hvac_sizing_values.Heat_Airflow = 0.0
1645
- hvac_sizing_values.Heat_Airflow_Supp = 0.0
1646
1686
 
1647
1687
  elsif @heating_type.nil?
1648
1688
 
1649
1689
  hvac_sizing_values.Heat_Capacity = 0.0
1650
1690
  hvac_sizing_values.Heat_Capacity_Supp = 0.0
1651
1691
  hvac_sizing_values.Heat_Airflow = 0.0
1652
- hvac_sizing_values.Heat_Airflow_Supp = 0.0
1653
1692
 
1654
1693
  else
1655
1694
 
@@ -1658,6 +1697,37 @@ class HVACSizing
1658
1697
  end
1659
1698
  end
1660
1699
 
1700
+ def self.adjust_indoor_condition_var_speed(adjusted_outdoor_temp, adjusted_indoor_temp, mode)
1701
+ if mode == :clg
1702
+ rated_indoor_temp = HVAC::AirSourceCoolRatedIWB
1703
+ coefficients_1speed = HVAC.get_cool_cap_eir_ft_spec(HPXML::HVACCompressorTypeSingleStage)[0][0]
1704
+ elsif mode == :htg
1705
+ rated_indoor_temp = HVAC::AirSourceHeatRatedIDB
1706
+ capacity_retention_temp_1speed, capacity_retention_fraction_1speed = HVAC.get_default_heating_capacity_retention(HPXML::HVACCompressorTypeSingleStage)
1707
+ coefficients_1speed = HVAC.get_heat_cap_eir_ft_spec(HPXML::HVACCompressorTypeSingleStage, capacity_retention_temp_1speed, capacity_retention_fraction_1speed)[0][0]
1708
+ end
1709
+ return MathTools.biquadratic(adjusted_indoor_temp, adjusted_outdoor_temp, coefficients_1speed) / MathTools.biquadratic(rated_indoor_temp, adjusted_outdoor_temp, coefficients_1speed)
1710
+ end
1711
+
1712
+ def self.adjust_outdoor_condition_var_speed(detailed_performance_data, adjusted_outdoor_temp, hvac_sys, mode)
1713
+ rated_odb = (mode == :clg) ? HVAC::AirSourceCoolRatedODB : HVAC::AirSourceHeatRatedODB
1714
+ if detailed_performance_data.empty?
1715
+ # Based on retention fraction and retention temperature
1716
+ if mode == :clg
1717
+ capacity_retention_temperature = hvac_sys.additional_properties.cooling_capacity_retention_temperature
1718
+ capacity_retention_fraction = hvac_sys.additional_properties.cooling_capacity_retention_fraction
1719
+ elsif mode == :htg
1720
+ capacity_retention_temperature, capacity_retention_fraction = HVAC.get_heating_capacity_retention(hvac_sys)
1721
+ end
1722
+ odb_adj = (1.0 - capacity_retention_fraction) / (rated_odb - capacity_retention_temperature) * (adjusted_outdoor_temp - rated_odb) + 1.0
1723
+ else
1724
+ # Based on detailed performance data
1725
+ capacity_max = detailed_performance_data.find { |dp| dp.outdoor_temperature == rated_odb && dp.capacity_description == HPXML::CapacityDescriptionMaximum }.capacity
1726
+ odb_adj = HVAC.interpolate_to_odb_table_point(detailed_performance_data, HPXML::CapacityDescriptionMaximum, adjusted_outdoor_temp, :capacity) / capacity_max
1727
+ end
1728
+ return odb_adj
1729
+ end
1730
+
1661
1731
  def self.apply_hvac_installation_quality(hvac_sizing_values, hvac_heating, hvac_cooling)
1662
1732
  # Increases the autosized heating/cooling capacities to account for any reduction
1663
1733
  # in capacity due to HVAC installation quality. This is done to prevent causing
@@ -1694,68 +1764,59 @@ class HVACSizing
1694
1764
  HPXML::HVACTypeHeatPumpGroundToAir].include?(@cooling_type) && @fraction_cool_load_served > 0
1695
1765
 
1696
1766
  hvac_cooling_ap = hvac_cooling.additional_properties
1767
+ hvac_cooling_speed = get_sizing_speed(hvac_cooling_ap, true)
1697
1768
 
1698
- cool_airflow_rated_defect_ratio = []
1699
- cool_airflow_rated_ratio = []
1700
1769
  if @cooling_type != HPXML::HVACTypeHeatPumpGroundToAir
1701
1770
  cool_cfm_m3s = UnitConversions.convert(hvac_sizing_values.Cool_Airflow, 'cfm', 'm^3/s')
1702
- for speed in 0..(hvac_cooling_ap.cool_rated_cfm_per_ton.size - 1)
1703
- cool_airflow_rated_ratio << cool_cfm_m3s / HVAC.calc_rated_airflow(hvac_sizing_values.Cool_Capacity, hvac_cooling_ap.cool_rated_cfm_per_ton[speed], hvac_cooling_ap.cool_capacity_ratios[speed])
1704
- cool_airflow_rated_defect_ratio << cool_cfm_m3s * (1 + cool_airflow_defect_ratio) / HVAC.calc_rated_airflow(hvac_sizing_values.Cool_Capacity, hvac_cooling_ap.cool_rated_cfm_per_ton[speed], hvac_cooling_ap.cool_capacity_ratios[speed])
1705
- end
1771
+ cool_airflow_rated_ratio = cool_cfm_m3s / HVAC.calc_rated_airflow(hvac_sizing_values.Cool_Capacity * hvac_cooling_ap.cool_capacity_ratios[hvac_cooling_speed], hvac_cooling_ap.cool_rated_cfm_per_ton[hvac_cooling_speed])
1772
+ cool_airflow_rated_defect_ratio = cool_cfm_m3s * (1 + cool_airflow_defect_ratio) / HVAC.calc_rated_airflow(hvac_sizing_values.Cool_Capacity * hvac_cooling_ap.cool_capacity_ratios[hvac_cooling_speed], hvac_cooling_ap.cool_rated_cfm_per_ton[hvac_cooling_speed])
1706
1773
  else
1707
- cool_airflow_rated_ratio = [1.0] # actual air flow is equal to rated (before applying defect ratio) in current methodology
1708
- cool_airflow_rated_defect_ratio = [1 + cool_airflow_defect_ratio]
1774
+ cool_airflow_rated_ratio = 1.0 # actual air flow is equal to rated (before applying defect ratio) in current methodology
1775
+ cool_airflow_rated_defect_ratio = 1 + cool_airflow_defect_ratio
1709
1776
  end
1710
1777
 
1711
- if not cool_airflow_rated_defect_ratio.empty?
1712
- cap_clg_ratios = []
1713
- for speed in 0..(cool_airflow_rated_defect_ratio.size - 1)
1714
- # NOTE: heat pump (cooling) curves don't exhibit expected trends at extreme faults;
1715
- clg_fff_cap_coeff, _clg_fff_eir_coeff = HVAC.get_airflow_fault_cooling_coeff()
1716
- a1_AF_Qgr_c = clg_fff_cap_coeff[0]
1717
- a2_AF_Qgr_c = clg_fff_cap_coeff[1]
1718
- a3_AF_Qgr_c = clg_fff_cap_coeff[2]
1778
+ # NOTE: heat pump (cooling) curves don't exhibit expected trends at extreme faults;
1779
+ clg_fff_cap_coeff, _clg_fff_eir_coeff = HVAC.get_cool_cap_eir_fflow_spec(HPXML::HVACCompressorTypeSingleStage)[0]
1780
+ a1_AF_Qgr_c = clg_fff_cap_coeff[0]
1781
+ a2_AF_Qgr_c = clg_fff_cap_coeff[1]
1782
+ a3_AF_Qgr_c = clg_fff_cap_coeff[2]
1719
1783
 
1720
- qgr_values, _p_values, ff_chg_values = HVAC.get_charge_fault_cooling_coeff(f_ch)
1784
+ qgr_values, _p_values, ff_chg_values = HVAC.get_charge_fault_cooling_coeff(f_ch)
1721
1785
 
1722
- a1_CH_Qgr_c = qgr_values[0]
1723
- a2_CH_Qgr_c = qgr_values[1]
1724
- a3_CH_Qgr_c = qgr_values[2]
1725
- a4_CH_Qgr_c = qgr_values[3]
1786
+ a1_CH_Qgr_c = qgr_values[0]
1787
+ a2_CH_Qgr_c = qgr_values[1]
1788
+ a3_CH_Qgr_c = qgr_values[2]
1789
+ a4_CH_Qgr_c = qgr_values[3]
1726
1790
 
1727
- q0_CH = a1_CH_Qgr_c
1728
- q1_CH = a2_CH_Qgr_c * UnitConversions.convert(@cool_setpoint, 'F', 'C')
1729
- q2_CH = a3_CH_Qgr_c * UnitConversions.convert(@hpxml.header.manualj_cooling_design_temp, 'F', 'C')
1730
- q3_CH = a4_CH_Qgr_c * f_ch
1731
- y_CH_Q_c = 1 + ((q0_CH + q1_CH + q2_CH + q3_CH) * f_ch)
1791
+ q0_CH = a1_CH_Qgr_c
1792
+ q1_CH = a2_CH_Qgr_c * UnitConversions.convert(@cool_setpoint, 'F', 'C')
1793
+ q2_CH = a3_CH_Qgr_c * UnitConversions.convert(@hpxml_bldg.header.manualj_cooling_design_temp, 'F', 'C')
1794
+ q3_CH = a4_CH_Qgr_c * f_ch
1795
+ y_CH_Q_c = 1 + ((q0_CH + q1_CH + q2_CH + q3_CH) * f_ch)
1732
1796
 
1733
- ff_ch_c = (1.0 / (1.0 + (qgr_values[0] + (qgr_values[1] * ff_chg_values[0]) + (qgr_values[2] * ff_chg_values[1]) + (qgr_values[3] * f_ch)) * f_ch)).round(3)
1734
- ff_AF_c = cool_airflow_rated_defect_ratio[speed].round(3)
1735
- ff_AF_comb_c = ff_ch_c * ff_AF_c
1797
+ ff_ch_c = (1.0 / (1.0 + (qgr_values[0] + (qgr_values[1] * ff_chg_values[0]) + (qgr_values[2] * ff_chg_values[1]) + (qgr_values[3] * f_ch)) * f_ch)).round(3)
1798
+ ff_AF_c = cool_airflow_rated_defect_ratio.round(3)
1799
+ ff_AF_comb_c = ff_ch_c * ff_AF_c
1736
1800
 
1737
- q_AF_CH = a1_AF_Qgr_c + (a2_AF_Qgr_c * ff_ch_c) + (a3_AF_Qgr_c * ff_ch_c * ff_ch_c)
1738
- p_CH_Q_c = y_CH_Q_c / q_AF_CH
1801
+ q_AF_CH = a1_AF_Qgr_c + (a2_AF_Qgr_c * ff_ch_c) + (a3_AF_Qgr_c * ff_ch_c * ff_ch_c)
1802
+ p_CH_Q_c = y_CH_Q_c / q_AF_CH
1739
1803
 
1740
- p_AF_Q_c = a1_AF_Qgr_c + (a2_AF_Qgr_c * ff_AF_comb_c) + (a3_AF_Qgr_c * ff_AF_comb_c * ff_AF_comb_c)
1804
+ p_AF_Q_c = a1_AF_Qgr_c + (a2_AF_Qgr_c * ff_AF_comb_c) + (a3_AF_Qgr_c * ff_AF_comb_c * ff_AF_comb_c)
1741
1805
 
1742
- cool_cap_fff = (p_CH_Q_c * p_AF_Q_c)
1806
+ cool_cap_fff = (p_CH_Q_c * p_AF_Q_c)
1743
1807
 
1744
- # calculate the capacity impact by defects
1745
- ff_AF_c_nodefect = cool_airflow_rated_ratio[speed].round(3)
1746
- cool_cap_fff_nodefect = a1_AF_Qgr_c + a2_AF_Qgr_c * ff_AF_c_nodefect + a3_AF_Qgr_c * ff_AF_c_nodefect * ff_AF_c_nodefect
1747
- cap_clg_ratio = 1 / (cool_cap_fff / cool_cap_fff_nodefect)
1748
- cap_clg_ratios << cap_clg_ratio
1749
- end
1808
+ # calculate the capacity impact by defects
1809
+ ff_AF_c_nodefect = cool_airflow_rated_ratio.round(3)
1810
+ cool_cap_fff_nodefect = a1_AF_Qgr_c + a2_AF_Qgr_c * ff_AF_c_nodefect + a3_AF_Qgr_c * ff_AF_c_nodefect * ff_AF_c_nodefect
1811
+ cap_clg_ratio = 1 / (cool_cap_fff / cool_cap_fff_nodefect)
1750
1812
 
1751
- prev_capacity = hvac_sizing_values.Cool_Capacity
1752
- hvac_sizing_values.Cool_Capacity *= cap_clg_ratios.max
1753
- hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_ap.cool_rated_shrs_gross[get_sizing_speed(hvac_cooling_ap)]
1754
- if prev_capacity > 0 # Preserve cfm/ton
1755
- hvac_sizing_values.Cool_Airflow = hvac_sizing_values.Cool_Airflow * hvac_sizing_values.Cool_Capacity / prev_capacity
1756
- else
1757
- hvac_sizing_values.Cool_Airflow = 0.0
1758
- end
1813
+ prev_capacity = hvac_sizing_values.Cool_Capacity
1814
+ hvac_sizing_values.Cool_Capacity *= cap_clg_ratio
1815
+ hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity * hvac_cooling_ap.cool_rated_shrs_gross[hvac_cooling_speed]
1816
+ if prev_capacity > 0 # Preserve cfm/ton
1817
+ hvac_sizing_values.Cool_Airflow = hvac_sizing_values.Cool_Airflow * hvac_sizing_values.Cool_Capacity / prev_capacity
1818
+ else
1819
+ hvac_sizing_values.Cool_Airflow = 0.0
1759
1820
  end
1760
1821
  end
1761
1822
 
@@ -1766,64 +1827,55 @@ class HVACSizing
1766
1827
  HPXML::HVACTypeHeatPumpGroundToAir].include?(@heating_type) && @fraction_heat_load_served > 0
1767
1828
 
1768
1829
  hvac_heating_ap = hvac_heating.additional_properties
1830
+ hvac_heating_speed = get_sizing_speed(hvac_heating_ap, false)
1769
1831
 
1770
- heat_airflow_rated_defect_ratio = []
1771
- heat_airflow_rated_ratio = []
1772
1832
  if @heating_type != HPXML::HVACTypeHeatPumpGroundToAir
1773
1833
  heat_cfm_m3s = UnitConversions.convert(hvac_sizing_values.Heat_Airflow, 'cfm', 'm^3/s')
1774
- for speed in 0..(hvac_heating_ap.heat_rated_cfm_per_ton.size - 1)
1775
- heat_airflow_rated_ratio << heat_cfm_m3s / HVAC.calc_rated_airflow(hvac_sizing_values.Heat_Capacity, hvac_heating_ap.heat_rated_cfm_per_ton[speed], hvac_heating_ap.heat_capacity_ratios[speed])
1776
- heat_airflow_rated_defect_ratio << heat_cfm_m3s * (1 + heat_airflow_defect_ratio) / HVAC.calc_rated_airflow(hvac_sizing_values.Heat_Capacity, hvac_heating_ap.heat_rated_cfm_per_ton[speed], hvac_heating_ap.heat_capacity_ratios[speed])
1777
- end
1834
+ heat_airflow_rated_ratio = heat_cfm_m3s / HVAC.calc_rated_airflow(hvac_sizing_values.Heat_Capacity * hvac_heating_ap.heat_capacity_ratios[hvac_heating_speed], hvac_heating_ap.heat_rated_cfm_per_ton[hvac_heating_speed])
1835
+ heat_airflow_rated_defect_ratio = heat_cfm_m3s * (1 + heat_airflow_defect_ratio) / HVAC.calc_rated_airflow(hvac_sizing_values.Heat_Capacity * hvac_heating_ap.heat_capacity_ratios[hvac_heating_speed], hvac_heating_ap.heat_rated_cfm_per_ton[hvac_heating_speed])
1778
1836
  else
1779
- heat_airflow_rated_ratio = [1.0] # actual air flow is equal to rated (before applying defect ratio) in current methodology
1780
- heat_airflow_rated_defect_ratio = [1 + heat_airflow_defect_ratio]
1837
+ heat_airflow_rated_ratio = 1.0 # actual air flow is equal to rated (before applying defect ratio) in current methodology
1838
+ heat_airflow_rated_defect_ratio = 1 + heat_airflow_defect_ratio
1781
1839
  end
1782
1840
 
1783
- if not heat_airflow_rated_defect_ratio.empty?
1784
- cap_htg_ratios = []
1785
- for speed in 0..(heat_airflow_rated_defect_ratio.size - 1)
1786
- htg_fff_cap_coeff, _htg_fff_eir_coeff = HVAC.get_airflow_fault_heating_coeff()
1787
- a1_AF_Qgr_h = htg_fff_cap_coeff[0]
1788
- a2_AF_Qgr_h = htg_fff_cap_coeff[1]
1789
- a3_AF_Qgr_h = htg_fff_cap_coeff[2]
1841
+ htg_fff_cap_coeff, _htg_fff_eir_coeff = HVAC.get_heat_cap_eir_fflow_spec(HPXML::HVACCompressorTypeSingleStage)[0]
1842
+ a1_AF_Qgr_h = htg_fff_cap_coeff[0]
1843
+ a2_AF_Qgr_h = htg_fff_cap_coeff[1]
1844
+ a3_AF_Qgr_h = htg_fff_cap_coeff[2]
1790
1845
 
1791
- qgr_values, _p_values, ff_chg_values = HVAC.get_charge_fault_heating_coeff(f_ch)
1846
+ qgr_values, _p_values, ff_chg_values = HVAC.get_charge_fault_heating_coeff(f_ch)
1792
1847
 
1793
- a1_CH_Qgr_h = qgr_values[0]
1794
- a2_CH_Qgr_h = qgr_values[2]
1795
- a3_CH_Qgr_h = qgr_values[3]
1848
+ a1_CH_Qgr_h = qgr_values[0]
1849
+ a2_CH_Qgr_h = qgr_values[2]
1850
+ a3_CH_Qgr_h = qgr_values[3]
1796
1851
 
1797
- qh1_CH = a1_CH_Qgr_h
1798
- qh2_CH = a2_CH_Qgr_h * UnitConversions.convert(@hpxml.header.manualj_heating_design_temp, 'F', 'C')
1799
- qh3_CH = a3_CH_Qgr_h * f_ch
1800
- y_CH_Q_h = 1 + ((qh1_CH + qh2_CH + qh3_CH) * f_ch)
1852
+ qh1_CH = a1_CH_Qgr_h
1853
+ qh2_CH = a2_CH_Qgr_h * UnitConversions.convert(@hpxml_bldg.header.manualj_heating_design_temp, 'F', 'C')
1854
+ qh3_CH = a3_CH_Qgr_h * f_ch
1855
+ y_CH_Q_h = 1 + ((qh1_CH + qh2_CH + qh3_CH) * f_ch)
1801
1856
 
1802
- ff_ch_h = (1 / (1 + (qgr_values[0] + qgr_values[2] * ff_chg_values[1] + qgr_values[3] * f_ch) * f_ch)).round(3)
1803
- ff_AF_h = heat_airflow_rated_defect_ratio[speed].round(3)
1804
- ff_AF_comb_h = ff_ch_h * ff_AF_h
1857
+ ff_ch_h = (1 / (1 + (qgr_values[0] + qgr_values[2] * ff_chg_values[1] + qgr_values[3] * f_ch) * f_ch)).round(3)
1858
+ ff_AF_h = heat_airflow_rated_defect_ratio.round(3)
1859
+ ff_AF_comb_h = ff_ch_h * ff_AF_h
1805
1860
 
1806
- qh_AF_CH = a1_AF_Qgr_h + (a2_AF_Qgr_h * ff_ch_h) + (a3_AF_Qgr_h * ff_ch_h * ff_ch_h)
1807
- p_CH_Q_h = y_CH_Q_h / qh_AF_CH
1861
+ qh_AF_CH = a1_AF_Qgr_h + (a2_AF_Qgr_h * ff_ch_h) + (a3_AF_Qgr_h * ff_ch_h * ff_ch_h)
1862
+ p_CH_Q_h = y_CH_Q_h / qh_AF_CH
1808
1863
 
1809
- p_AF_Q_h = a1_AF_Qgr_h + (a2_AF_Qgr_h * ff_AF_comb_h) + (a3_AF_Qgr_h * ff_AF_comb_h * ff_AF_comb_h)
1864
+ p_AF_Q_h = a1_AF_Qgr_h + (a2_AF_Qgr_h * ff_AF_comb_h) + (a3_AF_Qgr_h * ff_AF_comb_h * ff_AF_comb_h)
1810
1865
 
1811
- heat_cap_fff = (p_CH_Q_h * p_AF_Q_h)
1866
+ heat_cap_fff = (p_CH_Q_h * p_AF_Q_h)
1812
1867
 
1813
- # calculate the capacity impact by defects
1814
- ff_AF_h_nodefect = heat_airflow_rated_ratio[speed].round(3)
1815
- heat_cap_fff_nodefect = a1_AF_Qgr_h + a2_AF_Qgr_h * ff_AF_h_nodefect + a3_AF_Qgr_h * ff_AF_h_nodefect * ff_AF_h_nodefect
1816
- cap_htg_ratio = 1 / (heat_cap_fff / heat_cap_fff_nodefect)
1817
- cap_htg_ratios << cap_htg_ratio
1818
- end
1868
+ # calculate the capacity impact by defects
1869
+ ff_AF_h_nodefect = heat_airflow_rated_ratio.round(3)
1870
+ heat_cap_fff_nodefect = a1_AF_Qgr_h + a2_AF_Qgr_h * ff_AF_h_nodefect + a3_AF_Qgr_h * ff_AF_h_nodefect * ff_AF_h_nodefect
1871
+ cap_htg_ratio = 1 / (heat_cap_fff / heat_cap_fff_nodefect)
1819
1872
 
1820
- prev_capacity = hvac_sizing_values.Heat_Capacity
1821
- hvac_sizing_values.Heat_Capacity *= cap_htg_ratios.max
1822
- if prev_capacity > 0 # Preserve cfm/ton
1823
- hvac_sizing_values.Heat_Airflow = hvac_sizing_values.Heat_Airflow * hvac_sizing_values.Heat_Capacity / prev_capacity
1824
- else
1825
- hvac_sizing_values.Heat_Airflow = 0.0
1826
- end
1873
+ prev_capacity = hvac_sizing_values.Heat_Capacity
1874
+ hvac_sizing_values.Heat_Capacity *= cap_htg_ratio
1875
+ if prev_capacity > 0 # Preserve cfm/ton
1876
+ hvac_sizing_values.Heat_Airflow = hvac_sizing_values.Heat_Airflow * hvac_sizing_values.Heat_Capacity / prev_capacity
1877
+ else
1878
+ hvac_sizing_values.Heat_Airflow = 0.0
1827
1879
  end
1828
1880
  end
1829
1881
  end
@@ -1838,13 +1890,13 @@ class HVACSizing
1838
1890
  fixed_cooling_capacity = hvac_cooling.cooling_capacity
1839
1891
  end
1840
1892
  if (not fixed_cooling_capacity.nil?) && (hvac_sizing_values.Cool_Capacity > 0)
1841
- prev_capacity = hvac_sizing_values.Cool_Capacity
1842
- hvac_sizing_values.Cool_Capacity = fixed_cooling_capacity
1843
- if @hpxml.header.allow_increased_fixed_capacities
1844
- hvac_sizing_values.Cool_Capacity = [hvac_sizing_values.Cool_Capacity, prev_capacity].max
1893
+ if not (@hpxml_bldg.header.allow_increased_fixed_capacities && hvac_sizing_values.Cool_Capacity > fixed_cooling_capacity)
1894
+ # Use fixed size; proportionally adjust autosized airflow & sensible capacity
1895
+ prev_capacity = hvac_sizing_values.Cool_Capacity
1896
+ hvac_sizing_values.Cool_Capacity = fixed_cooling_capacity
1897
+ hvac_sizing_values.Cool_Airflow *= hvac_sizing_values.Cool_Capacity / prev_capacity
1898
+ hvac_sizing_values.Cool_Capacity_Sens *= hvac_sizing_values.Cool_Capacity / prev_capacity
1845
1899
  end
1846
- hvac_sizing_values.Cool_Capacity_Sens = hvac_sizing_values.Cool_Capacity_Sens * hvac_sizing_values.Cool_Capacity / prev_capacity
1847
- hvac_sizing_values.Cool_Airflow = hvac_sizing_values.Cool_Airflow * hvac_sizing_values.Cool_Capacity / prev_capacity
1848
1900
  end
1849
1901
  if not hvac_heating.nil?
1850
1902
  fixed_heating_capacity = hvac_heating.heating_capacity
@@ -1852,12 +1904,12 @@ class HVACSizing
1852
1904
  fixed_heating_capacity = hvac_cooling.integrated_heating_system_capacity
1853
1905
  end
1854
1906
  if (not fixed_heating_capacity.nil?) && (hvac_sizing_values.Heat_Capacity > 0)
1855
- prev_capacity = hvac_sizing_values.Heat_Capacity
1856
- hvac_sizing_values.Heat_Capacity = fixed_heating_capacity
1857
- if @hpxml.header.allow_increased_fixed_capacities
1858
- hvac_sizing_values.Heat_Capacity = [hvac_sizing_values.Heat_Capacity, prev_capacity].max
1907
+ if not (@hpxml_bldg.header.allow_increased_fixed_capacities && hvac_sizing_values.Heat_Capacity > fixed_heating_capacity)
1908
+ # Use fixed size; proportionally adjust autosized airflow & sensible capacity
1909
+ prev_capacity = hvac_sizing_values.Heat_Capacity
1910
+ hvac_sizing_values.Heat_Capacity = fixed_heating_capacity
1911
+ hvac_sizing_values.Heat_Airflow *= hvac_sizing_values.Heat_Capacity / prev_capacity
1859
1912
  end
1860
- hvac_sizing_values.Heat_Airflow = hvac_sizing_values.Heat_Airflow * hvac_sizing_values.Heat_Capacity / prev_capacity
1861
1913
  end
1862
1914
  if hvac_heating.is_a? HPXML::HeatPump
1863
1915
  if not hvac_heating.backup_heating_capacity.nil?
@@ -1869,10 +1921,15 @@ class HVACSizing
1869
1921
  if (not fixed_supp_heating_capacity.nil?) && (hvac_sizing_values.Heat_Capacity_Supp > 0)
1870
1922
  prev_capacity = hvac_sizing_values.Heat_Capacity_Supp
1871
1923
  hvac_sizing_values.Heat_Capacity_Supp = fixed_supp_heating_capacity
1872
- if @hpxml.header.allow_increased_fixed_capacities
1924
+ if @hpxml_bldg.header.allow_increased_fixed_capacities
1873
1925
  hvac_sizing_values.Heat_Capacity_Supp = [hvac_sizing_values.Heat_Capacity_Supp, prev_capacity].max
1874
1926
  end
1875
- hvac_sizing_values.Heat_Airflow_Supp = hvac_sizing_values.Heat_Airflow_Supp * hvac_sizing_values.Heat_Capacity_Supp / prev_capacity
1927
+ end
1928
+ end
1929
+
1930
+ def self.scale_detailed_performance_data_capacities(detailed_performance_data, scaling_factor)
1931
+ detailed_performance_data.each do |dp|
1932
+ dp.capacity *= scaling_factor
1876
1933
  end
1877
1934
  end
1878
1935
 
@@ -1986,20 +2043,14 @@ class HVACSizing
1986
2043
  end
1987
2044
  end
1988
2045
 
1989
- def self.process_heat_pump_adjustment(hvac_sizing_values, weather, hvac_heating, total_cap_curve_value, hvac_system)
2046
+ def self.process_heat_pump_adjustment(hvac_sizing_values, weather, hvac_heating, total_cap_curve_value, hvac_system, hvac_heating_speed)
1990
2047
  '''
1991
2048
  Adjust heat pump sizing
1992
2049
  '''
1993
2050
 
1994
2051
  hvac_heating_ap = hvac_heating.additional_properties
1995
2052
 
1996
- if hvac_heating_ap.heat_cap_ft_spec.size > 1
1997
- coefficients = hvac_heating_ap.heat_cap_ft_spec[-1]
1998
- capacity_ratio = hvac_heating_ap.heat_capacity_ratios[-1]
1999
- else
2000
- coefficients = hvac_heating_ap.heat_cap_ft_spec[0]
2001
- capacity_ratio = 1.0
2002
- end
2053
+ capacity_ratio = hvac_heating_ap.heat_capacity_ratios[hvac_heating_speed]
2003
2054
 
2004
2055
  if hvac_heating.is_a? HPXML::HeatPump
2005
2056
  if not hvac_heating.backup_heating_switchover_temp.nil?
@@ -2008,23 +2059,31 @@ class HVACSizing
2008
2059
  min_compressor_temp = hvac_heating.compressor_lockout_temp
2009
2060
  end
2010
2061
  end
2011
- if (not min_compressor_temp.nil?) && (min_compressor_temp > @hpxml.header.manualj_heating_design_temp)
2012
- # Calculate the heating load at the switchover temperature to limit uninitialized capacity
2013
- temp_heat_design_temp = @hpxml.header.manualj_heating_design_temp
2014
- @hpxml.header.manualj_heating_design_temp = min_compressor_temp
2015
- _alternate_bldg_design_loads, alternate_all_hvac_sizing_values = calculate(weather, @hpxml, @cfa, [hvac_system])
2062
+ if (not min_compressor_temp.nil?) && (min_compressor_temp > @hpxml_bldg.header.manualj_heating_design_temp)
2063
+ # Calculate the heating load at the switchover temperature to limit unutilized capacity
2064
+ temp_heat_design_temp = @hpxml_bldg.header.manualj_heating_design_temp
2065
+ @hpxml_bldg.header.manualj_heating_design_temp = min_compressor_temp
2066
+ _alternate_bldg_design_loads, alternate_all_hvac_sizing_values = calculate(weather, @hpxml_bldg, @cfa, [hvac_system])
2016
2067
  heating_load = alternate_all_hvac_sizing_values[hvac_system].Heat_Load
2017
2068
  heating_db = min_compressor_temp
2018
- @hpxml.header.manualj_heating_design_temp = temp_heat_design_temp
2069
+ @hpxml_bldg.header.manualj_heating_design_temp = temp_heat_design_temp
2019
2070
  else
2020
2071
  heating_load = hvac_sizing_values.Heat_Load
2021
- heating_db = @hpxml.header.manualj_heating_design_temp
2072
+ heating_db = @hpxml_bldg.header.manualj_heating_design_temp
2022
2073
  end
2023
2074
 
2024
- heat_cap_rated = (heating_load / MathTools.biquadratic(@heat_setpoint, heating_db, coefficients)) / capacity_ratio
2075
+ if hvac_heating.compressor_type == HPXML::HVACCompressorTypeVariableSpeed
2076
+ idb_adj = adjust_indoor_condition_var_speed(heating_db, @heat_setpoint, :htg)
2077
+ odb_adj = adjust_outdoor_condition_var_speed(hvac_heating.heating_detailed_performance_data, heating_db, hvac_heating, :htg)
2078
+ adj_factor = odb_adj * idb_adj
2079
+ else
2080
+ coefficients = hvac_heating_ap.heat_cap_ft_spec[hvac_heating_speed]
2081
+ adj_factor = MathTools.biquadratic(@heat_setpoint, heating_db, coefficients)
2082
+ end
2083
+ heat_cap_rated = (heating_load / adj_factor) / capacity_ratio
2025
2084
 
2026
2085
  if total_cap_curve_value.nil? # Heat pump has no cooling
2027
- if @hpxml.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingMaxLoad
2086
+ if @hpxml_bldg.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingMaxLoad
2028
2087
  # Size based on heating, taking into account reduced heat pump capacity at the design temperature
2029
2088
  hvac_sizing_values.Heat_Capacity = heat_cap_rated
2030
2089
  else
@@ -2036,7 +2095,7 @@ class HVACSizing
2036
2095
  hvac_sizing_values.Heat_Capacity = hvac_sizing_values.Cool_Capacity
2037
2096
  else
2038
2097
  cfm_per_btuh = hvac_sizing_values.Cool_Airflow / hvac_sizing_values.Cool_Capacity
2039
- if @hpxml.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingMaxLoad
2098
+ if @hpxml_bldg.header.heat_pump_sizing_methodology == HPXML::HeatPumpSizingMaxLoad
2040
2099
  # Size based on heating, taking into account reduced heat pump capacity at the design temperature
2041
2100
  hvac_sizing_values.Cool_Capacity = heat_cap_rated
2042
2101
  else
@@ -2058,7 +2117,7 @@ class HVACSizing
2058
2117
  def self.get_ventilation_rates()
2059
2118
  # If CFIS w/ supplemental fan, assume air handler is running most of the hour and can provide
2060
2119
  # all ventilation needs (i.e., supplemental fan does not need to run), so skip supplement fan
2061
- vent_fans_mech = @hpxml.ventilation_fans.select { |f| f.used_for_whole_building_ventilation && !f.is_cfis_supplemental_fan? && f.flow_rate > 0 && f.hours_in_operation > 0 }
2120
+ vent_fans_mech = @hpxml_bldg.ventilation_fans.select { |f| f.used_for_whole_building_ventilation && !f.is_cfis_supplemental_fan? && f.flow_rate > 0 && f.hours_in_operation > 0 }
2062
2121
  if vent_fans_mech.empty?
2063
2122
  return [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
2064
2123
  end
@@ -2110,9 +2169,22 @@ class HVACSizing
2110
2169
  return [tot_unbal_cfm, oa_cfm_preheat, oa_cfm_precool, recirc_cfm_shared, tot_bal_cfm_sens, tot_bal_cfm_lat]
2111
2170
  end
2112
2171
 
2113
- def self.calc_airflow_rate_manual_s(sens_load_or_capacity, deltaT)
2172
+ def self.calc_airflow_rate_manual_s(sens_load_or_capacity, deltaT, rated_capacity_for_cfm_per_ton_limits = nil)
2114
2173
  # Airflow sizing following Manual S based on design calculation
2115
- return sens_load_or_capacity / (1.1 * @acf * deltaT)
2174
+ airflow_rate = sens_load_or_capacity / (1.1 * @acf * deltaT)
2175
+
2176
+ if not rated_capacity_for_cfm_per_ton_limits.nil?
2177
+ rated_capacity_tons = UnitConversions.convert(rated_capacity_for_cfm_per_ton_limits, 'Btu/hr', 'ton')
2178
+ # Ensure the air flow rate is in between 200 and 500 cfm/ton.
2179
+ # Reset the air flow rate (with a safety margin), if required.
2180
+ if airflow_rate / rated_capacity_tons > 500
2181
+ airflow_rate = 499.0 * rated_capacity_tons
2182
+ elsif airflow_rate / rated_capacity_tons < 200
2183
+ airflow_rate = 201.0 * rated_capacity_tons
2184
+ end
2185
+ end
2186
+
2187
+ return airflow_rate
2116
2188
  end
2117
2189
 
2118
2190
  def self.calc_airflow_rate_user(capacity, rated_cfm_per_ton, capacity_ratio)
@@ -2320,19 +2392,20 @@ class HVACSizing
2320
2392
  return [1.08464364, 0.002096954, 0, -0.005766327, 0, -0.000011147]
2321
2393
  end
2322
2394
 
2323
- def self.get_sizing_speed(hvac_cooling_ap)
2324
- if hvac_cooling_ap.respond_to?(:cool_capacity_ratios) && (hvac_cooling_ap.cool_capacity_ratios.size > 1)
2325
- sizing_speed = hvac_cooling_ap.cool_capacity_ratios.size # Default
2326
- sizing_speed_delta = 10 # Initialize
2327
- for speed in 0..(hvac_cooling_ap.cool_capacity_ratios.size - 1)
2328
- # Select curves for sizing using the speed with the capacity ratio closest to 1
2329
- delta = (hvac_cooling_ap.cool_capacity_ratios[speed] - 1).abs
2330
- if delta <= sizing_speed_delta
2331
- sizing_speed = speed
2332
- sizing_speed_delta = delta
2333
- end
2395
+ def self.get_sizing_speed(hvac_ap, is_cooling)
2396
+ if is_cooling && hvac_ap.respond_to?(:cool_capacity_ratios)
2397
+ capacity_ratios = hvac_ap.cool_capacity_ratios
2398
+ elsif (not is_cooling) && hvac_ap.respond_to?(:heat_capacity_ratios)
2399
+ capacity_ratios = hvac_ap.heat_capacity_ratios
2400
+ end
2401
+ if not capacity_ratios.nil?
2402
+ for speed in 0..(capacity_ratios.size - 1)
2403
+ # Select curves for sizing using the speed with the capacity ratio of 1
2404
+ next if capacity_ratios[speed] != 1
2405
+
2406
+ return speed
2334
2407
  end
2335
- return sizing_speed
2408
+ fail 'No speed with capacity ratio of 1.0 found.'
2336
2409
  end
2337
2410
  return 0
2338
2411
  end
@@ -2352,17 +2425,17 @@ class HVACSizing
2352
2425
 
2353
2426
  space_UAs = { HPXML::LocationOutside => 0.0,
2354
2427
  HPXML::LocationGround => 0.0,
2355
- HPXML::LocationLivingSpace => 0.0 }
2428
+ HPXML::LocationConditionedSpace => 0.0 }
2356
2429
 
2357
2430
  # Surface UAs
2358
- (@hpxml.roofs + @hpxml.floors + @hpxml.walls + @hpxml.foundation_walls).each do |surface|
2431
+ (@hpxml_bldg.roofs + @hpxml_bldg.floors + @hpxml_bldg.walls + @hpxml_bldg.foundation_walls).each do |surface|
2359
2432
  next unless ((location == surface.interior_adjacent_to && space_UAs.keys.include?(surface.exterior_adjacent_to)) ||
2360
2433
  (location == surface.exterior_adjacent_to && space_UAs.keys.include?(surface.interior_adjacent_to)))
2361
2434
 
2362
2435
  if [surface.interior_adjacent_to, surface.exterior_adjacent_to].include? HPXML::LocationOutside
2363
2436
  space_UAs[HPXML::LocationOutside] += (1.0 / surface.insulation_assembly_r_value) * surface.area
2364
2437
  elsif HPXML::conditioned_locations.include?(surface.interior_adjacent_to) || HPXML::conditioned_locations.include?(surface.exterior_adjacent_to)
2365
- space_UAs[HPXML::LocationLivingSpace] += (1.0 / surface.insulation_assembly_r_value) * surface.area
2438
+ space_UAs[HPXML::LocationConditionedSpace] += (1.0 / surface.insulation_assembly_r_value) * surface.area
2366
2439
  elsif [surface.interior_adjacent_to, surface.exterior_adjacent_to].include? HPXML::LocationGround
2367
2440
  if surface.is_a? HPXML::FoundationWall
2368
2441
  _u_wall_with_soil, u_wall_without_soil = get_foundation_wall_properties(surface)
@@ -2376,10 +2449,10 @@ class HVACSizing
2376
2449
  if [HPXML::LocationCrawlspaceVented, HPXML::LocationAtticVented].include? location
2377
2450
  # Vented space
2378
2451
  if location == HPXML::LocationCrawlspaceVented
2379
- vented_crawl = @hpxml.foundations.find { |f| f.foundation_type == HPXML::FoundationTypeCrawlspaceVented }
2452
+ vented_crawl = @hpxml_bldg.foundations.find { |f| f.foundation_type == HPXML::FoundationTypeCrawlspaceVented }
2380
2453
  sla = vented_crawl.vented_crawlspace_sla
2381
2454
  else
2382
- vented_attic = @hpxml.attics.find { |f| f.attic_type == HPXML::AtticTypeVented }
2455
+ vented_attic = @hpxml_bldg.attics.find { |f| f.attic_type == HPXML::AtticTypeVented }
2383
2456
  if not vented_attic.vented_attic_sla.nil?
2384
2457
  sla = vented_attic.vented_attic_sla
2385
2458
  else
@@ -2390,9 +2463,9 @@ class HVACSizing
2390
2463
  else # Unvented space
2391
2464
  ach = Airflow.get_default_unvented_space_ach()
2392
2465
  end
2393
- volume = Geometry.calculate_zone_volume(@hpxml, location)
2466
+ volume = Geometry.calculate_zone_volume(@hpxml_bldg, location)
2394
2467
  infiltration_cfm = ach / UnitConversions.convert(1.0, 'hr', 'min') * volume
2395
- outside_air_density = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * (weather.data.AnnualAvgDrybulb + 460.0))
2468
+ outside_air_density = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * UnitConversions.convert(weather.data.AnnualAvgDrybulb, 'F', 'R'))
2396
2469
  space_UAs['infil'] = infiltration_cfm * outside_air_density * Gas.Air.cp * UnitConversions.convert(1.0, 'hr', 'min')
2397
2470
 
2398
2471
  # Total UA
@@ -2417,7 +2490,7 @@ class HVACSizing
2417
2490
  sum_uat += ua * ground_db
2418
2491
  elsif (ua_type == HPXML::LocationOutside) || (ua_type == 'infil')
2419
2492
  sum_uat += ua * design_db
2420
- elsif ua_type == HPXML::LocationLivingSpace
2493
+ elsif ua_type == HPXML::LocationConditionedSpace
2421
2494
  sum_uat += ua * conditioned_design_temp
2422
2495
  elsif ua_type == 'total'
2423
2496
  # skip
@@ -2437,7 +2510,7 @@ class HVACSizing
2437
2510
  max_temp_rise = 50.0
2438
2511
 
2439
2512
  # Estimate from running a few cases in E+ and DOE2 since the
2440
- # attic will always be a little warmer than the living space
2513
+ # attic will always be a little warmer than the conditioned space
2441
2514
  # when the roof is insulated
2442
2515
  min_temp_rise = 5.0
2443
2516
 
@@ -2449,7 +2522,7 @@ class HVACSizing
2449
2522
  space_UAs.each do |ua_type, ua|
2450
2523
  if (ua_type == HPXML::LocationOutside) || (ua_type == 'infil')
2451
2524
  ua_outside += ua
2452
- elsif ua_type == HPXML::LocationLivingSpace
2525
+ elsif ua_type == HPXML::LocationConditionedSpace
2453
2526
  ua_conditioned += ua
2454
2527
  elsif not ((ua_type == 'total') || (ua_type == HPXML::LocationGround))
2455
2528
  fail "Unexpected space ua type: '#{ua_type}'."
@@ -2670,15 +2743,25 @@ class HVACSizing
2670
2743
  beta_1 = -0.94467
2671
2744
  end
2672
2745
 
2673
- r_value_ground = Math.log(bore_spacing / hvac_cooling_ap.bore_diameter * 12.0) / 2.0 / Math::PI / @hpxml.site.ground_conductivity
2746
+ r_value_ground = Math.log(bore_spacing / hvac_cooling_ap.bore_diameter * 12.0) / 2.0 / Math::PI / @hpxml_bldg.site.ground_conductivity
2674
2747
  r_value_grout = 1.0 / hvac_cooling_ap.grout_conductivity / beta_0 / ((hvac_cooling_ap.bore_diameter / hvac_cooling_ap.pipe_od)**beta_1)
2675
2748
  r_value_bore = r_value_grout + pipe_r_value / 2.0 # Note: Convection resistance is negligible when calculated against Glhepro (Jeffrey D. Spitler, 2000)
2676
2749
 
2677
- rtf_DesignMon_Heat = [0.25, (71.0 - weather.data.MonthlyAvgDrybulbs[0]) / @htd].max
2678
- rtf_DesignMon_Cool = [0.25, (weather.data.MonthlyAvgDrybulbs[6] - 76.0) / @ctd].max
2750
+ is_southern_hemisphere = (weather.header.Latitude < 0)
2679
2751
 
2680
- nom_length_heat = (1.0 - hvac_cooling_ap.heat_rated_eirs[0]) * (r_value_bore + r_value_ground * rtf_DesignMon_Heat) / (weather.data.AnnualAvgDrybulb - (2.0 * hvac_cooling_ap.design_hw - hvac_cooling_ap.design_delta_t) / 2.0) * UnitConversions.convert(1.0, 'ton', 'Btu/hr')
2681
- nom_length_cool = (1.0 + hvac_cooling_ap.cool_rated_eirs[0]) * (r_value_bore + r_value_ground * rtf_DesignMon_Cool) / ((2.0 * hvac_cooling_ap.design_chw + hvac_cooling_ap.design_delta_t) / 2.0 - weather.data.AnnualAvgDrybulb) * UnitConversions.convert(1.0, 'ton', 'Btu/hr')
2752
+ if is_southern_hemisphere
2753
+ heating_month = 6 # July
2754
+ cooling_month = 0 # January
2755
+ else
2756
+ heating_month = 0 # January
2757
+ cooling_month = 6 # July
2758
+ end
2759
+
2760
+ rtf_DesignMon_Heat = [0.25, (71.0 - weather.data.MonthlyAvgDrybulbs[heating_month]) / @htd].max
2761
+ rtf_DesignMon_Cool = [0.25, (weather.data.MonthlyAvgDrybulbs[cooling_month] - 76.0) / @ctd].max
2762
+
2763
+ nom_length_heat = (1.0 - 1.0 / hvac_cooling_ap.heat_rated_cops[0]) * (r_value_bore + r_value_ground * rtf_DesignMon_Heat) / (weather.data.DeepGroundAnnualTemp - (2.0 * hvac_cooling_ap.design_hw - hvac_cooling_ap.design_delta_t) / 2.0) * UnitConversions.convert(1.0, 'ton', 'Btu/hr')
2764
+ nom_length_cool = (1.0 + 1.0 / hvac_cooling_ap.cool_rated_cops[0]) * (r_value_bore + r_value_ground * rtf_DesignMon_Cool) / ((2.0 * hvac_cooling_ap.design_chw + hvac_cooling_ap.design_delta_t) / 2.0 - weather.data.DeepGroundAnnualTemp) * UnitConversions.convert(1.0, 'ton', 'Btu/hr')
2682
2765
 
2683
2766
  return nom_length_heat, nom_length_cool
2684
2767
  end
@@ -3024,36 +3107,42 @@ class HVACSizing
3024
3107
 
3025
3108
  if not foundation_wall.insulation_assembly_r_value.nil?
3026
3109
  wall_constr_rvalue = foundation_wall.insulation_assembly_r_value - Material.AirFilmVertical.rvalue
3027
- wall_ins_rvalues = []
3028
- wall_ins_offsets = []
3029
- wall_ins_heights = []
3110
+ wall_ins_rvalue_int, wall_ins_rvalue_ext = 0, 0
3111
+ wall_ins_dist_to_top_int, wall_ins_dist_to_top_ext = 0, 0
3112
+ wall_ins_dist_to_bottom_int, wall_ins_dist_to_bottom_ext = 0, 0
3030
3113
  else
3031
3114
  wall_constr_rvalue = Material.Concrete(foundation_wall.thickness).rvalue
3032
- wall_ins_rvalues = [foundation_wall.insulation_interior_r_value,
3033
- foundation_wall.insulation_exterior_r_value]
3034
- wall_ins_offsets = [foundation_wall.insulation_interior_distance_to_top,
3035
- foundation_wall.insulation_exterior_distance_to_top]
3036
- wall_ins_heights = [foundation_wall.insulation_interior_distance_to_bottom - foundation_wall.insulation_interior_distance_to_top,
3037
- foundation_wall.insulation_exterior_distance_to_bottom - foundation_wall.insulation_exterior_distance_to_top]
3115
+ wall_ins_rvalue_int = foundation_wall.insulation_interior_r_value
3116
+ wall_ins_rvalue_ext = foundation_wall.insulation_exterior_r_value
3117
+ wall_ins_dist_to_top_int = foundation_wall.insulation_interior_distance_to_top
3118
+ wall_ins_dist_to_top_ext = foundation_wall.insulation_exterior_distance_to_top
3119
+ wall_ins_dist_to_bottom_int = foundation_wall.insulation_interior_distance_to_bottom
3120
+ wall_ins_dist_to_bottom_ext = foundation_wall.insulation_exterior_distance_to_bottom
3038
3121
  end
3039
- k_soil = @hpxml.site.ground_conductivity
3122
+ k_soil = @hpxml_bldg.site.ground_conductivity
3040
3123
 
3041
3124
  # Calculated based on Manual J 8th Ed. procedure in section A12-4 (15% decrease due to soil thermal storage)
3042
3125
  u_wall_with_soil = 0.0
3043
3126
  u_wall_without_soil = 0.0
3044
3127
  wall_height = foundation_wall.height.ceil
3045
- for d in 1..wall_height
3046
- r_soil = (Math::PI * d / 2.0) / k_soil
3047
-
3128
+ wall_depth_above_grade = foundation_wall.height - foundation_wall.depth_below_grade
3129
+ for distance_to_top in 1..wall_height
3048
3130
  # Calculate R-wall at this depth
3049
3131
  r_wall = wall_constr_rvalue + Material.AirFilmVertical.rvalue # Base wall construction + interior film
3050
- if d <= (foundation_wall.height - foundation_wall.depth_below_grade)
3051
- r_wall += Material.AirFilmOutside.rvalue # Above-grade, add exterior film
3132
+ if distance_to_top <= wall_depth_above_grade
3133
+ # Above-grade: no soil, add exterior film
3134
+ r_soil = 0.0
3135
+ r_wall += Material.AirFilmOutside.rvalue
3136
+ else
3137
+ # Below-grade: add soil, no exterior film
3138
+ distance_to_grade = distance_to_top - wall_depth_above_grade
3139
+ r_soil = (Math::PI * distance_to_grade / 2.0) / k_soil
3052
3140
  end
3053
- for i in 0..wall_ins_rvalues.size - 1
3054
- if (d > wall_ins_offsets[i]) && (d <= wall_ins_offsets[i] + wall_ins_heights[i])
3055
- r_wall += wall_ins_rvalues[i] # Insulation at this depth, add R-value
3056
- end
3141
+ if (distance_to_top > wall_ins_dist_to_top_int) && (distance_to_top <= wall_ins_dist_to_bottom_int)
3142
+ r_wall += wall_ins_rvalue_int # Interior insulation at this depth, add R-value
3143
+ end
3144
+ if (distance_to_top > wall_ins_dist_to_top_ext) && (distance_to_top <= wall_ins_dist_to_bottom_ext)
3145
+ r_wall += wall_ins_rvalue_ext # Interior insulation at this depth, add R-value
3057
3146
  end
3058
3147
  u_wall_with_soil += 1.0 / (r_soil + r_wall)
3059
3148
  u_wall_without_soil += 1.0 / r_wall
@@ -3121,7 +3210,7 @@ class HVACSizing
3121
3210
  u_effective << 1.0 / r_air_to_air
3122
3211
  end
3123
3212
 
3124
- f_values << u_effective.inject(0, :+) # sum array
3213
+ f_values << u_effective.sum
3125
3214
  end
3126
3215
 
3127
3216
  return f_values.sum() / f_values.size
@@ -3151,7 +3240,7 @@ class HVACSizing
3151
3240
  @fraction_heat_load_served = 0
3152
3241
  elsif hvac_heating.is_a?(HPXML::HeatingSystem) && hvac_heating.is_heat_pump_backup_system
3153
3242
  # Use the same load fractions as the heat pump
3154
- heat_pump = @hpxml.heat_pumps.find { |hp| hp.backup_system_idref == hvac_heating.id }
3243
+ heat_pump = @hpxml_bldg.heat_pumps.find { |hp| hp.backup_system_idref == hvac_heating.id }
3155
3244
  @fraction_heat_load_served = heat_pump.fraction_heat_load_served
3156
3245
  else
3157
3246
  @fraction_heat_load_served = hvac_heating.fraction_heat_load_served
@@ -3177,10 +3266,8 @@ end
3177
3266
  class HVACSizingValues
3178
3267
  def initialize
3179
3268
  end
3180
- attr_accessor(:Cool_Load_Sens, :Cool_Load_Lat, :Cool_Load_Tot,
3181
- :Cool_Capacity, :Cool_Capacity_Sens, :Cool_Airflow,
3182
- :Heat_Load, :Heat_Load_Supp, :Heat_Capacity, :Heat_Capacity_Supp,
3183
- :Heat_Airflow, :Heat_Airflow_Supp,
3269
+ attr_accessor(:Cool_Load_Sens, :Cool_Load_Lat, :Cool_Load_Tot, :Cool_Capacity, :Cool_Capacity_Sens, :Cool_Airflow,
3270
+ :Heat_Load, :Heat_Load_Supp, :Heat_Capacity, :Heat_Capacity_Supp, :Heat_Airflow,
3184
3271
  :GSHP_Loop_flow, :GSHP_Bore_Holes, :GSHP_Bore_Depth, :GSHP_G_Functions)
3185
3272
  end
3186
3273