From d8787634742bfc1257ac2e150bebb0bb0c264fe5 Mon Sep 17 00:00:00 2001 From: Valentin Sulzer Date: Sat, 4 Apr 2020 22:41:44 -0400 Subject: [PATCH 1/5] #936 remove some inputs --- pybamm/__init__.py | 1 + .../graphite_LGM50_diffusivity_Chen2020.py | 19 +++--- ...GM50_electrolyte_reaction_rate_Chen2020.py | 19 +++--- .../anodes/graphite_Chen2020/parameters.csv | 4 +- .../graphite_diffusivity_Ecker2015.py | 17 ++---- ...ite_electrolyte_reaction_rate_Ecker2015.py | 21 +++---- .../graphite_ocp_Ecker2015_function.py | 2 +- .../anodes/graphite_Ecker2015/parameters.csv | 1 - .../graphite_diffusivity_Kim2011.py | 47 +++++++------- ...phite_electrolyte_reaction_rate_Kim2011.py | 18 ++---- .../anodes/graphite_Kim2011/parameters.csv | 2 - .../graphite_diffusivity_PeymanMPM.py | 17 ++---- ...ite_electrolyte_reaction_rate_PeymanMPM.py | 17 ++---- .../graphite_UMBL_Mohtat2020/parameters.csv | 2 - ..._electrolyte_reaction_rate_Dualfoil1998.py | 18 ++---- ...phite_mcmb2528_diffusivity_Dualfoil1998.py | 17 ++---- .../parameters.csv | 2 - .../nco_diffusivity_Ecker2015.py | 17 ++---- ...nco_electrolyte_reaction_rate_Ecker2015.py | 20 ++---- .../LiNiCoO2_Ecker2015/parameters.csv | 2 - .../NMC_diffusivity_PeymanMPM.py | 17 ++---- ...NMC_electrolyte_reaction_rate_PeymanMPM.py | 16 ++--- .../NMC_UMBL_Mohtat2020/parameters.csv | 2 - .../lico2_diffusivity_Dualfoil1998.py | 18 ++---- ..._electrolyte_reaction_rate_Dualfoil1998.py | 15 ++--- .../cathodes/lico2_Marquis2019/parameters.csv | 4 +- .../nca_Kim2011/nca_diffusivity_Kim2011.py | 17 ++---- .../nca_electrolyte_reaction_rate_Kim2011.py | 16 ++--- .../cathodes/nca_Kim2011/parameters.csv | 2 - .../nmc_LGM50_diffusivity_Chen2020.py | 18 +++--- ...GM50_electrolyte_reaction_rate_Chen2020.py | 16 ++--- .../cathodes/nmc_Chen2020/parameters.csv | 4 +- .../electrolyte_conductivity_PeymanMPM.py | 21 +++---- .../electrolyte_diffusivity_PeymanMPM.py | 20 +++--- .../LiPF6_Mohtat2020/parameters.csv | 2 - .../electrolyte_conductivity_Ecker2015.py | 21 +++---- .../electrolyte_diffusivity_Ecker2015.py | 32 +++------- .../lipf6_Ecker2015/parameters.csv | 2 - .../electrolyte_conductivity_Kim2011.py | 15 ++--- .../electrolyte_diffusivity_Kim2011.py | 15 ++--- .../electrolytes/lipf6_Kim2011/parameters.csv | 2 - ...conductivity_Landesfeind2019_EC_DMC_1_1.py | 8 +-- ...conductivity_Landesfeind2019_EC_EMC_3_7.py | 8 +-- ...nductivity_Landesfeind2019_EMC_FEC_19_1.py | 8 +-- ...olyte_conductivity_Landesfeind2019_base.py | 8 +-- ..._diffusivity_Landesfeind2019_EC_DMC_1_1.py | 8 +-- ..._diffusivity_Landesfeind2019_EC_EMC_3_7.py | 8 +-- ...iffusivity_Landesfeind2019_EMC_FEC_19_1.py | 8 +-- ...rolyte_diffusivity_Landesfeind2019_base.py | 8 +-- .../electrolyte_conductivity_Capiglia1999.py | 21 +++---- .../electrolyte_diffusivity_Capiglia1999.py | 20 +++--- .../lipf6_Marquis2019/parameters.csv | 2 - .../electrolyte_conductivity_Nyman2008.py | 20 +++--- .../electrolyte_diffusivity_Nyman2008.py | 20 +++--- .../lipf6_Nyman2008/parameters.csv | 4 +- pybamm/parameters/constants.py | 10 +++ .../standard_parameters_lead_acid.py | 5 +- .../standard_parameters_lithium_ion.py | 61 +++---------------- pybamm/parameters/thermal_parameters.py | 8 --- 59 files changed, 270 insertions(+), 503 deletions(-) create mode 100644 pybamm/parameters/constants.py diff --git a/pybamm/__init__.py b/pybamm/__init__.py index 9caa190c1e..0ab19d87df 100644 --- a/pybamm/__init__.py +++ b/pybamm/__init__.py @@ -156,6 +156,7 @@ def version(formatted=False): # Parameters class and methods # from .parameters.parameter_values import ParameterValues +from .parameters import constants from .parameters import geometric_parameters from .parameters import electrical_parameters from .parameters import thermal_parameters diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py index dba125a1ba..2fb9ac7dd6 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py @@ -1,28 +1,25 @@ -from pybamm import exp +from pybamm import exp, constants -def graphite_LGM50_diffusivity_Chen2020(sto, T, T_inf, E_D_s, R_g): +def graphite_LGM50_diffusivity_Chen2020(sto, T): """ LG M50 Graphite diffusivity as a function of stochiometry, in this case the diffusivity is taken to be a constant. The value is 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." Submitted for publication (2020). + Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant + Returns ------- : double @@ -30,6 +27,6 @@ def graphite_LGM50_diffusivity_Chen2020(sto, T, T_inf, E_D_s, R_g): """ D_ref = 3.3e-14 - arrhenius = exp(E_D_s / R_g * (1 / T_inf - 1 / T)) + arrhenius = exp(42770 / constants.R * (1 / 298.15 - 1 / T)) return D_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py index 9b2a6c92be..6ec25b37c2 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py @@ -1,32 +1,29 @@ -from pybamm import exp +from pybamm import exp, constants -def graphite_LGM50_electrolyte_reaction_rate_Chen2020(T, T_inf, E_r, R_g): +def graphite_LGM50_electrolyte_reaction_rate_Chen2020(T): """ Reaction rate for Butler-Volmer reactions between graphite and LiPF6 in EC:DMC. + 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." Submitted for publication (2020). + Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Reaction rate """ m_ref = 6.48e-7 - arrhenius = exp(E_r / R_g * (1 / T_inf - 1 / T)) + arrhenius = exp(3500 / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv index a2b1b01db1..c1f2d58d56 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv @@ -33,6 +33,4 @@ Negative electrode OCP entropic change [V.K-1],0,, ,,, # Activation energies,,, Reference temperature [K],298.15,25C, -Negative electrode reaction rate,[function]graphite_LGM50_electrolyte_reaction_rate_Chen2020,, -Negative reaction rate activation energy [J.mol-1],35000,Chen 2020, -Negative solid diffusion activation energy [J.mol-1],42770,default, \ No newline at end of file +Negative electrode reaction rate,[function]graphite_LGM50_electrolyte_reaction_rate_Chen2020,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py index 7d8ffab42f..cb5df907b5 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def graphite_diffusivity_Ecker2015(sto, T, T_inf, E_D_s, R_g): +def graphite_diffusivity_Ecker2015(sto, T): """ Graphite diffusivity as a function of stochiometry [1, 2, 3]. @@ -19,16 +19,10 @@ def graphite_diffusivity_Ecker2015(sto, T, T_inf, E_D_s, R_g): Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant Returns ------- @@ -37,6 +31,7 @@ def graphite_diffusivity_Ecker2015(sto, T, T_inf, E_D_s, R_g): """ D_ref = 8.4e-13 * exp(-11.3 * sto) + 8.2e-15 - arrhenius = exp(-E_D_s / (R_g * T)) * exp(E_D_s / (R_g * 296)) + E_D_s = 3.03e4 + arrhenius = exp(-E_D_s / (constants.R * T)) * exp(E_D_s / (constants.R * 296)) return D_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_electrolyte_reaction_rate_Ecker2015.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_electrolyte_reaction_rate_Ecker2015.py index 0b08fce441..f0eb3c9e45 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_electrolyte_reaction_rate_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_electrolyte_reaction_rate_Ecker2015.py @@ -1,8 +1,7 @@ -from pybamm import exp -from scipy import constants +from pybamm import exp, constants -def graphite_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g): +def graphite_electrolyte_reaction_rate_Ecker2015(T): """ Reaction rate for Butler-Volmer reactions between graphite and LiPF6 in EC:DMC. @@ -20,27 +19,21 @@ def graphite_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g): Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Reaction rate """ k_ref = 1.995 * 1e-10 # multiply by Faraday's constant to get correct units - F = constants.physical_constants["Faraday constant"][0] - m_ref = F * k_ref + m_ref = constants.F * k_ref + E_r = 53400 - arrhenius = exp(-E_r / (R_g * T)) * exp(E_r / (R_g * T_inf)) + arrhenius = exp(-E_r / (constants.R * T)) * exp(E_r / (constants.R * 296.15)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_ocp_Ecker2015_function.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_ocp_Ecker2015_function.py index 5b57c4fb52..2934ab5c43 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_ocp_Ecker2015_function.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_ocp_Ecker2015_function.py @@ -19,7 +19,7 @@ def graphite_ocp_Ecker2015_function(sto): Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry Returns diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv index bebcb7dcd4..8bf8ecb68f 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv @@ -29,4 +29,3 @@ Negative electrode OCP entropic change [V.K-1],0,, Reference temperature [K],296.15,23C, Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Ecker2015,, Negative reaction rate activation energy [J.mol-1],53400,, -Negative solid diffusion activation energy [J.mol-1],3.03E+04,, diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py index 11373e0f50..5d5f09b6bb 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py @@ -1,37 +1,32 @@ -from pybamm import exp +from pybamm import exp, constants -def graphite_diffusivity_Kim2011(sto, T, T_inf, E_D_s, R_g): +def graphite_diffusivity_Kim2011(sto, T): """ - Graphite diffusivity [1]. + Graphite diffusivity [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. + 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. - Parameters - ---------- - sto: :class: `numpy.Array` - Electrode stochiometry - T: :class: `numpy.Array` - Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant + Parameters + ---------- + sto: :class:`pybamm.Symbol` + Electrode stochiometry + T: :class:`pybamm.Symbol` + Dimensional temperature - Returns - ------- - : double - Solid diffusivity + Returns + ------- + : double + Solid diffusivity """ D_ref = 9 * 10 ** (-14) - arrhenius = exp(E_D_s / R_g * (1 / T_inf - 1 / T)) + E_D_s = 4e3 + 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_Kim2011/graphite_electrolyte_reaction_rate_Kim2011.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_reaction_rate_Kim2011.py index b942801b2d..33884ab206 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_reaction_rate_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_reaction_rate_Kim2011.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def graphite_electrolyte_reaction_rate_Kim2011(T, T_inf, E_r, R_g): +def graphite_electrolyte_reaction_rate_Kim2011(T): """ Reaction rate for Butler-Volmer reactions between graphite and LiPF6 in EC:DMC [1]. @@ -15,18 +15,11 @@ def graphite_electrolyte_reaction_rate_Kim2011(T, T_inf, E_r, R_g): Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant - Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Reaction rate """ @@ -43,6 +36,7 @@ def graphite_electrolyte_reaction_rate_Kim2011(T, T_inf, E_r, R_g): / (c_e_ref ** alpha * (c_s_n_max - c_s_n_ref) ** alpha * c_s_n_ref ** alpha) ) - arrhenius = exp(E_r / R_g * (1 / T_inf - 1 / T)) + E_r = 3e4 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv index 12af026ee2..ddedd05ed6 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv @@ -34,5 +34,3 @@ Negative electrode OCP entropic change [V.K-1],0,, # Activation energies,,, Reference temperature [K],298.15,25C, Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Kim2011,, -Negative reaction rate activation energy [J.mol-1],3E4,, -Negative solid diffusion activation energy [J.mol-1],4E3,, diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py index abc787cae7..04567c98b0 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py @@ -1,7 +1,7 @@ -import pybamm +from pybamm import exp, constants -def graphite_diffusivity_PeymanMPM(sto, T, T_inf, E_D_s, R_g): +def graphite_diffusivity_PeymanMPM(sto, T): """ Graphite diffusivity as a function of stochiometry, in this case the diffusivity is taken to be a constant. The value is taken from Peyman MPM. @@ -12,16 +12,10 @@ def graphite_diffusivity_PeymanMPM(sto, T, T_inf, E_D_s, R_g): Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant Returns ------- @@ -30,7 +24,8 @@ def graphite_diffusivity_PeymanMPM(sto, T, T_inf, E_D_s, R_g): """ D_ref = 5.0 * 10 ** (-15) - arrhenius = pybamm.exp(E_D_s / R_g * (1 / T_inf - 1 / T)) + E_D_s = 42770 + arrhenius = exp(E_D_s / constants.R * (1 / 298.15 - 1 / T)) # Removing the fudge factor 0 * sto requires different handling of either # either simplifications or how sto is passed into this function. diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_electrolyte_reaction_rate_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_electrolyte_reaction_rate_PeymanMPM.py index 2b4ed39999..806e96936b 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_electrolyte_reaction_rate_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_electrolyte_reaction_rate_PeymanMPM.py @@ -1,7 +1,7 @@ -import pybamm +from pybamm import exp, constants -def graphite_electrolyte_reaction_rate_PeymanMPM(T, T_inf, E_r, R_g): +def graphite_electrolyte_reaction_rate_PeymanMPM(T): """ Reaction rate for Butler-Volmer reactions between graphite and LiPF6 in EC:DMC. Check the unit of Reaction rate constant k0 is from Peyman MPM. @@ -12,21 +12,16 @@ def graphite_electrolyte_reaction_rate_PeymanMPM(T, T_inf, E_r, R_g): Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Reaction rate """ m_ref = 1.061 * 10 ** (-6) # unit has been converted - arrhenius = pybamm.exp(E_r / R_g * (1 / T_inf - 1 / T)) + E_r = 37480 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/parameters.csv index 0665e170e2..35160f4ff1 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/parameters.csv @@ -37,5 +37,3 @@ Negative electrode OCP entropic change [V.K-1],[function]graphite_entropic_chang # Activation energies,,, Reference temperature [K],298.15,25C, Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_PeymanMPM,, -Negative reaction rate activation energy [J.mol-1],37480,,no info from Peyman MPM -Negative solid diffusion activation energy [J.mol-1],42770,,no info from Peyman MPM diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_reaction_rate_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_reaction_rate_Dualfoil1998.py index c60152f68e..f44414498d 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_reaction_rate_Dualfoil1998.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_reaction_rate_Dualfoil1998.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def graphite_electrolyte_reaction_rate_Dualfoil1998(T, T_inf, E_r, R_g): +def graphite_electrolyte_reaction_rate_Dualfoil1998(T): """ Reaction rate for Butler-Volmer reactions between graphite and LiPF6 in EC:DMC. @@ -11,21 +11,15 @@ def graphite_electrolyte_reaction_rate_Dualfoil1998(T, T_inf, E_r, R_g): Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant - Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Reaction rate """ m_ref = 2 * 10 ** (-5) - arrhenius = exp(E_r / R_g * (1 / T_inf - 1 / T)) + E_r = 37480 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py index 74496e5efc..935f1775f1 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def graphite_mcmb2528_diffusivity_Dualfoil1998(sto, T, T_inf, E_D_s, R_g): +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]. @@ -12,16 +12,10 @@ def graphite_mcmb2528_diffusivity_Dualfoil1998(sto, T, T_inf, E_D_s, R_g): Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant Returns ------- @@ -30,6 +24,7 @@ def graphite_mcmb2528_diffusivity_Dualfoil1998(sto, T, T_inf, E_D_s, R_g): """ D_ref = 3.9 * 10 ** (-14) - arrhenius = exp(E_D_s / R_g * (1 / T_inf - 1 / T)) + 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_mcmb2528_Marquis2019/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/parameters.csv index 260a2f62e5..76958f841c 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/parameters.csv @@ -34,5 +34,3 @@ Negative electrode OCP entropic change [V.K-1],[function]graphite_entropic_chang # Activation energies,,, Reference temperature [K],298.15,25C, Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Dualfoil1998,, -Negative reaction rate activation energy [J.mol-1],37480,, -Negative solid diffusion activation energy [J.mol-1],42770,, diff --git a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py index db3b91eea0..ba3a77c2b4 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def nco_diffusivity_Ecker2015(sto, T, T_inf, E_D_s, R_g): +def nco_diffusivity_Ecker2015(sto, T): """ NCO diffusivity as a function of stochiometry [1, 2, 3]. @@ -19,16 +19,10 @@ def nco_diffusivity_Ecker2015(sto, T, T_inf, E_D_s, R_g): Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant Returns ------- @@ -37,6 +31,7 @@ def nco_diffusivity_Ecker2015(sto, T, T_inf, E_D_s, R_g): """ D_ref = 3.7e-13 - 3.4e-13 * exp(-12 * (sto - 0.62) * (sto - 0.62)) - arrhenius = exp(-E_D_s / (R_g * T)) * exp(E_D_s / (R_g * T_inf)) + E_D_s = 8.06e4 + arrhenius = exp(-E_D_s / (constants.R * T)) * exp(E_D_s / (constants.R * 296.15)) return D_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py index 29555c2ea5..a735babde0 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py @@ -1,8 +1,7 @@ -from pybamm import exp -from scipy import constants +from pybamm import exp, constants -def nco_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g): +def nco_electrolyte_reaction_rate_Ecker2015(T): """ Reaction rate for Butler-Volmer reactions between NCO and LiPF6 in EC:DMC [1, 2, 3]. @@ -20,15 +19,8 @@ def nco_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g): Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant - Returns ------- : double @@ -38,9 +30,9 @@ def nco_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g): k_ref = 5.196e-11 # multiply by Faraday's constant to get correct units - F = constants.physical_constants["Faraday constant"][0] - m_ref = F * k_ref + m_ref = constants.F * k_ref - arrhenius = exp(-E_r / (R_g * T)) * exp(E_r / (R_g * T_inf)) + E_r = 4.36e4 + arrhenius = exp(-E_r / (constants.R * T)) * exp(E_r / (constants.R * 296.15)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv index 208ed621b4..743e748b94 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv @@ -29,5 +29,3 @@ Positive electrode OCP entropic change [V.K-1],0,, # Activation energies,,, Reference temperature [K],296.15,23C, Positive electrode reaction rate,[function]nco_electrolyte_reaction_rate_Ecker2015,, -Positive reaction rate activation energy [J.mol-1],4.36E+04,, -Positive solid diffusion activation energy [J.mol-1],8.06E+04,, diff --git a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py index e6cf756449..02ef6aae30 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py @@ -1,7 +1,7 @@ -import pybamm +from pybamm import exp, constants -def NMC_diffusivity_PeymanMPM(sto, T, T_inf, E_D_s, R_g): +def NMC_diffusivity_PeymanMPM(sto, T): """ NMC diffusivity as a function of stochiometry, in this case the diffusivity is taken to be a constant. The value is taken from Peyman MPM. @@ -12,16 +12,10 @@ def NMC_diffusivity_PeymanMPM(sto, T, T_inf, E_D_s, R_g): Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant Returns ------- @@ -30,7 +24,8 @@ def NMC_diffusivity_PeymanMPM(sto, T, T_inf, E_D_s, R_g): """ D_ref = 8 * 10 ** (-15) - arrhenius = pybamm.exp(E_D_s / R_g * (1 / T_inf - 1 / T)) + E_D_s = 18550 + arrhenius = exp(E_D_s / constants.R * (1 / 298.15 - 1 / T)) # Removing the fudge factor 0 * sto requires different handling of either # either simplifications or how sto is passed into this function. diff --git a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_electrolyte_reaction_rate_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_electrolyte_reaction_rate_PeymanMPM.py index 03963470dd..ea6311d3d9 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_electrolyte_reaction_rate_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_electrolyte_reaction_rate_PeymanMPM.py @@ -1,7 +1,7 @@ -import pybamm +from pybamm import exp, constants -def NMC_electrolyte_reaction_rate_PeymanMPM(T, T_inf, E_r, R_g): +def NMC_electrolyte_reaction_rate_PeymanMPM(T): """ Reaction rate for Butler-Volmer reactions between NMC and LiPF6 in EC:DMC. @@ -11,21 +11,15 @@ def NMC_electrolyte_reaction_rate_PeymanMPM(T, T_inf, E_r, R_g): Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant - Returns ------- : double Reaction rate """ m_ref = 4.824 * 10 ** (-6) - arrhenius = pybamm.exp(E_r / R_g * (1 / T_inf - 1 / T)) + E_r = 39570 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/parameters.csv index a5425494cc..4226bae1e9 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/parameters.csv @@ -36,5 +36,3 @@ Positive electrode OCP entropic change [V.K-1],[function]NMC_entropic_change_Pey # Activation energies,,, Reference temperature [K],298.15,25C, Positive electrode reaction rate,[function]NMC_electrolyte_reaction_rate_PeymanMPM,, -Positive reaction rate activation energy [J.mol-1],39570,,no info from Peyman MPM -Positive solid diffusion activation energy [J.mol-1],18550,,no info from Peyman MPM diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py index 88000d0fcf..05ce109f09 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def lico2_diffusivity_Dualfoil1998(sto, T, T_inf, E_D_s, R_g): +def lico2_diffusivity_Dualfoil1998(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 Dualfoil [1]. @@ -12,24 +12,18 @@ def lico2_diffusivity_Dualfoil1998(sto, T, T_inf, E_D_s, R_g): Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant Returns ------- : double Solid diffusivity """ - D_ref = 1 * 10 ** (-13) - arrhenius = exp(E_D_s / R_g * (1 / T_inf - 1 / T)) + 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_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py index c781d681cf..5094a416f7 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def lico2_electrolyte_reaction_rate_Dualfoil1998(T, T_inf, E_r, R_g): +def lico2_electrolyte_reaction_rate_Dualfoil1998(T): """ Reaction rate for Butler-Volmer reactions between lico2 and LiPF6 in EC:DMC. @@ -11,14 +11,8 @@ def lico2_electrolyte_reaction_rate_Dualfoil1998(T, T_inf, E_r, R_g): Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant Returns ------- @@ -26,6 +20,7 @@ def lico2_electrolyte_reaction_rate_Dualfoil1998(T, T_inf, E_r, R_g): Reaction rate """ m_ref = 6 * 10 ** (-7) - arrhenius = exp(E_r / R_g * (1 / T_inf - 1 / T)) + E_r = 39570 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/parameters.csv index 232b06e7d8..53218c5d56 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/parameters.csv @@ -33,6 +33,4 @@ Positive electrode OCP entropic change [V.K-1],[function]lico2_entropic_change_M ,,, # Activation energies,,, Reference temperature [K],298.15,25C, -Positive electrode reaction rate,[function]lico2_electrolyte_reaction_rate_Dualfoil1998,, -Positive reaction rate activation energy [J.mol-1],39570,, -Positive solid diffusion activation energy [J.mol-1],18550,, \ No newline at end of file +Positive electrode reaction rate,[function]lico2_electrolyte_reaction_rate_Dualfoil1998,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py index 2cd18b310e..d99ee98ec0 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def nca_diffusivity_Kim2011(sto, T, T_inf, E_D_s, R_g): +def nca_diffusivity_Kim2011(sto, T): """ NCA diffusivity as a function of stochiometry [1]. @@ -14,16 +14,10 @@ def nca_diffusivity_Kim2011(sto, T, T_inf, E_D_s, R_g): Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant Returns ------- @@ -32,6 +26,7 @@ def nca_diffusivity_Kim2011(sto, T, T_inf, E_D_s, R_g): """ D_ref = 3 * 10 ** (-15) - arrhenius = exp(E_D_s / R_g * (1 / T_inf - 1 / T)) + E_D_s = 2e4 + 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/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py index 9dd468a39f..57b916b344 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def nca_electrolyte_reaction_rate_Kim2011(T, T_inf, E_r, R_g): +def nca_electrolyte_reaction_rate_Kim2011(T): """ Reaction rate for Butler-Volmer reactions between NCA and LiPF6 in EC:DMC [1]. @@ -15,15 +15,8 @@ def nca_electrolyte_reaction_rate_Kim2011(T, T_inf, E_r, R_g): Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant - Returns ------- : double @@ -41,6 +34,7 @@ def nca_electrolyte_reaction_rate_Kim2011(T, T_inf, E_r, R_g): * i0_ref / (c_e_ref ** alpha * (c_s_max - c_s_ref) ** alpha * c_s_ref ** alpha) ) - arrhenius = exp(E_r / R_g * (1 / T_inf - 1 / T)) + E_r = 3e4 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv index d152be0362..20304bb80b 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv @@ -34,5 +34,3 @@ Positive electrode OCP entropic change [V.K-1],0,, # Activation energies,,, Reference temperature [K],298.15,25C, Positive electrode reaction rate,[function]nca_electrolyte_reaction_rate_Kim2011,, -Positive reaction rate activation energy [J.mol-1],3E4,, -Positive solid diffusion activation energy [J.mol-1],2E4,, diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py index 04ab0a2f14..224a652886 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def nmc_LGM50_diffusivity_Chen2020(sto, T, T_inf, E_D_s, R_g): +def nmc_LGM50_diffusivity_Chen2020(sto, T): """ NMC diffusivity as a function of stoichiometry, in this case the diffusivity is taken to be a constant. The value is taken from [1]. @@ -13,16 +13,11 @@ def nmc_LGM50_diffusivity_Chen2020(sto, T, T_inf, E_D_s, R_g): publication (2020). Parameters ---------- - sto: :class: `numpy.Array` + sto: :class:`pybamm.Symbol` Electrode stochiometry - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_s: double - Solid diffusion activation energy - R_g: double - The ideal gas constant + Returns ------- : double @@ -30,6 +25,7 @@ def nmc_LGM50_diffusivity_Chen2020(sto, T, T_inf, E_D_s, R_g): """ D_ref = 4e-15 - arrhenius = exp(E_D_s / R_g * (1 / T_inf - 1 / T)) + 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/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py index 9868f6cb6f..9ad06dccbc 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def nmc_LGM50_electrolyte_reaction_rate_Chen2020(T, T_inf, E_r, R_g): +def nmc_LGM50_electrolyte_reaction_rate_Chen2020(T): """ Reaction rate for Butler-Volmer reactions between NMC and LiPF6 in EC:DMC. References @@ -12,20 +12,16 @@ def nmc_LGM50_electrolyte_reaction_rate_Chen2020(T, T_inf, E_r, R_g): publication (2020). Parameters ---------- - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_r: double - Reaction activation energy - R_g: double - The ideal gas constant + Returns ------- : double Reaction rate """ m_ref = 3.59e-6 - arrhenius = exp(E_r / R_g * (1 / T_inf - 1 / T)) + E_r = 17800 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv index 98ce9717d6..562b78e8e3 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv @@ -33,6 +33,4 @@ Positive electrode OCP entropic change [V.K-1],0,, ,,, # Activation energies,,, Reference temperature [K],298.15,25C, -Positive electrode reaction rate,[function]nmc_LGM50_electrolyte_reaction_rate_Chen2020,, -Positive reaction rate activation energy [J.mol-1],17800,Chen 2020, -Positive solid diffusion activation energy [J.mol-1],18550,default, \ No newline at end of file +Positive electrode reaction rate,[function]nmc_LGM50_electrolyte_reaction_rate_Chen2020,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/electrolyte_conductivity_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/electrolyte_conductivity_PeymanMPM.py index a350f30655..229d22cea2 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/electrolyte_conductivity_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/electrolyte_conductivity_PeymanMPM.py @@ -1,7 +1,7 @@ -import pybamm +from pybamm import exp, constants -def electrolyte_conductivity_PeymanMPM(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_conductivity_PeymanMPM(c_e, T): """ Conductivity of LiPF6 in EC:DMC as a function of ion concentration. The original data is from [1]. The fit is from Dualfoil [2]. @@ -14,25 +14,20 @@ def electrolyte_conductivity_PeymanMPM(c_e, T, T_inf, E_k_e, R_g): .. [2] http://www.cchem.berkeley.edu/jsngrp/fortran.html Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_k_e: double - Electrolyte conductivity activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte conductivity """ sigma_e = 1.3 - - arrhenius = pybamm.exp(E_k_e / R_g * (1 / T_inf - 1 / T)) + 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_Mohtat2020/electrolyte_diffusivity_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/electrolyte_diffusivity_PeymanMPM.py index 0861a4328d..3014398635 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/electrolyte_diffusivity_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/electrolyte_diffusivity_PeymanMPM.py @@ -1,7 +1,7 @@ -import pybamm +from pybamm import exp, constants -def electrolyte_diffusivity_PeymanMPM(c_e, T, T_inf, E_D_e, R_g): +def electrolyte_diffusivity_PeymanMPM(c_e, T): """ Diffusivity of LiPF6 in EC:DMC as a function of ion concentration. The original data is from [1]. The fit from Dualfoil [2]. @@ -15,24 +15,20 @@ def electrolyte_diffusivity_PeymanMPM(c_e, T, T_inf, E_D_e, R_g): Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_e: double - Electrolyte diffusion activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ D_c_e = 5.35 * 10 ** (-10) - arrhenius = pybamm.exp(E_D_e / R_g * (1 / T_inf - 1 / T)) + 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_Mohtat2020/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/parameters.csv index 46ef9693c1..d9f5a9dfd8 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/parameters.csv @@ -11,5 +11,3 @@ Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_PeymanMPM,, ,,, # Activation energies,,, Reference temperature [K],298.15,25C, -Electrolyte diffusion activation energy [J.mol-1],37040,,no info from Peyman MPM -Electrolyte conductivity activation energy [J.mol-1],34700,,no info from Peyman MPM diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_conductivity_Ecker2015.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_conductivity_Ecker2015.py index 45609d47ef..a2ed7745fc 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_conductivity_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_conductivity_Ecker2015.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def electrolyte_conductivity_Ecker2015(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_conductivity_Ecker2015(c_e, T): """ Conductivity of LiPF6 in EC:DMC as a function of ion concentration [1, 2, 3]. @@ -19,20 +19,14 @@ def electrolyte_conductivity_Ecker2015(c_e, T, T_inf, E_k_e, R_g): Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_k_e: double - Electrolyte conductivity activation energy - R_g: double - The ideal gas constant Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Solid diffusivity """ @@ -43,7 +37,8 @@ def electrolyte_conductivity_Ecker2015(c_e, T, T_inf, E_k_e, R_g): sigma_e_296 = 0.2667 * cm ** 3 - 1.2983 * cm ** 2 + 1.7919 * cm + 0.1726 # add temperature dependence - C = 296 * exp(E_k_e / (R_g * 296)) - sigma_e = C * sigma_e_296 * exp(-E_k_e / (R_g * T)) / T + E_k_e = 1.71e4 + C = 296 * exp(E_k_e / (constants.R * 296)) + sigma_e = C * sigma_e_296 * exp(-E_k_e / (constants.R * T)) / T return sigma_e diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_diffusivity_Ecker2015.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_diffusivity_Ecker2015.py index f476343de7..b933363165 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_diffusivity_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_diffusivity_Ecker2015.py @@ -1,8 +1,8 @@ import pybamm -from scipy import constants +from pybamm import constants -def electrolyte_diffusivity_Ecker2015(c_e, T, T_inf, E_D_e, R_g): +def electrolyte_diffusivity_Ecker2015(c_e, T): """ Diffusivity of LiPF6 in EC:DMC as a function of ion concentration [1, 2, 3]. @@ -20,39 +20,21 @@ def electrolyte_diffusivity_Ecker2015(c_e, T, T_inf, E_D_e, R_g): Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_e: double - Electrolyte diffusion activation energy - R_g: double - The ideal gas constant Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Solid diffusivity """ # The diffusivity epends on the electrolyte conductivity - E_k_e = pybamm.Parameter("Electrolyte conductivity activation energy [J.mol-1]") - inputs = { - "Electrolyte concentration [mol.m-3]": c_e, - "Temperature [K]": T, - "Reference temperature [K]": T_inf, - "Activation energy [J.mol-1]": E_k_e, - "Ideal gas constant [J.mol-1.K-1]": R_g, - } + inputs = {"Electrolyte concentration [mol.m-3]": c_e, "Temperature [K]": T} sigma_e = pybamm.FunctionParameter("Electrolyte conductivity [S.m-1]", inputs) - # constants - k_b = constants.physical_constants["Boltzmann constant"][0] - F = constants.physical_constants["Faraday constant"][0] - q_e = constants.physical_constants["electron volt"][0] - - D_c_e = (k_b / (F * q_e)) * sigma_e * T / c_e + D_c_e = (constants.k_b / (constants.F * constants.q_e)) * sigma_e * T / c_e return D_c_e diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/parameters.csv index 3d5d6eee40..41f8491c4c 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/parameters.csv @@ -10,5 +10,3 @@ Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Ecker2015,, ,,, # Activation energies,,, Reference temperature [K],296.15,23C, -Electrolyte diffusion activation energy [J.mol-1],1.71E+04,, -Electrolyte conductivity activation energy [J.mol-1],1.71E+04,, diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/electrolyte_conductivity_Kim2011.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/electrolyte_conductivity_Kim2011.py index 477cd4e3fc..bbec2015bb 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/electrolyte_conductivity_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/electrolyte_conductivity_Kim2011.py @@ -1,7 +1,7 @@ from pybamm import exp -def electrolyte_conductivity_Kim2011(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_conductivity_Kim2011(c_e, T): """ Conductivity of LiPF6 in EC as a function of ion concentration from [1]. @@ -14,20 +14,15 @@ def electrolyte_conductivity_Kim2011(c_e, T, T_inf, E_k_e, R_g): Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_k_e: double - Electrolyte conductivity activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/electrolyte_diffusivity_Kim2011.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/electrolyte_diffusivity_Kim2011.py index e852c158b9..2e1f586ac9 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/electrolyte_diffusivity_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/electrolyte_diffusivity_Kim2011.py @@ -1,7 +1,7 @@ from pybamm import exp -def electrolyte_diffusivity_Kim2011(c_e, T, T_inf, E_D_e, R_g): +def electrolyte_diffusivity_Kim2011(c_e, T): """ Diffusivity of LiPF6 in EC as a function of ion concentration from [1]. @@ -14,20 +14,15 @@ def electrolyte_diffusivity_Kim2011(c_e, T, T_inf, E_D_e, R_g): Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_e: double - Electrolyte diffusion activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv index 524cf362b2..348c586860 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv @@ -10,5 +10,3 @@ Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Kim2011,, ,,, # Activation energies,,, Reference temperature [K],298.15,25C, -Electrolyte diffusion activation energy [J.mol-1],,Not required, -Electrolyte conductivity activation energy [J.mol-1],,Not requied, diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1.py index 2e9cf02686..73100031b8 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1.py @@ -2,7 +2,7 @@ import numpy as np -def electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1(c_e, T): """ Conductivity of LiPF6 in EC:DMC (1:1) as a function of ion concentration and Temperature. The data comes from [1]. @@ -12,13 +12,13 @@ def electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1(c_e, T, T_inf, E_k_e, R_ Dependence of the Ionic Transport Properties of Lithium-Ion Battery Electrolytes. Journal of The Electrochemical Society, 166(14), pp.A3079-A3097. ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ coeffs = np.array([7.98e-1, 2.28e2, -1.22, 5.09e-1, -4e-3, 3.79e-3]) diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7.py index 978e9cf8c1..0fb646a11c 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7.py @@ -2,7 +2,7 @@ import numpy as np -def electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7(c_e, T): """ Conductivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration and Temperature. The data comes from [1]. @@ -12,13 +12,13 @@ def electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7(c_e, T, T_inf, E_k_e, R_ Dependence of the Ionic Transport Properties of Lithium-Ion Battery Electrolytes. Journal of The Electrochemical Society, 166(14), pp.A3079-A3097. ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ coeffs = np.array([5.21e-1, 2.28e2, -1.06, 3.53e-1, -3.59e-3, 1.48e-3]) diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1.py index fbeba02856..b6b0acb7cf 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1.py @@ -2,7 +2,7 @@ import numpy as np -def electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1(c_e, T): """ Conductivity of LiPF6 in EMC:FEC (19:1) as a function of ion concentration and Temperature. The data comes from [1]. @@ -12,13 +12,13 @@ def electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1(c_e, T, T_inf, E_k_e, Dependence of the Ionic Transport Properties of Lithium-Ion Battery Electrolytes. Journal of The Electrochemical Society, 166(14), pp.A3079-A3097. ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ coeffs = np.array([2.51e-2, 1.75e2, 1.23, 2.05e-1, -8.81e-2, 2.83e-3]) diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_base.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_base.py index 4a2e45b50b..50b907ba08 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_base.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_base.py @@ -11,15 +11,15 @@ def electrolyte_conductivity_Landesfeind2019_base(c_e, T, coeffs): Dependence of the Ionic Transport Properties of Lithium-Ion Battery Electrolytes. Journal of The Electrochemical Society, 166(14), pp.A3079-A3097. ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - coeffs: :class: `numpy.Array` + coeffs: :class:`pybamm.Symbol` Fitting parameter coefficients Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ c = c_e / 1000 # mol.m-3 -> mol.l diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1.py index 510cb02fb5..3d229c9609 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1.py @@ -2,7 +2,7 @@ import numpy as np -def electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1(c_e, T): """ Diffusivity of LiPF6 in EC:DMC (1:1) as a function of ion concentration and Temperature. The data comes from [1]. @@ -12,13 +12,13 @@ def electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1(c_e, T, T_inf, E_k_e, R_g Dependence of the Ionic Transport Properties of Lithium-Ion Battery Electrolytes. Journal of The Electrochemical Society, 166(14), pp.A3079-A3097. ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ coeffs = np.array([1.47e3, 1.33, -1.69e3, -5.63e2]) diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7.py index 108ffc1693..a3e2b9c17b 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7.py @@ -2,7 +2,7 @@ import numpy as np -def electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7(c_e, T): """ Diffusivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration and Temperature. The data comes from [1]. @@ -12,13 +12,13 @@ def electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7(c_e, T, T_inf, E_k_e, R_g Dependence of the Ionic Transport Properties of Lithium-Ion Battery Electrolytes. Journal of The Electrochemical Society, 166(14), pp.A3079-A3097. ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ coeffs = np.array([1.01e3, 1.01, -1.56e3, -4.87e2]) diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1.py index 871751e43e..874c3c89f1 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1.py @@ -2,7 +2,7 @@ import numpy as np -def electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1(c_e, T): """ Diffusivity of LiPF6 in EMC:FEC (19:1) as a function of ion concentration and Temperature. The data comes from [1]. @@ -12,13 +12,13 @@ def electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1(c_e, T, T_inf, E_k_e, R Dependence of the Ionic Transport Properties of Lithium-Ion Battery Electrolytes. Journal of The Electrochemical Society, 166(14), pp.A3079-A3097. ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ coeffs = np.array([5.86e2, 1.33, -1.38e3, -5.82e2]) diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_base.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_base.py index 7c78b94152..8491a20f15 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_base.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_base.py @@ -11,15 +11,15 @@ def electrolyte_diffusivity_Landesfeind2019_base(c_e, T, coeffs): Dependence of the Ionic Transport Properties of Lithium-Ion Battery Electrolytes. Journal of The Electrochemical Society, 166(14), pp.A3079-A3097. ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - coeffs: :class: `numpy.Array` + coeffs: :class:`pybamm.Symbol` Fitting parameter coefficients Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Electrolyte diffusivity """ c = c_e / 1000 # mol.m-3 -> mol.l diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/electrolyte_conductivity_Capiglia1999.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/electrolyte_conductivity_Capiglia1999.py index e417a0c8c4..5e080d3f33 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/electrolyte_conductivity_Capiglia1999.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/electrolyte_conductivity_Capiglia1999.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def electrolyte_conductivity_Capiglia1999(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_conductivity_Capiglia1999(c_e, T): """ Conductivity of LiPF6 in EC:DMC as a function of ion concentration. The original data is from [1]. The fit is from Dualfoil [2]. @@ -12,22 +12,18 @@ def electrolyte_conductivity_Capiglia1999(c_e, T, T_inf, E_k_e, R_g): properties of non-aqueous electrolyte solutions for rechargeable lithium batteries. Journal of power sources 81 (1999): 859-862. .. [2] http://www.cchem.berkeley.edu/jsngrp/fortran.html + Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_k_e: double - Electrolyte conductivity activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Solid diffusivity """ @@ -38,6 +34,7 @@ def electrolyte_conductivity_Capiglia1999(c_e, T, T_inf, E_k_e, R_g): + 0.1554 * (c_e / 1000) ** 3 ) - arrhenius = exp(E_k_e / R_g * (1 / T_inf - 1 / T)) + 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_Marquis2019/electrolyte_diffusivity_Capiglia1999.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/electrolyte_diffusivity_Capiglia1999.py index bc09baf5a9..a0308fb81b 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/electrolyte_diffusivity_Capiglia1999.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/electrolyte_diffusivity_Capiglia1999.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def electrolyte_diffusivity_Capiglia1999(c_e, T, T_inf, E_D_e, R_g): +def electrolyte_diffusivity_Capiglia1999(c_e, T): """ Diffusivity of LiPF6 in EC:DMC as a function of ion concentration. The original data is from [1]. The fit from Dualfoil [2]. @@ -15,24 +15,20 @@ def electrolyte_diffusivity_Capiglia1999(c_e, T, T_inf, E_D_e, R_g): Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_e: double - Electrolyte diffusion activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Solid diffusivity """ D_c_e = 5.34e-10 * exp(-0.65 * c_e / 1000) - arrhenius = exp(E_D_e / R_g * (1 / T_inf - 1 / T)) + 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_Marquis2019/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/parameters.csv index cd52483d6d..1203071bbd 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/parameters.csv @@ -10,5 +10,3 @@ Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Capiglia1999 ,,, # Activation energies,,, Reference temperature [K],298.15,25C, -Electrolyte diffusion activation energy [J.mol-1],37040,, -Electrolyte conductivity activation energy [J.mol-1],34700,, diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/electrolyte_conductivity_Nyman2008.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/electrolyte_conductivity_Nyman2008.py index 168b35e6e3..defa74e43b 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/electrolyte_conductivity_Nyman2008.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/electrolyte_conductivity_Nyman2008.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def electrolyte_conductivity_Nyman2008(c_e, T, T_inf, E_k_e, R_g): +def electrolyte_conductivity_Nyman2008(c_e, T): """ Conductivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration. The data comes from [1]. @@ -12,19 +12,14 @@ def electrolyte_conductivity_Nyman2008(c_e, T, T_inf, E_k_e, R_g): Electrochim. Acta, vol. 53, no. 22, pp. 6356–6365, 2008. Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_k_e: double - Electrolyte conductivity activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Solid diffusivity """ @@ -32,6 +27,7 @@ def electrolyte_conductivity_Nyman2008(c_e, T, T_inf, E_k_e, R_g): 0.1297 * (c_e / 1000) ** 3 - 2.51 * (c_e / 1000) ** 1.5 + 3.329 * (c_e / 1000) ) - arrhenius = exp(E_k_e / R_g * (1 / T_inf - 1 / T)) + 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_Nyman2008/electrolyte_diffusivity_Nyman2008.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/electrolyte_diffusivity_Nyman2008.py index a93baf8183..bee3152dcf 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/electrolyte_diffusivity_Nyman2008.py +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/electrolyte_diffusivity_Nyman2008.py @@ -1,7 +1,7 @@ -from pybamm import exp +from pybamm import exp, constants -def electrolyte_diffusivity_Nyman2008(c_e, T, T_inf, E_D_e, R_g): +def electrolyte_diffusivity_Nyman2008(c_e, T): """ Diffusivity of LiPF6 in EC:EMC (3:7) as a function of ion concentration. The data comes from [1] @@ -12,23 +12,19 @@ def electrolyte_diffusivity_Nyman2008(c_e, T, T_inf, E_D_e, R_g): Electrochim. Acta, vol. 53, no. 22, pp. 6356–6365, 2008. Parameters ---------- - c_e: :class: `numpy.Array` + c_e: :class:`pybamm.Symbol` Dimensional electrolyte concentration - T: :class: `numpy.Array` + T: :class:`pybamm.Symbol` Dimensional temperature - T_inf: double - Reference temperature - E_D_e: double - Electrolyte diffusion activation energy - R_g: double - The ideal gas constant + Returns ------- - :`numpy.Array` + :class:`pybamm.Symbol` Solid diffusivity """ D_c_e = 8.794e-11 * (c_e / 1000) ** 2 - 3.972e-10 * (c_e / 1000) + 4.862e-10 - arrhenius = exp(E_D_e / R_g * (1 / T_inf - 1 / T)) + 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_Nyman2008/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/parameters.csv index f291c1b66f..c91414b83b 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/parameters.csv @@ -9,6 +9,4 @@ Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Nyman2008,Nym Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Nyman2008,Nyman 2008," " ,,, # Activation energies,,, -Reference temperature [K],298.15,25C, -Electrolyte diffusion activation energy [J.mol-1],37040,default, -Electrolyte conductivity activation energy [J.mol-1],34700,default, \ No newline at end of file +Reference temperature [K],298.15,25C, \ No newline at end of file diff --git a/pybamm/parameters/constants.py b/pybamm/parameters/constants.py new file mode 100644 index 0000000000..5f9d9ba5dd --- /dev/null +++ b/pybamm/parameters/constants.py @@ -0,0 +1,10 @@ +# +# Standard constants +# +from scipy import constants +from pybamm import Scalar + +R = Scalar(constants.R) +F = Scalar(constants.physical_constants["Faraday constant"][0]) +k_b = constants.physical_constants["Boltzmann constant"][0] +q_e = constants.physical_constants["electron volt"][0] diff --git a/pybamm/parameters/standard_parameters_lead_acid.py b/pybamm/parameters/standard_parameters_lead_acid.py index 15e45d3fcd..1d66bf615e 100644 --- a/pybamm/parameters/standard_parameters_lead_acid.py +++ b/pybamm/parameters/standard_parameters_lead_acid.py @@ -6,7 +6,6 @@ """ import pybamm import numpy as np -from scipy import constants # -------------------------------------------------------------------------------------- @@ -21,8 +20,8 @@ # -------------------------------------------------------------------------------------- "1. Dimensional Parameters" # Physical constants -R = pybamm.Scalar(constants.R) -F = pybamm.Scalar(constants.physical_constants["Faraday constant"][0]) +R = pybamm.constants.R +F = pybamm.constants.F T_ref = pybamm.Parameter("Reference temperature [K]") # Macroscale geometry diff --git a/pybamm/parameters/standard_parameters_lithium_ion.py b/pybamm/parameters/standard_parameters_lithium_ion.py index 2b3a8323bc..0571fa9cb6 100644 --- a/pybamm/parameters/standard_parameters_lithium_ion.py +++ b/pybamm/parameters/standard_parameters_lithium_ion.py @@ -6,7 +6,6 @@ """ import pybamm import numpy as np -from scipy import constants # -------------------------------------------------------------------------------------- @@ -22,8 +21,8 @@ "1. Dimensional Parameters" # Physical constants -R = pybamm.Scalar(constants.R) -F = pybamm.Scalar(constants.physical_constants["Faraday constant"][0]) +R = pybamm.constants.R +F = pybamm.constants.F T_ref = pybamm.Parameter("Reference temperature [K]") # Macroscale geometry @@ -125,14 +124,6 @@ def c_p_init_dimensional(x): # thermal Delta_T = pybamm.thermal_parameters.Delta_T -# Activation energies -E_r_n = pybamm.thermal_parameters.E_r_n -E_r_p = pybamm.thermal_parameters.E_r_p -E_D_s_n = pybamm.thermal_parameters.E_D_s_n -E_D_s_p = pybamm.thermal_parameters.E_D_s_p -E_D_e = pybamm.thermal_parameters.E_D_e -E_k_e = pybamm.thermal_parameters.E_k_e - # velocity scale velocity_scale = pybamm.Scalar(1) @@ -142,75 +133,39 @@ def c_p_init_dimensional(x): def D_e_dimensional(c_e, T): "Dimensional diffusivity in electrolyte" - inputs = { - "Electrolyte concentration [mol.m-3]": c_e, - "Temperature [K]": T, - "Reference temperature [K]": T_ref, - "Activation energy [J.mol-1]": E_D_e, - "Ideal gas constant [J.mol-1.K-1]": R, - } + inputs = {"Electrolyte concentration [mol.m-3]": c_e, "Temperature [K]": T} return pybamm.FunctionParameter("Electrolyte diffusivity [m2.s-1]", inputs) def kappa_e_dimensional(c_e, T): "Dimensional electrolyte conductivity" - inputs = { - "Electrolyte concentration [mol.m-3]": c_e, - "Temperature [K]": T, - "Reference temperature [K]": T_ref, - "Activation energy [J.mol-1]": E_k_e, - "Ideal gas constant [J.mol-1.K-1]": R, - } + inputs = {"Electrolyte concentration [mol.m-3]": c_e, "Temperature [K]": T} return pybamm.FunctionParameter("Electrolyte conductivity [S.m-1]", inputs) def D_n_dimensional(sto, T): """Dimensional diffusivity in negative particle. Note this is defined as a function of stochiometry""" - - inputs = { - "Negative particle stoichiometry": sto, - "Temperature [K]": T, - "Reference temperature [K]": T_ref, - "Activation energy [J.mol-1]": E_D_s_n, - "Ideal gas constant [J.mol-1.K-1]": R, - } - + inputs = {"Negative particle stoichiometry": sto, "Temperature [K]": T} return pybamm.FunctionParameter("Negative electrode diffusivity [m2.s-1]", inputs) def D_p_dimensional(sto, T): """Dimensional diffusivity in positive particle. Note this is defined as a function of stochiometry""" - inputs = { - "Positive particle stoichiometry": sto, - "Temperature [K]": T, - "Reference temperature [K]": T_ref, - "Activation energy [J.mol-1]": E_D_s_p, - "Ideal gas constant [J.mol-1.K-1]": R, - } + inputs = {"Positive particle stoichiometry": sto, "Temperature [K]": T} return pybamm.FunctionParameter("Positive electrode diffusivity [m2.s-1]", inputs) def m_n_dimensional(T): "Dimensional negative reaction rate" - inputs = { - "Temperature [K]": T, - "Reference temperature [K]": T_ref, - "Activation energy [J.mol-1]": E_r_n, - "Ideal gas constant [J.mol-1.K-1]": R, - } + inputs = {"Temperature [K]": T} return pybamm.FunctionParameter("Negative electrode reaction rate", inputs) def m_p_dimensional(T): "Dimensional negative reaction rate" - inputs = { - "Temperature [K]": T, - "Reference temperature [K]": T_ref, - "Activation energy [J.mol-1]": E_r_p, - "Ideal gas constant [J.mol-1.K-1]": R, - } + inputs = {"Temperature [K]": T} return pybamm.FunctionParameter("Positive electrode reaction rate", inputs) diff --git a/pybamm/parameters/thermal_parameters.py b/pybamm/parameters/thermal_parameters.py index 15f0f9ee8f..76ce5e850d 100644 --- a/pybamm/parameters/thermal_parameters.py +++ b/pybamm/parameters/thermal_parameters.py @@ -63,14 +63,6 @@ pybamm.electrical_parameters.i_typ * Phi_dim / h_dim ) # computed from balance of typical cross-cell Ohmic heating with surface heat loss -# Activation energies -E_r_n = pybamm.Parameter("Negative reaction rate activation energy [J.mol-1]") -E_r_p = pybamm.Parameter("Positive reaction rate activation energy [J.mol-1]") -E_D_s_n = pybamm.Parameter("Negative solid diffusion activation energy [J.mol-1]") -E_D_s_p = pybamm.Parameter("Positive solid diffusion activation energy [J.mol-1]") -E_D_e = pybamm.Parameter("Electrolyte diffusion activation energy [J.mol-1]") -E_k_e = pybamm.Parameter("Electrolyte conductivity activation energy [J.mol-1]") - # Initial temperature T_init_dim = pybamm.Parameter("Initial temperature [K]") From 877f18321e86a16a4851fc3a6e8e6ae40f6bd4bf Mon Sep 17 00:00:00 2001 From: Valentin Sulzer Date: Sun, 5 Apr 2020 08:58:55 -0400 Subject: [PATCH 2/5] #936 fix Landesfeind test --- .../test_parameter_sets/test_Landesfeind2020.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_parameters/test_parameter_sets/test_Landesfeind2020.py b/tests/unit/test_parameters/test_parameter_sets/test_Landesfeind2020.py index 6a7e16e6b9..00bc66ea38 100644 --- a/tests/unit/test_parameters/test_parameter_sets/test_Landesfeind2020.py +++ b/tests/unit/test_parameters/test_parameter_sets/test_Landesfeind2020.py @@ -22,10 +22,10 @@ def test_electrolyte_conductivity(self): T_ref = 298.15 T = T_ref + 30.0 c = 1000.0 - k = [np.around(f(c, T, np.nan, np.nan, np.nan).value, 6) for f in funcs] + k = [np.around(f(c, T).value, 6) for f in funcs] self.assertEqual(k, [1.839786, 1.361015, 0.750259]) T += 20 - k = [np.around(f(c, T, np.nan, np.nan, np.nan).value, 6) for f in funcs] + k = [np.around(f(c, T).value, 6) for f in funcs] self.assertEqual(k, [2.292425, 1.664438, 0.880755]) chemistry = pybamm.parameter_sets.Chen2020 @@ -50,10 +50,10 @@ def test_electrolyte_diffusivity(self): T_ref = 298.15 T = T_ref + 30.0 c = 1000.0 - D = [np.around(f(c, T, np.nan, np.nan, np.nan).value, 16) for f in funcs] + D = [np.around(f(c, T).value, 16) for f in funcs] self.assertEqual(D, [5.796505e-10, 5.417881e-10, 5.608856e-10]) T += 20 - D = [np.around(f(c, T, np.nan, np.nan, np.nan).value, 16) for f in funcs] + D = [np.around(f(c, T).value, 16) for f in funcs] self.assertEqual(D, [8.5992e-10, 7.752815e-10, 7.907549e-10]) chemistry = pybamm.parameter_sets.Chen2020 From d6b1a9e9240f95d1902254b42410fc1e4e2b8760 Mon Sep 17 00:00:00 2001 From: Valentin Sulzer Date: Sun, 5 Apr 2020 11:54:22 -0400 Subject: [PATCH 3/5] #936 update docs --- .../graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py | 2 +- .../anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py | 2 +- .../graphite_Ecker2015/graphite_ocp_Ecker2015_function.py | 2 +- .../anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py | 2 +- .../graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py | 2 +- .../graphite_entropic_change_PeymanMPM.py | 2 +- .../graphite_entropic_change_Moura2016.py | 2 +- .../graphite_mcmb2528_diffusivity_Dualfoil1998.py | 2 +- .../cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py | 2 +- .../nco_electrolyte_reaction_rate_Ecker2015.py | 2 +- .../cathodes/LiNiCoO2_Ecker2015/nco_ocp_Ecker2015_function.py | 2 +- .../cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py | 2 +- .../NMC_electrolyte_reaction_rate_PeymanMPM.py | 2 +- .../NMC_UMBL_Mohtat2020/NMC_entropic_change_PeymanMPM.py | 2 +- .../cathodes/NMC_UMBL_Mohtat2020/NMC_ocp_PeymanMPM.py | 2 +- .../lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py | 2 +- .../lico2_electrolyte_reaction_rate_Dualfoil1998.py | 2 +- .../lico2_Marquis2019/lico2_entropic_change_Moura2016.py | 2 +- .../cathodes/lico2_Marquis2019/lico2_ocp_Dualfoil1998.py | 2 +- .../lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py | 2 +- .../nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py | 2 +- .../cathodes/nca_Kim2011/nca_ocp_Kim2011_function.py | 2 +- .../cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py | 2 +- .../nmc_LGM50_electrolyte_reaction_rate_Chen2020.py | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py index 2fb9ac7dd6..5b7b49c354 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py @@ -22,7 +22,7 @@ def graphite_LGM50_diffusivity_Chen2020(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py index cb5df907b5..c792d5490a 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_diffusivity_Ecker2015.py @@ -26,7 +26,7 @@ def graphite_diffusivity_Ecker2015(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_ocp_Ecker2015_function.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_ocp_Ecker2015_function.py index 2934ab5c43..2b15d95e5c 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_ocp_Ecker2015_function.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_ocp_Ecker2015_function.py @@ -24,7 +24,7 @@ def graphite_ocp_Ecker2015_function(sto): Returns ------- - : double + :class:`pybamm.Symbol` Open circuit potential """ diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py index 5d5f09b6bb..c247b5c167 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py @@ -21,7 +21,7 @@ def graphite_diffusivity_Kim2011(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py index 04567c98b0..ad34d94ebd 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_diffusivity_PeymanMPM.py @@ -19,7 +19,7 @@ def graphite_diffusivity_PeymanMPM(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_entropic_change_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_entropic_change_PeymanMPM.py index 6fa29bb852..5724f8503a 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_entropic_change_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/graphite_entropic_change_PeymanMPM.py @@ -10,7 +10,7 @@ def graphite_entropic_change_PeymanMPM(sto, c_n_max): Parameters ---------- - sto: double + sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_entropic_change_Moura2016.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_entropic_change_Moura2016.py index 38cd5aff44..f0f1f11ee2 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_entropic_change_Moura2016.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_entropic_change_Moura2016.py @@ -13,7 +13,7 @@ def graphite_entropic_change_Moura2016(sto, c_n_max): Parameters ---------- - sto: double + sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py index 935f1775f1..a4ec9f9f6d 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py @@ -19,7 +19,7 @@ def graphite_mcmb2528_diffusivity_Dualfoil1998(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py index ba3a77c2b4..b30be3138f 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_diffusivity_Ecker2015.py @@ -26,7 +26,7 @@ def nco_diffusivity_Ecker2015(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py index a735babde0..dba37e5555 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py @@ -23,7 +23,7 @@ def nco_electrolyte_reaction_rate_Ecker2015(T): Dimensional temperature Returns ------- - : double + :class:`pybamm.Symbol` Reaction rate """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_ocp_Ecker2015_function.py b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_ocp_Ecker2015_function.py index 27905fca4a..008c173edb 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_ocp_Ecker2015_function.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_ocp_Ecker2015_function.py @@ -19,7 +19,7 @@ def nco_ocp_Ecker2015_function(sto): Parameters ---------- - sto: double + sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py index 02ef6aae30..3eb7b28184 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_diffusivity_PeymanMPM.py @@ -19,7 +19,7 @@ def NMC_diffusivity_PeymanMPM(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_electrolyte_reaction_rate_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_electrolyte_reaction_rate_PeymanMPM.py index ea6311d3d9..b2a20cda3d 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_electrolyte_reaction_rate_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_electrolyte_reaction_rate_PeymanMPM.py @@ -15,7 +15,7 @@ def NMC_electrolyte_reaction_rate_PeymanMPM(T): Dimensional temperature Returns ------- - : double + :class:`pybamm.Symbol` Reaction rate """ m_ref = 4.824 * 10 ** (-6) diff --git a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_entropic_change_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_entropic_change_PeymanMPM.py index 233ec0c900..60fa6ecaa5 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_entropic_change_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_entropic_change_PeymanMPM.py @@ -15,7 +15,7 @@ def NMC_entropic_change_PeymanMPM(sto, c_p_max): Parameters ---------- - sto: double + sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_ocp_PeymanMPM.py b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_ocp_PeymanMPM.py index f0bb8f3cca..8cde5060df 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_ocp_PeymanMPM.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/NMC_ocp_PeymanMPM.py @@ -12,7 +12,7 @@ def NMC_ocp_PeymanMPM(sto): Parameters ---------- - sto: double + sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py index 05ce109f09..d4c0038ee1 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py @@ -19,7 +19,7 @@ def lico2_diffusivity_Dualfoil1998(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ D_ref = 1 * 10 ** (-13) diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py index 5094a416f7..f4417df82d 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py @@ -16,7 +16,7 @@ def lico2_electrolyte_reaction_rate_Dualfoil1998(T): Returns ------- - : double + :class:`pybamm.Symbol` Reaction rate """ m_ref = 6 * 10 ** (-7) diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_entropic_change_Moura2016.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_entropic_change_Moura2016.py index 5b278d8953..9f3baeb4e6 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_entropic_change_Moura2016.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_entropic_change_Moura2016.py @@ -13,7 +13,7 @@ def lico2_entropic_change_Moura2016(sto, c_p_max): Parameters ---------- - sto: double + sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_ocp_Dualfoil1998.py b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_ocp_Dualfoil1998.py index fcea7762be..78dfee5ee4 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_ocp_Dualfoil1998.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_ocp_Dualfoil1998.py @@ -18,7 +18,7 @@ def lico2_ocp_Dualfoil1998(sto): Parameters ---------- - sto: double + sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py index d99ee98ec0..3a7352f01a 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py @@ -21,7 +21,7 @@ def nca_diffusivity_Kim2011(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py index 57b916b344..07d4118a78 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py @@ -19,7 +19,7 @@ def nca_electrolyte_reaction_rate_Kim2011(T): Dimensional temperature Returns ------- - : double + :class:`pybamm.Symbol` Reaction rate """ i0_ref = 4 # reference exchange current density at 100% SOC diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_ocp_Kim2011_function.py b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_ocp_Kim2011_function.py index 8366020f0f..3edf208341 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_ocp_Kim2011_function.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_ocp_Kim2011_function.py @@ -14,7 +14,7 @@ def nca_ocp_Kim2011_function(sto): Parameters ---------- - sto: double + sto : :class:`pybamm.Symbol` Stochiometry of material (li-fraction) """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py index 224a652886..975596f89c 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py @@ -20,7 +20,7 @@ def nmc_LGM50_diffusivity_Chen2020(sto, T): Returns ------- - : double + :class:`pybamm.Symbol` Solid diffusivity """ diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py index 9ad06dccbc..8b2e90a75c 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py @@ -17,7 +17,7 @@ def nmc_LGM50_electrolyte_reaction_rate_Chen2020(T): Returns ------- - : double + :class:`pybamm.Symbol` Reaction rate """ m_ref = 3.59e-6 From 0da83f1e87f3b25690c4a63d55a33ab8f06fb4da Mon Sep 17 00:00:00 2001 From: Valentin Sulzer Date: Sun, 5 Apr 2020 11:59:08 -0400 Subject: [PATCH 4/5] #936 changelog [ci skip] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ad901ee7..7496fa74cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - Made `QuickPlot` compatible with Google Colab ([#935](https://github.com/pybamm-team/PyBaMM/pull/935)) +## Breaking changes + +- Removed some inputs like `T_inf`, `R_g` and activation energies to some of the standard function parameters. This is because each of those inputs is specific to a particular function (e.g. the reference temperature at which the function was measured). To change a property such as the activation energy, users should create a new function, specifying the relevant property as a `Parameter` or `InputParameter` ([#942](https://github.com/pybamm-team/PyBaMM/pull/942)) + # [v0.2.1](https://github.com/pybamm-team/PyBaMM/tree/v0.2.1) - 2020-03-31 New expression tree node types, models, parameter sets and solvers, as well as general bug fixes and new examples. From d6943eceddaf9dd88c787c864a71944971fbabe3 Mon Sep 17 00:00:00 2001 From: Valentin Sulzer Date: Mon, 6 Apr 2020 10:12:01 -0400 Subject: [PATCH 5/5] #936 ferran comments --- .../graphite_LGM50_diffusivity_Chen2020.py | 3 ++- ...ite_LGM50_electrolyte_reaction_rate_Chen2020.py | 3 ++- .../anodes/graphite_Chen2020/parameters.csv | 3 +-- .../anodes/graphite_Ecker2015/parameters.csv | 4 +--- .../anodes/graphite_Kim2011/parameters.csv | 3 +-- .../anodes/graphite_UMBL_Mohtat2020/parameters.csv | 3 +-- .../graphite_mcmb2528_Marquis2019/parameters.csv | 3 +-- .../cathodes/LiNiCoO2_Ecker2015/parameters.csv | 3 +-- .../cathodes/NMC_UMBL_Mohtat2020/parameters.csv | 3 +-- .../cathodes/lico2_Marquis2019/parameters.csv | 3 +-- .../cathodes/nca_Kim2011/parameters.csv | 3 +-- .../cathodes/nmc_Chen2020/parameters.csv | 3 +-- .../electrolytes/LiPF6_Mohtat2020/parameters.csv | 3 --- .../electrolytes/lipf6_Ecker2015/parameters.csv | 3 --- .../electrolytes/lipf6_Kim2011/parameters.csv | 3 --- .../electrolytes/lipf6_Marquis2019/parameters.csv | 3 --- .../electrolytes/lipf6_Nyman2008/parameters.csv | 5 +---- .../test_parameter_sets/test_LGM50_Chen2020.py | 6 +++--- .../test_parameter_sets/test_NCA_Kim2011.py | 6 +++--- .../test_parameter_sets/test_NCO_Ecker2015.py | 2 +- .../test_parameter_sets/test_UMBL_Mohtat2020.py | 14 +++++++------- .../unit/test_parameters/test_parameter_values.py | 4 ++-- tests/unit/test_parameters/test_parameters_cli.py | 2 +- 23 files changed, 32 insertions(+), 56 deletions(-) diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py index 5b7b49c354..a877cafc06 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py @@ -27,6 +27,7 @@ def graphite_LGM50_diffusivity_Chen2020(sto, T): """ D_ref = 3.3e-14 - arrhenius = exp(42770 / constants.R * (1 / 298.15 - 1 / T)) + 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_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py index 6ec25b37c2..d718d6be6f 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py @@ -24,6 +24,7 @@ def graphite_LGM50_electrolyte_reaction_rate_Chen2020(T): """ m_ref = 6.48e-7 - arrhenius = exp(3500 / constants.R * (1 / 298.15 - 1 / T)) + E_r = 35000 + arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T)) return m_ref * arrhenius diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv index c1f2d58d56..89537289cf 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv @@ -31,6 +31,5 @@ Negative electrode specific heat capacity [J.kg-1.K-1],700,default, Negative electrode thermal conductivity [W.m-1.K-1],1.7,default, Negative electrode OCP entropic change [V.K-1],0,, ,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, +# Reaction rate,,, Negative electrode reaction rate,[function]graphite_LGM50_electrolyte_reaction_rate_Chen2020,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv index 8bf8ecb68f..16d18a511a 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv @@ -25,7 +25,5 @@ Negative electrode electrons in reaction,1,, # Thermal parameters,,, Negative electrode OCP entropic change [V.K-1],0,, ,,, -# Activation energies,,, -Reference temperature [K],296.15,23C, +# Reaction rate,,, Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Ecker2015,, -Negative reaction rate activation energy [J.mol-1],53400,, diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv index ddedd05ed6..3bdc59e150 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv @@ -31,6 +31,5 @@ Negative electrode specific heat capacity [J.kg-1.K-1],700,, Negative electrode thermal conductivity [W.m-1.K-1],1.1339,1.7 * 0.667, Negative electrode OCP entropic change [V.K-1],0,, ,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, +# Reaction rate,,, Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Kim2011,, diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/parameters.csv index 35160f4ff1..7041ba8628 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_UMBL_Mohtat2020/parameters.csv @@ -34,6 +34,5 @@ Negative electrode specific heat capacity [J.kg-1.K-1],1100,Peyman MPM,cell lump Negative electrode thermal conductivity [W.m-1.K-1],1.7,,no info from Peyman MPM Negative electrode OCP entropic change [V.K-1],[function]graphite_entropic_change_PeymanMPM,, ,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, +# Reaction rate,,, Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_PeymanMPM,, diff --git a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/parameters.csv b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/parameters.csv index 76958f841c..45564371fb 100644 --- a/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/parameters.csv @@ -31,6 +31,5 @@ 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,, ,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, +# Reaction rate,,, Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Dualfoil1998,, diff --git a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv index 743e748b94..18b95b2500 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv @@ -26,6 +26,5 @@ Positive electrode electrons in reaction,1,, # Thermal parameters,,, Positive electrode OCP entropic change [V.K-1],0,, ,,, -# Activation energies,,, -Reference temperature [K],296.15,23C, +# Reaction rate,,, Positive electrode reaction rate,[function]nco_electrolyte_reaction_rate_Ecker2015,, diff --git a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/parameters.csv index 4226bae1e9..20e3f4e08c 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/NMC_UMBL_Mohtat2020/parameters.csv @@ -33,6 +33,5 @@ Positive electrode specific heat capacity [J.kg-1.K-1],1100,Peyman MPM, cell lum Positive electrode thermal conductivity [W.m-1.K-1],2.1,,no info from Peyman MPM Positive electrode OCP entropic change [V.K-1],[function]NMC_entropic_change_PeymanMPM, ,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, +# Reaction rate,,, Positive electrode reaction rate,[function]NMC_electrolyte_reaction_rate_PeymanMPM,, diff --git a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/parameters.csv index 53218c5d56..d880bf94f6 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/parameters.csv @@ -31,6 +31,5 @@ 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,, ,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, +# Reaction rate,,, Positive electrode reaction rate,[function]lico2_electrolyte_reaction_rate_Dualfoil1998,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv index 20304bb80b..af51478869 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv @@ -31,6 +31,5 @@ Positive electrode specific heat capacity [J.kg-1.K-1],700,, Positive electrode thermal conductivity [W.m-1.K-1],1.4007, 2.1 * 0.667, Positive electrode OCP entropic change [V.K-1],0,, ,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, +# Reaction rate,,, Positive electrode reaction rate,[function]nca_electrolyte_reaction_rate_Kim2011,, diff --git a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv index 562b78e8e3..531a69ef75 100644 --- a/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv @@ -31,6 +31,5 @@ Positive electrode specific heat capacity [J.kg-1.K-1],700,default, Positive electrode thermal conductivity [W.m-1.K-1],2.1,default, Positive electrode OCP entropic change [V.K-1],0,, ,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, +# Reaction rate,,, Positive electrode reaction rate,[function]nmc_LGM50_electrolyte_reaction_rate_Chen2020,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/parameters.csv index d9f5a9dfd8..528ec51dab 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/parameters.csv @@ -8,6 +8,3 @@ Cation transference number,0.38,Peyman MPM, Typical lithium ion diffusivity [m2.s-1],5.34E-10,Scott Moura FastDFN, Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_PeymanMPM,, Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_PeymanMPM,, -,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/parameters.csv index 41f8491c4c..7ef0733506 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/parameters.csv @@ -7,6 +7,3 @@ Cation transference number,0.26,, 1 + dlnf/dlnc,1,, Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Ecker2015,, Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Ecker2015,, -,,, -# Activation energies,,, -Reference temperature [K],296.15,23C, diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv index 348c586860..c0a0b0d75b 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv @@ -7,6 +7,3 @@ Cation transference number,0.4,Reported as a function in Kim2011 (Implement late 1 + dlnf/dlnc,1,, Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Kim2011,, Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Kim2011,, -,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/parameters.csv index 1203071bbd..ed7e67cff3 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Marquis2019/parameters.csv @@ -7,6 +7,3 @@ Cation transference number,0.4,Scott Moura FastDFN, 1 + dlnf/dlnc,1,, Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Capiglia1999,, Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Capiglia1999,, -,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/parameters.csv b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/parameters.csv index c91414b83b..c6e77e42a6 100644 --- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/parameters.csv @@ -6,7 +6,4 @@ Typical electrolyte concentration [mol.m-3],1000,Chen 2020, Cation transference number,0.2594,Chen 2020, 1 + dlnf/dlnc,1,, Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Nyman2008,Nyman 2008," " -Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Nyman2008,Nyman 2008," " -,,, -# Activation energies,,, -Reference temperature [K],298.15,25C, \ No newline at end of file +Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Nyman2008,Nyman 2008," " \ No newline at end of file diff --git a/tests/unit/test_parameters/test_parameter_sets/test_LGM50_Chen2020.py b/tests/unit/test_parameters/test_parameter_sets/test_LGM50_Chen2020.py index e10ca718d6..8a720ba3c3 100644 --- a/tests/unit/test_parameters/test_parameter_sets/test_LGM50_Chen2020.py +++ b/tests/unit/test_parameters/test_parameter_sets/test_LGM50_Chen2020.py @@ -12,14 +12,14 @@ def test_load_params(self): "input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv" ) ) - self.assertEqual(anode["Reference temperature [K]"], "298.15") + self.assertEqual(anode["Negative electrode porosity"], "0.25") cathode = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( "input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv" ) ) - self.assertEqual(cathode["Reference temperature [K]"], "298.15") + self.assertEqual(cathode["Positive electrode porosity"], "0.335") electrolyte = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( @@ -27,7 +27,7 @@ def test_load_params(self): + "parameters.csv" ) ) - self.assertEqual(electrolyte["Reference temperature [K]"], "298.15") + self.assertEqual(electrolyte["Cation transference number"], "0.2594") cell = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( diff --git a/tests/unit/test_parameters/test_parameter_sets/test_NCA_Kim2011.py b/tests/unit/test_parameters/test_parameter_sets/test_NCA_Kim2011.py index 89f0653ae0..aab2ebc068 100644 --- a/tests/unit/test_parameters/test_parameter_sets/test_NCA_Kim2011.py +++ b/tests/unit/test_parameters/test_parameter_sets/test_NCA_Kim2011.py @@ -12,21 +12,21 @@ def test_load_params(self): "input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv" ) ) - self.assertEqual(anode["Reference temperature [K]"], "298.15") + self.assertEqual(anode["Negative electrode porosity"], "0.4") cathode = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( "input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv" ) ) - self.assertEqual(cathode["Reference temperature [K]"], "298.15") + self.assertEqual(cathode["Positive electrode porosity"], "0.4") electrolyte = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( "input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv" ) ) - self.assertEqual(electrolyte["Reference temperature [K]"], "298.15") + self.assertEqual(electrolyte["Cation transference number"], "0.4") cell = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( diff --git a/tests/unit/test_parameters/test_parameter_sets/test_NCO_Ecker2015.py b/tests/unit/test_parameters/test_parameter_sets/test_NCO_Ecker2015.py index 5d83923187..317f8fca51 100644 --- a/tests/unit/test_parameters/test_parameter_sets/test_NCO_Ecker2015.py +++ b/tests/unit/test_parameters/test_parameter_sets/test_NCO_Ecker2015.py @@ -26,7 +26,7 @@ def test_load_params(self): + "parameters.csv" ) ) - self.assertEqual(electrolyte["Reference temperature [K]"], "296.15") + self.assertEqual(electrolyte["Cation transference number"], "0.26") cell = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( diff --git a/tests/unit/test_parameters/test_parameter_sets/test_UMBL_Mohtat2020.py b/tests/unit/test_parameters/test_parameter_sets/test_UMBL_Mohtat2020.py index a909f73bf8..061907dc74 100644 --- a/tests/unit/test_parameters/test_parameter_sets/test_UMBL_Mohtat2020.py +++ b/tests/unit/test_parameters/test_parameter_sets/test_UMBL_Mohtat2020.py @@ -9,19 +9,19 @@ class TestMohtat(unittest.TestCase): def test_load_params(self): anode = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( - "input/parameters/lithium-ion/" + - "anodes/graphite_UMBL_Mohtat2020/parameters.csv" + "input/parameters/lithium-ion/" + + "anodes/graphite_UMBL_Mohtat2020/parameters.csv" ) ) - self.assertEqual(anode["Reference temperature [K]"], "298.15") + self.assertEqual(anode["Negative electrode porosity"], "0.3") cathode = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( - "input/parameters/lithium-ion/" + - "cathodes/NMC_UMBL_Mohtat2020/parameters.csv" + "input/parameters/lithium-ion/" + + "cathodes/NMC_UMBL_Mohtat2020/parameters.csv" ) ) - self.assertEqual(cathode["Reference temperature [K]"], "298.15") + self.assertEqual(cathode["Positive electrode porosity"], "0.3") electrolyte = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( @@ -29,7 +29,7 @@ def test_load_params(self): + "parameters.csv" ) ) - self.assertEqual(electrolyte["Reference temperature [K]"], "298.15") + self.assertEqual(electrolyte["Cation transference number"], "0.38") cell = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( diff --git a/tests/unit/test_parameters/test_parameter_values.py b/tests/unit/test_parameters/test_parameter_values.py index 8596c90152..23288406e2 100644 --- a/tests/unit/test_parameters/test_parameter_values.py +++ b/tests/unit/test_parameters/test_parameter_values.py @@ -23,7 +23,7 @@ def test_read_parameters_csv(self): ) ) ) - self.assertEqual(data["Reference temperature [K]"], "298.15") + self.assertEqual(data["Positive electrode porosity"], "0.3") def test_init(self): # from dict @@ -40,7 +40,7 @@ def test_init(self): + "parameters.csv" ) ) - self.assertEqual(param["Reference temperature [K]"], 298.15) + self.assertEqual(param["Positive electrode porosity"], 0.3) # values vs chemistry with self.assertRaisesRegex( diff --git a/tests/unit/test_parameters/test_parameters_cli.py b/tests/unit/test_parameters/test_parameters_cli.py index f035f0f091..8618e1d080 100644 --- a/tests/unit/test_parameters/test_parameters_cli.py +++ b/tests/unit/test_parameters/test_parameters_cli.py @@ -56,7 +56,7 @@ def test_add_param(self): new_anode = pybamm.ParameterValues({}).read_parameters_csv( new_parameter_filename ) - self.assertEqual(new_anode["Reference temperature [K]"], "298.15") + self.assertEqual(new_anode["Negative electrode porosity"], "0.3") # Clean up directories tempdir.cleanup() # Remove temporary local directory