Skip to content

Commit

Permalink
#1726 tests and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Oct 26, 2021
1 parent 65970f5 commit eb51665
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

## Features

- Summary variables can now be user-determined ([#1759](https://github.com/pybamm-team/PyBaMM/pull/1759))
- Added a new method (`create_gif`) in `QuickPlot`, `Simulation` and `BatchStudy` to create a GIF of a simulation ([#1754](https://github.com/pybamm-team/PyBaMM/pull/1754))
- Added more examples for the `BatchStudy` class ([#1747](https://github.com/pybamm-team/PyBaMM/pull/1747))
- SEI models can now be included in the half-cell model ([#1705](https://github.com/pybamm-team/PyBaMM/pull/1705))

## Bug fixes

- Half-cell model and lead-acid models can now be simulated with `Experiment`s ([#1759](https://github.com/pybamm-team/PyBaMM/pull/1759))
- Removed in-place modification of the solution objects by `QuickPlot` ([#1747](https://github.com/pybamm-team/PyBaMM/pull/1747))
- Fixed vector-vector multiplication bug that was causing errors in the SPM with constant voltage or power ([#1735](https://github.com/pybamm-team/PyBaMM/pull/1735))
# [v21.9](https://github.com/pybamm-team/PyBaMM/tree/v21.9) - 2021-09-30

## Features
Expand Down
22 changes: 22 additions & 0 deletions tests/unit/test_experiments/test_simulation_with_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,28 @@ def test_inputs(self):
sim.solve(inputs={"Dsn": 2})
np.testing.assert_array_equal(sim.solution.all_inputs[0]["Dsn"], 2)

def test_run_experiment_half_cell(self):
experiment = pybamm.Experiment(
[("Discharge at C/20 until 3.5V", "Charge at 1C until 3.8 V")]
)
model = pybamm.lithium_ion.DFN({"working electrode": "positive"})
sim = pybamm.Simulation(
model,
experiment=experiment,
parameter_values=pybamm.ParameterValues(
chemistry=pybamm.parameter_sets.Xu2019
),
)
sim.solve()

def test_run_experiment_lead_acid(self):
experiment = pybamm.Experiment(
[("Discharge at C/20 until 1.9V", "Charge at 1C until 2.1 V")]
)
model = pybamm.lead_acid.Full()
sim = pybamm.Simulation(model, experiment=experiment)
sim.solve()


if __name__ == "__main__":
print("Add -v for more debug output")
Expand Down

0 comments on commit eb51665

Please sign in to comment.