-
Notifications
You must be signed in to change notification settings - Fork 918
Fix wall distance computation for points on viscous wall #2484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This makes sense but I think there is an easier way, change to skip points on viscous walls (essentially what you are doing here). |
I also was thinking about it but how do I know if the iPoint is on a viscous wall? |
|
There is something in |
Found it, geometry->nodes->GetViscousBoundary(iPoint) I guess. Something like this? Isn't the proposed fix more general though? As the wall distance on the points on a viscous domain is exactly zero, so we don't have this kind of problems if it is ever needed anywhere else in the same way. Maybe I can do it within the CPhysicalGeometry function, something like In either cases I think it is a larger overhead than just cycling on all the viscous points and setting it to 0 after the first uniform initialization. |
|
No I don't think it is because there is nothing wrong with the wall distance computation, the issue is in this normal neighbor distance function that is using an indirect way of detecting boundaries. Fix it there please. |
Sure, no problem! |
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
|
Hi, Would this guarantee zero wall distance at the wall? Or in other words, would this cover all possible cases of geomtries? |
|
The issue is not computing the wall distance at the wall (which is numerically 0); it's computing the distance to the nearest internal node. |
|
Agreed. Thank you, and sorry for the trouble |
|
The small but nonzero value was interfering with the new way of computing the distance to the nearest node. |
Proposed Changes
This PR fixes the problems encountered in #2474, where for some points on a viscous wall the wall distance was higher than EPS, thus the normal distance introduced in #2392 will be wrong for any point connected to the incriminated ones. This will cause a large Omega at the wall when the SST model is considered.
Develop:

Current branch:

Here I initialize the wall distance on all the points belonging to a viscous boundary to 0, thus it won't be overwritten by the wall distance computed by the ADT tree.
Related Work
#2474 #2392
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.