Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1048 reformat landesfeind electrolyte #1064

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
0118999
#1048 set tests
brosaplanella Jun 14, 2020
ca5fad4
#1048 added base Landesfeind functions
brosaplanella Jun 14, 2020
e0fe386
#1048 added EC:DMC 1:1 but still not working
brosaplanella Jun 14, 2020
7573c8f
#1044 added Colab badge
brosaplanella Jun 14, 2020
51fb217
#1044 added extra installation line
brosaplanella Jun 14, 2020
dd8b944
#1044 tried a fix for tests
brosaplanella Jun 17, 2020
bfada1e
flake8
brosaplanella Jun 17, 2020
9ee0000
#1044 added Colab badge
brosaplanella Jun 14, 2020
f364b45
#1044 added extra installation line
brosaplanella Jun 14, 2020
5e10dfe
#1044 tried a fix for tests
brosaplanella Jun 17, 2020
31f274b
#1044 modified to catch lines with magic
brosaplanella Jun 17, 2020
4587ad7
#1044 fixed notebooks
brosaplanella Jun 17, 2020
f566dbe
Merge branch 'issue-1044-google-colab' of https://github.com/ferranbr…
brosaplanella Jun 17, 2020
f833499
added #1044
brosaplanella Jun 17, 2020
5be75ef
#1044 removed commented line
brosaplanella Jun 17, 2020
4d075b2
#1044 fixed typo
brosaplanella Jun 17, 2020
048b82b
#1044 remove binder badge and add Google Colab badge
brosaplanella Jun 17, 2020
b078d8f
#1048 set tests
brosaplanella Jun 14, 2020
3ddef54
#1048 added base Landesfeind functions
brosaplanella Jun 14, 2020
0c16119
#1048 added EC:DMC 1:1 but still not working
brosaplanella Jun 14, 2020
532ed27
flake8
brosaplanella Jun 17, 2020
7ecc65b
#1048 remove base electrolyte folder and old test
brosaplanella Jun 19, 2020
c4fc572
#1048 added Landesfeind parameters test
brosaplanella Jun 19, 2020
16ef250
#1048 fixed EC-DMC electrolyte
brosaplanella Jun 19, 2020
4adee94
#1048 added EC-EMC electrolyte
brosaplanella Jun 19, 2020
9cdf761
#1048 added EMC-FEC electrolyte
brosaplanella Jun 19, 2020
889e2a6
Merge branch 'issue-1048-reformat-landesfeind-electrolyte' of https:/…
brosaplanella Jun 19, 2020
c9d2082
#1048 flake8
brosaplanella Jun 19, 2020
74122fb
#1048 remove old Landesfeind parameter set
brosaplanella Jun 19, 2020
199d852
#1048 CHANGELOG
brosaplanella Jun 20, 2020
17460e8
Merge pull request #1061 from ferranbrosa/issue-1044-google-colab
valentinsulzer Jun 21, 2020
fef513d
#1048 fixed typos
brosaplanella Jun 22, 2020
36d6ea2
#1048 set tests
brosaplanella Jun 14, 2020
fa330a2
#1048 added base Landesfeind functions
brosaplanella Jun 14, 2020
05664d5
#1048 added EC:DMC 1:1 but still not working
brosaplanella Jun 14, 2020
6b3de3c
flake8
brosaplanella Jun 17, 2020
e3f4b33
#1048 remove base electrolyte folder and old test
brosaplanella Jun 19, 2020
5c3ebb5
#1048 added Landesfeind parameters test
brosaplanella Jun 19, 2020
741bd49
#1048 fixed EC-DMC electrolyte
brosaplanella Jun 19, 2020
dc049dc
#1048 added EC-EMC electrolyte
brosaplanella Jun 19, 2020
12cb5cc
#1048 added EMC-FEC electrolyte
brosaplanella Jun 19, 2020
8ff853c
#1048 flake8
brosaplanella Jun 19, 2020
3ddefde
#1048 remove old Landesfeind parameter set
brosaplanella Jun 19, 2020
84fc9ed
#1048 CHANGELOG
brosaplanella Jun 20, 2020
3a03134
#1048 fixed typos
brosaplanella Jun 22, 2020
b2a9121
#1048 fixed more typos
brosaplanella Jun 22, 2020
fa65ccd
Merge branch 'issue-1048-reformat-landesfeind-electrolyte' of https:/…
brosaplanella Jun 22, 2020
feb1e1e
#1066 add numpy function sqrt, sin, cos and exp to convert_to_casadi
martinjrobins Jun 22, 2020
eb32c9b
#1066 update changelog
martinjrobins Jun 22, 2020
c235bde
#1066 get rid of print statement
martinjrobins Jun 22, 2020
afefa83
#1066 add hyperbolic functions
martinjrobins Jun 22, 2020
b25b434
#1066 fix deprecations
valentinsulzer Jun 22, 2020
bc7745a
#1066 use nans when evaluating for shape to avoid runtime warnings
valentinsulzer Jun 22, 2020
67f0fc1
#1066 add test for numpy special functions
martinjrobins Jun 23, 2020
6c7a06e
Merge pull request #1067 from pybamm-team/issue-1066-additional-casad…
valentinsulzer Jun 23, 2020
1bd8dfc
#1048 set tests
brosaplanella Jun 14, 2020
5a4c310
#1048 added base Landesfeind functions
brosaplanella Jun 14, 2020
9bd04e4
#1048 added EC:DMC 1:1 but still not working
brosaplanella Jun 14, 2020
6c984db
flake8
brosaplanella Jun 17, 2020
320ceac
#1048 remove base electrolyte folder and old test
brosaplanella Jun 19, 2020
67d6f2e
#1048 added Landesfeind parameters test
brosaplanella Jun 19, 2020
5be6e1c
#1048 fixed EC-DMC electrolyte
brosaplanella Jun 19, 2020
5526e1c
#1048 added EC-EMC electrolyte
brosaplanella Jun 19, 2020
8a0cece
#1048 added EMC-FEC electrolyte
brosaplanella Jun 19, 2020
1cd1703
#1048 flake8
brosaplanella Jun 19, 2020
8ca2c67
#1048 remove old Landesfeind parameter set
brosaplanella Jun 19, 2020
a43d708
#1048 CHANGELOG
brosaplanella Jun 20, 2020
db2f502
#1048 fixed typos
brosaplanella Jun 22, 2020
583fd6f
#1048 added base Landesfeind functions
brosaplanella Jun 14, 2020
984397d
#1048 added EC:DMC 1:1 but still not working
brosaplanella Jun 14, 2020
aae0a7b
#1048 remove base electrolyte folder and old test
brosaplanella Jun 19, 2020
24ed701
#1048 fixed EC-DMC electrolyte
brosaplanella Jun 19, 2020
449b515
#1048 added EC-EMC electrolyte
brosaplanella Jun 19, 2020
cc10301
#1048 added EMC-FEC electrolyte
brosaplanella Jun 19, 2020
6e527e2
#1048 fixed typos
brosaplanella Jun 22, 2020
e278dca
#1048 fixed more typos
brosaplanella Jun 22, 2020
431ebbc
Merge branch 'issue-1048-reformat-landesfeind-electrolyte' of https:/…
brosaplanella Jun 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

## Features

- Reformatted Landesfeind electrolytes ([#1064](https://github.com/pybamm-team/PyBaMM/pull/1064))
- Adapted examples to be run in Google Colab ([#1061](https://github.com/pybamm-team/PyBaMM/pull/1061))
- Added `length_scales` attribute to models ([#1058](https://github.com/pybamm-team/PyBaMM/pull/1058))
- Added averaging in secondary dimensions ([#1057](https://github.com/pybamm-team/PyBaMM/pull/1057))

## Optimizations

## Bug fixes

- Allowed for pybamm functions exp, sin, cos, sqrt to be used in expression trees that
are converted to casadi format ([#1067](https://github.com/pybamm-team/PyBaMM/pull/1067)
- Fix a bug where variables that depend on y and z were transposed in `QuickPlot` ([#1055](https://github.com/pybamm-team/PyBaMM/pull/1055))

## Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build](https://github.com/pybamm-team/PyBaMM/workflows/PyBaMM/badge.svg)](https://github.com/pybamm-team/PyBaMM/actions?query=workflow%3APyBaMM+branch%3Adevelop)
[![readthedocs](https://readthedocs.org/projects/pybamm/badge/?version=latest)](https://pybamm.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/pybamm-team/PyBaMM/branch/master/graph/badge.svg)](https://codecov.io/gh/pybamm-team/PyBaMM)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pybamm-team/PyBaMM/master?filepath=examples%2Fnotebooks)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/master/)
[![black_code_style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

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.
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/Creating Models/1-an-ode-model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt"
Expand Down Expand Up @@ -278,7 +279,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/Creating Models/2-a-pde-model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt"
Expand Down Expand Up @@ -308,7 +309,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
Expand Down Expand Up @@ -330,7 +331,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
Expand Down Expand Up @@ -390,7 +391,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import os\n",
Expand Down Expand Up @@ -669,7 +670,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm"
]
},
Expand Down Expand Up @@ -139,7 +140,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm"
]
},
Expand Down Expand Up @@ -431,7 +432,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
}
],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"model = pybamm.lithium_ion.SPMe()\n",
"sim = pybamm.Simulation(model)\n",
Expand Down Expand Up @@ -851,7 +852,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm"
]
},
Expand Down Expand Up @@ -136,7 +137,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ For new users we recommend the [Getting Started](./Getting%20Started/) notebooks

# Examples

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pybamm-team/PyBaMM/master)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/master/)

This page contains a number of examples showing how to use PyBaMM.

Expand Down
15 changes: 12 additions & 3 deletions examples/notebooks/change-input-current.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,19 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import os\n",
Expand Down Expand Up @@ -329,7 +338,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/change-settings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import os\n",
Expand Down Expand Up @@ -518,7 +519,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/compare-comsol-discharge-curve.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import os\n",
Expand Down Expand Up @@ -207,7 +208,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/compare-ecker-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import os\n",
"import pandas as pd\n",
Expand Down Expand Up @@ -237,7 +238,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/expression_tree/broadcasts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np"
]
Expand Down Expand Up @@ -260,7 +261,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/expression_tree/expression-tree.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"\n",
Expand Down Expand Up @@ -220,7 +221,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/models/DFN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import os\n",
Expand Down Expand Up @@ -278,7 +279,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/models/SPM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import os\n",
Expand Down Expand Up @@ -1092,7 +1093,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/models/SPMe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import os\n",
Expand Down Expand Up @@ -269,7 +270,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/models/compare-lithium-ion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import os\n",
"os.chdir(pybamm.__path__[0]+'/..')\n",
Expand Down Expand Up @@ -442,7 +443,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion examples/notebooks/models/lead-acid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import numpy as np\n",
"import os\n",
Expand Down Expand Up @@ -424,7 +425,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Loading