Skip to content

Commit

Permalink
changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimms committed Mar 11, 2021
1 parent c1a1d14 commit d14a041
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- Added `NewmanTobias` li-ion battery model ([#1423](https://github.com/pybamm-team/PyBaMM/pull/1423))
- Added `plot_voltage_components` to easily plot the component overpotentials that make up the voltage ([#1419](https://github.com/pybamm-team/PyBaMM/pull/1419))
- Made `QuickPlot` more customizable and added an example ([#1419](https://github.com/pybamm-team/PyBaMM/pull/1419))
- `Solution` objects can now be created by stepping *different* models ([#1408](https://github.com/pybamm-team/PyBaMM/pull/1408))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,6 @@ def _get_total_concentration_electrolyte(self, c_e, epsilon):

return variables

def set_boundary_conditions(self, variables):

c_e = variables["Electrolyte concentration"]

self.boundary_conditions = {
c_e: {
"left": (pybamm.Scalar(0), "Neumann"),
"right": (pybamm.Scalar(0), "Neumann"),
}
}

def set_events(self, variables):
c_e = variables["Electrolyte concentration"]
self.events.append(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,14 @@ def set_initial_conditions(self, variables):
c_e = variables["Electrolyte concentration"]

self.initial_conditions = {c_e: self.param.c_e_init}

def set_boundary_conditions(self, variables):

c_e = variables["Electrolyte concentration"]

self.boundary_conditions = {
c_e: {
"left": (pybamm.Scalar(0), "Neumann"),
"right": (pybamm.Scalar(0), "Neumann"),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,19 @@ def get_coupled_variables(self, variables):
variables.update(self._get_total_concentration_electrolyte(c_e, eps))

return variables

def set_boundary_conditions(self, variables):
"""
We provide boundary conditions even though the concentration is constant
so that the gradient of the concentration has the correct shape after
discretisation.
"""

c_e = variables["Electrolyte concentration"]

self.boundary_conditions = {
c_e: {
"left": (pybamm.Scalar(0), "Neumann"),
"right": (pybamm.Scalar(0), "Neumann"),
}
}
11 changes: 11 additions & 0 deletions pybamm/models/submodels/electrolyte_diffusion/full_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,14 @@ def set_initial_conditions(self, variables):
c_e = variables["Electrolyte concentration"]

self.initial_conditions = {c_e: self.param.c_e_init}

def set_boundary_conditions(self, variables):

c_e = variables["Electrolyte concentration"]

self.boundary_conditions = {
c_e: {
"left": (pybamm.Scalar(0), "Neumann"),
"right": (pybamm.Scalar(0), "Neumann"),
}
}

0 comments on commit d14a041

Please sign in to comment.