OpenFoam gravity bug?
1 Attachment(s)
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 |
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 |
Hi man!
Problem solved! Thank you very much for your help. :) Regards |
Need help in OpenFoam
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 |
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 |
Need help in OpenFoam
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 |
Quote:
|
need help in OpenFoam
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 |
All times are GMT -4. The time now is 05:47. |