diff --git a/CHANGELOG.md b/CHANGELOG.md index f9c492050e..9424b85ad9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ ## Bug fixes +- Fix bug that was slowing down creation of the EC reaction SEI submodel ([#1227](https://github.com/pybamm-team/PyBaMM/pull/1227)) +- Add missing separator thermal parameters for the Ecker parameter set ([#1226](https://github.com/pybamm-team/PyBaMM/pull/1226)) - Raise error if saving to matlab with variable names that matlab can't read, and give option of providing alternative variable names ([#1206](https://github.com/pybamm-team/PyBaMM/pull/1206)) - Raise error if the boundary condition at the origin in a spherical domain is other than no-flux ([#1175](https://github.com/pybamm-team/PyBaMM/pull/1175)) - Fix boundary conditions at r = 0 for Creating Models notebooks ([#1173](https://github.com/pybamm-team/PyBaMM/pull/1173)) diff --git a/pybamm/input/parameters/lithium-ion/separators/separator_Ecker2015/parameters.csv b/pybamm/input/parameters/lithium-ion/separators/separator_Ecker2015/parameters.csv index b1f6cf21a9..d51a852b4d 100644 --- a/pybamm/input/parameters/lithium-ion/separators/separator_Ecker2015/parameters.csv +++ b/pybamm/input/parameters/lithium-ion/separators/separator_Ecker2015/parameters.csv @@ -4,3 +4,6 @@ Name [units],Value,Reference,Notes Separator porosity,0.508,, Separator Bruggeman coefficient (electrolyte),1.9804586773134942, Solve for permeability factor B=0.304=eps^b, Separator Bruggeman coefficient (electrode),0,No Bruggeman correction to solid conductivity, +Separator density [kg.m-3],397,default, +Separator specific heat capacity [J.kg-1.K-1],700,default, +Separator thermal conductivity [W.m-1.K-1],0.16,default, \ No newline at end of file diff --git a/pybamm/models/submodels/interface/sei/ec_reaction_limited.py b/pybamm/models/submodels/interface/sei/ec_reaction_limited.py index 72495bb27b..9c03cd9d54 100644 --- a/pybamm/models/submodels/interface/sei/ec_reaction_limited.py +++ b/pybamm/models/submodels/interface/sei/ec_reaction_limited.py @@ -87,13 +87,18 @@ def set_algebraic(self, variables): # it's ok to fall back on the total interfacial current density, j_tot # This should only happen when the interface submodel is "InverseButlerVolmer" # in which case j = j_tot (uniform) anyway - try: + if ( + "Total " + + self.domain.lower() + + " electrode interfacial current density variable" + in variables + ): j = variables[ "Total " + self.domain.lower() - + " electrode interfacial current density" + + " electrode interfacial current density variable" ] - except KeyError: + else: j = variables[ "X-averaged " + self.domain.lower() diff --git a/pybamm/models/submodels/interface/sei/reaction_limited.py b/pybamm/models/submodels/interface/sei/reaction_limited.py index 0f6fd0ed37..a78c7a5a56 100644 --- a/pybamm/models/submodels/interface/sei/reaction_limited.py +++ b/pybamm/models/submodels/interface/sei/reaction_limited.py @@ -41,9 +41,9 @@ def get_coupled_variables(self, variables): # it's ok to fall back on the total interfacial current density, j_tot # This should only happen when the interface submodel is "InverseButlerVolmer" # in which case j = j_tot (uniform) anyway - try: + if self.domain + " electrode interfacial current density" in variables: j = variables[self.domain + " electrode interfacial current density"] - except KeyError: + else: j = variables[ "X-averaged " + self.domain.lower()