-
-
Notifications
You must be signed in to change notification settings - Fork 553
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 741 neumann bc #748
Issue 741 neumann bc #748
Conversation
Codecov Report
@@ Coverage Diff @@
## master #748 +/- ##
==========================================
+ Coverage 98.35% 98.36% +0.01%
==========================================
Files 179 179
Lines 9810 9871 +61
==========================================
+ Hits 9649 9710 +61
Misses 161 161
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.
Looks good, I haven't checked the linear algebra but if all existing tests pass then great!
Out of interest though, shouldn't the previous formulation have given fluxes exactly? There was no extrapolation for those?
domain = domain + [domain[-1] + "_right ghost cell"] | ||
|
||
# Calculate values for ghost nodes for any Dirichlet boundary conditions | ||
# and adjust the domain name to account for the new ghost nodes |
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.
where is domain name adjusted?
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.
ah thanks domain name is adjusted in the lines above, but i forgot to move the comment. maybe i misunderstood what was happening before. it looked like we added a ghost node assuming the function was linear there with slope given by the Neumann bc? that was probably consistent with the scheme anyway, and was giving the correct result. it doesn't look like doing things the way i've implemented actually makes any different other than we no longer unnecessarily add extra ghost nodes
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.
Before it was adding a ghost node in such a way that (ghost_node - last_internal_node) / dx = flux, but good to avoid adding unnecessary ghost nodes
Description
Changes finite volumes to use the exact value of the gradient at the cell edges if given by a Neumann value, instead of adding a ghost node.
Fixes #741
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: