Apply the QCR2000 correction to the turbulent stress only (fix #2738) - #2855
Draft
bigboateng wants to merge 1 commit into
Draft
Apply the QCR2000 correction to the turbulent stress only (fix #2738)#2855bigboateng wants to merge 1 commit into
bigboateng wants to merge 1 commit into
Conversation
The quadratic constitutive relation (Spalart 2000) modifies the turbulent (Boussinesq) stresses, but AddQCR was applied to the total stress tensor: laminar + turbulent in the viscous fluxes, and the purely laminar tensor in the wall force integration, where the eddy viscosity is zero and the correction must vanish. This shifted the pressure/viscous drag split for SA-QCR2000 cases (issue su2code#2738) while leaving total drag nearly unchanged. Scale the correction by the turbulent fraction of the viscosity used to build the tensor, mu_t / (mu_l + mu_t), which recovers the turbulent-only correction exactly because the tensor is linear in the viscosity (no turbulent kinetic energy term for SA). The wall-force site now passes a zero fraction on smooth walls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
The QCR2000 quadratic constitutive relation (Spalart, Int. J. Heat and Fluid Flow, 2000) modifies the turbulent (Boussinesq) stresses, but
CNumerics::AddQCRwas applied to the total stress tensor at all call sites: laminar + eddy in the viscous fluxes (scalar and SIMD paths), and the purely laminar tensor inFriction_Forces, where the eddy viscosity is zero and the correction should vanish identically. For a pure-shear wall state this injects spurious normal stresses of ±0.6·τ_wall into the wall traction, which redistributes drag between the pressure and friction components while leaving total drag nearly unchanged — the exact signature reported in #2738.This PR scales the correction by the turbulent fraction of the viscosity used to build the tensor,
mu_t / (mu_l + mu_t), which recovers the turbulent-only correction exactly because the stress tensor is linear in the viscosity (SA carries no turbulent-kinetic-energy term). The wall-force site passes a zero fraction on smooth walls. A unit test covers both properties (zero correction atmu_t = 0; scaled-total ≡ separate-turbulent-tensor).Validation (Ubuntu 24.04, source build at
de8c5015, the #2738 reporter's Joukowski R2 grid, 12000 iters, rms[Rho] ≈ −11):Before the change, QCR2000 shifts CDp +9.5% / CDv −6.4%; after it, the split returns to within 0.1% of SA, consistent with CFL3D/FUN3D/Fluent behavior for this attached flow (HiFi CFD verification workshop references). With QCR disabled the patched build is behaviorally unchanged.
Note: the
turb_SA_QCR_RAE2822reference values inparallel_regression.pyshift by 1e-4…4e-3 (verified on a same-platform before/after pair); I will update them from this PR's CI output, since reference values are runner-specific. Opening as a draft until then.Related Work
Fixes #2738.
PR Checklist
pre-commit run --allto format old commits.