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

solid tau now uses correct bruggeman coeff #1773

Merged

Conversation

dion-w
Copy link
Contributor

@dion-w dion-w commented Nov 1, 2021

Description

Solid tortuosity now uses solid bruggeman coefficient of respective electrode and not the bruggeman coefficients of the electrolyte.

Fixes #1734

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)
  • Added line to relevant section of changelog

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
  • not deemed necessary as this only changes two lines of code in the respective directory

@dion-w
Copy link
Contributor Author

dion-w commented Nov 1, 2021

Since this is my first pull request i appreciate feedback for handling this process.

Copy link
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.

Looks good, but there is a test related to the sensitivities which is not passing. @martinjrobins is it just a matter of the tolerances or is there a bigger issue?

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Ferran Brosa Planella <Ferran.Brosa-Planella@warwick.ac.uk>
@valentinsulzer
Copy link
Member

Let's try using even tighter tolerances for solving in the sensitivities test: change these both to 1e-12

self.solver.rtol = 1e-8
self.solver.atol = 1e-8

Also, could you make a new section "Unreleased" for the changelog? i.e. at the top add

# [Unreleased](https://github.com/pybamm-team/PyBaMM/)

## Bug fixes
- Solid tortuosity is now correctly calculated with Bruggeman coefficient of the respective electrode ([#1773](https://github.com/pybamm-team/PyBaMM/pull/1773))

Since these changes aren't in the 21.10 release

@valentinsulzer
Copy link
Member

I tested this locally and the sensitivity test passed. Can you make the changelog update, merge develop, and push again?

@valentinsulzer
Copy link
Member

@dion-w any update on this?

@dion-w
Copy link
Contributor Author

dion-w commented Nov 23, 2021

Haven't been active here recently. Will hopefully be after a deadline on thursday.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks @dion-w !

@brosaplanella
Copy link
Member

@all-contributors please add @dion-w for bug reports and code

@allcontributors
Copy link
Contributor

@brosaplanella

I've put up a pull request to add @dion-w! 🎉

@brosaplanella
Copy link
Member

The notebook tests are failing because we need to provide the Bruggeman parameters for the electrode in cell [16] of https://github.com/pybamm-team/PyBaMM/blob/develop/examples/notebooks/parameterization/parameterization.ipynb

after fixing the solid tortuosities these new values are needed to run the notebook
@codecov
Copy link

codecov bot commented Dec 2, 2021

Codecov Report

Merging #1773 (203c350) into develop (15992b3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1773   +/-   ##
========================================
  Coverage    99.26%   99.26%           
========================================
  Files          345      345           
  Lines        18900    18900           
========================================
  Hits         18761    18761           
  Misses         139      139           
Impacted Files Coverage Δ
...odels/submodels/tortuosity/bruggeman_tortuosity.py 100.00% <100.00%> (ø)

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 15992b3...203c350. Read the comment docs.

@brosaplanella brosaplanella merged commit 022100a into pybamm-team:develop Dec 2, 2021
@dion-w dion-w deleted the issue-1734-fix-solid-tortuosity branch December 2, 2021 13:24
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.

solid phase phase tortuosity is calculated with bruggeman coefficient of electrolyte
3 participants