Skip to content

Fix the SA-Edwards strain measure and the SA-Edwards and rough-wall source Jacobians - #3034

Open
Syphonicc wants to merge 1 commit into
su2code:developfrom
Syphonicc:fix-sa-edwards-rough-jacobian
Open

Syphonicc wants to merge 1 commit into
su2code:developfrom
Syphonicc:fix-sa-edwards-rough-jacobian

Conversation

@Syphonicc

Copy link
Copy Markdown
Contributor

Proposed Changes

Three fixes in the SA source terms (turb_sources.hpp), found by checking each source term against the published model and its Jacobian against the derivative of the code's own residual, at 50 significant digits.

1. SA-Edwards strain measure. Omega::Edw subtracted 2/3 Σ(∂u_i/∂x_i)², the sum of the squared normal gradients, instead of 2/3 (∂u_k/∂x_k)², the square of the divergence (TMR, SA-Edwards). The two differ by (4/3)(u_x v_y + u_x w_z + v_y w_z), which is not zero in incompressible flow either, so S was underestimated wherever there is normal strain.

2. SA-Edwards Jacobian of r. r::Edw overwrote var.r with tanh(r0)/tanh(1) and then used 1 - tanh(var.r)^2 for the chain rule, i.e. it differentiated at the wrong argument. It now uses r0, and sets d_r = 0 where r0 is clipped at 10, as r::Bsl does.

3. Rough-wall d_fv2. fv2 = 1 - nue/(nu + nue fv1) uses nue/nu, but its derivative used Ji = nue/nu + cr1 ks/d, which includes the roughness shift. For rough walls this gave a wrong value and sometimes the wrong sign (e.g. +5824 instead of −8449 at chi = 1.25, Ji = 4.72). Smooth walls are unaffected (Ji = nue/nu).

1 changes the residual; 2 and 3 only change the Jacobian.

Results

RAE2822, SA-Edwards (turb_SA_EDW_RAE2822.cfg, run to the config's CONV_RESIDUAL_MINVAL= -8), current develop before and after:

before after
iterations to rms[Rho] = -8 234 205
rms[nu] at that point -3.71 -10.29
CL 0.718487 0.724650
CD 0.012992 0.013234

Before, the SA equation is barely converged when the run stops; with the corrected Jacobian it converges with the flow.

rough_flatplate_incomp.cfg (rough SA) converges in the same 3242 iterations with the same CD before and after, so fix 3 is neutral there.

Regression tests

Updated, values computed locally with 2 ranks (parallel) and serially; with develop the same setup reproduces all stored values exactly:

  • turbmod_sa_edw_rae2822, turbmod_sa_comp_edw_rae2822 (parallel): fixes 1 and 2.
  • inc_flatplate_pb (serial and parallel): fix 3.

turbmod_sa_bsl_rae2822 and turbmod_sa_neg_rae2822 are unchanged.

Related Work

The EDDES vortex-tilting trace in CTurbSAVariable.cpp has a similar issue (only the diagonal of the strain tensor in tr(S²)); #2150 already fixes it, so it is not touched here.

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant