-
Notifications
You must be signed in to change notification settings - Fork 84
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
Sam 1869 battery adjust losses #1241
Conversation
…attery_adjust_losses
…attery_adjust_losses
…attery_adjust_losses
…ed up to cmod battery
…attery_adjust_losses
…onvention (PV only applies to PV when AC connected
…eption (still doesn't relay losses properly
…ill has a problem with a giant resistor that doesn't exist
…vailability losses
shared/lib_battery_dispatch.cpp
Outdated
@@ -394,17 +399,22 @@ bool dispatch_t::restrict_power(double& I) | |||
} | |||
else | |||
{ | |||
if (std::abs(powerBattery) > m_batteryPower->powerBatteryDischargeMaxDC * (1 + low_tolerance)) | |||
double max_discharge_dc = (1 - m_batteryPower->adjustLosses) * m_batteryPower->powerBatteryDischargeMaxDC; | |||
double max_discharge_ac = (1 - m_batteryPower->adjustLosses) * m_batteryPower->powerBatteryDischargeMaxAC; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sprinkling (1 - m_batteryPower->adjustLosses)
around everywhere seems like a potentially leaky way to handle this loss adjustment. I think this final post-loss max value should be concretely defined somewhere, and then used where appropriate...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call - making those variables private revealed several locations I'd missed. Addressed in latest push.
… in each individual location
…attery_adjust_losses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a simulation error now with hourly simulations when the time series battery availability losses are in Hourly mode. This is for both PV-Battery and PVWatts-Battery configurations.
exec fail(battery): failed to setup battery adjustment factors: Time series availability losses must have the same time step as the simulation time step unless losses are daily, weekly, monthly, annual, or single value.
Simulation pvsamv1 failed :exec fail(battery): failed to setup battery adjustment factors: Time series availability losses must have the same time step as the simulation time step unless losses are daily, weekly, monthly, annual, or single value.
monthly_grid_to_batt not assigned
Simulation singleowner failed :monthly_grid_to_batt not assigned
Ugh, thanks for catching that. Fortunately it was an easy fix! |
Hourly time series losses are working now for PV-Battery (I tested FOM and BTM), but I'm still getting the simulation error for PVWatts-Battery. |
Thanks for your patience while testing this. This should be fixed - it required changes to both ssc and SAM (lk to pass the right analysis period). |
PVWatts-Battery is working correctly now. Thanks for the fixes! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
Grid limits do not affect electricity imports from the grid. Revise IPH molten salt linear Fresnel topics Power tower heliostast pivot point height definition. New Financial Parameters topic for LCOH Calculator. Wind wake loss inputs NREL/ssc#1186 Annual energy and monthly energy label updates: NREL/ssc#1236 Replace parentheses with commas for installation cost units Battery availability loss. NREL/ssc#1241 Tidal Energy Converter page revisions for new options, see #1807. New net billing with carryover options. NREL/ssc#1200 IPH MSLF revisions: #1444 Fix fuel cell model link https://www.nrel.gov/hydrogen/fuel-cell-power-model.html, replace with https://www.nrel.gov/docs/fy13osti/57457.pdf. PV GCR affects output for bifacial modules. Revise report generator topic to explain template not available for some configurations. Add topics for IPH financial models Generic system to custom generatio profile Standalone battery time step New autographs and default graphs for battery configurations: #1884 System Availability three hour option for marine, "hourly" to "time series" ## October 24, 2024 Update Cambium note about years for Cambium 2023 Battery dispatch (BTM and FOM) battery can charge from grid-limited system power Grid limits battery can charge from grid-limited system power Project with 100% debt results in IRR = NaN Revise real discount rate description Geothermal system availability losses Revise metrics topics to facilitate navigation. Revise weather file format to include CSV for wind Revise PV subhourly clipping "Allen method" Revise Cost of Acquiring Financing.
* Help revisions for SAM 2024.12.12 Grid limits do not affect electricity imports from the grid. Revise IPH molten salt linear Fresnel topics Power tower heliostast pivot point height definition. New Financial Parameters topic for LCOH Calculator. Wind wake loss inputs NREL/ssc#1186 Annual energy and monthly energy label updates: NREL/ssc#1236 Replace parentheses with commas for installation cost units Battery availability loss. NREL/ssc#1241 Tidal Energy Converter page revisions for new options, see #1807. New net billing with carryover options. NREL/ssc#1200 IPH MSLF revisions: #1444 Fix fuel cell model link https://www.nrel.gov/hydrogen/fuel-cell-power-model.html, replace with https://www.nrel.gov/docs/fy13osti/57457.pdf. PV GCR affects output for bifacial modules. Revise report generator topic to explain template not available for some configurations. Add topics for IPH financial models Generic system to custom generatio profile Standalone battery time step New autographs and default graphs for battery configurations: #1884 System Availability three hour option for marine, "hourly" to "time series" ## October 24, 2024 Update Cambium note about years for Cambium 2023 Battery dispatch (BTM and FOM) battery can charge from grid-limited system power Grid limits battery can charge from grid-limited system power Project with 100% debt results in IRR = NaN Revise real discount rate description Geothermal system availability losses Revise metrics topics to facilitate navigation. Revise weather file format to include CSV for wind Revise PV subhourly clipping "Allen method" Revise Cost of Acquiring Financing. * Help revisions Revise "receiver startup delay time" and "receiver startup delay energy fraction" descriptions for trough and Fresnel models. Fix remaining references to "generic system" model. --------- Co-authored-by: Steven Janzou <[email protected]>
Add adjust/availability losses to batteries.
These losses affect both power and capacity, such that when a loss kicks in the battery has x% of each at that time. We assume that the cells have to be discharged to work on them safely, so x% is removed from state of charge and needs to be returned once the loss is over.
Note that this can lead to SOC less than the minimum SOC on the dispatch page. For example, a battery with a 10% minimum SOC and a 50% availability loss could go down to 5%.
Pairs with SAM pull request: NREL/SAM#1902
Closes NREL/SAM#1869