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

#2666 put t_+ back inside div, loosen tolerance for test #2758

Merged
merged 8 commits into from
Mar 15, 2023

Conversation

valentinsulzer
Copy link
Member

Description

Fixes bug introduced that made electrolyte conservation a bit better for constant transference number, but a lot worse for non-constant

Fixes #2666

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: $ pre-commit run (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all
  • The documentation builds: $ python run-tests.py --doctest

You can run unit and doctests together 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 Mar 9, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (124efe5) 99.68% compared to head (6bad548) 99.68%.

❗ Current head 6bad548 differs from pull request most recent head 460e684. Consider uploading reports for the commit 460e684 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2758   +/-   ##
========================================
  Coverage    99.68%   99.68%           
========================================
  Files          272      272           
  Lines        19007    19017   +10     
========================================
+ Hits         18948    18958   +10     
  Misses          59       59           
Impacted Files Coverage Δ
.../submodels/electrolyte_diffusion/full_diffusion.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@DrSOKane DrSOKane left a comment

Choose a reason for hiding this comment

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

How does this correct things for the algebraic surface form? Are we just accepting that there will be a some conservation errors in that case?

@valentinsulzer
Copy link
Member Author

Yes, there will be some error in that case, but fixing this so it's at least approximately correct in all cases is a critical bug fix

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.

Thanks! Happy to merge once the ubuntu tests pass (I think they just need to be run again). You need to add a line to the CHANGELOG as well.

@brosaplanella
Copy link
Sponsor Member

I think the issue is with one of the getting started notebooks but not sure which one...

@valentinsulzer
Copy link
Member Author

It works locally for me so hard to debug. Can you test it locally?

@brosaplanella
Copy link
Sponsor Member

It looks like the problem is with the model options notebook. I don't know why, but when running it in this branch it gets stuck while in the develop branch it doesn't. Could it be the change in the definition of the flux affecting the heat source terms?

@DrSOKane
Copy link
Contributor

It's working fine for me. Have you tried merging the develop branch and running again?

@brosaplanella
Copy link
Sponsor Member

It's working fine for me. Have you tried merging the develop branch and running again?

Which OS are you using? I suspect it might be an Ubuntu issue.

@DrSOKane
Copy link
Contributor

DrSOKane commented Mar 15, 2023

It's working fine for me. Have you tried merging the develop branch and running again?

Which OS are you using? I suspect it might be an Ubuntu issue.

Ubuntu 20.04 via WSL

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@valentinsulzer
Copy link
Member Author

What's really weird is it also fails in the latexify branch, where I didn't change the model. Made some changes, let's see how it goes

@valentinsulzer valentinsulzer merged commit 09944fd into develop Mar 15, 2023
@valentinsulzer valentinsulzer deleted the issue-2666-electrolyte_conservation branch March 15, 2023 23:36
@brosaplanella
Copy link
Sponsor Member

@all-contributors, please add @DrSOKane for reviewing PRs

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.

[Bug]: Electrolyte concentration not conserved for non-constant transference number
3 participants