-
-
Notifications
You must be signed in to change notification settings - Fork 602
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 704 surface extrapolation #707
Conversation
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.
All looks good, and well done for getting it working on non-uniform notebooks too.
It would be cleaner to make a new class FiniteVolumeQuadraticBoundary
, which inherits from FiniteVolume
and only overwrites the boundary value; this would also allow comparison of linear vs quadratic boundary value to highlight the benefit of the latter
Codecov Report
@@ Coverage Diff @@
## master #707 +/- ##
=========================================
- Coverage 98.18% 98.1% -0.08%
=========================================
Files 175 175
Lines 9090 9190 +100
=========================================
+ Hits 8925 9016 +91
- Misses 165 174 +9
Continue to review full report at Codecov.
|
I have put the extrapolation forms in and added options for spatial methods. The new extrapolations work on some toy examples in the tests but they don't seem to recover the correct behaviour when put into models. |
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 @Scottmar93 , looks great now!
tests/unit/test_spatial_methods/test_finite_volume/test_extrapolation.py
Show resolved
Hide resolved
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.
nice! looks great, thanks @Scottmar93 . are there any places in the notebook/docs which need updating so that the spatial methods are instances?
Description
Updated the boundary value surface extrapolation to a quadratic expansion (a mathematica notebook calculating the components can be found at: https://github.com/Scottmar93/extrapolation-coefficents/tree/master). Also extended to be valid for non-uniform grids.
I haven't implemented the boundary flux equivalent as only need the surface vals to improve comparison with comsol
I have stuck an option within the boundary value symbol to turn on quadratic or linear extrapolation. Whilst it is more related to the discretization, I think this is the easiest place to put it to access the option.
Fixes #704
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.
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: