CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Increasing level of water two-Phase Channel Flow (http://www.cfd-online.com/Forums/openfoam-solving/114246-increasing-level-water-two-phase-channel-flow.html)

nore5 March 7, 2013 11:44

Increasing level of water two-Phase Channel Flow
 
2 Attachment(s)
Hi!

I am trying to simulate a two phase channel flow using interFoam. I have tried two settings. One is exactly the same as LTSinterFoam and the other one is built trying to follow the guidelines read in this forum.

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

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

Unfortunately with time, water tends to fill the channel ( maybe around 2000 sec).

It s only a 2D and laminar model where I am trying to set the right BCs to apply.

Please is it normal to have level of water increasing with time? For me it should not. Is there anyway to prevent it?

Thanks in advance for your answers

vonboett March 11, 2013 05:11

Hi,
I am not familiar with the massFlow function.

I tried out a lot of BC settings, too, and I work with
outletWater
{
type buoyantPressure;// interFoam/channel flow tutorial
value uniform 0;
}
for p_rgh.

If you apply this, your water level should stay at the same height.

nore5 March 11, 2013 10:34

Thank you for you answer but the change I have done upon your advice did not change much to the patterns of my simulation. The whole water level increases in the domain after, say 4500 s as in my previous simulations, then it reaches the ceiling, bumps and gets back to the initial state. Do you see any eplanation please?

Were you able to run simulations for a long tinme and have a stable level water? How long have you been running your case by the way?

vonboett March 11, 2013 17:55

I see. my time horizont lies within seconds and i use 10-8 tolerance in the different solver settings. I guess you should increase your grid resolution at least at the water level location, use a small courant number and introduce nOuterCorrectors 3 in the PIMPLE settings to minimize accumulation of round off errors. By the way, what is your air viscosity?

Best albrecht

nore5 March 12, 2013 06:27

Thank you for your answer.

I will apply your suggestions and forward to you.

Air viscosity (kinematic) is set to 1.48e-5 m**2 s*(-1). Should I reduce too? This won t be really realistic, even if the results turn to be better. I won t be sticking to the physics no?

nore5 March 13, 2013 11:39

No changes...
 
Sorry for the delay.

I tried your last suggestions by increasing the free surface water mesh resolution, reducing courant number and introducing nouterCorrectors. Same results as before unfortunately.

I guess I will reduce the viscosity of air but does not seem physical to me. It s like a trick to make things work isn t it?

And I still don t understand why the level of water increases indee. Some said it was because of the reflective BC on alpha, is it so?

Thanks again.

vonboett March 18, 2013 05:27

Over the weekend I have tried your case, too, with finer mesh and my settings and I meet the same situation. Your air viscosity is fine, reducing it will even challenge the solver more, especially if you want to apply turbulence. I will look at the case again later today and will let you know if I can get any further. By the way, the waterChannel tutorial is at interFoam/ras/ in the OpenFOAm-2.1.x distribution.

nore5 March 18, 2013 11:28

Thanks again for your reply.

After your last answer, I tried many other things without success. The last idea that came to my mind is to run the case with OpenFoam 1.7.1 for example as I have seen in one of your posts that you used to run such a case without any increase of water level. Can you confirm please that I did not misunderstand ?

Thanks a lot for looking into this case.

Best,

Nore

vonboett March 19, 2013 04:52

My Surface is stable with the atmosphere settings for the outlet (self stabilizing) and tried aswell the two-dimensional case of Mathias Ehrenwith who faces the same problem simulating a wake http://people.fh-landshut.de/~mehrenwi/kulisch_case_documentation.pdf
and results look promising:

U:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
//last modification to fit WigleyHull
inlet
{
type fixedValue;
value uniform (2 0 0);
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
}

atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);

}

box_model
{
type fixedValue;
value uniform (0 0 0);
}

outlet
{
/*type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;*/
type pressureInletOutletVelocity;
value uniform (0 0 0);
//This might be problematic cf. cfdonline decreqse of water level in the outlet
}

front
{
type empty;
}
back
{
type empty;
}


}

p_rgh:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type buoyantPressure;
value uniform 0;
}
outlet
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
/*type buoyantPressure;
value uniform 0;//type zeroGradient;*/
}
atmosphere
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}

lowerWall
{
type buoyantPressure;
value uniform 0;
}

box_model
{
type buoyantPressure;
value uniform 0;
}

front
{
type empty;
}

back
{
type empty;
}
}

However, the buoyantPressure I use normally for p_rgh together with inletOutlet for U at the outlet was filling up the domain.

nore5 March 19, 2013 06:22

Thank you very much. I am now trying these new settings.

However do you have an explanation of why these BCs work better than the other ones?

I also noticed that you changed the internal field from uniform (1 0 0) to uniform (0 0 0). Why did you do so please?

I will post again once the simulations are completed and comment on the results.

But please, could you share your guesses why it work better?

Thanks in advance.

nore5 March 19, 2013 07:10

New settings results (water level decreases !?)
 
1 Attachment(s)
After trying your new settings, my level of water just decreases suddenlyt at the outlet (after 20 s), did you keep alpha1 set to weroGradient at the outlet please?

I will try the same BC for the atmosphere at the outlet, but this time with having the inlet and outlet patch split to inletAir and inletWater... So that I can fully apply atmosphere BC to alpha too.

Please, let me know if you did an other modification in your settings that made your water level stable.

Thanks again

vonboett March 19, 2013 13:31

I have for alpha as for atmosphere:

type inletOutlet;
inletValue uniform 0;
value uniform 0;

and my surface finds the same line as in your simulation, only quicker maybe due to solver settings. I set the internal velocity field to zero because I was not sure if an initial velocity field conflicts with type fixedValue; value uniform (0 0 0); at the walls. I only know that the atmospheric outlet settings are self stabilizing and that it is possible to even have inflow at the outlet if the pressure demands it. I have little experience with long time series, my longest simulation is about 16 s with 16 million cells, but I appreciate your findings to get a ordered summary/overview about boundary conditions.

nore5 March 19, 2013 14:26

Hi,

Thanks for your answer.

In fact, if you set type inletOutlet;
inletValue uniform 0;
value uniform 0;
for your alpha outlet BC then have a look at your outlet alpha1 the level of water in ill defined on the boundary, it justs gives the value 0 to the outlet face. zeroGradient should be used at the outlet in my opinion to make sure there is a continuity of alpha1.

Could you post your openfoam files zipped please if you don t mind. I just want to try to see what do you mean by stablized free surface.

I will let you know if I end up finding a solution or if I have any improvements.

Thanks again for everything.

vonboett March 20, 2013 06:48

let me quote Fransje Sept. 27 2010 in Thread "Questions about the inletOutlet and outletInlet boundary conditions":

Similarly, if, for some reason, we were to specify:
Code:
k: outlet { type outletInlet; outletValue uniform 5; value 0; }
we would have that
  • If the velocity vector at the outlet was to point out of the domain, then the boundary condition would be of the Dirichlet type, with value 5.
  • If the velocity vector at the outlet was to point into the domain, then the outflow conditions would switch from fixedValue to zeroGradient, and become a Neumann boundary condition.
For InletOutlet it is vice-versa.
so in my specification for alpha1 if I did't set something wrong, it is zero gradient if we have outflow, but if for some reason inflow should appear here because the pressure demands it, we would have air flowing in.

vonboett March 20, 2013 07:01

1 Attachment(s)
...the case folder

nore5 March 22, 2013 12:28

Boundary conditions at inlet and outlet
 
2 Attachment(s)
Hi,

Thank you for your case files.

I had a look at it and realized you were applying wrong boudary conditions at the inlet and outlet. If you look at at the inlet face, you can see you have water on the whole face. This implies that you should modify your alpha1 boundary condition. Same with the outlet face,water in not defined on this patch.

Please find encolsed my cases where water level increase (current) and decreases (current_outlet) with the right boundary conditions but wrong level of water unfortunately.

Let me know your findings please. It is very interesting to see what others are doing.

Thank you again.

vonboett March 25, 2013 05:24

...well of course, I used your attatched case Current.zip. Feel free to insert your air inlet and outlet boundaries. It should not affect the principle of water inlet and water outlet bc.


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