CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] GmshTo Foam Warning (https://www.cfd-online.com/Forums/openfoam-meshing/161519-gmshto-foam-warning.html)

vitocorleone October 23, 2015 14:29

GmshTo Foam Warning
 
Hello Guys,

I have been using Gmsh for sometime to simulate flow past a cylinder and I keep getting this warning that I have posted below. I know that this has been posted separately in a thread and an answer was to check if all the external faces of the boundary have been defined or not. I have already checked that and ensured that all the boundary faces have been defined.

I also tried visualizing this cell set called Internal and writing it to VTK and trying to view it in Parafoam. but unfortunately nothing turns up as in it is blank althiough the vtk file is quite huge..(by using the following command)

foamToVTK -cellSet Internal

My check mesh is ok and simulation runs fine but for the love of god I am not able to understand why this error is coming up.

If some body can tell me what files they need me to upload I can do that and await suggestions. I am not ablr to upload the vtk file as it is too big.

Also I am not able to find the default patch

FOAM Warning :

From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 627
Found 220340 undefined faces in mesh; adding to default patch.



alexeym October 23, 2015 15:01

Hi,

If you open gmshToFoam.C, go to line 869, you find commentary there:

Code:

    // Problem is that the orientation of the patchFaces does not have to
    // be consistent with the outwards orientation of the mesh faces. So
    // we have to construct the mesh in two stages:
    // 1. define mesh with all boundary faces in one patch
    // 2. use the read patchFaces to find the corresponding boundary face
    //    and repatch it.

And that is what gmshToFoam does, creates mesh with all boundary faces added to defaultFaces patch, redistributes faces to correct patches:

Code:

    faceListList boundaryFaces(patchFaces.size());
    ...
    polyMesh mesh
    (
        ...
    );
    ...
    forAll(patchFaces, patchI)
    {
        const DynamicList<face>& pFaces = patchFaces[patchI];

        Info<< "Finding faces of patch " << patchI << endl;

        forAll(pFaces, i)
        {
            const face& f = pFaces[i];

            // Find face in pp using all vertices of f.
            label patchFaceI = findFace(pp, f);

            if (patchFaceI != -1)
            {
                label meshFaceI = pp.start() + patchFaceI;

                repatcher.changePatchID(meshFaceI, patchI);
            }
        ...
        }
    ...
    }

And if all faces found their owner, defaultFaces patch becomes empty and is deleted during conversion (you can find code near the end of gmshToFoam.C).

vitocorleone October 24, 2015 11:51

Thank you very Much alexeym.

So I guess all my faces found their owners ..:D:D:D

Thank you much again.


All times are GMT -4. The time now is 15:48.