PyBaMM-GEM 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,371 @@
1
+ """
2
+ This code is adopted from the PyBaMM project under the BSD-3-Clause
3
+
4
+ Copyright (c) 2018-2024, the PyBaMM team.
5
+ All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ * Neither the name of the copyright holder nor the names of its
18
+ contributors may be used to endorse or promote products derived from
19
+ this software without specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ """
32
+
33
+
34
+ from __future__ import annotations
35
+
36
+ import numpy as np
37
+ import pybamm
38
+
39
+
40
+ def graphite_LGM50_ocp_Chen2020(sto):
41
+ """
42
+ LG M50 Graphite open-circuit potential as a function of stochiometry, fit taken
43
+ from [1].
44
+
45
+ References
46
+ ----------
47
+ .. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W.
48
+ Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for
49
+ Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the
50
+ Electrochemical Society 167 (2020): 080534.
51
+
52
+ Parameters
53
+ ----------
54
+ sto: :class:`pybamm.Symbol`
55
+ Electrode stochiometry
56
+
57
+ Returns
58
+ -------
59
+ :class:`pybamm.Symbol`
60
+ Open-circuit potential
61
+ """
62
+
63
+ u_eq = (
64
+ 1.9793 * np.exp(-39.3631 * sto)
65
+ + 0.2482
66
+ - 0.0909 * np.tanh(29.8538 * (sto - 0.1234))
67
+ - 0.04478 * np.tanh(14.9159 * (sto - 0.2769))
68
+ - 0.0205 * np.tanh(30.4444 * (sto - 0.6103))
69
+ )
70
+
71
+ return u_eq
72
+
73
+
74
+ def graphite_LGM50_electrolyte_exchange_current_density_Chen2020(
75
+ c_e, c_s_surf, c_s_max, T
76
+ ):
77
+ """
78
+ Exchange-current density for Butler-Volmer reactions between graphite and LiPF6 in
79
+ EC:DMC.
80
+
81
+ References
82
+ ----------
83
+ .. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W.
84
+ Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for
85
+ Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the
86
+ Electrochemical Society 167 (2020): 080534.
87
+
88
+ Parameters
89
+ ----------
90
+ c_e : :class:`pybamm.Symbol`
91
+ Electrolyte concentration [mol.m-3]
92
+ c_s_surf : :class:`pybamm.Symbol`
93
+ Particle concentration [mol.m-3]
94
+ c_s_max : :class:`pybamm.Symbol`
95
+ Maximum particle concentration [mol.m-3]
96
+ T : :class:`pybamm.Symbol`
97
+ Temperature [K]
98
+
99
+ Returns
100
+ -------
101
+ :class:`pybamm.Symbol`
102
+ Exchange-current density [A.m-2]
103
+ """
104
+ m_ref = 6.48e-7 # (A/m2)(m3/mol)**1.5 - includes ref concentrations
105
+ E_r = 35000
106
+ arrhenius = np.exp(E_r / pybamm.constants.R * (1 / 298.15 - 1 / T))
107
+
108
+ return m_ref * arrhenius * c_e**0.5 * c_s_surf**0.5 * (c_s_max - c_s_surf) ** 0.5
109
+
110
+
111
+ def nmc_LGM50_ocp_Chen2020(sto):
112
+ """
113
+ LG M50 NMC open-circuit potential as a function of stochiometry, fit taken
114
+ from [1].
115
+
116
+ References
117
+ ----------
118
+ .. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W.
119
+ Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for
120
+ Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the
121
+ Electrochemical Society 167 (2020): 080534.
122
+
123
+ Parameters
124
+ ----------
125
+ sto: :class:`pybamm.Symbol`
126
+ Electrode stochiometry
127
+
128
+ Returns
129
+ -------
130
+ :class:`pybamm.Symbol`
131
+ Open-circuit potential
132
+ """
133
+
134
+ u_eq = (
135
+ -0.8090 * sto
136
+ + 4.4875
137
+ - 0.0428 * np.tanh(18.5138 * (sto - 0.5542))
138
+ - 17.7326 * np.tanh(15.7890 * (sto - 0.3117))
139
+ + 17.5842 * np.tanh(15.9308 * (sto - 0.3120))
140
+ )
141
+
142
+ return u_eq
143
+
144
+
145
+ def nmc_LGM50_electrolyte_exchange_current_density_Chen2020(c_e, c_s_surf, c_s_max, T):
146
+ """
147
+ Exchange-current density for Butler-Volmer reactions between NMC and LiPF6 in
148
+ EC:DMC.
149
+
150
+ References
151
+ ----------
152
+ .. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W.
153
+ Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for
154
+ Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the
155
+ Electrochemical Society 167 (2020): 080534.
156
+
157
+ Parameters
158
+ ----------
159
+ c_e : :class:`pybamm.Symbol`
160
+ Electrolyte concentration [mol.m-3]
161
+ c_s_surf : :class:`pybamm.Symbol`
162
+ Particle concentration [mol.m-3]
163
+ c_s_max : :class:`pybamm.Symbol`
164
+ Maximum particle concentration [mol.m-3]
165
+ T : :class:`pybamm.Symbol`
166
+ Temperature [K]
167
+
168
+ Returns
169
+ -------
170
+ :class:`pybamm.Symbol`
171
+ Exchange-current density [A.m-2]
172
+ """
173
+ m_ref = 3.42e-6 # (A/m2)(m3/mol)**1.5 - includes ref concentrations
174
+ E_r = 17800
175
+ arrhenius = np.exp(E_r / pybamm.constants.R * (1 / 298.15 - 1 / T))
176
+
177
+ return m_ref * arrhenius * c_e**0.5 * c_s_surf**0.5 * (c_s_max - c_s_surf) ** 0.5
178
+
179
+
180
+ def electrolyte_diffusivity_Nyman2008(c_e, T):
181
+ """
182
+ Diffusivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration. The data
183
+ comes from [1]
184
+
185
+ References
186
+ ----------
187
+ .. [1] A. Nyman, M. Behm, and G. Lindbergh, "Electrochemical characterisation and
188
+ modelling of the mass transport phenomena in LiPF6-EC-EMC electrolyte,"
189
+ Electrochim. Acta, vol. 53, no. 22, pp. 6356–6365, 2008.
190
+
191
+ Parameters
192
+ ----------
193
+ c_e: :class:`pybamm.Symbol`
194
+ Dimensional electrolyte concentration
195
+ T: :class:`pybamm.Symbol`
196
+ Dimensional temperature
197
+
198
+ Returns
199
+ -------
200
+ :class:`pybamm.Symbol`
201
+ Solid diffusivity
202
+ """
203
+
204
+ D_c_e = 8.794e-11 * (c_e / 1000) ** 2 - 3.972e-10 * (c_e / 1000) + 4.862e-10
205
+
206
+ # Nyman et al. (2008) does not provide temperature dependence
207
+
208
+ return D_c_e
209
+
210
+
211
+ def electrolyte_conductivity_Nyman2008(c_e, T):
212
+ """
213
+ Conductivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration. The data
214
+ comes from [1].
215
+
216
+ References
217
+ ----------
218
+ .. [1] A. Nyman, M. Behm, and G. Lindbergh, "Electrochemical characterisation and
219
+ modelling of the mass transport phenomena in LiPF6-EC-EMC electrolyte,"
220
+ Electrochim. Acta, vol. 53, no. 22, pp. 6356–6365, 2008.
221
+
222
+ Parameters
223
+ ----------
224
+ c_e: :class:`pybamm.Symbol`
225
+ Dimensional electrolyte concentration
226
+ T: :class:`pybamm.Symbol`
227
+ Dimensional temperature
228
+
229
+ Returns
230
+ -------
231
+ :class:`pybamm.Symbol`
232
+ Solid diffusivity
233
+ """
234
+
235
+ sigma_e = (
236
+ 0.1297 * (c_e / 1000) ** 3 - 2.51 * (c_e / 1000) ** 1.5 + 3.329 * (c_e / 1000)
237
+ )
238
+
239
+ # Nyman et al. (2008) does not provide temperature dependence
240
+
241
+ return sigma_e
242
+
243
+
244
+ # Call dict via a function to avoid errors when editing in place
245
+ def get_parameter_values():
246
+ """
247
+ Parameters for an LG M50 cell, from the paper :footcite:t:`Chen2020` and references
248
+ therein.
249
+
250
+ SEI parameters are example parameters for SEI growth from the papers
251
+ :footcite:t:`Ramadass2004`, :footcite:t:`ploehn2004solvent`,
252
+ :footcite:t:`single2018identifying`, :footcite:t:`safari2008multimodal`, and
253
+ :footcite:t:`Yang2017`
254
+
255
+ .. note::
256
+ This parameter set does not claim to be representative of the true parameter
257
+ values. Instead these are parameter values that were used to fit SEI models to
258
+ observed experimental data in the referenced papers.
259
+ """
260
+
261
+ return {
262
+ "chemistry": "lithium_ion",
263
+ # sei
264
+ "Ratio of lithium moles to SEI moles": 2.0,
265
+ "Inner SEI reaction proportion": 0.5,
266
+ "Inner SEI partial molar volume [m3.mol-1]": 9.585e-05,
267
+ "Outer SEI partial molar volume [m3.mol-1]": 9.585e-05,
268
+ "SEI reaction exchange current density [A.m-2]": 1.5e-07,
269
+ "SEI resistivity [Ohm.m]": 200000.0,
270
+ "Outer SEI solvent diffusivity [m2.s-1]": 2.5000000000000002e-22,
271
+ "Bulk solvent concentration [mol.m-3]": 2636.0,
272
+ "Inner SEI open-circuit potential [V]": 0.1,
273
+ "Outer SEI open-circuit potential [V]": 0.8,
274
+ "Inner SEI electron conductivity [S.m-1]": 8.95e-14,
275
+ "Inner SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
276
+ "Lithium interstitial reference concentration [mol.m-3]": 15.0,
277
+ "Initial inner SEI thickness [m]": 2.5e-09,
278
+ "Initial outer SEI thickness [m]": 2.5e-09,
279
+ "EC initial concentration in electrolyte [mol.m-3]": 4541.0,
280
+ "EC diffusivity [m2.s-1]": 2e-18,
281
+ "SEI kinetic rate constant [m.s-1]": 1e-12,
282
+ "SEI open-circuit potential [V]": 0.4,
283
+ "SEI growth activation energy [J.mol-1]": 0.0,
284
+ "Negative electrode reaction-driven LAM factor [m3.mol-1]": 0.0,
285
+ "Positive electrode reaction-driven LAM factor [m3.mol-1]": 0.0,
286
+ # cell
287
+ "Negative current collector thickness [m]": 1.2e-05,
288
+ "Negative electrode thickness [m]": 8.52e-05,
289
+ "Separator thickness [m]": 1.2e-05,
290
+ "Positive electrode thickness [m]": 7.56e-05,
291
+ "Positive current collector thickness [m]": 1.6e-05,
292
+ "Electrode height [m]": 0.065,
293
+ "Electrode width [m]": 1.58,
294
+ "Cell cooling surface area [m2]": 0.00531,
295
+ "Cell volume [m3]": 2.42e-05,
296
+ "Cell thermal expansion coefficient [m.K-1]": 1.1e-06,
297
+ "Negative current collector conductivity [S.m-1]": 58411000.0,
298
+ "Positive current collector conductivity [S.m-1]": 36914000.0,
299
+ "Negative current collector density [kg.m-3]": 8960.0,
300
+ "Positive current collector density [kg.m-3]": 2700.0,
301
+ "Negative current collector specific heat capacity [J.kg-1.K-1]": 385.0,
302
+ "Positive current collector specific heat capacity [J.kg-1.K-1]": 897.0,
303
+ "Negative current collector thermal conductivity [W.m-1.K-1]": 401.0,
304
+ "Positive current collector thermal conductivity [W.m-1.K-1]": 237.0,
305
+ "Nominal cell capacity [A.h]": 5.0,
306
+ "Current function [A]": 5.0,
307
+ "Contact resistance [Ohm]": 0,
308
+ # negative electrode
309
+ "Negative electrode conductivity [S.m-1]": 215.0,
310
+ "Maximum concentration in negative electrode [mol.m-3]": 33133.0,
311
+ "Negative particle diffusivity [m2.s-1]": 3.3e-14,
312
+ "Negative electrode OCP [V]": graphite_LGM50_ocp_Chen2020,
313
+ "Negative electrode porosity": 0.25,
314
+ "Negative electrode active material volume fraction": 0.75,
315
+ "Negative particle radius [m]": 5.86e-06,
316
+ "Negative electrode Bruggeman coefficient (electrolyte)": 1.5,
317
+ "Negative electrode Bruggeman coefficient (electrode)": 0,
318
+ "Negative electrode charge transfer coefficient": 0.5,
319
+ "Negative electrode double-layer capacity [F.m-2]": 0.2,
320
+ "Negative electrode exchange-current density [A.m-2]"
321
+ "": graphite_LGM50_electrolyte_exchange_current_density_Chen2020,
322
+ "Negative electrode density [kg.m-3]": 1657.0,
323
+ "Negative electrode specific heat capacity [J.kg-1.K-1]": 700.0,
324
+ "Negative electrode thermal conductivity [W.m-1.K-1]": 1.7,
325
+ "Negative electrode OCP entropic change [V.K-1]": 0.0,
326
+ # positive electrode
327
+ "Positive electrode conductivity [S.m-1]": 0.18,
328
+ "Maximum concentration in positive electrode [mol.m-3]": 63104.0,
329
+ "Positive particle diffusivity [m2.s-1]": 4e-15,
330
+ "Positive electrode OCP [V]": nmc_LGM50_ocp_Chen2020,
331
+ "Positive electrode porosity": 0.335,
332
+ "Positive electrode active material volume fraction": 0.665,
333
+ "Positive particle radius [m]": 5.22e-06,
334
+ "Positive electrode Bruggeman coefficient (electrolyte)": 1.5,
335
+ "Positive electrode Bruggeman coefficient (electrode)": 0,
336
+ "Positive electrode charge transfer coefficient": 0.5,
337
+ "Positive electrode double-layer capacity [F.m-2]": 0.2,
338
+ "Positive electrode exchange-current density [A.m-2]"
339
+ "": nmc_LGM50_electrolyte_exchange_current_density_Chen2020,
340
+ "Positive electrode density [kg.m-3]": 3262.0,
341
+ "Positive electrode specific heat capacity [J.kg-1.K-1]": 700.0,
342
+ "Positive electrode thermal conductivity [W.m-1.K-1]": 2.1,
343
+ "Positive electrode OCP entropic change [V.K-1]": 0.0,
344
+ # separator
345
+ "Separator porosity": 0.47,
346
+ "Separator Bruggeman coefficient (electrolyte)": 1.5,
347
+ "Separator density [kg.m-3]": 397.0,
348
+ "Separator specific heat capacity [J.kg-1.K-1]": 700.0,
349
+ "Separator thermal conductivity [W.m-1.K-1]": 0.16,
350
+ # electrolyte
351
+ "Initial concentration in electrolyte [mol.m-3]": 1000.0,
352
+ "Cation transference number": 0.2594,
353
+ "Thermodynamic factor": 1.0,
354
+ "Electrolyte diffusivity [m2.s-1]": electrolyte_diffusivity_Nyman2008,
355
+ "Electrolyte conductivity [S.m-1]": electrolyte_conductivity_Nyman2008,
356
+ # experiment
357
+ "Reference temperature [K]": 298.15,
358
+ "Total heat transfer coefficient [W.m-2.K-1]": 10.0,
359
+ "Ambient temperature [K]": 298.15,
360
+ "Number of electrodes connected in parallel to make a cell": 1.0,
361
+ "Number of cells connected in series to make a battery": 1.0,
362
+ "Lower voltage cut-off [V]": 2.5,
363
+ "Upper voltage cut-off [V]": 4.2,
364
+ "Open-circuit voltage at 0% SOC [V]": 2.5,
365
+ "Open-circuit voltage at 100% SOC [V]": 4.2,
366
+ "Initial concentration in negative electrode [mol.m-3]": 29866.0,
367
+ "Initial concentration in positive electrode [mol.m-3]": 17038.0,
368
+ "Initial temperature [K]": 298.15,
369
+ # citations
370
+ "notcite": ["Chen2020"],
371
+ }