diff --git a/README.md b/README.md index 72d39b927d..1b54201f5b 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ The easiest way to use PyBaMM is to run a 1C constant-current discharge with a m ```python3 import pybamm + model = pybamm.lithium_ion.DFN() # Doyle-Fuller-Newman model sim = pybamm.Simulation(model) sim.solve([0, 3600]) # solve for 1 hour @@ -64,13 +65,16 @@ or simulate an experiment such as a constant-current discharge followed by a con ```python3 import pybamm + experiment = pybamm.Experiment( [ - ("Discharge at C/10 for 10 hours or until 3.3 V", - "Rest for 1 hour", - "Charge at 1 A until 4.1 V", - "Hold at 4.1 V until 50 mA", - "Rest for 1 hour") + ( + "Discharge at C/10 for 10 hours or until 3.3 V", + "Rest for 1 hour", + "Charge at 1 A until 4.1 V", + "Hold at 4.1 V until 50 mA", + "Rest for 1 hour", + ) ] * 3, ) diff --git a/benchmarks/README.md b/benchmarks/README.md index 893fdf2f5a..ac7ffbdfb3 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -63,8 +63,8 @@ Note that benchmark functions _must_ start with the prefix `time_`, for instance ```python3 def time_solve_SPM_ScipySolver(self): - solver = pb.ScipySolver() - solver.solve(self.model, [0, 3600]) + solver = pb.ScipySolver() + solver.solve(self.model, [0, 3600]) ``` In the case where some setup is necessary, but should not be timed, a `setup` function @@ -76,7 +76,7 @@ class TimeSPM: model = pb.lithium_ion.SPM() geometry = model.default_geometry - # ... + # ... self.model = model