Skip to content

Further Waste Heat Usage Integration and HP changes from develop applied - #132

Open
philippnim wants to merge 2 commits into
Projekt_berlinfrom
Projekt_berlin_wasteheat_HP
Open

Further Waste Heat Usage Integration and HP changes from develop applied#132
philippnim wants to merge 2 commits into
Projekt_berlinfrom
Projekt_berlin_wasteheat_HP

Conversation

@philippnim

Copy link
Copy Markdown
Contributor

INFO:

  • Everything seems to be working, but it has not been tested extensively.
  • Currently, the COPs for the central heat pumps and compression chillers are not working properly and need a rework.
  • One fix could be determining the heat grid temperature for the whole year. Then the COP could be calculated for the whole year as well and clustered before opti_central.
  • The current error also leads to the wrong COP values being used for the new WasteHeatHP, as well as the wrong values being used for the waste heat timeseries. They are calculated for the clustered weeks, but should rather be calculated for the whole year and clustered before opti_central.
  • All relevant places should be marked with a TODO comment.

- Change from constant waste_heat potential to timeseries over the whole year with changing temperature and available heat.
- Added 5 example files for different inputs.
- If the temperature is below the heat grid temperature a Waste Heat Heat Pump is necessary to use the waste heat.
- If the temperature is above the heat grid temperature it can be directly used through an heat exchanger.
- Applied the Changes addedthorough Pullrequest #129 (#129) for the central Heat Pumps to this branch

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the central optimization stack to model waste heat as an hourly time series and introduces two dedicated waste-heat utilization “devices” (Waste_HeatHP and Waste_HeatDirect), alongside updates to central heat pump handling and reporting/configuration wiring.

Changes:

  • Add Waste_HeatHP and Waste_HeatDirect devices to central dimensioning and energy hub optimization (including availability limits and balances).
  • Load waste heat profiles from a configured source file and propagate clustered waste-heat temperature/power series into optimization parameters.
  • Update KPI/report/certificate naming and device lists to include the new waste heat / GroundHP devices.

Reviewed changes

Copilot reviewed 10 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
districtgenerator/functions/opti_dimensioning_central_devices.py Introduces waste-heat device sets/vars and integrates them into constraints, balances, and result extraction.
districtgenerator/functions/opti_central.py Extends Energy Hub sets/vars/constraints for GroundHP + waste heat devices and updates result profiling.
districtgenerator/functions/load_params_central_devices.py Switches waste heat inputs from constants to clustered time series and computes waste-heat device parameters.
districtgenerator/data/scenarios/example_central.csv Adds a central example scenario CSV.
districtgenerator/data/report_translations.json Adds/adjusts report labels for new devices and cost column wording.
districtgenerator/data/.env.CONFIG.BERLIN Updates example env config for waste heat source selection and new device flags.
districtgenerator/data_handling/config.py Adds waste heat source config field and updates central device HP/CC configuration flags/validation.
districtgenerator/classes/KPIs.py Accounts for new heat pump device electricity consumption in LCOH calculation.
districtgenerator/classes/datahandler.py Loads waste heat profile data into heat_grid_data and adjusts central clustering plumbing.
districtgenerator/classes/certificate_generator.py Updates certificate device mapping/units and removes old waste-heat-potential row.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +161 to +165
@@ -162,7 +162,8 @@
network_losses_cooling = [0] * T_e
seasonal_storage = [0] * T_e
network_pump_power = [0] * T_e
waste_heat = [0] * T_e
waste_heat_power_hp = [0] * T_e
Comment on lines +51 to +53
# Available waste heat potential in kWh for the optimization model
param_uncl["waste_heat_temperature"] = data.heat_grid_data["ts_waste_heat_temperature"] # hourly timeseries of waste heat temperature in °C
param_uncl["waste_heat_power_kW"] = data.heat_grid_data["ts_waste_heat_power_kW"] # hourly timeseries of waste heat in kW
Comment on lines +431 to +442
def load_waste_heat_data(self):
file_name = f"{self.heat_grid_data['waste_heat_source_file']}.csv" if self.heat_grid_data['waste_heat_source_file'] else None
if file_name is not None:
file_path = os.path.join(self.waste_heat_folder, file_name)
df = pd.read_csv(file_path, sep=';', decimal='.')

self.heat_grid_data['ts_waste_heat_temperature'] = df['temperature'].to_numpy()
self.heat_grid_data['ts_waste_heat_power_kW'] = df['heat_amount_kW'].to_numpy()
else:
self.heat_grid_data['ts_waste_heat_temperature'] = None # Use None as 0 might be misleading for the temperature
self.heat_grid_data['ts_waste_heat_power_kW'] = np.zeros(8760)

Comment on lines 1914 to 1916
power_producers = ["PV", "WT", "WAT", "CHP", "BCHP", "WCHP", "FC"]
power_consumers = ["HP", "EB", "CC", "ELYZ"]
power_storage = ["BAT"]
Comment on lines +493 to +498
@field_validator('waste_heat_source_file', mode='before')
@classmethod
def validate_waste_heat_source_file(cls, v):
"""Validate that the waste heat source file exists if specified."""
pass #TODO: This function should be implemented to avoid later on unspecified errors.
return v
Comment on lines 363 to 370
# Heat Pump (HP) Parameters
C_HP__FEASIBLE=True
C_HP__CCOP_FEASIBLE=False
C_HP__ASHP_FEASIBLE=False
C_HP__ASHP_CARNOT_FEASIBLE=True
C_HP__ASHP_MODEL_FEASIBLE=False
C_HP__CSV_FEASIBLE=False
C_HP__WASTE_FEASIBLE=True
C_HP__INV_BASE=1110
@philippnim
philippnim requested a review from Copilot July 29, 2026 15:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants