If you use our data and/or source code, please cite as:
M.J. Ritchie, J.A.A. Engelbrecht, M.J. Booysen “Which strategy saves the most energy for stratified water heaters?”,  Energies, 2021

How To Use:

Open "Savings Code.ipynb" with Jupyter Notebooks.

The following code blocks are as follows:

1)"Load Libraries and Functions" - Setup necessary libraries and functions

2) "Simulate Methods" - Here is where the water profile data is simulated ("data/water_profiles"), and the results are stored as a .txt file in the "results" folder.
	
	- This block is not necessary to run as simulated results have already been obtained.

	- The commented code lists all possible simulations that can be performed. The variable "modes" specifies all the desired modes to be simulated.

3) "Plot All Results" - Plot the results of all simulations. The efficiencies of each mode are also printed. 

	(eg. Electricity used for EWH 1 is 5 kWh (TM method) and 8 kWh(baseline).)
 
4) "Plot Results (Delta change from Baseline)" - Plot the results of each method as a change from that of the baseline method for all simulations.

	(eg. Electricity used for EWH 1 is "results_baseline - results_method" = "8 kWh - 5 kWh" = 3 kWh)

5) "Plot Results (Percentage Change from Baseline)" - Plot the results of each method as a percentage change from that of the baseline method for all simulations.

	(eg. Electricity used for EWH 1 is "((results_baseline - results_method)/results_baseline)*100" = "((8 kWh - 5 kWh)/8 kWh)*100" = 37.5% decrease from baseline)

6) "Plots Savings Graph (Overall)" - Plots Figure 2


7) "Plots Savings Graph (Light and Heavy)" - Plots Figure 3


8) "Plots Savings Graph (Seasonality)" - Plots Figure 4