-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
Better optimizer for initializing half-cell soc #4873
Conversation
of scipy.opimize.root() to resolve numerical crashes.
99fbd15
to
9422888
Compare
Thanks, @d-cogswell – I've triggered the workflows for you. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4873 +/- ##
========================================
Coverage 98.71% 98.71%
========================================
Files 304 304
Lines 23495 23495
========================================
Hits 23193 23193
Misses 302 302 ☔ View full report in Codecov by Sentry. |
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 @d-cogswell, largely this looks good and works for me as well, I've got a couple of questions below that should be addressed
src/pybamm/models/full_battery_models/lithium_ion/electrode_soh_half_cell.py
Show resolved
Hide resolved
src/pybamm/models/full_battery_models/lithium_ion/electrode_soh_half_cell.py
Show resolved
Hide resolved
src/pybamm/models/full_battery_models/lithium_ion/electrode_soh_half_cell.py
Show resolved
Hide resolved
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 @d-cogswell , LGTM 😊
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 can't comment on the half-cell equations side, but the change looks good to me, thanks!
@all-contributors please add @d-cogswell for code |
I've put up a pull request to add @d-cogswell! 🎉 |
Description
scipy.opimize.root()
occasionally causes numerical crashes during initialization of half-cell simulations. Switching toscipy.optimize.minimize()
resolves the issue.Fixes #4868
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)
Important checks:
Please confirm the following before marking the PR as ready for review:
nox -s pre-commit
nox -s tests
nox -s doctests