-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Another method for OCP with hysteresis #4808
Comments
This would be a very welcome addition, please let me know if you need any help with this! Also see #4332 for some discussion around refactoring the current implementation of the Wycisk model. |
Hi @rtimms, very interesting discussion in #4332. I'm not sure if this is still relevant but the problem in #4332 seems to be related to the choice of the solver tolerance. The figure below shows the hysteresis state for the Wycisk approach using the Casadi solver with two different tolerances and initial state of The Axen method would be a special case of the Wycisk implementation discussed in #4332 when I have tested the implementation and it has been pushed to my fork. Should I create a pull request? |
Great, thanks for the update! Yes, please make a pull request. |
…Issue pybamm-team#4808) Test functions have been added. Minor modifications have been added to the module axen_ocp to pass all the tests.
…Issue pybamm-team#4808) The module axen_ocp has been modified so the state variable h varies from -1 to 1, instead of 0 to 1.
…Issue pybamm-team#4808) The name of the decay rate for lithiation and delithiation has been changed to follow the format "{self.phase_prefactor}{Domain} particle {lithiation}hysteresis decay rate".
…Issue pybamm-team#4808) A function is defined to read the parameter "hysteresis decay rate", allowing to select a value for "lithiation" and "delithiation".
@rtimms Let me know if you'd like to pick up on last week's in-person conversation on aligning all the hysteresis models. I think it would probably make sense to package these under a single 'base hysteresis model' or else bring the base treatment of hysteresis within the base OCP model. That would make it much easier to fix #3867 in the general case. I think you or another of the core team would be the best implementer, but I'd be happy to contribute some suggestions on base mathematical formulation. |
Yes, sounds good. There is an open PR for a new model #4816, so let’s merge that and then consolidate everything. |
@rtimms Yes, agreed that that's the right order. |
Description
This method has been proposed by Axen et al. https://doi.org/10.1016/j.est.2022.103985, and like the Wycisk approach, it employs an ODE system to track the evolution of the ocp between the empirical lithiation and delithiation branches of the hysteresis. The rate at which the ocp moves back and forth between the hysteresis branches is scaled by the applied current and a decay rate.
Motivation
Although the Wycisk and Axen methods perform similarly, the proposed implementation does not need to compute the differentiation
self.phase_param.U(sto_surf, T_bulk).diff(sto_surf)
, and it also allows to choose separate decay rates for the lithiation and delithiation branches of the hysteresis. This option can be implemented for the Wycisk approach as well.Together with the Wycisk approach, this method could be another alternative to choose from in pybamm.
A figure is attached comparing Wycisk and Axen for the silicon's ocp, sweeping over the decay rate (K) and temperature (T), using the Chen2020_composite parametrization and an OCP entropic change for silicon of 2e-3 V/K, for testing purposes. Here the lithiation and delithiation decay rates for Axen take the same value.
Possible Implementation
The method can be readily implemented using the module
wycisk_ocp
as starting point.The method would need the following input parameters:
ocp_lith
andocp_delith
, respectively.K_lith
K_delith
h_init
Main features of the method:
h
, taking values between 0 and 1i_vol
and the decay ratesK_lith
andK_delith
H = lith_ref - delith_ref
, wherelith_ref = ocp_lith(sto, T)
anddelith_ref = ocp_delith(sto, T)
ocp_surf = delith_ref + H * h
The method would be implemented in the new file pybamm\models\submodels\interface\open_circuit_potential\axen_ocp.py
And the following files would be modified:
axen_ocp
module available in the namespace and import the classAxenOpenCircuitPotential
U_hysteresis_branch
, which includes the effect of temperature in the hysteresis branches, and to define the parametersK_lith
andK_delith
I could contribute with the implementation if you think this is worth including in pybamm.
Additional context
No response
The text was updated successfully, but these errors were encountered: