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

OpenFoam gravity bug?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2010, 11:41
Question OpenFoam gravity bug?
  #1
Member
 
Stefano
Join Date: Jul 2009
Posts: 36
Rep Power: 17
Whyman is on a distinguished road
Hi everybody!

I have a big doubt about the behaviour of OpenFoam with calculation in presence of the gravity value.

I tried to simulate a cube, partially filled with a liquid (for example water) and initially quiet: so two phases are present in the domain. I also simulated the cube as wall, so that the liquid cannot escape from the domain.

When i simulate the gravity imposition in whatever direction (in my example the direction was the X-axis and the value was 9,81), the liquid begins to move following the direction of the gravity vector.

The problem is that during the calculation, the liquid volume begins to decrease.
This is impossible because the cube is a closed wall and the liquid cannot escape. On the contrary, the result after 10 second is the attached picture.

The solver that i have used is interFoam and the model is laminar.

The boundary conditions are the following:

Velocity:

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

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

internalField uniform (0 0 0);

boundaryField
{
parete
{
type fixedValue;
value uniform (0 0 0);
}
}


// ************************************************** *********************** //


Pressure:

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

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

internalField uniform 100000;

boundaryField
{
parete
{
type zeroGradient;
}
}

// ************************************************** *********************** //



Alpha:

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

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
parete
{
type constantAlphaContactAngle;
theta0 5;
value uniform 0;
}

}

// ************************************************** *********************** //





What is the problem? Can someone help me?

Thank you

Regards
Attached Images
File Type: jpg Liquid-Volume-GravityConstant_interFoam.JPG (28.3 KB, 174 views)
Whyman is offline   Reply With Quote

Old   March 10, 2010, 14:19
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi

The problem is present, as you are using the wrong boundary condition for p. For hydrostatic pressure, the pressure gradient is not 0, so what you would like to use instead is buoyantPressure (I am not sure, if it is the correct name, however do not have access to v1.6 at the moment).

Search the forum, and you will find information on this particular problem.

Best regards,

Niels
ngj is offline   Reply With Quote

Old   March 11, 2010, 04:33
Default
  #3
Member
 
Stefano
Join Date: Jul 2009
Posts: 36
Rep Power: 17
Whyman is on a distinguished road
Hi man!

Problem solved!

Thank you very much for your help.



Regards
Whyman is offline   Reply With Quote

Old   June 20, 2010, 07:14
Default Need help in OpenFoam
  #4
New Member
 
Malek
Join Date: May 2010
Posts: 4
Rep Power: 16
Zeclair is on a distinguished road
Hello!
I have exactly similar problem like you for my simulation where during the calculation, the liquid volume begins to decrease.I use Interfoam- How are you resolve this problem please because actually I do my thesis in OpenFoam and i have no idea to resolve this problem.
please help me!!!
thank you
Malek
Zeclair is offline   Reply With Quote

Old   June 20, 2010, 07:33
Default
  #5
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi

Have you tried to follow the guidelines given in my post #2? If you are using 1.6(.x) I suppose it would solve your problems.

- Niels
ngj is offline   Reply With Quote

Old   June 20, 2010, 08:14
Default Need help in OpenFoam
  #6
New Member
 
Malek
Join Date: May 2010
Posts: 4
Rep Power: 16
Zeclair is on a distinguished road
Hi Niels,
Ies i use 1.6 version. I try to simulate velocity profile in open flow channel. So in my boundary condition, i have inlet , outlet, wall and atmosphere which represent the top boundary of the domain.
So I would like to know how you specify hydrostatic pressurre condition at inlet or outlet because buoyant pressure condition is only relevant for a wall boundary condition.
Malek
Zeclair is offline   Reply With Quote

Old   June 20, 2010, 16:23
Default
  #7
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Zeclair View Post
Hi Niels,
Ies i use 1.6 version. I try to simulate velocity profile in open flow channel. So in my boundary condition, i have inlet , outlet, wall and atmosphere which represent the top boundary of the domain.
So I would like to know how you specify hydrostatic pressurre condition at inlet or outlet because buoyant pressure condition is only relevant for a wall boundary condition.
Malek
What does "hydrostatic pressure at the inlet" mean? How do you specify the BC's (or what are the actual physical conditions you want to reproduce)?
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   June 21, 2010, 05:10
Default need help in OpenFoam
  #8
New Member
 
Malek
Join Date: May 2010
Posts: 4
Rep Power: 16
Zeclair is on a distinguished road
Hi Alberto,
At inlet I have just fixed value of velocity and other variable i put as zero gradient. But in outlet, i fixed my hydrostatic pressure to a fixed value.
Malek
Zeclair is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug Postprocessing wall profiles in openfoam deji OpenFOAM 0 November 26, 2009 13:05
Serious bug in LES interface fs82 OpenFOAM Bugs 21 November 16, 2009 09:15
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56
Cumulative patch for OpenFOAM 141 January 3rd 2007 msrinath80 OpenFOAM Bugs 6 January 4, 2008 11:12
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 14:50


All times are GMT -4. The time now is 00:11.