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, cyclic BC and gravity problem (https://www.cfd-online.com/Forums/openfoam-solving/167274-interfoam-cyclic-bc-gravity-problem.html)

mhiel February 26, 2016 10:14

interFoam, cyclic BC and gravity problem
 
2 Attachment(s)
Hi everyone,

I'm trying to simulate turbulent water flow through a pipe (the pipe is half-filled with water, the upper half is air) using interFoam and cyclic boundary conditions with the goal to examine the velocity profile when the flow is fully developed.

The g file is set to:

value ( 0.01 -9.81 0)

to simulate a slight inclination of the pipe (about 1 per mille) which induces a constant potential on the water.
In ParaView I expected to see an acceleration of the water (increasing U) until the flow reaches developed state.
However the results are quite irritating as the U values in the water region are constantly fluctuating on low magnitudes (as can be seen in the attached image) and never reach fixed values. Moreover the velocities are far too slow for the water phase and there is no acceleration of the water phase as anticipated.

I assume I did something wrong with the cyclic boundary conditions or other settings but I'm new to OF and would appreciate any help/ideas.

Here's a bit more information:

my U file:

Code:

internalField  uniform ( 0 0 0 );

boundaryField
{
    inlet
    {
        type            cyclic;
    }
    walls
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    outlet
    {
        type            cyclic;
    }
}

p_rgh:

Code:

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            cyclic;
    }
    outlet
    {
        type            cyclic;
    }
    walls
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }
}

g:
Code:


value          ( 0.01 -9.81 0 );

I attached the whole case if you'd like to run it yourself.
Note that in the case the orientation of the pipe axes differs from what I've described above (which i did to avoid confusion). Thus in the case g reads: ( 0 0.01 -9.81 )

mhiel

mhiel February 29, 2016 08:17

1 Attachment(s)
I have already searched the forum for possible solutions.
I found this thread

http://www.cfd-online.com/Forums/ope...ion-issue.html

which discusses a problem with cyclic BC related to g.
There it is suggested to change the code of the interFoam solver, but unfortunately this didn't help in my case.

Edit: I also tested the case with a real inclination of the pipe and g set to:

Code:

value          ( 0 0 -9.81 )
The results are pretty much the same. I'd be glad if anybody could provide some advice on this problem.

Thank you in advance and kind regards,
mhiel

albet June 18, 2017 07:14

Hello Foamers,

Does anybody have any solution for this problem?
I tried cyclic boundary condition with interFoam but it doesn't work as mhiel mentioned.
there is a kind of wave moving in the flow.
I am thinking about a long pipe to pass the entrance length for fully developed Turbulent flow, but it doesn't sound reasonable.

I hope somebody can help,
regards,
Amir

piu58 June 18, 2017 10:24

It is physical nonsense to have a cyclic b.c. AND to expect an accellearation. Cyclic means the inlet is equal the outlet which at best simulates a piece of the pipe where the flow is quasi static.
Even in this case one may expect a velocity which fits to the problem. Probably you have to set this velocity as starting condition.

I would experiment with other boundary conditions. If you want to see the full developed flow it may be easier making the pipe longer.

randolph July 1, 2019 17:10

Here is how I get around this problem.

Centrally what you need is a hybrid between "variableHeightFlowRateInletVelocity" and "mapped" boundary condition.

You want to use the "variableHeightFlowRateInletVelocity" to scale the velocity BC to keep the right flowrate, while the the velocity profile that scaled by the "variableHeightFlowRateInletVelocity" should sample from some distance downstream (take a look at the "mapped" BC).

And run the model after a long time, the depth and velocity should adjust themselves to the equilibrium condition.

tias February 9, 2023 10:12

@randolph - Having tried various approaches, your suggestion seems promising. Do you have an example 0/ and boundary file setup? Thanks


All times are GMT -4. The time now is 05:22.