Howto importing fluent mesh with internal walls

From OpenFOAMWiki
Revision as of 14:03, 28 January 2006 by Grisu (Talk | contribs)

OpenFOAM does not know about internal walls, so if you have a doublesided wall (with cells on both sides) you have to work on the mesh before using fluentMeshToFoam:

1) Change all the internal walls to type "internal" (it's just a marker to find the relevant cellset in OpenFoam). Take care that you don't combine internal and external walls in the same boundary.

2) Save the mesh in Gambit with type "Fluent 5/6" as .msh.

3) Use fluentMeshToFoam:

    fluentMeshToFoam <root> <caseName> <meshFile>

where <meshFile> is the name of the .msh file, including the full or relative path.

4) Add for the internal wall a pair of empty patches (with zero length) in the <constant><polyMesh> section of your case:

    wall_A
    {
        type            wall;
        physicalType    <if required>;
        startFace       ;
        nFaces          0;
    }
    
    wall_B
    {
        type            wall;
        physicalType    <if required>;
        startFace       ;
        nFaces          0;
    }
    

You also need to increase the boundary count at the beginning of the data section accordingly.

5) Apply the splitMesh command:

    splitMesh <root> <caseName> <name_of_internal> <boundary_name_A> <boundary_name_B>

where <name_of_internal> is the name you chose in Gambit for your internal wall, <boundary_name_A> and <boundary_name_B> are the names you added to the boundary file before.

6) Do a checkMesh:

    checkMesh <root> <caseName>

You will end up the mesh check resulting in a lot of

     checkCoords : points xxxxx and xxxxx with coordinates:(x y z) and (x1 y1 z1) ar
     are relatively close to each other. This might be corret in case of e.g. baffles.

(That's what you asked for, isn't it?)

After that you can go on setting your boundaries using FoamX or command line interface and do your simulation.