Repository navigation
HLLC: central tangential velocity in the viscous work (CPU/GPU-consistent at no-slip walls); weno_Re_flux_compact on by default (closes #2453, #2390) - #2517
Conversation
|
Claude Code Review Head SHA: dd64605 No review was produced. Claude ran but wrote no review (Claude step: failure). Run and transcript: https://github.com/MFlowCode/MFC/actions/runs/45860921414 |
…tent at no-slip walls)
…_contact (the MFlowCode#2452 workarounds for MFlowCode#2453)
…d the compact default move past their tolerance (Phoenix, GNU 12.3 + OpenMPI 4.1.5)
|
Hand test, GPU: Phoenix, NVIDIA A100-PCIE-40GB, NVHPC 25.11 (OpenACC),
Both failures are unrelated to this PR:
The branch has since been rebased onto master (#2505, #2508, #2514) because of a conflict. A GPU check of the HLLC viscous wall tests on the rebased head follows. AI-assisted (Claude Code). |
7af02d4 to
3cb64b7
Compare
Lines of Code
|
…d, moved by MFlowCode#2505 and by the compact default; Phoenix GNU 12.3)
|
After the rebase onto master c158eee (#2505, #2508, #2514; HEAD 4febcf9): Goldens. The changed set plus every golden #2505/#2508/#2514 touched (140 tests) was regenerated on the new base: Phoenix, GNU 12.3 + OpenMPI 4.1.5, double, CPU, 140 passed. Each was compared with master's golden against its test's tolerance:
GPU check. Phoenix, NVIDIA A100 80GB PCIe, NVHPC 25.11 (OpenACC),
AE4D2FDA, which did not execute in the earlier A100 40GB hand test, ran and passed here, so I count that failure as a one-off. Its stdout and stderr from that run were not kept. AI-assisted (Claude Code). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2517 +/- ##
=======================================
Coverage 66.59% 66.59%
=======================================
Files 112 112
Lines 31558 31552 -6
Branches 4856 4855 -1
=======================================
- Hits 21015 21012 -3
+ Misses 6561 6558 -3
Partials 3982 3982 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…C central tangential velocity); their MFlowCode#2515 goldens predate it
…, TSC image points and ib_visc_compact by default (#2486) * Tests: generic configurations for degenerate tests; tolerances from measured spreads * IBM: ib_wall_order = 2 by default (1 with ib_second_order_vel) * IBM: ib_ip_interp = 2 (TSC) by default (1 with ib_second_order_vel) * Docs: TSC image points and the quadratic no-slip ghost are the defaults * Viscous IB: ib_visc_compact by default with weno_Re_flux, so the viscous flux no longer reads unfilled solid cells (#2041) * Tests: tolerances measured with the new defaults on more lanes * Tests: cold-wall twin and flux-wall tolerances from the measured GNU/GPU spread * Tests: override_tol_single for the single-precision lane; tolerances from the measured CI spread * Review: explicit IB options in the validation examples, ib_visc_compact = F tests, wording of the old defaults * Tests: regenerate the changed goldens (Phoenix, GNU 12.3, OpenMPI 4.1.5) * Format the wall_fill comment * Tests: goldens that move on the new base (09FDDC81, and the overlap-cell seam test from #2514) * Tests: C1F0BCB1 tolerance 1e-7 (GitHub ubuntu GNU differs from the Phoenix GNU golden by 4e-9 relative) * Tests: goldens that move on the new base (master 946d1e5; Tuolumne, GNU 13.3.1 CPU) * Tests: regenerate 872A4241 and F1BD319C on top of #2517 (HLLC central tangential velocity); their #2515 goldens predate it
#2517 made HLLC use the central tangential velocity in the viscous work everywhere, so ib_smooth_contact had no effect. Remove it from the registry, descriptions, validator AMR lists, Fortran default and docs. Case files that still set it get an 'it was removed ... delete it from the case file' error (new REMOVED_PARAMS next to RENAMED_PARAMS), with a unit test.
Closes #2453. Closes #2390.
What changes
1. HLLC viscous work: central tangential velocity (#2453). The tangential components of the HLLC interface velocity
vel_src_rsx_vfare read only by the viscous work (-u·τins_compute_cartesian_viscous_source_fluxand the cylindrical variant). They were the contact-upwinded statexi_M*u_L + xi_P*u_R, which switches onsign(s_S). At a no-slip wall face (domainbc = -16or an IB ghost face)s_Sis round-off while the two tangential velocities differ by order one across the odd ghost mirror, so which side was taken depended on compiler and device. They are now(u_L + u_R)/2in all three HLLC paths (6-equation, 5-equation with bubbles, 5-equation including chemistry and hypoelasticity), through one Fypp macro (VISC_TAN_VEL_SRC). The normal component (also the volume-fraction advection source) keeps the HLLC value and is bitwise unchanged.ib_smooth_contact(an opt-in blend of the same two states, IB-only) is now redundant: the parameter is still accepted but has no effect, andf_contact_weight/contact_rampand its validator rules are removed. Its four test variants are dropped; the AMR one becomesAMR -> 2D -> static IBM circle -> viscous(245321C0) so AMR keeps a viscous IB test.2.
weno_Re_flux_compact = Tby default (#2390). In Cartesianweno_Re_fluxruns, the face-normal viscous gradient becomes the difference across the face, which removes the zero-damping checkerboard mode that leaves a velocity sawtooth at no-slip walls (#2390 has the measurements). Resolved at start-up toweno_Re_flux .and. .not. cyl_coord;weno_Re_flux_compact = Frestores the WENO-chain face gradient. Docs updated.3. The #2452 test workarounds are reverted. The thermal channel test (D626076C) is back to HLLC (#2452 switched it to HLL), and the cold-wall twin (6E24D2F9) no longer sets
ib_smooth_contact. Both are now device-independent with the default code.Evidence
Minimal replica (numpy, HLLC face,
wave_speeds = 1): a one-ulp change in the normal state flipss_Sat a wall face and the viscous work from +0.300 to -0.300 (contact-upwinded); with the central average both builds give 0. On smooth faces the two choices differ by the reconstruction error (h^5: 9.5e-7, 3.0e-8, 9.3e-10 at h = 1/16, 1/32, 1/64).Device and compiler agreement (largest min(abs, rel) difference over the golden files):
weno_avgweno_Re_flux_compactib_smooth_contact)Machines: wingtip A100 (NVHPC 25.11, OpenACC) and NVHPC CPU, GNU 13.3 CPU (1-rank, and OpenMPI 4.1.6 for 2-rank); Phoenix GNU 12.3 + OpenMPI 4.1.5 and Quadro RTX 6000 (NVHPC 25.11, OpenACC). Over the 213 IBM/Viscous/channel tests, what still differs GPU vs GNU above 1e-10 is not HLLC viscous wall work (HLLD hypoelastic IBM up to 1.5e-6, the reacting flux wall at 1e-7). Details: #2453 comments.
Accuracy A/B of change 1 alone (A100, master vs fix, the examples' validated settings):
ib_wall_order = 2: L2/(Omega R), inner torque errChange 2's effect on the validated examples is in #2390 (thermal channel Nu changes by 0.1 to 0.2 %; the near-wall sawtooth goes from 0.037 to 0.0000 at 32 cells).
Goldens
Regenerated on Phoenix (GNU 12.3 + OpenMPI 4.1.5, double, CPU) on this exact base (ea89e86): the whole suite was first regenerated on 34aadf1 (1000 passed, 0 failed), then the changed set plus every golden #2491/#2492/#2447 touched was regenerated on ea89e86 (257 passed). Committed are only the 99 goldens that move past their test's tolerance plus the new 245321C0; 26 more change below tolerance and are left as they were, as is compiler-level noise elsewhere. The five removed tests' goldens are deleted. Change = largest min(abs, rel) difference against master's golden; cause H = HLLC central velocity, C = compact default.
Changed goldens (100)
Large values (above 1e-2) sit on near-zero fields (transverse momentum, wall-adjacent cells) of tests whose walls the compact gradient or the central velocity affect; the device agreement above shows these goldens are now reproducible.
Not in this PR
Some test tolerances that were sized to the old device spread (for example the 3e-3 of the sphere drag Nu test) could now be tightened; left to #2486.
This PR was made with Claude Code (AI).