Repository navigation
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.
|
valentinsulzer
left a comment
There was a problem hiding this comment.
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.
where is domain name adjusted?
There was a problem hiding this comment.
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.
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 docsand then$ make clean; make htmlYou can run all three at once, using
$ python run-tests.py --quick.Further checks: