@@ -2181,21 +2181,27 @@ else # run HiGHS tests
21812181 boiler_fuel_consumption_calculated = results[" ExistingBoiler" ][" annual_fuel_consumption_mmbtu" ]
21822182 boiler_thermal_series = results[" ExistingBoiler" ][" thermal_production_series_mmbtu_per_hour" ]
21832183 boiler_to_load_series = results[" ExistingBoiler" ][" thermal_to_load_series_mmbtu_per_hour" ]
2184+ boiler_to_chiller_series = results[" ExistingBoiler" ][" thermal_to_absorption_chiller_series_mmbtu_per_hour" ]
21842185 boiler_thermal_to_tes_series = results[" ExistingBoiler" ][" thermal_to_storage_series_mmbtu_per_hour" ]
21852186 chp_thermal_to_load_series = results[" CHP" ][" thermal_to_load_series_mmbtu_per_hour" ]
21862187 chp_thermal_to_tes_series = results[" CHP" ][" thermal_to_storage_series_mmbtu_per_hour" ]
21872188 chp_thermal_to_waste_series = results[" CHP" ][" thermal_curtailed_series_mmbtu_per_hour" ]
2189+ chp_thermal_to_chiller_series = results[" CHP" ][" thermal_to_absorption_chiller_series_mmbtu_per_hour" ]
21882190 absorpchl_thermal_series = results[" AbsorptionChiller" ][" thermal_consumption_series_mmbtu_per_hour" ]
21892191 hot_tes_mmbtu_per_hour_to_load_series = results[" HotThermalStorage" ][" storage_to_load_series_mmbtu_per_hour" ]
21902192 tes_inflows = sum (chp_thermal_to_tes_series) + sum (boiler_thermal_to_tes_series)
21912193 total_chp_production = sum (chp_thermal_to_load_series) + sum (chp_thermal_to_waste_series) + sum (chp_thermal_to_tes_series)
21922194 tes_outflows = sum (hot_tes_mmbtu_per_hour_to_load_series)
2195+ total_chp_production = sum (chp_thermal_to_load_series) + sum (chp_thermal_to_waste_series) + sum (chp_thermal_to_tes_series) + sum (chp_thermal_to_chiller_series)
2196+ tes_outflows = sum (hot_tes_mmbtu_per_hour_to_load_series) + sum (hot_tes_mmbtu_per_hour_to_chiller_series)
21932197 total_thermal_expected = boiler_thermal_load_mmbtu_total + sum (chp_thermal_to_waste_series) + tes_inflows + sum (absorpchl_thermal_series)
21942198 boiler_fuel_expected = (total_thermal_expected - total_chp_production - tes_outflows) / inputs. s. existing_boiler. efficiency
21952199 total_thermal_mmbtu_calculated = sum (boiler_thermal_series) + total_chp_production + tes_outflows
2200+ total_absorption_chiller_input = sum (chp_thermal_to_chiller_series) + sum (boiler_to_chiller_series)
21962201
21972202 @test round (boiler_fuel_consumption_calculated, digits= 0 ) ≈ boiler_fuel_expected atol= 8.0
21982203 @test round (total_thermal_mmbtu_calculated, digits= 0 ) ≈ total_thermal_expected atol= 8.0
2204+ @test round (sum (absorpchl_thermal_series), digits= 0 ) ≈ total_absorption_chiller_input atol= 8.0
21992205
22002206 # Test CHP["cooling_thermal_factor"] = 0.8, AbsorptionChiller["cop_thermal"] = 0.7 (from inputs .json)
22012207 absorpchl_heat_in_kwh = results[" AbsorptionChiller" ][" annual_thermal_consumption_mmbtu" ] * REopt. KWH_PER_MMBTU
@@ -3264,7 +3270,7 @@ else # run HiGHS tests
32643270 results = run_reopt (m, inputs)
32653271
32663272 thermal_techs = [" ExistingBoiler" , " CHP" , " SteamTurbine" ]
3267- thermal_loads = [" load" , " storage " , " steamturbine " , " waste" ] # We don't track AbsorptionChiller thermal consumption by tech
3273+ thermal_loads = [" load" , " steamturbine " , " storage " , " waste" , " absorption_chiller " ]
32683274 tech_to_thermal_load = Dict {Any, Any} ()
32693275 for tech in thermal_techs
32703276 tech_to_thermal_load[tech] = Dict {Any, Any} ()
@@ -3282,9 +3288,11 @@ else # run HiGHS tests
32823288 end
32833289 # Hot TES is the other thermal supply
32843290 hottes_to_load = results[" HotThermalStorage" ][" storage_to_load_series_mmbtu_per_hour" ]
3291+ hottes_to_turbine = results[" HotThermalStorage" ][" storage_to_steamturbine_series_mmbtu_per_hour" ]
3292+ hottes_to_chiller = results[" HotThermalStorage" ][" storage_to_absorption_chiller_series_mmbtu_per_hour" ]
32853293
32863294 # BAU boiler loads
3287- load_boiler_fuel = s. space_heating_load. loads_kw / input_data[" ExistingBoiler" ][" efficiency" ] ./ REopt. KWH_PER_MMBTU
3295+ load_boiler_fuel = s. space_heating_load. loads_kw . / input_data[" ExistingBoiler" ][" efficiency" ] ./ REopt. KWH_PER_MMBTU
32883296 load_boiler_thermal = load_boiler_fuel .* input_data[" ExistingBoiler" ][" efficiency" ]
32893297
32903298 # Fuel/thermal **consumption**
@@ -3295,12 +3303,15 @@ else # run HiGHS tests
32953303
32963304 # Check that all thermal supply to load meets the BAU load plus AbsorptionChiller load which is not explicitly tracked
32973305 alltechs_thermal_to_load_total = sum ([sum (tech_to_thermal_load[tech][" load" ]) for tech in thermal_techs]) + sum (hottes_to_load)
3298- thermal_load_total = sum (load_boiler_thermal) + sum (absorptionchiller_thermal_in)
3306+ thermal_load_total = sum (load_boiler_thermal)
32993307 @test alltechs_thermal_to_load_total ≈ thermal_load_total rtol= 1e-5
33003308
33013309 # Check that all thermal to steam turbine is equal to steam turbine thermal consumption
3302- alltechs_thermal_to_steamturbine_total = sum ([sum (tech_to_thermal_load[tech][" steamturbine" ]) for tech in [" ExistingBoiler" , " CHP" ]])
3310+ alltechs_thermal_to_steamturbine_total = sum ([sum (tech_to_thermal_load[tech][" steamturbine" ]) for tech in [" ExistingBoiler" , " CHP" ]]) + sum (hottes_to_turbine)
33033311 @test alltechs_thermal_to_steamturbine_total ≈ sum (steamturbine_thermal_in) atol= 3
3312+
3313+ alltechs_thermal_to_absorption_chiller_total = sum ([sum (tech_to_thermal_load[tech][" absorption_chiller" ]) for tech in thermal_techs]) + sum (hottest_to_absorption_chiller)
3314+ @test alltechs_thermal_to_absorption_chiller_total ≈ sum (absorptionchiller_thermal_in) atol= 3
33043315
33053316 # Check that "thermal_to_steamturbine" is zero for each tech which has input of can_supply_steam_turbine as False
33063317 for tech in [" ExistingBoiler" , " CHP" ]
0 commit comments