Skip to content

Commit 5ebed5a

Browse files
#1100 merge and fix flake8
2 parents 2407617 + f4ea0e7 commit 5ebed5a

File tree

81 files changed

+2092
-949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2092
-949
lines changed

.all-contributorsrc

+11
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,17 @@
272272
"example",
273273
"test"
274274
]
275+
},
276+
{
277+
"login": "lonnbornj",
278+
"name": "lonnbornj",
279+
"avatar_url": "https://avatars2.githubusercontent.com/u/35983543?v=4",
280+
"profile": "https://github.com/lonnbornj",
281+
"contributions": [
282+
"code",
283+
"test",
284+
"example"
285+
]
275286
}
276287
],
277288
"contributorsPerLine": 7,

.github/workflows/test_on_push.yml

+7
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,17 @@ jobs:
4747
sudo apt install gfortran gcc libopenblas-dev graphviz
4848
sudo apt install python${{ matrix.python-version }}.dev
4949
50+
# Added fixes to homebrew installs:
51+
# rm -f /usr/local/bin/2to3
52+
# (see https://github.com/actions/virtual-environments/issues/2322)
53+
# brew unlink gcc@8 gcc@9
54+
# (see https://github.com/actions/virtual-environments/issues/2391)
5055
- name: Install MacOS system dependencies
5156
if: matrix.os == 'macos-latest'
5257
run: |
58+
rm -f /usr/local/bin/2to3
5359
brew update
60+
brew unlink gcc@8 gcc@9
5461
brew install graphviz
5562
brew install openblas
5663

CHANGELOG.md

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

33
## Features
44

5+
6+
- Updated the way events are handled in `CasadiSolver` for more accurate event location ([#1328](https://github.com/pybamm-team/PyBaMM/pull/1328))
7+
- Added error message if initial conditions are outside the bounds of a variable ([#1326](https://github.com/pybamm-team/PyBaMM/pull/1326))
8+
- Added temperature dependence to density, heat capacity and thermal conductivity ([#1323](https://github.com/pybamm-team/PyBaMM/pull/1323))
9+
- Updated solvers' method `solve()` so it can take a list of inputs dictionaries as the `inputs` keyword argument. In this case the model is solved for each input set in the list, and a list of solutions mapping the set of inputs to the solutions is returned. Note that `solve()` can still take a single dictionary as the `inputs` keyword argument. In this case the behaviour is unchanged compared to previous versions.
10+
- Added temperature dependence to the transference number (`t_plus`) ([#1317](https://github.com/pybamm-team/PyBaMM/pull/1317))
511
- Added new functionality for `Interpolant` ([#1312](https://github.com/pybamm-team/PyBaMM/pull/1312))
12+
- Added option to express experiments (and extract solutions) in terms of cycles of operating condition ([#1309](https://github.com/pybamm-team/PyBaMM/pull/1309))
13+
- The event time and state are now returned as part of `Solution.t` and `Solution.y` so that the event is accurately captured in the returned solution ([#1300](https://github.com/pybamm-team/PyBaMM/pull/1300))
614
- Reformatted the `BasicDFNHalfCell` to be consistent with the other models ([#1282](https://github.com/pybamm-team/PyBaMM/pull/1282))
715
- Added option to make the total interfacial current density a state ([#1280](https://github.com/pybamm-team/PyBaMM/pull/1280))
816
- Added functionality to initialize a model using the solution from another model ([#1278](https://github.com/pybamm-team/PyBaMM/pull/1278))
@@ -11,10 +19,14 @@
1119

1220
## Optimizations
1321

22+
- If solver method `solve()` is passed a list of inputs as the `inputs` keyword argument, the resolution of the model for each input set is spread acrosss several Python processes, usually running in parallel on different processors. The default number of processes is the number of processors available. `solve()` takes a new keyword argument `nproc` which can be used to set this number a manually.
23+
- Variables are now post-processed using CasADi ([#1316](https://github.com/pybamm-team/PyBaMM/pull/1316))
1424
- Operations such as `1*x` and `0+x` now directly return `x` ([#1252](https://github.com/pybamm-team/PyBaMM/pull/1252))
1525

1626
## Bug fixes
1727

28+
- Fixed a bug in `CasadiSolver` safe mode which crashed when there were extrapolation events but no termination events ([#1321](https://github.com/pybamm-team/PyBaMM/pull/1321))
29+
- When an `Interpolant` is extrapolated an error is raised for `CasadiSolver` (and a warning is raised for the other solvers) ([#1315](https://github.com/pybamm-team/PyBaMM/pull/1315))
1830
- Fixed `Simulation` and `model.new_copy` to fix a bug where changes to the model were overwritten ([#1278](https://github.com/pybamm-team/PyBaMM/pull/1278))
1931

2032
## Breaking changes
@@ -59,7 +71,7 @@ This release introduces a new aging model for particle swelling and cracking, a
5971

6072
## Breaking changes
6173

62-
- The parameters "Positive/Negative particle distribution in x" and "Positive/Negative surface area to volume ratio distribution in x" have been deprecated. Instead, users can provide "Positive/Negative particle radius [m]" and "Positive/Negative surface area to volume ratio [m-1]" directly as functions of through-cell position (x [m]) ([#1237](https://github.com/pybamm-team/PyBaMM/pull/1237))
74+
- The parameters "Positive/Negative particle distribution in x" and "Positive/Negative surface area to volume ratio distribution in x" have been deprecated. Instead, users can provide "Positive/Negative particle radius [m]" and "Positive/Negative surface area to volume ratio [m-1]" directly as functions of through-cell position (x [m]) ([#1237](https://github.com/pybamm-team/PyBaMM/pull/1237))
6375

6476
# [v0.2.4](https://github.com/pybamm-team/PyBaMM/tree/v0.2.4) - 2020-09-07
6577

@@ -91,17 +103,12 @@ This release adds new operators for more complex models, some basic sensitivity
91103

92104
## Breaking changes
93105

94-
<<<<<<< HEAD
95106
- Changed sensitivity API. Removed `ProcessedSymbolicVariable`, all sensitivity now handled within the solvers and `ProcessedVariable` ()
96-
- The modules containing standard parameters are now classes so they can take options
97-
(e.g. `standard_parameters_lithium_ion` is now `LithiumIonParameters`) ([#1120])(https://github.com/pybamm-team/PyBaMM/pull/1120)
98107
- Renamed `quick_plot_vars` to `output_variables` in `Simulation` to be consistent with `QuickPlot`. Passing `quick_plot_vars` to `Simulation.plot()` has been deprecated and `output_variables` should be passed instead ([#1099](https://github.com/pybamm-team/PyBaMM/pull/1099))
99-
=======
100108
- The "fast diffusion" particle option has been renamed "uniform profile" ([#1130](https://github.com/pybamm-team/PyBaMM/pull/1130))
101109
- The modules containing standard parameters are now classes so they can take options
102110
(e.g. `standard_parameters_lithium_ion` is now `LithiumIonParameters`) ([#1120](https://github.com/pybamm-team/PyBaMM/pull/1120))
103111
- Renamed `quick_plot_vars` to `output_variables` in `Simulation` to be consistent with `QuickPlot`. Passing `quick_plot_vars` to `Simulation.plot()` has been deprecated and `output_variables` should be passed instead ([#1099](https://github.com/pybamm-team/PyBaMM/pull/1099))
104-
>>>>>>> develop
105112

106113
# [v0.2.3](https://github.com/pybamm-team/PyBaMM/tree/v0.2.3) - 2020-07-01
107114

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2018-2020, the PyBaMM team.
1+
Copyright (c) 2018-2021, the PyBaMM team.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/master/)
77
[![black_code_style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
88
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
9-
[![All Contributors](https://img.shields.io/badge/all_contributors-22-orange.svg?style=flat-square)](#contributors-)
9+
[![All Contributors](https://img.shields.io/badge/all_contributors-23-orange.svg?style=flat-square)](#contributors-)
1010
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1111

1212
PyBaMM (Python Battery Mathematical Modelling) solves physics-based electrochemical DAE models by using state-of-the-art automatic differentiation and numerical solvers. The Doyle-Fuller-Newman model can be solved in under 0.1 seconds, while the reduced-order Single Particle Model and Single Particle Model with electrolyte can be solved in just a few milliseconds. Additional physics can easily be included such as thermal effects, fast particle diffusion, 3D effects, and more. All models are implemented in a flexible manner, and a wide range of models and parameter sets (NCA, NMC, LiCoO2, ...) are available. There is also functionality to simulate any set of experimental instructions, such as CCCV or GITT, or specify drive cycles.
@@ -142,6 +142,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
142142
</tr>
143143
<tr>
144144
<td align="center"><a href="https://github.com/weilongai"><img src="https://avatars1.githubusercontent.com/u/41424174?v=4" width="100px;" alt=""/><br /><sub><b>WEILONG AI</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=weilongai" title="Code">💻</a> <a href="#example-weilongai" title="Examples">💡</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=weilongai" title="Tests">⚠️</a></td>
145+
<td align="center"><a href="https://github.com/lonnbornj"><img src="https://avatars2.githubusercontent.com/u/35983543?v=4" width="100px;" alt=""/><br /><sub><b>lonnbornj</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=lonnbornj" title="Code">💻</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=lonnbornj" title="Tests">⚠️</a> <a href="#example-lonnbornj" title="Examples">💡</a></td>
145146
</tr>
146147
</table>
147148

build_manylinux_wheels/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM quay.io/pypa/manylinux2010_x86_64:2020-05-29-c06f15c
1+
FROM quay.io/pypa/manylinux2014_x86_64:2020-11-11-bc8ce45
22

3-
ENV PLAT manylinux2010_x86_64
3+
ENV PLAT manylinux2014_x86_64
44

5+
RUN yum -y update
56
RUN yum -y remove cmake
67
RUN yum -y install wget openblas-devel
78
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade pip cmake

docs/source/solvers/solution.rst

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
Solutions
22
=========
33

4-
.. autoclass:: pybamm._BaseSolution
5-
:members:
6-
74
.. autoclass:: pybamm.Solution
85
:members:

examples/notebooks/Getting Started/Tutorial 5 - Run experiments.ipynb

+14-17
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747
"source": [
4848
"experiment = pybamm.Experiment(\n",
4949
" [\n",
50-
" \"Discharge at C/10 for 10 hours or until 3.3 V\",\n",
50+
" (\"Discharge at C/10 for 10 hours or until 3.3 V\",\n",
5151
" \"Rest for 1 hour\",\n",
5252
" \"Charge at 1 A until 4.1 V\",\n",
5353
" \"Hold at 4.1 V until 50 mA\",\n",
54-
" \"Rest for 1 hour\",\n",
54+
" \"Rest for 1 hour\"),\n",
5555
" ] * 3\n",
5656
")"
5757
]
@@ -60,7 +60,7 @@
6060
"cell_type": "markdown",
6161
"metadata": {},
6262
"source": [
63-
"In this case, the experiment consists of a cycle of constant current C/10 discahrge, a one hour rest, a constant current (1 A) constant voltage (4.1 V) and another one hour rest, all of it repeated three times (notice the `* 3`).\n",
63+
"A cycle is defined by a tuple of operating instructions. In this case, the experiment consists of a cycle of constant current C/10 discharge, a one hour rest, a constant current (1 A) constant voltage (4.1 V) and another one hour rest, all of it repeated three times (notice the * 3).\n",
6464
"\n",
6565
"Then we can choose our model"
6666
]
@@ -146,33 +146,30 @@
146146
"\n",
147147
"Optionally, each instruction can contain at the end the expression \"(x minute period)\" in which the period at which to record the simulation outputs during that instruction. To change the period for the whole experiment we can pass it as a keyword argument in the experiment.\n",
148148
"\n",
149-
"Additionally, we can use the operators `+` and `*` to combine and repeat lists:"
149+
"Additionally, we can use the operators `+` and `*` on lists in order to combine and repeat cycles:"
150150
]
151151
},
152152
{
153153
"cell_type": "code",
154-
"execution_count": 6,
154+
"execution_count": 4,
155155
"metadata": {},
156156
"outputs": [
157157
{
158+
"output_type": "execute_result",
158159
"data": {
159160
"text/plain": [
160-
"['Discharge at 1C for 0.5 hours',\n",
161-
" 'Discharge at C/20 for 0.5 hours',\n",
162-
" 'Discharge at 1C for 0.5 hours',\n",
163-
" 'Discharge at C/20 for 0.5 hours',\n",
164-
" 'Discharge at 1C for 0.5 hours',\n",
165-
" 'Discharge at C/20 for 0.5 hours',\n",
166-
" 'Charge at 0.5 C for 45 minutes']"
161+
"[('Discharge at 1C for 0.5 hours', 'Discharge at C/20 for 0.5 hours'),\n",
162+
" ('Discharge at 1C for 0.5 hours', 'Discharge at C/20 for 0.5 hours'),\n",
163+
" ('Discharge at 1C for 0.5 hours', 'Discharge at C/20 for 0.5 hours'),\n",
164+
" ('Charge at 0.5 C for 45 minutes',)]"
167165
]
168166
},
169-
"execution_count": 6,
170167
"metadata": {},
171-
"output_type": "execute_result"
168+
"execution_count": 4
172169
}
173170
],
174171
"source": [
175-
"[\"Discharge at 1C for 0.5 hours\", \"Discharge at C/20 for 0.5 hours\"] * 3 + [\"Charge at 0.5 C for 45 minutes\"]"
172+
"[(\"Discharge at 1C for 0.5 hours\", \"Discharge at C/20 for 0.5 hours\")] * 3 + [(\"Charge at 0.5 C for 45 minutes\",)]"
176173
]
177174
},
178175
{
@@ -206,9 +203,9 @@
206203
"name": "python",
207204
"nbconvert_exporter": "python",
208205
"pygments_lexer": "ipython3",
209-
"version": "3.7.8"
206+
"version": "3.8.2-final"
210207
}
211208
},
212209
"nbformat": 4,
213210
"nbformat_minor": 2
214-
}
211+
}

examples/notebooks/Getting Started/Tutorial 9 - Changing the mesh.ipynb

+27-12
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"name": "stdout",
2323
"output_type": "stream",
2424
"text": [
25+
"\u001b[33mWARNING: You are using pip version 20.2.4; however, version 20.3.3 is available.\n",
26+
"You should consider upgrading via the '/Users/vsulzer/Documents/Energy_storage/PyBaMM/.tox/dev/bin/python -m pip install --upgrade pip' command.\u001b[0m\n",
2527
"Note: you may need to restart the kernel to use updated packages.\n"
2628
]
2729
}
@@ -64,13 +66,13 @@
6466
{
6567
"data": {
6668
"text/plain": [
67-
"{SpatialVariable(0x62eb5d16885394c9, x_n, children=[], domain=['negative electrode'], auxiliary_domains={'secondary': \"['current collector']\"}): 20,\n",
68-
" SpatialVariable(-0x14459c29151bda45, x_s, children=[], domain=['separator'], auxiliary_domains={'secondary': \"['current collector']\"}): 20,\n",
69-
" SpatialVariable(-0x4a38fdaaecee173f, x_p, children=[], domain=['positive electrode'], auxiliary_domains={'secondary': \"['current collector']\"}): 20,\n",
70-
" SpatialVariable(-0xf387938c410c357, r_n, children=[], domain=['negative particle'], auxiliary_domains={'secondary': \"['negative electrode']\", 'tertiary': \"['current collector']\"}): 30,\n",
71-
" SpatialVariable(0x2f93da3e03d4dcbe, r_p, children=[], domain=['positive particle'], auxiliary_domains={'secondary': \"['positive electrode']\", 'tertiary': \"['current collector']\"}): 30,\n",
72-
" SpatialVariable(0x14b0200ccfc1f5cc, y, children=[], domain=['current collector'], auxiliary_domains={}): 10,\n",
73-
" SpatialVariable(-0x4938b510c47f7708, z, children=[], domain=['current collector'], auxiliary_domains={}): 10}"
69+
"{SpatialVariable(0x3452d5d06e5d6beb, x_n, children=[], domain=['negative electrode'], auxiliary_domains={'secondary': \"['current collector']\"}): 20,\n",
70+
" SpatialVariable(-0x561e00d7cc14367b, x_s, children=[], domain=['separator'], auxiliary_domains={'secondary': \"['current collector']\"}): 20,\n",
71+
" SpatialVariable(-0x71763e2ccac3ade7, x_p, children=[], domain=['positive electrode'], auxiliary_domains={'secondary': \"['current collector']\"}): 20,\n",
72+
" SpatialVariable(-0x19c83c2dfa4ac578, r_n, children=[], domain=['negative particle'], auxiliary_domains={'secondary': \"['negative electrode']\", 'tertiary': \"['current collector']\"}): 30,\n",
73+
" SpatialVariable(0x5c2de4f3839b67be, r_p, children=[], domain=['positive particle'], auxiliary_domains={'secondary': \"['positive electrode']\", 'tertiary': \"['current collector']\"}): 30,\n",
74+
" SpatialVariable(-0x5746d0678b95cd9a, y, children=[], domain=['current collector'], auxiliary_domains={}): 10,\n",
75+
" SpatialVariable(-0x7e1ee8ded1c165e8, z, children=[], domain=['current collector'], auxiliary_domains={}): 10}"
7476
]
7577
},
7678
"execution_count": 3,
@@ -123,7 +125,7 @@
123125
{
124126
"data": {
125127
"text/plain": [
126-
"<pybamm.solvers.solution.Solution at 0x7f8beed56e80>"
128+
"<pybamm.solvers.solution.Solution at 0x1453f6880>"
127129
]
128130
},
129131
"execution_count": 5,
@@ -151,7 +153,7 @@
151153
{
152154
"data": {
153155
"application/vnd.jupyter.widget-view+json": {
154-
"model_id": "0613bdd52da440c9925d1dcb26558e71",
156+
"model_id": "fbd0fd9401444435940b9933716cb07d",
155157
"version_major": 2,
156158
"version_minor": 0
157159
},
@@ -238,7 +240,7 @@
238240
{
239241
"data": {
240242
"application/vnd.jupyter.widget-view+json": {
241-
"model_id": "99cad0a3137b4ee1ba353ae02b02b43f",
243+
"model_id": "1ef54c1f3c1941f988d9ce0459149078",
242244
"version_major": 2,
243245
"version_minor": 0
244246
},
@@ -252,7 +254,7 @@
252254
{
253255
"data": {
254256
"text/plain": [
255-
"<pybamm.plotting.quick_plot.QuickPlot at 0x7f8beb334e80>"
257+
"<pybamm.plotting.quick_plot.QuickPlot at 0x146458400>"
256258
]
257259
},
258260
"execution_count": 9,
@@ -288,7 +290,20 @@
288290
"name": "python",
289291
"nbconvert_exporter": "python",
290292
"pygments_lexer": "ipython3",
291-
"version": "3.7.8"
293+
"version": "3.8.6"
294+
},
295+
"toc": {
296+
"base_numbering": 1,
297+
"nav_menu": {},
298+
"number_sections": true,
299+
"sideBar": true,
300+
"skip_h1_title": false,
301+
"title_cell": "Table of Contents",
302+
"title_sidebar": "Contents",
303+
"toc_cell": false,
304+
"toc_position": {},
305+
"toc_section_display": true,
306+
"toc_window_display": true
292307
}
293308
},
294309
"nbformat": 4,

examples/notebooks/models/pouch-cell-model.ipynb

+1-3
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,9 @@
353353
"metadata": {},
354354
"outputs": [],
355355
"source": [
356-
"comsol_solution = pybamm.Solution(solutions[\"1+1D DFN\"].t, solutions[\"1+1D DFN\"].y)\n",
357356
"comsol_model.timescale = simulations[\"1+1D DFN\"].model.timescale\n",
358357
"comsol_model.length_scales = simulations[\"1+1D DFN\"].model.length_scales\n",
359-
"comsol_solution.model = comsol_model\n",
360-
"comsol_solution.inputs = {}"
358+
"comsol_solution = pybamm.Solution(solutions[\"1+1D DFN\"].t, solutions[\"1+1D DFN\"].y, comsol_model, {})"
361359
]
362360
},
363361
{

examples/scripts/compare_comsol/compare_comsol_DFN.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,12 @@ def get_interp_fun(variable_name, domain):
123123
}
124124

125125
# Make new solution with same t and y
126-
comsol_solution = pybamm.Solution(pybamm_solution.t, pybamm_solution.y)
127126
# Update solution scales to match the pybamm model
128127
comsol_model.timescale_eval = pybamm_model.timescale_eval
129128
comsol_model.length_scales_eval = pybamm_model.length_scales_eval
130-
comsol_solution.model = comsol_model
129+
comsol_solution = pybamm.Solution(
130+
pybamm_solution.t, pybamm_solution.y, comsol_model, {}
131+
)
131132

132133
# plot
133134
output_variables = [

examples/scripts/experimental_protocols/cccv.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
pybamm.set_logging_level("INFO")
88
experiment = pybamm.Experiment(
99
[
10-
"Discharge at C/10 for 10 hours or until 3.3 V",
11-
"Rest for 1 hour",
12-
"Charge at 1 A until 4.1 V",
13-
"Hold at 4.1 V until 50 mA",
14-
"Rest for 1 hour",
10+
(
11+
"Discharge at C/5 for 10 hours or until 3.3 V",
12+
"Rest for 1 hour",
13+
"Charge at 1 A until 4.1 V",
14+
"Hold at 4.1 V until 50 mA",
15+
"Rest for 1 hour",
16+
),
1517
]
1618
* 3
1719
)
@@ -23,16 +25,16 @@
2325
fig, ax = plt.subplots()
2426
for i in range(3):
2527
# Extract sub solutions
26-
sol = sim.solution.sub_solutions[i * 5]
28+
sol = sim.solution.cycles[i]
2729
# Extract variables
2830
t = sol["Time [h]"].entries
2931
V = sol["Terminal voltage [V]"].entries
3032
# Plot
3133
ax.plot(t - t[0], V, label="Discharge {}".format(i + 1))
3234
ax.set_xlabel("Time [h]")
3335
ax.set_ylabel("Voltage [V]")
34-
ax.set_xlim([0, 13])
35-
ax.legend()
36+
ax.set_xlim([0, 10])
37+
ax.legend(loc="lower left")
3638

3739
# Save time, voltage, current, discharge capacity, temperature, and electrolyte
3840
# concentration to csv and matlab formats

examples/scripts/experimental_protocols/gitt.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
import pybamm
55

66
pybamm.set_logging_level("INFO")
7-
experiment = pybamm.Experiment(["Discharge at C/20 for 1 hour", "Rest for 1 hour"] * 20)
7+
experiment = pybamm.Experiment(
8+
[("Discharge at C/20 for 1 hour", "Rest for 1 hour")] * 20
9+
)
810
model = pybamm.lithium_ion.DFN()
911
sim = pybamm.Simulation(model, experiment=experiment, solver=pybamm.CasadiSolver())
1012
sim.solve()

pybamm/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def version(formatted=False):
214214
#
215215
# Solver classes
216216
#
217-
from .solvers.solution import Solution, _BaseSolution
217+
from .solvers.solution import Solution
218218
from .solvers.processed_variable import ProcessedVariable
219219
from .solvers.base_solver import BaseSolver
220220
from .solvers.dummy_solver import DummySolver

0 commit comments

Comments
 (0)