From faa9a231b129f7952a23677a41da6a27df34cafc Mon Sep 17 00:00:00 2001 From: Robert Timms Date: Mon, 30 Jan 2023 13:44:25 +0000 Subject: [PATCH 1/2] update effective conductivity --- pybamm/input/parameters/lithium_ion/Chen2020.py | 4 ++-- .../parameters/lithium_ion/Chen2020_composite.py | 4 ++-- pybamm/parameters/bpx.py | 12 ++++++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pybamm/input/parameters/lithium_ion/Chen2020.py b/pybamm/input/parameters/lithium_ion/Chen2020.py index 520e0aac68..5fe1ab4d52 100644 --- a/pybamm/input/parameters/lithium_ion/Chen2020.py +++ b/pybamm/input/parameters/lithium_ion/Chen2020.py @@ -305,7 +305,7 @@ def get_parameter_values(): "Negative electrode active material volume fraction": 0.75, "Negative particle radius [m]": 5.86e-06, "Negative electrode Bruggeman coefficient (electrolyte)": 1.5, - "Negative electrode Bruggeman coefficient (electrode)": 1.5, + "Negative electrode Bruggeman coefficient (electrode)": 0, "Negative electrode cation signed stoichiometry": -1.0, "Negative electrode electrons in reaction": 1.0, "Negative electrode charge transfer coefficient": 0.5, @@ -325,7 +325,7 @@ def get_parameter_values(): "Positive electrode active material volume fraction": 0.665, "Positive particle radius [m]": 5.22e-06, "Positive electrode Bruggeman coefficient (electrolyte)": 1.5, - "Positive electrode Bruggeman coefficient (electrode)": 1.5, + "Positive electrode Bruggeman coefficient (electrode)": 0, "Positive electrode cation signed stoichiometry": -1.0, "Positive electrode electrons in reaction": 1.0, "Positive electrode charge transfer coefficient": 0.5, diff --git a/pybamm/input/parameters/lithium_ion/Chen2020_composite.py b/pybamm/input/parameters/lithium_ion/Chen2020_composite.py index 98d82b2ef3..abd12fc989 100644 --- a/pybamm/input/parameters/lithium_ion/Chen2020_composite.py +++ b/pybamm/input/parameters/lithium_ion/Chen2020_composite.py @@ -406,7 +406,7 @@ def get_parameter_values(): "Primary: Negative electrode active material volume fraction": 0.735, "Primary: Negative particle radius [m]": 5.86e-06, "Negative electrode Bruggeman coefficient (electrolyte)": 1.5, - "Negative electrode Bruggeman coefficient (electrode)": 1.5, + "Negative electrode Bruggeman coefficient (electrode)": 0, "Negative electrode cation signed stoichiometry": -1.0, "Primary: Negative electrode electrons in reaction": 1.0, "Negative electrode charge transfer coefficient": 0.5, @@ -440,7 +440,7 @@ def get_parameter_values(): "Positive electrode active material volume fraction": 0.665, "Positive particle radius [m]": 5.22e-06, "Positive electrode Bruggeman coefficient (electrolyte)": 1.5, - "Positive electrode Bruggeman coefficient (electrode)": 1.5, + "Positive electrode Bruggeman coefficient (electrode)": 0, "Positive electrode cation signed stoichiometry": -1.0, "Positive electrode electrons in reaction": 1.0, "Positive electrode charge transfer coefficient": 0.5, diff --git a/pybamm/parameters/bpx.py b/pybamm/parameters/bpx.py index 61f2445166..845bc01882 100644 --- a/pybamm/parameters/bpx.py +++ b/pybamm/parameters/bpx.py @@ -87,10 +87,14 @@ def _bpx_to_param_dict(bpx: BPX) -> dict: "Initial concentration in electrolyte [mol.m-3]" ] - # assume Bruggeman relation + # assume Bruggeman relation for effection electrolyte properties for domain in [negative_electrode, separator, positive_electrode]: pybamm_dict[domain.pre_name + "Bruggeman coefficient (electrolyte)"] = 1.5 - pybamm_dict[domain.pre_name + "Bruggeman coefficient (electrode)"] = 1.5 + + # solid phase properties reported in BPX are already "effective", + # so no correction is applied + for domain in [negative_electrode, positive_electrode]: + pybamm_dict[domain.pre_name + "Bruggeman coefficient (electrode)"] = 0 # BPX is for single cell in series, user can change this later pybamm_dict["Number of cells connected in series to make a battery"] = 1 @@ -194,6 +198,8 @@ def _positive_electrode_entropic_change(sto, c_s_max): E_a_n = pybamm_dict.get( negative_electrode.pre_name + "reaction rate activation energy [J.mol-1]", 0.0 ) + # Note that in BPX j = 2*F*k_norm*sqrt((ce/ce0)*(c/c_max)*(1-c/c_max))*sinh(...), + # and in PyBaMM j = 2*k*sqrt(ce*c*(c_max - c))*sinh(...) k_n = k_n_norm * F / (c_n_max * c_e**0.5) def _negative_electrode_exchange_current_density(c_e, c_s_surf, c_s_max, T): @@ -222,6 +228,8 @@ def _negative_electrode_exchange_current_density(c_e, c_s_surf, c_s_max, T): E_a_p = pybamm_dict.get( positive_electrode.pre_name + "reaction rate activation energy [J.mol-1]", 0.0 ) + # Note that in BPX j = 2*F*k_norm*sqrt((ce/ce0)*(c/c_max)*(1-c/c_max))*sinh(...), + # and in PyBaMM j = 2*k*sqrt(ce*c*(c_max - c))*sinh(...) k_p = k_p_norm * F / (c_p_max * c_e**0.5) def _positive_electrode_exchange_current_density(c_e, c_s_surf, c_s_max, T): From 831d41e46a2ec494d4b863cbc2a1d7281a0c4548 Mon Sep 17 00:00:00 2001 From: Robert Timms Date: Mon, 30 Jan 2023 13:48:44 +0000 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 910616de35..5e7046acfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Bug fixes +- Fixed a bug where the solid phase conductivity was double-corrected for tortuosity when loading parameters from a BPX file ([#2638](https://github.com/pybamm-team/PyBaMM/pull/2638)). - Changed termination from "success" to "final time" for algebraic solvers to match ODE/DAE solvers ([#2613](https://github.com/pybamm-team/PyBaMM/pull/2613)). # [v22.12](https://github.com/pybamm-team/PyBaMM/tree/v22.12) - 2022-12-31