def graphite_LGM50_ocp_Chen2020(sto): """ LG M50 graphite open circuit potential as a function of stochiometry, fit taken from [1]. References ---------- .. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W. Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the Electrochemical Society 167 (2020): 080534. Parameters ---------- sto: :class:`pybamm.Symbol` Electrode stochiometry Returns ------- :class:`pybamm.Symbol` Open circuit potential """ u_eq = (1.9793 * exp(-39.3631 * sto) + 0.2482 - 0.0909 * tanh(29.8538 * (sto - 0.1234)) - 0.04478 * tanh(14.9159 * (sto - 0.2769)) - 0.0205 * tanh(30.4444 * (sto - 0.6103))) return u_eq
def nmc_LGM50_ocp_Chen2020(sto): """ LG M50 NMC open circuit potential as a function of stochiometry, fit taken from [1]. References ---------- .. [1] Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W. Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the Electrochemical Society 167 (2020): 080534. Parameters ---------- sto: :class:`pybamm.Symbol` Electrode stochiometry Returns ------- :class:`pybamm.Symbol` Open circuit potential """ u_eq = ( -0.8090 * sto + 4.4875 - 0.0428 * tanh(18.5138 * (sto - 0.5542)) - 17.7326 * tanh(15.7890 * (sto - 0.3117)) + 17.5842 * tanh(15.9308 * (sto - 0.3120)) ) return u_eq
def graphite_ocp_Ecker2015_function(sto): """ Graphite OCP as a function of stochiometry [1, 2, 3]. References ---------- .. [1] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of a lithium-ion battery i. determination of parameters." Journal of the Electrochemical Society 162.9 (2015): A1836-A1848. .. [2] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of a lithium-ion battery ii. model validation." Journal of The Electrochemical Society 162.9 (2015): A1849-A1857. .. [3] Richardson, Giles, et. al. "Generalised single particle models for high-rate operation of graded lithium-ion electrodes: Systematic derivation and validation." Electrochemica Acta 339 (2020): 135862 Parameters ---------- sto: :class:`pybamm.Symbol` Electrode stochiometry Returns ------- :class:`pybamm.Symbol` Open circuit potential """ # Graphite negative electrode from Ecker, Kabitz, Laresgoiti et al. # Analytical fit (WebPlotDigitizer + gnuplot) a = 0.716502 b = 369.028 c = 0.12193 d = 35.6478 e = 0.0530947 g = 0.0169644 h = 27.1365 i = 0.312832 j = 0.0199313 k = 28.5697 m = 0.614221 n = 0.931153 o = 36.328 p = 1.10743 q = 0.140031 r = 0.0189193 s = 21.1967 t = 0.196176 u_eq = ( a * exp(-b * sto) + c * exp(-d * (sto - e)) - r * tanh(s * (sto - t)) - g * tanh(h * (sto - i)) - j * tanh(k * (sto - m)) - n * exp(o * (sto - p)) + q ) return u_eq
def test_tanh(self): a = pybamm.InputParameter("a") fun = pybamm.tanh(a) self.assertEqual(fun.evaluate(inputs={"a": 3}), np.tanh(3)) h = 0.0000001 self.assertAlmostEqual( fun.diff(a).evaluate(inputs={"a": 3}), (pybamm.tanh(pybamm.Scalar(3 + h)).evaluate() - fun.evaluate(inputs={"a": 3})) / h, places=5, )
def nco_ocp_Ecker2015_function(sto): """ NCO OCP as a function of stochiometry [1, 2, 3]. References ---------- .. [1] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of a lithium-ion battery i. determination of parameters." Journal of the Electrochemical Society 162.9 (2015): A1836-A1848. .. [2] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of a lithium-ion battery ii. model validation." Journal of The Electrochemical Society 162.9 (2015): A1849-A1857. .. [3] Richardson, Giles, et. al. "Generalised single particle models for high-rate operation of graded lithium-ion electrodes: Systematic derivation and validation." Electrochemica Acta 339 (2020): 135862 Parameters ---------- sto: double Stochiometry of material (li-fraction) """ # LiNiCo from Ecker, Kabitz, Laresgoiti et al. # Analytical fit (WebPlotDigitizer + gnuplot) a = -2.35211 c = 0.0747061 d = 31.886 e = 0.0219921 g = 0.640243 h = 5.48623 i = 0.439245 j = 3.82383 k = 4.12167 m = 0.176187 n = 0.0542123 o = 18.2919 p = 0.762272 q = 4.23285 r = -6.34984 s = 2.66395 t = 0.174352 u_eq = ( a * sto - c * tanh(d * (sto - e)) - r * tanh(s * (sto - t)) - g * tanh(h * (sto - i)) - j * tanh(k * (sto - m)) - n * tanh(o * (sto - p)) + q ) return u_eq
def graphite_mcmb2528_ocp_Dualfoil1998(sto): """ Graphite MCMB 2528 Open Circuit Potential (OCP) as a function of the stochiometry. The fit is taken from Dualfoil [1]. Dualfoil states that the data was measured by Chris Bogatu at Telcordia and PolyStor materials, 2000. However, we could not find any other records of this measurment. References ---------- .. [1] http://www.cchem.berkeley.edu/jsngrp/fortran.html """ u_eq = ( 0.194 + 1.5 * exp(-120.0 * sto) + 0.0351 * tanh((sto - 0.286) / 0.083) - 0.0045 * tanh((sto - 0.849) / 0.119) - 0.035 * tanh((sto - 0.9233) / 0.05) - 0.0147 * tanh((sto - 0.5) / 0.034) - 0.102 * tanh((sto - 0.194) / 0.142) - 0.022 * tanh((sto - 0.9) / 0.0164) - 0.011 * tanh((sto - 0.124) / 0.0226) + 0.0155 * tanh((sto - 0.105) / 0.029) ) return u_eq
def graphite_ocp_Kim2011(sto): """ Graphite Open Circuit Potential (OCP) as a function of the stochiometry [1]. References ---------- .. [1] Kim, G. H., Smith, K., Lee, K. J., Santhanagopalan, S., & Pesaran, A. (2011). Multi-domain modeling of lithium-ion batteries encompassing multi-physics in varied length scales. Journal of The Electrochemical Society, 158(8), A955-A969. """ u_eq = ( 0.124 + 1.5 * exp(-70 * sto) - 0.0351 * tanh((sto - 0.286) / 0.083) - 0.0045 * tanh((sto - 0.9) / 0.119) - 0.035 * tanh((sto - 0.99) / 0.05) - 0.0147 * tanh((sto - 0.5) / 0.034) - 0.102 * tanh((sto - 0.194) / 0.142) - 0.022 * tanh((sto - 0.98) / 0.0164) - 0.011 * tanh((sto - 0.124) / 0.0226) + 0.0155 * tanh((sto - 0.105) / 0.029) ) return u_eq
def sigmoid(left, right, k): """ Sigmoidal approximation to the heaviside function. k is the smoothing parameter, set by `pybamm.settings.heaviside_smoothing`. The recommended value is k=10. Note that the concept of deciding which side to pick when left=right does not apply for this smooth approximation. When left=right, the value is (left+right)/2. """ return (1 + pybamm.tanh(k * (right - left))) / 2
def lico2_ocp_Dualfoil1998(sto): """ Lithium Cobalt Oxide (LiCO2) Open Circuit Potential (OCP) as a a function of the stochiometry. The fit is taken from Dualfoil [1]. Dualfoil states that the data was measured by Oscar Garcia 2001 using Quallion electrodes for 0.5 < sto < 0.99 and by Marc Doyle for sto<0.4 (for unstated electrodes). We could not find any other records of the Garcia measurements. Doyles fits can be found in his thesis [2] but we could not find any other record of his measurments. References ---------- .. [1] http://www.cchem.berkeley.edu/jsngrp/fortran.html .. [2] CM Doyle. Design and simulation of lithium rechargeable batteries, 1995. Parameters ---------- sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ stretch = 1.062 sto = stretch * sto u_eq = (2.16216 + 0.07645 * tanh(30.834 - 54.4806 * sto) + 2.1581 * tanh(52.294 - 50.294 * sto) - 0.14169 * tanh(11.0923 - 19.8543 * sto) + 0.2051 * tanh(1.4684 - 5.4888 * sto) + 0.2531 * tanh( (-sto + 0.56478) / 0.1316) - 0.02167 * tanh( (sto - 0.525) / 0.006)) return u_eq
def graphite_ocp_PeymanMPM(sto): """ Graphite Open Circuit Potential (OCP) as a function of the stochiometry. The fit is taken from Peyman MPM [1]. References ---------- .. [1] Peyman Mohtat et al, MPM (to be submitted) """ u_eq = (0.063 + 0.8 * pybamm.exp(-75 * (sto + 0.001)) - 0.0120 * pybamm.tanh((sto - 0.127) / 0.016) - 0.0118 * pybamm.tanh( (sto - 0.155) / 0.016) - 0.0035 * pybamm.tanh( (sto - 0.220) / 0.020) - 0.0095 * pybamm.tanh( (sto - 0.190) / 0.013) - 0.0145 * pybamm.tanh( (sto - 0.490) / 0.020) - 0.0800 * pybamm.tanh( (sto - 1.030) / 0.055)) return u_eq