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

Sam 1806 make tolerances more consistent #1182

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

brtietz
Copy link
Collaborator

@brtietz brtietz commented Jul 16, 2024

Consistently use the powerflow tolerance throughout the battery issue to mitigate issues caused by inconsistent tolerances. Results of the parametric run after changes:

image

See NREL/SAM#1806 for test file. See #1132 for history on powerflow tolerance.

Test changes for grid outage and resilience code were required to accommodate tighter tolerances. Reported resilience metrics have decreased due to changing tolerance from 2 W to 0.005 W.

@brtietz brtietz added this to the 2023 Release Patch 2 milestone Jul 16, 2024
@brtietz brtietz requested review from sjanzou and dguittet July 16, 2024 17:42
@brtietz brtietz self-assigned this Jul 16, 2024
Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

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

Wow! That is a huge difference from the current release (patch 1) on the right.
image

Just double checking that the annual AC energy is unchanged
image

@@ -37,7 +37,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "lib_battery_capacity.h"

double low_tolerance = 0.01;
double tolerance = 0.002;
double tolerance = 0.002; // Used for capacity calcs. Please use powerflow_tolerance for units of kW

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, very helpful!

@brtietz brtietz merged commit 2a5f9ed into patch Jul 18, 2024
8 checks passed
@cpaulgilman
Copy link
Collaborator

@brtietz Does this fix NREL/SAM#1806?

@brtietz
Copy link
Collaborator Author

brtietz commented Jul 24, 2024 via email

@brtietz brtietz deleted the sam_1806_make_tolerances_more_consistent branch December 13, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants