Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 912 tab cooling #965

Merged
merged 17 commits into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- Added tab, edge, and surface cooling ([#965](https://github.com/pybamm-team/PyBaMM/pull/965))
- Added functionality to solver to automatically discretise a 0D model ([#947](https://github.com/pybamm-team/PyBaMM/pull/947))
- Added sensitivity to `CasadiAlgebraicSolver` ([#940](https://github.com/pybamm-team/PyBaMM/pull/940))
- Added `ProcessedSymbolicVariable` class, which can handle symbolic variables (i.e. variables for which the inputs are symbolic) ([#940](https://github.com/pybamm-team/PyBaMM/pull/940))
Expand Down
24 changes: 17 additions & 7 deletions examples/notebooks/using-model-options_thermal-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We choose to use the parameters from [1]. We then update the heat transfer coefficient to be 0.1 [W/m^2/K] (see the [Parameter Values notebook](./parameter-values.ipynb) for more details)"
"We choose to use the parameters from [1]. We then update the heat transfer coefficients (see the [Parameter Values notebook](./parameter-values.ipynb) for more details)"
]
},
{
Expand All @@ -75,7 +75,17 @@
"outputs": [],
"source": [
"param = pybamm.ParameterValues(chemistry=pybamm.parameter_sets.Marquis2019)\n",
"param.update({\"Heat transfer coefficient [W.m-2.K-1]\": 0.1})"
"param.update(\n",
" {\n",
" \"Negative current collector\"\n",
" + \" surface heat transfer coefficient [W.m-2.K-1]\": 5,\n",
" \"Positive current collector\"\n",
" + \" surface heat transfer coefficient [W.m-2.K-1]\": 5,\n",
" \"Negative tab heat transfer coefficient [W.m-2.K-1]\": 0,\n",
" \"Positive tab heat transfer coefficient [W.m-2.K-1]\": 0,\n",
" \"Edge heat transfer coefficient [W.m-2.K-1]\": 0,\n",
" }\n",
")"
]
},
{
Expand Down Expand Up @@ -121,7 +131,7 @@
"source": [
"# solve model\n",
"solver = model.default_solver\n",
"t_eval = np.linspace(0, 1, 250)\n",
"t_eval = np.linspace(0, 3600, 250)\n",
"solution = solver.solve(model, t_eval)"
]
},
Expand All @@ -140,12 +150,12 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c3d04dd597c24caf83c370bd01fe6131",
"model_id": "115696cc7c7e4297bb6d85a9f8220a82",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(FloatSlider(value=0.0, description='t', max=1.0, step=0.01), Output()), _dom_classes=('w…"
"interactive(children=(FloatSlider(value=0.0, description='t', max=3599.9999999999995, step=35.99999999999999),…"
]
},
"metadata": {},
Expand Down Expand Up @@ -202,9 +212,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
}
15 changes: 14 additions & 1 deletion examples/scripts/thermal_lithium_ion.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@

# load parameter values and process models and geometry
param = models[0].default_parameter_values
param.update({"Heat transfer coefficient [W.m-2.K-1]": 1})

# for x-full, cooling is only implemented on the surfaces
# so set other forms of cooling to zero for comparison.
param.update(
{
"Negative current collector"
+ " surface heat transfer coefficient [W.m-2.K-1]": 5,
"Positive current collector"
+ " surface heat transfer coefficient [W.m-2.K-1]": 5,
"Negative tab heat transfer coefficient [W.m-2.K-1]": 0,
"Positive tab heat transfer coefficient [W.m-2.K-1]": 0,
"Edge heat transfer coefficient [W.m-2.K-1]": 0,
}
)

for model in models:
param.process_model(model)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ Name [units],Value,Reference,Notes
Reference temperature [K],294.85,Room temperature,
Maximum temperature [K],333.15,,
Ambient temperature [K], 294.85,,
Heat transfer coefficient [W.m-2.K-1],10,,
Initial temperature [K],294.85,Room temperature,
Negative current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Scottmar93 marked this conversation as resolved.
Show resolved Hide resolved
Positive current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Negative tab heat transfer coefficient [W.m-2.K-1],10,,
Positive tab heat transfer coefficient [W.m-2.K-1],10,,
Edge heat transfer coefficient [W.m-2.K-1],0.3,,

,,,
# Electrical
Expand All @@ -18,3 +21,4 @@ Upper voltage cut-off [V],2.44,(just over) 14.5V across 6-cell battery,
# Initial conditions
Initial State of Charge,1,-,
Initial oxygen concentration [mol.m-3],0,,
Initial temperature [K],294.85,Room temperature,
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ Name [units],Value,Reference,Notes
,,,
# Temperature
Reference temperature [K],298.15,25C,
Heat transfer coefficient [W.m-2.K-1],5,Peyman MPM,
Negative current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Positive current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Negative tab heat transfer coefficient [W.m-2.K-1],0,,
Positive tab heat transfer coefficient [W.m-2.K-1],0,,
Edge heat transfer coefficient [W.m-2.K-1],5,Peyman MPM,
Ambient temperature [K], 298.15,,
,,,
# Electrical
# Electrical
Number of electrodes connected in parallel to make a cell,1,,
Number of cells connected in series to make a battery,1,,
Lower voltage cut-off [V],2.5,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ Name [units],Value,Reference,Notes
,,,
# Temperature
Reference temperature [K],298.15,25C,
Heat transfer coefficient [W.m-2.K-1],10,,
Negative current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Positive current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Negative tab heat transfer coefficient [W.m-2.K-1],10,,
Positive tab heat transfer coefficient [W.m-2.K-1],10,,
Edge heat transfer coefficient [W.m-2.K-1],0.3,,
Ambient temperature [K], 298.15,,

,,,
# Electrical
# Electrical
Number of electrodes connected in parallel to make a cell,1,,
Number of cells connected in series to make a battery,1,,
Lower voltage cut-off [V],2.5,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ Name [units],Value,Reference,Notes
,,,
# Temperature
Reference temperature [K],296.15,23C,
Heat transfer coefficient [W.m-2.K-1],10, The paper does not consider thermal effects so a typical value is chosen,
Negative current collector surface heat transfer coefficient [W.m-2.K-1],0,Paper does not consider thermal effects
Positive current collector surface heat transfer coefficient [W.m-2.K-1],0,Paper does not consider thermal effects
Negative tab heat transfer coefficient [W.m-2.K-1],10,Paper does not consider thermal effects,
Positive tab heat transfer coefficient [W.m-2.K-1],10,Paper does not consider thermal effects,
Edge heat transfer coefficient [W.m-2.K-1],0.3,Paper does not consider thermal effects,
Ambient temperature [K], 298.15,,

,,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ Name [units],Value,Reference,Notes
,,,
# Temperature
Reference temperature [K],298.15,25C,
Heat transfer coefficient [W.m-2.K-1],25,,
Negative current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Positive current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Negative tab heat transfer coefficient [W.m-2.K-1],25,,
Positive tab heat transfer coefficient [W.m-2.K-1],25,,
Edge heat transfer coefficient [W.m-2.K-1],0.3,,
Ambient temperature [K], 298.15,,

,,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ Name [units],Value,Reference,Notes
# Temperature
Reference temperature [K],298.15,25C,
Ambient temperature [K], 298.15,,
Heat transfer coefficient [W.m-2.K-1],10,,
Negative current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Positive current collector surface heat transfer coefficient [W.m-2.K-1],0,,
Negative tab heat transfer coefficient [W.m-2.K-1],10,,
Positive tab heat transfer coefficient [W.m-2.K-1],10,,
Edge heat transfer coefficient [W.m-2.K-1],0.3,,
,,,
# Electrical
# Electrical
Number of electrodes connected in parallel to make a cell,1,,
Number of cells connected in series to make a battery,1,,
Lower voltage cut-off [V],3.105,,
Expand Down
43 changes: 39 additions & 4 deletions pybamm/models/submodels/thermal/lumped.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,47 @@ def set_rhs(self, variables):
# the choice of non-dimensionalisation.
# TODO: allow for arbitrary surface area to volume ratio in order to model
# different cell geometries (see #718)
A = self.param.l_y * self.param.l_z
V = self.param.l * self.param.l_y * self.param.l_z
cooling_coeff = -2 * self.param.h * A / V / (self.param.delta ** 2)
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
yz_surface_cooling_coefficient = (
-(self.param.h_cn + self.param.h_cp)
* yz_cell_surface_area
/ cell_volume
/ (self.param.delta ** 2)
)

negative_tab_area = self.param.l_tab_n * self.param.l_cn
negative_tab_cooling_coefficient = (
-self.param.h_tab_n * negative_tab_area / cell_volume / self.param.delta
)

positive_tab_area = self.param.l_tab_p * self.param.l_cp
positive_tab_cooling_coefficient = (
-self.param.h_tab_p * positive_tab_area / cell_volume / self.param.delta
)

edge_area = (
2 * self.param.l_y * self.param.l
+ 2 * self.param.l_z * self.param.l
- negative_tab_area
- positive_tab_area
)
edge_cooling_coefficient = (
-self.param.h_edge * edge_area / cell_volume / self.param.delta
)

total_cooling_coefficient = (
yz_surface_cooling_coefficient
+ negative_tab_cooling_coefficient
+ positive_tab_cooling_coefficient
+ edge_cooling_coefficient
)

self.rhs = {
T_vol_av: (self.param.B * Q_vol_av + cooling_coeff * (T_vol_av - T_amb))
T_vol_av: (
self.param.B * Q_vol_av + total_cooling_coefficient * (T_vol_av - T_amb)
)
/ (self.param.C_th * self.param.rho)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,40 +60,82 @@ def set_rhs(self, variables):
# Account for surface area to volume ratio of pouch cell in cooling
# coefficient. Note: the factor 1/delta^2 comes from the choice of
# non-dimensionalisation
A = self.param.l_y * self.param.l_z
V = self.param.l * self.param.l_y * self.param.l_z
cooling_coeff = -2 * self.param.h * A / V / (self.param.delta ** 2)
cell_volume = self.param.l * self.param.l_y * self.param.l_z

yz_surface_area = self.param.l_y * self.param.l_z
yz_surface_cooling_coefficient = (
-(self.param.h_cn + self.param.h_cp)
* yz_surface_area
/ cell_volume
/ (self.param.delta ** 2)
)

side_edge_area = 2 * self.param.l_z * self.param.l
side_edge_cooling_coefficient = (
-self.param.h_edge * side_edge_area / cell_volume / self.param.delta
)

total_cooling_coefficient = (
yz_surface_cooling_coefficient + side_edge_cooling_coefficient
)

self.rhs = {
T_av: (
pybamm.laplacian(T_av)
+ self.param.B * Q_av
+ cooling_coeff * (T_av - T_amb)
+ total_cooling_coefficient * (T_av - T_amb)
)
/ (self.param.C_th * self.param.rho)
}

def set_boundary_conditions(self, variables):
T_amb = variables["Ambient temperature"]
T_av = variables["X-averaged cell temperature"]
T_av_left = pybamm.boundary_value(T_av, "negative tab")
T_av_right = pybamm.boundary_value(T_av, "positive tab")
T_av_top = pybamm.boundary_value(T_av, "right")
T_av_bottom = pybamm.boundary_value(T_av, "left")

# Tab cooling only implemented for both tabs at the top.
Scottmar93 marked this conversation as resolved.
Show resolved Hide resolved
negative_tab_area = self.param.l_tab_n * self.param.l_cn
positive_tab_area = self.param.l_tab_p * self.param.l_cp
total_top_area = self.param.l * self.param.l_y
non_tab_top_area = total_top_area - negative_tab_area - positive_tab_area

negative_tab_cooling_coefficient = (
self.param.h_tab_n / self.param.delta * negative_tab_area / total_top_area
)
positive_tab_cooling_coefficient = (
self.param.h_tab_p / self.param.delta * positive_tab_area / total_top_area
)

top_edge_cooling_coefficient = (
self.param.h_edge / self.param.delta * non_tab_top_area / total_top_area
)

bottom_edge_cooling_coefficient = (
self.param.h_edge / self.param.delta * total_top_area / total_top_area
)

total_top_cooling_coefficient = (
negative_tab_cooling_coefficient
+ positive_tab_cooling_coefficient
+ top_edge_cooling_coefficient
)

total_bottom_cooling_coefficient = bottom_edge_cooling_coefficient

# Three boundary conditions here to handle the cases of both tabs at
# the same side (top or bottom), or one either side. For both tabs on the
# same side, T_av_left and T_av_right are equal, and the boundary condition
# "no tab" is used on the other side.
# just use left and right for clarity
# left = bottom of cell (z=0)
# right = top of cell (z=L_z)
self.boundary_conditions = {
T_av: {
"negative tab": (
self.param.h * (T_av_left - T_amb) / self.param.delta,
"left": (
total_bottom_cooling_coefficient * (T_av_bottom - T_amb),
"Neumann",
),
"positive tab": (
-self.param.h * (T_av_right - T_amb) / self.param.delta,
"right": (
-total_top_cooling_coefficient * (T_av_top - T_amb),
"Neumann",
),
"no tab": (pybamm.Scalar(0), "Neumann"),
}
}

Expand Down
Loading