-
Notifications
You must be signed in to change notification settings - Fork 913
Fix damping mass outlet #2516
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
Fix damping mass outlet #2516
Conversation
pcarruscag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the incompressible solver, do we solve for gauge pressure or absolute pressure?
We solve for gauge pressure, so our target massflow implementation is the same as in Fluent: |
|
Then two equivalent incompressible cases with just a different pressure level will behave differently with this change, right? |
Do you mean the reference pressure? Yes, if you choose a different reference pressure, and add 1 Pa or 1e6 Pa to it, it will behave differently. So I could take into account p_0 as well. |
|
I checked and we never actually add a reference pressure anywhere, and the thermodynamic pressure is only used to compute the (incompressible ideal gas) density. So I think it's fine the way it is currently done. |
|
If you set up a case where you put all your pressures as absolute, and another where you put them as relative (to ambient, or to one of the inlets, or outlets) they will not behave the same with this logic. |
|
OK, thanks, I understand. I can loop over all inlets and outlets and get the P_max/P_min ratio |
|
For preconditioning we already determine the maximum velocity, you can extend that to the the min and max pressure. |
|
Is it sufficient here to subtract the minimum pressure in the domain and use that as the reference pressure, so we compare the update pressure dp to the local pressure (P-P_min_global) |
|
From the invariance perspective, yes, whether it is a good enough way of deriving a reference value, I don't know. |
pcarruscag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a test that uses this?
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Yes, the nozzle case that is failing in the regression tests. |
|
The existing nozzle case in the regression test stalls at 99.90% target mass flow rate, the new implementation goes to 99.99%. |

Proposed Changes
Only use the damping factor on the target massflow when dP is relatively large compared to P. This greatly improves the convergence rate and prevents stalling of the massflow rate.
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.