fix(darcy): correct sign conventions for Darcy flux and velocity#243
Open
jcgraciosa wants to merge 2 commits into
Open
fix(darcy): correct sign conventions for Darcy flux and velocity#243jcgraciosa wants to merge 2 commits into
jcgraciosa wants to merge 2 commits into
Conversation
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.
Summary
Fixes sign-convention inconsistencies in the Darcy and Poisson solvers.
Changes are in
solvers.pyandconstitutive_models.py:-∇·[κ∇u] = fDarcy velocity
q = -κ(∇h - s)(inflow positive)q = -κ(∇h - s);permeability should be set as a positive value (matching literature convention)
darcy_flux = qconsistent with uw3's natural BCconvention, where
add_natural_bc(g, boundary)specifies inward Darcy fluxsame net
K(∇h−s)that DFDt tracked before any fixesValidated against the Henry (1964) saltwater intrusion benchmark and the
Badon-Ghijben–Herzberg freshwater lens benchmark — both produce physically
correct results with the correct freshwater inflow direction and wedge geometry.
Tests
test_1004_DarcyCartesiantest_1005_TransientDarcyCartesiantest_0820_template_parameter_propagationFollow-up
The natural BC sign convention for
SNES_TransientDarcy(whenf ≠ 0orwhen natural BCs are used on transient problems) will be addressed in a
separate PR.
Closes #214
Underworld development team with AI support from Claude Code