CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   compressibleInterFoam case – a flat wall air cavity filling up with water (https://www.cfd-online.com/Forums/openfoam-solving/160157-compressibleinterfoam-case-flat-wall-air-cavity-filling-up-water.html)

Zeppo October 3, 2015 10:01

compressibleInterFoam case – a flat wall air cavity filling up with water
 
Suppose I have a solid object with a cavity inside. This cavity is open from the outside and initially filled with air (at normal conditions p_0 = 101325 Pa). Then I drop the solid into a pool of water and it starts to sink. Now I have to simulate water flowing into the cavity, mixing with air inside and compressing it. Velocity “V” of the solid going down is known. My thought is to apply pressure boundary condition on the open surface where water enters the cavity: p=p_0 + rho*g*(V*t), so this excess pressure “p” is a force to push water up.

Before I start with a real geometry I am going to do a simple test simulation (see the sketch below). Computation domain is hatched with grey. Water can penetrate into the cavity through the bottom surface (pressure is constant). Left, right and top surfaces are no-slip walls. “Empty“ boundary conditions are imposed on the front and rear surfaces.

http://i60.tinypic.com/6ixv8p.jpg

Thermophysical properties seem to be quite trivial: air (ideal gas), water (constant density).
Buoyancy force and surface tension force have been neglected by setting gravity “g” and surface tension coefficient “sigma” to zero. The flow is supposed to be laminar. The question which really bothers me is “what boundary conditions for “velocity” applied to the bottom surface should I use? OpenFoam can offer two types to choose from:
• pressureInletOutletVelocity - Combination of pressureInletVelocity and inletOutlet (Data to specify: value);
• pressureInletVelocity - When p is known at inlet, U is evaluated from the flux, normal to the patch (Data to specify: value)

5 simulations were carried out:
1) Proprietary software, isothermal,
2) Proprietary software, non- isothermal,
3) OpenFoam software, isothermal,
4) OpenFoam software, non- isothermal, pressureInletOutletVelocity,
5) OpenFoam software, non- isothermal, pressureInletVelocity.

I used compressibleInterFoam solver for OpenFoam non-isothermal case. There seems to be no isothermal version of compressibleInterFoam. I made my own version (isothermalCompressibleInterFoam) by commenting out the temperature equation line (#include "TEqn.H") in the source code of compressibleInterFoam.c and recompiling it. Was it the right way or did I miss something? Is it ever possible to have compressibleInterFoam solve non-isothermal cases? When it comes to proprietary software, choosing isothermal/non-isothermal model is explicitly done within the graphical user interface.

Temporal discretization scheme is first order accurate. Convection terms are discretized with second order accuracy in proprietary software. In OpenFoam the terms “div(rhoPhi,U)”, “div(rhoPhi,T)” are discretized with “Gauss upwind”, the second order scheme doesn’t work here - the solver blows up eventually.

Below is the picture of “water volume fraction” field at the time 0.2 seconds.

http://i61.tinypic.com/j964q9.png
http://i60.tinypic.com/8yc47l.jpg

There are considerable difference between proprietary software and OpenFoam solutions in terms of a water column height and shape. In all cases a water column is not symmetrical with respect to the vertical central line. This asymmetry is more notable in a proprietary software case. Solutions 4) and 5) are quite similar, but not totally identical, so the question regarding the boundary conditions type on the bottom surface does remain open.

P.S. If anyone knows a source of any multiphase (VOF) validation cases please let me know.

Here is the OpenFoam case folder: http://s000.tinyupload.com/?file_id=...72392564762818


All times are GMT -4. The time now is 17:42.