Skip to content

A python based simulation framework for the thermohydraulic simulation of prosumer-dominated heat networks.

License

Notifications You must be signed in to change notification settings

thomaslicklederer/ProHeatNet_Sim

Repository files navigation

ProHeatNet_Sim

A python based simulation framework for the thermohydraulic simulation of prosumer-dominated heat networks. The model on which this simulation framework is built on is described in the Paper "Thermohydraulic Model of Smart Thermal Grids with Bidirectional Power Flow between Prosumers", published in Energy - The International Journal by Elsevier (https://doi.org/10.1016/j.energy.2021.120825).

How to run the example

  • Download / clone the latest release.
  • Make sure your system meets the requirements (see below):
    • python 3.7 or higher installed
    • Gurobi optimizer version 9.0.1 or higher installed
    • suitable license for Gurobi
    • module "gurobipy" installed
    • IPython (Interactive Python) version 7.12.0 or higher installed
  • open command shell of your operating system
  • start ipython
    ipython
    
  • navigate to the directory that you downloaded the repository to
    cd *your_directory*
    
  • do some settings to automatically reload changes in the python code files
    %load_ext autoreload
    %autoreload 2
    
  • run the main file
    run A_main.py
    
  • the example setup in directory ./setup/example will be used
  • calculation starts
  • results show in command window
  • figures with visualizations of the results should show
  • results are saved in the results folder printed to textfile results.txt and saved as a python pickle in results.pkl, also an Excel-Spreadsheet is created example_202XXXXX_XXXXXX.xlsx
  • results should be the same as in folder ./example_results

How to modify the setup

  • go to directory ./setup/example and copy the three files
  • paste the copied files in folder ./setup/my_setup
  • modify the setup by modifying the pasted files configuration.py, parametrization.py and scenario.py
  • modify the paths at the top of A_main.py
    path_config     =   "set-up/my_setup/configuration.py"
    path_param      =   "set-up/my_setup/parametrization.py" 
    path_scenario   =   "set-up/my_setup/scenario.py"
    
  • run the main file by command shell
    run A_main.py
    

Examplary result plots

Solutions on prosumer level Solutions on prosumer level

Requirements

The code was tested under Linux and under Windows with the following specifications.

Linux

Windows

About

A python based simulation framework for the thermohydraulic simulation of prosumer-dominated heat networks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages