Skip to content

Examples: slip walls, wall thermal and species transport validation - #2413

Draft
sbryngelson wants to merge 1 commit into
MFlowCode:masterfrom
sbryngelson:cm3c-walls-transport
Draft

sbryngelson wants to merge 1 commit into
MFlowCode:masterfrom
sbryngelson:cm3c-walls-transport

Conversation

@sbryngelson

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

Three validation families in one PR (examples, checker scripts, documentation pages, registered tests; no src/ change):

  • Slip immersed walls (examples/2D_ibm_slip_cylinder, docs/documentation/validation_slip_walls.md): the gas mass of a fixed slip cylinder in a periodic box with and without ib_mass_relax, and the near-wall pressure and velocity error of an exact steady vortex for the curvature term, TSC image-point weights and ib_slip_ccst. Slip walls in a shock curtain and in close approach are documented as not working.
  • Species diffusion, conduction and the transport time step (examples/1D_diffusion_verification, docs/documentation/validation_species_transport.md): trace-species diffusion and conduction against the erfc solution (second order), a multicomponent mixing layer against an independent 1D solver (after Chemistry: second-order face composition in the diffusion correction flux #2205), and the stability threshold of chem_params%transport_dt for both transport models.
  • Solid-wall thermal models (examples/2D_ibm_cylinder_drag_nu lumped cooling, examples/2D_ibm_cold_wall_transient, docs/documentation/validation_wall_thermal.md): the lumped cylinder against the decay time of its fixed-wall Nusselt number, and the heat a cold cylinder absorbs from hot gas with and without patch_ib(1)%wall_column (IBM: opt-in sub-grid wall conduction column for isothermal walls (patch_ib%wall_column) #2329) against a body-fitted 1D reference.

What each adds beyond master:

  • F05. Master documents the mass leak numbers in the ib_mass_relax entry and tests the option on a unit-box case that does not discriminate; this adds a checker and a CI-size test, the exact-vortex study of the curvature term, TSC and CCST (first-band errors reproduce the earlier measurements to three digits), and the two failure modes (slip curtain, close approach).
  • F12. Master has 1D_multispecies_diffusion (not a test, no reference) and the transport_dt unit case; this adds second-order verification against exact and independent references, the re-run of the mixing-layer order study after Chemistry: second-order face composition in the diffusion correction flux #2205, and the threshold scan.
  • F07. 2D_ibm_lumped_wall checks the bookkeeping of the lumped update only; this checks it against a Nusselt-number time constant. The wall column has a regression test on the reacting-surface example; this checks its heat against a reference.

Evidence

All numbers were re-measured on master at 0cdfdf0 (GNU 13, one rank, double precision); the full tables are on the three pages.

Re-measured on current master against earlier measurements

Family Quantity Earlier measurement master 0cdfdf0
F05 M = 0.3 vortex, first-band pressure error at 10/20/40 cells per R, default options 3.28e-2 / 1.58e-2 / 6.38e-3 3.28e-2 / 1.58e-2 / 6.38e-3
F05 the same with ib_ip_interp = 2 and ib_slip_ccst 4.51e-3 / 1.22e-3 / 2.40e-4 4.51e-3 / 1.22e-3 / 2.40e-4
F05 gas mass per flow-through, fixed slip cylinder, 16 cells per R, ib_mass_relax 0 / 1 +0.5 % / -2e-16 +3.6e-3 / -1.2e-13
F12 trace-H2 and conduction L1 order (32 to 512 cells) 1.96 to 2.01 2.0 to 2.2
F12 mixing layer species order 300 to 600 cells 1.0 (first-order floor, upwind face composition) 1.56 to 1.66 (after #2205)
F12 transport_dt threshold 0.61 to 0.64 against 0.628 stable at 0.6, unstable at 0.65 (N2, both models; mixture under unity Lewis)
F07 cold wall, wall column, heat error at 0.003 / 0.01 / 0.03 / 0.1 R^2/alpha, 40 cells per R +5.84 / +0.05 / -1.10 / -0.14 % +6.0 / -0.3 / -1.3 / +0.0 %
F07 lumped cooling, fitted Nu against the fixed-wall Nu, Re 20 at a decay time of 24 D/U and Re 40 at 48 D/U -6.6 % and -5.8 % -5.5 % (Re 20, 12 cells per D); the Re 40 run at 48 D/U was not completed

Two numbers left the bands of the earlier measurements and are stated as measured: the lumped cooling gap is -9 to -16 % at the short decay times that fit the compute budget (it shrinks with the decay time; see the page), and the mixing-layer species error does not reach second order.

Per-test cross-architecture spread (largest of min(absolute, relative) difference over all golden entries against the committed golden, which is GNU 13 double on the AMD host CPU of an MI300A node):

Test tolerance GNU 13, Intel Ice Lake CPU A100, NVHPC 25.11 A100, NVHPC 25.5
Species Erf 1e-6 5e-12 4e-12 4e-12
Heat Erf 1e-6 4e-11 4e-11 4e-11
Unity-Lewis Transport-Limited dt 1e-6 1e-12 2e-12 2e-12
Slip Cylinder Mass Budget 1e-6 1.0e-7 1.4e-7 1.4e-7
Cold Wall Transient, Wall Column 5e-2 2.0e-2 1.4e-8 1.4e-8

All five tests pass on both A100 builds (./mfc.sh test --gpu acc, no MPI), and the slip budget agrees between 1 and 2 ranks on the A100 to 4e-16 in the gas mass. Chemistry cases are skipped in the single-precision lane, and the slip test is skipped there too (single precision moves near-zero momentum entries by 2e-4, above the lane's 1e-4; added to the skip list in toolchain/mfc/test/test.py). The cold-wall test needs a loose tolerance because the Intel Ice Lake build differs from the AMD CPU and the A100 by 2e-2 (density 1e-3 relative); the cause is not identified and the tolerance should be tightened when CI shows which result the runners follow.

Defect found, not fixed here (needs its own issue). On an NVIDIA A100 (NVHPC 25.11 and 25.5, OpenACC, with and without MPI) ib_mass_relax = 1 does nothing for a fixed slip body when no ib_state_wrt or ib_heat_wrt is set: the mass change of examples/2D_ibm_slip_cylinder is +1.6e-3 in 100 steps with and without the option, identical to every digit, where a CPU run gives -4e-15. Adding ib_state_wrt = T to the same case gives -3.7e-15 on the A100, so the failure is in the relaxation-only path (ib_mass_only in m_ibm.fpp). Reproducer: ./mfc.sh run examples/2D_ibm_slip_cylinder/case.py -t pre_process simulation post_process -n 1 --gpu acc -- --mass_relax 1 against --mass_relax 0, then python3 examples/2D_ibm_slip_cylinder/check_slip.py examples/2D_ibm_slip_cylinder --case-args '--mass_relax 1'. The existing test IBM -> Fixed Circle -> Slip -> ib_mass_relax passes on the A100 with the option set to 0 as well, so it does not detect this.

Scope

  • No src/ change. A defect found on the NVIDIA GPU is documented (see below) and not fixed here.
  • The --mass_relax 1 case is not registered as a test, because on an NVIDIA GPU it does nothing (below).
  • The exact-vortex mode compiles its own pre_process and simulation (analytic initial condition) and is not in the suite.
  • Not re-measured: the added-mass, uniform-flow Cp and free-cylinder studies of the slip write-up (they did not separate the options), the pre-curvature control of the vortex study (not available on master), spheres, moving or reacting walls for the lumped model.

Test plan

  • ./mfc.sh test --only 9466C5D1 DC0037CC 510F7782 824745F5 D5EAC17E (species erf, heat erf, unity-Lewis transport-limited dt, slip mass budget, cold wall with wall column).
  • Hand tests: see the comment below.

This PR was made with Claude Code (AI).

Slip immersed walls: 2D_ibm_slip_cylinder (gas mass of a fixed slip cylinder in a periodic box with
and without ib_mass_relax; near-wall error of an exact steady vortex for the curvature term, TSC
weights and ib_slip_ccst), checker, page and one registered test.

Species transport: 1D_diffusion_verification (trace-species diffusion and conduction against the
erfc solution, a multicomponent mixing layer against an independent solver, and the transport_dt
stability threshold), checker, reference solver, page and three registered tests.

Wall thermal models: lumped-cylinder cooling in 2D_ibm_cylinder_drag_nu (--thermal_bc 3) with a
checker, and 2D_ibm_cold_wall_transient (heat absorbed by a cold cylinder with and without
patch_ib%wall_column against a body-fitted 1D reference), page and one registered test.
@sbryngelson

Copy link
Copy Markdown
Member Author

Hand tests of the five registered tests at 2c36adb (the files tested are those of this commit).

Machine Compiler Build Result
NVIDIA A100 80GB (Georgia Tech wingtip) NVHPC 25.11, OpenACC --gpu acc --no-mpi 5 passed
NVIDIA A100 80GB (Georgia Tech wingtip) NVHPC 25.5, OpenACC --gpu acc --no-mpi 5 passed
Tuolumne (LLNL), AMD host CPU GNU 13 --no-mpi --no-gpu goldens generated here; 5 passed
Intel Ice Lake CPU (Georgia Tech wingtip) GNU 13 --no-mpi --no-gpu 5 passed
./mfc.sh test --no-mpi --gpu acc -g 0 -j 1 --max-attempts 1 --only 9466C5D1 DC0037CC 510F7782 824745F5 D5EAC17E
./mfc.sh test --no-mpi --no-gpu --no-debug --no-reldebug --no-single -j 4 --only 9466C5D1 DC0037CC 510F7782 824745F5 D5EAC17E

Largest difference of min(absolute, relative) over all golden entries, against the committed golden:

Test tolerance Intel Ice Lake, GNU A100, NVHPC 25.11 A100, NVHPC 25.5
Species Erf 1e-6 5e-12 4e-12 4e-12
Heat Erf 1e-6 4e-11 4e-11 4e-11
Unity-Lewis Transport-Limited dt 1e-6 1e-12 2e-12 2e-12
Slip Cylinder Mass Budget 1e-6 1.0e-7 1.4e-7 1.4e-7
Cold Wall Transient, Wall Column 5e-2 2.0e-2 1.4e-8 1.4e-8

The A100 and the AMD CPU agree on the cold-wall case to 1.4e-8; the Intel Ice Lake build differs from both by 2.0e-2 (density 1e-3 relative), which sets the 5e-2 tolerance. The cause is not identified. Tighten it when the CI lanes show which result they follow.

Other hand checks on the A100 (NVHPC 25.11):

  • 1D_diffusion_verification --mode stab: the growth of the grid-scale mode is the same as on the CPU to four digits in seven cases (N2 under unity Lewis at --cfl 0.5, 0.6, 0.65; N2 mixture-averaged at 0.65; the mixture under unity Lewis at 0.6, 0.65 and mixture-averaged at 0.7).
  • 2D_ibm_slip_cylinder with MPI, 1 and 2 ranks (both on one GPU): gas mass change +1.6023130946659e-3 and +1.6023130946663e-3 after 100 steps.
  • Defect, not fixed here: ib_mass_relax = 1 does nothing in the periodic slip case on the A100 (+1.6e-3 with and without it, where a CPU run gives -4e-15); with ib_state_wrt = T added to the case it gives -3.7e-15. Same on NVHPC 25.5 and with MPI. Details and reproducer are in the PR description.

Single-precision lane: the chemistry tests are skipped by the harness, and the slip test is skipped in toolchain/mfc/test/test.py (single precision moves its near-zero momentum entries by 2e-4, above the lane's 1e-4; checked with a local --single build). Not yet run: ./mfc.sh test --select-enforce and the sharded full GPU suite.

AI-assisted (Claude Code).

@github-actions

Copy link
Copy Markdown

Claude Code Review

Head SHA: 2c36adb

Files changed:

  • 25
  • docs/documentation/ibm.md
  • docs/documentation/validation_slip_walls.md
  • docs/documentation/validation_species_transport.md
  • docs/documentation/validation_wall_thermal.md
  • examples/1D_diffusion_verification/case.py
  • examples/2D_ibm_slip_cylinder/case.py
  • examples/2D_ibm_cold_wall_transient/case.py
  • toolchain/mfc/test/cases.py
  • toolchain/mfc/test/test.py
  • toolchain/mfc/lint_docs.py

Findings:

  • medium toolchain/mfc/test/cases.py: The new "Wall Column" case uses override_tol=5e-2. The comment says Intel Ice Lake differs from the golden by 2.0e-2 with an unidentified cause. A tolerance this loose can hide real regressions in the density and momentum fields. It is documented as provisional, so I'd suggest tightening it, or adding a tracking issue, once CI shows the runner spread. Confidence: moderate.
  • medium toolchain/mfc/test/cases.py: The diff adds seven new test cases (three Diffusion Verification, Slip Cylinder Mass Budget, Wall Column). The prepared diff shows no golden files under tests/<UUID>/. If the goldens are not in the PR, CI fails with missing-golden errors. Please confirm they are committed. I could not check this from the inputs I was given.

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