Fix inverted HYDCHR scaling for partially penetrated HFB layers - #576
Open
bdestombe wants to merge 1 commit into
Open
Fix inverted HYDCHR scaling for partially penetrated HFB layers#576bdestombe wants to merge 1 commit into
bdestombe wants to merge 1 commit into
Conversation
…yers get_hfb_spd scaled hydchr by the penetrated fraction of the layer that contains the barrier bottom. A lower HYDCHR is a stronger barrier in MF6 (barrier conductance = HYDCHR x face area, in series with the cell-to-cell conductance), so a wall penetrating 10% of a layer was modeled as a barrier ten times tighter than a fully penetrating wall, instead of leaving the un-penetrated 90% of the face open. The face is now treated as an open strip over the un-penetrated fraction in parallel with the walled strip in series with the aquifer, which gives hydchr_eff = (hydchr + (1 - f) * kh_harmonic / distance) / f. This reduces to hydchr at full penetration and leaves the face open as the penetration goes to zero. The new test compares the equivalent single-layer barrier against a reference run that resolves the partially penetrated layer into a walled and an open sublayer; the flows match within 1%. The previous scaling underestimates the reference flow by more than a factor 10 in that test.
dbrakenhoff
approved these changes
Aug 27, 2026
dbrakenhoff
left a comment
Collaborator
There was a problem hiding this comment.
Good fix! As a side note, I think modflow also accepts negative hydchr in which case it is interpreted as a factor on the cell-to-cell conductance, which could be useful in the context of a partially penetrating impermeable walls. Not sure if we want to deal with that here, but just mentioning it in case it is of value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
get_hfb_spdscaleshydchrby the penetrated fraction of the layer that contains the bottom of the barrier:But a lower HYDCHR is a stronger barrier in MF6 (the barrier conductance is
HYDCHR × face area, placed in series with the cell-to-cell conductance). So a wall that penetrates only 10% of a layer is modeled as a barrier ~10× tighter than a fully penetrating wall, instead of leaving the un-penetrated 90% of that face open. The effect is upside-down: the less a barrier penetrates a layer, the more it blocks it.A two-cell MF6 experiment (10 m layer, K = 10 m/d, unit gradient):
Fix
For the layer containing the barrier bottom, use a parallel-path equivalent characteristic: the open strip over the un-penetrated fraction
1 − fin parallel with the walled strip overf(the latter in series with the aquifer). Equating the MF6 series form to that combination giveswith
c = kh_harmonic / distancethe open-face conductance per unit area. This reduces tohydchrat full penetration (f = 1) and leaves the face open (hydchr_eff → ∞) asf → 0.Validation
New test
test_get_hfb_spd_partial_penetration_matches_resolved_barriercompares the equivalent single-layer barrier against a reference MF6 run that resolves the partially penetrated layer into a walled and an open sublayer — the flows match within 1%. The previous scaling underestimates that reference flow by more than a factor of 10. The existing structured/vertex/multilinestring expectations were updated to the parallel-equivalent values. Fulltests/test_023_hfb.pypasses (23 tests).Surfaced while reviewing the Bergen sheet-pile walls in the NHFLO
09pwnmodel2model, which drivehfb_from_df→get_hfb_spdwithdepthbarriers.