Skip to content

Commit

Permalink
pybamm-team#1330 added Timms2020 to lumped and x-full models
Browse files Browse the repository at this point in the history
  • Loading branch information
brosaplanella committed Jan 25, 2021
1 parent 4966709 commit ac929cb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pybamm/models/submodels/thermal/lumped.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class Lumped(BaseThermal):
"""Class for lumped thermal submodel
"""Class for lumped thermal submodel. For more information see [1]_.
Parameters
----------
Expand All @@ -19,6 +19,11 @@ class Lumped(BaseThermal):
The geometry for the lumped thermal submodel. Can be "arbitrary" (default) or
pouch.
References
----------
.. [1] R Timms, SG Marquis, V Sulzer, CP Please and SJ Chapman. “Asymptotic
Reduction of a Lithium-ion Pouch Cell Model”. In preparation, 2020.
**Extends:** :class:`pybamm.thermal.BaseThermal`
"""

Expand Down
7 changes: 7 additions & 0 deletions pybamm/models/submodels/thermal/x_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,24 @@ class OneDimensionalX(BaseThermal):
in the current collectors, so that the contribution to the Ohmic heating
from the current collectors is zero and the boundary conditions are applied
at the edges of the electrodes (at x=0 and x=1, in non-dimensional coordinates).
For more information see [1]_.
Parameters
----------
param : parameter class
The parameters to use for this submodel
References
----------
.. [1] R Timms, SG Marquis, V Sulzer, CP Please and SJ Chapman. “Asymptotic
Reduction of a Lithium-ion Pouch Cell Model”. In preparation, 2020.
**Extends:** :class:`pybamm.thermal.BaseThermal`
"""

def __init__(self, param):
super().__init__(param)
pybamm.citations.register("Timms2020")

def get_fundamental_variables(self):
T_n = pybamm.standard_variables.T_n
Expand Down
10 changes: 10 additions & 0 deletions tests/unit/test_citations.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ def test_timms_2020(self):
pybamm.thermal.pouch_cell.CurrentCollector2D(param=None)
self.assertIn("Timms2020", citations._papers_to_cite)

citations._reset()
self.assertNotIn("Timms2020", citations._papers_to_cite)
pybamm.thermal.Lumped(param=None)
self.assertIn("Timms2020", citations._papers_to_cite)

citations._reset()
self.assertNotIn("Timms2020", citations._papers_to_cite)
pybamm.thermal.OneDimensionalX(param=None)
self.assertIn("Timms2020", citations._papers_to_cite)

def test_subramanian_2005(self):
# Test that calling relevant bits of code adds the right paper to citations
citations = pybamm.citations
Expand Down

0 comments on commit ac929cb

Please sign in to comment.