From 8983f43a9f2ce54c6afa14e2e06edb250d426dc4 Mon Sep 17 00:00:00 2001 From: Dion Wilde <91852142+dion-w@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:19:06 +0200 Subject: [PATCH] replacing rounded faraday constant with exact value in bpx.py (#4290) * updated faraday constant to exact value in bpx.py * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> * Update CHANGELOG.md * Update pybamm/parameters/bpx.py Co-authored-by: Eric G. Kratz * Update CHANGELOG.md Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> --------- Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Co-authored-by: Eric G. Kratz Co-authored-by: Arjun Verma --- CHANGELOG.md | 2 ++ pybamm/parameters/bpx.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ab711cf21..b2f8637442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # [Unreleased](https://github.com/pybamm-team/PyBaMM/) +- Replaced rounded faraday constant with its exact value in `bpx.py` for better comparison between different tools + ## Features - Added additional user-configurable options to the (`IDAKLUSolver`) and adjusted the default values to improve performance. ([#4282](https://github.com/pybamm-team/PyBaMM/pull/4282)) diff --git a/pybamm/parameters/bpx.py b/pybamm/parameters/bpx.py index 680477a74b..2f259a8f52 100644 --- a/pybamm/parameters/bpx.py +++ b/pybamm/parameters/bpx.py @@ -240,7 +240,7 @@ def _entropic_change(sto, c_s_max, dUdT, constant=False): # (cs-cs_max)) in BPX exchange current is defined j0 = F * k_norm * sqrt((ce/ce0) * # (cs/cs_max) * (1-cs/cs_max)) c_e = pybamm_dict["Initial concentration in electrolyte [mol.m-3]"] - F = 96485 + F = pybamm.constants.F.value def _exchange_current_density(c_e, c_s_surf, c_s_max, T, k_ref, Ea): return (