|
[Sponsors] |
March 10, 2010, 11:41 |
OpenFoam gravity bug?
|
#1 |
Member
Stefano
Join Date: Jul 2009
Posts: 36
Rep Power: 17 |
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 |
|
March 10, 2010, 14:19 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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 |
|
March 11, 2010, 04:33 |
|
#3 |
Member
Stefano
Join Date: Jul 2009
Posts: 36
Rep Power: 17 |
Hi man!
Problem solved! Thank you very much for your help. Regards |
|
June 20, 2010, 07:14 |
Need help in OpenFoam
|
#4 |
New Member
Malek
Join Date: May 2010
Posts: 4
Rep Power: 16 |
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 |
|
June 20, 2010, 07:33 |
|
#5 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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 |
|
June 20, 2010, 08:14 |
Need help in OpenFoam
|
#6 |
New Member
Malek
Join Date: May 2010
Posts: 4
Rep Power: 16 |
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 |
|
June 20, 2010, 16:23 |
|
#7 | |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Quote:
__________________
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. |
||
June 21, 2010, 05:10 |
need help in OpenFoam
|
#8 |
New Member
Malek
Join Date: May 2010
Posts: 4
Rep Power: 16 |
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 |
|
|
|
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 |