Skip to content

Use variable-relative epsilon for turbulence point limiters - #2978

Open
rois1995 wants to merge 6 commits into
su2code:fix_scalar_musclfrom
rois1995:fix_scalar_limiter_eps
Open

rois1995 wants to merge 6 commits into
su2code:fix_scalar_musclfrom
rois1995:fix_scalar_limiter_eps

Conversation

@rois1995

@rois1995 rois1995 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Turbulence and transition variables can differ by many orders of magnitude, but the stored Venkatakrishnan/Nishikawa point limiters currently use an absolute epsilon. Changing the units of the same field can therefore change the limiting.

Normalize the projected increments and neighbor differences by max(abs(local value), abs(freestream value)) for turbulence/transition point limiters. Retain the zero-scale fallback, leave Wang's range-relative epsilon unchanged, and register the reference value as an AD preaccumulation input. Other solver families retain their existing epsilon behavior.

Adds unit tests for SA/SST in 2D/3D, field scales from 1e-12 to 1e12, signed/zero/tiny references, constant fields and Wang compatibility. The derivative test checks the actual limiter computation against finite differences and is registered for both reverse and forward builds. Adds two MPI NACA0012 regression cases for SA/SST with point limiting and LIMITER_ITER=3.

Adds four reproducible full convergence configurations for SA NACA0012, SST flat plate, and SST NACA0012 with continuously updated or frozen point limiting. These are manual convergence benchmarks; the existing ten-iteration regressions retain LIMITER_ITER=3. Exact configurations, input checksums, full histories and plots record the comparison at develop 3aa1a95558, #2956 a3968c9495, and this PR's numerical head f1b5967a57 (the new commit only adds cases/documentation).

Case Density target (log10 RMS) develop #2956 This PR
SA NACA0012 -12 272 272 268
SST flat plate -12 Not reached in 10,000 Not reached in 10,000 758
SST NACA0012, continuously updated limiter -11 Not reached in 10,000 467 Not reached in 10,000
SST NACA0012, limiter frozen at 500 -11 Not run Not run 620

Counts include iteration zero and measure the density stopping criterion, not convergence of every turbulence residual. These results show a case-dependent improvement, rather than a universal acceleration.

SST NACA0012 limitation and current workaround: with MUSCL_TURB=YES, VENKATAKRISHNAN, coefficient 0.03 and fixed CFL 1000, continually updating the limiter produces a nonlinear wake cycle. Consecutive stalled steps show k-limiter changes and reconstructed faces switching across the k positivity bound to first-order fallback near the largest density residuals. The implicit convective Jacobian omits reconstruction dependence, a plausible contributor; the complete cause and a general code correction remain unvalidated. For this configuration, set LIMITER_ITER=500, keeping turbulence MUSCL enabled: the stored limiter continues to be applied and the density target is reached in 620 iterations. This is the current workaround, with a dedicated sst_naca_frozen500.cfg; the detailed evidence and control experiments are in the linked README. Edge-based VAN_ALBADA_EDGE is not frozen by this setting.

Validation:

  • 51 supported normal unit cases: 100,162 assertions passed.
  • 5 supported reverse-AD unit cases: 24,817 assertions passed, including limiter reference derivatives.
  • New unit cases pass in serial, with two OpenMP threads and with two MPI ranks.
  • Both new SA/SST MPI regressions pass at the existing tolerance. Both fail against the PR Fix the second-order convection of turbulence and species #2956 baseline, so they detect the epsilon change.
  • Repository formatting/whitespace hooks pass.

Local builds use GCC 9 with MLPCpp disabled; its existing fluid units were excluded. Forward AD, ARM64 and the complete regression matrix were not run locally. The repository regression workflow only triggers for PRs targeting develop/master; its matrix will run when this PR is retargeted after #2956 merges.

Depends on #2956. This PR targets fix_scalar_muscl to keep the epsilon improvement separate; retarget to develop after #2956 merges.

rois1995 and others added 5 commits October 1, 2026 13:55
The epsilon of the Venkatakrishnan and Nishikawa limiters is an absolute number, suited to flow
variables of size about 1. The turbulence variables have units and span orders of magnitude, so the
limiter did nothing on nu~ (about 1e-5) and acted like Barth-Jespersen on omega (about 1e8); the
result also depended on the units of the case. Following Luke (AIAA 2007-3956) and Nishikawa, White and
O'Connell (2023), the differences are now divided by max(|phi|, phi_inf) of the point before the limiter
function, for the turbulence and transition solvers. Wang's limiter, already relative to the range of
the field, and the flow and species solvers are not changed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
@rois1995

Copy link
Copy Markdown
Contributor Author

Added the full convergence cases in 732528a: SA NACA0012, SST flat plate, SST NACA0012, and its frozen-limiter counterpart. The existing short SA/SST MPI regressions already cover stored point limiting with LIMITER_ITER=3 and remain in place. The new configurations reproduce the longer comparisons, with input checksums and run instructions.

The updated PR description includes the comparison against develop and #2956. Recorded configurations, compressed full histories and diagnostics are available for review.

Convergence comparisons

For SST NACA0012, turbulence MUSCL is enabled. At CFL 1000 with the Venkatakrishnan coefficient 0.03, continuously updated limiting stalls near log10 RMS density -10. The wake diagnostics show a k-limiter change of about 0.103 and nine reconstructed faces crossing the lower k bound between consecutive stalled steps. The positivity fallback then switches some faces to their first-order nodal values, near the largest density residuals. This supports a nonlinear reconstruction cycle; the approximate implicit Jacobian omits reconstruction dependence, but a complete root cause and a general code fix have not been validated.

The workaround for now is LIMITER_ITER=500, with MUSCL_TURB=YES and SLOPE_LIMITER_TURB=VENKATAKRISHNAN. Only the limiter update is frozen; its stored values continue to limit the MUSCL reconstruction. The otherwise identical case reaches the density target in 620 iterations (log10 RMS density -11.0072, CL 1.070484, CD 0.0157461). This setting is demonstrated for this case, not a universal freeze iteration. Lowering CFL to 100 did not reach the target within 10,000 iterations; tighter linear solves and isolated continuous-clipping experiments did not remove the cycle within their tested budgets. VAN_ALBADA_EDGE does not use stored point limiting and cannot be frozen this way.

Validation of this update: all four added configurations match the completed full runs exactly in every numerical option; the SST pair differs only in LIMITER_ITER. All 13 published histories were checked against their reported iteration counts and final density residuals, with lossless compression verified. No production source changed. The full regression matrix has not been rerun for this documentation/configuration update; as noted above, the stacked PR still targets fix_scalar_muscl.

@bigfooted bigfooted self-assigned this Oct 16, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants