Skip to content

Commit 58b712c

Browse files
committed
#847 update docs
1 parent 0e916d7 commit 58b712c

File tree

12 files changed

+19
-74
lines changed

12 files changed

+19
-74
lines changed

docs/source/models/submodels/thermal/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Thermal
77
base_thermal
88
isothermal
99
lumped
10-
one_dimensional_x
10+
x_full
1111
pouch_cell/index
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
Base Models
2-
===========
1+
Base Thermal Model for "N+1D" Pouch Cell
2+
========================================
33

44
.. autoclass:: pybamm.thermal.pouch_cell.BasePouchCell
55
:members:
6-
7-
.. autoclass:: pybamm.thermal.pouch_cell.LumpedPouchCell
8-
:members:

docs/source/models/submodels/thermal/pouch_cell/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ Pouch Cell
55
:maxdepth: 1
66

77
base_pouch_cell
8-
pouch_cell_1plus1D
9-
pouch_cell_2plus1D
8+
pouch_cell_1D_current_collectors
9+
pouch_cell_2D_current_collectors
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
1+1D Model
2-
==========
1+
Thermal Model for "1+1D" Pouch Cell
2+
===================================
33

44
.. autoclass:: pybamm.thermal.pouch_cell.CurrentCollector1D
55
:members:
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
2+1D Model
2-
==========
1+
Thermal Model for "2+1D" Pouch Cell
2+
===================================
33

44
.. autoclass:: pybamm.thermal.pouch_cell.CurrentCollector2D
55
:members:

pybamm/models/full_battery_models/base_battery_model.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,8 @@ def set_thermal_submodel(self):
442442

443443
elif self.options["thermal"] == "x-lumped":
444444
if self.options["dimensionality"] == 0:
445-
thermal_submodel = pybamm.thermal.Lumped(
446-
self.param, self.options["dimensionality"]
447-
)
445+
# With 0D current collectors x-lumped is equivalent to lumped
446+
thermal_submodel = pybamm.thermal.Lumped(self.param)
448447
elif self.options["dimensionality"] == 1:
449448
thermal_submodel = pybamm.thermal.pouch_cell.CurrentCollector1D(
450449
self.param

pybamm/models/submodels/thermal/base_thermal.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def _get_standard_fundamental_variables(
2525
self, T_cn, T_n, T_s, T_p, T_cp, T_x_av, T_vol_av
2626
):
2727
"""
28-
Here we explicitly pass in the averages for the temperature as they are
29-
computed differently in different models. Computing the average temperature
30-
using `self._x_average` requires a messy hack to avoid raising a
31-
`ModelError` (as the key in the equation gets modified).
28+
Note: here we explicitly pass in the averages for the temperature as computing
29+
the average temperature in `BaseThermal` using `self._x_average` requires a
30+
messy hack to avoid raising a `ModelError` (as the key in the equation
31+
dict gets modified).
3232
33-
For more information about this method in general see
34-
:meth:`pybamm.base_submodel._get_standard_fundamental_variables`
33+
For more information about this method in general,
34+
see :meth:`pybamm.base_submodel._get_standard_fundamental_variables`
3535
"""
3636
param = self.param
3737

pybamm/models/submodels/thermal/lumped.py

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def set_rhs(self, variables):
5353
# Note: assumes pouch cell geometry. The factor 1/delta^2 comes from
5454
# the choice of non-dimensionalisation.
5555
# TODO: allow for arbitrary surface area to volume ratio in order to model
56+
# different cell geometries (see #718)
5657
A = self.param.l_y * self.param.l_z
5758
V = self.param.l * self.param.l_y * self.param.l_z
5859
cooling_coeff = -2 * self.param.h * A / V / (self.param.delta ** 2)

tests/unit/test_models/test_submodels/test_thermal/test_lumped.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_public_functions(self):
2323
std_tests = tests.StandardSubModelTests(submodel, coupled_variables)
2424
std_tests.test_all()
2525

26-
submodel = pybamm.thermal.Lumped(param, cc_dimension=1)
26+
submodel = pybamm.thermal.Lumped(param, cc_dimension=2)
2727
std_tests = tests.StandardSubModelTests(submodel, coupled_variables)
2828
std_tests.test_all()
2929

tests/unit/test_models/test_submodels/test_thermal/test_pouch_cell/test_base_pouch_cell.py

-32
This file was deleted.

tests/unit/test_models/test_submodels/test_thermal/test_pouch_cell/test_pouch_1plus1D.py

-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@
1414
class TestPouchCell1D(unittest.TestCase):
1515
def test_public_functions(self):
1616
param = pybamm.standard_parameters_lithium_ion
17-
phi_s_cn = pybamm.PrimaryBroadcast(pybamm.Scalar(0), ["current collector"])
18-
phi_s_cp = pybamm.PrimaryBroadcast(pybamm.Scalar(3), ["current collector"])
19-
20-
coupled_variables.update(
21-
{
22-
"Negative current collector potential": phi_s_cn,
23-
"Positive current collector potential": phi_s_cp,
24-
}
25-
)
26-
2717
submodel = pybamm.thermal.pouch_cell.CurrentCollector1D(param)
2818
std_tests = tests.StandardSubModelTests(submodel, coupled_variables)
2919
std_tests.test_all()

tests/unit/test_models/test_submodels/test_thermal/test_pouch_cell/test_pouch_2plus1D.py

-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@
1414
class TestPouchCell2D(unittest.TestCase):
1515
def test_public_functions(self):
1616
param = pybamm.standard_parameters_lithium_ion
17-
phi_s_cn = pybamm.PrimaryBroadcast(pybamm.Scalar(0), ["current collector"])
18-
phi_s_cp = pybamm.PrimaryBroadcast(pybamm.Scalar(3), ["current collector"])
19-
20-
coupled_variables.update(
21-
{
22-
"Negative current collector potential": phi_s_cn,
23-
"Positive current collector potential": phi_s_cp,
24-
}
25-
)
26-
2717
submodel = pybamm.thermal.pouch_cell.CurrentCollector2D(param)
2818
std_tests = tests.StandardSubModelTests(submodel, coupled_variables)
2919
std_tests.test_all()

0 commit comments

Comments
 (0)