Skip to content

UI forms and defaults for battery adjust losses#1902

Merged
brtietz merged 13 commits into
developfrom
sam_1869_battery_adjust_losses
Nov 14, 2024
Merged

UI forms and defaults for battery adjust losses#1902
brtietz merged 13 commits into
developfrom
sam_1869_battery_adjust_losses

Conversation

@brtietz

@brtietz brtietz commented Nov 8, 2024

Copy link
Copy Markdown
Collaborator

Pull Request Template

Description

Adds UI forms for battery adjust losses. Uses two forms so we can add adjust losses to PVWatts-Battery. Open to other ideas as to how to structure this form.

Pairs with SSC pull request NatLabRockies/ssc#1241

Fixes (#1869)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This change modifies variables in existing compute modules. Please see Checking for PySAM Incompatible API Changes.

Checklist:

If you have added a new compute module in a SSC pull request related to this one, be sure to check the Process Requirements.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@brtietz brtietz added this to the SAM Fall 2024 Release milestone Nov 8, 2024
@brtietz brtietz self-assigned this Nov 8, 2024
@cpaulgilman cpaulgilman added the requires help revision Requires a Help revision before releasing public version label Nov 11, 2024

@cpaulgilman cpaulgilman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Setting up subhourly battery availability losses with hourly simulation time step should trigger an SSC simulation error (like PV availability losses).

I recommend putting both Battery Ancillary Losses and Battery Availability Losses forms under a single "Battery Losses" collapsible panel. Revised suggestion: Put widget on Battery Model Simple and Battery Model Simple with REopt forms for PVWatts-Battery, and create single Battery Losses form with both ancillary and availability loss inputs.

@cpaulgilman cpaulgilman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

UI forms look good now. I made some additional changes (including changing the UI form file name from "Battery Ancillary Losses.json" to "Battery Losses.json").

@dguittet

Copy link
Copy Markdown
Collaborator

@brtietz is there an output for the availability loss that can be viewed in Time series?

@dguittet

Copy link
Copy Markdown
Collaborator

Not sure if I'm doing this right, but since the time series losses aren't working atm, I tried the period losses and added one hour of 100 loss:
image

This is for manual dispatch:
image

I expected the discharge to go to 0 for an hour but then afterwards dispatch at 100%, but the discharge for the 1st day is 0. In contrast, the 2nd day has the "normal" discharge which lasts for 4 hours.
image

@brtietz

brtietz commented Nov 13, 2024

Copy link
Copy Markdown
Collaborator Author

@brtietz is there an output for the availability loss that can be viewed in Time series?

Thanks for the reminder - I just pushed code for "Battery performance loss adjustment" to ssc.

@brtietz

brtietz commented Nov 13, 2024

Copy link
Copy Markdown
Collaborator Author

Not sure if I'm doing this right, but since the time series losses aren't working atm, I tried the period losses and added one hour of 100 loss: image

This is for manual dispatch: image

I expected the discharge to go to 0 for an hour but then afterwards dispatch at 100%, but the discharge for the 1st day is 0. In contrast, the 2nd day has the "normal" discharge which lasts for 4 hours. image

The 1st day doesn't discharge because a 100% loss drops the state of charge to zero. Here's a one hour availability loss on Jan 4th with battery SOC and the new performance adjust loss output:

image

@dguittet

dguittet commented Nov 13, 2024

Copy link
Copy Markdown
Collaborator

@brtietz is there an output for the availability loss that can be viewed in Time series?

Thanks for the reminder - I just pushed code for "Battery performance loss adjustment" to ssc.

Hmm.. the naming for the input (Battery Availability) is different than that of the output (Battery performance adjustment), which is confusing. And shouldn't it be listed in the var_table for battery?

@brtietz

brtietz commented Nov 13, 2024

Copy link
Copy Markdown
Collaborator Author

Hmm.. the naming for the input (Battery Availability) is different than that of the output (Battery performance adjustment), which is confusing. And shouldn't it be listed in the var_table for battery?

Naming is updated as we discussed. Including it in a vartable in common.cpp allows for the same definitions to be used in cmod_battery.cpp, cmod_pvsamv1.cpp, and cmod_battwatts.cpp (the latter wouldn't work if it was in the vartable for battery)

@cpaulgilman

Copy link
Copy Markdown
Collaborator

@brtietz

  1. Thank you for adding the Battery availability loss output.

    There is some inconsistency now:

    • Total AC availability is reported as a single value in %
    • Total DC availability is reported as a single value in %
    • Total battery availability is not reported.
    • Time series AC availability loss is reported in kW
    • Time series DC availability loss is not reported
    • Time series battery availability loss is reported in %

    This is probably a separate issue to handle the output consistently across all performance models.

  2. I am not seeing a UI callback error about reopt_size_battery(), and the REopt API call is working from this branch for both PV-Battery and PVWatts-Battery. I pushed a fix to re-implement some UI changes that didn't get transferred from Develop after I merged my REopt branch.

@brtietz brtietz merged commit ed210cc into develop Nov 14, 2024
@cpaulgilman cpaulgilman removed the requires help revision Requires a Help revision before releasing public version label Nov 21, 2024
@cpaulgilman cpaulgilman added the added to release notes PR and/or issue has been added to release notes for a public release label Dec 10, 2024
@brtietz brtietz deleted the sam_1869_battery_adjust_losses branch December 13, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added to release notes PR and/or issue has been added to release notes for a public release battery enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants