Skip to content

Commit 9801bc3

Browse files
#966 reformat lithium-ion
1 parent 83fba98 commit 9801bc3

File tree

45 files changed

+459
-398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+459
-398
lines changed

MANIFEST.in

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/
3535
include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/darken_thermodynamic_factor_Chapman1968.py
3636
include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/viscosity_Chapman1968.py
3737
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py
38-
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py
38+
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_exchange_current_density_Chen2020.py
3939
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_ocp_Dualfoil1998.py
40-
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_reaction_rate_Dualfoil1998.py
40+
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_exchange_current_density_Dualfoil1998.py
4141
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_entropic_change_Moura2016.py
4242
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py
43-
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_reaction_rate_Kim2011.py
43+
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_exchange_current_density_Kim2011.py
4444
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_ocp_Kim2011.py
4545
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py
4646
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_ocp_Kim2011_function.py
4747
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py
48-
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py
48+
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_exchange_current_density_Kim2011.py
4949
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py
50-
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py
51-
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py
50+
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_exchange_current_density_Chen2020.py
51+
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_exchange_current_density_Dualfoil1998.py
5252
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_ocp_Dualfoil1998.py
5353
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_entropic_change_Moura2016.py
5454
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py

examples/notebooks/Getting Started/Tutorial 2 - Setting Parameter Values.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@
296296
" 'Negative electrode double-layer capacity [F.m-2]': 0.2,\n",
297297
" 'Negative electrode electrons in reaction': 1.0,\n",
298298
" 'Negative electrode porosity': 0.3,\n",
299-
" 'Negative electrode reaction rate': <function graphite_electrolyte_reaction_rate_Dualfoil1998 at 0x7f42bfb4a7a0>,\n",
299+
" 'Negative electrode exchange-current density [A.m-2]': <function graphite_electrolyte_exchange_current_density_Dualfoil1998 at 0x7f42bfb4a7a0>,\n",
300300
" 'Negative electrode specific heat capacity [J.kg-1.K-1]': 700.0,\n",
301-
" 'Negative electrode surface area density [m-1]': 180000.0,\n",
301+
" 'Negative electrode surface area to volume ratio [m-1]': 180000.0,\n",
302302
" 'Negative electrode thermal conductivity [W.m-1.K-1]': 1.7,\n",
303303
" 'Negative electrode thickness [m]': 0.0001,\n",
304304
" 'Negative particle distribution in x': 1.0,\n",
@@ -328,9 +328,9 @@
328328
" 'Positive electrode double-layer capacity [F.m-2]': 0.2,\n",
329329
" 'Positive electrode electrons in reaction': 1.0,\n",
330330
" 'Positive electrode porosity': 0.3,\n",
331-
" 'Positive electrode reaction rate': <function lico2_electrolyte_reaction_rate_Dualfoil1998 at 0x7f42bfb36710>,\n",
331+
" 'Positive electrode exchange-current density [A.m-2]': <function lico2_electrolyte_exchange_current_density_Dualfoil1998 at 0x7f42bfb36710>,\n",
332332
" 'Positive electrode specific heat capacity [J.kg-1.K-1]': 700.0,\n",
333-
" 'Positive electrode surface area density [m-1]': 150000.0,\n",
333+
" 'Positive electrode surface area to volume ratio [m-1]': 150000.0,\n",
334334
" 'Positive electrode thermal conductivity [W.m-1.K-1]': 2.1,\n",
335335
" 'Positive electrode thickness [m]': 0.0001,\n",
336336
" 'Positive particle distribution in x': 1.0,\n",

examples/notebooks/change-settings.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
"Negative electrode active material volume fraction 0.7\n",
171171
"Negative particle radius [m] 1e-05\n",
172172
"Negative particle distribution in x 1.0\n",
173-
"Negative electrode surface area density [m-1] 180000.0\n",
173+
"Negative electrode surface area to volume ratio [m-1] 180000.0\n",
174174
"Negative electrode Bruggeman coefficient (electrolyte) 1.5\n",
175175
"Negative electrode Bruggeman coefficient (electrode) 1.5\n",
176176
"Negative electrode cation signed stoichiometry -1.0\n",
@@ -183,7 +183,7 @@
183183
"Negative electrode thermal conductivity [W.m-1.K-1] 1.7\n",
184184
"Negative electrode OCP entropic change [V.K-1] <function graphite_entropic_change_Moura2016 at 0x13020a0d0>\n",
185185
"Reference temperature [K] 298.15\n",
186-
"Negative electrode reaction rate <function graphite_electrolyte_reaction_rate_Dualfoil1998 at 0x13020a158>\n",
186+
"Negative electrode exchange-current density [A.m-2] <function graphite_electrolyte_exchange_current_density_Dualfoil1998 at 0x13020a158>\n",
187187
"Negative reaction rate activation energy [J.mol-1] 37480.0\n",
188188
"Negative solid diffusion activation energy [J.mol-1] 42770.0\n",
189189
"Positive electrode conductivity [S.m-1] 10.0\n",
@@ -194,7 +194,7 @@
194194
"Positive electrode active material volume fraction 0.7\n",
195195
"Positive particle radius [m] 1e-05\n",
196196
"Positive particle distribution in x 1.0\n",
197-
"Positive electrode surface area density [m-1] 150000.0\n",
197+
"Positive electrode surface area to volume ratio [m-1] 150000.0\n",
198198
"Positive electrode Bruggeman coefficient (electrolyte) 1.5\n",
199199
"Positive electrode Bruggeman coefficient (electrode) 1.5\n",
200200
"Positive electrode cation signed stoichiometry -1.0\n",
@@ -206,7 +206,7 @@
206206
"Positive electrode specific heat capacity [J.kg-1.K-1] 700.0\n",
207207
"Positive electrode thermal conductivity [W.m-1.K-1] 2.1\n",
208208
"Positive electrode OCP entropic change [V.K-1] <function lico2_entropic_change_Moura2016 at 0x13020a2f0>\n",
209-
"Positive electrode reaction rate <function lico2_electrolyte_reaction_rate_Dualfoil1998 at 0x13020a378>\n",
209+
"Positive electrode exchange-current density [A.m-2] <function lico2_electrolyte_exchange_current_density_Dualfoil1998 at 0x13020a378>\n",
210210
"Positive reaction rate activation energy [J.mol-1] 39570.0\n",
211211
"Positive solid diffusion activation energy [J.mol-1] 18550.0\n",
212212
"Separator porosity 1.0\n",

examples/notebooks/models/DFN.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
233233
"|$\\mathcal{C}_{\\text{e}}$ |$\\tau_{\\text{e}}^*/\\tau_{\\text{d}}^*$ |Ratio of electrolyte transport and discharge timescales|\n",
234234
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
235-
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
235+
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
236236
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|\n",
237237
"|$\\gamma_{\\text{e}}$ |$c_{\\text{e,typ}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentration in the negative electrode solid and typical electrolyte concentration|\n",
238238
"\n",

examples/notebooks/models/SPM.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@
866866
"| $L_{\\text{k}}$ | $L_{\\text{k}}^*/L^*$ | Ratio of region thickness to cell thickness|\n",
867867
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
868868
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
869-
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
869+
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
870870
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|"
871871
]
872872
},

examples/notebooks/models/SPMe.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
232232
"|$\\mathcal{C}_{\\text{e}}$ |$\\tau_{\\text{e}}^*/\\tau_{\\text{d}}^*$ |Ratio of electrolyte transport and discharge timescales|\n",
233233
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
234-
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
234+
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
235235
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|\n",
236236
"|$\\gamma_{\\text{e}}$ |$c_{\\text{e,typ}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentration in the negative electrode solid and typical electrolyte concentration|\n",
237237
"\n",

examples/notebooks/using-submodels.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
"data": {
223223
"text/plain": [
224224
"{Variable(0xed7452bed2f1969, Discharge capacity [A.h], children=[], domain=[], auxiliary_domains={}): Division(0x381d630aa1528443, /, children=['Current function [A] * 96485.33212 * Maximum concentration in negative electrode [mol.m-3] * Negative electrode thickness [m] + Separator thickness [m] + Positive electrode thickness [m] / function (absolute)', '3600.0'], domain=[], auxiliary_domains={}),\n",
225-
" Variable(0x5f6d314a2ae28139, X-averaged negative particle surface concentration, children=[], domain=['current collector'], auxiliary_domains={}): Division(-0x51e6c8f5bc31c548, /, children=['-3.0 * broadcast(Current function [A] / Typical current [A] * function (sign)) / Negative electrode thickness [m] / Negative electrode thickness [m] + Separator thickness [m] + Positive electrode thickness [m]', 'Negative electrode surface area density [m-1] * Negative particle radius [m]'], domain=['current collector'], auxiliary_domains={}),\n",
225+
" Variable(0x5f6d314a2ae28139, X-averaged negative particle surface concentration, children=[], domain=['current collector'], auxiliary_domains={}): Division(-0x51e6c8f5bc31c548, /, children=['-3.0 * broadcast(Current function [A] / Typical current [A] * function (sign)) / Negative electrode thickness [m] / Negative electrode thickness [m] + Separator thickness [m] + Positive electrode thickness [m]', 'Negative electrode surface area to volume ratio [m-1] * Negative particle radius [m]'], domain=['current collector'], auxiliary_domains={}),\n",
226226
" Variable(0x25e9b81e826ecc78, X-averaged positive particle concentration, children=[], domain=['positive particle'], auxiliary_domains={'secondary': \"['current collector']\"}): Multiplication(0x2cd744f1f248da68, *, children=['-1.0 / Positive particle radius [m] ** 2.0 / Positive electrode diffusivity [m2.s-1] / 96485.33212 * Maximum concentration in negative electrode [mol.m-3] * Negative electrode thickness [m] + Separator thickness [m] + Positive electrode thickness [m] / function (absolute)', 'div(-Positive electrode diffusivity [m2.s-1] / Positive electrode diffusivity [m2.s-1] * grad(X-averaged positive particle concentration))'], domain=['positive particle'], auxiliary_domains={'secondary': \"['current collector']\"})}"
227227
]
228228
},

examples/scripts/SPMe_SOC.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
"Maximum concentration in positive electrode [mol.m-3]": 50000,
5757
"Initial concentration in negative electrode [mol.m-3]": 12500,
5858
"Initial concentration in positive electrode [mol.m-3]": 25000,
59-
"Negative electrode surface area density [m-1]": 180000.0,
60-
"Positive electrode surface area density [m-1]": 150000.0,
59+
"Negative electrode surface area to volume ratio [m-1]": 180000.0,
60+
"Positive electrode surface area to volume ratio [m-1]": 150000.0,
6161
"Current function [A]": I_app,
6262
}
6363
)

pybamm/input/parameters/lead-acid/anodes/lead_Sulzer2019/parameters.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Negative electrode volumetric capacity [C.m-3],3.473e9,bernardi1995mathematical,
1111
Negative electrode open-circuit potential [V],[function]lead_ocp_Bode1977,,
1212
,,,
1313
# Microstructure,,,
14-
Negative electrode surface area density [m-1],2300000,,
14+
Negative electrode surface area to volume ratio [m-1],2300000,,
1515
Negative electrode Bruggeman coefficient (electrolyte),1.5,,
1616
Negative electrode Bruggeman coefficient (electrode),1.5,,
1717
Negative electrode morphological parameter,0.6,srinivasan2003mathematical,

pybamm/input/parameters/lead-acid/cathodes/lead_dioxide_Sulzer2019/parameters.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Positive electrode volumetric capacity [C.m-3],2.745e9,bernardi1995mathematical,
1111
Positive electrode open-circuit potential [V],[function]lead_dioxide_ocp_Bode1977,,
1212
,,,
1313
# Microstructure,,,
14-
Positive electrode surface area density [m-1],23000000,,
14+
Positive electrode surface area to volume ratio [m-1],23000000,,
1515
Positive electrode Bruggeman coefficient (electrolyte),1.5,,
1616
Positive electrode Bruggeman coefficient (electrode),1.5,,
1717
Positive electrode morphological parameter,0.6,srinivasan2003mathematical,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
from pybamm import exp, constants, standard_parameters_lithium_ion
2+
3+
4+
def graphite_LGM50_electrolyte_exchange_current_density_Chen2020(c_e, c_s_surf, T):
5+
"""
6+
Exchange-current density for Butler-Volmer reactions between graphite and LiPF6 in
7+
EC:DMC.
8+
9+
References
10+
----------
11+
.. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W.
12+
Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for
13+
Parameterization of Multi-scale Lithium-ion Battery Models." Submitted for
14+
publication (2020).
15+
16+
Parameters
17+
----------
18+
c_e : :class:`pybamm.Symbol`
19+
Electrolyte concentration [mol.m-3]
20+
c_s_surf : :class:`pybamm.Symbol`
21+
Particle concentration [mol.m-3]
22+
T : :class:`pybamm.Symbol`
23+
Temperature [K]
24+
25+
Returns
26+
-------
27+
:class:`pybamm.Symbol`
28+
Exchange-current density [A.m-2]
29+
"""
30+
31+
m_ref = 6.48e-7 # (A/m2)(mol/m3)**1.5 - includes ref concentrations
32+
E_r = 35000
33+
arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T))
34+
35+
c_n_max = standard_parameters_lithium_ion.c_n_max
36+
37+
return (
38+
m_ref * arrhenius * c_e ** 0.5 * c_s_surf ** 0.5 * (c_n_max - c_s_surf) ** 0.5
39+
)

pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py

-30
This file was deleted.

pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv

+3-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Negative electrode porosity,0.25,Chen 2020,
1212
Negative electrode active material volume fraction,0.75,Chen 2020,
1313
Negative particle radius [m],5.86E-6,Chen 2020,
1414
Negative particle distribution in x,1,default,
15-
Negative electrode surface area density [m-1],383959,Chen 2020,
15+
Negative electrode surface area to volume ratio [m-1],383959,Chen 2020,
1616
Negative electrode Bruggeman coefficient (electrolyte),1.5,Chen 2020,theoretical
1717
Negative electrode Bruggeman coefficient (electrode),1.5,default,
1818
,,,
@@ -22,14 +22,12 @@ Negative electrode electrons in reaction,1,,
2222
Reference OCP vs SHE in the negative electrode [V],,,
2323
Negative electrode charge transfer coefficient,0.5,Chen 2020,
2424
Negative electrode double-layer capacity [F.m-2],0.2,,
25+
Negative electrode exchange-current density [A.m-2],[function]graphite_LGM50_electrolyte_exchange_current_density_Chen2020,,
2526
,,,
2627
# Density,,,
2728
Negative electrode density [kg.m-3],1657,default,
2829
,,,
2930
# Thermal parameters,,,
3031
Negative electrode specific heat capacity [J.kg-1.K-1],700,default,
3132
Negative electrode thermal conductivity [W.m-1.K-1],1.7,default,
32-
Negative electrode OCP entropic change [V.K-1],0,,
33-
,,,
34-
# Reaction rate,,,
35-
Negative electrode reaction rate,[function]graphite_LGM50_electrolyte_reaction_rate_Chen2020,,
33+
Negative electrode OCP entropic change [V.K-1],0,,

0 commit comments

Comments
 (0)