Skip to content

Commit e662d6f

Browse files
authored
Merge pull request #2185 from NatLabRockies/hot_water_gallons_with_solar_fraction
Fix incorrect hot water (gallons) output for solar thermal system using `SolarFraction`
2 parents 522a709 + a90387b commit e662d6f

File tree

6 files changed

+24
-16
lines changed

6 files changed

+24
-16
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ __Bugfixes__
2525
- Fixes handling of zero occupants (i.e., unoccupied dwelling unit):
2626
- Fixes lighting and plug/fuel load energy use to not be zeroed out when a kWh/year or therm/year value is provided.
2727
- Fixes pool/spa energy use to be zeroed out when a kWh/year or therm/year value is not provided, or when there is a "Vacancy" unavailable period.
28+
- Fixes incorrect hot water (gallons) output for solar thermal systems using `SolarFraction`.
2829

2930
## OpenStudio-HPXML v1.11.1
3031

HPXMLtoOpenStudio/measure.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>hpxm_lto_openstudio</name>
55
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
6-
<version_id>327faec4-f087-4b81-8f98-270832317762</version_id>
7-
<version_modified>2026-03-26T20:59:14Z</version_modified>
6+
<version_id>b8aac72a-cd4d-436f-a9ed-650836e45a3d</version_id>
7+
<version_modified>2026-03-31T20:30:11Z</version_modified>
88
<xml_checksum>D8922A73</xml_checksum>
99
<class_name>HPXMLtoOpenStudio</class_name>
1010
<display_name>HPXML to OpenStudio Translator</display_name>
@@ -397,7 +397,7 @@
397397
<filename>hotwater_appliances.rb</filename>
398398
<filetype>rb</filetype>
399399
<usage_type>resource</usage_type>
400-
<checksum>5603A915</checksum>
400+
<checksum>5F185DC6</checksum>
401401
</file>
402402
<file>
403403
<filename>hpxml.rb</filename>

HPXMLtoOpenStudio/resources/hotwater_appliances.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def self.apply(runner, model, weather, spaces, hpxml_bldg, hpxml_header, schedul
397397
end
398398

399399
# Fixtures (showers, sinks, baths)
400-
Model.add_water_use_equipment(
400+
fx_wue = Model.add_water_use_equipment(
401401
model,
402402
name: fixtures_obj_name,
403403
end_use: fixtures_obj_name,
@@ -406,9 +406,10 @@ def self.apply(runner, model, weather, spaces, hpxml_bldg, hpxml_header, schedul
406406
water_use_connections: water_use_connections[water_heating_system.id],
407407
target_temperature_schedule: mw_temp_schedule
408408
)
409+
fx_wue.additionalProperties.setFeature('HPXML_ID', water_heating_system.id) # Used by reporting measure
409410

410411
# Distribution waste (primary driven by fixture draws)
411-
Model.add_water_use_equipment(
412+
dist_wue = Model.add_water_use_equipment(
412413
model,
413414
name: Constants::ObjectTypeDistributionWaste,
414415
end_use: Constants::ObjectTypeDistributionWaste,
@@ -417,6 +418,7 @@ def self.apply(runner, model, weather, spaces, hpxml_bldg, hpxml_header, schedul
417418
water_use_connections: water_use_connections[water_heating_system.id],
418419
target_temperature_schedule: mw_temp_schedule
419420
)
421+
dist_wue.additionalProperties.setFeature('HPXML_ID', water_heating_system.id) # Used by reporting measure
420422

421423
# Recirculation pump
422424
recirc_pump_annual_kwh = get_hwdist_recirc_pump_energy(hpxml_bldg)
@@ -480,7 +482,7 @@ def self.apply(runner, model, weather, spaces, hpxml_bldg, hpxml_header, schedul
480482
water_cw_schedule = cw_schedule_obj.schedule
481483
end
482484

483-
Model.add_water_use_equipment(
485+
cw_wue = Model.add_water_use_equipment(
484486
model,
485487
name: cw_object_name,
486488
end_use: cw_object_name,
@@ -489,6 +491,7 @@ def self.apply(runner, model, weather, spaces, hpxml_bldg, hpxml_header, schedul
489491
water_use_connections: water_use_connections[water_heating_system.id],
490492
target_temperature_schedule: nil
491493
)
494+
cw_wue.additionalProperties.setFeature('HPXML_ID', water_heating_system.id) # Used by reporting measure
492495
end
493496
end
494497

@@ -516,7 +519,7 @@ def self.apply(runner, model, weather, spaces, hpxml_bldg, hpxml_header, schedul
516519
water_dw_schedule = dw_schedule_obj.schedule
517520
end
518521

519-
Model.add_water_use_equipment(
522+
dw_wue = Model.add_water_use_equipment(
520523
model,
521524
name: dw_obj_name,
522525
end_use: dw_obj_name,
@@ -525,6 +528,7 @@ def self.apply(runner, model, weather, spaces, hpxml_bldg, hpxml_header, schedul
525528
water_use_connections: water_use_connections[water_heating_system.id],
526529
target_temperature_schedule: nil
527530
)
531+
dw_wue.additionalProperties.setFeature('HPXML_ID', water_heating_system.id) # Used by reporting measure
528532
end
529533
end
530534

ReportSimulationOutput/measure.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ def get_outputs(runner, args)
955955
end
956956

957957
@hpxml_bldgs.each do |hpxml_bldg|
958-
# Apply solar fraction to load for simple solar water heating systems
958+
# Apply solar fraction to load and hot water uses for simple solar water heating systems
959959
hpxml_bldg.solar_thermal_systems.each do |solar_system|
960960
next if solar_system.solar_fraction.nil?
961961

@@ -969,6 +969,9 @@ def get_outputs(runner, args)
969969
end
970970
dhw_ids.each do |dhw_id|
971971
apply_multiplier_to_output(@loads[LT::HotWaterDelivered], [@loads[LT::HotWaterSolarThermal]], dhw_id, nil, 1.0 / (1.0 - solar_system.solar_fraction))
972+
@hot_water_uses.each do |_hot_water_type, hot_water|
973+
apply_multiplier_to_output(hot_water, [], dhw_id, nil, 1.0 / (1.0 - solar_system.solar_fraction))
974+
end
972975
end
973976
end
974977
end

ReportSimulationOutput/measure.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>report_simulation_output</name>
55
<uid>df9d170c-c21a-4130-866d-0d46b06073fd</uid>
6-
<version_id>0cb6a618-1f85-421b-baa7-eff278f46320</version_id>
7-
<version_modified>2026-03-19T22:46:27Z</version_modified>
6+
<version_id>1079d5e6-b3cf-4cfe-9edb-25648c7cfe5f</version_id>
7+
<version_modified>2026-03-31T20:30:18Z</version_modified>
88
<xml_checksum>9BF1E6AC</xml_checksum>
99
<class_name>ReportSimulationOutput</class_name>
1010
<display_name>HPXML Simulation Output Report</display_name>
@@ -2029,7 +2029,7 @@
20292029
<filename>measure.rb</filename>
20302030
<filetype>rb</filetype>
20312031
<usage_type>script</usage_type>
2032-
<checksum>6D8B2252</checksum>
2032+
<checksum>58B64AA8</checksum>
20332033
</file>
20342034
<file>
20352035
<filename>test_report_sim_output.rb</filename>

workflow/tests/base_results/results_simulations_misc.csv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ base-dhw-indirect-detailed-setpoints.xml,0.0,0.0,0.0,1126.5,793.4,10132.0,3482.9
9292
base-dhw-indirect-dse.xml,0.0,0.0,0.0,1030.4,723.9,9285.9,3192.0,1296.3,1157.9,1296.3,1296.3,1157.9,1296.3,16805.0,0.0,0.0
9393
base-dhw-indirect-outside.xml,0.0,0.0,0.0,1030.5,724.2,9286.8,3192.3,1290.6,1157.6,1290.6,1290.6,1157.6,1290.6,17064.0,0.0,0.0
9494
base-dhw-indirect-standbyloss.xml,0.0,0.0,0.0,1030.5,723.9,9286.5,3192.2,1289.8,1157.9,1289.8,1289.8,1157.9,1289.8,16782.0,0.0,0.0
95-
base-dhw-indirect-with-solar-fraction.xml,0.0,0.0,0.0,373.2,258.5,3248.6,1116.7,1290.3,1157.7,1290.3,1290.3,1157.7,1290.3,16970.0,0.0,0.0
95+
base-dhw-indirect-with-solar-fraction.xml,0.0,0.0,0.0,1066.3,738.7,9281.6,3190.5,1290.3,1157.7,1290.3,1290.3,1157.7,1290.3,16970.0,0.0,0.0
9696
base-dhw-indirect.xml,0.0,0.0,0.0,1030.4,723.9,9285.9,3192.0,1289.8,1157.9,1289.8,1289.8,1157.9,1289.8,16805.0,0.0,0.0
9797
base-dhw-jacket-electric.xml,0.0,85.0,0.0,1286.4,890.5,11468.6,3942.3,2340.9,3849.6,3849.6,2340.9,3849.6,3849.6,33376.0,23003.0,0.0
9898
base-dhw-jacket-gas.xml,0.0,90.0,0.0,1286.4,890.5,11468.7,3942.3,1484.0,3351.7,3351.7,1484.0,3351.7,3351.7,34008.0,23009.0,0.0
9999
base-dhw-jacket-hpwh.xml,0.0,57.0,0.0,1286.4,890.5,10922.8,3754.7,1915.7,3735.2,3735.2,1915.7,3735.2,3735.2,36104.0,22706.0,0.0
100100
base-dhw-jacket-indirect.xml,0.0,0.0,0.0,1030.5,724.1,9292.3,3194.2,1290.0,1157.9,1290.0,1290.0,1157.9,1290.0,16829.0,0.0,0.0
101101
base-dhw-low-flow-fixtures.xml,0.0,87.0,0.0,1286.4,890.5,10895.1,3745.2,2338.0,3775.0,3775.0,2338.0,3775.0,3775.0,33302.0,23005.0,0.0
102-
base-dhw-multiple.xml,0.0,0.0,0.0,447.9,310.0,4017.0,1380.8,2151.7,2013.1,2151.7,2151.7,2013.1,2151.7,17323.0,0.0,0.0
102+
base-dhw-multiple.xml,0.0,0.0,0.0,1279.8,885.8,11477.0,3945.2,2151.7,2013.1,2151.7,2151.7,2013.1,2151.7,17323.0,0.0,0.0
103103
base-dhw-none.xml,0.0,78.0,0.0,0.0,0.0,0.0,0.0,1383.3,3259.2,3259.2,1383.3,3259.2,3259.2,33487.0,22998.0,0.0
104104
base-dhw-recirc-demand-scheduled.xml,0.0,87.0,0.0,1286.4,890.5,11468.6,1281.2,2287.3,3801.5,3801.5,2287.3,3801.5,3801.5,33303.0,23005.0,0.0
105105
base-dhw-recirc-demand.xml,0.0,87.0,0.0,1286.4,890.5,11468.6,1281.2,2287.3,3801.5,3801.5,2287.3,3801.5,3801.5,33303.0,23005.0,0.0
@@ -111,7 +111,7 @@ base-dhw-setpoint-temperature.xml,0.0,90.0,0.0,1286.4,890.5,9980.5,3430.8,2315.6
111111
base-dhw-solar-direct-evacuated-tube.xml,0.0,88.0,0.0,1286.3,890.4,11388.2,3914.7,2337.6,3383.6,3383.6,2337.6,3383.6,3383.6,33304.0,23005.0,0.0
112112
base-dhw-solar-direct-flat-plate.xml,0.0,90.0,0.0,1286.0,890.2,10691.6,3675.2,2200.1,3383.6,3383.6,2200.1,3383.6,3383.6,33302.0,23006.0,0.0
113113
base-dhw-solar-direct-ics.xml,0.0,90.0,0.0,1286.4,890.4,11138.8,3828.9,2344.2,3383.6,3383.6,2344.2,3383.6,3383.6,33306.0,23005.0,0.0
114-
base-dhw-solar-fraction.xml,0.0,83.0,0.0,450.3,311.7,4014.0,1379.8,1884.0,3753.7,3753.7,1884.0,3753.7,3753.7,33416.0,23002.0,0.0
114+
base-dhw-solar-fraction.xml,0.0,83.0,0.0,1286.4,890.5,11468.6,3942.3,1884.0,3753.7,3753.7,1884.0,3753.7,3753.7,33416.0,23002.0,0.0
115115
base-dhw-solar-indirect-flat-plate.xml,0.0,101.0,0.0,1286.0,890.1,10798.5,3711.9,1984.2,3383.7,3383.7,1984.2,3383.7,3383.7,33352.0,23016.0,0.0
116116
base-dhw-solar-thermosyphon-flat-plate.xml,0.0,90.0,0.0,1286.1,890.2,10716.9,3683.9,2186.8,3351.6,3351.6,2186.8,3351.6,3351.6,33302.0,23006.0,0.0
117117
base-dhw-tank-coal.xml,0.0,96.0,0.0,1286.4,890.5,11468.8,3942.4,1483.0,3351.7,3351.7,1483.0,3351.7,3351.7,33900.0,23012.0,0.0
@@ -128,7 +128,7 @@ base-dhw-tank-heat-pump-ducting.xml,1.0,112.0,0.0,1286.4,890.5,10967.0,3769.9,18
128128
base-dhw-tank-heat-pump-ef.xml,0.0,66.0,0.0,1286.4,890.5,10994.7,3779.4,1903.3,3768.5,3768.5,1903.3,3768.5,3768.5,36071.0,22795.0,0.0
129129
base-dhw-tank-heat-pump-operating-mode-heat-pump-only.xml,0.0,66.0,0.0,1286.4,890.5,10994.7,3779.4,1903.3,3768.5,3768.5,1903.3,3768.5,3768.5,36071.0,22795.0,0.0
130130
base-dhw-tank-heat-pump-outside.xml,0.0,81.0,0.0,1286.4,890.5,11190.6,3846.7,2644.8,3584.5,3584.5,2644.8,3584.5,3584.5,33477.0,23000.0,0.0
131-
base-dhw-tank-heat-pump-with-solar-fraction.xml,0.0,74.0,0.0,450.3,311.7,3880.8,1334.0,1901.8,3527.7,3527.7,1901.8,3527.7,3527.7,35047.0,23002.0,0.0
131+
base-dhw-tank-heat-pump-with-solar-fraction.xml,0.0,74.0,0.0,1286.4,890.5,11087.9,3811.4,1901.8,3527.7,3527.7,1901.8,3527.7,3527.7,35047.0,23002.0,0.0
132132
base-dhw-tank-heat-pump-with-solar.xml,0.0,103.0,0.0,1286.0,890.1,11904.0,4091.9,1917.0,3354.7,3354.7,1917.0,3354.7,3354.7,36066.0,23017.0,0.0
133133
base-dhw-tank-heat-pump.xml,0.0,53.0,0.0,1286.4,890.5,10972.4,3771.7,1900.6,3685.8,3685.8,1900.6,3685.8,3685.8,35982.0,23038.0,0.0
134134
base-dhw-tank-model-type-stratified-detailed-occupancy-stochastic.xml,0.0,96.0,0.0,1286.4,890.5,11158.5,3835.7,6231.7,6649.9,6890.3,6231.7,6649.9,6890.3,36215.0,22887.0,0.0
@@ -140,7 +140,7 @@ base-dhw-tankless-electric-ef.xml,0.0,81.0,0.0,1286.4,890.5,11466.0,3941.4,2131.
140140
base-dhw-tankless-electric-outside.xml,0.0,81.0,0.0,1286.4,890.5,11466.0,3941.4,2117.9,3813.8,3813.8,2117.9,3813.8,3813.8,33477.0,23000.0,0.0
141141
base-dhw-tankless-electric.xml,0.0,81.0,0.0,1286.4,890.5,11466.0,3941.4,2103.9,3804.0,3804.0,2103.9,3804.0,3804.0,33477.0,23000.0,0.0
142142
base-dhw-tankless-gas-ef.xml,0.0,81.0,0.0,1286.4,890.5,11466.0,3941.4,1479.2,3351.6,3351.6,1479.2,3351.6,3351.6,33477.0,23000.0,0.0
143-
base-dhw-tankless-gas-with-solar-fraction.xml,0.0,81.0,0.0,450.3,311.7,4013.1,1379.5,1479.2,3351.6,3351.6,1479.2,3351.6,3351.6,33477.0,23000.0,0.0
143+
base-dhw-tankless-gas-with-solar-fraction.xml,0.0,81.0,0.0,1286.4,890.5,11466.0,3941.4,1479.2,3351.6,3351.6,1479.2,3351.6,3351.6,33477.0,23000.0,0.0
144144
base-dhw-tankless-gas-with-solar.xml,0.0,90.0,0.0,1276.0,881.8,10180.1,3499.4,1479.5,3351.7,3351.7,1479.5,3351.7,3351.7,33523.0,23009.0,0.0
145145
base-dhw-tankless-gas.xml,0.0,81.0,0.0,1286.4,890.5,11466.0,3941.4,1479.2,3351.6,3351.6,1479.2,3351.6,3351.6,33477.0,23000.0,0.0
146146
base-dhw-tankless-propane.xml,0.0,81.0,0.0,1286.4,890.5,11466.0,3941.4,1479.2,3351.6,3351.6,1479.2,3351.6,3351.6,33477.0,23000.0,0.0

0 commit comments

Comments
 (0)