Skip to content

Examples: wall-order Taylor-Couette and plane Poiseuille - #2373

Draft
sbryngelson wants to merge 17 commits into
MFlowCode:masterfrom
sbryngelson:f04-wall-order-couette
Draft

sbryngelson wants to merge 17 commits into
MFlowCode:masterfrom
sbryngelson:f04-wall-order-couette

Conversation

@sbryngelson

@sbryngelson sbryngelson commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Contribution Policy

All contributions are expected to demonstrate:

  • A clear understanding of the codebase
  • Alignment with product direction
  • Thoughtful reasoning behind changes
  • Evidence of real-world usage or hands-on experience with the problem

If these expectations are not met, we would prefer to implement the changes ourselves rather than spend time reviewing low-effort submissions.

Summary

#2176 added ib_wall_order = 2 (two-probe quadratic wall-normal ghost velocity at no-slip walls) and reported no accuracy gain against an exact solution. This PR measures it, and adds two examples with checker scripts, READMEs and a validation page (docs/documentation/validation_wall_order_couette.md):

  • examples/2D_ibm_plane_poiseuille: plane Poiseuille flow between two flat immersed walls, against u = g y (H - y) / (2 nu) and its flow rate.
  • examples/2D_ibm_taylor_couette: Taylor-Couette flow with a rotating inner circle and an STL outer ring, against u = A r + B / r and the torque.

Two registered tests, 2D -> IBM -> Taylor-Couette -> ib_wall_order=2 (100 steps) and 2D -> IBM -> Plane Poiseuille -> ib_wall_order=2 (300 steps), are regression goldens at CI size; the checkers measure the accuracy. Tolerance 1e-10: the largest difference seen between the GNU, Intel, NVHPC and macOS CI lanes and an A100 run was 1e-13 absolute.

Delta against master: master tests ib_wall_order = 2 only against goldens (Circle and Sphere); nothing checks it against an exact viscous solution.

Measured (master at dd9778b, NVIDIA A100, NVHPC 25.11, double precision, 1 rank)

Problem Grid L2 error, order 1 L2 error, order 2
Channel (wall on a cell face), / u_max 8 / 16 / 32 cells 0.455 / 0.216 / 0.113 0.0545 / 0.0185 / 0.00668
Annulus, / Omega R 10 / 20 / 40 cells per R 1.66e-2 / 1.09e-2 / 8.1e-3 1.23e-2 / 6.5e-3 / 4.7e-3

Order 2 is an 8 to 17 times gain at a flat wall. At the rotating curved wall the gain is 26 to 42 % in velocity and 2 to 3 times in torque, and neither order converges cleanly.

Known limits (stated on the page)

  • Rotating-wall shear. On current master a rotating body's wall velocity is evaluated at the ghost point instead of the wall point (s_compute_ghost_point_velocity), which gives a 28 to 47 % inner-wall shear error that does not converge. The fix is IBM: evaluate a rotating body's ghost-cell wall velocity at the wall point #2383. The page records the numbers measured on master and labels them as measured with this defect. The annulus golden E2C4CBC6 changes when IBM: evaluate a rotating body's ghost-cell wall velocity at the wall point #2383 merges (the channel golden does not); I will regenerate it in the same order of merges.
  • 2D only; a third grid beyond 40 cells per R is not measured, so the status is "partially validated". Wall shear read from near-wall cells does not converge for either order.
  • The rigid-rotation check is not reproduced here (it needs an initial condition no case-file patch provides).

Testing

CI (GNU, Intel, NVHPC, macOS lanes) passes; the Georgia Tech lanes are the known-slow ones. Hand tests are in a comment below.

This PR was made with Claude Code (AI).

@github-actions

Copy link
Copy Markdown

Claude Code Review

Head SHA: b91eb37

Files changed:

  • 7
  • examples/2D_ibm_plane_poiseuille/case.py
  • examples/2D_ibm_plane_poiseuille/check_poiseuille.py
  • examples/2D_ibm_taylor_couette/case.py
  • examples/2D_ibm_taylor_couette/check_couette.py
  • examples/2D_ibm_taylor_couette/ring.stl
  • examples/2D_ibm_taylor_couette/ring_stl.py
  • toolchain/mfc/test/cases.py

Findings:
No issues found. Checked the diff hunks of the Poiseuille and Couette case.py and check scripts, ring_stl.py, and the cases.py registration and skip list. I did not open the context files or the contributing and GPU docs, because the diff adds only Python examples and test registrations and touches no GPU macros or src/simulation.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant