-
-
Notifications
You must be signed in to change notification settings - Fork 690
#5198 update definition of hysteresis decay rate #5217
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
base: develop
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@ejfdickinson I'd appreciate a second look at this to make sure my edits and conversions are correct |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5217 +/- ##
===========================================
+ Coverage 98.79% 98.81% +0.01%
===========================================
Files 320 320
Lines 27100 27093 -7
===========================================
- Hits 26774 26771 -3
+ Misses 326 322 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Will do @rtimms but not necessarily straight away - chase me later next week if still no action. |
@ejfdickinson just a reminder to take a look at this, thanks! |
@rtimms Will try to do so this afternoon, sorry for delay! |
thanks, appreciate it! |
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.
@rtimms From a reading review, this seems correct to me, in the equations and implementation. I flagged some minor typos and style issues.
I haven't attempted to test the PR against any of our in-house code, as this will take longer to configure and I don't have a good opportunity. If you think this can sit open another week, and you think that the existing PyBaMM tests need support for safety, I could ask @katielukow-AE to support with this.
...submodels/interface/open_circuit_potential/one_state_differential_capacity_hysteresis_ocp.py
Outdated
Show resolved
Hide resolved
...submodels/interface/open_circuit_potential/one_state_differential_capacity_hysteresis_ocp.py
Outdated
Show resolved
Hide resolved
Thanks for the review. Yes, I think it would be a helpful sanity check if @katielukow-AE is able to support with testing this further, thanks! |
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.
seems fine to me
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.
pls fix style and tests
Description
Updates the definition of the hysteresis decay rate to be a "true" decay rate. This is a breaking change for the
OneStateHysteresisOpenCircuitPotential
andOneStateDifferentialCapacityHysteresisOpenCircuitPotential
submodels, as described below.Updated model formulations
OneStateHysteresisOpenCircuitPotential
This PR introduces an additional factor of 2 in the ODE for the hysteresis state variable. To retain the same behaviour, the parameter$\gamma$ (e.g. "Secondary: Negative particle lithiation hysteresis decay rate") should be multiplied by 2. The governing equations are detailed below.
OneStateHysteresisOpenCircuitPotential
-- v25.8 and belowThe hysteresis state variable$h(z,t)$ is governed by the following ODE:
OneStateHysteresisOpenCircuitPotential
-- this PR onwardsThe hysteresis state variable$h(z,t)$ is governed by the following ODE:
OneStateDifferentialCapacityHysteresisOpenCircuitPotential
This PR reformulates the model to use the same governing equation as the$\Gamma$ . To retain the same behaviour, the parameter $\Gamma$ (e.g. "Secondary: Negative particle hysteresis decay rate") should be multiplied by $2 / (n_{\text{electrodes}}L_{\text{k}}L_{\text{y}}L_{\text{z}}a_{\text{k}} / 3600)$ . Where $L_{\text{k}}$ is the electrode thickness, $L_{\text{y}}$ is the electrode width, $L_{\text{z}}$ is the electrode height, and $a_{\text{k}}$ is the surface area per unit volume. The parameter $n_{\text{electrodes}}$ is the number of electrodes in parallel (see #5198 for discussion of a bug in v25.8).
OneStateHysteresisOpenCircuitPotential
. This introduces a significant change in the interpretation of the parameterThe governing equations are detailed below.
OneStateDifferentialCapacityHysteresisOpenCircuitPotential
-- v25.8 and belowThe hysteresis state variable$h(z,t)$ is governed by the following ODE:
with
and$C_{\text{diff}}(z) = \frac{dQ}{dU_{\text{eq}}(z)}$
OneStateDifferentialCapacityHysteresisOpenCircuitPotential
-- this PR onwardsThe hysteresis state variable$h(z,t)$ is governed by the following ODE:
with
and$C_{\text{diff}}(z) = \frac{dQ}{dU_{\text{eq}}(z)}$ , $C_{\text{ref,vol}} = 1$ .
Fixes #5198
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