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

SEI on cracks #2104

Merged
merged 42 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b27ae28
Partially completed first draft of SEI on cracks
Apr 27, 2022
23a0a6f
Second attempt at adding SEI on cracks
Apr 28, 2022
d17473a
Fixed some bugs in crack SEI model
May 12, 2022
e105d40
Ensure loss of lithium to SEI on cracks is always defined
May 18, 2022
e4d93d8
Replaced most references to 'SEI' and 'SEI on cracks' with self.reaction
Jun 14, 2022
e36602b
Changed L_n to n.L
Jun 15, 2022
ecfcdc4
Added NoMechanics subclass
Jun 20, 2022
fea7d4c
flake8
Jun 20, 2022
5b321a7
Added if statement to set roughness to 1 if not in variables
Jun 21, 2022
6bfddd1
Revert "Added if statement to set roughness to 1 if not in variables"
Jun 22, 2022
3fb424a
Merge branch 'develop' into SEIoncracks
Jun 22, 2022
775626f
Added cracking parameters to graphite_Chen2020_plating
Jun 22, 2022
0ad8afe
Added get_coupled_variables to NoSEI class
Jun 23, 2022
a21484d
Cracking model works but OKane2022 parameters do not
Jun 24, 2022
7ec5fc8
Added Arrhenius temperature dependence to all SEI growth models
Jun 29, 2022
274439d
Merge branch 'develop' of https://github.com/pybamm-team/PyBaMM into …
Jun 29, 2022
e106c1d
Added zero temperature dependence for all other SEI parameter sets
Jul 13, 2022
82d5800
Completed example notebook
Jul 15, 2022
17725e5
Updated with latest changes from upstream
Jul 15, 2022
3dc6375
Updated CHANGELOG
Jul 15, 2022
c78229a
flake8
Jul 18, 2022
6e7fbcf
Fixed get_coupled_variables in no_sei.py
Jul 19, 2022
0a93993
Changed base_lithium_ion_model to avoid running SEI on cracks for hal…
Jul 19, 2022
2ddb0c2
flake8
Jul 19, 2022
0080825
Fixed bug in equation for interstitial-diffusion limited SEI
Jul 20, 2022
c628f95
Fixed examples, added SEI on cracks porosity change, added tests
Jul 20, 2022
f23b3ba
flake8
Jul 20, 2022
5f0258e
Breaking change: particle mechanics now a compulsory submodel (none i…
Jul 21, 2022
7ee18d8
coverage
Jul 21, 2022
1d6319e
Fixed tests
Jul 21, 2022
ffdbb48
Merged latest changes from develop to fix conflict
Jul 22, 2022
f6b979f
Fixed test_OKane2022
Jul 22, 2022
5ae0a6c
flake8
Jul 22, 2022
63a9c79
Completed changes requested in review
Jul 26, 2022
21f0374
changelog
Jul 26, 2022
4153103
Modified tests to account for Chen2020_plating being deleted
Jul 26, 2022
9ad8b75
Modified more tests to account for Chen2020_plating being deleted
Jul 26, 2022
ebeffb1
Hard coded cracking activation energy (currently 0)
Jul 26, 2022
51d1c4f
Removed cracking activation energy from parameter csv files
Jul 27, 2022
851b44c
Deleted the correct parameter this time
Jul 27, 2022
2b77c81
Third time lucky?
Jul 27, 2022
5276a9b
Fixed conflict in changelog
Jul 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

- Moved general code about submodels to `BaseModel` instead of `BaseBatteryModel`, making it easier to build custom models from submodels. ([#2169](https://github.com/pybamm-team/PyBaMM/pull/2169))
- Events can now be plotted as a regular variable (under the name "Event: event_name", e.g. "Event: Minimum voltage [V]") ([#2158](https://github.com/pybamm-team/PyBaMM/pull/2158))
- Added SEI growth on cracks ([#2104](https://github.com/pybamm-team/PyBaMM/pull/2104))
- Added Arrhenius temperature dependence of SEI growth ([#2104](https://github.com/pybamm-team/PyBaMM/pull/2104))
- The "Inner SEI reaction proportion" parameter actually gets used now ([#2104](https://github.com/pybamm-team/PyBaMM/pull/2104))
brosaplanella marked this conversation as resolved.
Show resolved Hide resolved
- New OKane2022 parameter set replaces Chen2020_plating ([#2104](https://github.com/pybamm-team/PyBaMM/pull/2104))

## Optimizations

Expand All @@ -23,6 +27,7 @@
## Breaking changes

- Exchange-current density functions (and some other functions) now take an additional argument, the maximum particle concentration for that phase ([#2134](https://github.com/pybamm-team/PyBaMM/pull/2134))
- Loss of lithium to SEI on cracks is now a degradation variable, so setting a particle mechanics submodel is now compulsory (NoMechanics will suffice)

# [v22.6](https://github.com/pybamm-team/PyBaMM/tree/v22.6) - 2022-06-30

Expand Down
219 changes: 219 additions & 0 deletions examples/notebooks/models/SEI-on-cracks.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/notebooks/models/compare-ecker-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.0"
"version": "3.8.10"
},
"toc": {
"base_numbering": 1,
Expand Down
92 changes: 46 additions & 46 deletions examples/notebooks/models/lithium-plating.ipynb

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions examples/notebooks/models/using-submodels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We don't want any SEI formation or lithium plating in this model"
"We don't want any particle mechanics, SEI formation or lithium plating in this model"
]
},
{
Expand All @@ -478,7 +478,14 @@
"metadata": {},
"outputs": [],
"source": [
"model.submodels[\n",
" \"Negative particle mechanics\"\n",
"] = pybamm.particle_mechanics.NoMechanics(model.param, \"Negative\")\n",
"model.submodels[\n",
" \"Positive particle mechanics\"\n",
"] = pybamm.particle_mechanics.NoMechanics(model.param, \"Positive\")\n",
"model.submodels[\"sei\"] = pybamm.sei.NoSEI(model.param)\n",
"model.submodels[\"sei on cracks\"] = pybamm.sei.NoSEI(model.param, cracks=True)\n",
"model.submodels[\"lithium plating\"] = pybamm.lithium_plating.NoPlating(model.param)"
]
},
Expand Down Expand Up @@ -603,7 +610,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.8.12 ('conda_jl')",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -617,7 +624,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.8.10"
},
"toc": {
"base_numbering": 1,
Expand Down
7 changes: 7 additions & 0 deletions examples/scripts/custom_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@
] = pybamm.electrolyte_conductivity.surface_potential_form.Explicit(
model.param, "Positive"
)
model.submodels[
"Negative particle mechanics"
] = pybamm.particle_mechanics.NoMechanics(model.param, "Negative")
model.submodels[
"Positive particle mechanics"
] = pybamm.particle_mechanics.NoMechanics(model.param, "Positive")
model.submodels["sei"] = pybamm.sei.NoSEI(model.param)
model.submodels["sei on cracks"] = pybamm.sei.NoSEI(model.param, cracks=True)
model.submodels["lithium plating"] = pybamm.lithium_plating.NoPlating(model.param)

# build model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Electrode height [m],6.5E-2,Chen 2020,
Electrode width [m],1.58,Chen 2020,accounts for both sides of unwound electrode (double-sided coating)
Cell cooling surface area [m2],5.31E-3,Chen 2020,cylindrical
Cell volume [m3],2.42E-5,Chen 2020,cylindrical
Cell thermal expansion coefficient [m.K-1],1.1E-6,Ai2020,
,,,
# Current collector properties ,,,
Negative current collector conductivity [S.m-1],58411000,CRC Handbook,copper
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# LG M50 Graphite anode parameters

Parameters for a LG M50 graphite anode, from the paper

> Simon O'Kane, Weilong Ai, Ganesh Madabattula, Diego Alonso-Alvarez, Robert Timms, Valentin Sulzer, Jacqueline Edge, Billy Wu, Gregory Offer, and Monica Marinescu. ["Lithium-ion battery degradation: how to model it."](https://pubs.rsc.org/en/content/articlelanding/2022/cp/d2cp00417h) Physical Chemistry: Chemical Physics 24 (2022): 7909-7922

and references therein.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from pybamm import Parameter, constants, exp


def graphite_cracking_rate_Ai2020(T_dim):
"""
Graphite particle cracking rate as a function of temperature [1, 2].

References
----------
.. [1] Ai, W., Kraft, L., Sturm, J., Jossen, A., & Wu, B. (2020).
Electrochemical Thermal-Mechanical Modelling of Stress Inhomogeneity in
Lithium-Ion Pouch Cells. Journal of The Electrochemical Society, 167(1), 013512
DOI: 10.1149/2.0122001JES.
.. [2] Deshpande, R., Verbrugge, M., Cheng, Y. T., Wang, J., & Liu, P. (2012).
Battery cycle life prediction with coupled chemical degradation and fatigue
mechanics. Journal of the Electrochemical Society, 159(10), A1730.

Parameters
----------
T_dim: :class:`pybamm.Symbol`
temperature, [K]

Returns
-------
k_cr: :class:`pybamm.Symbol`
cracking rate, [m/(Pa.m0.5)^m_cr]
where m_cr is another Paris' law constant
"""
k_cr = 3.9e-20
Eac_cr = Parameter(
Copy link
Member

Choose a reason for hiding this comment

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

this should be hard-coded too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed (currently 0, sorry to disappoint!)

"Negative electrode activation energy for cracking rate [J.mol-1]"
)
arrhenius = exp(Eac_cr / constants.R * (1 / T_dim - 1 / 298.15))
return k_cr * arrhenius
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
def graphite_volume_change_Ai2020(sto, c_s_max):
"""
Graphite particle volume change as a function of stochiometry [1, 2].

References
----------
.. [1] Ai, W., Kraft, L., Sturm, J., Jossen, A., & Wu, B. (2020).
Electrochemical Thermal-Mechanical Modelling of Stress Inhomogeneity in
Lithium-Ion Pouch Cells. Journal of The Electrochemical Society, 167(1), 013512
DOI: 10.1149/2.0122001JES.
.. [2] Rieger, B., Erhard, S. V., Rumpf, K., & Jossen, A. (2016).
A new method to model the thickness change of a commercial pouch cell
during discharge. Journal of The Electrochemical Society, 163(8), A1566-A1575.

Parameters
----------
sto: :class:`pybamm.Symbol`
Electrode stochiometry, dimensionless
should be R-averaged particle concentration
Returns
-------
t_change:class:`pybamm.Symbol`
volume change, dimensionless, normalised by particle volume
"""
p1 = 145.907
p2 = -681.229
p3 = 1334.442
p4 = -1415.710
p5 = 873.906
p6 = -312.528
p7 = 60.641
p8 = -5.706
p9 = 0.386
p10 = -4.966e-05
t_change = (
p1 * sto ** 9
+ p2 * sto ** 8
+ p3 * sto ** 7
+ p4 * sto ** 6
+ p5 * sto ** 5
+ p6 * sto ** 4
+ p7 * sto ** 3
+ p8 * sto ** 2
+ p9 * sto
+ p10
)
return t_change
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name [units],Value,Reference,Notes
Negative electrode conductivity [S.m-1],215,Chen 2020,graphite
Maximum concentration in negative electrode [mol.m-3],33133,Chen 2020,tuned for 1C
Negative electrode diffusivity [m2.s-1],[function]graphite_LGM50_diffusivity_Chen2020,Chen 2020,tuned for 1C
Negative electrode OCP [V],[function]graphite_LGM50_ocp_Chen2020,Chen 2020,
Negative electrode OCP [V],[data]graphite_LGM50_ocp_Chen2020,Chen 2020,
,,,
# Microstructure,,,
Negative electrode porosity,0.25,Chen 2020,
Expand All @@ -29,6 +29,24 @@ Negative electrode specific heat capacity [J.kg-1.K-1],700,default,
Negative electrode thermal conductivity [W.m-1.K-1],1.7,default,
Negative electrode OCP entropic change [V.K-1],0,,
,,,
,,,
,,,
# Mechanical properties,,,
Negative electrode Poisson's ratio,0.3,,
Negative electrode Young's modulus [Pa],15e9,,
Negative electrode reference concentration for free of deformation [mol.m-3],0,,
Negative electrode partial molar volume [m3.mol-1],3.1e-6,,
Negative electrode volume change,[function]graphite_volume_change_Ai2020,Ai2020,
,,,
# Crack model,,,
Negative electrode initial crack length [m],20e-9,,
Negative electrode initial crack width [m],15e-9,,
Negative electrode number of cracks per unit area [m-2],3.18e15,,
Negative electrode Paris' law constant b,1.12,,
Negative electrode Paris' law constant m,2.2,,
Negative electrode cracking rate,[function]graphite_cracking_rate_Ai2020,Ai2020,
Negative electrode activation energy for cracking rate [J.mol-1],0,,
Copy link
Member

Choose a reason for hiding this comment

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

these can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

,,,
# Loss of active materials (LAM) model,,,
Negative electrode LAM constant proportional term [s-1],2.7778E-7,0.001/3600,
Negative electrode LAM constant exponential term,2,,
Negative electrode critical stress [Pa],60e6,,
,,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# NMC 811 positive electrode parameters

Parameters for an LG M50 NMC 811 positive electrode, from the paper

> Simon O'Kane, Weilong Ai, Ganesh Madabattula, Diego Alonso-Alvarez, Robert Timms, Valentin Sulzer, Jacqueline Edge, Billy Wu, Gregory Offer, and Monica Marinescu. ["Lithium-ion battery degradation: how to model it."](https://pubs.rsc.org/en/content/articlelanding/2022/cp/d2cp00417h) Physical Chemistry: Chemical Physics 24 (2022): 7909-7922

and references therein.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from pybamm import Parameter, constants, exp


def cracking_rate_Ai2020(T_dim):
"""
Particle cracking rate as a function of temperature [1, 2].

References
----------
.. [1] > Ai, W., Kraft, L., Sturm, J., Jossen, A., & Wu, B. (2020).
Electrochemical Thermal-Mechanical Modelling of Stress Inhomogeneity in
Lithium-Ion Pouch Cells. Journal of The Electrochemical Society, 167(1), 013512
DOI: 10.1149/2.0122001JES.
.. [2] > Deshpande, R., Verbrugge, M., Cheng, Y. T., Wang, J., & Liu, P. (2012).
Battery cycle life prediction with coupled chemical degradation and fatigue
mechanics. Journal of the Electrochemical Society, 159(10), A1730.

Parameters
----------
T: :class:`pybamm.Symbol`
temperature, [K]

Returns
-------
k_cr: :class:`pybamm.Symbol`
cracking rate, [m/(Pa.m0.5)^m_cr]
where m_cr is another Paris' law constant
"""
k_cr = 3.9e-20
Eac_cr = Parameter(
Copy link
Member

Choose a reason for hiding this comment

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

should be hard-coded

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed (currently 0, sorry to disappoint!)

"Positive electrode activation energy for cracking rate [J.mol-1]"
)
arrhenius = exp(Eac_cr / constants.R * (1 / T_dim - 1 / 298.15))
return k_cr * arrhenius
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from pybamm import exp, constants


def nmc_LGM50_diffusivity_Chen2020(sto, T):
"""
NMC diffusivity as a function of stoichiometry, in this case the
diffusivity is taken to be a constant. The value is taken from [1].

References
----------
.. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W.
Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for
Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the
Electrochemical Society 167 (2020): 080534.

Parameters
----------
sto: :class:`pybamm.Symbol`
Electrode stochiometry
T: :class:`pybamm.Symbol`
Dimensional temperature

Returns
-------
:class:`pybamm.Symbol`
Solid diffusivity
"""

D_ref = 4e-15
E_D_s = 25000 # O'Kane et al. (2022), after Cabanero et al. (2018)
arrhenius = exp(E_D_s / constants.R * (1 / 298.15 - 1 / T))

return D_ref * arrhenius
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from pybamm import exp, constants


def nmc_LGM50_electrolyte_exchange_current_density_Chen2020(c_e, c_s_surf, c_s_max, T):
"""
Exchange-current density for Butler-Volmer reactions between NMC and LiPF6 in
EC:DMC.

References
----------
.. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W.
Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for
Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the
Electrochemical Society 167 (2020): 080534.

Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
c_s_surf : :class:`pybamm.Symbol`
Particle concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]

Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""
m_ref = 3.42e-6 # (A/m2)(mol/m3)**1.5 - includes ref concentrations
E_r = 17800
arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T))

return (
m_ref * arrhenius * c_e ** 0.5 * c_s_surf ** 0.5 * (c_s_max - c_s_surf) ** 0.5
)
Loading