Skip to content

PouyaREZ/Wastewater_Energy_Optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wastewater_Energy_Optimization

Author: Pouya Rezazadeh Kalehbasti (PhD Candidate in CEE | CS @ Stanford University)

Contributors Forks Stargazers MIT License

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact
  6. Acknowledgements
  7. References

About The Project

This GitHub repository contains the files required for reproducing the results published in paper XXXXXXXXXX.

Built With

Getting Started

Follow the steps below to get a local copy of the project and be able to run it.

Installation

  1. Clone the repo onto your local machine

    git clone https://github.com/PouyaREZ/Wastewater_Energy_Optimization.git

    1.1. Install these required packages on your Python. pip install -r requirements.txt

  2. If you want to rerun the optimization and regenerate the optimization solutions, follow steps 3 to 4 below. Otherwise, go to step 5.

  3. Solve the optimization problem with genetic algorithm by running the following command in ./Main directory.

python3 -m scoop Main.py

To run the scenario with a Central Wastewater Treatment plant, set the "CWWTP_Mode" flag to 1 in line 85 of Main.py. Copy the SDO_LHS_TestRuns288_Constraint_SF_Test.txt (from ./Main directory) resulting from the run to some other place.

To run the scenario with integrated water-energy system, set this flag to 0. Copy the SDO_LHS_TestRuns288_Constraint_SF_Test.txt (from ./Main directory) resulting from the run to some other place.

  1. Copy SDO_LHS_TestRuns288_Constraint_SF_Test.txt file for the segregated scenario into ./Plotters/RQ1_W_CWWTP_ModConsts_Feb17/, and for the integrated scenario into ./Plotters/RQ1_WO_CWWTP_ModConsts_Feb17/.

  2. Run Plots_Clusters.py and Plots_Paper_One.py from ./Plotters/Results/.

  3. View the figures in ./Plotters/Results/ directory.

Contributing

Fork the project if you want to expand/update it. Here are some of the things you can update or modify in the project:

  1. Modify or add a chiller model: Either in ./Main/AbsorptionChillers.py or ./Main/ElectricChillers.py, you need to both modify the Computer function and add a new function named as your new chiller model, similar to the existing models.

You also need to update lines 89 and 93 of ./Main/Main.py with the new count of chiller models. [E.g., increase the number on line 93 by 1 if you add one chiller]

  1. Modify or add a CHP engine model:

In ./Main/CHPEngines.py, you need to both modify the Computer function and add a new function named as your new CHP model, similar to the existing models.

You also need to update ./Main/CHP_Info.csv file with the new/modified CHP engine information.

You also need to update lines 88 and 93 of ./Main/Main.py with the new count of chiller models. [E.g., increase the number on line 93 by 1 if you add one CHP engine]

  1. Modify or add a wastewater treatment model:

Add a new function or modify the existing functions in ./Main/WWT.py.

  1. Modify or add a building archetype:

You need to add/update the 8760-hour demand of cooling, heating, and electricity for the new/updated archetype to these three files, respectively: ./Main/Hourly_Cooling.csv, ./Main/Hourly_Heating.csv, and ./Main/Hourly_Electricity.csv. The building type corresponding to each column in these files follows the order of building types listed in ./Main/Building_Info.csv.

You also need to add/update the average daily demand, monthly coefficients, and hourly coefficients of wastewater treatment demand for the new building archetype to ./Main/Profiles.csv. The building type corresponding to each column in these files follows the order of building types listed in ./Main/Building_Info.csv.

You also need to update ./Main/Building_Info.csv with the new/modified building archetype information.

You also need to update line 93 of ./Main/Main.py with the new count of building types, e.g., increase the number on line 93 by 1 if you add one building type.

3.1 Be careful: your model might consider a building-level chiller to satisfy the cooling demand of the building. In this case, you need to subtract the cooling demand satisfied by the electric chiller from the electric load and add it instead to the cooling load. Same goes for the heating demand of the building.

  1. Change the geographic location of running the model:

Modify ./Main/Site_Info.csv according to the new location. Then update ./Main/Hourly_Weather.csv with the meteorological information of the new location.

  1. Change the eletricity tariff:

Modify ./Main/Grid_Parameters.csv with the new electricity tariff. The headings of the columns in the existing csv file mentions references used for obtaining the listed data; you can use them for easier data gathering.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Pouya Rezazadeh Kalehbasti - rezazadeh.pouya@gmail.com

Project Link: https://github.com/PouyaREZ/Wastewater_Energy_Optimization

Acknowledgements

Readme based on https://github.com/othneildrew/Best-README-Template

References

  • Best, Robert E., Forest Flager, and Michael D. Lepech. "Modeling and optimization of building mix and energy supply technology for urban districts." Applied energy 159 (2015): 161-177.

About

Supplementary files for "Integrated Design and Optimization of Water-Energy Nexus: Combining Wastewater Treatment and Energy System"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published