|
[Sponsors] |
Simulation of a no-flow steady-state scenario with interFoam |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Leonard Grabow
Join Date: Feb 2025
Posts: 3
Rep Power: 2 ![]() |
Hello,
my goal is to simulate the stationary state where a cavity is partly filled with water and on top with air. From the physical point of view, it’s trivial: the velocity is zero everywhere and the pressure is hydrostatic, nothing will change over time. I implemented this with interFoam, however, no matter what I try it never reaches the expected stationary state mentioned before. The boundary conditions are intended to be as friendly as possible, so the velocity is set to noSlip and the pressure is set to zeroGradient at all sides of the domain and a reference cell of defined pressure is added inside the domain. The initial guess for the velocity and the pressure is zero everywhere, so for the velocity the initial guess is already the physical solution. Hence, ideally, the velocity stays the same over simulation time. Unfortunately, the velocity is oscillating and, depending on the configuration, diverging over time . I attached a picture of the maximum velocity over time for the test case where you can see that. Please find attached the test case, if you are interested in reproducing it. My question is, is this type of simulation scenario generally problematic for interFoam or am I missing an important link in my model set-up? I tried many things, from different boundary conditions to solver configurations, mesh convergence test, etc. Even switching off the transport of alpha did not work. In addition, I did a similar set-up with one phase in icoFoam (I had to start with some artificial non-zero velocity field though) and there a convergence behaviour was seen. But if the pressure is defined via a fixedValue at the boundary instead of a reference cell, even icoFoam does not converge. Any suggestions or comments are highly appreciated! Best wishes, Leonard |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Dec 2021
Posts: 275
Rep Power: 6 ![]() |
Hey,
Initializing the pressure field according to the hydrostatic pressure usually helps with weird velocities at the beginning, but spurious velocities at the interface is a known phenomenon in interFoam and VoF solvers. Have you visually inspected the alpha field? Where does the max velocity occur? Maybe switch to isoInterFoam since it does not rely on artificial compression, or add a turbulence model to dampen the oscillations, with the following fvOptions object: https://www.openfoam.com/documentati...urbulence.html Not sure if it is applicable to your case, but I found it helps in achieving a better interface. You can also try to decrease cAlpha to 0.5 or even 0 in fvSolution (the interface won't be as sharp but it might help the solver). |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Leonard Grabow
Join Date: Feb 2025
Posts: 3
Rep Power: 2 ![]() |
Hey Alczem,
thanks for these suggestions. Setting the initial pressure to the final hydrostatic solution for the pressure did not change much. Indeed, the velocity deviations are strongest at the interface. If I switch off the transport of alpha in the interFoam solver, so to guarantee no fluctuations of fluid properties, I still get an oscillating behaviour for the velocity around 10^-11 which I barely can lower no matter how I adjust the solver settings. Interestingly, the order of error increases for finer meshes. If a 4-times finer mesh is used, the velocity fluctuates around 10^-9. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Dec 2021
Posts: 275
Rep Power: 6 ![]() |
Hey,
When you say 10^-11, you mean your velocity oscillates below 10^-11? Or the residuals are down to 10^-11? Because in any case you can't expect to get much lower values ![]() Again, the spurious velocities are likely to be reoccuring, so you have to decide if they affect the solution too much to be neglected. A finer mesh is able to capture more accurately the interface, and the currents nearby, so it does not surprise me that you get more unstable values. A coarser mesh smears the fields and adds numerical dissipation (hence more stability). |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Leonard Grabow
Join Date: Feb 2025
Posts: 3
Rep Power: 2 ![]() |
Hey Alczem,
I guess I must accept this precision for a 'perfect' case then ![]() When I let alpha to be transported again, modification of cAlpha in interFoam or switching completely to interIsoFoam did not change much in the magnitude of the velocity error. It seems that it's too much to expect a sharp scalar front to remain as sharp over time, even when it is not transported initially. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: Dec 2021
Posts: 275
Rep Power: 6 ![]() |
Hey,
That's my take on it, take it with a grain of salt ![]() |
|
![]() |
![]() |
![]() |
Tags |
converge, interfoam, steady state |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
From steady state to transient simulation | Mechand | FLUENT | 0 | December 24, 2020 12:17 |
Transient and Steady state simulation results do not match | shahin1 | FLUENT | 0 | July 23, 2020 07:24 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 05:21 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 08:56 |
Monitor point values in a steady state simulation | Kushagra | CFX | 2 | July 13, 2008 20:03 |