CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   interFoam-losing fluid in free surface simulating (http://www.cfd-online.com/Forums/openfoam/110440-interfoam-losing-fluid-free-surface-simulating.html)

amin66 December 11, 2012 10:19

interFoam-losing fluid in free surface simulating
 
Hello all
why in simulating free surface flow around a body (2D), by passing time, the level of fluid decreases(lose)?
i tried a channel, just a domain without any body, and saw for this case there isn't any losing fluid phase! how ever when i try that channel with a cylinder there is decreasing in fluid level.

i'm using OpenFoam 1.6, and saw previous posts in this site but no answer for this problem

thanks all

ngj December 11, 2012 10:25

Hi Anim,

It sounds like the boundary conditions on the cylinder are wrong. Would you be so kind as to post them here (along with the other boundary conditions).

BTW: Are you using 1.6 or 1.6-ext. This is terribly important, since they use two different definitions of the pressure.

Kind regards,

Niels

amin66 December 11, 2012 11:03

Hi Niels, Thanks for comment
i think its OF 1.6 , because of this:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

and its my BC for Pressure:
boundaryField
{
down
{
type buoyantPressure;
value uniform 0;
}
cylinder
{
type buoyantPressure;
value uniform 0;
}
up
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}

outlet
{
type zeroGradient;
}

inlet
{
type buoyantPressure;
value uniform 0;
}
frontAndBackPlanes
{
type empty;
}
}

amin66 December 11, 2012 11:06

i can send BC for U and Alpha1 too, if it theses can help!

kwardle December 11, 2012 18:36

Along with BC consistency, also check that you don't have the wall boundary on your cylinder set to patch in polyMesh/boundary--it needs to be type wall.

amin66 December 12, 2012 04:16

tnx kent, i already put it "wall" .

ngj December 12, 2012 04:59

What are the boundary conditions for the velocity? If your are not loosing water without the cylinder, but loosing water with the cylinder, it appears you have a flux over the cylinder wall.

The pressure conditions seems to be correct.

/ Niels

amin66 December 12, 2012 05:54

Velocity:

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

internalField uniform (1 0 0);


boundaryField
{
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
up
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
down
{
type fixedValue;
value uniform (1 0 0);
}
outlet
{
type zeroGradient;
}

inlet
{
type fixedValue;
value uniform (1 0 0);
}

frontAndBackPlanes
{
type empty;
}
}


alpha1:

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
cylinder
{
type zeroGradient;
}
up
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
down
{
type calculated;
value uniform 1;
}
outlet
{
type zeroGradient;
}
inlet
{
type calculated;
value uniform 1;
}
frontAndBackPlanes
{
type empty;
}
}

setFields:

defaultFieldValues
(
volScalarFieldValue alpha1 0

);

regions
(
boxToCell
{
box (-15.5 -10.5 -0.506) (30.5 7 0.506);
fieldValues
(
volScalarFieldValue alpha1 1

);
}
);

Dear Niels i couldn't understand this: "it appears you have a flux over the cylinder wall."

Thanks for your attention to this problem.
Amin

ngj December 12, 2012 06:14

Hi

It seems that your boundary conditions mostly makes sense, however, is it deliberate that you have a non-zero velocity and specify the value of alpha on the bottom boundary?

If you want to have slip conditions, merely write "slip" as type.

Besides that I do not think I have much to contribute.

Kind regards,

Niels

amin66 December 12, 2012 07:14

Hi Niels
yes, bottom boundary is continued to infinity, so i use inlet for this type BC.
i tried the slip BC for down(bottom boundary) and it didn't help and i had losing in fluid again.
Dear niels, what will exactly happen, when we use " bouyantPressure---value--uniform 0 " on cylinder? my mean is: what will be the pressure at final?!

sorry for my questions.

Regards
Amin

amin66 December 12, 2012 11:44

Hi Foamers
I found something else:
no-slip ---->increasing fluid's level
when i use no-slip boundary condition for bottom boundary(down),there is increasing in level of fluid. and you know before for other condition for down, like slip or inlet condition, there is decreasing in level of fluid !!!!!!

somebody has idea?

amin66 December 14, 2012 09:18

no body can help
I'm waiting Foamers

santiagomarquezd December 14, 2012 10:57

Could you post a sketch of your domain with names of the BC's? In free surface flow the free surface sometimes lowers passing over an obstacle depending on the Froude number.

Regards.

amin66 December 15, 2012 13:14

1 Attachment(s)
Hi Santiago
that's my domain and you can see the type of BC at upper posts. my problem isn't hydraulic jump. it's about mass conservation: by passing the amount of fluid creases or decreases.
nu-fluid=0.00666667
rho-fluid=150 ----->Re=150

nu-air=1.48e-02
rho-air=1

Regards

santiagomarquezd December 15, 2012 13:41

Hi Amin,

What is the position of the free surface and the center of the cylinder? Could you post a pic of the results showing the problem and the lasts time-steps of run log?

Regards

amin66 December 16, 2012 05:00

2 Attachment(s)
Hi Santiago
it's the position of cylinder and free surface. one picture is at 0sec and another is at 442sec. As you see at 442 sec the level of free surface come down, means: we don't have mass conservation.

time step log:

MULES: Solving for alpha1
Liquid phase volume fraction = 0.550726 Min(alpha1) = -5.26623e-21 Max(alpha1) = 1.00001
MULES: Solving for alpha1
Liquid phase volume fraction = 0.550726 Min(alpha1) = -7.57881e-109 Max(alpha1) = 1.00001
DICPCG: Solving for p, Initial residual = 6.11147e-05, Final residual = 2.01459e-06, No Iterations 1
DICPCG: Solving for p, Initial residual = 8.06157e-06, Final residual = 3.93617e-07, No Iterations 5
DICPCG: Solving for p, Initial residual = 6.26022e-06, Final residual = 9.38293e-08, No Iterations 15
time step continuity errors : sum local = 1.29399e-08, global = -6.4686e-10, cumulative = -1.0709e-08
ExecutionTime = 30.08 s ClockTime = 31 s

Courant Number mean: 0.0155618 max: 0.29406
deltaT = 0.00533165
Time = 442.457

Regards

santiagomarquezd December 16, 2012 06:23

Amín, it doesn't look it is loosing mass, nevertheless the free surface solution is not so good. It is difficult to initialize a channel inlet, since the boundary condition is constant in velocity for air and water, which is not true. Each fluid has its own velocity profile. There are at least two remedies, 1) extending the domain more the left and retain the inlet BC to give the fluids enough space to develop the profiles or ) make the inlet by the left, bottom corner and put a wall at the left so that the free surface is not contaminated by the inlet effect. In this case you need enough space to leave the fluid turn from vertical direction to horizontal direction. In both cases you need a refined mesh near the free surface, I mean, 20 or 30 elements in the space between the cylinder and the free surface and the same over the surface, then you change the spacing to the top and bottom the save elements.

I would try option 1) first.

Regards.

Santiago.

amin66 December 16, 2012 06:44

Dear Santiago
unfortunately we have mass losing,maybe in this pictures it's not shown well, if time pass more(for example till 1000sec), the level of free surface comes below the cylinder! and it's not true!

I solved this problem for two inlet and two outlet(water and air apart), and also for the velocity of air been zero or velocity same as water, but there was mass losing again.!
I don't know why this situation changes with different BC, as i said before if we put no slip wall condition for down the level of free surface come up and for the other BCs it comes down!!

i will try bigger domain and tell you the result

Regards

santiagomarquezd December 16, 2012 06:50

HI, two inlets is correct, but two outlets with fixed position for the free surface is not since you don't know the exact free surface position. The outlet can be only one boundary with zeroGradient for alpha1.

Regards.

ngj December 16, 2012 15:39

Hi Amin,

Something just occurred to me. You are specifying a flow rate over the water column and you are specifying the water level at the inlet.

In order to maintain this flow condition, you need some kind of driving force, which in your case can only be a horizontal component of the gravitational vector OR a slope of the free surface. Have you checked whether the slope of the free surface and hence your loss of water is not a physical sane response; especially because with the presence of the cylinder, the flow resistance is much larger than without the cylinder.

Kind regards,

Niels


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