CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

interFoam-losing fluid in free surface simulating

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 11, 2012, 10:19
Default interFoam-losing fluid in free surface simulating
  #1
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
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
amin66 is offline   Reply With Quote

Old   December 11, 2012, 10:25
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   December 11, 2012, 11:03
Default
  #3
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
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 is offline   Reply With Quote

Old   December 11, 2012, 11:06
Default
  #4
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
i can send BC for U and Alpha1 too, if it theses can help!
amin66 is offline   Reply With Quote

Old   December 11, 2012, 18:36
Default
  #5
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 201
Rep Power: 11
kwardle is on a distinguished road
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.
kwardle is offline   Reply With Quote

Old   December 12, 2012, 04:16
Default
  #6
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
tnx kent, i already put it "wall" .
amin66 is offline   Reply With Quote

Old   December 12, 2012, 04:59
Default
  #7
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   December 12, 2012, 05:54
Default
  #8
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
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
amin66 is offline   Reply With Quote

Old   December 12, 2012, 06:14
Default
  #9
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   December 12, 2012, 07:14
Default
  #10
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
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 is offline   Reply With Quote

Old   December 12, 2012, 11:44
Default
  #11
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
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 is offline   Reply With Quote

Old   December 14, 2012, 09:18
Default
  #12
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
no body can help
I'm waiting Foamers
amin66 is offline   Reply With Quote

Old   December 14, 2012, 10:57
Default
  #13
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 418
Rep Power: 15
santiagomarquezd will become famous soon enough
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.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
Santa Fe - Argentina
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   December 15, 2012, 13:14
Default
  #14
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
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
Attached Images
File Type: jpg Untitled.jpg (15.3 KB, 39 views)
amin66 is offline   Reply With Quote

Old   December 15, 2012, 13:41
Default
  #15
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 418
Rep Power: 15
santiagomarquezd will become famous soon enough
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
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
Santa Fe - Argentina
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   December 16, 2012, 05:00
Default
  #16
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
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
Attached Images
File Type: jpg 0.jpg (15.7 KB, 39 views)
File Type: jpg 442.jpg (12.8 KB, 35 views)
amin66 is offline   Reply With Quote

Old   December 16, 2012, 06:23
Default
  #17
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 418
Rep Power: 15
santiagomarquezd will become famous soon enough
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.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
Santa Fe - Argentina
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   December 16, 2012, 06:44
Default
  #18
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
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
amin66 is offline   Reply With Quote

Old   December 16, 2012, 06:50
Default
  #19
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 418
Rep Power: 15
santiagomarquezd will become famous soon enough
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.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
Santa Fe - Argentina
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   December 16, 2012, 15:39
Default
  #20
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
free surface model sjtusyc CFX 3 September 5, 2012 18:33
free surface modelling using VOF sci Main CFD Forum 10 August 29, 2012 07:43
buoyantPimpleFoam with free surface (like interFoam) Andreas.Herwig OpenFOAM 0 March 1, 2011 13:07
Interfoam... free surface simulation urgent lostin4ever Main CFD Forum 4 October 12, 2010 08:29
Can Flow-3D plot the free surface area in Iso-surface or colour variable? therockyy FLOW-3D 1 June 20, 2010 19:36


All times are GMT -4. The time now is 07:33.