Skip to content

Commit

Permalink
Apply formatting corrections by pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammedasher committed Jan 21, 2025
1 parent 1b01e77 commit 374a056
Show file tree
Hide file tree
Showing 2 changed files with 264 additions and 233 deletions.
294 changes: 264 additions & 30 deletions docs/source/examples/notebooks/models/lithium-plating-composite.ipynb

Large diffs are not rendered by default.

203 changes: 0 additions & 203 deletions src/pybamm/input/parameters/lithium_ion/Chen2020_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,184 +237,6 @@ def nmc_LGM50_electrolyte_exchange_current_density_Chen2020(c_e, c_s_surf, c_s_m
return m_ref * arrhenius * c_e**0.5 * c_s_surf**0.5 * (c_s_max - c_s_surf) ** 0.5


def graphite_plating_exchange_current_density_OKane2020(c_e, c_Li, T):
"""
Exchange-current density for Li plating reaction [A.m-2].
References
----------
.. [1] O’Kane, Simon EJ, Ian D. Campbell, Mohamed WJ Marzook, Gregory J. Offer, and
Monica Marinescu. "Physical origin of the differential voltage minimum associated
with lithium plating in Li-ion batteries." Journal of The Electrochemical Society
167, no. 9 (2020): 090540.
Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
c_Li : :class:`pybamm.Symbol`
Plated lithium concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]
Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""

k_plating = pybamm.Parameter(
"Primary: Lithium plating kinetic rate constant [m.s-1]"
)

return pybamm.constants.F * k_plating * c_e


def graphite_stripping_exchange_current_density_OKane2020(c_e, c_Li, T):
"""
Exchange-current density for Li stripping reaction [A.m-2].
References
----------
.. [1] O’Kane, Simon EJ, Ian D. Campbell, Mohamed WJ Marzook, Gregory J. Offer, and
Monica Marinescu. "Physical origin of the differential voltage minimum associated
with lithium plating in Li-ion batteries." Journal of The Electrochemical Society
167, no. 9 (2020): 090540.
Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
c_Li : :class:`pybamm.Symbol`
Plated lithium concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]
Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""

k_plating = pybamm.Parameter(
"Primary: Lithium plating kinetic rate constant [m.s-1]"
)

return pybamm.constants.F * k_plating * c_Li


def graphite_SEI_limited_dead_lithium_OKane2022(L_sei):
"""
Decay rate for dead lithium formation [s-1].
References
----------
.. [1] Simon E. J. O'Kane, Weilong Ai, Ganesh Madabattula, Diega Alonso-Alvarez,
Robert Timms, Valentin Sulzer, Jaqueline Sophie Edge, Billy Wu, Gregory J. Offer
and Monica Marinescu. "Lithium-ion battery degradation: how to model it."
Physical Chemistry: Chemical Physics 24, no. 13 (2022): 7909-7922.
Parameters
----------
L_sei : :class:`pybamm.Symbol`
Total SEI thickness [m]
Returns
-------
:class:`pybamm.Symbol`
Dead lithium decay rate [s-1]
"""

gamma_0 = pybamm.Parameter("Primary: Dead lithium decay constant [s-1]")
L_inner_0 = pybamm.Parameter("Primary: Initial inner SEI thickness [m]")
L_outer_0 = pybamm.Parameter("Primary: Initial outer SEI thickness [m]")
L_sei_0 = L_inner_0 + L_outer_0

gamma = gamma_0 * L_sei_0 / L_sei

return gamma


def silicon_plating_exchange_current_density_OKane2020(c_e, c_Li, T):
"""
Exchange-current density for Li plating reaction [A.m-2].
References
----------
.. [1] O’Kane, Simon EJ, Ian D. Campbell, Mohamed WJ Marzook, Gregory J. Offer, and
Monica Marinescu. "Physical origin of the differential voltage minimum associated
with lithium plating in Li-ion batteries." Journal of The Electrochemical Society
167, no. 9 (2020): 090540.
Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
c_Li : :class:`pybamm.Symbol`
Plated lithium concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]
Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""

k_plating = pybamm.Parameter(
"Secondary: Lithium plating kinetic rate constant [m.s-1]"
)

return pybamm.constants.F * k_plating * c_e


def silicon_stripping_exchange_current_density_OKane2020(c_e, c_Li, T):
"""
Exchange-current density for Li stripping reaction [A.m-2].
References
----------
.. [1] O’Kane, Simon EJ, Ian D. Campbell, Mohamed WJ Marzook, Gregory J. Offer, and
Monica Marinescu. "Physical origin of the differential voltage minimum associated
with lithium plating in Li-ion batteries." Journal of The Electrochemical Society
167, no. 9 (2020): 090540.
Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
c_Li : :class:`pybamm.Symbol`
Plated lithium concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]
Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""

k_plating = pybamm.Parameter(
"Secondary: Lithium plating kinetic rate constant [m.s-1]"
)

return pybamm.constants.F * k_plating * c_Li


def silicon_SEI_limited_dead_lithium_OKane2022(L_sei):
"""
Decay rate for dead lithium formation [s-1].
References
----------
.. [1] Simon E. J. O'Kane, Weilong Ai, Ganesh Madabattula, Diega Alonso-Alvarez,
Robert Timms, Valentin Sulzer, Jaqueline Sophie Edge, Billy Wu, Gregory J. Offer
and Monica Marinescu. "Lithium-ion battery degradation: how to model it."
Physical Chemistry: Chemical Physics 24, no. 13 (2022): 7909-7922.
Parameters
----------
L_sei : :class:`pybamm.Symbol`
Total SEI thickness [m]
Returns
-------
:class:`pybamm.Symbol`
Dead lithium decay rate [s-1]
"""

gamma_0 = pybamm.Parameter("Secondary: Dead lithium decay constant [s-1]")
L_inner_0 = pybamm.Parameter("Secondary: Initial inner SEI thickness [m]")
L_outer_0 = pybamm.Parameter("Secondary: Initial outer SEI thickness [m]")
L_sei_0 = L_inner_0 + L_outer_0

gamma = gamma_0 * L_sei_0 / L_sei

return gamma


def electrolyte_diffusivity_Nyman2008(c_e, T):
"""
Diffusivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration. The data
Expand Down Expand Up @@ -504,31 +326,6 @@ def get_parameter_values():

return {
"chemistry": "lithium_ion",
# lithium plating
# Plating parameters referred from OKane2022
"Lithium metal partial molar volume [m3.mol-1]": 1.3e-05,
"Primary: Lithium plating kinetic rate constant [m.s-1]": 1e-09,
"Primary: Exchange-current density for plating [A.m-2]"
"": graphite_plating_exchange_current_density_OKane2020,
"Primary: Exchange-current density for stripping [A.m-2]"
"": graphite_stripping_exchange_current_density_OKane2020,
"Primary: Initial plated lithium concentration [mol.m-3]": 0.0,
"Primary: Typical plated lithium concentration [mol.m-3]": 1000.0,
"Primary: Lithium plating transfer coefficient": 0.65,
"Primary: Dead lithium decay constant [s-1]": 1e-06,
"Primary: Dead lithium decay rate [s-1]"
"": graphite_SEI_limited_dead_lithium_OKane2022,
"Secondary: Lithium plating kinetic rate constant [m.s-1]": 1e-09,
"Secondary: Exchange-current density for plating [A.m-2]"
"": silicon_plating_exchange_current_density_OKane2020,
"Secondary: Exchange-current density for stripping [A.m-2]"
"": silicon_stripping_exchange_current_density_OKane2020,
"Secondary: Initial plated lithium concentration [mol.m-3]": 0.0,
"Secondary: Typical plated lithium concentration [mol.m-3]": 1000.0,
"Secondary: Lithium plating transfer coefficient": 0.65,
"Secondary: Dead lithium decay constant [s-1]": 1e-06,
"Secondary: Dead lithium decay rate [s-1]"
"": silicon_SEI_limited_dead_lithium_OKane2022,
# sei
"Primary: Ratio of lithium moles to SEI moles": 2.0,
"Primary: SEI partial molar volume [m3.mol-1]": 9.585e-05,
Expand Down

0 comments on commit 374a056

Please sign in to comment.