Skip to content

experimental/adrh: Richards' equation (van Genuchten-Mualem, layered materials) against proteus's richards model (stacked on #115) - #117

Merged
cekees merged 5 commits into
mainfrom
richards-case
Oct 27, 2026
Merged

cekees merged 5 commits into
mainfrom
richards-case

Conversation

@cekees

@cekees cekees commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #115 (base adrh-kokkos-faces, itself on #114 and #113); merge in that order, then retarget to main.

What

Richards' equation in pressure-head form, the first nonlinear, strongly heterogeneous problem for the ADRH engine.

  • richards.h: the Mualem-van Genuchten law ported from proteus/pskRelations.h and the coefficients of proteus/richards/Richards.h; RichardsMaterials (up to 8 materials, a material number per element).
  • A new opt-in hook, bindElement(eN), in the element and face kernels (engine.h, boundary.h) and the Kokkos launches: a functor that defines it is asked for the functor to use on that element; others are untouched.
  • 1D segment spaces (spaces.h), and FaceBC::advInterior for the weak Dirichlet variant of proteus's Richards_IIPG_exterior.
  • richards_regression.py and richards_layers.py; module entries richards_vgm and richards_vgm_faces on the host and Kokkos modules.

Checks

  • Celia column (test/richards/test_1) against proteus's saved Galerkin profiles: 2.5e-13 at 12 h and 24 h with the weak Dirichlet treatment and proteus's Newton stopping rule (2-norm < 1e-8), host and Kokkos modules identical. With the Dirichlet rows replaced instead the fronts differ by 0.06 to 0.08, which is how the deck's weak boundary condition was found. Converged tighter, the engine differs from the saved profiles by 8.7e-8 and 4.2e-6: proteus's Newton tolerance, not the discretization.
  • Two-layer column against an ODE solution (no finite elements): nodal error falls at exactly rate 2.00 from 11 to 321 nodes, 7.2e-4 to 7.1e-7; host and Kokkos identical.
  • The host module is bit-identical on all 64 golden arrays after these changes; Kokkos agrees with the host as before.

Not done

Stabilization: proteus's HYDRUS and Szymkiewicz decks run with entropy viscosity or FCT because plain Galerkin does not run them, so they are not compared yet. Faces through bindElement are implemented but not exercised by a test.

CI note: every branch currently fails the same 31 archive-format tests until the proteus writer for ymf archive format 2 (#110) merges; that is unrelated to this PR.

🤖 Generated with Claude Code

cekees and others added 5 commits October 26, 2026 11:13
… model; segments (1D); bindElement hook

richards.h (van Genuchten-Mualem, ported from pskRelations.h; several materials through bindElement),
1D segment spaces, weak Dirichlet with the interior advective flux (Richards_IIPG_exterior), and
richards_regression.py: test/richards/test_1 (Celia) matches proteus's saved Galerkin profiles to
2.5e-13 with proteus's Newton stopping rule, on the host and Kokkos modules.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…EADME section for the Richards case

The engine's two-material steady column converges to the shooting solution of the constant-flux ODE at
exactly the P1 rate (2.00, 11 to 321 nodes), host and Kokkos modules identical.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… inline fixed, CSV path from the environment

richards.h declared vgmWetting 'ADRH_FN inline'; ADRH_FN already includes inline, which gcc and nvcc reject (clang accepted it).
RichardsMaterials with no table assigns materials by element number modulo the count, so benchmarks exercise bindElement on a device
without a data pointer. The Celia column matches proteus's saved profiles to 3.3e-13 on the GPU module.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d as measured

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Base automatically changed from adrh-kokkos-faces to main October 27, 2026 07:32
@cekees
cekees merged commit 5aa633e into main Oct 27, 2026
10 checks passed
@cekees
cekees deleted the richards-case branch October 27, 2026 09:12
cekees added a commit that referenced this pull request Oct 27, 2026
experimental/adrh: algebraic stabilization, lumped mass and discrete upwinding (stacked on #117)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant