From d4dccbaf95f78a9106a4567ae865214a1f69c430 Mon Sep 17 00:00:00 2001 From: Leshinka Molel Date: Tue, 13 Jul 2021 14:24:07 -0400 Subject: [PATCH 1/6] Expose additional variables --- .../full_battery_models/lithium_ion/basic_dfn_half_cell.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py index c450c43545..9d56c201c4 100644 --- a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py +++ b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py @@ -354,6 +354,7 @@ def __init__(self, name="Doyle-Fuller-Newman half cell model", options=None): * param.L_s * param.A_cc, "Current [A]": I, + "Current density [A.m-2]": i_cell, "Working electrode potential": phi_s_w, "Working electrode potential [V]": phi_s_w_ref + pot * phi_s_w, "Working electrode open circuit potential": U_w(c_s_surf_w, T), @@ -367,6 +368,11 @@ def __init__(self, name="Doyle-Fuller-Newman half cell model", options=None): + pot * vdrop_cell, "Terminal voltage": voltage, "Terminal voltage [V]": phi_s_w_ref + param.U_n_ref + pot * voltage, + "Specific power [W.m-2]": i_cell * i_typ * (phi_s_w_ref + param.U_n_ref + pot * voltage), + "Pore-wall flux [mol.m-2.s-1]": j_w, + "Flux [mol.m-2.s-1]": N_e, + "Ratio of electrolyte diffusion to discharge time": param.C_e, + "Ratio of solid diffusion to discharge time": param.C_p, } @property From ff113457acf7fbfa1b82acd6dc4bd0c2a1faa1f1 Mon Sep 17 00:00:00 2001 From: Leshinka Molel Date: Tue, 13 Jul 2021 14:27:01 -0400 Subject: [PATCH 2/6] Remove flux --- .../full_battery_models/lithium_ion/basic_dfn_half_cell.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py index 9d56c201c4..15e37e0691 100644 --- a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py +++ b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py @@ -370,7 +370,6 @@ def __init__(self, name="Doyle-Fuller-Newman half cell model", options=None): "Terminal voltage [V]": phi_s_w_ref + param.U_n_ref + pot * voltage, "Specific power [W.m-2]": i_cell * i_typ * (phi_s_w_ref + param.U_n_ref + pot * voltage), "Pore-wall flux [mol.m-2.s-1]": j_w, - "Flux [mol.m-2.s-1]": N_e, "Ratio of electrolyte diffusion to discharge time": param.C_e, "Ratio of solid diffusion to discharge time": param.C_p, } From 9737a7addc23bdabdade81cd1a0ede136c755293 Mon Sep 17 00:00:00 2001 From: Leshinka Molel Date: Tue, 13 Jul 2021 14:29:38 -0400 Subject: [PATCH 3/6] Rename var --- .../full_battery_models/lithium_ion/basic_dfn_half_cell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py index 15e37e0691..fd7d253c93 100644 --- a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py +++ b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py @@ -368,7 +368,7 @@ def __init__(self, name="Doyle-Fuller-Newman half cell model", options=None): + pot * vdrop_cell, "Terminal voltage": voltage, "Terminal voltage [V]": phi_s_w_ref + param.U_n_ref + pot * voltage, - "Specific power [W.m-2]": i_cell * i_typ * (phi_s_w_ref + param.U_n_ref + pot * voltage), + "Instantaneous power [W.m-2]": i_cell * i_typ * (phi_s_w_ref + param.U_n_ref + pot * voltage), "Pore-wall flux [mol.m-2.s-1]": j_w, "Ratio of electrolyte diffusion to discharge time": param.C_e, "Ratio of solid diffusion to discharge time": param.C_p, From 4e7d71fb5525edf6a30bb79ff979ac1d89156531 Mon Sep 17 00:00:00 2001 From: Leshinka Molel Date: Wed, 14 Jul 2021 14:59:00 -0400 Subject: [PATCH 4/6] Remove variables that are parameters --- .../full_battery_models/lithium_ion/basic_dfn_half_cell.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py index fd7d253c93..9bdb5ab1d8 100644 --- a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py +++ b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py @@ -370,8 +370,6 @@ def __init__(self, name="Doyle-Fuller-Newman half cell model", options=None): "Terminal voltage [V]": phi_s_w_ref + param.U_n_ref + pot * voltage, "Instantaneous power [W.m-2]": i_cell * i_typ * (phi_s_w_ref + param.U_n_ref + pot * voltage), "Pore-wall flux [mol.m-2.s-1]": j_w, - "Ratio of electrolyte diffusion to discharge time": param.C_e, - "Ratio of solid diffusion to discharge time": param.C_p, } @property From 520b0aaf9d55b9f2f711b3a4e2b710d8e121942d Mon Sep 17 00:00:00 2001 From: Leshinka Molel Date: Wed, 14 Jul 2021 15:10:44 -0400 Subject: [PATCH 5/6] Fix flake8 style issues --- .../full_battery_models/lithium_ion/basic_dfn_half_cell.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py index 9bdb5ab1d8..22b465f382 100644 --- a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py +++ b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py @@ -368,7 +368,9 @@ def __init__(self, name="Doyle-Fuller-Newman half cell model", options=None): + pot * vdrop_cell, "Terminal voltage": voltage, "Terminal voltage [V]": phi_s_w_ref + param.U_n_ref + pot * voltage, - "Instantaneous power [W.m-2]": i_cell * i_typ * (phi_s_w_ref + param.U_n_ref + pot * voltage), + "Instantaneous power [W.m-2]": i_cell * i_typ * (phi_s_w_ref + + param.U_n_ref + + pot * voltage), "Pore-wall flux [mol.m-2.s-1]": j_w, } From dfc11bab3d12ef4d4be219d5edc81a47406f5bee Mon Sep 17 00:00:00 2001 From: Leshinka Molel Date: Wed, 14 Jul 2021 17:34:46 -0400 Subject: [PATCH 6/6] Add current density dimension --- .../full_battery_models/lithium_ion/basic_dfn_half_cell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py index 22b465f382..19bf34dd9c 100644 --- a/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py +++ b/pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py @@ -354,7 +354,7 @@ def __init__(self, name="Doyle-Fuller-Newman half cell model", options=None): * param.L_s * param.A_cc, "Current [A]": I, - "Current density [A.m-2]": i_cell, + "Current density [A.m-2]": i_cell * i_typ, "Working electrode potential": phi_s_w, "Working electrode potential [V]": phi_s_w_ref + pot * phi_s_w, "Working electrode open circuit potential": U_w(c_s_surf_w, T),