Skip to content

Conversation

@dunapkt
Copy link
Contributor

@dunapkt dunapkt commented Jul 31, 2025

Proposed Changes

Fix the derivative term 'dyp_dup' in 'CIncNSSolver::SetTau_Wall_WF()'.

In the previous PR (#2541), I reviewed the derivatives but I missed this issue- the kappa was absent in two terms.
According to Nichols & Nelson (2004), the incompressible Spalding wall function is:

Y_Plus = U_Plus + exp(kUp) * exp(-kappa * B) - (exp(-kappa * B)* (1.0 + kUp + 0.5 * kUp * kUp + kUp * kUp * kUp / 6.0))

So its derivative should be:

dyp_dup = 1.0 + kappa * exp(-kappa * B) * (exp(kUp) - 1.0 - kUp - 0.5 * kUp * kUp)

instead of the current:

dyp_dup = 1.0 + exp(-kappa * B) * (kappa * exp(kUp) - kappa - kUp - 0.5 * kUp * kUp)

Please double-check in case I've missed anything.

Related Work

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • 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.

Copy link
Contributor

@bigfooted bigfooted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for going through the derivations!

@pcarruscag pcarruscag merged commit 8f0e9b9 into su2code:develop Aug 4, 2025
37 of 38 checks passed
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.

3 participants