Skip to content

Commit

Permalink
Merge pull request #2845 from pybamm-team/remove-ocv
Browse files Browse the repository at this point in the history
rename Open-circuit voltage to Bulk open-circuit voltage
  • Loading branch information
valentinsulzer authored Mar 31, 2023
2 parents cc1bff5 + bf594c6 commit 08dc8f7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- Added method to calculate maximum theoretical energy. ([#2777](https://github.com/pybamm-team/PyBaMM/pull/2777)) and add to summary variables ([#2781](https://github.com/pybamm-team/PyBaMM/pull/2781))
- Renamed "Terminal voltage [V]" to just "Voltage [V]". "Terminal voltage [V]" can still be used and will return the same value as "Voltage [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Added "Negative electrode surface potential difference at separator interface [V]", which is the value of the surface potential difference (`phi_s - phi_e`) at the anode/separator interface, commonly controlled in fast-charging algorithms to avoid plating. Also added "Positive electrode surface potential difference at separator interface [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Added "Open-circuit voltage [V]", which is the open-circuit voltage as calculated from the bulk particle concentrations. The old variable "Measured open circuit voltage [V]", which referred to the open-circuit potential as calculated from the surface particle concentrations, has been renamed to "Surface open-circuit voltage [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Added "Bulk open-circuit voltage [V]", which is the open-circuit voltage as calculated from the bulk particle concentrations. The old variable "Measured open circuit voltage [V]", which referred to the open-circuit potential as calculated from the surface particle concentrations, has been renamed to "Surface open-circuit voltage [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740)) "Bulk open-circuit voltage [V]" was briefly named "Open-circuit voltage [V]", but this was changed in ([#2845](https://github.com/pybamm-team/PyBaMM/pull/2845))
- Added an example for `plot_voltage_components`, explaining what the different voltage components are. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))

## Bug fixes
Expand All @@ -30,7 +30,7 @@
- `ElectrodeSOH.solve` now returns a `{str: float}` dict instead of a `pybamm.Solution` object (to avoid having to do `.data[0]` every time). In any code that uses `sol = ElectrodeSOH.solve()`, `sol[key].data[0]` should be replaced with `sol[key]`. ([#2779](https://github.com/pybamm-team/PyBaMM/pull/2779))
- Removed "... cation signed stoichiometry" and "... electrons in reaction" parameters, they are now hardcoded. ([#2778](https://github.com/pybamm-team/PyBaMM/pull/2778))
- When using `solver.step()`, the first time point in the step is shifted by `pybamm.settings.step_start_offset` (default 1 ns) to avoid having duplicate times in the solution steps from the end of one step and the start of the next. ([#2773](https://github.com/pybamm-team/PyBaMM/pull/2773))
- Renamed "Measured open circuit voltage [V]" to "Surface open-circuit voltage [V]". This variable was calculated from surface particle concentrations, and hence "hid" the overpotential from particle gradients. The new variable "Open-circuit voltage [V]" is calculated from bulk particle concentrations instead. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Renamed "Measured open circuit voltage [V]" to "Surface open-circuit voltage [V]". This variable was calculated from surface particle concentrations, and hence "hid" the overpotential from particle gradients. The new variable "Bulk open-circuit voltage [V]" is calculated from bulk particle concentrations instead. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Renamed all references to "open circuit" to be "open-circuit" instead. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Renamed parameter "1 + dlnf/dlnc" to "Thermodynamic factor". ([#2727](https://github.com/pybamm-team/PyBaMM/pull/2727))
- All PyBaMM models are now dimensional. This has been benchmarked against dimensionless models and found to give around the same solve time. Implementing dimensional models greatly reduces the barrier to entry for adding new models. However, this comes with several breaking changes: (i) the `timescale` and `length_scales` attributes of a model have been removed (they are no longer needed) (ii) several dimensionless variables are no longer defined, but the corresponding dimensional variables can still be accessed by adding the units to the name (iii) some parameters used only for non-dimensionalization, such as "Typical current [A]", have been removed ([#2419](https://github.com/pybamm-team/PyBaMM/pull/2419))
Expand Down
2 changes: 1 addition & 1 deletion pybamm/models/full_battery_models/base_battery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ def set_voltage_variables(self):
self.variables.update(
{
"Surface open-circuit voltage [V]": ocv_surf,
"Open-circuit voltage [V]": ocv_bulk,
"Bulk open-circuit voltage [V]": ocv_bulk,
"Particle concentration overpotential [V]": eta_particle,
"X-averaged reaction overpotential [V]": eta_r_av,
"X-averaged SEI film overpotential [V]": eta_sei_av,
Expand Down
10 changes: 5 additions & 5 deletions pybamm/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def __getitem__(self, key):
)
if "Measured open circuit voltage" in key:
raise KeyError(
"The variable for open circuit voltage is now called "
"'Open-circuit voltage [V]'. The variable that used to be called "
"The variable that used to be called "
"'Measured open circuit voltage [V]' is now called "
"'Surface open-circuit voltage [V]', but this is not the true "
"open-circuit voltage of the cell since it includes the "
"particle concentration overpotentials."
"'Surface open-circuit voltage [V]'. There is also another "
"variable called 'Bulk open-circuit voltage [V]' which is the"
"open-circuit voltage evaluated at the average particle "
"concentrations."
)
best_matches = self.get_best_matches(key)
for k in best_matches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self, time, solutions):

def test_all(self):
# Potentials
self.compare("Open-circuit voltage [V]")
self.compare("Bulk open-circuit voltage [V]")
# Currents
self.compare(
"X-averaged negative electrode volumetric "
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_models/standard_output_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __init__(self, model, param, disc, solution, operating_condition):
self.ocp_p = solution[
f"Positive electrode {self.phase_name_p}bulk open-circuit potential [V]"
]
self.ocv = solution["Open-circuit voltage [V]"]
self.ocv = solution["Bulk open-circuit voltage [V]"]
self.voltage = solution["Voltage [V]"]

def test_each_reaction_overpotential(self):
Expand Down

0 comments on commit 08dc8f7

Please sign in to comment.