Skip to content

Commit

Permalink
Merge pull request #90 from j-c-cook/fix-peak-day-ahead-ground-loads
Browse files Browse the repository at this point in the history
Update monthly peak loads based on two-day peak load period.
  • Loading branch information
j-c-cook authored Jan 23, 2022
2 parents 7a866db + 8d1bbc9 commit 3a4ad15
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Create_Branch.sh
ghedt/ghedt-examples/

# pycharm
.idea/

*.egg-info/
*__pycache__/
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ non-exhaustive list of the possible categories issues could fall in:

### Fixes

* [Issue 79](https://github.com/j-c-cook/ghedt/issues/79) - Fixes the possibility for the peak load analysis tool to determine a negative peak load duration when the first month contains no load.
* [Issue 79](https://github.com/j-c-cook/ghedt/issues/79) - Fixes the possibility for the peak load analysis tool to determine a negative peak load duration when the first month contains no load.
* [Issue 84](https://github.com/j-c-cook/ghedt/issues/84) - Fixes the two-day peak simulation to utilize the peak load from either the 48-hour profile or the current month.

## Version 0.1

Expand Down
28 changes: 24 additions & 4 deletions ghedt/peak_load_analysis_tool/ground_loads.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def split_heat_and_cool(hourly_heat_extraction, units='W'):
if l_hour >= 0.0:
# Heat is extracted from ground when > 0
hourly_extraction_loads[i] = l_hour / scale
elif l_hour < 0.0:
else:
# Heat is rejected to ground when < 0
hourly_rejection_loads[i] = l_hour / -scale

Expand Down Expand Up @@ -455,8 +455,18 @@ def find_peak_durations(self) -> None:
# two day cooling loads (or heat rejection) in kWh
current_two_day_cl_load = \
[0.] + self.two_day_hourly_peak_cl_loads[i]

# Ensure the peak load for the two-day load profile is the same or
# greater than the monthly peak load. This check is done in case
# the previous month contains a higher load than the current month.
load_diff = \
self.monthly_peak_cl[i] - max(current_two_day_cl_load)
# monthly peak cooling load (or heat rejection) in kW
current_month_peak_cl = self.monthly_peak_cl[i]
if load_diff > 0.0:
current_month_peak_cl = self.monthly_peak_cl[i]
else:
current_month_peak_cl = max(current_two_day_cl_load)

# monthly average cooling load (or heat rejection) in kW
current_month_avg_cl = self.monthly_avg_cl[i]

Expand All @@ -475,8 +485,18 @@ def find_peak_durations(self) -> None:
# two day heating loads (or heat extraction) in kWh
current_two_day_hl_load = \
[0.] + self.two_day_hourly_peak_hl_loads[i]
# monthly peak heating load (or heat extraction) in kW
current_month_peak_hl = self.monthly_peak_hl[i]

# Ensure the peak load for the two-day load profile is the same or
# greater than the monthly peak load. This check is done in case
# the previous month contains a higher load than the current month.
load_diff = \
self.monthly_peak_hl[i] - max(current_two_day_hl_load)
# monthly peak cooling load (or heat rejection) in kW
if load_diff > 0.0:
current_month_peak_hl = self.monthly_peak_hl[i]
else:
current_month_peak_hl = max(current_two_day_hl_load)

# monthly average heating load (or heat extraction) in kW
current_month_avg_hl = self.monthly_avg_hl[i]

Expand Down

0 comments on commit 3a4ad15

Please sign in to comment.