Skip to content

Commit 0077553

Browse files
Merge pull request #1086 from pybamm-team/issue-1080-require-t_eval
#1080 require t_eval
2 parents fc2204a + 5333fba commit 0077553

19 files changed

+664
-196
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Added some new solvers for algebraic models ([#1059](https://github.com/pybamm-team/PyBaMM/pull/1059))
99
- Added `length_scales` attribute to models ([#1058](https://github.com/pybamm-team/PyBaMM/pull/1058))
1010
- Added averaging in secondary dimensions ([#1057](https://github.com/pybamm-team/PyBaMM/pull/1057))
11-
- Added SEI reaction based on Yang et. al. 2017 and reduction in porosity ([#1009](https://github.com/pybamm-team/PyBaMM/issues/1009))
11+
- Added SEI reaction based on Yang et. al. 2017 and reduction in porosity ([#1009](https://github.com/pybamm-team/PyBaMM/issues/1009))
1212

1313
## Optimizations
1414

@@ -26,6 +26,8 @@
2626

2727
## Breaking changes
2828

29+
- The solution times `t_eval` must now be provided to `Simulation.solve()` when not using an experiment or prescribing the current using drive cycle data ([#1086](https://github.com/pybamm-team/PyBaMM/pull/1086))
30+
2931
# [v0.2.2](https://github.com/pybamm-team/PyBaMM/tree/v0.2.2) - 2020-06-01
3032

3133
New SEI models, simplification of submodel structure, as well as optimisations and general bug fixes.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ PyBaMM (Python Battery Mathematical Modelling) solves physics-based electrochemi
1313
The easiest way to use PyBaMM is to run a 1C constant-current discharge with a model of your choice with all the default settings:
1414
```python3
1515
import pybamm
16-
model = pybamm.lithium_ion.DFN() # Doyle-Fuller-Newman model
16+
model = pybamm.lithium_ion.DFN() # Doyle-Fuller-Newman model
1717
sim = pybamm.Simulation(model)
18-
sim.solve()
18+
sim.solve([0, 3600]) # solve for 1 hour
1919
sim.plot()
2020
```
2121
or simulate an experiment such as CCCV:
@@ -42,7 +42,7 @@ For new users we recommend the [Getting Started](examples/notebooks/Getting%20St
4242

4343
Further details can be found in a number of [detailed examples](examples/notebooks/README.md), hosted here on
4444
github. In addition, there is a [full API documentation](http://pybamm.readthedocs.io/),
45-
hosted on [Read The Docs](readthedocs.io).
45+
hosted on [Read The Docs](readthedocs.io).
4646
Additional supporting material can be found
4747
[here](https://github.com/pybamm-team/pybamm-supporting-material/).
4848

examples/notebooks/Getting Started/Tutorial 1 - How to run a model.ipynb

+8-8
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"cell_type": "markdown",
7373
"metadata": {},
7474
"source": [
75-
"We can then call 'solve' on our simulation object to solve the model (by default the the model is solved for a 1C constant current discharge):"
75+
"We can then call 'solve' on our simulation object to solve the model, passing the window of time to solve for in seconds (here 1 hour):"
7676
]
7777
},
7878
{
@@ -83,7 +83,7 @@
8383
{
8484
"data": {
8585
"text/plain": [
86-
"<pybamm.solvers.solution.Solution at 0x7fa3273a5a90>"
86+
"<pybamm.solvers.solution.Solution at 0x7f09715ea9b0>"
8787
]
8888
},
8989
"execution_count": 4,
@@ -92,7 +92,7 @@
9292
}
9393
],
9494
"source": [
95-
"sim.solve()"
95+
"sim.solve([0, 3600])"
9696
]
9797
},
9898
{
@@ -110,12 +110,12 @@
110110
{
111111
"data": {
112112
"application/vnd.jupyter.widget-view+json": {
113-
"model_id": "1c41a48411a94ff9a6fc19096bb4a0f5",
113+
"model_id": "06ae219fb8b94fa3aad3b8907a41ed27",
114114
"version_major": 2,
115115
"version_minor": 0
116116
},
117117
"text/plain": [
118-
"interactive(children=(FloatSlider(value=0.0, description='t', max=3599.9999999999995, step=35.99999999999999),"
118+
"interactive(children=(FloatSlider(value=0.0, description='t', max=1.0, step=0.01), Output()), _dom_classes=('w"
119119
]
120120
},
121121
"metadata": {},
@@ -138,9 +138,9 @@
138138
],
139139
"metadata": {
140140
"kernelspec": {
141-
"display_name": "PyBaMM development (env)",
141+
"display_name": "Python 3",
142142
"language": "python",
143-
"name": "pybamm-dev"
143+
"name": "python3"
144144
},
145145
"language_info": {
146146
"codemirror_mode": {
@@ -152,7 +152,7 @@
152152
"name": "python",
153153
"nbconvert_exporter": "python",
154154
"pygments_lexer": "ipython3",
155-
"version": "3.6.8"
155+
"version": "3.6.9"
156156
}
157157
},
158158
"nbformat": 4,

examples/notebooks/Getting Started/Tutorial 2 - Compare models.ipynb

+7-7
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"sims = []\n",
7171
"for model in models:\n",
7272
" sim = pybamm.Simulation(model)\n",
73-
" sim.solve()\n",
73+
" sim.solve([0, 3600])\n",
7474
" sims.append(sim)"
7575
]
7676
},
@@ -89,12 +89,12 @@
8989
{
9090
"data": {
9191
"application/vnd.jupyter.widget-view+json": {
92-
"model_id": "63e7fa6511714626abc1173c35aad054",
92+
"model_id": "b1cbafe2711e4d91aec48dfe246967b3",
9393
"version_major": 2,
9494
"version_minor": 0
9595
},
9696
"text/plain": [
97-
"interactive(children=(FloatSlider(value=0.0, description='t', max=3599.9999999999995, step=35.99999999999999),"
97+
"interactive(children=(FloatSlider(value=0.0, description='t', max=3600.0, step=36.0), Output()), _dom_classes="
9898
]
9999
},
100100
"metadata": {},
@@ -103,7 +103,7 @@
103103
{
104104
"data": {
105105
"text/plain": [
106-
"<pybamm.plotting.quick_plot.QuickPlot at 0x7f089bff9518>"
106+
"<pybamm.plotting.quick_plot.QuickPlot at 0x7f6d7b415470>"
107107
]
108108
},
109109
"execution_count": 4,
@@ -125,9 +125,9 @@
125125
],
126126
"metadata": {
127127
"kernelspec": {
128-
"display_name": "PyBaMM development (env)",
128+
"display_name": "Python 3",
129129
"language": "python",
130-
"name": "pybamm-dev"
130+
"name": "python3"
131131
},
132132
"language_info": {
133133
"codemirror_mode": {
@@ -139,7 +139,7 @@
139139
"name": "python",
140140
"nbconvert_exporter": "python",
141141
"pygments_lexer": "ipython3",
142-
"version": "3.6.8"
142+
"version": "3.6.9"
143143
}
144144
},
145145
"nbformat": 4,

0 commit comments

Comments
 (0)