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

Add battery O&M and self-discharge #354

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Add battery O&M and self-discharge #354

wants to merge 13 commits into from

Conversation

lixiangk1
Copy link
Collaborator

@lixiangk1 lixiangk1 commented Feb 29, 2024

  • Add battery O&M in $ / kW-installed and $ / kWh-installed, defaulted to $0
  • Add battery self-discharge as a fraction per day loss based on stored kWh, defaulted to 0.0

@@ -164,6 +166,7 @@ end
model_degradation::Bool = false
degradation::Dict = Dict()
minimum_avg_soc_fraction::Float64 = 0.0
daily_self_discharge_fraction::Float64 = 0.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

@lixiangk1 could you add a little explanatory text here for this input?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hey! Did you mean add notes in the code to better define this term or just explain it in the pull request?

The input is a loss term for battery self-discharge, entered as a daily fraction for how much of the stored kWh is leaked from the battery (e.g., 3% of the the kWh stored in the battery is self-discharged per day). This is then modeled as a per timestep loss term where eg. 0.03/24/timesteps_per_hour * dvStoredEnergy is subtracted from dvStoredEnergy at every timestep.

Copy link
Collaborator

@adfarth adfarth Mar 19, 2024

Choose a reason for hiding this comment

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

I mean adding a comment "# explanation" in the code here so that it appears in the REopt.jl documentation (https://nrel.github.io/REopt.jl/dev/reopt/inputs/#ElectricStorage). We haven't really done this for ElectricStorage inputs but for all of the other techs we've been including some help text around the inputs. If you could do the same for the O&M costs that would be great! Maybe with a note about not double-counting replacement and O&M costs.

@adfarth
Copy link
Collaborator

adfarth commented Mar 19, 2024

@lixiangk1 Three quick comments from an initial review!

  • Could you please update the CHANGELOG?
  • Could you investigate why the tests are failing and try to get all tests to pass?
  • Could you add a test to runtests.jl for both the O&M costs and the self-discharge?

@lixiangk1
Copy link
Collaborator Author

@adfarth Thanks for your review! Do the latest changes address your comments? As for the tests, it seems that the Windows/MacOS ones are passing but the Ubuntu ones timeout - do you know why that might be happening? Is it something specific to this branch?

@adfarth
Copy link
Collaborator

adfarth commented Apr 5, 2024

@adfarth Thanks for your review! Do the latest changes address your comments? As for the tests, it seems that the Windows/MacOS ones are passing but the Ubuntu ones timeout - do you know why that might be happening? Is it something specific to this branch?

Recapping our convo here!

  • Expected that the ubuntu tests will fail so if the others are passing it's all good (but my latest merge of develop into this branch did seem to cause some to break :( )
  • Going to double check that a "self discharge fraction based on stored energy per time step" makes practical sense
  • Then, rename variable and help text, adjust calculation in the constraints
  • Test/document difference in results if discharge is applied to previous timestep's stored energy vs current one

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.

None yet

2 participants