CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   InterFoam U field (https://www.cfd-online.com/Forums/openfoam-solving/233244-interfoam-u-field.html)

Federico_ January 19, 2021 04:51

InterFoam U field
 
Hello everyone, I have a doubt about the U field in an InterFoam simulation because I don't understand, even if it solves NS equations, in each time step it never solves the U field but it writes a U file in the timestep directory thanks to the fact I put U in 0/. I hope I have been clear
Thank you all

simrego January 19, 2021 08:14

Hi!

Read about PISO or PIMPLE pressure-velocity coupling!
If you don't use the momentum predictor you won't see any "solving for U" since you correct the velocity field based on the momentum equation and pressure equation/field. And this is done explicitly, so you won't solve the momentum equation, only "assemble" it.

BUT! It could speed up your calculation if you are using the momentum predictor so before you step into the pressure solving stage, you can solve the momentum equation and it should give you a "better guess" for the velocity field but in my experience sometimes it leads to crash instead of improved convergence...

Add this line to your PIMPLE dict in the fvSolution file to turn it on and try with and without momentum predictor so you will see if it helps or not in your case:

momentumPredictor yes;

(Of course if it is already present probably with the "no" value, then override it's value instead of add this line again!)


EDIT:
This U calculation is preformed in line 58:
https://openfoam.com/documentation/g...8H_source.html

Federico_ January 19, 2021 09:11

Thank you very much, I understood! Just for recap: if I put momentumPredictor yes I solve the momentum equation and then the continuity one, instead if I put no I solve the equation of p based on the continuity equation (know U from the previous time step) and then I solve explicity U finding the new value. Am I right?

simrego January 19, 2021 09:34

Mostly yes.
You can find some material here about this topic if you are interested:
https://openfoamwiki.net/index.php/IcoFoam
https://openfoamwiki.net/index.php/O...hm_in_OpenFOAM
https://openfoamwiki.net/index.php/T...hm_in_OpenFOAM
But on openfoamwiki you can find more about the implementations in OF. From these 3 examples if you check them you will see many similarities between the different pressure-velocity coupling methods and their implementations.

Federico_ January 19, 2021 10:14

Thank you very much, I'll read it for sure!

anubasu November 3, 2023 22:36

Can someone please say why interFoam crashes while I use momentum predictor to yes instead of no?

Thanks


All times are GMT -4. The time now is 07:02.