From c15b7707cf7ebe646f85788a5ffef40c34476315 Mon Sep 17 00:00:00 2001 From: j-c-cook Date: Sun, 30 Jan 2022 11:08:27 -0600 Subject: [PATCH 1/2] Revert back to @mitchute's logic addressing #84 --- ghedt/peak_load_analysis_tool/ground_loads.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ghedt/peak_load_analysis_tool/ground_loads.py b/ghedt/peak_load_analysis_tool/ground_loads.py index a7e3b8d..80b701a 100644 --- a/ghedt/peak_load_analysis_tool/ground_loads.py +++ b/ghedt/peak_load_analysis_tool/ground_loads.py @@ -456,13 +456,25 @@ def find_peak_durations(self) -> None: current_two_day_cl_load = \ [0.] + self.two_day_hourly_peak_cl_loads[i] + # This tolerance applies to the difference between the current + # months peak load and the maximum of the two-day load. If the + # absolute value of the difference between the current months + # peak load and the current two-day peak load is within this + # tolerance, then the maximum of the two-day load is equal to the + # maximum of the current month. If the absolute difference is + # greater than the tolerance, then the two-day peak load contains + # a load greater than the current months peak load. The tolerance + # could ONLY be exceeded when the first 24 hours is located in the + # previous month. + tol = 0.1 + # 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 - if load_diff > 0.0: + if abs(load_diff) < tol: current_month_peak_cl = self.monthly_peak_cl[i] else: current_month_peak_cl = max(current_two_day_cl_load) @@ -492,7 +504,7 @@ def find_peak_durations(self) -> None: 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: + if abs(load_diff) < tol: current_month_peak_hl = self.monthly_peak_hl[i] else: current_month_peak_hl = max(current_two_day_hl_load) From 21c1fb36a23e76884d0a11175afc900c0f989082 Mon Sep 17 00:00:00 2001 From: j-c-cook Date: Sun, 30 Jan 2022 11:15:24 -0600 Subject: [PATCH 2/2] Modify the changelog to be more explicative of #84's purpose --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eee2b2..e6c0cd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ 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 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. +* [Issue 84](https://github.com/j-c-cook/ghedt/issues/84) - Fixes the possibility of the nominal simulation having a greater temperature change than the peak simulation when the peak day occurs on the first of a month by introducing a check to ensure the two-day peak simulation utilizes the peak load from either the 48-hour load profile or the current month. ## Version 0.1