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 1127 extra notebooks #1131

Merged
merged 7 commits into from
Sep 1, 2020
Merged

Issue 1127 extra notebooks #1131

merged 7 commits into from
Sep 1, 2020

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Aug 26, 2020

Description

  • Adds getting started notebooks for solver options and changing the mesh
  • Adds a notebook on thermal options
  • Adds a notebook on using the simulation class vs setting parameters, mesh, etc. manually
  • Changes most examples to use the simulation class. This makes most examples shorter/simpler and encourages use of the simulation class as the preferred way of doing things. Note: I've left the SPM and DFN notebooks as they were (the "long way") as the SPM notebook gives lots of detailed information about each of the stages of processing, solving, etc., and we link to the DFN notebook in the readme saying more customization is available, so I think it makes sense to outline the different points at which you could customise. Both of these now point to the the simulation notebook

Fixes some of #1127

Leaving #1127 open as I still think we should add details of the DFN in dimensional form and add a table or similar giving the string names for the parameters (at least for the basic DFN).

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov
Copy link

codecov bot commented Aug 26, 2020

Codecov Report

Merging #1131 into develop will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1131   +/-   ##
========================================
  Coverage    97.92%   97.92%           
========================================
  Files          247      247           
  Lines        13910    13911    +1     
========================================
+ Hits         13622    13623    +1     
  Misses         288      288           
Impacted Files Coverage Δ
...m/models/full_battery_models/base_battery_model.py 99.66% <ø> (ø)
...l_battery_models/lead_acid/base_lead_acid_model.py 100.00% <100.00%> (ø)
...ttery_models/lithium_ion/base_lithium_ion_model.py 100.00% <100.00%> (ø)
pybamm/simulation.py 96.81% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb3ad43...10274fe. Read the comment docs.

Copy link
Sponsor Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two minor comments but looks good to me. Thanks Rob!

@@ -13,7 +13,7 @@ These notebooks can be downloaded and used locally by running
```
$ jupyter notebook
```
from your local PyBaMM repository, or used online through [Binder](https://mybinder.org/v2/gh/pybamm-team/PyBaMM/master), or you can simply copy/paste the relevant code.
from your local PyBaMM repository, or used online through [Google Colab](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/master/) or [Binder](https://mybinder.org/v2/gh/pybamm-team/PyBaMM/master). Alternatively, you can simply copy/paste the relevant code.
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using Binder? I removed it because I thought we weren't but happy to keep it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed it. I think the link still works, but Colab is better

"source": [
"# Tutorial 9 - Changing the mesh\n",
"\n",
"In [Tutorial 8](./Tutorial%207%20-%20Solver%20options.ipynb) we saw how to change the solver options. In this tutorial we will change the mesh used in the simulation, and, as in the solver options tutorial, show how to do a graphical mesh refinement study.\n",
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the end we didn't show how to do a graphical convergence study so we should change this sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I've updated this

@rtimms rtimms merged commit 377fc45 into develop Sep 1, 2020
@rtimms rtimms deleted the issue-1127-extra-notebooks branch September 1, 2020 09:36
@rtimms rtimms linked an issue Sep 1, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra documentation and notebooks
2 participants