diff --git a/CHANGELOG.md b/CHANGELOG.md index 427d2673d9..b1a79d380d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Added some new solvers for algebraic models ([#1059](https://github.com/pybamm-team/PyBaMM/pull/1059)) - Added `length_scales` attribute to models ([#1058](https://github.com/pybamm-team/PyBaMM/pull/1058)) - Added averaging in secondary dimensions ([#1057](https://github.com/pybamm-team/PyBaMM/pull/1057)) +- Added SEI reaction based on Yang et. al. 2017 and reduction in porosity ([#1009](https://github.com/pybamm-team/PyBaMM/issues/1009)) ## Optimizations diff --git a/docs/source/models/submodels/interface/sei.rst b/docs/source/models/submodels/interface/sei.rst index a036263f27..5d7dc1db25 100644 --- a/docs/source/models/submodels/interface/sei.rst +++ b/docs/source/models/submodels/interface/sei.rst @@ -20,4 +20,7 @@ SEI models :members: .. autoclass:: pybamm.sei.SolventDiffusionLimited + :members: + +.. autoclass:: pybamm.sei.EcReactionLimited :members: \ No newline at end of file diff --git a/examples/notebooks/Getting Started/Tutorial 2 - Setting Parameter Values.ipynb b/examples/notebooks/Getting Started/Tutorial 2 - Setting Parameter Values.ipynb index a095dd25bd..c8591cb93d 100644 --- a/examples/notebooks/Getting Started/Tutorial 2 - Setting Parameter Values.ipynb +++ b/examples/notebooks/Getting Started/Tutorial 2 - Setting Parameter Values.ipynb @@ -18,7 +18,15 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], "source": [ "%pip install pybamm -q # install PyBaMM if it is not installed\n", "import pybamm" @@ -93,12 +101,12 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "2237d34280454f28ba40140a92f7504d", + "model_id": "4a4e0be8318b453ea00394c0f5dbdea5", "version_major": 2, "version_minor": 0 }, "text/plain": [ - "interactive(children=(FloatSlider(value=0.0, description='t', max=3599.9999999999995, step=35.99999999999999),…" + "interactive(children=(FloatSlider(value=0.0, description='t', max=1.0, step=0.01), Output()), _dom_classes=('w…" ] }, "metadata": {}, @@ -201,12 +209,12 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "cbf8ad0de78e47f982f27d1e7e64c9c3", + "model_id": "fb29cf7606614252a6a459832fc76c6a", "version_major": 2, "version_minor": 0 }, "text/plain": [ - "interactive(children=(FloatSlider(value=0.0, description='t', max=1747.0357219251337, step=17.470357219251337)…" + "interactive(children=(FloatSlider(value=0.0, description='t', max=1747.0357219251334, step=17.470357219251333)…" ] }, "metadata": {}, @@ -254,7 +262,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -265,22 +273,26 @@ " 'Bulk solvent concentration [mol.m-3]': 2636.0,\n", " 'Cation transference number': 0.4,\n", " 'Cell capacity [A.h]': 0.680616,\n", + " 'Cell cooling surface area [m2]': 0.0569,\n", + " 'Cell volume [m3]': 7.8e-06,\n", " 'Current function [A]': 1.36,\n", + " 'EC diffusivity [m2.s-1]': 2e-18,\n", + " 'EC initial concentration in electrolyte [mol.m-3]': 4541.0,\n", " 'Edge heat transfer coefficient [W.m-2.K-1]': 0.3,\n", " 'Electrode height [m]': 0.13699999999999998,\n", " 'Electrode width [m]': 0.207,\n", - " 'Electrolyte conductivity [S.m-1]': ,\n", - " 'Electrolyte diffusivity [m2.s-1]': ,\n", + " 'Electrolyte conductivity [S.m-1]': ,\n", + " 'Electrolyte diffusivity [m2.s-1]': ,\n", " 'Initial concentration in electrolyte [mol.m-3]': 1000.0,\n", " 'Initial concentration in negative electrode [mol.m-3]': 19986.609595075,\n", " 'Initial concentration in positive electrode [mol.m-3]': 30730.755438556498,\n", - " 'Initial inner SEI thickness [m]': 7.5e-09,\n", - " 'Initial outer SEI thickness [m]': 7.5e-09,\n", + " 'Initial inner SEI thickness [m]': 2.5e-09,\n", + " 'Initial outer SEI thickness [m]': 2.5e-09,\n", " 'Initial temperature [K]': 298.15,\n", " 'Inner SEI electron conductivity [S.m-1]': 8.95e-14,\n", " 'Inner SEI lithium interstitial diffusivity [m2.s-1]': 1.0000000000000001e-20,\n", " 'Inner SEI open-circuit potential [V]': 0.1,\n", - " 'Inner SEI partial molar volume [m3.mol-1]': 3e-06,\n", + " 'Inner SEI partial molar volume [m3.mol-1]': 9.585e-05,\n", " 'Inner SEI reaction proportion': 0.5,\n", " 'Lithium interstitial reference concentration [mol.m-3]': 15.0,\n", " 'Lower voltage cut-off [V]': 3.105,\n", @@ -294,17 +306,17 @@ " 'Negative current collector thickness [m]': 2.5e-05,\n", " 'Negative electrode Bruggeman coefficient (electrode)': 1.5,\n", " 'Negative electrode Bruggeman coefficient (electrolyte)': 1.5,\n", - " 'Negative electrode OCP [V]': ,\n", - " 'Negative electrode OCP entropic change [V.K-1]': ,\n", + " 'Negative electrode OCP [V]': ,\n", + " 'Negative electrode OCP entropic change [V.K-1]': ,\n", " 'Negative electrode active material volume fraction': 0.7,\n", " 'Negative electrode cation signed stoichiometry': -1.0,\n", " 'Negative electrode charge transfer coefficient': 0.5,\n", " 'Negative electrode conductivity [S.m-1]': 100.0,\n", " 'Negative electrode density [kg.m-3]': 1657.0,\n", - " 'Negative electrode diffusivity [m2.s-1]': ,\n", + " 'Negative electrode diffusivity [m2.s-1]': ,\n", " 'Negative electrode double-layer capacity [F.m-2]': 0.2,\n", " 'Negative electrode electrons in reaction': 1.0,\n", - " 'Negative electrode exchange-current density [A.m-2]': ,\n", + " 'Negative electrode exchange-current density [A.m-2]': ,\n", " 'Negative electrode porosity': 0.3,\n", " 'Negative electrode specific heat capacity [J.kg-1.K-1]': 700.0,\n", " 'Negative electrode surface area to volume ratio [m-1]': 180000.0,\n", @@ -319,7 +331,7 @@ " 'Number of cells connected in series to make a battery': 1.0,\n", " 'Number of electrodes connected in parallel to make a cell': 1.0,\n", " 'Outer SEI open-circuit potential [V]': 0.8,\n", - " 'Outer SEI partial molar volume [m3.mol-1]': 3e-06,\n", + " 'Outer SEI partial molar volume [m3.mol-1]': 9.585e-05,\n", " 'Outer SEI solvent diffusivity [m2.s-1]': 2.5000000000000002e-22,\n", " 'Positive current collector conductivity [S.m-1]': 35500000.0,\n", " 'Positive current collector density [kg.m-3]': 2707.0,\n", @@ -329,17 +341,17 @@ " 'Positive current collector thickness [m]': 2.5e-05,\n", " 'Positive electrode Bruggeman coefficient (electrode)': 1.5,\n", " 'Positive electrode Bruggeman coefficient (electrolyte)': 1.5,\n", - " 'Positive electrode OCP [V]': ,\n", - " 'Positive electrode OCP entropic change [V.K-1]': ,\n", + " 'Positive electrode OCP [V]': ,\n", + " 'Positive electrode OCP entropic change [V.K-1]': ,\n", " 'Positive electrode active material volume fraction': 0.7,\n", " 'Positive electrode cation signed stoichiometry': -1.0,\n", " 'Positive electrode charge transfer coefficient': 0.5,\n", " 'Positive electrode conductivity [S.m-1]': 10.0,\n", " 'Positive electrode density [kg.m-3]': 3262.0,\n", - " 'Positive electrode diffusivity [m2.s-1]': ,\n", + " 'Positive electrode diffusivity [m2.s-1]': ,\n", " 'Positive electrode double-layer capacity [F.m-2]': 0.2,\n", " 'Positive electrode electrons in reaction': 1.0,\n", - " 'Positive electrode exchange-current density [A.m-2]': ,\n", + " 'Positive electrode exchange-current density [A.m-2]': ,\n", " 'Positive electrode porosity': 0.3,\n", " 'Positive electrode specific heat capacity [J.kg-1.K-1]': 700.0,\n", " 'Positive electrode surface area to volume ratio [m-1]': 150000.0,\n", @@ -355,8 +367,10 @@ " 'Reference OCP vs SHE in the negative electrode [V]': nan,\n", " 'Reference OCP vs SHE in the positive electrode [V]': nan,\n", " 'Reference temperature [K]': 298.15,\n", + " 'SEI kinetic rate constant [m.s-1]': 1e-12,\n", + " 'SEI open-circuit potential [V]': 0.4,\n", " 'SEI reaction exchange current density [A.m-2]': 1.5e-07,\n", - " 'SEI resistivity [Ohm.m]': 1000000.0,\n", + " 'SEI resistivity [Ohm.m]': 5000000.0,\n", " 'Separator Bruggeman coefficient (electrode)': 1.5,\n", " 'Separator Bruggeman coefficient (electrolyte)': 1.5,\n", " 'Separator density [kg.m-3]': 397.0,\n", @@ -364,12 +378,13 @@ " 'Separator specific heat capacity [J.kg-1.K-1]': 700.0,\n", " 'Separator thermal conductivity [W.m-1.K-1]': 0.16,\n", " 'Separator thickness [m]': 2.5e-05,\n", + " 'Total heat transfer coefficient [W.m-2.K-1]': 10.0,\n", " 'Typical current [A]': 0.680616,\n", " 'Typical electrolyte concentration [mol.m-3]': 1000.0,\n", " 'Upper voltage cut-off [V]': 4.7}" ] }, - "execution_count": 13, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -387,15 +402,16 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Electrolyte conductivity [S.m-1]\t\n", - "Electrolyte diffusivity [m2.s-1]\t\n", + "EC initial concentration in electrolyte [mol.m-3]\t4541.0\n", + "Electrolyte conductivity [S.m-1]\t\n", + "Electrolyte diffusivity [m2.s-1]\t\n", "Initial concentration in electrolyte [mol.m-3]\t1000.0\n", "Negative electrode Bruggeman coefficient (electrolyte)\t1.5\n", "Positive electrode Bruggeman coefficient (electrolyte)\t1.5\n", @@ -432,7 +448,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.7.7" } }, "nbformat": 4, diff --git a/examples/notebooks/models/lead-acid.ipynb b/examples/notebooks/models/lead-acid.ipynb index aa9ff2db39..1165b35365 100644 --- a/examples/notebooks/models/lead-acid.ipynb +++ b/examples/notebooks/models/lead-acid.ipynb @@ -13,7 +13,7 @@ "source": [ "We compare a standard porous-electrode model for lead-acid batteries with two asymptotic reductions. For a more in-depth introduction to PyBaMM models, see the [SPM notebook](./SPM.ipynb). Further details on the models can be found in [[1]](#ref)\n", "\n", - "[1] Sulzer, Valentin, S. Jon Chapman, Colin P. Please, David A. Howey, and Charles W. Monroe. \"Faster Lead-Acid Battery Simulations from Porous-Electrode Theory: II. Asymptotic Analysis.\" arXiv preprint arXiv:1902.01774 (2019)." + "[1] Sulzer, V., Chapman, S. J., Please, C. P., Howey, D. A., & Monroe, C. W. (2019). “Faster Lead-Acid Battery Simulations from Porous Electrode Theory: II. Asymptotic Analysis”. Journal of The Electrochemical Society, 166(12), A2372-A2382." ] }, { @@ -430,4 +430,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file diff --git a/examples/notebooks/using-model-options_thermal-example.ipynb b/examples/notebooks/using-model-options_thermal-example.ipynb index 0d05ccbcb2..09c52dc6f8 100644 --- a/examples/notebooks/using-model-options_thermal-example.ipynb +++ b/examples/notebooks/using-model-options_thermal-example.ipynb @@ -186,7 +186,7 @@ "metadata": {}, "source": [ "## References\n", - "[1] SG Marquis, V Sulzer, R Timms, CP Please and SJ Chapman. “An asymptotic derivation of a single particle model with electrolyte”. In: arXiv preprint arXiv:1905.12553 (2019)." + "[1] Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. " ] }, { @@ -218,4 +218,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file diff --git a/examples/notebooks/using-submodels.ipynb b/examples/notebooks/using-submodels.ipynb index e78e7c6bf5..3c71bec1fa 100644 --- a/examples/notebooks/using-submodels.ipynb +++ b/examples/notebooks/using-submodels.ipynb @@ -590,7 +590,7 @@ "metadata": {}, "source": [ "## References\n", - "[1] SG Marquis, V Sulzer, R Timms, CP Please and SJ Chapman. “An asymptotion derivation of a single particle model with electrolyte”. In: arXiv preprint arXiv:1905.12553 (2019).\n", + "[1] Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706.\n", "\n", "[2] M Doyle, TF Fuller and J Newman. \"Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell.\" Journal of the Electrochemical Society 140.6 (1993): 1526-1533." ] @@ -624,4 +624,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file diff --git a/examples/scripts/cycling_ageing_yang.py b/examples/scripts/cycling_ageing_yang.py new file mode 100644 index 0000000000..e82d3f4e38 --- /dev/null +++ b/examples/scripts/cycling_ageing_yang.py @@ -0,0 +1,51 @@ +import pybamm as pb + +pb.set_logging_level("INFO") +options = {"sei": "ec reaction limited", "sei porosity change": True} +param = pb.ParameterValues(chemistry=pb.parameter_sets.Ramadass2004) +model = pb.lithium_ion.DFN(options) +experiment = pb.Experiment( + [ + "Charge at 1 C until 4.2 V", + "Hold at 4.2 V until C/10", + "Rest for 5 minutes", + "Discharge at 2 C until 2.8 V", + "Rest for 5 minutes", + ] + * 2 + + [ + "Charge at 1 C until 4.2 V", + "Hold at 4.2 V until C/20", + "Rest for 30 minutes", + "Discharge at C/3 until 2.8 V", + "Charge at 1 C until 4.2 V", + "Hold at 4.2 V until C/20", + "Rest for 30 minutes", + "Discharge at 1 C until 2.8 V", + "Charge at 1 C until 4.2 V", + "Hold at 4.2 V until C/20", + "Rest for 30 minutes", + "Discharge at 2 C until 2.8 V", + "Charge at 1 C until 4.2 V", + "Hold at 4.2 V until C/20", + "Rest for 30 minutes", + "Discharge at 3 C until 2.8 V", + ] +) +sim = pb.Simulation(model, experiment=experiment, parameter_values=param) +sim.solve(solver=pb.CasadiSolver(mode="safe", dt_max=120)) +sim.plot( + [ + "Current [A]", + "Total current density [A.m-2]", + "Terminal voltage [V]", + "Discharge capacity [A.h]", + "Electrolyte potential [V]", + "Electrolyte concentration [mol.m-3]", + "Total negative electrode sei thickness", + "Negative electrode porosity", + "X-averaged negative electrode porosity", + "Negative electrode sei interfacial current density [A.m-2]", + "X-averaged total negative electrode sei thickness [m]", + ] +) diff --git a/pybamm/__init__.py b/pybamm/__init__.py index 9c16b3b551..8e5b2074d1 100644 --- a/pybamm/__init__.py +++ b/pybamm/__init__.py @@ -162,7 +162,6 @@ def version(formatted=False): from .parameters import electrical_parameters from .parameters import thermal_parameters from .parameters import standard_parameters_lithium_ion, standard_parameters_lead_acid -from .parameters import sei_parameters from .parameters import parameter_sets diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/README.md b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/README.md new file mode 100644 index 0000000000..5a0c1106ea --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/README.md @@ -0,0 +1,8 @@ +# Graphite anode parameters + +Parameters for a graphite anode, from the paper + +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. +> P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko N. Popov.["Development of First Principles Capacity Fade Model for Li-Ion Cells."](https://scholarcommons.sc.edu/cgi/viewcontent.cgi?article=1161&context=eche_facpub) (2004) + +and references therein. diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_electrolyte_exchange_current_density_Ramadass2004.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_electrolyte_exchange_current_density_Ramadass2004.py new file mode 100644 index 0000000000..8afd798fdc --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_electrolyte_exchange_current_density_Ramadass2004.py @@ -0,0 +1,37 @@ +from pybamm import exp, constants, standard_parameters_lithium_ion + + +def graphite_electrolyte_exchange_current_density_Ramadass2004(c_e, c_s_surf, T): + """ + Exchange-current density for Butler-Volmer reactions between graphite and LiPF6 in + EC:DMC. + + References + ---------- + .. [1] P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko + N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." + (2004) + + Parameters + ---------- + c_e : :class:`pybamm.Symbol` + Electrolyte concentration [mol.m-3] + c_s_surf : :class:`pybamm.Symbol` + Particle concentration [mol.m-3] + T : :class:`pybamm.Symbol` + Temperature [K] + + Returns + ------- + :class:`pybamm.Symbol` + Exchange-current density [A.m-2] + """ + m_ref = 4.854 * 10 ** (-6) # (A/m2)(mol/m3)**1.5 + E_r = 37480 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) + + c_n_max = standard_parameters_lithium_ion.c_n_max + + return ( + m_ref * arrhenius * c_e ** 0.5 * c_s_surf ** 0.5 * (c_n_max - c_s_surf) ** 0.5 + ) diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_entropic_change_Moura2016.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_entropic_change_Moura2016.py new file mode 100644 index 0000000000..f0f1f11ee2 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_entropic_change_Moura2016.py @@ -0,0 +1,33 @@ +from pybamm import exp, cosh + + +def graphite_entropic_change_Moura2016(sto, c_n_max): + """ + Graphite entropic change in open circuit potential (OCP) at a temperature of + 298.15K as a function of the stochiometry taken from Scott Moura's FastDFN code + [1]. + + References + ---------- + .. [1] https://github.com/scott-moura/fastDFN + + Parameters + ---------- + sto : :class:`pybamm.Symbol` + Stochiometry of material (li-fraction) + + """ + + du_dT = ( + -1.5 * (120.0 / c_n_max) * exp(-120 * sto) + + (0.0351 / (0.083 * c_n_max)) * ((cosh((sto - 0.286) / 0.083)) ** (-2)) + - (0.0045 / (0.119 * c_n_max)) * ((cosh((sto - 0.849) / 0.119)) ** (-2)) + - (0.035 / (0.05 * c_n_max)) * ((cosh((sto - 0.9233) / 0.05)) ** (-2)) + - (0.0147 / (0.034 * c_n_max)) * ((cosh((sto - 0.5) / 0.034)) ** (-2)) + - (0.102 / (0.142 * c_n_max)) * ((cosh((sto - 0.194) / 0.142)) ** (-2)) + - (0.022 / (0.0164 * c_n_max)) * ((cosh((sto - 0.9) / 0.0164)) ** (-2)) + - (0.011 / (0.0226 * c_n_max)) * ((cosh((sto - 0.124) / 0.0226)) ** (-2)) + + (0.0155 / (0.029 * c_n_max)) * ((cosh((sto - 0.105) / 0.029)) ** (-2)) + ) + + return du_dT diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_mcmb2528_diffusivity_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_mcmb2528_diffusivity_Dualfoil1998.py new file mode 100644 index 0000000000..a4ec9f9f6d --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_mcmb2528_diffusivity_Dualfoil1998.py @@ -0,0 +1,30 @@ +from pybamm import exp, constants + + +def graphite_mcmb2528_diffusivity_Dualfoil1998(sto, T): + """ + Graphite MCMB 2528 diffusivity as a function of stochiometry, in this case the + diffusivity is taken to be a constant. The value is taken from Dualfoil [1]. + + References + ---------- + .. [1] http://www.cchem.berkeley.edu/jsngrp/fortran.html + + Parameters + ---------- + sto: :class:`pybamm.Symbol` + Electrode stochiometry + T: :class:`pybamm.Symbol` + Dimensional temperature + + Returns + ------- + :class:`pybamm.Symbol` + Solid diffusivity + """ + + D_ref = 3.9 * 10 ** (-14) + E_D_s = 42770 + arrhenius = exp(E_D_s / constants.R * (1 / 298.15 - 1 / T)) + + return D_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_ocp_Ramadass2004.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_ocp_Ramadass2004.py new file mode 100644 index 0000000000..32f7f6ca7d --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/graphite_ocp_Ramadass2004.py @@ -0,0 +1,26 @@ +from pybamm import exp + + +def graphite_ocp_Ramadass2004(sto): + """ + Graphite Open Circuit Potential (OCP) as a function of the + stochiometry (theta?). The fit is taken from Ramadass 2004. + + References + ---------- + .. [1] P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko + N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." + (2004) + """ + + u_eq = ( + 0.7222 + + 0.1387 * sto + + 0.029 * (sto ** 0.5) + - 0.0172 / sto + + 0.0019 / (sto ** 1.5) + + 0.2808 * exp(0.9 - 15 * sto) + - 0.7984 * exp(0.4465 * sto - 0.4108) + ) + + return u_eq diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/parameters.csv new file mode 100644 index 0000000000..9661945ee8 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ramadass2004/parameters.csv @@ -0,0 +1,33 @@ +Name [units],Value,Reference,Notes +# Empty rows and rows starting with ‘#’ will be ignored,,, +,,, +# Electrode properties,,, +Negative electrode conductivity [S.m-1],100,Ramadass,graphite +Maximum concentration in negative electrode [mol.m-3],30555,Ramadass, +Negative electrode diffusivity [m2.s-1],[function]graphite_mcmb2528_diffusivity_Dualfoil1998,Also valid for Ramadass, +Negative electrode OCP [V],[function]graphite_ocp_Ramadass2004, +,,, +# Microstructure,,, +Negative electrode porosity,0.485,Ramadass,electrolyte volume fraction +Negative electrode active material volume fraction,0.49,Ramadass, +Negative particle radius [m],2e-06,Ramadass, +Negative particle distribution in x,1,, +Negative electrode surface area to volume ratio [m-1],735000, 3eps.radi-1, +Negative electrode Bruggeman coefficient (electrolyte),4,Guess, +Negative electrode Bruggeman coefficient (electrode),4,Ramadass, +,,, +# Interfacial reactions,,, +Negative electrode cation signed stoichiometry,-1,, +Negative electrode electrons in reaction,1,, +Reference OCP vs SHE in the negative electrode [V],,, +Negative electrode charge transfer coefficient,0.5,Ramadass, +Negative electrode double-layer capacity [F.m-2],0.2,, +Negative electrode exchange-current density [A.m-2],[function]graphite_electrolyte_exchange_current_density_Ramadass2004,, +,,, +# Density,,, +Negative electrode density [kg.m-3],1657,, +,,, +# Thermal parameters,,, +Negative electrode specific heat capacity [J.kg-1.K-1],700,, +Negative electrode thermal conductivity [W.m-1.K-1],1.7,, +Negative electrode OCP entropic change [V.K-1],[function]graphite_entropic_change_Moura2016,, diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/README.md b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/README.md index 3143170e49..9a5e932e56 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/README.md +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/README.md @@ -2,6 +2,6 @@ Parameters for a graphite MCMB 2528 anode, from the paper -> Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. "An asymptotic derivation of a single particle model with electrolyte." [arXiv preprint arXiv:1905.12553](https://arxiv.org/abs/1905.12553) (2019). +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. and references therein. diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/README.md b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/README.md index 1dff74a5c9..a2e1db7dd0 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/README.md +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/README.md @@ -2,6 +2,6 @@ Parameters for a lithium Cobalt Oxide cathode, from the paper -> Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. "An asymptotic derivation of a single particle model with electrolyte." [arXiv preprint arXiv:1905.12553](https://arxiv.org/abs/1905.12553) (2019). +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. and references therein. diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/README.md b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/README.md new file mode 100644 index 0000000000..a41e8d2de2 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/README.md @@ -0,0 +1,8 @@ +# Lithium Cobalt Oxide cathode parameters + +Parameters for a lithium Cobalt Oxide cathode, from the paper + +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. +> P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." (2004) + +and references therein. diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_diffusivity_Ramadass2004.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_diffusivity_Ramadass2004.py new file mode 100644 index 0000000000..7411432e06 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_diffusivity_Ramadass2004.py @@ -0,0 +1,31 @@ +from pybamm import exp, constants + + +def lico2_diffusivity_Ramadass2004(sto, T): + """ + LiCo2 diffusivity as a function of stochiometry, in this case the + diffusivity is taken to be a constant. The value is taken from Ramadass 2004. + + References + ---------- + .. [1] P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko + N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." + (2004) + + Parameters + ---------- + sto: :class:`pybamm.Symbol` + Electrode stochiometry + T: :class:`pybamm.Symbol` + Dimensional temperature + + Returns + ------- + :class:`pybamm.Symbol` + Solid diffusivity + """ + D_ref = 1 * 10 ** (-14) + E_D_s = 18550 + arrhenius = exp(E_D_s / constants.R * (1 / 298.15 - 1 / T)) + + return D_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_electrolyte_exchange_current_density_Ramadass2004.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_electrolyte_exchange_current_density_Ramadass2004.py new file mode 100644 index 0000000000..d6a4fb50fa --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_electrolyte_exchange_current_density_Ramadass2004.py @@ -0,0 +1,37 @@ +from pybamm import exp, constants, standard_parameters_lithium_ion + + +def lico2_electrolyte_exchange_current_density_Ramadass2004(c_e, c_s_surf, T): + """ + Exchange-current density for Butler-Volmer reactions between lico2 and LiPF6 in + EC:DMC. + + References + ---------- + .. [1] P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko + N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." + (2004) + + Parameters + ---------- + c_e : :class:`pybamm.Symbol` + Electrolyte concentration [mol.m-3] + c_s_surf : :class:`pybamm.Symbol` + Particle concentration [mol.m-3] + T : :class:`pybamm.Symbol` + Temperature [K] + + Returns + ------- + :class:`pybamm.Symbol` + Exchange-current density [A.m-2] + """ + m_ref = 2.252 * 10 ** (-6) # (A/m2)(mol/m3)**1.5 + E_r = 39570 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) + + c_p_max = standard_parameters_lithium_ion.c_p_max + + return ( + m_ref * arrhenius * c_e ** 0.5 * c_s_surf ** 0.5 * (c_p_max - c_s_surf) ** 0.5 + ) diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_entropic_change_Moura2016.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_entropic_change_Moura2016.py new file mode 100644 index 0000000000..9f3baeb4e6 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_entropic_change_Moura2016.py @@ -0,0 +1,35 @@ +from pybamm import cosh + + +def lico2_entropic_change_Moura2016(sto, c_p_max): + """ + Lithium Cobalt Oxide (LiCO2) entropic change in open circuit potential (OCP) at + a temperature of 298.15K as a function of the stochiometry. The fit is taken + from Scott Moura's FastDFN code [1]. + + References + ---------- + .. [1] https://github.com/scott-moura/fastDFN + + Parameters + ---------- + sto : :class:`pybamm.Symbol` + Stochiometry of material (li-fraction) + + """ + + # Since the equation for LiCo2 from this ref. has the stretch factor, + # should this too? If not, the "bumps" in the OCV don't line up. + stretch = 1.062 + sto = stretch * sto + + du_dT = ( + 0.07645 * (-54.4806 / c_p_max) * ((1.0 / cosh(30.834 - 54.4806 * sto)) ** 2) + + 2.1581 * (-50.294 / c_p_max) * ((cosh(52.294 - 50.294 * sto)) ** (-2)) + + 0.14169 * (19.854 / c_p_max) * ((cosh(11.0923 - 19.8543 * sto)) ** (-2)) + - 0.2051 * (5.4888 / c_p_max) * ((cosh(1.4684 - 5.4888 * sto)) ** (-2)) + - (0.2531 / 0.1316 / c_p_max) * ((cosh((-sto + 0.56478) / 0.1316)) ** (-2)) + - (0.02167 / 0.006 / c_p_max) * ((cosh((sto - 0.525) / 0.006)) ** (-2)) + ) + + return du_dT diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_ocp_Ramadass2004.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_ocp_Ramadass2004.py new file mode 100644 index 0000000000..7a5e34a622 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/lico2_ocp_Ramadass2004.py @@ -0,0 +1,32 @@ + +def lico2_ocp_Ramadass2004(sto): + """ + Lithium Cobalt Oxide (LiCO2) Open Circuit Potential (OCP) as a a function of the + stochiometry. The fit is taken from Ramadass 2004. Stretch is considered the + overhang area negative electrode / area positive electrode, in Ramadass 2002. + + References + ---------- + .. [1] P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko + N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." + (2004) + + Parameters + ---------- + sto : :class:`pybamm.Symbol` + Stochiometry of material (li-fraction) + + """ + + stretch = 1.13 + sto = stretch * sto + + u_eq = ((- 4.656 + 88.669 * (sto ** 2) + - 401.119 * (sto ** 4) + 342.909 * (sto ** 6) + - 462.471 * (sto ** 8) + 433.434 * (sto ** 10)) / ( + - 1 + 18.933 * (sto ** 2) - 79.532 * (sto ** 4) + + 37.311 * (sto ** 6) - 73.083 * (sto ** 8) + + 95.96 * (sto ** 10)) + ) + + return u_eq diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/parameters.csv new file mode 100644 index 0000000000..5691350e9f --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Ramadass2004/parameters.csv @@ -0,0 +1,33 @@ +Name [units],Value,Reference,Notes +# Empty rows and rows starting with ‘#’ will be ignored,,, +,,, +# Electrode properties,,, +Positive electrode conductivity [S.m-1],100,Ramadass,lithium cobalt oxide +Maximum concentration in positive electrode [mol.m-3],51555,Ramadass, +Positive electrode diffusivity [m2.s-1],[function]lico2_diffusivity_Ramadass2004,, +Positive electrode OCP [V],[function]lico2_ocp_Ramadass2004,, +,,, +# Microstructure,,, +Positive electrode porosity,0.385,Ramadass,electrolyte volume fraction +Positive electrode active material volume fraction,0.59,Ramadass, +Positive particle radius [m],2e-06,Ramadass, +Positive particle distribution in x,1,, +Positive electrode surface area to volume ratio [m-1],885000,3eps.radi-1, +Positive electrode Bruggeman coefficient (electrolyte),4,Ramadass, +Positive electrode Bruggeman coefficient (electrode),4,Ramadass, +,,, +# Interfacial reactions,,, +Positive electrode cation signed stoichiometry,-1,, +Positive electrode electrons in reaction,1,, +Reference OCP vs SHE in the positive electrode [V],,, +Positive electrode charge transfer coefficient,0.5,Ramadass, +Positive electrode double-layer capacity [F.m-2],0.2,, +Positive electrode exchange-current density [A.m-2],[function]lico2_electrolyte_exchange_current_density_Ramadass2004,, +,,, +# Density,,, +Positive electrode density [kg.m-3],3262,, +,,, +# Thermal parameters,,, +Positive electrode specific heat capacity [J.kg-1.K-1],700,, +Positive electrode thermal conductivity [W.m-1.K-1],2.1,, +Positive electrode OCP entropic change [V.K-1],[function]lico2_entropic_change_Moura2016,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium-ion/cells/kokam_Marquis2019/README.md b/pybamm/input/parameters/lithium-ion/cells/kokam_Marquis2019/README.md index dd2c0c31de..180d074882 100644 --- a/pybamm/input/parameters/lithium-ion/cells/kokam_Marquis2019/README.md +++ b/pybamm/input/parameters/lithium-ion/cells/kokam_Marquis2019/README.md @@ -2,6 +2,6 @@ Parameters for a Kokam SLPB78205130H cell, from the paper -> Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. "An asymptotic derivation of a single particle model with electrolyte." [arXiv preprint arXiv:1905.12553](https://arxiv.org/abs/1905.12553) (2019). +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. and references therein. diff --git a/pybamm/input/parameters/lithium-ion/cells/sony_Ramadass2004/README.md b/pybamm/input/parameters/lithium-ion/cells/sony_Ramadass2004/README.md new file mode 100644 index 0000000000..21bf3ef444 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/cells/sony_Ramadass2004/README.md @@ -0,0 +1,9 @@ +# Cell geometry parameters + +Parameters for a lithium Cobalt Oxide cathode, from the paper + +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. +> P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." (2004) +> P. Ramadass, Bala Haran, Ralph White, and Branko N. Popov. "Capacity fade of Sony 18650 cells cycled at elevated temperatures part I." (2002) + +and references therein. diff --git a/pybamm/input/parameters/lithium-ion/cells/sony_Ramadass2004/parameters.csv b/pybamm/input/parameters/lithium-ion/cells/sony_Ramadass2004/parameters.csv new file mode 100644 index 0000000000..8fe2b8ba77 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/cells/sony_Ramadass2004/parameters.csv @@ -0,0 +1,38 @@ +Name [units],Value,Reference,Notes +# Empty rows and rows starting with ‘#’ will be ignored,,, +,,, +# Macroscale geometry,,, +Negative current collector thickness [m],1.7E-05,Ramadass 2002, +Negative electrode thickness [m],8.8e-05,Ramadass, +Separator thickness [m],2.5E-05,Scott Moura FastDFN, +Positive electrode thickness [m],8e-05,Ramadass, +Positive current collector thickness [m],2.3E-05,Ramadass 2002, +Electrode height [m],0.057,Ramadass 2002 negative electrode,Not needed for 1D +Electrode width [m],1.060692,Ramadass 2002 negative electrode twice ,Not needed for 1D +Negative tab width [m],0.04,,Need to find actual value for KOKAM cell +Negative tab centre y-coordinate [m],0.06,,Need to find actual value for KOKAM cell +Negative tab centre z-coordinate [m],0.137,,Need to find actual value for KOKAM cell +Positive tab width [m],0.04,,Need to find actual value for KOKAM cell +Positive tab centre y-coordinate [m],0.147,,Need to find actual value for KOKAM cell +Positive tab centre z-coordinate [m],0.137,,Need to find actual value for KOKAM cell +,,, +# Current collector properties ,,, +Negative current collector conductivity [S.m-1],59600000,LIONSIMBA,carbon +Positive current collector conductivity [S.m-1],35500000,LIONSIMBA,aluminium +,,, +# Density,,, +Negative current collector density [kg.m-3],8954,, +Positive current collector density [kg.m-3],2707,, +,,, +# Specific heat capacity,,, +Negative current collector specific heat capacity [J.kg-1.K-1],385,, +Positive current collector specific heat capacity [J.kg-1.K-1],897,, +,,, +# Thermal conductivity,,, +Negative current collector thermal conductivity [W.m-1.K-1],401,, +Positive current collector thermal conductivity [W.m-1.K-1],237,, +,,, +# Electrical,,, +Cell capacity [A.h],1,,16.54 Ah/m2 * 0.057m * 1.06m +Typical current [A],1,,1C current +Current function [A],1,default current function, diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/README.md b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/README.md index f6cacb668d..07936c3d92 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/README.md +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/README.md @@ -2,6 +2,6 @@ Parameters for a LiPF6 electrolyte, from the paper -> Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. "An asymptotic derivation of a single particle model with electrolyte." [arXiv preprint arXiv:1905.12553](https://arxiv.org/abs/1905.12553) (2019). +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. and references therein. diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/README.md b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/README.md new file mode 100644 index 0000000000..b7cef62955 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/README.md @@ -0,0 +1,8 @@ +# LiPF6 electrolyte parameters + +Parameters for a LiPF6 electrolyte, from the paper + +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. +> P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." (2004) + +and references therein. diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/electrolyte_conductivity_Ramadass2004.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/electrolyte_conductivity_Ramadass2004.py new file mode 100644 index 0000000000..a3ffb2fa60 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/electrolyte_conductivity_Ramadass2004.py @@ -0,0 +1,43 @@ +from pybamm import exp, constants + + +def electrolyte_conductivity_Ramadass2004(c_e, T): + """ + Conductivity of LiPF6 in EC:DMC as a function of ion concentration. + Concentration should be in dm3 in the function. + + References + ---------- + .. [1] P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko + N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." + (2004) + + Parameters + ---------- + c_e: :class:`pybamm.Symbol` + Dimensional electrolyte concentration + T: :class:`pybamm.Symbol` + Dimensional temperature + + Returns + ------- + :class:`pybamm.Symbol` + Solid diffusivity + """ + # mol.m-3 to mol.dm-3, original function is likely in mS/cm + # The function is not in Arora 2000 as reported in Ramadass 2004 + + cm = 1e-6 * c_e # here it should be only 1e-3 + + sigma_e = ( + 4.1253 * (10 ** (-4)) + + 5.007 * cm + - 4.7212 * (10 ** 3) * (cm ** 2) + + 1.5094 * (10 ** 6) * (cm ** 3) + - 1.6018 * (10 ** 8) * (cm ** 4) + ) * 1e3 # and here there should not be an exponent + + E_k_e = 34700 + arrhenius = exp(E_k_e / constants.R * (1 / 298.15 - 1 / T)) + + return sigma_e * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/electrolyte_diffusivity_Ramadass2004.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/electrolyte_diffusivity_Ramadass2004.py new file mode 100644 index 0000000000..22134a70b7 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/electrolyte_diffusivity_Ramadass2004.py @@ -0,0 +1,32 @@ +from pybamm import exp, constants + + +def electrolyte_diffusivity_Ramadass2004(c_e, T): + """ + Diffusivity of LiPF6 in EC:DMC as a function of ion concentration. + + References + ---------- + .. [1] P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko + N. Popov. "Development of First Principles Capacity Fade Model for Li-Ion Cells." + (2004) + + Parameters + ---------- + c_e: :class:`pybamm.Symbol` + Dimensional electrolyte concentration + T: :class:`pybamm.Symbol` + Dimensional temperature + + + Returns + ------- + :class:`pybamm.Symbol` + Solid diffusivity + """ + + D_c_e = 7.5e-10 + E_D_e = 37040 + arrhenius = exp(E_D_e / constants.R * (1 / 298.15 - 1 / T)) + + return D_c_e * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/parameters.csv new file mode 100644 index 0000000000..c10a6d80d8 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ramadass2004/parameters.csv @@ -0,0 +1,9 @@ +Name [units],Value,Reference,Notes +# Empty rows and rows starting with ‘#’ will be ignored,,, +,,, +# Electrolyte properties,,, +Typical electrolyte concentration [mol.m-3],1000,Ramadass, +Cation transference number,0.363,Ramadass, +1 + dlnf/dlnc,1,, +Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Ramadass2004,, +Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Ramadass2004,, diff --git a/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Marquis2019/README.md b/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Marquis2019/README.md index 5c58bcb05e..c53a2fc2c6 100644 --- a/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Marquis2019/README.md +++ b/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Marquis2019/README.md @@ -2,6 +2,6 @@ Discharge lithium-ion battery from full charge at 1C, using the initial conditions from the paper -> Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. "An asymptotic derivation of a single particle model with electrolyte." [arXiv preprint arXiv:1905.12553](https://arxiv.org/abs/1905.12553) (2019). +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. and references therein. diff --git a/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Ramadass2004/README.md b/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Ramadass2004/README.md new file mode 100644 index 0000000000..c53a2fc2c6 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Ramadass2004/README.md @@ -0,0 +1,7 @@ +# 1C discharge from full + +Discharge lithium-ion battery from full charge at 1C, using the initial conditions from the paper + +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. + +and references therein. diff --git a/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Ramadass2004/parameters.csv b/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Ramadass2004/parameters.csv new file mode 100644 index 0000000000..a8f6d93a75 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/experiments/1C_discharge_from_full_Ramadass2004/parameters.csv @@ -0,0 +1,23 @@ +Name [units],Value,Reference,Notes +# Empty rows and rows starting with ‘#’ will be ignored,,, +,,, +# Temperature +Reference temperature [K],298.15,25C, +Ambient temperature [K], 298.15,, +Negative current collector surface heat transfer coefficient [W.m-2.K-1],0,, +Positive current collector surface heat transfer coefficient [W.m-2.K-1],0,, +Negative tab heat transfer coefficient [W.m-2.K-1],10,, +Positive tab heat transfer coefficient [W.m-2.K-1],10,, +Edge heat transfer coefficient [W.m-2.K-1],0.3,, +,,, +# Electrical +Number of electrodes connected in parallel to make a cell,1,, +Number of cells connected in series to make a battery,1,, +Lower voltage cut-off [V],2,, +Upper voltage cut-off [V],4.3,, +,,, +# Initial conditions +Initial concentration in negative electrode [mol.m-3],22610.7,Ramadass 2002, +Initial concentration in positive electrode [mol.m-3],25777.5,Ramadass 2002, +Initial concentration in electrolyte [mol.m-3],1000,Ramadass, +Initial temperature [K],298.15,, diff --git a/pybamm/input/parameters/lithium-ion/seis/example/README.md b/pybamm/input/parameters/lithium-ion/seis/example/README.md index c4ab1b1f59..3c63aa585e 100644 --- a/pybamm/input/parameters/lithium-ion/seis/example/README.md +++ b/pybamm/input/parameters/lithium-ion/seis/example/README.md @@ -5,5 +5,7 @@ Some example parameters for SEI growth from the papers: > Ramadass, P., Haran, B., Gomadam, P. M., White, R., & Popov, B. N. (2004). Development of first principles capacity fade model for Li-ion cells. Journal of the Electrochemical Society, 151(2), A196-A203. > Ploehn, H. J., Ramadass, P., & White, R. E. (2004). Solvent diffusion model for aging of lithium-ion battery cells. Journal of The Electrochemical Society, 151(3), A456-A462. > Single, F., Latz, A., & Horstmann, B. (2018). Identifying the mechanism of continued growth of the solid–electrolyte interphase. ChemSusChem, 11(12), 1950-1955. +> Safari, M., Morcrette, M., Teyssot, A., & Delacour, C. (2009). Multimodal Physics-Based Aging Model for Life Prediction of Li-Ion Batteries. Journal of The Electrochemical Society, 156(3), +> Yang, X., Leng, Y., Zhang, G., Ge, S., Wang, C. (2017). Modeling of lithium plating induced aging of lithium-ion batteries: Transition from linear to nonlinear aging. Journal of Power Sources, 360, 28-40. Note: this parameter set does not claim to be representative of the true parameter values. Instead these are parameter values that were used to fit SEI models to observed experimental data in the referenced papers. diff --git a/pybamm/input/parameters/lithium-ion/seis/example/parameters.csv b/pybamm/input/parameters/lithium-ion/seis/example/parameters.csv index 63fe096c5f..4477ef09f9 100644 --- a/pybamm/input/parameters/lithium-ion/seis/example/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/seis/example/parameters.csv @@ -3,10 +3,10 @@ Name [units],Value,Reference,Notes ,,, # SEI properties,,, Inner SEI reaction proportion,0.5,, -Inner SEI partial molar volume [m3.mol-1],3e-6, Guess, -Outer SEI partial molar volume [m3.mol-1],3e-6, Guess, +Inner SEI partial molar volume [m3.mol-1],9.585e-5, Safari paper, +Outer SEI partial molar volume [m3.mol-1],9.585e-5, Safari paper, SEI reaction exchange current density [A.m-2],1.5E-7, Guess, -SEI resistivity [Ohm.m],1e6,Guess,check Ramadass +SEI resistivity [Ohm.m],5E6, Safari paper, Outer SEI solvent diffusivity [m2.s-1],2.5E-22, Single paper, Bulk solvent concentration [mol.m-3],2.636E3, Ploehn paper, Ratio of inner and outer SEI exchange current densities,1, Assume same, @@ -15,5 +15,10 @@ Outer SEI open-circuit potential [V],0.8,, Inner SEI electron conductivity [S.m-1],8.95E-14, Single paper, Inner SEI lithium interstitial diffusivity [m2.s-1],1E-20, Guess, Lithium interstitial reference concentration [mol.m-3],15, Single paper, -Initial inner SEI thickness [m], 7.5E-9, 7.5E-9 1/2 of initial thickness in Single paper, -Initial outer SEI thickness [m], 7.5E-9, 1/2 of initial thickness in Single paper, \ No newline at end of file +Initial inner SEI thickness [m], 2.5E-9, 2.5E-9 1/2 of initial thickness in Safari paper, +Initial outer SEI thickness [m], 2.5E-9, 1/2 of initial thickness in Safari paper, +EC initial concentration in electrolyte [mol.m-3], 4.541E3, Safari paper, +EC diffusivity [m2.s-1], 2E-18, adjusted parameter in Yang paper, +SEI kinetic rate constant [m.s-1], 1e-12, adjusted parameter in Yang paper, +SEI open-circuit potential [V], 0.4, Safari paper, + diff --git a/pybamm/input/parameters/lithium-ion/seis/ramadass2004/README.md b/pybamm/input/parameters/lithium-ion/seis/ramadass2004/README.md new file mode 100644 index 0000000000..6a149387c6 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/seis/ramadass2004/README.md @@ -0,0 +1,8 @@ +# SEI parameters + +Some example parameters for SEI growth from the papers: + +> Ramadass, P., Haran, B., Gomadam, P. M., White, R., & Popov, B. N. (2004). Development of first principles capacity fade model for Li-ion cells. Journal of the Electrochemical Society, 151(2), A196-A203. +> Safari, M., Morcrette, M., Teyssot, A., & Delacour, C. (2009). Multimodal Physics-Based Aging Model for Life Prediction of Li-Ion Batteries. Journal of The Electrochemical Society, 156(3), + +Note: Ramadass 2004 has mistakes in units and values of SEI parameters, corrected by Safari 2009. diff --git a/pybamm/input/parameters/lithium-ion/seis/ramadass2004/parameters.csv b/pybamm/input/parameters/lithium-ion/seis/ramadass2004/parameters.csv new file mode 100644 index 0000000000..9157f6b795 --- /dev/null +++ b/pybamm/input/parameters/lithium-ion/seis/ramadass2004/parameters.csv @@ -0,0 +1,24 @@ +Name [units],Value,Reference,Notes +# Empty rows and rows starting with ‘#’ will be ignored,,, +,,, +# SEI properties,,, +Inner SEI reaction proportion,0.5,, +Inner SEI partial molar volume [m3.mol-1],9.585e-5, Safari 2009, +Outer SEI partial molar volume [m3.mol-1],9.585e-5, Safari 2009, +SEI reaction exchange current density [A.m-2],1.5e-6, Ramadass 2004, +SEI resistivity [Ohm.m],5e6, Safari 2009, +Outer SEI solvent diffusivity [m2.s-1],2.5E-22, Single paper, +Bulk solvent concentration [mol.m-3],2.636E3, Ploehn paper, +Ratio of inner and outer SEI exchange current densities,1, Assume same, +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, Single paper, +Inner SEI lithium interstitial diffusivity [m2.s-1],1E-20, Guess, +Lithium interstitial reference concentration [mol.m-3],15, Single paper, +Initial inner SEI thickness [m], 2.5E-9, 2.5E-9 1/2 of initial thickness in Safari paper, +Initial outer SEI thickness [m], 2.5E-9, 1/2 of initial thickness in Safari paper, +EC initial concentration in electrolyte [mol.m-3], 4.541e3, Safari paper, +EC diffusivity [m2.s-1], 2e-18, adjusted parameter in Yang paper, +SEI kinetic rate constant [m.s-1], 1e-12, adjusted parameter in Yang paper, +SEI open-circuit potential [V], 0, Estimated, + diff --git a/pybamm/input/parameters/lithium-ion/separators/separator_Marquis2019/README.md b/pybamm/input/parameters/lithium-ion/separators/separator_Marquis2019/README.md index 8862a317b4..12cddf213e 100644 --- a/pybamm/input/parameters/lithium-ion/separators/separator_Marquis2019/README.md +++ b/pybamm/input/parameters/lithium-ion/separators/separator_Marquis2019/README.md @@ -2,6 +2,6 @@ Parameters for the separator in the paper -> Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. "An asymptotic derivation of a single particle model with electrolyte." [arXiv preprint arXiv:1905.12553](https://arxiv.org/abs/1905.12553) (2019). +> Marquis, S. G., Sulzer, V., Timms, R., Please, C. P., & Chapman, S. J. (2019). “An asymptotic derivation of a single particle model with electrolyte”. [Journal of The Electrochemical Society](https://doi.org/10.1149/2.0341915jes), 166(15), A3693-A3706. and references therein. diff --git a/pybamm/models/full_battery_models/base_battery_model.py b/pybamm/models/full_battery_models/base_battery_model.py index fef75e1783..c8da89e922 100644 --- a/pybamm/models/full_battery_models/base_battery_model.py +++ b/pybamm/models/full_battery_models/base_battery_model.py @@ -61,6 +61,8 @@ class BaseBatteryModel(pybamm.BaseModel): :class:`pybamm.sei.ElectronMigrationLimited` - "interstitial-diffusion limited": \ :class:`pybamm.sei.InterstitialDiffusionLimited` + - "ec reaction limited": \ + :class:`pybamm.sei.EcReactionLimited` * "sei film resistance" : str Set the submodel for additional term in the overpotential due to SEI. The default value is "None" if the "sei" option is "None", and @@ -86,7 +88,8 @@ class BaseBatteryModel(pybamm.BaseModel): .. math:: \\eta_r = \\frac{F}{RT} * (\\phi_s - \\phi_e - U - R_{sei} * L_{sei} * \\frac{I}{aL}) - + * "sei porosity change" : bool + Whether to include porosity change due to SEI formation (default False) **Extends:** :class:`pybamm.BaseModel` """ @@ -185,6 +188,7 @@ def options(self, extra_options): "cell_geometry": None, "external submodels": [], "sei": None, + "sei porosity change": False, } # Change the default for cell geometry based on which thermal option is provided extra_options = extra_options or {} @@ -305,6 +309,7 @@ def options(self, extra_options): "solvent-diffusion limited", "electron-migration limited", "interstitial-diffusion limited", + "ec reaction limited", ]: raise pybamm.OptionError("Unknown sei model '{}'".format(options["sei"])) if options["sei film resistance"] not in [None, "distributed", "average"]: @@ -313,6 +318,12 @@ def options(self, extra_options): options["sei film resistance"] ) ) + if options["sei porosity change"] not in [True, False]: + raise pybamm.OptionError( + "Unknown sei porosity change '{}'".format( + options["sei porosity change"] + ) + ) if options["dimensionality"] == 0: if options["current collector"] not in ["uniform"]: diff --git a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py index bfa6d963c8..e32fb95329 100644 --- a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py +++ b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py @@ -78,6 +78,11 @@ def set_sei_submodel(self): self.param, "Negative" ) + elif self.options["sei"] == "ec reaction limited": + self.submodels["negative sei"] = pybamm.sei.EcReactionLimited( + self.param, "Negative" + ) + # positive electrode self.submodels["positive sei"] = pybamm.sei.NoSEI(self.param, "Positive") diff --git a/pybamm/models/full_battery_models/lithium_ion/basic_dfn.py b/pybamm/models/full_battery_models/lithium_ion/basic_dfn.py index 7307ffb400..e8aa7165b4 100644 --- a/pybamm/models/full_battery_models/lithium_ion/basic_dfn.py +++ b/pybamm/models/full_battery_models/lithium_ion/basic_dfn.py @@ -21,15 +21,15 @@ class BasicDFN(BaseModel): References ---------- .. [2] SG Marquis, V Sulzer, R Timms, CP Please and SJ Chapman. “An asymptotic - derivation of a single particle model with electrolyte”. In: arXiv preprint - arXiv:1905.12553 (2019). - + derivation of a single particle model with electrolyte”. Journal of The + Electrochemical Society, 166(15):A3693–A3706, 2019 **Extends:** :class:`pybamm.lithium_ion.BaseModel` """ def __init__(self, name="Doyle-Fuller-Newman model"): super().__init__({}, name) + pybamm.citations.register("marquis2019asymptotic") # `param` is a class containing all the relevant parameters and functions for # this model. These are purely symbolic at this stage, and will be set by the # `ParameterValues` class when the model is processed. diff --git a/pybamm/models/full_battery_models/lithium_ion/basic_spm.py b/pybamm/models/full_battery_models/lithium_ion/basic_spm.py index 26c7c781d4..7df99f8615 100644 --- a/pybamm/models/full_battery_models/lithium_ion/basic_spm.py +++ b/pybamm/models/full_battery_models/lithium_ion/basic_spm.py @@ -21,15 +21,15 @@ class BasicSPM(BaseModel): References ---------- .. [2] SG Marquis, V Sulzer, R Timms, CP Please and SJ Chapman. “An asymptotic - derivation of a single particle model with electrolyte”. In: arXiv preprint - arXiv:1905.12553 (2019). - + derivation of a single particle model with electrolyte”. Journal of The + Electrochemical Society, 166(15):A3693–A3706, 2019 **Extends:** :class:`pybamm.lithium_ion.BaseModel` """ def __init__(self, name="Single Particle Model"): super().__init__({}, name) + pybamm.citations.register("marquis2019asymptotic") # `param` is a class containing all the relevant parameters and functions for # this model. These are purely symbolic at this stage, and will be set by the # `ParameterValues` class when the model is processed. diff --git a/pybamm/models/full_battery_models/lithium_ion/dfn.py b/pybamm/models/full_battery_models/lithium_ion/dfn.py index 2435b354d1..07d4251e6c 100644 --- a/pybamm/models/full_battery_models/lithium_ion/dfn.py +++ b/pybamm/models/full_battery_models/lithium_ion/dfn.py @@ -53,7 +53,10 @@ def __init__(self, options=None, name="Doyle-Fuller-Newman model", build=True): def set_porosity_submodel(self): - self.submodels["porosity"] = pybamm.porosity.Constant(self.param) + if self.options["sei porosity change"] is False: + self.submodels["porosity"] = pybamm.porosity.Constant(self.param) + elif self.options["sei porosity change"] is True: + self.submodels["porosity"] = pybamm.porosity.Full(self.param) def set_convection_submodel(self): diff --git a/pybamm/models/full_battery_models/lithium_ion/spm.py b/pybamm/models/full_battery_models/lithium_ion/spm.py index facf7e78ac..71e41d14bb 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spm.py +++ b/pybamm/models/full_battery_models/lithium_ion/spm.py @@ -53,7 +53,10 @@ def __init__(self, options=None, name="Single Particle Model", build=True): def set_porosity_submodel(self): - self.submodels["porosity"] = pybamm.porosity.Constant(self.param) + if self.options["sei porosity change"] is False: + self.submodels["porosity"] = pybamm.porosity.Constant(self.param) + elif self.options["sei porosity change"] is True: + self.submodels["porosity"] = pybamm.porosity.LeadingOrder(self.param) def set_convection_submodel(self): diff --git a/pybamm/models/full_battery_models/lithium_ion/spme.py b/pybamm/models/full_battery_models/lithium_ion/spme.py index d0ae0daef1..954b692b49 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spme.py +++ b/pybamm/models/full_battery_models/lithium_ion/spme.py @@ -56,7 +56,10 @@ def __init__( def set_porosity_submodel(self): - self.submodels["porosity"] = pybamm.porosity.Constant(self.param) + if self.options["sei porosity change"] is False: + self.submodels["porosity"] = pybamm.porosity.Constant(self.param) + elif self.options["sei porosity change"] is True: + self.submodels["porosity"] = pybamm.porosity.LeadingOrder(self.param) def set_convection_submodel(self): diff --git a/pybamm/models/submodels/interface/inverse_kinetics/inverse_butler_volmer.py b/pybamm/models/submodels/interface/inverse_kinetics/inverse_butler_volmer.py index 110ab39bba..0f807389e5 100644 --- a/pybamm/models/submodels/interface/inverse_kinetics/inverse_butler_volmer.py +++ b/pybamm/models/submodels/interface/inverse_kinetics/inverse_butler_volmer.py @@ -63,10 +63,14 @@ def get_coupled_variables(self, variables): # With SEI resistance (distributed and averaged have the same effect here) if self.options["sei film resistance"] is not None: + if self.domain == "Negative": + R_sei = self.param.R_sei_n + elif self.domain == "Positive": + R_sei = self.param.R_sei_p L_sei = variables[ "Total " + self.domain.lower() + " electrode sei thickness" ] - eta_sei = -j_tot * L_sei * pybamm.sei_parameters.R_sei + eta_sei = -j_tot * L_sei * R_sei # Without SEI resistance else: eta_sei = pybamm.Scalar(0) diff --git a/pybamm/models/submodels/interface/kinetics/base_kinetics.py b/pybamm/models/submodels/interface/kinetics/base_kinetics.py index 09de1a958c..1c25146e78 100644 --- a/pybamm/models/submodels/interface/kinetics/base_kinetics.py +++ b/pybamm/models/submodels/interface/kinetics/base_kinetics.py @@ -74,6 +74,10 @@ def get_coupled_variables(self, variables): # Add SEI resistance if self.options["sei film resistance"] == "distributed": + if self.domain == "Negative": + R_sei = self.param.R_sei_n + elif self.domain == "Positive": + R_sei = self.param.R_sei_p L_sei = variables[ "Total " + self.domain.lower() + " electrode sei thickness" ] @@ -82,12 +86,16 @@ def get_coupled_variables(self, variables): + self.domain.lower() + " electrode interfacial current density variable" ] - eta_sei = -j_tot * L_sei * pybamm.sei_parameters.R_sei + eta_sei = -j_tot * L_sei * R_sei elif self.options["sei film resistance"] == "average": + if self.domain == "Negative": + R_sei = self.param.R_sei_n + elif self.domain == "Positive": + R_sei = self.param.R_sei_p L_sei = variables[ "Total " + self.domain.lower() + " electrode sei thickness" ] - eta_sei = -j_tot_av * L_sei * pybamm.sei_parameters.R_sei + eta_sei = -j_tot_av * L_sei * R_sei else: eta_sei = pybamm.Scalar(0) eta_r += eta_sei diff --git a/pybamm/models/submodels/interface/sei/__init__.py b/pybamm/models/submodels/interface/sei/__init__.py index c6c0c29db4..2c5fb582e1 100644 --- a/pybamm/models/submodels/interface/sei/__init__.py +++ b/pybamm/models/submodels/interface/sei/__init__.py @@ -5,3 +5,4 @@ from .solvent_diffusion_limited import SolventDiffusionLimited from .electron_migration_limited import ElectronMigrationLimited from .interstitial_diffusion_limited import InterstitialDiffusionLimited +from .ec_reaction_limited import EcReactionLimited diff --git a/pybamm/models/submodels/interface/sei/base_sei.py b/pybamm/models/submodels/interface/sei/base_sei.py index d457344098..68bbddbcd5 100644 --- a/pybamm/models/submodels/interface/sei/base_sei.py +++ b/pybamm/models/submodels/interface/sei/base_sei.py @@ -43,7 +43,7 @@ def _get_standard_thickness_variables(self, L_inner, L_outer): variables : dict The variables which can be derived from the SEI thicknesses. """ - sp = pybamm.sei_parameters + param = self.param # Set scales to one for the "no SEI" model so that they are not required # by parameter values in general @@ -53,17 +53,16 @@ def _get_standard_thickness_variables(self, L_inner, L_outer): n_outer_scale = 1 v_bar = 1 else: - L_scale = sp.L_sei_0_dim - n_scale = sp.L_sei_0_dim * sp.a_n / sp.V_bar_inner_dimensional - n_outer_scale = sp.L_sei_0_dim * sp.a_n / sp.V_bar_outer_dimensional - v_bar = sp.v_bar + L_scale = param.L_sei_0_dim + n_scale = param.L_sei_0_dim * param.a_n_dim / param.V_bar_inner_dimensional + n_outer_scale = ( + param.L_sei_0_dim * param.a_n_dim / param.V_bar_outer_dimensional + ) + v_bar = param.v_bar L_inner_av = pybamm.x_average(L_inner) L_outer_av = pybamm.x_average(L_outer) - L_sei = L_inner + L_outer - L_sei_av = pybamm.x_average(L_sei) - n_inner = L_inner # inner SEI concentration n_outer = L_outer # outer SEI concentration n_inner_av = pybamm.x_average(L_inner) @@ -85,10 +84,6 @@ def _get_standard_thickness_variables(self, L_inner, L_outer): "Outer " + domain + " sei thickness [m]": L_outer * L_scale, "X-averaged outer " + domain + " sei thickness": L_outer_av, "X-averaged outer " + domain + " sei thickness [m]": L_outer_av * L_scale, - "Total " + domain + " sei thickness": L_sei, - "Total " + domain + " sei thickness [m]": L_sei * L_scale, - "X-averaged total " + domain + " sei thickness": L_sei_av, - "X-averaged total " + domain + " sei thickness [m]": L_sei_av * L_scale, "Inner " + domain + " sei concentration [mol.m-3]": n_inner * n_scale, "X-averaged inner " + domain @@ -102,37 +97,59 @@ def _get_standard_thickness_variables(self, L_inner, L_outer): "Loss of lithium to " + domain + " sei [mol]": Q_sei * n_scale, } + L_sei = L_inner + L_outer + + variables.update(self._get_standard_total_thickness_variables(L_sei)) + + return variables + + def _get_standard_total_thickness_variables(self, L_sei): + "Update variables related to total SEI thickness" + domain = self.domain.lower() + " electrode" + if isinstance(self, pybamm.sei.NoSEI): + L_scale = 1 + R_sei_dim = 1 + else: + L_scale = self.param.L_sei_0_dim + R_sei_dim = self.param.R_sei_dimensional + L_sei_av = pybamm.x_average(L_sei) + + variables = { + "Total " + domain + " sei thickness": L_sei, + "Total " + domain + " sei thickness [m]": L_sei * L_scale, + "X-averaged total " + domain + " sei thickness": L_sei_av, + "X-averaged total " + domain + " sei thickness [m]": L_sei_av * L_scale, + "X-averaged " + + self.domain.lower() + + " electrode resistance [Ohm.m2]": L_sei_av * L_scale * R_sei_dim, + } return variables def _get_standard_reaction_variables(self, j_inner, j_outer): """ - A private function to obtain the standard variables which - can be derived from the SEI interfacial reaction current - - Parameters - ---------- - j_inner : :class:`pybamm.Symbol` - The inner SEI interfacial reaction current. - j_outer : :class:`pybamm.Symbol` - The outer SEI interfacial reaction current. - - Returns - ------- - variables : dict - The variables which can be derived from the SEI thicknesses. + A private function to obtain the standard variables which + can be derived from the SEI interfacial reaction current + + Parameters + ---------- + j_inner : :class:`pybamm.Symbol` + The inner SEI interfacial reaction current. + j_outer : :class:`pybamm.Symbol` + The outer SEI interfacial reaction current. + + Returns + ------- + variables : dict + The variables which can be derived from the SEI thicknesses. """ if self.domain == "Negative": - j_scale = self.param.interfacial_current_scale_n + j_scale = self.param.j_scale_n elif self.domain == "Positive": - j_scale = self.param.interfacial_current_scale_p + j_scale = self.param.j_scale_p j_i_av = pybamm.x_average(j_inner) j_o_av = pybamm.x_average(j_outer) - j_sei = j_inner + j_outer - j_sei_av = pybamm.x_average(j_sei) - domain = self.domain.lower() + " electrode" - Domain = domain.capitalize() variables = { "Inner " + domain + " sei interfacial current density": j_inner, @@ -151,6 +168,26 @@ def _get_standard_reaction_variables(self, j_inner, j_outer): "X-averaged outer " + domain + " sei interfacial current density [A.m-2]": j_o_av * j_scale, + } + + j_sei = j_inner + j_outer + variables.update(self._get_standard_total_reaction_variables(j_sei)) + + return variables + + def _get_standard_total_reaction_variables(self, j_sei): + "Update variables related to total SEI interfacial current density" + if self.domain == "Negative": + j_scale = self.param.j_scale_n + elif self.domain == "Positive": + j_scale = self.param.j_scale_p + + j_sei_av = pybamm.x_average(j_sei) + + domain = self.domain.lower() + " electrode" + Domain = domain.capitalize() + + variables = { Domain + " sei interfacial current density": j_sei, Domain + " sei interfacial current density [A.m-2]": j_sei * j_scale, "X-averaged " + domain + " sei interfacial current density": j_sei_av, diff --git a/pybamm/models/submodels/interface/sei/constant_sei.py b/pybamm/models/submodels/interface/sei/constant_sei.py index e12a9ce43e..d31f9f6dd6 100644 --- a/pybamm/models/submodels/interface/sei/constant_sei.py +++ b/pybamm/models/submodels/interface/sei/constant_sei.py @@ -27,8 +27,8 @@ def __init__(self, param, domain): def get_fundamental_variables(self): # Constant thicknesses - L_inner = pybamm.sei_parameters.L_inner_0 - L_outer = pybamm.sei_parameters.L_outer_0 + L_inner = self.param.L_inner_0 + L_outer = self.param.L_outer_0 variables = self._get_standard_thickness_variables(L_inner, L_outer) # Reactions diff --git a/pybamm/models/submodels/interface/sei/ec_reaction_limited.py b/pybamm/models/submodels/interface/sei/ec_reaction_limited.py new file mode 100644 index 0000000000..a806181bd2 --- /dev/null +++ b/pybamm/models/submodels/interface/sei/ec_reaction_limited.py @@ -0,0 +1,133 @@ +# +# Class for reaction limited SEI growth +# +import pybamm +from .base_sei import BaseModel + + +class EcReactionLimited(BaseModel): + """Base class for reaction limited SEI growth. + + Parameters + ---------- + param : parameter class + The parameters to use for this submodel + domain : str + The domain of the model either 'Negative' or 'Positive' + + **Extends:** :class:`pybamm.sei.BaseModel` + """ + + def __init__(self, param, domain): + super().__init__(param, domain) + + def get_fundamental_variables(self): + + L_sei = pybamm.Variable( + "Total " + self.domain.lower() + " electrode sei thickness", + domain=self.domain.lower() + " electrode", + auxiliary_domains={"secondary": "current collector"}, + ) + j_sei = pybamm.Variable( + self.domain + " electrode sei interfacial current density", + domain=self.domain.lower() + " electrode", + auxiliary_domains={"secondary": "current collector"}, + ) + + variables = self._get_standard_total_thickness_variables(L_sei) + variables.update(self._get_standard_total_reaction_variables(j_sei)) + + return variables + + def get_coupled_variables(self, variables): + + j_sei = variables[self.domain + " electrode sei interfacial current density"] + L_sei = variables["Total " + self.domain.lower() + " electrode sei thickness"] + c_scale = self.param.c_ec_0_dim + # concentration of EC on graphite surface, base case = 1 + if self.domain == "Negative": + C_ec = self.param.C_ec_n + + c_ec = pybamm.Scalar(1) + j_sei * L_sei * C_ec + c_ec_av = pybamm.x_average(c_ec) + variables.update( + { + self.domain + " electrode EC surface concentration": c_ec, + self.domain + + " electrode EC surface concentration [mol.m-3]": c_ec * c_scale, + "X-averaged " + + self.domain.lower() + + " electrode EC surface concentration": c_ec_av, + "X-averaged " + + self.domain.lower() + + " electrode EC surface concentration": c_ec_av * c_scale, + } + ) + # Update whole cell variables, which also updates the "sum of" variables + if ( + "Negative electrode sei interfacial current density" in variables + and "Positive electrode sei interfacial current density" in variables + and "Sei interfacial current density" not in variables + ): + variables.update( + self._get_standard_whole_cell_interfacial_current_variables(variables) + ) + + return variables + + def set_rhs(self, variables): + domain = self.domain.lower() + " electrode" + L_sei = variables["Total " + domain + " sei thickness"] + j_sei = variables[self.domain + " electrode sei interfacial current density"] + + if self.domain == "Negative": + Gamma_SEI = self.param.Gamma_SEI_n + + self.rhs = {L_sei: -Gamma_SEI * j_sei / 2} + + def set_algebraic(self, variables): + phi_s_n = variables[self.domain + " electrode potential"] + phi_e_n = variables[self.domain + " electrolyte potential"] + j_sei = variables[self.domain + " electrode sei interfacial current density"] + L_sei = variables["Total " + self.domain.lower() + " electrode sei thickness"] + c_ec = variables[self.domain + " electrode EC surface concentration"] + + # Look for current that contributes to the -IR drop + # If we can't find the interfacial current density from the main reaction, j, + # it's ok to fall back on the total interfacial current density, j_tot + # This should only happen when the interface submodel is "InverseButlerVolmer" + # in which case j = j_tot (uniform) anyway + try: + j = variables[ + "Total " + + self.domain.lower() + + " electrode interfacial current density" + ] + except KeyError: + j = variables[ + "X-averaged " + + self.domain.lower() + + " electrode total interfacial current density" + ] + + if self.domain == "Negative": + C_sei_ec = self.param.C_sei_ec_n + R_sei = self.param.R_sei_n + + # need to revise for thermal case + + self.algebraic = { + j_sei: j_sei + + C_sei_ec + * c_ec + * pybamm.exp(-0.5 * (phi_s_n - phi_e_n - j * L_sei * R_sei)) + } + + def set_initial_conditions(self, variables): + L_sei = variables["Total " + self.domain.lower() + " electrode sei thickness"] + j_sei = variables[self.domain + " electrode sei interfacial current density"] + + L_sei_0 = pybamm.Scalar(1) + j_sei_0 = pybamm.Scalar(0) + + self.initial_conditions = {L_sei: L_sei_0, j_sei: j_sei_0} diff --git a/pybamm/models/submodels/interface/sei/electron_migration_limited.py b/pybamm/models/submodels/interface/sei/electron_migration_limited.py index f351666311..c64ef6d389 100644 --- a/pybamm/models/submodels/interface/sei/electron_migration_limited.py +++ b/pybamm/models/submodels/interface/sei/electron_migration_limited.py @@ -35,9 +35,9 @@ def get_coupled_variables(self, variables): ] phi_s_n = variables[self.domain + " electrode potential"] - U_inner = pybamm.sei_parameters.U_inner_electron + U_inner = self.param.U_inner_electron if self.domain == "Negative": - C_sei = pybamm.sei_parameters.C_sei_electron_n + C_sei = self.param.C_sei_electron_n j_sei = (phi_s_n - U_inner) / (C_sei * L_sei_inner) @@ -66,9 +66,9 @@ def set_rhs(self, variables): j_inner = variables["Inner " + domain + " sei interfacial current density"] j_outer = variables["Outer " + domain + " sei interfacial current density"] - v_bar = pybamm.sei_parameters.v_bar + v_bar = self.param.v_bar if self.domain == "Negative": - Gamma_SEI = pybamm.sei_parameters.Gamma_SEI_n + Gamma_SEI = self.param.Gamma_SEI_n self.rhs = { L_inner: -Gamma_SEI * j_inner, @@ -80,7 +80,7 @@ def set_initial_conditions(self, variables): L_inner = variables["Inner " + domain + " sei thickness"] L_outer = variables["Outer " + domain + " sei thickness"] - L_inner_0 = pybamm.sei_parameters.L_inner_0 - L_outer_0 = pybamm.sei_parameters.L_outer_0 + L_inner_0 = self.param.L_inner_0 + L_outer_0 = self.param.L_outer_0 self.initial_conditions = {L_inner: L_inner_0, L_outer: L_outer_0} diff --git a/pybamm/models/submodels/interface/sei/interstitial_diffusion_limited.py b/pybamm/models/submodels/interface/sei/interstitial_diffusion_limited.py index b962e465cb..9ddb6b3cce 100644 --- a/pybamm/models/submodels/interface/sei/interstitial_diffusion_limited.py +++ b/pybamm/models/submodels/interface/sei/interstitial_diffusion_limited.py @@ -36,7 +36,7 @@ def get_coupled_variables(self, variables): phi_s_n = variables[self.domain + " electrode potential"] if self.domain == "Negative": - C_sei = pybamm.sei_parameters.C_sei_inter_n + C_sei = self.param.C_sei_inter_n j_sei = -pybamm.exp(-phi_s_n) / (C_sei * L_sei_inner) @@ -65,10 +65,10 @@ def set_rhs(self, variables): j_inner = variables["Inner " + domain + " sei interfacial current density"] j_outer = variables["Outer " + domain + " sei interfacial current density"] - v_bar = pybamm.sei_parameters.v_bar + v_bar = self.param.v_bar if self.domain == "Negative": - Gamma_SEI = pybamm.sei_parameters.Gamma_SEI_n + Gamma_SEI = self.param.Gamma_SEI_n self.rhs = { L_inner: -Gamma_SEI * j_inner, @@ -80,7 +80,7 @@ def set_initial_conditions(self, variables): L_inner = variables["Inner " + domain + " sei thickness"] L_outer = variables["Outer " + domain + " sei thickness"] - L_inner_0 = pybamm.sei_parameters.L_inner_0 - L_outer_0 = pybamm.sei_parameters.L_outer_0 + L_inner_0 = self.param.L_inner_0 + L_outer_0 = self.param.L_outer_0 self.initial_conditions = {L_inner: L_inner_0, L_outer: L_outer_0} diff --git a/pybamm/models/submodels/interface/sei/reaction_limited.py b/pybamm/models/submodels/interface/sei/reaction_limited.py index f312644cd5..84102d0b62 100644 --- a/pybamm/models/submodels/interface/sei/reaction_limited.py +++ b/pybamm/models/submodels/interface/sei/reaction_limited.py @@ -30,6 +30,7 @@ def get_fundamental_variables(self): return variables def get_coupled_variables(self, variables): + param = self.param phi_s_n = variables[self.domain + " electrode potential"] phi_e_n = variables[self.domain + " electrolyte potential"] @@ -48,11 +49,12 @@ def get_coupled_variables(self, variables): ] L_sei = variables["Total " + self.domain.lower() + " electrode sei thickness"] - R_sei = pybamm.sei_parameters.R_sei + if self.domain == "Negative": + R_sei = self.param.R_sei_n alpha = 0.5 - # alpha = pybamm.sei_parameters.alpha + # alpha = param.alpha if self.domain == "Negative": - C_sei = pybamm.sei_parameters.C_sei_reaction_n + C_sei = param.C_sei_reaction_n # need to revise for thermal case j_sei = -(1 / C_sei) * pybamm.exp( @@ -83,9 +85,9 @@ def set_rhs(self, variables): j_inner = variables["Inner " + domain + " sei interfacial current density"] j_outer = variables["Outer " + domain + " sei interfacial current density"] - v_bar = pybamm.sei_parameters.v_bar + v_bar = self.param.v_bar if self.domain == "Negative": - Gamma_SEI = pybamm.sei_parameters.Gamma_SEI_n + Gamma_SEI = self.param.Gamma_SEI_n self.rhs = { L_inner: -Gamma_SEI * j_inner, @@ -97,7 +99,7 @@ def set_initial_conditions(self, variables): L_inner = variables["Inner " + domain + " sei thickness"] L_outer = variables["Outer " + domain + " sei thickness"] - L_inner_0 = pybamm.sei_parameters.L_inner_0 - L_outer_0 = pybamm.sei_parameters.L_outer_0 + L_inner_0 = self.param.L_inner_0 + L_outer_0 = self.param.L_outer_0 self.initial_conditions = {L_inner: L_inner_0, L_outer: L_outer_0} diff --git a/pybamm/models/submodels/interface/sei/solvent_diffusion_limited.py b/pybamm/models/submodels/interface/sei/solvent_diffusion_limited.py index fc2c3f8b8a..74bdaff598 100644 --- a/pybamm/models/submodels/interface/sei/solvent_diffusion_limited.py +++ b/pybamm/models/submodels/interface/sei/solvent_diffusion_limited.py @@ -35,7 +35,7 @@ def get_coupled_variables(self, variables): ] if self.domain == "Negative": - C_sei = pybamm.sei_parameters.C_sei_solvent_n + C_sei = self.param.C_sei_solvent_n j_sei = -1 / (C_sei * L_sei_outer) @@ -64,10 +64,10 @@ def set_rhs(self, variables): j_inner = variables["Inner " + domain + " sei interfacial current density"] j_outer = variables["Outer " + domain + " sei interfacial current density"] - v_bar = pybamm.sei_parameters.v_bar + v_bar = self.param.v_bar if self.domain == "Negative": - Gamma_SEI = pybamm.sei_parameters.Gamma_SEI_n + Gamma_SEI = self.param.Gamma_SEI_n self.rhs = { L_inner: -Gamma_SEI * j_inner, @@ -79,7 +79,7 @@ def set_initial_conditions(self, variables): L_inner = variables["Inner " + domain + " sei thickness"] L_outer = variables["Outer " + domain + " sei thickness"] - L_inner_0 = pybamm.sei_parameters.L_inner_0 - L_outer_0 = pybamm.sei_parameters.L_outer_0 + L_inner_0 = self.param.L_inner_0 + L_outer_0 = self.param.L_outer_0 self.initial_conditions = {L_inner: L_inner_0, L_outer: L_outer_0} diff --git a/pybamm/models/submodels/porosity/full_reaction_driven_porosity.py b/pybamm/models/submodels/porosity/full_reaction_driven_porosity.py index 6361915573..e9e37ac61e 100644 --- a/pybamm/models/submodels/porosity/full_reaction_driven_porosity.py +++ b/pybamm/models/submodels/porosity/full_reaction_driven_porosity.py @@ -33,8 +33,10 @@ def get_coupled_variables(self, variables): j_n = variables["Negative electrode interfacial current density"] j_p = variables["Positive electrode interfacial current density"] + j_sei_n = variables["Negative electrode sei interfacial current density"] + beta_sei_n = self.param.beta_sei_n - deps_n_dt = -self.param.beta_surf_n * j_n + deps_n_dt = -self.param.beta_surf_n * j_n + beta_sei_n * j_sei_n deps_s_dt = pybamm.FullBroadcast( 0, "separator", auxiliary_domains={"secondary": "current collector"} ) diff --git a/pybamm/models/submodels/porosity/leading_reaction_driven_porosity.py b/pybamm/models/submodels/porosity/leading_reaction_driven_porosity.py index e2fce51015..7337d8b793 100644 --- a/pybamm/models/submodels/porosity/leading_reaction_driven_porosity.py +++ b/pybamm/models/submodels/porosity/leading_reaction_driven_porosity.py @@ -37,9 +37,13 @@ def get_coupled_variables(self, variables): j_n = variables["X-averaged negative electrode interfacial current density"] j_p = variables["X-averaged positive electrode interfacial current density"] + j_sei_n = variables[ + "X-averaged negative electrode sei interfacial current density" + ] + beta_sei_n = self.param.beta_sei_n deps_n_dt = pybamm.PrimaryBroadcast( - -self.param.beta_surf_n * j_n, ["negative electrode"] + -self.param.beta_surf_n * j_n + beta_sei_n * j_sei_n, ["negative electrode"] ) deps_s_dt = pybamm.FullBroadcast( 0, "separator", auxiliary_domains={"secondary": "current collector"} diff --git a/pybamm/parameters/parameter_sets.py b/pybamm/parameters/parameter_sets.py index b487f79c97..2b205c5669 100644 --- a/pybamm/parameters/parameter_sets.py +++ b/pybamm/parameters/parameter_sets.py @@ -69,6 +69,18 @@ "sei": "example", "citation": "Mohtat2020", } +Ramadass2004 = { + "chemistry": "lithium-ion", + "cell": "sony_Ramadass2004", + "anode": "graphite_Ramadass2004", + "separator": "separator_Ecker2015", # no values found, relevance? + "cathode": "lico2_Ramadass2004", + "electrolyte": "lipf6_Ramadass2004", + "experiment": "1C_discharge_from_full_Ramadass2004", + "sei": "ramadass2004", + "citation": "marquis2019asymptotic", +} + # # Lead-acid # diff --git a/pybamm/parameters/sei_parameters.py b/pybamm/parameters/sei_parameters.py deleted file mode 100644 index d4532f5757..0000000000 --- a/pybamm/parameters/sei_parameters.py +++ /dev/null @@ -1,90 +0,0 @@ -# -# Standard parameters for SEI models -# - -import pybamm - -# -------------------------------------------------------------------------------------- -# Dimensional parameters - -V_bar_inner_dimensional = pybamm.Parameter("Inner SEI partial molar volume [m3.mol-1]") -V_bar_outer_dimensional = pybamm.Parameter("Outer SEI partial molar volume [m3.mol-1]") - -m_sei_dimensional = pybamm.Parameter("SEI reaction exchange current density [A.m-2]") - -R_sei_dimensional = pybamm.Parameter("SEI resistivity [Ohm.m]") - -D_sol_dimensional = pybamm.Parameter("Outer SEI solvent diffusivity [m2.s-1]") -c_sol_dimensional = pybamm.Parameter("Bulk solvent concentration [mol.m-3]") - -m_ratio = pybamm.Parameter("Ratio of inner and outer SEI exchange current densities") - -U_inner_dimensional = pybamm.Parameter("Inner SEI open-circuit potential [V]") -U_outer_dimensional = pybamm.Parameter("Outer SEI open-circuit potential [V]") - -kappa_inner_dimensional = pybamm.Parameter("Inner SEI electron conductivity [S.m-1]") - -D_li_dimensional = pybamm.Parameter( - "Inner SEI lithium interstitial diffusivity [m2.s-1]" -) - -c_li_0_dimensional = pybamm.Parameter( - "Lithium interstitial reference concentration [mol.m-3]" -) - -L_inner_0_dim = pybamm.Parameter("Initial inner SEI thickness [m]") -L_outer_0_dim = pybamm.Parameter("Initial outer SEI thickness [m]") - -L_sei_0_dim = L_inner_0_dim + L_outer_0_dim - -# -------------------------------------------------------------------------------------- -# Dimensionless parameters - -U_n_ref = pybamm.standard_parameters_lithium_ion.U_n_ref -F = pybamm.standard_parameters_lithium_ion.F -R = pybamm.standard_parameters_lithium_ion.R -tau_discharge = pybamm.standard_parameters_lithium_ion.tau_discharge -T_ref = pybamm.standard_parameters_lithium_ion.T_ref - -a_n = pybamm.standard_parameters_lithium_ion.a_n_dim -a_p = pybamm.standard_parameters_lithium_ion.a_p_dim -L_x = pybamm.standard_parameters_lithium_ion.L_x - -i_typ = pybamm.electrical_parameters.i_typ -j_scale_n = pybamm.standard_parameters_lithium_ion.interfacial_current_scale_n -j_scale_p = pybamm.standard_parameters_lithium_ion.interfacial_current_scale_p - - -C_sei_reaction_n = (j_scale_n / m_sei_dimensional) * pybamm.exp( - -(F * U_n_ref / (2 * R * T_ref)) -) -C_sei_reaction_p = (j_scale_p / m_sei_dimensional) * pybamm.exp( - -(F * U_n_ref / (2 * R * T_ref)) -) - -C_sei_solvent_n = j_scale_n * L_sei_0_dim / (c_sol_dimensional * F * D_sol_dimensional) -C_sei_solvent_p = j_scale_p * L_sei_0_dim / (c_sol_dimensional * F * D_sol_dimensional) - -C_sei_electron_n = j_scale_n * F * L_sei_0_dim / (kappa_inner_dimensional * R * T_ref) -C_sei_electron_p = j_scale_p * F * L_sei_0_dim / (kappa_inner_dimensional * R * T_ref) - -C_sei_inter_n = j_scale_n * L_sei_0_dim / (D_li_dimensional * c_li_0_dimensional * F) -C_sei_inter_p = j_scale_p * L_sei_0_dim / (D_li_dimensional * c_li_0_dimensional * F) - -U_inner_electron = F * U_inner_dimensional / R / T_ref - -R_sei = F * i_typ * R_sei_dimensional * L_sei_0_dim / (a_n * L_x) / R / T_ref - -v_bar = V_bar_outer_dimensional / V_bar_inner_dimensional - -L_inner_0 = L_inner_0_dim / L_sei_0_dim -L_outer_0 = L_outer_0_dim / L_sei_0_dim - -# ratio of SEI reaction scale to intercalation reaction -Gamma_SEI_n = (V_bar_inner_dimensional * i_typ * tau_discharge) / ( - F * L_sei_0_dim * a_n * L_x -) - -Gamma_SEI_p = (V_bar_inner_dimensional * i_typ * tau_discharge) / ( - F * L_sei_0_dim * a_p * L_x -) diff --git a/pybamm/parameters/standard_parameters_lead_acid.py b/pybamm/parameters/standard_parameters_lead_acid.py index a6dd1f1325..2f7b4739f0 100644 --- a/pybamm/parameters/standard_parameters_lead_acid.py +++ b/pybamm/parameters/standard_parameters_lead_acid.py @@ -162,6 +162,10 @@ # thermal Delta_T = pybamm.thermal_parameters.Delta_T +# SEI parameters (for compatibility) +R_sei_dimensional = pybamm.Scalar(0) +beta_sei_n = pybamm.Scalar(0) + # -------------------------------------------------------------------------------------- "2. Dimensional Functions" @@ -287,8 +291,8 @@ def j0_p_Ox_dimensional(c_e, T): # electrical potential_scale = R * T_ref / F current_scale = i_typ -interfacial_current_scale_n = i_typ / (a_n_dim * L_x) -interfacial_current_scale_p = i_typ / (a_p_dim * L_x) +j_scale_n = i_typ / (a_n_dim * L_x) +j_scale_p = i_typ / (a_p_dim * L_x) velocity_scale = i_typ / (c_e_typ * F) # Reaction velocity scale @@ -378,26 +382,22 @@ def j0_p_Ox_dimensional(c_e, T): pybamm.FullBroadcast(0, ["separator"], "current collector"), pybamm.FullBroadcast(s_plus_p_S, ["positive electrode"], "current collector"), ) -C_dl_n = ( - C_dl_n_dimensional * potential_scale / interfacial_current_scale_n / tau_discharge -) -C_dl_p = ( - C_dl_p_dimensional * potential_scale / interfacial_current_scale_p / tau_discharge -) +C_dl_n = C_dl_n_dimensional * potential_scale / j_scale_n / tau_discharge +C_dl_p = C_dl_p_dimensional * potential_scale / j_scale_p / tau_discharge ne_n = ne_n_S ne_p = ne_p_S # Oxygen s_plus_Ox = s_plus_Ox_dim / ne_Ox s_w_Ox = s_w_Ox_dim / ne_Ox s_ox_Ox = s_ox_Ox_dim / ne_Ox -# j0_n_Ox_ref = j0_n_Ox_ref_dimensional / interfacial_current_scale_n +# j0_n_Ox_ref = j0_n_Ox_ref_dimensional / j_scale_n U_n_Ox = (U_Ox_dim - U_n_ref) / potential_scale U_p_Ox = (U_Ox_dim - U_p_ref) / potential_scale # Hydrogen s_plus_Hy = s_plus_Hy_dim / ne_Hy s_hy_Hy = s_hy_Hy_dim / ne_Hy -# j0_n_Hy_ref = j0_n_Hy_ref_dimensional / interfacial_current_scale_n -# j0_p_Hy_ref = j0_p_Hy_ref_dimensional / interfacial_current_scale_p +# j0_n_Hy_ref = j0_n_Hy_ref_dimensional / j_scale_n +# j0_p_Hy_ref = j0_p_Hy_ref_dimensional / j_scale_p U_n_Hy = (U_Hy_dim - U_n_ref) / potential_scale U_p_Hy = (U_Hy_dim - U_p_ref) / potential_scale @@ -544,21 +544,21 @@ def j0_n(c_e, T): "Dimensionless exchange-current density in the negative electrode" c_e_dim = c_e * c_e_typ T_dim = Delta_T * T + T_ref - return j0_n_dimensional(c_e_dim, T_dim) / interfacial_current_scale_n + return j0_n_dimensional(c_e_dim, T_dim) / j_scale_n def j0_p(c_e, T): "Dimensionless exchange-current density in the positive electrode" c_e_dim = c_e * c_e_typ T_dim = Delta_T * T + T_ref - return j0_p_dimensional(c_e_dim, T_dim) / interfacial_current_scale_p + return j0_p_dimensional(c_e_dim, T_dim) / j_scale_p def j0_p_Ox(c_e, T): "Dimensionless oxygen exchange-current density in the positive electrode" c_e_dim = c_e * c_e_typ T_dim = Delta_T * T + T_ref - return j0_p_Ox_dimensional(c_e_dim, T_dim) / interfacial_current_scale_p + return j0_p_Ox_dimensional(c_e_dim, T_dim) / j_scale_p # -------------------------------------------------------------------------------------- diff --git a/pybamm/parameters/standard_parameters_lithium_ion.py b/pybamm/parameters/standard_parameters_lithium_ion.py index e36a5b2763..aea8467024 100644 --- a/pybamm/parameters/standard_parameters_lithium_ion.py +++ b/pybamm/parameters/standard_parameters_lithium_ion.py @@ -101,6 +101,45 @@ ) +# SEI parameters + +V_bar_inner_dimensional = pybamm.Parameter("Inner SEI partial molar volume [m3.mol-1]") +V_bar_outer_dimensional = pybamm.Parameter("Outer SEI partial molar volume [m3.mol-1]") + +m_sei_dimensional = pybamm.Parameter("SEI reaction exchange current density [A.m-2]") + +R_sei_dimensional = pybamm.Parameter("SEI resistivity [Ohm.m]") + +D_sol_dimensional = pybamm.Parameter("Outer SEI solvent diffusivity [m2.s-1]") +c_sol_dimensional = pybamm.Parameter("Bulk solvent concentration [mol.m-3]") + +m_ratio = pybamm.Parameter("Ratio of inner and outer SEI exchange current densities") + +U_inner_dimensional = pybamm.Parameter("Inner SEI open-circuit potential [V]") +U_outer_dimensional = pybamm.Parameter("Outer SEI open-circuit potential [V]") + +kappa_inner_dimensional = pybamm.Parameter("Inner SEI electron conductivity [S.m-1]") + +D_li_dimensional = pybamm.Parameter( + "Inner SEI lithium interstitial diffusivity [m2.s-1]" +) + +c_li_0_dimensional = pybamm.Parameter( + "Lithium interstitial reference concentration [mol.m-3]" +) + +L_inner_0_dim = pybamm.Parameter("Initial inner SEI thickness [m]") +L_outer_0_dim = pybamm.Parameter("Initial outer SEI thickness [m]") + +L_sei_0_dim = L_inner_0_dim + L_outer_0_dim + +# EC reaction + +c_ec_0_dim = pybamm.Parameter("EC initial concentration in electrolyte [mol.m-3]") +D_ec_dim = pybamm.Parameter("EC diffusivity [m2.s-1]") +k_sei_dim = pybamm.Parameter("SEI kinetic rate constant [m.s-1]") +U_sei_dim = pybamm.Parameter("SEI open-circuit potential [V]") + # Initial conditions c_e_init_dimensional = pybamm.Parameter( "Initial concentration in electrolyte [mol.m-3]" @@ -244,8 +283,8 @@ def U_p_dimensional(sto, T): # electrical potential_scale = R * T_ref / F current_scale = i_typ -interfacial_current_scale_n = i_typ / (a_n_dim * L_x) -interfacial_current_scale_p = i_typ / (a_p_dim * L_x) +j_scale_n = i_typ / (a_n_dim * L_x) +j_scale_p = i_typ / (a_p_dim * L_x) # Discharge timescale tau_discharge = F * c_n_max * L_x / i_typ @@ -317,7 +356,10 @@ def U_p_dimensional(sto, T): epsilon_p = pybamm.FunctionParameter("Positive electrode porosity", inputs) epsilon = pybamm.Concatenation(epsilon_n, epsilon_s, epsilon_p) - +epsilon_n_init = pybamm.Parameter("Negative electrode porosity") +epsilon_s_init = pybamm.Parameter("Separator porosity") +epsilon_p_init = pybamm.Parameter("Positive electrode porosity") +epsilon_init = pybamm.Concatenation(epsilon_n, epsilon_s, epsilon_p) epsilon_s_n = pybamm.Parameter("Negative electrode active material volume fraction") epsilon_s_p = pybamm.Parameter("Positive electrode active material volume fraction") epsilon_inactive_n = 1 - epsilon_n - epsilon_s_n @@ -356,6 +398,8 @@ def one_plus_dlnf_dlnc(c_e): beta_surf = pybamm.Scalar(0) +beta_surf_n = pybamm.Scalar(0) +beta_surf_p = pybamm.Scalar(0) # (1-2*t_plus) is for Nernst-Planck @@ -366,12 +410,8 @@ def chi(c_e): # Electrochemical Reactions -C_dl_n = ( - C_dl_n_dimensional * potential_scale / interfacial_current_scale_n / tau_discharge -) -C_dl_p = ( - C_dl_p_dimensional * potential_scale / interfacial_current_scale_p / tau_discharge -) +C_dl_n = C_dl_n_dimensional * potential_scale / j_scale_n / tau_discharge +C_dl_p = C_dl_p_dimensional * potential_scale / j_scale_p / tau_discharge # Electrical voltage_low_cut = (voltage_low_cut_dimensional - (U_p_ref - U_n_ref)) / potential_scale @@ -418,6 +458,48 @@ def chi(c_e): T_amb_dim = pybamm.thermal_parameters.T_amb_dim T_amb = pybamm.thermal_parameters.T_amb +# SEI parameters +C_sei_reaction_n = (j_scale_n / m_sei_dimensional) * pybamm.exp( + -(F * U_n_ref / (2 * R * T_ref)) +) +C_sei_reaction_p = (j_scale_p / m_sei_dimensional) * pybamm.exp( + -(F * U_n_ref / (2 * R * T_ref)) +) + +C_sei_solvent_n = j_scale_n * L_sei_0_dim / (c_sol_dimensional * F * D_sol_dimensional) +C_sei_solvent_p = j_scale_p * L_sei_0_dim / (c_sol_dimensional * F * D_sol_dimensional) + +C_sei_electron_n = j_scale_n * F * L_sei_0_dim / (kappa_inner_dimensional * R * T_ref) +C_sei_electron_p = j_scale_p * F * L_sei_0_dim / (kappa_inner_dimensional * R * T_ref) + +C_sei_inter_n = j_scale_n * L_sei_0_dim / (D_li_dimensional * c_li_0_dimensional * F) +C_sei_inter_p = j_scale_p * L_sei_0_dim / (D_li_dimensional * c_li_0_dimensional * F) + +U_inner_electron = F * U_inner_dimensional / R / T_ref + +R_sei_n = F * j_scale_n * R_sei_dimensional * L_sei_0_dim / R / T_ref +R_sei_p = F * j_scale_p * R_sei_dimensional * L_sei_0_dim / R / T_ref + +v_bar = V_bar_outer_dimensional / V_bar_inner_dimensional + +L_inner_0 = L_inner_0_dim / L_sei_0_dim +L_outer_0 = L_outer_0_dim / L_sei_0_dim + +# ratio of SEI reaction scale to intercalation reaction +Gamma_SEI_n = (V_bar_inner_dimensional * j_scale_n * tau_discharge) / (F * L_sei_0_dim) +Gamma_SEI_p = (V_bar_inner_dimensional * j_scale_p * tau_discharge) / (F * L_sei_0_dim) + +# EC reaction +C_ec_n = L_sei_0_dim * j_scale_n / (F * c_ec_0_dim * D_ec_dim) +C_sei_ec_n = ( + F + * k_sei_dim + * c_ec_0_dim + / j_scale_n + * (pybamm.exp(-(F * (U_n_ref - U_sei_dim) / (2 * R * T_ref)))) +) +beta_sei_n = a_n_dim * L_sei_0_dim * Gamma_SEI_n + # Initial conditions T_init = pybamm.thermal_parameters.T_init c_e_init = c_e_init_dimensional / c_e_typ diff --git a/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py b/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py index 313b338daa..6fc88dd877 100644 --- a/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py +++ b/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py @@ -160,6 +160,12 @@ def test_well_posed_interstitial_diffusion_limited(self): modeltest = tests.StandardModelTest(model) modeltest.test_all() + def test_well_posed_ec_reaction_limited(self): + options = {"sei": "ec reaction limited", "sei porosity change": True} + model = pybamm.lithium_ion.DFN(options) + modeltest = tests.StandardModelTest(model) + modeltest.test_all() + if __name__ == "__main__": print("Add -v for more debug output") diff --git a/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spm.py b/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spm.py index cc59dbedba..28febdfc49 100644 --- a/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spm.py +++ b/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spm.py @@ -141,6 +141,12 @@ def test_well_posed_interstitial_diffusion_limited(self): modeltest = tests.StandardModelTest(model) modeltest.test_all() + def test_well_posed_ec_reaction_limited(self): + options = {"sei": "ec reaction limited", "sei porosity change": True} + model = pybamm.lithium_ion.SPM(options) + modeltest = tests.StandardModelTest(model) + modeltest.test_all() + if __name__ == "__main__": print("Add -v for more debug output") diff --git a/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spme.py b/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spme.py index 7f551771cf..52e3d93481 100644 --- a/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spme.py +++ b/tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spme.py @@ -133,6 +133,12 @@ def test_well_posed_interstitial_diffusion_limited(self): modeltest = tests.StandardModelTest(model) modeltest.test_all() + def test_well_posed_ec_reaction_limited(self): + options = {"sei": "ec reaction limited", "sei porosity change": True} + model = pybamm.lithium_ion.SPMe(options) + modeltest = tests.StandardModelTest(model) + modeltest.test_all() + if __name__ == "__main__": print("Add -v for more debug output") diff --git a/tests/unit/test_models/test_full_battery_models/test_base_battery_model.py b/tests/unit/test_models/test_full_battery_models/test_base_battery_model.py index d7d90e0cd0..c1c63b9a26 100644 --- a/tests/unit/test_models/test_full_battery_models/test_base_battery_model.py +++ b/tests/unit/test_models/test_full_battery_models/test_base_battery_model.py @@ -145,6 +145,8 @@ def test_options(self): pybamm.BaseBatteryModel({"sei": "bad sei"}) with self.assertRaisesRegex(pybamm.OptionError, "sei film resistance"): pybamm.BaseBatteryModel({"sei film resistance": "bad sei film resistance"}) + with self.assertRaisesRegex(pybamm.OptionError, "sei porosity change"): + pybamm.BaseBatteryModel({"sei porosity change": "bad sei porosity change"}) # variable defaults model = pybamm.BaseBatteryModel() self.assertEqual(model.options["sei film resistance"], None) diff --git a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py index fcb1cc806d..1c49f0f3bf 100644 --- a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py +++ b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py @@ -135,6 +135,11 @@ def test_well_posed_interstitial_diffusion_limited(self): model = pybamm.lithium_ion.DFN(options) model.check_well_posedness() + def test_well_posed_ec_reaction_limited(self): + options = {"sei": "ec reaction limited", "sei porosity change": True} + model = pybamm.lithium_ion.DFN(options) + model.check_well_posedness() + if __name__ == "__main__": print("Add -v for more debug output") diff --git a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py index d342ffb7b3..29d1557b77 100644 --- a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py +++ b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py @@ -148,6 +148,11 @@ def test_well_posed_interstitial_diffusion_limited(self): model = pybamm.lithium_ion.SPM(options) model.check_well_posedness() + def test_well_posed_ec_reaction_limited(self): + options = {"sei": "ec reaction limited", "sei porosity change": True} + model = pybamm.lithium_ion.SPM(options) + model.check_well_posedness() + if __name__ == "__main__": print("Add -v for more debug output") diff --git a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spme.py b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spme.py index 83f998aefb..f85543ae54 100644 --- a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spme.py +++ b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spme.py @@ -125,6 +125,11 @@ def test_well_posed_interstitial_diffusion_limited(self): model = pybamm.lithium_ion.SPMe(options) model.check_well_posedness() + def test_well_posed_ec_reaction_limited(self): + options = {"sei": "ec reaction limited", "sei porosity change": True} + model = pybamm.lithium_ion.SPMe(options) + model.check_well_posedness() + if __name__ == "__main__": print("Add -v for more debug output") diff --git a/tests/unit/test_models/test_submodels/test_interface/test_sei/__init__.py b/tests/unit/test_models/test_submodels/test_interface/test_sei/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/test_models/test_submodels/test_interface/test_sei/test_base_sei.py b/tests/unit/test_models/test_submodels/test_interface/test_sei/test_base_sei.py new file mode 100644 index 0000000000..02e8b90554 --- /dev/null +++ b/tests/unit/test_models/test_submodels/test_interface/test_sei/test_base_sei.py @@ -0,0 +1,24 @@ +# +# Test base SEI submodel +# +import pybamm +import unittest + + +class TestBaseSEI(unittest.TestCase): + def test_not_implemented(self): + with self.assertRaisesRegex( + NotImplementedError, + "SEI models are not implemented for the positive electrode", + ): + pybamm.sei.ReactionLimited(None, "Positive") + + +if __name__ == "__main__": + print("Add -v for more debug output") + import sys + + if "-v" in sys.argv: + debug = True + pybamm.settings.debug_mode = True + unittest.main() diff --git a/tests/unit/test_models/test_submodels/test_porosity/test_full_reaction_driven_porosity.py b/tests/unit/test_models/test_submodels/test_porosity/test_full_reaction_driven_porosity.py index bf19212d75..aba8b0895a 100644 --- a/tests/unit/test_models/test_submodels/test_porosity/test_full_reaction_driven_porosity.py +++ b/tests/unit/test_models/test_submodels/test_porosity/test_full_reaction_driven_porosity.py @@ -14,6 +14,7 @@ def test_public_functions(self): a_p = pybamm.PrimaryBroadcast(pybamm.Scalar(0), ["positive electrode"]) variables = { "Negative electrode interfacial current density": a_n, + "Negative electrode sei interfacial current density": a_n, "Positive electrode interfacial current density": a_p, } submodel = pybamm.porosity.Full(param) diff --git a/tests/unit/test_models/test_submodels/test_porosity/test_leading_reaction_driven_porosity.py b/tests/unit/test_models/test_submodels/test_porosity/test_leading_reaction_driven_porosity.py index 3cf918091e..ca4a60a131 100644 --- a/tests/unit/test_models/test_submodels/test_porosity/test_leading_reaction_driven_porosity.py +++ b/tests/unit/test_models/test_submodels/test_porosity/test_leading_reaction_driven_porosity.py @@ -13,6 +13,7 @@ def test_public_functions(self): a = pybamm.PrimaryBroadcast(pybamm.Scalar(0), "current collector") variables = { "X-averaged negative electrode interfacial current density": a, + "X-averaged negative electrode sei interfacial current density": a, "X-averaged positive electrode interfacial current density": a, } submodel = pybamm.porosity.LeadingOrder(param)