Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add stratified tes #148

Merged
merged 109 commits into from
Feb 15, 2021
Merged

Feature/add stratified tes #148

merged 109 commits into from
Feb 15, 2021

Conversation

MaGering
Copy link
Collaborator

@MaGering MaGering commented Nov 18, 2020

With this PR the stratified thermal energy storage is added to the sector coupling model.

At present, in the mvs the oemof.solph component GenericStorage is defined with the following input parameters (cf. D1_model_components.py):

  • label
  • nominal_storage_capacity
  • initial_storage_level
  • loss_rate
  • inflow_conversion_factor
  • outflow_conversion_factor
  • min_storage_level
  • max_storage_level

To implement the oemof.thermal stratified thermal storage, two further input parameter would be needed (cf. example 01_operation_generic_storage.py):

  • fixed_losses_relative
  • fixed_losses_absolute

They are used to take into account temperature dependent losses of the GenericStorage.

The procedure within this PR is as follows:

  • Implement basic structure containing "storage_02" as thermal energy storage with for now arbitrary input parameters
  • Integrate pre-calculations of the stratified thermal storage from oemof.thermal into the model in a separate file called stratified_thermal_storage.py
  • Write results of nominal_storage_capacity and loss_rate into storage_02.csv (installedCap and efficiency)
  • Find a way to extend the model by two additional parameters from oemof.thermal (fixed_losses_relative and fixed_losses_absolute)
  • Research and adapt input parameters of the stratified thermal storage

The following steps were realized, as well (if applies):

  • Use in-line comments to explain your code
  • Write docstrings to your code
  • For new functionalities: Explain in readthedocs
  • Write test(s) for your new patch of code
  • ❌ Update the CHANGELOG.md (let's start this after the first release)
  • Apply black (black . --exclude docs/)

Please mark above checkboxes as following:

  • Open
  • Done

❌ Check not applicable to this PR

For more information on how to contribute check the CONTRIBUTING.md.

@MaGering MaGering marked this pull request as ready for review December 7, 2020 20:22
@MaGering
Copy link
Collaborator Author

MaGering commented Feb 8, 2021

Thank you @MaGering! :)
I'm sorry, I still have some comments, but I think it's not so much work anymore!

No, I'm happy you have comments. Your review has helped me a lot, thank you! 🙏

* My overview over the directories we are using is not so good anymore, but I think `stratified_thermal_storage.csv` is missing in `data/user_inputs_collection/pvcompare_inputs/`.

Thanks for finding this! Added with commit 6a2e745.

Copy link
Collaborator

@SabineHaas SabineHaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it through the tests now! Only a few changes then you can merge :)

tests/test_stratified_thermal_storage.py Outdated Show resolved Hide resolved
pvcompare/stratified_thermal_storage.py Show resolved Hide resolved
tests/test_stratified_thermal_storage.py Outdated Show resolved Hide resolved
pvcompare/stratified_thermal_storage.py Show resolved Hide resolved
tests/test_stratified_thermal_storage.py Outdated Show resolved Hide resolved
tests/test_stratified_thermal_storage.py Outdated Show resolved Hide resolved
pvcompare/stratified_thermal_storage.py Show resolved Hide resolved
pvcompare/stratified_thermal_storage.py Outdated Show resolved Hide resolved
pvcompare/stratified_thermal_storage.py Outdated Show resolved Hide resolved
tests/test_stratified_thermal_storage.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants