Repository: pybamm-team/PyBaMM
Pull request #885 (2020-03-12 18:12:47)

Issue 882 la thermal
# Description

Added thermal parameters for lead-acid to the parameter files and added the tests. 

Fixes # 882

## Type of change

Please add a line in the relevant section of [CHANGELOG.md](https://github.com/pybamm-team/PyBaMM/blob/master/CHANGELOG.md) to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

- [x] New feature (non-breaking change which adds functionality)
- [ ] Optimization (back-end change that speeds up the code)
- [ ] Bug fix (non-breaking change which fixes an issue)


# Key checklist:

- [x] No style issues: `$ flake8`
- [ ] All tests pass: `$ python run-tests.py --unit`
- [ ] The documentation builds: `$ cd docs` and then `$ make clean; make html`

You can run all three at once, using `$ python run-tests.py --quick`.

## Further checks:

- [ ] Code is commented, particularly in hard-to-understand areas
- [x] Tests added that prove fix is effective or that feature works



Patch:
diff --git a/pybamm/input/parameters/lead-acid/anodes/lead_Sulzer2019/parameters.csv b/pybamm/input/parameters/lead-acid/anodes/lead_Sulzer2019/parameters.csv
index 56fc70558..e57bb5b5b 100644
--- a/pybamm/input/parameters/lead-acid/anodes/lead_Sulzer2019/parameters.csv
+++ b/pybamm/input/parameters/lead-acid/anodes/lead_Sulzer2019/parameters.csv
@@ -34,3 +34,10 @@ Electrons in hydrogen reaction,2,,
 Negative electrode reference exchange-current density (hydrogen) [A.m-2],1.56E-11,srinivasan2003mathematical,
 Hydrogen reference OCP vs SHE [V],0,srinivasan2003mathematical,
 Negative electrode double-layer capacity [F.m-2],0.2,,
+,,,
+# Density,,,
+Negative electrode density [kg.m-3],113400,CRC Handbook of Chemistry and Physics,
+,,,
+# Thermal parameters,,,
+Negative electrode specific heat capacity [J.kg-1.K-1],130,CRC Handbook of Chemistry and Physics,
+Negative electrode thermal conductivity [W.m-1.K-1],35,CRC Handbook of Chemistry and Physics,
diff --git a/pybamm/input/parameters/lead-acid/cathodes/lead_dioxide_Sulzer2019/parameters.csv b/pybamm/input/parameters/lead-acid/cathodes/lead_dioxide_Sulzer2019/parameters.csv
index cd38f78b4..eba759930 100644
--- a/pybamm/input/parameters/lead-acid/cathodes/lead_dioxide_Sulzer2019/parameters.csv
+++ b/pybamm/input/parameters/lead-acid/cathodes/lead_dioxide_Sulzer2019/parameters.csv
@@ -34,3 +34,10 @@ Electrons in hydrogen reaction,2,,
 Positive electrode reference exchange-current density (hydrogen) [A.m-2],0,srinivasan2003mathematical,
 Hydrogen reference OCP vs SHE [V],0,srinivasan2003mathematical,
 Positive electrode double-layer capacity [F.m-2],0.2,,
+,,,
+# Density,,,
+Positive electrode density [kg.m-3],9375,Pubchem,
+,,,
+# Thermal parameters,,,
+Positive electrode specific heat capacity [J.kg-1.K-1],256,NIST Chemistry WebBook SRD69,
+Positive electrode thermal conductivity [W.m-1.K-1],35,assume same as lead,
diff --git a/pybamm/input/parameters/lead-acid/cells/BBOXX_Sulzer2019/parameters.csv b/pybamm/input/parameters/lead-acid/cells/BBOXX_Sulzer2019/parameters.csv
index 85bebe181..5a5f2bfb8 100644
--- a/pybamm/input/parameters/lead-acid/cells/BBOXX_Sulzer2019/parameters.csv
+++ b/pybamm/input/parameters/lead-acid/cells/BBOXX_Sulzer2019/parameters.csv
@@ -2,9 +2,11 @@ Name [units],Value,Reference,Notes
 # Empty rows and rows starting with ‘#’ will be ignored,,,
 ,,,
 # Macroscale geometry,,,
+Negative current collector thickness [m],0,,
 Negative electrode thickness [m],0.0009,Manufacturer,
 Separator thickness [m],0.0015,Manufacturer,
 Positive electrode thickness [m],0.00125,Manufacturer,
+Positive current collector thickness [m],0,,
 Electrode height [m],0.114,Manufacturer,
 Electrode width [m],0.065,Manufacturer,
 Negative tab width [m],0.04,,Estimated value
@@ -17,3 +19,18 @@ Positive tab centre z-coordinate [m],0.114,Tab at top,
 # Electrical,,,
 Cell capacity [A.h],17,Manufacturer,
 Typical current [A],1,,
+
+,,,
+# Density,,,
+Negative current collector density [kg.m-3],11300, same as electrode,
+Positive current collector density [kg.m-3],9375,same as electrode,
+
+,,,
+# Specific heat capacity,,,
+Negative current collector specific heat capacity [J.kg-1.K-1],130,CRC Handbook of Chemistry and Physics,
+Positive current collector specific heat capacity [J.kg-1.K-1],256,NIST Chemistry WebBook SRD69,
+,,,
+# Thermal conductivity,,,
+Negative current collector thermal conductivity [W.m-1.K-1],35,CRC Handbook of Chemistry and Physics,
+Positive current collector thermal conductivity [W.m-1.K-1],35,assume same as lead,
+
diff --git a/pybamm/input/parameters/lead-acid/experiments/1C_discharge_from_full/parameters.csv b/pybamm/input/parameters/lead-acid/experiments/1C_discharge_from_full/parameters.csv
index 40bbce3e5..063e70a78 100644
--- a/pybamm/input/parameters/lead-acid/experiments/1C_discharge_from_full/parameters.csv
+++ b/pybamm/input/parameters/lead-acid/experiments/1C_discharge_from_full/parameters.csv
@@ -4,16 +4,16 @@ Name [units],Value,Reference,Notes
 # Temperature,,,
 Reference temperature [K],294.85,Room temperature,
 Maximum temperature [K],333.15,,
-Ambient temperature [K], 298.15,,
+Ambient temperature [K], 294.85,,
 Heat transfer coefficient [W.m-2.K-1],10,,
-
+Initial temperature [K],294.85,Room temperature,
 
 ,,,
 # Electrical
 Number of electrodes connected in parallel to make a cell,8,Manufacturer,
 Number of cells connected in series to make a battery,6,Manufacturer,
-Lower voltage cut-off [V],1.73,,(just under) 10.5V across 6-cell battery
-Upper voltage cut-off [V],2.44,,(just over) 14.5V across 6-cell battery
+Lower voltage cut-off [V],1.73,(just under) 10.5V across 6-cell battery,
+Upper voltage cut-off [V],2.44,(just over) 14.5V across 6-cell battery,
 C-rate,0.1,,
 ,,,
 # Initial conditions
diff --git a/pybamm/input/parameters/lead-acid/separators/agm_Sulzer2019/parameters.csv b/pybamm/input/parameters/lead-acid/separators/agm_Sulzer2019/parameters.csv
index 539bddd46..2b7f78e35 100644
--- a/pybamm/input/parameters/lead-acid/separators/agm_Sulzer2019/parameters.csv
+++ b/pybamm/input/parameters/lead-acid/separators/agm_Sulzer2019/parameters.csv
@@ -4,3 +4,6 @@ Name [units],Value,Reference,Notes
 Maximum porosity of separator,0.92,,
 Separator Bruggeman coefficient (electrolyte),1.5,,
 Separator Bruggeman coefficient (electrode),1.5,,
+Separator density [kg.m-3],1680, Bulk density from Gigova 2006,
+Separator specific heat capacity [J.kg-1.K-1],700, Electronics Cooling (fiberglass),
+Separator thermal conductivity [W.m-1.K-1],0.04, University Physics Sears et al. 1999 (fiberglass),
\ No newline at end of file
diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1.py
index 164382f1d..2e9cf0268 100644
--- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1.py
+++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1.py
@@ -21,11 +21,6 @@ def electrolyte_conductivity_Landesfeind2019_EC_DMC_1_1(c_e, T, T_inf, E_k_e, R_
     :`numpy.Array`
         Electrolyte diffusivity
     """
-    coeffs = np.array([7.98e-1,
-                       2.28e2,
-                       -1.22,
-                       5.09e-1,
-                       -4e-3,
-                       3.79e-3])
+    coeffs = np.array([7.98e-1, 2.28e2, -1.22, 5.09e-1, -4e-3, 3.79e-3])
 
     return base.electrolyte_conductivity_Landesfeind2019_base(c_e, T, coeffs)
diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7.py
index 40330ac1e..978e9cf8c 100644
--- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7.py
+++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7.py
@@ -21,10 +21,5 @@ def electrolyte_conductivity_Landesfeind2019_EC_EMC_3_7(c_e, T, T_inf, E_k_e, R_
     :`numpy.Array`
         Electrolyte diffusivity
     """
-    coeffs = np.array([5.21e-1,
-                       2.28e2,
-                       -1.06,
-                       3.53e-1,
-                       -3.59e-3,
-                       1.48e-3])
+    coeffs = np.array([5.21e-1, 2.28e2, -1.06, 3.53e-1, -3.59e-3, 1.48e-3])
     return base.electrolyte_conductivity_Landesfeind2019_base(c_e, T, coeffs)
diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1.py
index 9c683adc9..fbeba0285 100644
--- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1.py
+++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1.py
@@ -21,10 +21,5 @@ def electrolyte_conductivity_Landesfeind2019_EMC_FEC_19_1(c_e, T, T_inf, E_k_e,
     :`numpy.Array`
         Electrolyte diffusivity
     """
-    coeffs = np.array([2.51e-2,
-                       1.75e2,
-                       1.23,
-                       2.05e-1,
-                       -8.81e-2,
-                       2.83e-3])
+    coeffs = np.array([2.51e-2, 1.75e2, 1.23, 2.05e-1, -8.81e-2, 2.83e-3])
     return base.electrolyte_conductivity_Landesfeind2019_base(c_e, T, coeffs)
diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_base.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_base.py
index 60fe7a1ed..4a2e45b50 100644
--- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_base.py
+++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_conductivity_Landesfeind2019_base.py
@@ -25,8 +25,8 @@ def electrolyte_conductivity_Landesfeind2019_base(c_e, T, coeffs):
     c = c_e / 1000  # mol.m-3 -> mol.l
     p1, p2, p3, p4, p5, p6 = coeffs
     A = p1 * (1 + (T - p2))
-    B = (1 + p3 * sqrt(c) + p4 * (1 + p5 * exp(1000 / T)) * c)
-    C = 1 + c**4 * (p6 * exp(1000 / T))
+    B = 1 + p3 * sqrt(c) + p4 * (1 + p5 * exp(1000 / T)) * c
+    C = 1 + c ** 4 * (p6 * exp(1000 / T))
     sigma_e = A * c * B / C  # mS.cm-1
 
     return sigma_e / 10
diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1.py
index dbe94362e..510cb02fb 100644
--- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1.py
+++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1.py
@@ -21,9 +21,6 @@ def electrolyte_diffusivity_Landesfeind2019_EC_DMC_1_1(c_e, T, T_inf, E_k_e, R_g
     :`numpy.Array`
         Electrolyte diffusivity
     """
-    coeffs = np.array([1.47e3,
-                       1.33,
-                       -1.69e3,
-                       -5.63e2])
+    coeffs = np.array([1.47e3, 1.33, -1.69e3, -5.63e2])
 
     return base.electrolyte_diffusivity_Landesfeind2019_base(c_e, T, coeffs)
diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7.py
index 8af791f5d..108ffc169 100644
--- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7.py
+++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7.py
@@ -21,8 +21,5 @@ def electrolyte_diffusivity_Landesfeind2019_EC_EMC_3_7(c_e, T, T_inf, E_k_e, R_g
     :`numpy.Array`
         Electrolyte diffusivity
     """
-    coeffs = np.array([1.01e3,
-                       1.01,
-                       -1.56e3,
-                       -4.87e2])
+    coeffs = np.array([1.01e3, 1.01, -1.56e3, -4.87e2])
     return base.electrolyte_diffusivity_Landesfeind2019_base(c_e, T, coeffs)
diff --git a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1.py b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1.py
index e83349fe4..871751e43 100644
--- a/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1.py
+++ b/pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019/electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1.py
@@ -21,8 +21,5 @@ def electrolyte_diffusivity_Landesfeind2019_EMC_FEC_19_1(c_e, T, T_inf, E_k_e, R
     :`numpy.Array`
         Electrolyte diffusivity
     """
-    coeffs = np.array([5.86e2,
-                       1.33,
-                       -1.38e3,
-                       -5.82e2])
+    coeffs = np.array([5.86e2, 1.33, -1.38e3, -5.82e2])
     return base.electrolyte_diffusivity_Landesfeind2019_base(c_e, T, coeffs)
diff --git a/pybamm/models/full_battery_models/base_battery_model.py b/pybamm/models/full_battery_models/base_battery_model.py
index 60b2c77a9..80eda3469 100644
--- a/pybamm/models/full_battery_models/base_battery_model.py
+++ b/pybamm/models/full_battery_models/base_battery_model.py
@@ -43,8 +43,7 @@ class BaseBatteryModel(pybamm.BaseModel):
                 Can be "Fickian diffusion" (default) or "fast diffusion".
             * "thermal" : str, optional
                 Sets the thermal model to use. Can be "isothermal" (default),
-                "x-full", "x-lumped", "xyz-lumped" or "lumped". Must be "isothermal" for
-                lead-acid models.
+                "x-full", "x-lumped", "xyz-lumped" or "lumped".
             * "thermal current collector" : bool, optional
                 Whether to include thermal effects in the current collector in
                 one-dimensional models (default is False). Note that this option
@@ -218,22 +217,21 @@ class BaseBatteryModel(pybamm.BaseModel):
 
         # Options that are incompatible with models
         if isinstance(self, pybamm.lithium_ion.BaseModel):
-            # if options["surface form"] is not False:
-            #     raise pybamm.OptionError(
-            #         "surface form not implemented for lithium-ion models"
-            #     )
             if options["convection"] is True:
                 raise pybamm.OptionError(
                     "convection not implemented for lithium-ion models"
                 )
         if isinstance(self, pybamm.lead_acid.BaseModel):
-            if options["thermal"] != "isothermal":
+            if options["thermal"] != "isothermal" and options["dimensionality"] != 0:
                 raise pybamm.OptionError(
-                    "thermal effects not implemented for lead-acid models"
+                    "Lead-acid models can only have thermal "
+                    "effects if dimensionality is 0."
                 )
+
             if options["thermal current collector"] is True:
                 raise pybamm.OptionError(
-                    "thermal effects not implemented for lead-acid models"
+                    "Thermal current collector effects are not implemented "
+                    "for lead-acid models."
                 )
 
         self._options = options
diff --git a/pybamm/parameters/standard_parameters_lead_acid.py b/pybamm/parameters/standard_parameters_lead_acid.py
index be73bc36e..9b950d5c7 100644
--- a/pybamm/parameters/standard_parameters_lead_acid.py
+++ b/pybamm/parameters/standard_parameters_lead_acid.py
@@ -164,10 +164,9 @@ Q_n_max_dimensional = pybamm.Parameter("Negative electrode volumetric capacity [
 Q_p_max_dimensional = pybamm.Parameter("Positive electrode volumetric capacity [C.m-3]")
 
 
-# Fake thermal
+# thermal
 Delta_T = pybamm.thermal_parameters.Delta_T
 
-
 # --------------------------------------------------------------------------------------
 "2. Dimensional Functions"
 
@@ -277,18 +276,27 @@ tau_r_p = 1 / (j0_p_S_ref_dimensional * a_p_dim * c_e_typ ** 0.5)
 # Electrolyte diffusion timescale
 tau_diffusion_e = L_x ** 2 / D_e_typ
 
+# Thermal diffusion timescale
+tau_th_yz = pybamm.thermal_parameters.tau_th_yz
+
 # Choose discharge timescale
 timescale = tau_discharge
 
 # --------------------------------------------------------------------------------------
 "4. Dimensionless Parameters"
+# Timescale ratios
+C_th = tau_th_yz / tau_discharge
 
 # Macroscale Geometry
 l_n = pybamm.geometric_parameters.l_n
 l_s = pybamm.geometric_parameters.l_s
 l_p = pybamm.geometric_parameters.l_p
+l_x = pybamm.geometric_parameters.l_x
 l_y = pybamm.geometric_parameters.l_y
 l_z = pybamm.geometric_parameters.l_z
+a_cc = pybamm.geometric_parameters.a_cc
+l = pybamm.geometric_parameters.l
+delta = pybamm.geometric_parameters.delta
 # In lead-acid the current collector and electrodes are the same (same thickness)
 l_cn = l_n
 l_cp = l_p
@@ -403,7 +411,39 @@ Q_e_max = (l_n * eps_n_max + l_s * eps_s_max + l_p * eps_p_max) / (s_p - s_n)
 Q_e_max_dimensional = Q_e_max * c_e_typ * F
 capacity = Q_e_max_dimensional * n_electrodes_parallel * A_cs * L_x
 
+# Thermal
+rho_cn = pybamm.thermal_parameters.rho_cn
+rho_n = pybamm.thermal_parameters.rho_n
+rho_s = pybamm.thermal_parameters.rho_s
+rho_p = pybamm.thermal_parameters.rho_p
+rho_cp = pybamm.thermal_parameters.rho_cp
+
+rho_k = pybamm.thermal_parameters.rho_k
+rho = rho_n * l_n + rho_s * l_s + rho_p * l_p
+
+lambda_cn = pybamm.thermal_parameters.lambda_cn
+lambda_n = pybamm.thermal_parameters.lambda_n
+lambda_s = pybamm.thermal_parameters.lambda_s
+lambda_p = pybamm.thermal_parameters.lambda_p
+lambda_cp = pybamm.thermal_parameters.lambda_cp
+
+lambda_k = pybamm.thermal_parameters.lambda_k
+
+Theta = pybamm.thermal_parameters.Theta
+h = pybamm.thermal_parameters.h
+B = (
+    i_typ
+    * R
+    * T_ref
+    * tau_th_yz
+    / (pybamm.thermal_parameters.rho_eff_dim * F * Delta_T * L_x)
+)
+
+T_amb_dim = pybamm.thermal_parameters.T_amb_dim
+T_amb = pybamm.thermal_parameters.T_amb
+
 # Initial conditions
+T_init = pybamm.thermal_parameters.T_init
 q_init = pybamm.Parameter("Initial State of Charge")
 c_e_init = q_init
 c_ox_init = c_ox_init_dim / c_ox_typ
@@ -428,12 +468,6 @@ def c_p_init(x):
     return c_e_init
 
 
-# Thermal effects not implemented for lead-acid, but parameters needed for consistency
-T_init = pybamm.Scalar(0)
-Theta = pybamm.Scalar(0)  # ratio of typical temperature change to ambient temperature
-T_amb_dim = pybamm.thermal_parameters.T_amb_dim
-T_amb = pybamm.thermal_parameters.T_amb
-
 # --------------------------------------------------------------------------------------
 "5. Dimensionless Functions"
 
diff --git a/pybamm/solvers/algebraic_solver.py b/pybamm/solvers/algebraic_solver.py
index 35ed42f08..191a98709 100644
--- a/pybamm/solvers/algebraic_solver.py
+++ b/pybamm/solvers/algebraic_solver.py
@@ -107,4 +107,3 @@ class AlgebraicSolver(pybamm.BaseSolver):
 
         # Return solution object (no events, so pass None to t_event, y_event)
         return pybamm.Solution(t_eval, y, termination="success")
-
diff --git a/pybamm/solvers/casadi_algebraic_solver.py b/pybamm/solvers/casadi_algebraic_solver.py
index 389b87c14..56fbbc7d8 100644
--- a/pybamm/solvers/casadi_algebraic_solver.py
+++ b/pybamm/solvers/casadi_algebraic_solver.py
@@ -113,4 +113,3 @@ class CasadiAlgebraicSolver(pybamm.BaseSolver):
 
         # Return solution object (no events, so pass None to t_event, y_event)
         return pybamm.Solution(t_eval, y, termination="success")
-


Test patch:
diff --git a/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_composite.py b/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_composite.py
index b8f5f3fe3..3e20babeb 100644
--- a/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_composite.py
+++ b/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_composite.py
@@ -63,6 +63,17 @@ class TestLeadAcidCompositeSurfaceForm(unittest.TestCase):
         modeltest = tests.StandardModelTest(model, parameter_values=param)
         modeltest.test_all()  # solver=pybamm.CasadiSolver())
 
+    # def test_thermal(self):
+    #     options = {"thermal": "x-lumped"}
+    #     model = pybamm.lead_acid.Composite(options)
+    #     modeltest = tests.StandardModelTest(model)
+    #     modeltest.test_all()
+
+    #     options = {"thermal": "x-full"}
+    #     model = pybamm.lead_acid.Composite(options)
+    #     modeltest = tests.StandardModelTest(model)
+    #     modeltest.test_all()
+
 
 class TestLeadAcidCompositeExtended(unittest.TestCase):
     def test_basic_processing(self):
diff --git a/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_full.py b/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_full.py
index 54529ed5f..61a6afe67 100644
--- a/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_full.py
+++ b/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_full.py
@@ -85,6 +85,17 @@ class TestLeadAcidFullSurfaceForm(unittest.TestCase):
         optimtest.set_up_model(simplify=False, to_python=False)
         optimtest.set_up_model(simplify=True, to_python=False)
 
+    def test_thermal(self):
+        options = {"thermal": "x-lumped"}
+        model = pybamm.lead_acid.Full(options)
+        modeltest = tests.StandardModelTest(model)
+        modeltest.test_all()
+
+        options = {"thermal": "x-full"}
+        model = pybamm.lead_acid.Full(options)
+        modeltest = tests.StandardModelTest(model)
+        modeltest.test_all()
+
 
 if __name__ == "__main__":
     print("Add -v for more debug output")
diff --git a/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_loqs.py b/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_loqs.py
index 368cf5e97..7d049f2e6 100644
--- a/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_loqs.py
+++ b/tests/integration/test_models/test_full_battery_models/test_lead_acid/test_loqs.py
@@ -55,6 +55,17 @@ class TestLOQS(unittest.TestCase):
         modeltest = tests.StandardModelTest(model)
         modeltest.test_all()
 
+    def test_thermal(self):
+        options = {"thermal": "x-lumped"}
+        model = pybamm.lead_acid.LOQS(options)
+        modeltest = tests.StandardModelTest(model)
+        modeltest.test_all()
+
+        options = {"thermal": "x-full"}
+        model = pybamm.lead_acid.LOQS(options)
+        modeltest = tests.StandardModelTest(model)
+        modeltest.test_all()
+
 
 if __name__ == "__main__":
     print("Add -v for more debug output")
diff --git a/tests/unit/test_models/test_full_battery_models/test_lead_acid/test_base_lead_acid_model.py b/tests/unit/test_models/test_full_battery_models/test_lead_acid/test_base_lead_acid_model.py
index 3dbee2897..43f02eae8 100644
--- a/tests/unit/test_models/test_full_battery_models/test_lead_acid/test_base_lead_acid_model.py
+++ b/tests/unit/test_models/test_full_battery_models/test_lead_acid/test_base_lead_acid_model.py
@@ -29,13 +29,17 @@ class TestBaseLeadAcidModel(unittest.TestCase):
 
     def test_incompatible_options(self):
         with self.assertRaisesRegex(
-            pybamm.OptionError, "thermal effects not implemented"
+            pybamm.OptionError,
+            "Thermal current collector effects are "
+            "not implemented for lead-acid models.",
         ):
-            pybamm.lead_acid.BaseModel({"thermal": "x-full"})
+            pybamm.lead_acid.BaseModel({"thermal current collector": True})
+
         with self.assertRaisesRegex(
-            pybamm.OptionError, "thermal effects not implemented"
+            pybamm.OptionError,
+            "Lead-acid models can only have thermal " "effects if dimensionality is 0.",
         ):
-            pybamm.lead_acid.BaseModel({"thermal current collector": True})
+            pybamm.lead_acid.BaseModel({"dimensionality": 1, "thermal": "x-full"})
 
 
 if __name__ == "__main__":
diff --git a/tests/unit/test_parameters/test_parameter_sets/test_Landesfeind2020.py b/tests/unit/test_parameters/test_parameter_sets/test_Landesfeind2020.py
index 0e68ef745..6a7e16e6b 100644
--- a/tests/unit/test_parameters/test_parameter_sets/test_Landesfeind2020.py
+++ b/tests/unit/test_parameters/test_parameter_sets/test_Landesfeind2020.py
@@ -8,14 +8,15 @@ import numpy as np
 
 
 class TestLandesfeind(unittest.TestCase):
-
     def test_electrolyte_conductivity(self):
         root = pybamm.root_dir()
         p = "pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019"
         k_path = os.path.join(root, p)
-        files = [f for f in os.listdir(k_path) if '.py' in f
-                 and '_base' not in f
-                 and 'conductivity' in f]
+        files = [
+            f
+            for f in os.listdir(k_path)
+            if ".py" in f and "_base" not in f and "conductivity" in f
+        ]
         files.sort()
         funcs = [pybamm.load_function(os.path.join(k_path, f)) for f in files]
         T_ref = 298.15
@@ -29,7 +30,7 @@ class TestLandesfeind(unittest.TestCase):
 
         chemistry = pybamm.parameter_sets.Chen2020
         param = pybamm.ParameterValues(chemistry=chemistry)
-        param['Electrolyte conductivity [S.m-1]'] = funcs[0]
+        param["Electrolyte conductivity [S.m-1]"] = funcs[0]
         model = pybamm.lithium_ion.SPM()
         sim = pybamm.Simulation(model, parameter_values=param)
         sim.set_parameters()
@@ -39,9 +40,11 @@ class TestLandesfeind(unittest.TestCase):
         root = pybamm.root_dir()
         p = "pybamm/input/parameters/lithium-ion/electrolytes/lipf6_Landesfeind2019"
         d_path = os.path.join(root, p)
-        files = [f for f in os.listdir(d_path) if '.py' in f
-                 and '_base' not in f
-                 and 'diffusivity' in f]
+        files = [
+            f
+            for f in os.listdir(d_path)
+            if ".py" in f and "_base" not in f and "diffusivity" in f
+        ]
         files.sort()
         funcs = [pybamm.load_function(os.path.join(d_path, f)) for f in files]
         T_ref = 298.15
@@ -55,7 +58,7 @@ class TestLandesfeind(unittest.TestCase):
 
         chemistry = pybamm.parameter_sets.Chen2020
         param = pybamm.ParameterValues(chemistry=chemistry)
-        param['Electrolyte diffusivity [m2.s-1]'] = funcs[0]
+        param["Electrolyte diffusivity [m2.s-1]"] = funcs[0]
         model = pybamm.lithium_ion.SPM()
         sim = pybamm.Simulation(model, parameter_values=param)
         sim.set_parameters()