-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Spherical finite volume #1782
Spherical finite volume #1782
Conversation
Since the convergence is better, we could reduce the default number of r points to 20 (10 still gives inaccurate results at higher C-rates). See #1075 |
Codecov Report
@@ Coverage Diff @@
## develop #1782 +/- ##
===========================================
+ Coverage 99.28% 99.29% +0.01%
===========================================
Files 343 343
Lines 18910 19218 +308
===========================================
+ Hits 18775 19083 +308
Misses 135 135
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @tinosulzer , nice catch! This has been lurking for a while...
Yes, let's reduce the default points, and maybe we can also check to see if we can now use fewer points in this notebook? I'm guessing we might be able to since the method is correct now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks Tino!
There were some issues with the convergence with the low diffusion areas, but maybe with the final parameter set is not needed any more. If it converges, happy to reduce the number of points 😄 |
Description
Fixes a bug in
finite_volumes.py
for spherical diffusion.(r_edge[i+1]**3 - r_edge[i]**3)/3
is now used instead ofr_node**2
. This is what it should be according to Finite Volume theory e.g. https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.6.064010Previous convergence:
New convergence:
Code:
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.
Key checklist:
$ flake8
$ python run-tests.py --unit
$ cd docs
and then$ make clean; make html
You can run all three at once, using
$ python run-tests.py --quick
.Further checks: