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/)
-   -   [blockMesh] Extra patch with 'zero' faces being generated (https://www.cfd-online.com/Forums/openfoam-meshing/250717-extra-patch-zero-faces-being-generated.html)

harshabose July 5, 2023 09:17

Extra patch with 'zero' faces being generated
 
Hello forum members,

I'm facing an issue while generating a wedge mesh and I would appreciate your insights to help me resolve it. In my blockMeshDict file, I have defined the mesh configuration as shown below:

blockMeshDict file:
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2212                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
R                0.15;
L                1;
X                #eval{$R*cos(pi()*0.00625)};
Y                #eval{$R*sin(pi()*0.00625)};
XNEG        #eval{-$R*cos(pi()*0.00625)};
YNEG        #eval{-$R*sin(pi()*0.00625)};

vertices
(
        (0 0 0)                //0
          ($X $YNEG 0)        //1
        ($X $Y 0)                //2
        (0 0 $L)                //3
        ($X $YNEG $L)        //4
        ($X $Y $L)                //5
);

blocks
(
    hex (1 4 5 2 0 3 3 0) (600 1 80) simpleGrading (1 1 1)
);       

edges
(
        arc 4 5 (#eval{$R*cos(pi()*0.00625*0.5)} #eval{$R*cos(pi()*0.25)} $L)
        arc 1 2 (#eval{$R*cos(pi()*0.00625*0.5)} #eval{$R*cos(pi()*0.25)} 0)
);

boundary
(
        inlet
        {
                type patch;
                faces
                (
                        (0 1 2 0)
                );
        }

        outlet
        {
                type patch;
                faces
                (
                        (3 5 4 3)
                );
        }

        walls
        {
                type wall;
                faces
                (
                        (2 1 4 5)
                );
        }
        wedgeX
        {
                type wedge;
                faces
                (
                        (0 2 5 3)
                );
        }
        wedgeY
        {
                type wedge;
                faces
                (
                        (0 3 4 1)
                );
        }
);

However, during the mesh generation process, an extra patch named "defaultFace" with zero faces is being generated (boundary file below). To proceed with my simulation, I manually deleted this patch, and everything seemed to work fine afterward.

Old boundary file:
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2212                                  |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      binary;
    arch        "LSB;label=32;scalar=64";
    class      polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

6
(
    inlet
    {
        type            patch;
        nFaces          80;
        startFace      95320;
    }
    outlet
    {
        type            patch;
        nFaces          80;
        startFace      95400;
    }
    walls
    {
        type            wall;
        inGroups        1(wall);
        nFaces          600;
        startFace      95480;
    }
    wedgeX
    {
        type            wedge;
        inGroups        1(wedge);
        nFaces          48000;
        startFace      96080;
    }
    wedgeY
    {
        type            wedge;
        inGroups        1(wedge);
        nFaces          48000;
        startFace      144080;
    }
    defaultFaces
    {
        type            empty;
        inGroups        1(empty);
        nFaces          0;
        startFace      192080;
    }
)

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

I'm puzzled as to why this "defaultFaces" patch is appearing despite having explicitly defined all the necessary boundary patches. From my understanding, the "defaultFaces" patch should group any external faces that are not assigned a specific patch definition, but in this case, there are zero faces associated with it.

Could you help me understand the possible reasons behind it? Your assistance would be much appreciated.

I have attached the relevant files for reference. Please note that the current case is not fully built, so the simulation won't run at this stage.

Thank you in advance for your time.

Case Link (Google Drive)

Alczem July 6, 2023 03:09

Hey!


Not sure why defaultPatches is created, but I remember a trick to properly delete patches with 0 faces. You can use an empty createPatchDict and use the associated command. It will simply delete the unecessary patches (but if it works with a manuel deletion, all the better :D )

harshabose July 6, 2023 07:03

Hey, Alczem,

Not solved yet. I am just going to manually delete it and hope for the best. I should see if this will create any problem while solving.

Thank you for your input. Appreciate it.

harshabose July 8, 2023 12:50

1 Attachment(s)
Update:
Did not figure out the reasoning for the extra patch but seems that axisymmetric meshes with pyramid cells along the axis produce this.

To overcome this, making a square section encompassing the axis seems to solve the issue. See below image for reference:
Attachment 95310


All times are GMT -4. The time now is 23:50.