From 1daf45ab90a1a5328160139b6141fd47b19e535c Mon Sep 17 00:00:00 2001 From: Dharshannan Sugunan Date: Tue, 4 Aug 2026 15:43:13 +0100 Subject: [PATCH 1/4] Implement Mayur2024 Added Mayur2024 parameter file for composite degradation (Si/Gr anode) and tested. --- packages/pybamm/pyproject.toml | 1 + .../mayur_degradation.py | 117 +++ .../input/parameters/lithium_ion/Mayur2024.py | 945 ++++++++++++++++++ .../input/parameters/lithium_ion/__init__.py | 2 +- 4 files changed, 1064 insertions(+), 1 deletion(-) create mode 100644 packages/pybamm/si_gr_expansion_precursor/mayur_degradation.py create mode 100644 packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py diff --git a/packages/pybamm/pyproject.toml b/packages/pybamm/pyproject.toml index ab12d98c9d..4821074f29 100644 --- a/packages/pybamm/pyproject.toml +++ b/packages/pybamm/pyproject.toml @@ -120,6 +120,7 @@ Sulzer2019 = "pybamm.input.parameters.lead_acid.Sulzer2019:get_parameter_values" Ai2020 = "pybamm.input.parameters.lithium_ion.Ai2020:get_parameter_values" Chen2020 = "pybamm.input.parameters.lithium_ion.Chen2020:get_parameter_values" Chen2020_composite = "pybamm.input.parameters.lithium_ion.Chen2020_composite:get_parameter_values" +Mayur2024 = "pybamm.input.parameters.lithium_ion.Mayur2024:get_parameter_values" Ecker2015 = "pybamm.input.parameters.lithium_ion.Ecker2015:get_parameter_values" Ecker2015_graphite_halfcell = "pybamm.input.parameters.lithium_ion.Ecker2015_graphite_halfcell:get_parameter_values" Marquis2019 = "pybamm.input.parameters.lithium_ion.Marquis2019:get_parameter_values" diff --git a/packages/pybamm/si_gr_expansion_precursor/mayur_degradation.py b/packages/pybamm/si_gr_expansion_precursor/mayur_degradation.py new file mode 100644 index 0000000000..963e77be15 --- /dev/null +++ b/packages/pybamm/si_gr_expansion_precursor/mayur_degradation.py @@ -0,0 +1,117 @@ +import matplotlib.pyplot as plt +import pybamm + +pybamm.set_logging_level('NOTICE') +model = pybamm.lithium_ion.DFN( + { + "particle phases": ("2", "1"), + "open-circuit potential": (("single", "current sigmoid"), "single"), + "SEI": "solvent-diffusion limited", + "SEI porosity change": "true", + "lithium plating": "partially reversible", + "lithium plating porosity change": "true", # alias for "SEI porosity change" + "particle mechanics": ("swelling and cracking", "swelling only"), + "SEI on cracks": "false", + "loss of active material": "stress-driven", + } +) + +param = pybamm.ParameterValues("Mayur2024") +var_pts = { + "x_n": 5, # negative electrode + "x_s": 5, # separator + "x_p": 5, # positive electrode + "r_n_prim": 30, # negative particle + "r_n_sec": 30, # negative particle + "r_n": 30, # negative particle + "r_p": 30, # positive particle +} + +cycle_number = 10 +exp = pybamm.Experiment( + [ + "Discharge at 0.1C until 2.5 V", # initial capacity check + "Charge at 0.3C until 4.2 V", + "Hold at 4.2 V until C/100", + ] + + [ + ( + "Discharge at 1C until 2.5 V", # ageing cycles + "Charge at 0.3C until 4.2 V", + "Hold at 4.2 V until C/100", + ) + ] + * cycle_number + + ["Discharge at 0.1C until 2.5 V"], # final capacity check +) +solver = pybamm.IDAKLUSolver() +sim = pybamm.Simulation( + model, parameter_values=param, experiment=exp, solver=solver, var_pts=var_pts +) +sol = sim.solve(initial_soc=1.0) + +# ================================ +# Plot 1 +# ================================ +Qt = sol["Throughput capacity [A.h]"].entries +Q_SEI = sol["Loss of capacity to negative SEI [A.h]"].entries +Q_plating = sol["Loss of capacity to negative lithium plating [A.h]"].entries +Q_side = sol["Total capacity lost to side reactions [A.h]"].entries +Q_LLI = ( + sol["Total lithium lost [mol]"].entries * 96485.3 / 3600 +) # convert from mol to A.h +plt.figure() +plt.plot(Qt, Q_SEI, label="SEI", linestyle="dashed") +plt.plot(Qt, Q_plating, label="Li plating", linestyle="dotted") +plt.plot(Qt, Q_side, label="All side reactions", linestyle=(0, (6, 1))) +plt.plot(Qt, Q_LLI, label="All LLI") +plt.xlabel("Throughput capacity [A.h]") +plt.ylabel("Capacity loss [A.h]") +plt.legend() +plt.show() + +# ================================ +# Plot 2 +# ================================ +Qt = sol["Throughput capacity [A.h]"].entries +LLI = sol["Loss of lithium inventory [%]"].entries +LAM_neg = sol["Loss of active material in negative electrode [%]"].entries +LAM_pos = sol["Loss of active material in positive electrode [%]"].entries +plt.figure() +plt.plot(Qt, LLI, label="LLI") +plt.plot(Qt, LAM_neg, label="LAM (negative)") +plt.plot(Qt, LAM_pos, label="LAM (positive)") +plt.xlabel("Throughput capacity [A.h]") +plt.ylabel("Degradation modes [%]") +plt.legend() +plt.show() + +# ================================ +# Plot 2b: negative-electrode LAM split by phase (graphite vs silicon) +# ================================ +LAM_gr = sol["Loss of active material in primary phase in negative electrode [%]"].entries +LAM_si = sol[ + "Loss of active material in secondary phase in negative electrode [%]" +].entries +plt.figure() +plt.plot(Qt, LAM_gr, label="LAM graphite (primary)") +plt.plot(Qt, LAM_si, label="LAM silicon (secondary)", linestyle="dashed") +plt.xlabel("Throughput capacity [A.h]") +plt.ylabel("Loss of active material [%]") +plt.legend() +plt.show() + +# ================================ +# Plot 3 +# ================================ +eps_neg_avg = sol["X-averaged negative electrode porosity"].entries +eps_neg_sep = sol["Negative electrode porosity"].entries[-1, :] +eps_neg_CC = sol["Negative electrode porosity"].entries[0, :] +plt.figure() +plt.plot(Qt, eps_neg_avg, label="Average") +plt.plot(Qt, eps_neg_sep, label="Separator", linestyle="dotted") +plt.plot(Qt, eps_neg_CC, label="Current collector", linestyle="dashed") +plt.xlabel("Throughput capacity [A.h]") +plt.ylabel("Negative electrode porosity") +plt.legend() +plt.show() diff --git a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py new file mode 100644 index 0000000000..aaf99567f1 --- /dev/null +++ b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py @@ -0,0 +1,945 @@ +import os + +import numpy as np + +import pybamm + + +# ----------------------------------------------------------------------------- +# Lithium plating (from O'Kane et al. 2020 / 2022) +# ----------------------------------------------------------------------------- +def 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("Lithium plating kinetic rate constant [m.s-1]") + return pybamm.constants.F * k_plating * c_e + + +def 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("Lithium plating kinetic rate constant [m.s-1]") + return pybamm.constants.F * k_plating * c_Li + + +def 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` + SEI thickness [m] + + Returns + ------- + :class:`pybamm.Symbol` + Dead lithium decay rate [s-1] + """ + gamma_0 = pybamm.Parameter("Dead lithium decay constant [s-1]") + L_sei_0 = pybamm.Parameter("Initial SEI thickness [m]") + + gamma = gamma_0 * L_sei_0 / L_sei + + return gamma + + +# ----------------------------------------------------------------------------- +# Graphite (primary phase) kinetics, diffusivity and mechanics +# ----------------------------------------------------------------------------- +def graphite_LGM50_diffusivity_Chen2020(sto, T): + """ + Graphite diffusivity as a function of stoichiometry (taken as constant, with + Arrhenius temperature dependence). D_ref and activation energy for the composite + graphite phase are taken from :footcite:t:`Bonkile2024` (D_ref = 3.3e-14 m2.s-1, + E_D_s = 3.03e4 J.mol-1). + + Parameters + ---------- + sto: :class:`pybamm.Symbol` + Electrode stoichiometry + T: :class:`pybamm.Symbol` + Dimensional temperature + + Returns + ------- + :class:`pybamm.Symbol` + Solid diffusivity + """ + D_ref = 3.3e-14 + E_D_s = 3.03e4 + arrhenius = np.exp(E_D_s / pybamm.constants.R * (1 / 298.15 - 1 / T)) + + return D_ref * arrhenius + + +def graphite_LGM50_electrolyte_exchange_current_density_Chen2020( + c_e, c_s_surf, c_s_max, T +): + """ + Exchange-current density for Butler-Volmer reactions between graphite 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] + c_s_max : :class:`pybamm.Symbol` + Maximum particle concentration [mol.m-3] + T : :class:`pybamm.Symbol` + Temperature [K] + + Returns + ------- + :class:`pybamm.Symbol` + Exchange-current density [A.m-2] + """ + m_ref = 6.48e-7 # (A/m2)(m3/mol)**1.5 - includes ref concentrations + E_r = 35000 + arrhenius = np.exp(E_r / pybamm.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 + + +def graphite_volume_change_Ai2020(sto): + """ + Graphite particle volume change as a function of stoichiometry [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 stoichiometry, 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 + + +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 = 0 # to be implemented + arrhenius = np.exp(Eac_cr / pybamm.constants.R * (1 / T_dim - 1 / 298.15)) + return k_cr * arrhenius + + +# ----------------------------------------------------------------------------- +# Silicon (secondary phase) OCP, kinetics, diffusivity and mechanics +# ----------------------------------------------------------------------------- +def silicon_ocp_lithiation_Mark2016(sto): + """ + silicon Open-circuit Potential (OCP) as a a function of the + stoichiometry. The fit is taken from the Enertech cell [1], which is only accurate + for 0 < sto < 1. + + References + ---------- + .. [1] Verbrugge M, Baker D, Xiao X. Formulation for the treatment of multiple + electrochemical reactions and associated speciation for the Lithium-Silicon + electrode[J]. Journal of The Electrochemical Society, 2015, 163(2): A262. + + Parameters + ---------- + sto: double + stoichiometry of material (li-fraction) + + Returns + ------- + :class:`pybamm.Symbol` + OCP [V] + """ + p1 = -96.63 + p2 = 372.6 + p3 = -587.6 + p4 = 489.9 + p5 = -232.8 + p6 = 62.99 + p7 = -9.286 + p8 = 0.8633 + + U_lithiation = ( + p1 * sto ** 7 + + p2 * sto ** 6 + + p3 * sto ** 5 + + p4 * sto ** 4 + + p5 * sto ** 3 + + p6 * sto ** 2 + + p7 * sto + + p8 + ) + 1e-4 * (1 / sto + 1 / (sto - 1)) + return U_lithiation + + +def silicon_ocp_delithiation_Mark2016(sto): + """ + silicon Open-circuit Potential (OCP) as a a function of the + stoichiometry. The fit is taken from the Enertech cell [1], which is only accurate + for 0 < sto < 1. + + References + ---------- + .. [1] Verbrugge M, Baker D, Xiao X. Formulation for the treatment of multiple + electrochemical reactions and associated speciation for the Lithium-Silicon + electrode[J]. Journal of The Electrochemical Society, 2015, 163(2): A262. + + Parameters + ---------- + sto: double + stoichiometry of material (li-fraction) + + Returns + ------- + :class:`pybamm.Symbol` + OCP [V] + """ + p1 = -51.02 + p2 = 161.3 + p3 = -205.7 + p4 = 140.2 + p5 = -58.76 + p6 = 16.87 + p7 = -3.792 + p8 = 0.9937 + + U_delithiation = ( + p1 * sto ** 7 + + p2 * sto ** 6 + + p3 * sto ** 5 + + p4 * sto ** 4 + + p5 * sto ** 3 + + p6 * sto ** 2 + + p7 * sto + + p8 + ) + return U_delithiation + + +def silicon_ocp_average_Mark2016(sto): + return ( + silicon_ocp_lithiation_Mark2016(sto) + silicon_ocp_delithiation_Mark2016(sto) + ) / 2 + + +def silicon_LGM50_diffusivity_Bonkile2024(sto, T): + """ + Silicon diffusivity as a function of stoichiometry (taken as constant, with + Arrhenius temperature dependence). D_ref and activation energy for the composite + silicon phase are taken from :footcite:t:`Bonkile2024` (D_ref = 3.0e-16 m2.s-1, + E_D_s = 4.82e4 J.mol-1, after Jiang et al. 2022 / Johari et al. 2011). + + Parameters + ---------- + sto: :class:`pybamm.Symbol` + Electrode stoichiometry + T: :class:`pybamm.Symbol` + Dimensional temperature + + Returns + ------- + :class:`pybamm.Symbol` + Solid diffusivity + """ + D_ref = 3.0e-16 + E_D_s = 4.82e4 + arrhenius = np.exp(E_D_s / pybamm.constants.R * (1 / 298.15 - 1 / T)) + + return D_ref * arrhenius + + +def silicon_LGM50_electrolyte_exchange_current_density_Chen2020( + c_e, c_s_surf, c_s_max, T +): + """ + Exchange-current density for Butler-Volmer reactions between silicon 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] + c_s_max : :class:`pybamm.Symbol` + Maximum particle concentration [mol.m-3] + T : :class:`pybamm.Symbol` + Temperature [K] + + Returns + ------- + :class:`pybamm.Symbol` + Exchange-current density [A.m-2] + """ + m_ref = ( + 6.48e-7 * 28700 / 278000 + ) # (A/m2)(m3/mol)**1.5 - includes ref concentrations + E_r = 35000 + arrhenius = np.exp(E_r / pybamm.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 + + +def silicon_volume_change_Ai2020(sto): + """ + Silicon particle volume change as a function of stoichiometry, using the linear + model of :footcite:t:`Ai2020`, ``t_change = Omega * c_s_max * sto``, with the + silicon partial molar volume and maximum concentration from + :footcite:t:`Bonkile2024`. + + Parameters + ---------- + sto: :class:`pybamm.Symbol` + Electrode stoichiometry, dimensionless + should be R-averaged particle concentration + + Returns + ------- + t_change:class:`pybamm.Symbol` + volume change, dimensionless, normalised by particle volume + """ + omega = pybamm.Parameter( + "Secondary: Negative electrode partial molar volume [m3.mol-1]" + ) + c_s_max = pybamm.Parameter( + "Secondary: Maximum concentration in negative electrode [mol.m-3]" + ) + t_change = omega * c_s_max * sto + return t_change + + +def silicon_cracking_rate_Ai2020(T_dim): + """ + Silicon particle cracking rate as a function of temperature. Same Paris' law + cracking rate as graphite (3.9e-20) per :footcite:t:`Bonkile2024`. + + Parameters + ---------- + T_dim: :class:`pybamm.Symbol` + temperature, [K] + + Returns + ------- + k_cr: :class:`pybamm.Symbol` + cracking rate, [m/(Pa.m0.5)^m_cr] + """ + k_cr = 3.9e-20 + Eac_cr = 0 # to be implemented + arrhenius = np.exp(Eac_cr / pybamm.constants.R * (1 / T_dim - 1 / 298.15)) + return k_cr * arrhenius + + +# ----------------------------------------------------------------------------- +# NMC (positive electrode) OCP, kinetics, diffusivity and mechanics +# ----------------------------------------------------------------------------- +def nmc_LGM50_diffusivity_Chen2020(sto, T): + """ + NMC diffusivity as a function of stoichiometry (taken as constant, with Arrhenius + temperature dependence). 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 stoichiometry + 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 = np.exp(E_D_s / pybamm.constants.R * (1 / 298.15 - 1 / T)) + + return D_ref * arrhenius + + +def nmc_LGM50_ocp_Chen2020(sto): + """ + LG M50 NMC open-circuit potential as a function of stoichiometry, fit 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 stoichiometry + + Returns + ------- + :class:`pybamm.Symbol` + Open-circuit potential + """ + u_eq = ( + -0.8090 * sto + + 4.4875 + - 0.0428 * np.tanh(18.5138 * (sto - 0.5542)) + - 17.7326 * np.tanh(15.7890 * (sto - 0.3117)) + + 17.5842 * np.tanh(15.9308 * (sto - 0.3120)) + ) + 1e-4 * (1 / sto + 1 / (sto - 1)) + return u_eq + + +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] + c_s_max : :class:`pybamm.Symbol` + Maximum 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)(m3/mol)**1.5 - includes ref concentrations + E_r = 17800 + arrhenius = np.exp(E_r / pybamm.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 + + +def volume_change_Ai2020(sto): + """ + Positive particle volume change as a function of stoichiometry [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 stoichiometry, dimensionless + should be R-averaged particle concentration + + Returns + ------- + t_change:class:`pybamm.Symbol` + volume change, dimensionless, normalised by particle volume + """ + omega = pybamm.Parameter("Positive electrode partial molar volume [m3.mol-1]") + c_s_max = pybamm.Parameter("Maximum concentration in positive electrode [mol.m-3]") + t_change = omega * c_s_max * sto + return t_change + + +def cracking_rate_Ai2020(T_dim): + """ + Positive 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 = 0 # to be implemented + arrhenius = np.exp(Eac_cr / pybamm.constants.R * (1 / T_dim - 1 / 298.15)) + return k_cr * arrhenius + + +# ----------------------------------------------------------------------------- +# Electrolyte (Nyman 2008 with Ecker 2015 Arrhenius temperature dependence) +# ----------------------------------------------------------------------------- +def electrolyte_diffusivity_Nyman2008_arrhenius(c_e, T): + """ + Diffusivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration. The data + comes from [1], with Arrhenius temperature dependence added from [2]. + + References + ---------- + .. [1] A. Nyman, M. Behm, and G. Lindbergh, "Electrochemical characterisation and + modelling of the mass transport phenomena in LiPF6-EC-EMC electrolyte," + Electrochim. Acta, vol. 53, no. 22, pp. 6356-6365, 2008. + .. [2] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of + a lithium-ion battery i. determination of parameters." Journal of the + Electrochemical Society 162.9 (2015): A1836-A1848. + + Parameters + ---------- + c_e: :class:`pybamm.Symbol` + Dimensional electrolyte concentration + T: :class:`pybamm.Symbol` + Dimensional temperature + + Returns + ------- + :class:`pybamm.Symbol` + Solid diffusivity + """ + D_c_e = 8.794e-11 * (c_e / 1000) ** 2 - 3.972e-10 * (c_e / 1000) + 4.862e-10 + + # Nyman et al. (2008) does not provide temperature dependence + # So use temperature dependence from Ecker et al. (2015) instead + E_D_c_e = 17000 + arrhenius = np.exp(E_D_c_e / pybamm.constants.R * (1 / 298.15 - 1 / T)) + + return D_c_e * arrhenius + + +def electrolyte_conductivity_Nyman2008_arrhenius(c_e, T): + """ + Conductivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration. The data + comes from [1], with Arrhenius temperature dependence added from [2]. + + References + ---------- + .. [1] A. Nyman, M. Behm, and G. Lindbergh, "Electrochemical characterisation and + modelling of the mass transport phenomena in LiPF6-EC-EMC electrolyte," + Electrochim. Acta, vol. 53, no. 22, pp. 6356-6365, 2008. + .. [2] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of + a lithium-ion battery i. determination of parameters." Journal of the + Electrochemical Society 162.9 (2015): A1836-A1848. + + Parameters + ---------- + c_e: :class:`pybamm.Symbol` + Dimensional electrolyte concentration + T: :class:`pybamm.Symbol` + Dimensional temperature + + Returns + ------- + :class:`pybamm.Symbol` + Solid diffusivity + """ + sigma_e = ( + 0.1297 * (c_e / 1000) ** 3 - 2.51 * (c_e / 1000) ** 1.5 + 3.329 * (c_e / 1000) + ) + + # Nyman et al. (2008) does not provide temperature dependence + # So use temperature dependence from Ecker et al. (2015) instead + E_sigma_e = 17000 + arrhenius = np.exp(E_sigma_e / pybamm.constants.R * (1 / 298.15 - 1 / T)) + + return sigma_e * arrhenius + + +# Load data in the appropriate format +path, _ = os.path.split(os.path.abspath(__file__)) +graphite_ocp_Enertech_Ai2020_data = pybamm.parameters.process_1D_data( + "graphite_ocp_Enertech_Ai2020.csv", path=path +) + + +def graphite_ocp_Enertech_Ai2020(sto): + name, (x, y) = graphite_ocp_Enertech_Ai2020_data + return pybamm.Interpolant(x, y, sto, name=name, interpolator="cubic") + + +# Call dict via a function to avoid errors when editing in place +def get_parameter_values(): + """ + Parameters for a composite graphite/silicon negative electrode with degradation, + combining the composite electrode model of :footcite:t:`Ai2022` (based on + :footcite:t:`Chen2020`) with the degradation submodels (lithium plating, + SEI on cracks and particle mechanics/cracking/LAM) of :footcite:t:`OKane2022`. + + Beginning-of-life and degradation (mechanical, cracking, LAM) parameters for the + graphite (primary) and silicon (secondary) phases are taken from the supplementary + information of Bonkile et al., "Is silicon worth it? Modelling degradation in + composite silicon/graphite lithium-ion battery electrodes", which itself draws on + :footcite:t:`Chen2020`, :footcite:t:`Ai2022` and :footcite:t:`Ai2020`. + + SEI parameters are example parameters for composite SEI on silicon/graphite. Both + phases use the same values, from the paper :footcite:t:`Yang2017`. + + .. note:: + This parameter set does not claim to be representative of the true parameter + values. Instead these are parameter values assembled to run composite-electrode + degradation studies. + """ + return { + "chemistry": "lithium_ion", + # lithium plating + # (the negative electrode is composite, so the plating reaction parameters are + # phase-specific and carry the "Primary:"/"Secondary:" prefix; the kinetic rate + # constant, dead-lithium decay constant and Li metal molar volume are global) + "Lithium metal partial molar volume [m3.mol-1]": 1.3e-05, + "Lithium plating kinetic rate constant [m.s-1]": 1e-09, + "Dead lithium decay constant [s-1]": 1e-06, + "Primary: Exchange-current density for plating [A.m-2]" + "": plating_exchange_current_density_OKane2020, + "Primary: Exchange-current density for stripping [A.m-2]" + "": 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 rate [s-1]": SEI_limited_dead_lithium_OKane2022, + "Secondary: Exchange-current density for plating [A.m-2]" + "": plating_exchange_current_density_OKane2020, + "Secondary: Exchange-current density for stripping [A.m-2]" + "": 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 rate [s-1]": SEI_limited_dead_lithium_OKane2022, + # global initial SEI thickness (read by the dead-lithium decay-rate function) + "Initial SEI thickness [m]": 5e-09, + # sei + "Primary: Ratio of lithium moles to SEI moles": 2.0, + "Primary: SEI partial molar volume [m3.mol-1]": 9.585e-05, + "Primary: SEI reaction exchange current density [A.m-2]": 1.5e-07, + "Primary: SEI resistivity [Ohm.m]": 200000.0, + "Primary: SEI solvent diffusivity [m2.s-1]": 2.5e-22, + "Primary: Bulk solvent concentration [mol.m-3]": 2636.0, + "Primary: SEI open-circuit potential [V]": 0.4, + "Primary: SEI electron conductivity [S.m-1]": 8.95e-14, + "Primary: SEI lithium interstitial diffusivity [m2.s-1]": 1e-20, + "Primary: Lithium interstitial reference concentration [mol.m-3]": 15.0, + "Primary: Initial SEI thickness [m]": 5e-09, + "Primary: Initial SEI on cracks thickness [m]": 5e-13, # practically zero + "Primary: EC initial concentration in electrolyte [mol.m-3]": 4541.0, + "Primary: EC diffusivity [m2.s-1]": 2e-18, + "Primary: SEI kinetic rate constant [m.s-1]": 1e-12, + "Primary: SEI growth activation energy [J.mol-1]": 38000.0, + "Secondary: Ratio of lithium moles to SEI moles": 2.0, + "Secondary: SEI partial molar volume [m3.mol-1]": 9.585e-05, + "Secondary: SEI reaction exchange current density [A.m-2]": 1.5e-07, + "Secondary: SEI resistivity [Ohm.m]": 200000.0, + "Secondary: SEI solvent diffusivity [m2.s-1]": 2.5e-22, + "Secondary: Bulk solvent concentration [mol.m-3]": 2636.0, + "Secondary: SEI open-circuit potential [V]": 0.4, + "Secondary: SEI electron conductivity [S.m-1]": 8.95e-14, + "Secondary: SEI lithium interstitial diffusivity [m2.s-1]": 1e-20, + "Secondary: Lithium interstitial reference concentration [mol.m-3]": 15.0, + "Secondary: Initial SEI thickness [m]": 5e-09, + "Secondary: Initial SEI on cracks thickness [m]": 5e-13, # practically zero + "Secondary: EC initial concentration in electrolyte [mol.m-3]": 4541.0, + "Secondary: EC diffusivity [m2.s-1]": 2e-18, + "Secondary: SEI kinetic rate constant [m.s-1]": 1e-12, + "Secondary: SEI growth activation energy [J.mol-1]": 38000.0, + "Negative electrode reaction-driven LAM factor [m3.mol-1]": 0.0, + "Positive electrode reaction-driven LAM factor [m3.mol-1]": 0.0, + # cell + "Negative current collector thickness [m]": 1.2e-05, + "Negative electrode thickness [m]": 8.52e-05, + "Separator thickness [m]": 1.2e-05, + "Positive electrode thickness [m]": 7.56e-05, + "Positive current collector thickness [m]": 1.6e-05, + "Electrode height [m]": 0.065, + "Electrode width [m]": 1.58, + "Cell cooling surface area [m2]": 0.00531, + "Cell volume [m3]": 2.42e-05, + "Cell thermal expansion coefficient [m.K-1]": 1.1e-06, + "Negative current collector conductivity [S.m-1]": 58411000.0, + "Positive current collector conductivity [S.m-1]": 36914000.0, + "Negative current collector density [kg.m-3]": 8960.0, + "Positive current collector density [kg.m-3]": 2700.0, + "Negative current collector specific heat capacity [J.kg-1.K-1]": 385.0, + "Positive current collector specific heat capacity [J.kg-1.K-1]": 897.0, + "Negative current collector thermal conductivity [W.m-1.K-1]": 401.0, + "Positive current collector thermal conductivity [W.m-1.K-1]": 237.0, + "Nominal cell capacity [A.h]": 5.0, + "Current function [A]": 5.0, + "Contact resistance [Ohm]": 0, + # negative electrode + "Negative electrode conductivity [S.m-1]": 215.0, + "Primary: Maximum concentration in negative electrode [mol.m-3]": 28700.0, + "Primary: Initial concentration in negative electrode [mol.m-3]": 23000.0, + "Primary: Negative particle diffusivity [m2.s-1]" + "": graphite_LGM50_diffusivity_Chen2020, + "Primary: Negative electrode OCP [V]": graphite_ocp_Enertech_Ai2020, + "Negative electrode porosity": 0.25, + "Primary: Negative electrode active material volume fraction": 0.735, + "Primary: Negative particle radius [m]": 5.86e-06, + "Negative electrode Bruggeman coefficient (electrolyte)": 1.5, + "Negative electrode Bruggeman coefficient (electrode)": 0, + "Negative electrode charge transfer coefficient": 0.5, + "Negative electrode double-layer capacity [F.m-2]": 0.2, + "Primary: Negative electrode exchange-current density [A.m-2]" + "": graphite_LGM50_electrolyte_exchange_current_density_Chen2020, + "Primary: Negative electrode density [kg.m-3]": 1657.0, + "Negative electrode specific heat capacity [J.kg-1.K-1]": 700.0, + "Negative electrode thermal conductivity [W.m-1.K-1]": 1.7, + "Primary: Negative electrode OCP entropic change [V.K-1]": 0.0, + "Secondary: Maximum concentration in negative electrode [mol.m-3]": 278000.0, + "Secondary: Initial concentration in negative electrode [mol.m-3]": 275220.0, + "Secondary: Negative particle diffusivity [m2.s-1]" + "": silicon_LGM50_diffusivity_Bonkile2024, + "Secondary: Negative electrode lithiation OCP [V]" + "": silicon_ocp_lithiation_Mark2016, + "Secondary: Negative electrode delithiation OCP [V]" + "": silicon_ocp_delithiation_Mark2016, + "Secondary: Negative electrode OCP [V]": silicon_ocp_average_Mark2016, + "Secondary: Negative electrode active material volume fraction": 0.015, + "Secondary: Negative particle radius [m]": 1.52e-06, + "Secondary: Negative electrode exchange-current density [A.m-2]" + "": silicon_LGM50_electrolyte_exchange_current_density_Chen2020, + "Secondary: Negative electrode density [kg.m-3]": 2650.0, + "Secondary: Negative electrode OCP entropic change [V.K-1]": 0.0, + # negative electrode mechanics / cracking / LAM (primary: graphite) + "Primary: Negative electrode Poisson's ratio": 0.3, + "Primary: Negative electrode Young's modulus [Pa]": 15000000000.0, + "Primary: Negative electrode reference concentration for free of deformation " + "[mol.m-3]": 0.0, + "Primary: Negative electrode partial molar volume [m3.mol-1]": 3.1e-06, + "Primary: Negative electrode volume change": graphite_volume_change_Ai2020, + "Primary: Negative electrode initial crack length [m]": 2e-08, + "Primary: Negative electrode initial crack width [m]": 1.5e-08, + "Primary: Negative electrode number of cracks per unit area [m-2]": 3.18e15, + "Primary: Negative electrode Paris' law constant b": 1.12, + "Primary: Negative electrode Paris' law constant m": 2.2, + "Primary: Negative electrode cracking rate": graphite_cracking_rate_Ai2020, + "Primary: Negative electrode LAM constant proportional term [s-1]": 2.7778e-07, + "Primary: Negative electrode LAM constant exponential term": 2.0, + "Primary: Negative electrode critical stress [Pa]": 60000000.0, + # negative electrode mechanics / cracking / LAM (secondary: silicon) + "Secondary: Negative electrode Poisson's ratio": 0.22, + "Secondary: Negative electrode Young's modulus [Pa]": 50000000000.0, + "Secondary: Negative electrode reference concentration for free of deformation " + "[mol.m-3]": 0.0, + "Secondary: Negative electrode partial molar volume [m3.mol-1]": 1.2e-05, + "Secondary: Negative electrode volume change": silicon_volume_change_Ai2020, + "Secondary: Negative electrode initial crack length [m]": 2e-08, + "Secondary: Negative electrode initial crack width [m]": 1.5e-08, + "Secondary: Negative electrode number of cracks per unit area [m-2]": 3.18e15, + "Secondary: Negative electrode Paris' law constant b": 1.12, + "Secondary: Negative electrode Paris' law constant m": 2.2, + "Secondary: Negative electrode cracking rate": silicon_cracking_rate_Ai2020, + "Secondary: Negative electrode LAM constant proportional term [s-1]" + "": 2.7778e-07, + "Secondary: Negative electrode LAM constant exponential term": 2.0, + "Secondary: Negative electrode critical stress [Pa]": 720000000.0, + # positive electrode + "Positive electrode conductivity [S.m-1]": 0.18, + "Maximum concentration in positive electrode [mol.m-3]": 63104.0, + "Positive particle diffusivity [m2.s-1]": nmc_LGM50_diffusivity_Chen2020, + "Positive electrode OCP [V]": nmc_LGM50_ocp_Chen2020, + "Positive electrode porosity": 0.335, + "Positive electrode active material volume fraction": 0.665, + "Positive particle radius [m]": 5.22e-06, + "Positive electrode Bruggeman coefficient (electrolyte)": 1.5, + "Positive electrode Bruggeman coefficient (electrode)": 0, + "Positive electrode charge transfer coefficient": 0.5, + "Positive electrode double-layer capacity [F.m-2]": 0.2, + "Positive electrode exchange-current density [A.m-2]" + "": nmc_LGM50_electrolyte_exchange_current_density_Chen2020, + "Positive electrode density [kg.m-3]": 3262.0, + "Positive electrode specific heat capacity [J.kg-1.K-1]": 700.0, + "Positive electrode thermal conductivity [W.m-1.K-1]": 2.1, + "Positive electrode OCP entropic change [V.K-1]": 0.0, + # positive electrode mechanics / cracking / LAM + "Positive electrode Poisson's ratio": 0.2, + "Positive electrode Young's modulus [Pa]": 375000000000.0, + "Positive electrode reference concentration for free of deformation [mol.m-3]" + "": 0.0, + "Positive electrode partial molar volume [m3.mol-1]": 1.25e-05, + "Positive electrode volume change": volume_change_Ai2020, + "Positive electrode initial crack length [m]": 2e-08, + "Positive electrode initial crack width [m]": 1.5e-08, + "Positive electrode number of cracks per unit area [m-2]": 3.18e15, + "Positive electrode Paris' law constant b": 1.12, + "Positive electrode Paris' law constant m": 2.2, + "Positive electrode cracking rate": cracking_rate_Ai2020, + "Positive electrode LAM constant proportional term [s-1]": 2.7778e-07, + "Positive electrode LAM constant exponential term": 2.0, + "Positive electrode critical stress [Pa]": 375000000.0, + # separator + "Separator porosity": 0.47, + "Separator Bruggeman coefficient (electrolyte)": 1.5, + "Separator density [kg.m-3]": 397.0, + "Separator specific heat capacity [J.kg-1.K-1]": 700.0, + "Separator thermal conductivity [W.m-1.K-1]": 0.16, + # electrolyte + "Initial concentration in electrolyte [mol.m-3]": 1000.0, + "Cation transference number": 0.2594, + "Thermodynamic factor": 1.0, + "Electrolyte diffusivity [m2.s-1]" + "": electrolyte_diffusivity_Nyman2008_arrhenius, + "Electrolyte conductivity [S.m-1]" + "": electrolyte_conductivity_Nyman2008_arrhenius, + # experiment + "Reference temperature [K]": 298.15, + "Total heat transfer coefficient [W.m-2.K-1]": 10.0, + "Ambient temperature [K]": 298.15, + "Number of electrodes connected in parallel to make a cell": 1.0, + "Number of cells connected in series to make a battery": 1.0, + "Lower voltage cut-off [V]": 2.5, + "Upper voltage cut-off [V]": 4.2, + "Open-circuit voltage at 0% SOC [V]": 2.5, + "Open-circuit voltage at 100% SOC [V]": 4.2, + "Initial concentration in negative electrode [mol.m-3]": 29866.0, + "Initial concentration in positive electrode [mol.m-3]": 17038.0, + "Initial temperature [K]": 298.15, + # citations + "citations": ["Chen2020", "Ai2022", "OKane2022", "OKane2020", "Ai2020"], + } diff --git a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/__init__.py b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/__init__.py index 8f8e250f9d..13e111e820 100644 --- a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/__init__.py +++ b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/__init__.py @@ -2,4 +2,4 @@ 'Ecker2015_graphite_halfcell', 'MSMR_example_set', 'Marquis2019', 'Mohtat2020', 'NCA_Kim2011', 'OKane2022', 'OKane2022_graphite_SiOx_halfcell', 'ORegan2022', 'Prada2013', - 'Ramadass2004', 'Xu2019'] + 'Ramadass2004', 'Xu2019', 'Mayur2024', ] From 6cd2da28061d97733836f53c9d061d947c5e3c96 Mon Sep 17 00:00:00 2001 From: Dharshannan Sugunan Date: Tue, 4 Aug 2026 15:48:59 +0100 Subject: [PATCH 2/4] Removed redundant folder --- .../mayur_degradation.py | 117 ------------------ 1 file changed, 117 deletions(-) delete mode 100644 packages/pybamm/si_gr_expansion_precursor/mayur_degradation.py diff --git a/packages/pybamm/si_gr_expansion_precursor/mayur_degradation.py b/packages/pybamm/si_gr_expansion_precursor/mayur_degradation.py deleted file mode 100644 index 963e77be15..0000000000 --- a/packages/pybamm/si_gr_expansion_precursor/mayur_degradation.py +++ /dev/null @@ -1,117 +0,0 @@ -import matplotlib.pyplot as plt -import pybamm - -pybamm.set_logging_level('NOTICE') -model = pybamm.lithium_ion.DFN( - { - "particle phases": ("2", "1"), - "open-circuit potential": (("single", "current sigmoid"), "single"), - "SEI": "solvent-diffusion limited", - "SEI porosity change": "true", - "lithium plating": "partially reversible", - "lithium plating porosity change": "true", # alias for "SEI porosity change" - "particle mechanics": ("swelling and cracking", "swelling only"), - "SEI on cracks": "false", - "loss of active material": "stress-driven", - } -) - -param = pybamm.ParameterValues("Mayur2024") -var_pts = { - "x_n": 5, # negative electrode - "x_s": 5, # separator - "x_p": 5, # positive electrode - "r_n_prim": 30, # negative particle - "r_n_sec": 30, # negative particle - "r_n": 30, # negative particle - "r_p": 30, # positive particle -} - -cycle_number = 10 -exp = pybamm.Experiment( - [ - "Discharge at 0.1C until 2.5 V", # initial capacity check - "Charge at 0.3C until 4.2 V", - "Hold at 4.2 V until C/100", - ] - + [ - ( - "Discharge at 1C until 2.5 V", # ageing cycles - "Charge at 0.3C until 4.2 V", - "Hold at 4.2 V until C/100", - ) - ] - * cycle_number - + ["Discharge at 0.1C until 2.5 V"], # final capacity check -) -solver = pybamm.IDAKLUSolver() -sim = pybamm.Simulation( - model, parameter_values=param, experiment=exp, solver=solver, var_pts=var_pts -) -sol = sim.solve(initial_soc=1.0) - -# ================================ -# Plot 1 -# ================================ -Qt = sol["Throughput capacity [A.h]"].entries -Q_SEI = sol["Loss of capacity to negative SEI [A.h]"].entries -Q_plating = sol["Loss of capacity to negative lithium plating [A.h]"].entries -Q_side = sol["Total capacity lost to side reactions [A.h]"].entries -Q_LLI = ( - sol["Total lithium lost [mol]"].entries * 96485.3 / 3600 -) # convert from mol to A.h -plt.figure() -plt.plot(Qt, Q_SEI, label="SEI", linestyle="dashed") -plt.plot(Qt, Q_plating, label="Li plating", linestyle="dotted") -plt.plot(Qt, Q_side, label="All side reactions", linestyle=(0, (6, 1))) -plt.plot(Qt, Q_LLI, label="All LLI") -plt.xlabel("Throughput capacity [A.h]") -plt.ylabel("Capacity loss [A.h]") -plt.legend() -plt.show() - -# ================================ -# Plot 2 -# ================================ -Qt = sol["Throughput capacity [A.h]"].entries -LLI = sol["Loss of lithium inventory [%]"].entries -LAM_neg = sol["Loss of active material in negative electrode [%]"].entries -LAM_pos = sol["Loss of active material in positive electrode [%]"].entries -plt.figure() -plt.plot(Qt, LLI, label="LLI") -plt.plot(Qt, LAM_neg, label="LAM (negative)") -plt.plot(Qt, LAM_pos, label="LAM (positive)") -plt.xlabel("Throughput capacity [A.h]") -plt.ylabel("Degradation modes [%]") -plt.legend() -plt.show() - -# ================================ -# Plot 2b: negative-electrode LAM split by phase (graphite vs silicon) -# ================================ -LAM_gr = sol["Loss of active material in primary phase in negative electrode [%]"].entries -LAM_si = sol[ - "Loss of active material in secondary phase in negative electrode [%]" -].entries -plt.figure() -plt.plot(Qt, LAM_gr, label="LAM graphite (primary)") -plt.plot(Qt, LAM_si, label="LAM silicon (secondary)", linestyle="dashed") -plt.xlabel("Throughput capacity [A.h]") -plt.ylabel("Loss of active material [%]") -plt.legend() -plt.show() - -# ================================ -# Plot 3 -# ================================ -eps_neg_avg = sol["X-averaged negative electrode porosity"].entries -eps_neg_sep = sol["Negative electrode porosity"].entries[-1, :] -eps_neg_CC = sol["Negative electrode porosity"].entries[0, :] -plt.figure() -plt.plot(Qt, eps_neg_avg, label="Average") -plt.plot(Qt, eps_neg_sep, label="Separator", linestyle="dotted") -plt.plot(Qt, eps_neg_CC, label="Current collector", linestyle="dashed") -plt.xlabel("Throughput capacity [A.h]") -plt.ylabel("Negative electrode porosity") -plt.legend() -plt.show() From 71a7a022bb631e6726fbf973414aa8601579554e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 14:51:50 +0000 Subject: [PATCH 3/4] style: pre-commit fixes --- .../input/parameters/lithium_ion/Mayur2024.py | 87 +++++++++---------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py index aaf99567f1..57893c79b1 100644 --- a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py +++ b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py @@ -125,7 +125,7 @@ def graphite_LGM50_diffusivity_Chen2020(sto, T): def graphite_LGM50_electrolyte_exchange_current_density_Chen2020( - c_e, c_s_surf, c_s_max, T + c_e, c_s_surf, c_s_max, T ): """ Exchange-current density for Butler-Volmer reactions between graphite and LiPF6 in @@ -158,7 +158,7 @@ def graphite_LGM50_electrolyte_exchange_current_density_Chen2020( E_r = 35000 arrhenius = np.exp(E_r / pybamm.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 + return m_ref * arrhenius * c_e**0.5 * c_s_surf**0.5 * (c_s_max - c_s_surf) ** 0.5 def graphite_volume_change_Ai2020(sto): @@ -197,16 +197,16 @@ def graphite_volume_change_Ai2020(sto): 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 + 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 @@ -277,15 +277,15 @@ def silicon_ocp_lithiation_Mark2016(sto): p8 = 0.8633 U_lithiation = ( - p1 * sto ** 7 - + p2 * sto ** 6 - + p3 * sto ** 5 - + p4 * sto ** 4 - + p5 * sto ** 3 - + p6 * sto ** 2 - + p7 * sto - + p8 - ) + 1e-4 * (1 / sto + 1 / (sto - 1)) + p1 * sto**7 + + p2 * sto**6 + + p3 * sto**5 + + p4 * sto**4 + + p5 * sto**3 + + p6 * sto**2 + + p7 * sto + + p8 + ) + 1e-4 * (1 / sto + 1 / (sto - 1)) return U_lithiation @@ -321,22 +321,22 @@ def silicon_ocp_delithiation_Mark2016(sto): p8 = 0.9937 U_delithiation = ( - p1 * sto ** 7 - + p2 * sto ** 6 - + p3 * sto ** 5 - + p4 * sto ** 4 - + p5 * sto ** 3 - + p6 * sto ** 2 - + p7 * sto - + p8 + p1 * sto**7 + + p2 * sto**6 + + p3 * sto**5 + + p4 * sto**4 + + p5 * sto**3 + + p6 * sto**2 + + p7 * sto + + p8 ) return U_delithiation def silicon_ocp_average_Mark2016(sto): return ( - silicon_ocp_lithiation_Mark2016(sto) + silicon_ocp_delithiation_Mark2016(sto) - ) / 2 + silicon_ocp_lithiation_Mark2016(sto) + silicon_ocp_delithiation_Mark2016(sto) + ) / 2 def silicon_LGM50_diffusivity_Bonkile2024(sto, T): @@ -366,7 +366,7 @@ def silicon_LGM50_diffusivity_Bonkile2024(sto, T): def silicon_LGM50_electrolyte_exchange_current_density_Chen2020( - c_e, c_s_surf, c_s_max, T + c_e, c_s_surf, c_s_max, T ): """ Exchange-current density for Butler-Volmer reactions between silicon and LiPF6 in @@ -396,12 +396,12 @@ def silicon_LGM50_electrolyte_exchange_current_density_Chen2020( Exchange-current density [A.m-2] """ m_ref = ( - 6.48e-7 * 28700 / 278000 + 6.48e-7 * 28700 / 278000 ) # (A/m2)(m3/mol)**1.5 - includes ref concentrations E_r = 35000 arrhenius = np.exp(E_r / pybamm.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 + return m_ref * arrhenius * c_e**0.5 * c_s_surf**0.5 * (c_s_max - c_s_surf) ** 0.5 def silicon_volume_change_Ai2020(sto): @@ -510,12 +510,12 @@ def nmc_LGM50_ocp_Chen2020(sto): Open-circuit potential """ u_eq = ( - -0.8090 * sto - + 4.4875 - - 0.0428 * np.tanh(18.5138 * (sto - 0.5542)) - - 17.7326 * np.tanh(15.7890 * (sto - 0.3117)) - + 17.5842 * np.tanh(15.9308 * (sto - 0.3120)) - ) + 1e-4 * (1 / sto + 1 / (sto - 1)) + -0.8090 * sto + + 4.4875 + - 0.0428 * np.tanh(18.5138 * (sto - 0.5542)) + - 17.7326 * np.tanh(15.7890 * (sto - 0.3117)) + + 17.5842 * np.tanh(15.9308 * (sto - 0.3120)) + ) + 1e-4 * (1 / sto + 1 / (sto - 1)) return u_eq @@ -551,7 +551,7 @@ def nmc_LGM50_electrolyte_exchange_current_density_Chen2020(c_e, c_s_surf, c_s_m E_r = 17800 arrhenius = np.exp(E_r / pybamm.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 + return m_ref * arrhenius * c_e**0.5 * c_s_surf**0.5 * (c_s_max - c_s_surf) ** 0.5 def volume_change_Ai2020(sto): @@ -682,7 +682,7 @@ def electrolyte_conductivity_Nyman2008_arrhenius(c_e, T): Solid diffusivity """ sigma_e = ( - 0.1297 * (c_e / 1000) ** 3 - 2.51 * (c_e / 1000) ** 1.5 + 3.329 * (c_e / 1000) + 0.1297 * (c_e / 1000) ** 3 - 2.51 * (c_e / 1000) ** 1.5 + 3.329 * (c_e / 1000) ) # Nyman et al. (2008) does not provide temperature dependence @@ -923,8 +923,7 @@ def get_parameter_values(): "Initial concentration in electrolyte [mol.m-3]": 1000.0, "Cation transference number": 0.2594, "Thermodynamic factor": 1.0, - "Electrolyte diffusivity [m2.s-1]" - "": electrolyte_diffusivity_Nyman2008_arrhenius, + "Electrolyte diffusivity [m2.s-1]": electrolyte_diffusivity_Nyman2008_arrhenius, "Electrolyte conductivity [S.m-1]" "": electrolyte_conductivity_Nyman2008_arrhenius, # experiment From a93b7b6d1721f2ade6682315db2d0b3e208691cb Mon Sep 17 00:00:00 2001 From: Dharshannan Sugunan Date: Fri, 4 Sep 2026 12:11:33 +0100 Subject: [PATCH 4/4] fix: rename Mayur2024 to Bonkile2024 and fix citation wiring Addresses PR review comments on the composite Si/graphite parameter set: - Rename the parameter set from Mayur2024 to Bonkile2024 (surname+year, matching every other set's convention) before release makes it a breaking change. Renamed the module, and updated the pyproject.toml entry point and the lithium_ion __init__.py __all__ list (placed alphabetically, dropped the trailing comma before the closing bracket). - Register the actual source paper as a citation: added a Bonkile2024 BibTeX entry to CITATIONS.bib (alphabetically between Beeckman1990 and BrosaPlanella2021), put "Bonkile2024" first in the parameter set's citations list, and changed the get_parameter_values() docstring's plain-prose attribution to :footcite:t:`Bonkile2024` so it renders like the neighbouring references. - Fix the invalid "Ai2020" citation key (no such entry in CITATIONS.bib) to "Ai2019", both in the citations list and in a docstring footcite reference -- this was breaking pybamm.print_citations() for every remaining unknown citation, and breaking the docs build. - Register "Yang2017", which was already cited in prose but missing from the citations list. - Fix an accidental implicit string concatenation that split "Electrolyte conductivity [S.m-1]" across two literals for no reason. Verified every :footcite:t: key in the file resolves against CITATIONS.bib and is present in the citations list (checked programmatically in both directions). Co-Authored-By: Claude Sonnet 5 --- packages/pybamm/pyproject.toml | 2 +- packages/pybamm/src/pybamm/CITATIONS.bib | 12 +++++++++++ .../{Mayur2024.py => Bonkile2024.py} | 20 ++++++++++++------- .../input/parameters/lithium_ion/__init__.py | 4 ++-- 4 files changed, 28 insertions(+), 10 deletions(-) rename packages/pybamm/src/pybamm/input/parameters/lithium_ion/{Mayur2024.py => Bonkile2024.py} (98%) diff --git a/packages/pybamm/pyproject.toml b/packages/pybamm/pyproject.toml index 4821074f29..8866a90149 100644 --- a/packages/pybamm/pyproject.toml +++ b/packages/pybamm/pyproject.toml @@ -120,7 +120,7 @@ Sulzer2019 = "pybamm.input.parameters.lead_acid.Sulzer2019:get_parameter_values" Ai2020 = "pybamm.input.parameters.lithium_ion.Ai2020:get_parameter_values" Chen2020 = "pybamm.input.parameters.lithium_ion.Chen2020:get_parameter_values" Chen2020_composite = "pybamm.input.parameters.lithium_ion.Chen2020_composite:get_parameter_values" -Mayur2024 = "pybamm.input.parameters.lithium_ion.Mayur2024:get_parameter_values" +Bonkile2024 = "pybamm.input.parameters.lithium_ion.Bonkile2024:get_parameter_values" Ecker2015 = "pybamm.input.parameters.lithium_ion.Ecker2015:get_parameter_values" Ecker2015_graphite_halfcell = "pybamm.input.parameters.lithium_ion.Ecker2015_graphite_halfcell:get_parameter_values" Marquis2019 = "pybamm.input.parameters.lithium_ion.Marquis2019:get_parameter_values" diff --git a/packages/pybamm/src/pybamm/CITATIONS.bib b/packages/pybamm/src/pybamm/CITATIONS.bib index 229f96382f..2e5c10c125 100644 --- a/packages/pybamm/src/pybamm/CITATIONS.bib +++ b/packages/pybamm/src/pybamm/CITATIONS.bib @@ -104,6 +104,18 @@ @article{Beeckman1990 publisher = {Elsevier} } +@article{Bonkile2024, + title = {Is silicon worth it? Modelling degradation in composite silicon--graphite lithium-ion battery electrodes}, + journal = {Journal of Power Sources}, + volume = {606}, + pages = {234256}, + year = {2024}, + issn = {0378-7753}, + doi = {https://doi.org/10.1016/j.jpowsour.2024.234256}, + url = {https://www.sciencedirect.com/science/article/pii/S0378775324002076}, + author = {Mayur P. Bonkile and Yang Jiang and Niall Kirkaldy and Valentin Sulzer and Robert Timms and Huizhi Wang and Gregory Offer and Billy Wu} +} + @article{BrosaPlanella2021, title = {Systematic derivation and validation of a reduced thermal-electrochemical model for lithium-ion batteries using asymptotic methods}, author = {Brosa Planella, Ferran and Sheikh, Muhammad and Widanage, W. Dhammika}, diff --git a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Bonkile2024.py similarity index 98% rename from packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py rename to packages/pybamm/src/pybamm/input/parameters/lithium_ion/Bonkile2024.py index 57893c79b1..4980dfb56f 100644 --- a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Mayur2024.py +++ b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/Bonkile2024.py @@ -407,7 +407,7 @@ def silicon_LGM50_electrolyte_exchange_current_density_Chen2020( def silicon_volume_change_Ai2020(sto): """ Silicon particle volume change as a function of stoichiometry, using the linear - model of :footcite:t:`Ai2020`, ``t_change = Omega * c_s_max * sto``, with the + model of :footcite:t:`Ai2019`, ``t_change = Omega * c_s_max * sto``, with the silicon partial molar volume and maximum concentration from :footcite:t:`Bonkile2024`. @@ -715,9 +715,8 @@ def get_parameter_values(): Beginning-of-life and degradation (mechanical, cracking, LAM) parameters for the graphite (primary) and silicon (secondary) phases are taken from the supplementary - information of Bonkile et al., "Is silicon worth it? Modelling degradation in - composite silicon/graphite lithium-ion battery electrodes", which itself draws on - :footcite:t:`Chen2020`, :footcite:t:`Ai2022` and :footcite:t:`Ai2020`. + information of :footcite:t:`Bonkile2024`, which itself draws on + :footcite:t:`Chen2020`, :footcite:t:`Ai2022` and :footcite:t:`Ai2019`. SEI parameters are example parameters for composite SEI on silicon/graphite. Both phases use the same values, from the paper :footcite:t:`Yang2017`. @@ -924,8 +923,7 @@ def get_parameter_values(): "Cation transference number": 0.2594, "Thermodynamic factor": 1.0, "Electrolyte diffusivity [m2.s-1]": electrolyte_diffusivity_Nyman2008_arrhenius, - "Electrolyte conductivity [S.m-1]" - "": electrolyte_conductivity_Nyman2008_arrhenius, + "Electrolyte conductivity [S.m-1]": electrolyte_conductivity_Nyman2008_arrhenius, # experiment "Reference temperature [K]": 298.15, "Total heat transfer coefficient [W.m-2.K-1]": 10.0, @@ -940,5 +938,13 @@ def get_parameter_values(): "Initial concentration in positive electrode [mol.m-3]": 17038.0, "Initial temperature [K]": 298.15, # citations - "citations": ["Chen2020", "Ai2022", "OKane2022", "OKane2020", "Ai2020"], + "citations": [ + "Bonkile2024", + "Chen2020", + "Ai2022", + "OKane2022", + "OKane2020", + "Ai2019", + "Yang2017", + ], } diff --git a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/__init__.py b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/__init__.py index 13e111e820..dd472c0940 100644 --- a/packages/pybamm/src/pybamm/input/parameters/lithium_ion/__init__.py +++ b/packages/pybamm/src/pybamm/input/parameters/lithium_ion/__init__.py @@ -1,5 +1,5 @@ -__all__ = ['Ai2020', 'Chen2020', 'Chen2020_composite', 'Ecker2015', +__all__ = ['Ai2020', 'Bonkile2024', 'Chen2020', 'Chen2020_composite', 'Ecker2015', 'Ecker2015_graphite_halfcell', 'MSMR_example_set', 'Marquis2019', 'Mohtat2020', 'NCA_Kim2011', 'OKane2022', 'OKane2022_graphite_SiOx_halfcell', 'ORegan2022', 'Prada2013', - 'Ramadass2004', 'Xu2019', 'Mayur2024', ] + 'Ramadass2004', 'Xu2019']