Skip to content

Commit d14a041

Browse files
committed
changelog
1 parent c1a1d14 commit d14a041

File tree

5 files changed

+39
-11
lines changed

5 files changed

+39
-11
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Features
44

5+
- Added `NewmanTobias` li-ion battery model ([#1423](https://github.com/pybamm-team/PyBaMM/pull/1423))
56
- Added `plot_voltage_components` to easily plot the component overpotentials that make up the voltage ([#1419](https://github.com/pybamm-team/PyBaMM/pull/1419))
67
- Made `QuickPlot` more customizable and added an example ([#1419](https://github.com/pybamm-team/PyBaMM/pull/1419))
78
- `Solution` objects can now be created by stepping *different* models ([#1408](https://github.com/pybamm-team/PyBaMM/pull/1408))

pybamm/models/submodels/electrolyte_diffusion/base_electrolyte_diffusion.py

-11
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,6 @@ def _get_total_concentration_electrolyte(self, c_e, epsilon):
134134

135135
return variables
136136

137-
def set_boundary_conditions(self, variables):
138-
139-
c_e = variables["Electrolyte concentration"]
140-
141-
self.boundary_conditions = {
142-
c_e: {
143-
"left": (pybamm.Scalar(0), "Neumann"),
144-
"right": (pybamm.Scalar(0), "Neumann"),
145-
}
146-
}
147-
148137
def set_events(self, variables):
149138
c_e = variables["Electrolyte concentration"]
150139
self.events.append(

pybamm/models/submodels/electrolyte_diffusion/composite_diffusion.py

+11
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,14 @@ def set_initial_conditions(self, variables):
9595
c_e = variables["Electrolyte concentration"]
9696

9797
self.initial_conditions = {c_e: self.param.c_e_init}
98+
99+
def set_boundary_conditions(self, variables):
100+
101+
c_e = variables["Electrolyte concentration"]
102+
103+
self.boundary_conditions = {
104+
c_e: {
105+
"left": (pybamm.Scalar(0), "Neumann"),
106+
"right": (pybamm.Scalar(0), "Neumann"),
107+
}
108+
}

pybamm/models/submodels/electrolyte_diffusion/constant_concentration.py

+16
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,19 @@ def get_coupled_variables(self, variables):
4545
variables.update(self._get_total_concentration_electrolyte(c_e, eps))
4646

4747
return variables
48+
49+
def set_boundary_conditions(self, variables):
50+
"""
51+
We provide boundary conditions even though the concentration is constant
52+
so that the gradient of the concentration has the correct shape after
53+
discretisation.
54+
"""
55+
56+
c_e = variables["Electrolyte concentration"]
57+
58+
self.boundary_conditions = {
59+
c_e: {
60+
"left": (pybamm.Scalar(0), "Neumann"),
61+
"right": (pybamm.Scalar(0), "Neumann"),
62+
}
63+
}

pybamm/models/submodels/electrolyte_diffusion/full_diffusion.py

+11
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,14 @@ def set_initial_conditions(self, variables):
8181
c_e = variables["Electrolyte concentration"]
8282

8383
self.initial_conditions = {c_e: self.param.c_e_init}
84+
85+
def set_boundary_conditions(self, variables):
86+
87+
c_e = variables["Electrolyte concentration"]
88+
89+
self.boundary_conditions = {
90+
c_e: {
91+
"left": (pybamm.Scalar(0), "Neumann"),
92+
"right": (pybamm.Scalar(0), "Neumann"),
93+
}
94+
}

0 commit comments

Comments
 (0)