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] False name of internal faceZone/faceSet by Gmsh (https://www.cfd-online.com/Forums/openfoam-meshing/109906-false-name-internal-facezone-faceset-gmsh.html)

Hisham November 29, 2012 08:01

False name of internal faceZone/faceSet by Gmsh
 
Dear Foamers,

I try to make an internal faceZone/faceSet in a Gmsh geometry. I defined a physical surface of the internal surfaces in question. I run
Code:

gmsh -3 file.geo; gmshToFoam file.msh
. By viewing the output in paraFoam, the faceZone/faceSet exists but has a different name than the physical surface. It has the name of a cellZone that is not even adjacent to the surfaces.

Question time:
1. Did anyone face the same problem or has anyone produced internal faceZones without this problem?
2. Is there a workaround?

Best regards,
Hisham

Hisham November 29, 2012 09:25

It seems that there is a bug in gmshToFoam. Changing:
Code:

01058        forAll(zoneFaces, zoneI)
01059        {
01060            if (zoneFaces[zoneI].size())
01061            {
01062                label physReg = zoneToPhys[zoneI];
01063
01064                Map<word>::const_iterator iter = physicalNames.find(physReg);
01065
01066                word zoneName = "faceZone_" + name(zoneI);
01067                if (iter != physicalNames.end())
01068                {
01069                    zoneName = iter();
01070                }
01071
01072                Info<< "Writing zone " << zoneI << " to faceZone "
01073                    << zoneName << " and faceSet"
01074                    << endl;

to:

Code:

01058        forAll(zoneFaces, zoneI)
01059        {
01060            if (zoneFaces[zoneI].size())
01061            {
01062                label physReg = patchToPhys[zoneI];
01063
01064                Map<word>::const_iterator iter = physicalNames.find(physReg);
01065
01066                word zoneName = "faceZone_" + name(zoneI);
01067                if (iter != physicalNames.end())
01068                {
01069                    zoneName = iter();
01070                }
01071
01072                Info<< "Writing zone " << zoneI << " to faceZone "
01073                    << zoneName << " and faceSet"
01074                    << endl;

solves the problem for me!

Regards,
Hisham


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