Replies: 1 comment
-
With the parameters you changed, there is more cyclable lithium (Q_Li) than capacity in the positive electrode, which is not physical, hence the warning. These two papers provide more information about the model that computes these values. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am currently conducting research to align the discharge curve of the data from the paper ("Severson, K.A., Attia, P.M., Jin, N. et al. Data-driven prediction of battery cycle life before capacity degradation. Nat Energy 4, 383–391 (2019). https://doi.org/10.1038/s41560-019-0356-8)" with the discharge curve of PyBaMM.
![주석 2023-06-06 184355](https://private-user-images.githubusercontent.com/113442395/243652918-48b9b157-234e-49fb-9648-4e62b2150c52.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3OTA0NzksIm5iZiI6MTcyNDc5MDE3OSwicGF0aCI6Ii8xMTM0NDIzOTUvMjQzNjUyOTE4LTQ4YjliMTU3LTIzNGUtNDlmYi05NjQ4LTRlNjJiMjE1MGM1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QyMDIyNTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zY2NhMTkzNjQyYzg5ZWI2M2Q1NTExNzEyMGM1OWVhOTM4ZTdlN2U1YWMzMTZiYzRmMDVlNTBiZTE0MzkzNjZiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.D5GAcsywiXeuE1CbYUV2oE_o0UbfN9Dkuk_djwtmoA8)
However, I am encountering a warning and I'm unsure how to resolve it. I would really appreciate it if you could provide some guidance.
Here's my code.
`import pybamm
pybamm.set_logging_level("NOTICE")
parameter_values = pybamm.ParameterValues("Prada2013")
#lithium plating
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]
"""
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]
"""
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
Total SEI thickness [m]
Returns
-------
:class:
pybamm.Symbol
Dead lithium decay rate [s-1]
"""
def graphite_LGM50_ocp_Chen2020(sto):
"""
LG M50 Graphite open-circuit potential as a function of stochiometry, 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 stochiometry
Returns
-------
:class:
pybamm.Symbol
Open-circuit potential
"""
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 = 1000000
arrhenius = pybamm.exp(E_r / pybamm.constants.R * (1 / 298.15 - 1 / T))
def LFP_ocp_ashfar2017(sto):
"""
Open-circuit potential for LFP
References
----------
.. [1] Afshar, S., Morris, K., & Khajepour, A. (2017). Efficient electrochemical
model for lithium-ion cells. arXiv preprint arXiv:1709.03970.
Parameters
----------
sto : :class:
pybamm.Symbol
Stochiometry of material (li-fraction)
"""
def LFP_electrolyte_exchange_current_density_kashkooli2017(c_e, c_s_surf, c_s_max, T):
"""
Exchange-current density for Butler-Volmer reactions between LFP and electrolyte
References
----------
.. [1] Kashkooli, A. G., Amirfazli, A., Farhad, S., Lee, D. U., Felicelli, S., Park,
H. W., ... & Chen, Z. (2017). Representative volume element model of lithium-ion
battery electrodes based on X-ray nano-tomography. Journal of Applied
Electrochemistry, 47(3), 281-293.
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]
"""
parameter_values.update(
{"SEI kinetic rate constant [m.s-1]": 1e-12,
"Initial inner SEI thickness [m]": 0,
"Initial outer SEI thickness [m]": 5e-9,
"EC initial concentration in electrolyte [mol.m-3]": 4000,
"SEI open-circuit potential [V]": 0,
"Lithium plating kinetic rate constant [m.s-1]": 1e-11,
"Ratio of lithium moles to SEI moles": 2.0,
"Inner SEI reaction proportion": 0.5,
"Inner SEI partial molar volume [m3.mol-1]": 9.585e-05,
"Outer SEI partial molar volume [m3.mol-1]": 9.585e-05,
"SEI reaction exchange current density [A.m-2]": 1.5e-07,
"SEI resistivity [Ohm.m]": 200000.0,
"Outer SEI solvent diffusivity [m2.s-1]": 2.5000000000000002e-22,
"Bulk solvent concentration [mol.m-3]": 2636.0,
"Inner SEI open-circuit potential [V]": 0.1,
"Outer SEI open-circuit potential [V]": 0.8,
"Inner SEI electron conductivity [S.m-1]": 8.95e-14,
"Inner SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial inner SEI thickness [m]": 2.5e-09,
"Initial outer SEI thickness [m]": 2.5e-09,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-19,
"SEI open-circuit potential [V]": 0.4,
"SEI growth activation energy [J.mol-1]": 100.0,
"SEI growth transfer coefficient": 0.5,
#Lithium plating
"Lithium metal partial molar volume [m3.mol-1]": 1.30E-05,
"Lithium plating kinetic rate constant [m.s-1]": 1E-9,
"Exchange-current density for plating [A.m-2]": plating_exchange_current_density_OKane2020,
"Exchange-current density for stripping [A.m-2]": stripping_exchange_current_density_OKane2020,
"Initial plated lithium concentration [mol.m-3]": 0.00E+00,
"Typical plated lithium concentration [mol.m-3]": 1000,
"Lithium plating transfer coefficient": 0.5,
"Dead lithium decay constant [s-1]": 1e-06,
"Dead lithium decay rate [s-1]": SEI_limited_dead_lithium_OKane2022,
#Negative electrode
"Maximum concentration in negative electrode [mol.m-3]": 33133.0,
"Negative electrode diffusivity [m2.s-1]": 10e-14,
"Negative electrode OCP [V]": graphite_LGM50_ocp_Chen2020,
"Negative current collector thickness [m]" : 2e-05,
"Negative electrode exchange-current density [A.m-2]": graphite_LGM50_electrolyte_exchange_current_density_Chen2020,
#Positive electrode
"Maximum concentration in positive electrode [mol.m-3]": 22806.0,
"Positive electrode diffusivity [m2.s-1]": 5.9e-18,
"Positive electrode OCP [V]": LFP_ocp_ashfar2017,
"Positive electrode porosity": 0.12728395,
"Positive electrode active material volume fraction": 0.28485556,
"Positive particle radius [m]": 1e-08,
"Positive electrode density [kg.m-3]": 2341.17,
"Positive electrode exchange-current density [A.m-2]" : LFP_electrolyte_exchange_current_density_kashkooli2017,
s
#cell
"Upper voltage cut-off [V]": 3.6,
#"Cell volume [m3]" : 2.12e-05,
#"Electrode width [m]": 0.103,
#"Electrode height [m]": 0.615,
#"Lower voltage cut-off [V]": 2.0,
"Nominal cell capacity [A.h]": 1.1,
"Initial concentration in negative electrode [mol.m-3]": 18831.45783,
"Initial concentration in positive electrode [mol.m-3]": 3300.3766672,
},
check_already_exists=False,
)
Calculate stoichiometries at 100% SOC
parameter_values.set_initial_stoichiometries(1);
N_cycles = 15
options = {
"SEI": "ec reaction limited",
"lithium plating": "irreversible", }
spme = pybamm.lithium_ion.SPMe(options)
#simulation
def pybamm_simulation_lfp(x,k): #x : parameter values, k : cycle, a:applied current
parameter_values.update(
{
"Negative electrode diffusivity [m2.s-1]": x[0],
"Positive electrode diffusivity [m2.s-1]": x[1],
"Maximum concentration in negative electrode [mol.m-3]": x[2],
"Maximum concentration in positive electrode [mol.m-3]": x[3],
"Electrode width [m]": x[4],
"Positive electrode porosity": x[5],
"Negative electrode porosity": x[6],
`
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions