CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   obstacle in a linear channel (

Stephy October 26, 2011 00:34

obstacle in a linear channel

I am kind of new with OF (I'm using OpenFOAM 2.0) and Gambit and I am trying to model the flow around an obstacle partially submerged in a channel (3D mesh).

I did my mesh with Gambit, saved as .msh without selecting the 2D(X-Y) option, and it's ready to import in gambit using fluentMeshToFoam (I know it work, it tried with the dam tutorial, checkMesh was okay). However I am not sure I correctly defined my boundary conditions under Gambit (I used Flent5/6 solver option), here is my mesh details:

it's basically two superimposed cubes separated by an "interface" and with a closed obstacle in the middle.

one lower inlet for water defined as velocity inlet with Gambit,
one upper inlet for air defined as pressure inlet with Gambit,
one lower outlet for water defined as pressure outlet with Gambit,
one upper outlet for air defined as pressure outlet with Gambit,
4 side walls defined as walls,
one obstacle defined with walls,
one top and one bottom floor defined as walls.
one interface defined as interface.

I want to visualize the free surface flow around the obstacle and maybe compute de pressure applied on the walls of the obstacle.

How can I do next (should I copy that into an existing tutorial ?what solver should I use ? interfoam ?) to setup my boundary conditions and run the computation ?

Sorry if this is a very basic question...

thank you very much !

Stephy October 26, 2011 00:52

Here is my "boudary" file that would appear in Polymesh:

version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

type patch;
nFaces 342;
startFace 314511;
type patch;
nFaces 336;
startFace 314853;
type patch;
nFaces 340;
startFace 315189;
type patch;
nFaces 336;
startFace 315529;
type wall;
nFaces 3834;
startFace 315865;
type wall;
nFaces 1960;
startFace 319699;
type wall;
nFaces 11794;
startFace 321659;

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

kmooney November 1, 2011 12:48

If you're trying to use the eulerian VOF interface methods that interFoam uses you would not want to have an interface patch defined. The interface location and gas liquid initial conditions would have to be set via the color function (alpha1 or gamma) field. I recommend taking a look at the interFoam's damBreak tutorial to see how that is set up. You might be best off using funkySetFields to initialize the indicator field if it's not extremely simple.

Another option is the interTrackFoam approach which does use a patch as the interface location. This is a lot more difficult to set up as it involves finiteArea configuration and some particular co-incident master/shadow patch meshes (if using two-phase) to define the interface. The bubbleInterTrackFoam tutorial has an example of this type of two-phase interface tracking method setup.

Stephy November 1, 2011 17:57

thank you kmooney !

Actually I do not really know what I am trying to use or what I should use... I only want to have my channel flow going around the obstacle and do that the simplest way possible. I looked at the Dambreak tutorial and modified it (the laminar version of it) to my configuration, which is, 3D.

Any suggestion would be appreciated, I am still trying to figure out how to fill in the "U", "p_rgh", and "alpha1" files, I'm using OF 2.0. The only thing I managed to do is to import my mesh and look at it with paraview.

What I want is to vizualise the water height in a channel with a constant flow, around a semi-submerged obstacle. This looks very simple, but even that, I cannot do it...

Should I change my mesh/boundary conditions ?

kmooney November 2, 2011 10:55

If you're just starting out you might want to take a look at the tutorials in the Users Guide. They will show you some standard setups for boundary conditions etc. Also, there is a 3D damBreak tutorial in the interDyMFoam tutorial folder for reference.

Stephy November 2, 2011 11:42

I actually did, I looked at everything to get any piece of information, but I found nothing for a free surface flow through inlet and outlet...

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