Bohrium
robot
新建

空间站广场

论文
Notebooks
比赛
课程
Apps
我的主页
我的Notebooks
我的论文库
我的足迹

我的工作空间

任务
节点
文件
数据集
镜像
项目
数据库
公开
在PyBaMM中模拟电池活性材料损耗(LAM)老化过程
老化机理
PyBaMM
老化机理PyBaMM
张蔚泓
更新于 2024-08-27
推荐镜像 :Basic Image:ubuntu:22.04-py3.10-cuda12.1
推荐机型 :c2_m4_cpu
1
压力驱动LAM模型
反应驱动LAM模型
电流驱动LAM模型

使用方式
点击上方的 开始连接 按钮,选择 Basic Image:ubuntu:22.04-py3.10-cuda12.1 镜像及 c2_m4_cpu 节点配置,稍等片刻即可运行。
来源
本Notebook主要参考PyBaMM的教程和O'Kane等人发表的论文
共享协议
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。

代码
文本

压力驱动LAM模型

代码
文本

我们考虑的第一个模型是应力驱动子模型,它遵循Reniers等人(2019)的公式(25),应力由Ai等人(2020)的公式(7)-(9)计算。

下面给出了粒子破裂引起的LAM的关键方程,而详细的推导请参阅Laresgoiti等人[10]提出的方法。固体颗粒体积分数的减少量可由下面方程估计:

其中通常是从实验中得到的两个常数,临界应力是一种材料特性,但由于缺乏测量的实验,因此作为拟合参数处理。静水应力。 具体的颗粒开裂模型notebook中对应公式。

与颗粒开裂一样,只有拉应力 ()对LAM有贡献。在完整的充电和放电循环之间,颗粒可以达到稳态,没有应力,即,此时上面的式子可以修改为瞬时反应:

代码
文本

像往常一样,我们从定义模型开始。我们选择了一个具有应力驱动的活性物质损失的DFN模型,并且我们还包括SEI增长。然后定义了参数和实验,并进行了仿真求解。

代码
文本
[1]
!pip install "pybamm[plot,cite]" -q # install PyBaMM if it is not installed
import pybamm
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
代码
文本
[2]
!pip install ipywidgets
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: ipywidgets in /opt/mamba/lib/python3.10/site-packages (8.1.3)
Requirement already satisfied: jupyterlab-widgets~=3.0.11 in /opt/mamba/lib/python3.10/site-packages (from ipywidgets) (3.0.11)
Requirement already satisfied: widgetsnbextension~=4.0.11 in /opt/mamba/lib/python3.10/site-packages (from ipywidgets) (4.0.11)
Requirement already satisfied: comm>=0.1.3 in /opt/mamba/lib/python3.10/site-packages (from ipywidgets) (0.2.0)
Requirement already satisfied: ipython>=6.1.0 in /opt/mamba/lib/python3.10/site-packages (from ipywidgets) (8.18.1)
Requirement already satisfied: traitlets>=4.3.1 in /opt/mamba/lib/python3.10/site-packages (from ipywidgets) (5.14.0)
Requirement already satisfied: stack-data in /opt/mamba/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.6.3)
Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /opt/mamba/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (3.0.42)
Requirement already satisfied: decorator in /opt/mamba/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (5.1.1)
Requirement already satisfied: exceptiongroup in /opt/mamba/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (1.2.0)
Requirement already satisfied: pexpect>4.3 in /opt/mamba/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (4.9.0)
Requirement already satisfied: jedi>=0.16 in /opt/mamba/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.19.1)
Requirement already satisfied: pygments>=2.4.0 in /opt/mamba/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (2.17.2)
Requirement already satisfied: matplotlib-inline in /opt/mamba/lib/python3.10/site-packages (from ipython>=6.1.0->ipywidgets) (0.1.6)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in /opt/mamba/lib/python3.10/site-packages (from jedi>=0.16->ipython>=6.1.0->ipywidgets) (0.8.3)
Requirement already satisfied: ptyprocess>=0.5 in /opt/mamba/lib/python3.10/site-packages (from pexpect>4.3->ipython>=6.1.0->ipywidgets) (0.7.0)
Requirement already satisfied: wcwidth in /opt/mamba/lib/python3.10/site-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython>=6.1.0->ipywidgets) (0.2.12)
Requirement already satisfied: pure-eval in /opt/mamba/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (0.2.2)
Requirement already satisfied: asttokens>=2.1.0 in /opt/mamba/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (2.4.1)
Requirement already satisfied: executing>=1.2.0 in /opt/mamba/lib/python3.10/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (2.0.1)
Requirement already satisfied: six>=1.12.0 in /opt/mamba/lib/python3.10/site-packages (from asttokens>=2.1.0->stack-data->ipython>=6.1.0->ipywidgets) (1.16.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
代码
文本
[3]
model = pybamm.lithium_ion.DFN(
options={
"SEI": "solvent-diffusion limited",
"SEI porosity change": "false",
"particle mechanics": "swelling only",
"loss of active material": "stress-driven",
}
)
param = pybamm.ParameterValues("Ai2020")
param.update({"Negative electrode LAM constant proportional term [s-1]": 1e-4 / 3600})
param.update({"Positive electrode LAM constant proportional term [s-1]": 1e-4 / 3600})
experiment = pybamm.Experiment(
[
"Discharge at 1C until 3 V",
"Rest for 600 seconds",
"Charge at 1C until 4.2 V",
"Hold at 4.199 V for 600 seconds",
]
)
sim = pybamm.Simulation(
model,
experiment=experiment,
parameter_values=param,
discretisation_kwargs={"remove_independent_variables_from_rhs": True},
)
solution = sim.solve(calc_esoh=False)
At t = 57.3387, , mxstep steps taken before reaching tout.
At t = 57.3387, , mxstep steps taken before reaching tout.
At t = 57.3387 and h = 9.58596e-15, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 57.3387, , mxstep steps taken before reaching tout.
代码
文本

现在我们可以像往常一样绘制结果。

代码
文本
[4]
sim.plot(
[
"Voltage [V]",
"Current [A]",
"Sum of x-averaged positive electrode volumetric interfacial current densities [A.m-3]",
"Sum of x-averaged negative electrode volumetric interfacial current densities [A.m-3]",
"X-averaged positive electrode active material volume fraction",
"X-averaged negative electrode active material volume fraction",
"X-averaged positive particle surface tangential stress [Pa]",
"X-averaged negative particle surface tangential stress [Pa]",
]
)
代码
文本

为了理解LAM常数比例项的影响,让我们执行一个参数扫描。

代码
文本
[5]
ks = [1e-4, 1e-3, 1e-2]
solutions = []

for k in ks:
param.update({"Positive electrode LAM constant proportional term [s-1]": k / 3600})
param.update({"Negative electrode LAM constant proportional term [s-1]": k / 3600})

sim = pybamm.Simulation(
model,
experiment=experiment,
parameter_values=param,
discretisation_kwargs={"remove_independent_variables_from_rhs": True},
)
solution = sim.solve(calc_esoh=False)
solutions.append(solution)

pybamm.dynamic_plot(
solutions,
output_variables=[
"Voltage [V]",
"Current [A]",
"Sum of x-averaged positive electrode volumetric interfacial current densities [A.m-3]",
"Sum of x-averaged negative electrode volumetric interfacial current densities [A.m-3]",
"X-averaged positive electrode active material volume fraction",
"X-averaged negative electrode active material volume fraction",
"X-averaged positive electrode surface area to volume ratio [m-1]",
"X-averaged negative electrode surface area to volume ratio [m-1]",
],
labels=[f"k={k:.0e}" for k in ks],
)
At t = 57.3387, , mxstep steps taken before reaching tout.
At t = 57.3387, , mxstep steps taken before reaching tout.
At t = 57.3387 and h = 9.58596e-15, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 57.3387, , mxstep steps taken before reaching tout.
At t = 57.3307 and h = 9.9294e-24, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 57.3307, , mxstep steps taken before reaching tout.
At t = 57.3307, , mxstep steps taken before reaching tout.
At t = 57.3307 and h = 1.15948e-14, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 57.2504, , mxstep steps taken before reaching tout.
At t = 57.2504 and h = 1.69985e-17, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 57.2504, , mxstep steps taken before reaching tout.
At t = 57.2504, , mxstep steps taken before reaching tout.
代码
文本

反应驱动LAM模型

代码
文本

另一种选择是使用反应驱动(即SEI) LAM。在这种情况下,我们需要在模型中选择“反应驱动”选项,并按照前面的示例继续进行。

代码
文本
[6]
model = pybamm.lithium_ion.DFN(
options={
"SEI": "solvent-diffusion limited",
"loss of active material": "reaction-driven",
}
)
param = pybamm.ParameterValues("Chen2020")
param.update({"Negative electrode reaction-driven LAM factor [m3.mol-1]": 1e-3})
experiment = pybamm.Experiment(
[
"Discharge at 1C until 3 V",
"Rest for 600 seconds",
"Charge at 1C until 4.2 V",
"Hold at 4.199 V for 600 seconds",
]
)
sim = pybamm.Simulation(
model,
experiment=experiment,
parameter_values=param,
solver=pybamm.CasadiSolver("fast with events"),
)
solution = sim.solve(calc_esoh=False)

sim.plot(
[
"Voltage [V]",
"Current [A]",
"Sum of x-averaged negative electrode volumetric interfacial current densities [A.m-3]",
"X-averaged negative electrode active material volume fraction",
"Negative total SEI thickness [m]",
"X-averaged negative total SEI thickness [m]",
]
)
代码
文本

压力驱动和反应驱动可以结合起来,称为"stress and reaction-driven"(压力和反应驱动)选项。

代码
文本

电流驱动LAM模型

代码
文本

最后一个子模型是电流驱动的LAM,它遵循Reniers等人(2019)介绍的公式(26)。在这种情况下,我们需要将方程的RHS定义为电流密度和温度的函数。

其中是电流密度,是拟合参数。

代码
文本

这里代码的示例是说明性的,并不代表任何真实场景。

代码
文本
[7]
def current_LAM(i, T):
return -1e-10 * (abs(i) + 1e3 * abs(i) ** 0.5)


model = pybamm.lithium_ion.DFN(
options={
"loss of active material": "current-driven",
}
)
param = pybamm.ParameterValues("Chen2020")
param.update(
{
"Positive electrode current-driven LAM rate": current_LAM,
"Negative electrode current-driven LAM rate": current_LAM,
},
check_already_exists=False,
)
sim = pybamm.Simulation(
model,
experiment=experiment,
parameter_values=param,
solver=pybamm.CasadiSolver("fast with events"),
)
solution = sim.solve(calc_esoh=False)

sim.plot(
[
"Voltage [V]",
"Current [A]",
"X-averaged positive electrode active material volume fraction",
"X-averaged negative electrode active material volume fraction",
]
)
代码
文本

参考文献

[1] Weilong Ai, Ludwig Kraft, Johannes Sturm, Andreas Jossen, and Billy Wu. Electrochemical thermal-mechanical modelling of stress inhomogeneity in lithium-ion pouch cells. Journal of The Electrochemical Society, 167(1):013512, 2019. doi:10.1149/2.0122001JES.

[2] Joel A. E. Andersson, Joris Gillis, Greg Horn, James B. Rawlings, and Moritz Diehl. CasADi – A software framework for nonlinear optimization and optimal control. Mathematical Programming Computation, 11(1):1–36, 2019. doi:10.1007/s12532-018-0139-4.

[3] 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(8):080534, 2020. doi:10.1149/1945-7111/ab9050.

[4] Rutooj Deshpande, Mark Verbrugge, Yang-Tse Cheng, John Wang, and Ping Liu. Battery cycle life prediction with coupled chemical degradation and fatigue mechanics. Journal of the Electrochemical Society, 159(10):A1730, 2012. doi:10.1149/2.049210jes.

[5] Marc Doyle, Thomas F. Fuller, and John Newman. Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell. Journal of the Electrochemical society, 140(6):1526–1533, 1993. doi:10.1149/1.2221597.

[6] Charles R. Harris, K. Jarrod Millman, Stéfan J. van der Walt, Ralf Gommers, Pauli Virtanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith, and others. Array programming with NumPy. Nature, 585(7825):357–362, 2020. doi:10.1038/s41586-020-2649-2.

[7] Scott G. Marquis. Long-term degradation of lithium-ion batteries. PhD thesis, University of Oxford, 2020.

[8] Jorn M. Reniers, Grietus Mulder, and David A. Howey. Review and performance comparison of mechanical-chemical degradation models for lithium-ion batteries. Journal of The Electrochemical Society, 166(14):A3189, 2019. doi:10.1149/2.0281914jes.

[9] Valentin Sulzer, Scott G. Marquis, Robert Timms, Martin Robinson, and S. Jon Chapman. Python Battery Mathematical Modelling (PyBaMM). Journal of Open Research Software, 9(1):14, 2021. doi:10.5334/jors.309.

[10]I. Laresgoiti, S. Kabitz, M. Ecker and D. U. Sauer, Modeling mechanical degradation in lithium ion batteries during cycling: Solid electrolyte interphase fracture, J. Power Sources, 2015, 300, 112–122.

代码
文本
老化机理
PyBaMM
老化机理PyBaMM
点个赞吧
本文被以下合集收录
锂离子电池石墨负极的老化机理与建模
xuxh@dp.tech
更新于 2024-09-02
4 篇0 人关注
电芯
bohrb060ec
更新于 2024-07-18
4 篇0 人关注
推荐阅读
公开
在PyBaMM中模拟电池析锂老化过程
老化机理PyBaMM
老化机理PyBaMM
张蔚泓
更新于 2024-08-27
1 转存文件
公开
在PyBaMM中模拟电池颗粒开裂老化过程
老化机理PyBaMM
老化机理PyBaMM
张蔚泓
更新于 2024-08-27