Adding temperature limits for incompressible solver#2569
Adding temperature limits for incompressible solver#2569Cristopher-Morales merged 27 commits intodevelopfrom
Conversation
pcarruscag
left a comment
There was a problem hiding this comment.
Have you considered turning on the automatic underrelaxation for the incompressible solver?
void CIncEulerSolver::CompleteImplicitIteration(CGeometry *geometry, CSolver**, CConfig *config) {
CompleteImplicitIteration_impl<false>(geometry, config);
}
I think we are not using it because the pressure and temperature can be negative in incompressible, but if there are physical limits it's easier to do.
I'm not saying "do this instead", maybe these custom limits can complement the auto relaxation (which feeds the CFL adaptation too).
Hi! I have tried the automatic underrelaxation for the incompressible solver and it helps. However, there might be some issues for future developments if the enthalpy for reacting flows (which range from positive to negative values) can be solved using the preconditioning. I had to add a minimum localUnderRelaxation = 0.001 to allow the enthalpy to change from positive to negative. This is because this quantity: allowableRatio / ratio can be quite small, and if I keep the threshold used by Euler and Nemo Solvers:
The enthalpy does not change from positive to negative. Please let me know what you think about this. There might be a better criterium that can help with this issue. Thanks in advance!!! |
|
Hi, I have enabled the automatic under-relaxation for the incompressible solver, for now It is applied to the energy equation and it is skipped when the energy equation is off. |
pcarruscag
left a comment
There was a problem hiding this comment.
Nice. It is fine to reuse the option, are the limits still playing a big role after adding the relaxation?
|
Hi Cristopher, good to add this in! I would not add the underrelaxation now if it is still unclear how to make it work in a robust way. But good to also keep that on the to-do list (give it to a student project maybe). |
Hi Nijso, |
|
Ok thanks, so with underrelaxation for the energy, is convergence improving as well for cases that were not problematic? |
|
We don't know how many people out there are using the incompressible solver for heat transfer, so I would advocate for default values that keep the default behavior. |
Thanks for the comment. Yes, the most of the improvements come from the limits. I am going to disable the ComputeUnderRelaxationFactor in this pull request and let its implementation for a future project. |
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
|
Hi Cristopher, can you add this testcase as well? |
Hi Nijso, Yes, I will add this test case as soon as possible. Thanks in advance!!! |




Proposed Changes
The aim of this pull request is to add temperature limits to prevent unphysical values for incompressible flows. Controlling temperature values is especially important for multicomponent and reacting flows, where low and high values of temperature can lead to unbounded density values, which might result in unphysical species mass fractions values (outside range 0.0-1.0).
Test H2-Air mixture adapted from test case rectangle passive transport validation:
top: develop
bottom: using temperature limits
Species mass fraction H2:
Density:
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.