Fix DHW, heating, and cooling storage update bugs (issue #156)#157
Open
LorenzoBonanni wants to merge 1 commit intonagyzoltan:masterfrom
Open
Fix DHW, heating, and cooling storage update bugs (issue #156)#157LorenzoBonanni wants to merge 1 commit intonagyzoltan:masterfrom
LorenzoBonanni wants to merge 1 commit intonagyzoltan:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request fixes multiple bugs in
building.pyrelated to incorrect energy calculations for thermal storage devices (DHW, heating, and cooling).These bugs prevent correct storage charging/discharging behavior and can result in constant zero SOC values, especially for the DHW tank when
heating_storageis disabled.The changes correct the use of the appropriate storage device in the computation of energy flows and ensure consistent handling of the
algorithm_action_based_time_step_hours_ratiofactor.Issue
Fixes: #156
Changes
This PR introduces the following fixes:
1. Fix in
update_dhw_storageIncorrect line:
This prevented DHW storage from charging because
heating_storage.capacityis0when heating storage is disabled.Corrected to:
2. Fix in
update_heating_storageIncorrect line (used cooling storage):
Corrected to use the proper storage device:
3. Fix in
update_cooling_storageMissing time-step scaling factor.
Previous code:
Corrected to:
Screenshots
Checklist
Additional notes