interFoamlosing 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 
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.6ext. This is terribly important, since they use two different definitions of the pressure. Kind regards, Niels 
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; } } 
i can send BC for U and Alpha1 too, if it theses can help!

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

tnx kent, i already put it "wall" .

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 
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 
Hi
It seems that your boundary conditions mostly makes sense, however, is it deliberate that you have a nonzero 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 
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 " bouyantPressurevalueuniform 0 " on cylinder? my mean is: what will be the pressure at final?! sorry for my questions. Regards Amin 
Hi Foamers
I found something else: noslip >increasing fluid's level when i use noslip 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? 
no body can help
I'm waiting Foamers 
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. 
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. nufluid=0.00666667 rhofluid=150 >Re=150 nuair=1.48e02 rhoair=1 Regards 
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 timesteps of run log? Regards 
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.26623e21 Max(alpha1) = 1.00001 MULES: Solving for alpha1 Liquid phase volume fraction = 0.550726 Min(alpha1) = 7.57881e109 Max(alpha1) = 1.00001 DICPCG: Solving for p, Initial residual = 6.11147e05, Final residual = 2.01459e06, No Iterations 1 DICPCG: Solving for p, Initial residual = 8.06157e06, Final residual = 3.93617e07, No Iterations 5 DICPCG: Solving for p, Initial residual = 6.26022e06, Final residual = 9.38293e08, No Iterations 15 time step continuity errors : sum local = 1.29399e08, global = 6.4686e10, cumulative = 1.0709e08 ExecutionTime = 30.08 s ClockTime = 31 s Courant Number mean: 0.0155618 max: 0.29406 deltaT = 0.00533165 Time = 442.457 Regards 
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. 
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 
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. 
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 20:47. 