From 0beaff2f7c7eb3d816284718d84662802793387e Mon Sep 17 00:00:00 2001 From: "Tom.Maull" Date: Tue, 5 Dec 2023 15:39:29 +0000 Subject: [PATCH] rob's suggestions --- pybamm/models/submodels/thermal/pouch_cell/x_full.py | 6 +++++- pybamm/parameters/thermal_parameters.py | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pybamm/models/submodels/thermal/pouch_cell/x_full.py b/pybamm/models/submodels/thermal/pouch_cell/x_full.py index 64a6e687c6..d8e7614a87 100644 --- a/pybamm/models/submodels/thermal/pouch_cell/x_full.py +++ b/pybamm/models/submodels/thermal/pouch_cell/x_full.py @@ -180,4 +180,8 @@ def set_initial_conditions(self, variables): T_cn = variables["Negative current collector temperature [K]"] T_cp = variables["Positive current collector temperature [K]"] T_init = self.param.T_init - self.initial_conditions = {T_cn: T_init, T: T_init, T_cp: T_init} + self.initial_conditions = { + T_cn: pybamm.boundary_value(T_init, "left"), + T: T_init, + T_cp: pybamm.boundary_value(T_init, "right"), + } diff --git a/pybamm/parameters/thermal_parameters.py b/pybamm/parameters/thermal_parameters.py index 2a4c4dbe94..837ffbd60a 100644 --- a/pybamm/parameters/thermal_parameters.py +++ b/pybamm/parameters/thermal_parameters.py @@ -31,9 +31,12 @@ def __init__(self, options=None): def _set_parameters(self): """Defines the dimensional parameters""" - for domain, params in self.domain_params.items(): - #params._domain = domain # Set _domain attribute - params._set_parameters() + for domain in self.domain_params.values(): + domain._set_parameters() + + # for domain, params in self.domain_params.items(): + # #params._domain = domain # Set _domain attribute + # params._set_parameters() # Reference temperature self.T_ref = pybamm.Parameter("Reference temperature [K]")