Skip to content

Commit

Permalink
Merge pull request pybamm-team#975 from pybamm-team/issue-966-exchang…
Browse files Browse the repository at this point in the history
…e-current

Issue 966 exchange current
  • Loading branch information
valentinsulzer authored May 1, 2020
2 parents 4742a7e + 6d7abdd commit 1bdbdaf
Show file tree
Hide file tree
Showing 60 changed files with 661 additions and 458 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

## Breaking changes

- Renamed "surface area density" to "surface area to volume ratio" ([#975](https://github.com/pybamm-team/PyBaMM/pull/975))
- Replaced "reaction rate" with "exchange-current density" ([#975](https://github.com/pybamm-team/PyBaMM/pull/975))
- Changed the implementation of reactions in submodels ([#948](https://github.com/pybamm-team/PyBaMM/pull/948))
- Removed some inputs like `T_inf`, `R_g` and activation energies to some of the standard function parameters. This is because each of those inputs is specific to a particular function (e.g. the reference temperature at which the function was measured). To change a property such as the activation energy, users should create a new function, specifying the relevant property as a `Parameter` or `InputParameter` ([#942](https://github.com/pybamm-team/PyBaMM/pull/942))
- The thermal option 'xyz-lumped' has been removed. The option 'thermal current collector' has also been removed ([#938](https://github.com/pybamm-team/PyBaMM/pull/938))
Expand Down
12 changes: 6 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/
include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/darken_thermodynamic_factor_Chapman1968.py
include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/viscosity_Chapman1968.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_exchange_current_density_Chen2020.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_ocp_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_reaction_rate_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_exchange_current_density_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_entropic_change_Moura2016.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_reaction_rate_Kim2011.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_exchange_current_density_Kim2011.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_ocp_Kim2011.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_ocp_Kim2011_function.py
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_exchange_current_density_Kim2011.py
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_exchange_current_density_Chen2020.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_exchange_current_density_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_ocp_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_entropic_change_Moura2016.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@
" 'Negative electrode double-layer capacity [F.m-2]': 0.2,\n",
" 'Negative electrode electrons in reaction': 1.0,\n",
" 'Negative electrode porosity': 0.3,\n",
" 'Negative electrode reaction rate': <function graphite_electrolyte_reaction_rate_Dualfoil1998 at 0x7f42bfb4a7a0>,\n",
" 'Negative electrode exchange-current density [A.m-2]': <function graphite_electrolyte_exchange_current_density_Dualfoil1998 at 0x7f42bfb4a7a0>,\n",
" 'Negative electrode specific heat capacity [J.kg-1.K-1]': 700.0,\n",
" 'Negative electrode surface area density [m-1]': 180000.0,\n",
" 'Negative electrode surface area to volume ratio [m-1]': 180000.0,\n",
" 'Negative electrode thermal conductivity [W.m-1.K-1]': 1.7,\n",
" 'Negative electrode thickness [m]': 0.0001,\n",
" 'Negative particle distribution in x': 1.0,\n",
Expand Down Expand Up @@ -328,9 +328,9 @@
" 'Positive electrode double-layer capacity [F.m-2]': 0.2,\n",
" 'Positive electrode electrons in reaction': 1.0,\n",
" 'Positive electrode porosity': 0.3,\n",
" 'Positive electrode reaction rate': <function lico2_electrolyte_reaction_rate_Dualfoil1998 at 0x7f42bfb36710>,\n",
" 'Positive electrode exchange-current density [A.m-2]': <function lico2_electrolyte_exchange_current_density_Dualfoil1998 at 0x7f42bfb36710>,\n",
" 'Positive electrode specific heat capacity [J.kg-1.K-1]': 700.0,\n",
" 'Positive electrode surface area density [m-1]': 150000.0,\n",
" 'Positive electrode surface area to volume ratio [m-1]': 150000.0,\n",
" 'Positive electrode thermal conductivity [W.m-1.K-1]': 2.1,\n",
" 'Positive electrode thickness [m]': 0.0001,\n",
" 'Positive particle distribution in x': 1.0,\n",
Expand Down
8 changes: 4 additions & 4 deletions examples/notebooks/change-settings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
"Negative electrode active material volume fraction 0.7\n",
"Negative particle radius [m] 1e-05\n",
"Negative particle distribution in x 1.0\n",
"Negative electrode surface area density [m-1] 180000.0\n",
"Negative electrode surface area to volume ratio [m-1] 180000.0\n",
"Negative electrode Bruggeman coefficient (electrolyte) 1.5\n",
"Negative electrode Bruggeman coefficient (electrode) 1.5\n",
"Negative electrode cation signed stoichiometry -1.0\n",
Expand All @@ -183,7 +183,7 @@
"Negative electrode thermal conductivity [W.m-1.K-1] 1.7\n",
"Negative electrode OCP entropic change [V.K-1] <function graphite_entropic_change_Moura2016 at 0x13020a0d0>\n",
"Reference temperature [K] 298.15\n",
"Negative electrode reaction rate <function graphite_electrolyte_reaction_rate_Dualfoil1998 at 0x13020a158>\n",
"Negative electrode exchange-current density [A.m-2] <function graphite_electrolyte_exchange_current_density_Dualfoil1998 at 0x13020a158>\n",
"Negative reaction rate activation energy [J.mol-1] 37480.0\n",
"Negative solid diffusion activation energy [J.mol-1] 42770.0\n",
"Positive electrode conductivity [S.m-1] 10.0\n",
Expand All @@ -194,7 +194,7 @@
"Positive electrode active material volume fraction 0.7\n",
"Positive particle radius [m] 1e-05\n",
"Positive particle distribution in x 1.0\n",
"Positive electrode surface area density [m-1] 150000.0\n",
"Positive electrode surface area to volume ratio [m-1] 150000.0\n",
"Positive electrode Bruggeman coefficient (electrolyte) 1.5\n",
"Positive electrode Bruggeman coefficient (electrode) 1.5\n",
"Positive electrode cation signed stoichiometry -1.0\n",
Expand All @@ -206,7 +206,7 @@
"Positive electrode specific heat capacity [J.kg-1.K-1] 700.0\n",
"Positive electrode thermal conductivity [W.m-1.K-1] 2.1\n",
"Positive electrode OCP entropic change [V.K-1] <function lico2_entropic_change_Moura2016 at 0x13020a2f0>\n",
"Positive electrode reaction rate <function lico2_electrolyte_reaction_rate_Dualfoil1998 at 0x13020a378>\n",
"Positive electrode exchange-current density [A.m-2] <function lico2_electrolyte_exchange_current_density_Dualfoil1998 at 0x13020a378>\n",
"Positive reaction rate activation energy [J.mol-1] 39570.0\n",
"Positive solid diffusion activation energy [J.mol-1] 18550.0\n",
"Separator porosity 1.0\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/models/DFN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
"|$\\mathcal{C}_{\\text{e}}$ |$\\tau_{\\text{e}}^*/\\tau_{\\text{d}}^*$ |Ratio of electrolyte transport and discharge timescales|\n",
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|\n",
"|$\\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",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/models/SPM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@
"| $L_{\\text{k}}$ | $L_{\\text{k}}^*/L^*$ | Ratio of region thickness to cell thickness|\n",
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/models/SPMe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
"|$\\mathcal{C}_{\\text{e}}$ |$\\tau_{\\text{e}}^*/\\tau_{\\text{d}}^*$ |Ratio of electrolyte transport and discharge timescales|\n",
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|\n",
"|$\\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",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/using-submodels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"data": {
"text/plain": [
"{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",
" 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",
" 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",
" 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']\"})}"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/scripts/SPMe_SOC.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"Maximum concentration in positive electrode [mol.m-3]": 50000,
"Initial concentration in negative electrode [mol.m-3]": 12500,
"Initial concentration in positive electrode [mol.m-3]": 25000,
"Negative electrode surface area density [m-1]": 180000.0,
"Positive electrode surface area density [m-1]": 150000.0,
"Negative electrode surface area to volume ratio [m-1]": 180000.0,
"Positive electrode surface area to volume ratio [m-1]": 150000.0,
"Current function [A]": I_app,
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from pybamm import standard_parameters_lead_acid


def lead_exchange_current_density_Sulzer2019(c_e, T):
"""
Dimensional exchange-current density in the negative (lead) electrode, from [1]_
References
----------
.. [1] V. Sulzer, S. J. Chapman, C. P. Please, D. A. Howey, and C. W. Monroe,
“Faster lead-acid battery simulations from porous-electrode theory: Part I. Physical
model.”
[Journal of the Electrochemical Society](https://doi.org/10.1149/2.0301910jes),
166(12), 2363 (2019).
Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]
Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""
j0_ref = 0.06 # srinivasan2003mathematical
j0 = j0_ref * (c_e / standard_parameters_lead_acid.c_e_typ)

return j0
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Negative electrode volumetric capacity [C.m-3],3.473e9,bernardi1995mathematical,
Negative electrode open-circuit potential [V],[function]lead_ocp_Bode1977,,
,,,
# Microstructure,,,
Negative electrode surface area density [m-1],2300000,,
Negative electrode surface area to volume ratio [m-1],2300000,,
Negative electrode Bruggeman coefficient (electrolyte),1.5,,
Negative electrode Bruggeman coefficient (electrode),1.5,,
Negative electrode morphological parameter,0.6,srinivasan2003mathematical,
Expand All @@ -20,7 +20,7 @@ Negative electrode capacity [C.m-3],3473000000,,
# Interfacial reactions,,,
Negative electrode cation signed stoichiometry,1,,
Negative electrode electrons in reaction,2,,
Negative electrode reference exchange-current density [A.m-2],0.06,srinivasan2003mathematical,
Negative electrode exchange-current density [A.m-2],[function]lead_exchange_current_density_Sulzer2019,,
Signed stoichiometry of cations (oxygen reaction),4,,
Signed stoichiometry of water (oxygen reaction),-1,,
Signed stoichiometry of oxygen (oxygen reaction),1,,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from pybamm import standard_parameters_lead_acid


def lead_dioxide_exchange_current_density_Sulzer2019(c_e, T):
"""
Dimensional exchange-current density in the positive electrode, from [1]_
References
----------
.. [1] V. Sulzer, S. J. Chapman, C. P. Please, D. A. Howey, and C. W. Monroe,
“Faster lead-acid battery simulations from porous-electrode theory: Part I. Physical
model.”
[Journal of the Electrochemical Society](https://doi.org/10.1149/2.0301910jes),
166(12), 2363 (2019).
Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]
Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""
c_ox = 0
c_hy = 0
param = standard_parameters_lead_acid
c_w_dim = (1 - c_e * param.V_e - c_ox * param.V_ox - c_hy * param.V_hy) / param.V_w
c_w_ref = (1 - param.c_e_typ * param.V_e) / param.V_w
c_w = c_w_dim / c_w_ref

j0_ref = 0.004 # srinivasan2003mathematical
j0 = j0_ref * (c_e / param.c_e_typ) ** 2 * c_w

return j0
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from pybamm import standard_parameters_lead_acid


def oxygen_exchange_current_density_Sulzer2019(c_e, T):
"""
Dimensional oxygen exchange-current density in the positive electrode, from [1]_
References
----------
.. [1] V. Sulzer, S. J. Chapman, C. P. Please, D. A. Howey, and C. W. Monroe,
“Faster lead-acid battery simulations from porous-electrode theory: Part I. Physical
model.”
[Journal of the Electrochemical Society](https://doi.org/10.1149/2.0301910jes),
166(12), 2363 (2019).
Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]
Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""
j0_ref = 2.5e-23 # srinivasan2003mathematical
j0 = j0_ref * (c_e / standard_parameters_lead_acid.c_e_typ)

return j0
Loading

0 comments on commit 1bdbdaf

Please sign in to comment.