Skip to content

Commit

Permalink
pybamm-team#718 added arbitrary geometry lumped model
Browse files Browse the repository at this point in the history
  • Loading branch information
brosaplanella committed May 26, 2020
1 parent 3d7dcb7 commit cdbfba4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pybamm/models/full_battery_models/base_battery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def options(self, extra_options):
if options["geometry"] not in ["arbitrary", "pouch"]:
raise pybamm.OptionError(
"Unknown geometry '{}'".format(options["geometry"])
)
)
if options["sei"] not in [
None,
"constant",
Expand Down
14 changes: 6 additions & 8 deletions pybamm/models/submodels/thermal/lumped.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class Lumped(BaseThermal):
cc_dimension: int, optional
The dimension of the current collectors. Can be 0 (default), 1 or 2.
geometry: string, optional
The geometry for the lumped thermal submodel. Can be "arbitrary" (default) or pouch.
The geometry for the lumped thermal submodel. Can be "arbitrary" (default) or
pouch.
**Extends:** :class:`pybamm.thermal.BaseThermal`
"""
Expand Down Expand Up @@ -52,11 +53,8 @@ def set_rhs(self, variables):
T_amb = variables["Ambient temperature"]

# Account for surface area to volume ratio in cooling coefficient
# Note: assumes pouch cell geometry. The factor 1/delta^2 comes from
# the choice of non-dimensionalisation.
# TODO: allow for arbitrary surface area to volume ratio in order to model
# different cell geometries (see #718)
if self.geometry is "pouch":
# The factor 1/delta^2 comes from the choice of non-dimensionalisation.
if self.geometry == "pouch":
cell_volume = self.param.l * self.param.l_y * self.param.l_z

yz_cell_surface_area = self.param.l_y * self.param.l_z
Expand Down Expand Up @@ -93,11 +91,11 @@ def set_rhs(self, variables):
+ positive_tab_cooling_coefficient
+ edge_cooling_coefficient
)
elif self.geometry is "arbitrary":
elif self.geometry == "arbitrary":
cell_surface_area = self.param.a_cooling
cell_volume = self.param.v_cell
total_cooling_coefficient = (
-self.h_total
-self.param.h_total
* cell_surface_area
/ cell_volume
/ (self.param.delta ** 2)
Expand Down
4 changes: 2 additions & 2 deletions pybamm/parameters/geometric_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
L_y = pybamm.Parameter("Electrode width [m]")
L_z = pybamm.Parameter("Electrode height [m]")
A_cc = L_y * L_z # Area of current collector
A_cooling = pybamm.Parameter("Electrode height [m]")
V_cell = pybamm.Parameter("Electrode height [m]")
A_cooling = pybamm.Parameter("Cell cooling surface area [m2]")
V_cell = pybamm.Parameter("Cell volume [m3]")

# Tab geometry
L_tab_n = pybamm.Parameter("Negative tab width [m]")
Expand Down
5 changes: 5 additions & 0 deletions pybamm/parameters/standard_parameters_lithium_ion.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
L_z = pybamm.geometric_parameters.L_z
L = pybamm.geometric_parameters.L
A_cc = pybamm.geometric_parameters.A_cc
A_cooling = pybamm.geometric_parameters.A_cooling
V_cell = pybamm.geometric_parameters.V_cell

# Tab geometry
L_tab_n = pybamm.geometric_parameters.L_tab_n
Expand Down Expand Up @@ -290,6 +292,8 @@ def U_p_dimensional(sto, T):
l_y = pybamm.geometric_parameters.l_y
l_z = pybamm.geometric_parameters.l_z
a_cc = pybamm.geometric_parameters.a_cc
a_cooling = pybamm.geometric_parameters.a_cooling
v_cell = pybamm.geometric_parameters.v_cell
l = pybamm.geometric_parameters.l
delta = pybamm.geometric_parameters.delta

Expand Down Expand Up @@ -400,6 +404,7 @@ def chi(c_e):
h_tab_p = pybamm.thermal_parameters.h_tab_p
h_cn = pybamm.thermal_parameters.h_cn
h_cp = pybamm.thermal_parameters.h_cp
h_total = pybamm.thermal_parameters.h_total

B = (
i_typ
Expand Down
3 changes: 3 additions & 0 deletions pybamm/parameters/thermal_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
h_tab_p_dim = pybamm.Parameter("Positive tab heat transfer coefficient [W.m-2.K-1]")
h_edge_dim = pybamm.Parameter("Edge heat transfer coefficient [W.m-2.K-1]")

h_total_dim = pybamm.Parameter("Total heat transfer coefficient [W.m-2.K-1]")

# Typical temperature rise
Delta_T = pybamm.Scalar(1)

Expand Down Expand Up @@ -110,6 +112,7 @@
h_tab_p = h_tab_p_dim * pybamm.geometric_parameters.L_x / lambda_eff_dim
h_cn = h_cn_dim * pybamm.geometric_parameters.L_x / lambda_eff_dim
h_cp = h_cp_dim * pybamm.geometric_parameters.L_x / lambda_eff_dim
h_total = h_total_dim * pybamm.geometric_parameters.L_x / lambda_eff_dim


T_init = (T_init_dim - T_ref) / Delta_T
Expand Down

0 comments on commit cdbfba4

Please sign in to comment.