Further Waste Heat Usage Integration and HP changes from develop applied - #132
Open
philippnim wants to merge 2 commits into
Open
Further Waste Heat Usage Integration and HP changes from develop applied#132philippnim wants to merge 2 commits into
philippnim wants to merge 2 commits into
Conversation
- 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
There was a problem hiding this comment.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
INFO: