fix error in derivative term(dyp_dup) of spalding wall function#2543
Merged
pcarruscag merged 1 commit intosu2code:developfrom Aug 4, 2025
Merged
fix error in derivative term(dyp_dup) of spalding wall function#2543pcarruscag merged 1 commit intosu2code:developfrom
pcarruscag merged 1 commit intosu2code:developfrom
Conversation
bigfooted
approved these changes
Jul 31, 2025
Contributor
bigfooted
left a comment
There was a problem hiding this comment.
Thanks for going through the derivations!
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
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.
pre-commit run --allto format old commits.