|
[Sponsors] |
January 19, 2021, 05:51 |
InterFoam U field
|
#1 |
New Member
Federico
Join Date: Jan 2021
Posts: 13
Rep Power: 5 |
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 |
|
January 19, 2021, 09:14 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 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 |
|
January 19, 2021, 10:11 |
|
#3 |
New Member
Federico
Join Date: Jan 2021
Posts: 13
Rep Power: 5 |
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?
|
|
January 19, 2021, 10:34 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
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. |
|
January 19, 2021, 11:14 |
|
#5 |
New Member
Federico
Join Date: Jan 2021
Posts: 13
Rep Power: 5 |
Thank you very much, I'll read it for sure!
|
|
November 3, 2023, 23:36 |
|
#6 |
Member
Anurag
Join Date: Feb 2023
Posts: 78
Rep Power: 3 |
Can someone please say why interFoam crashes while I use momentum predictor to yes instead of no?
Thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
problems after decomposing for running | alessio.nz | OpenFOAM | 7 | March 5, 2021 05:49 |
interFoam vs. simpleFoam channel flow comparison | DanM | OpenFOAM Running, Solving & CFD | 12 | January 31, 2020 16:26 |
[General] How to create an additional vector with {Field 4, Field 5, Field 6} | Bombacar | ParaView | 1 | August 15, 2015 19:05 |
Hello,how can i define a new field in interFoam? | shchao | OpenFOAM Programming & Development | 2 | January 7, 2013 04:02 |