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] Need help defining internal face as boundary (https://www.cfd-online.com/Forums/openfoam-meshing/237847-need-help-defining-internal-face-boundary.html)

Venky_94 August 8, 2021 22:43

Need help defining internal face as boundary
 
1 Attachment(s)
I'm new to OpenFOAM and I'm trying to create a wedge geometry using Block mesh. I'm facing a couple of issues with the mesh creation. I'm sharing an image showing the boundaries I'll be needing for the simulation.
  1. I'm trying to create a wall at the face marked nozzle wall but I'm getting an error saying "--> FOAM FATAL ERROR: (openfoam-2012)
    Trying to specify a boundary face 4(6 7 8 9) on the face on cell 0 which is either an internal face or already belongs to the same patch. This is face 0 of patch 3 named orificewall." I'd like to know how to create an wall at that internal face.
  2. I tried leaving out the orificewall boundary and creating the geometry to debug the issue and I identified another issue which is that the face marked by an ellipse is being detected as a wall by default and falls under the patch "defaultfaces". I do not require a boundary at that position.

I'd be really grateful if someone could point me in the right direction.

Here's my blockmesh file.
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2012                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale  1;

vertices
(
    (0 0 0)
    (0.0105 0 0)
    (0.0105 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
    (0.0105 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
        (0 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
        (0 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
        (0.001 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
        (0.001 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
        (0.001 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0.001 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
        (0.0105 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
        (0.0105 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0.001 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
        (0.001 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
        (0.001 0 0)
        (0 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
);

blocks
(
//Orifice Block//
    hex (0 16 9 6 0 16 8 7) (25 10 1) simpleGrading (1 1 1)
//Block to the left of orifice (Pair 1)//
        hex (6 9 10 17 7 8 11 18) (25 90 1) simpleGrading (1 1 1)
//Block to the far left of orifice (Pair 2)//
        hex (17 10 14 3 18 11 15 4) (25 100 1) simpleGrading (1 1.5 1)
//Block above orifice (Pair 1)//
        hex (16 1 13 10 16 1 12 11) (300 100 1) simpleGrading (1.5 1.5 1)
//Block above orifice and to the left (Pair 2)//
        hex (10 13 2 14 11 12 5 15) (300 100 1) simpleGrading (1.5 1.5 1)
);

edges
(
);

boundary
(
        upperwall
    {
        type wall;
        faces
        (
            (3 4 15 14)
                        (14 15 5 2)
        );
    }
        lowerwall
    {
        type wall;
        faces
        (
            (6 7 18 17)
                        (17 18 4 3)
        );
    }
        pressure_outlet
    {
        type patch;
        faces
        (
            (1 12 13 1)
                        (13 12 5 2)
        );
    }
        orificewall
    {
        type wall;
        faces
        (
            (6 7 8 9)
        );
    }
        airinlet
    {
        type patch;
        faces
        (
            (0 7 6 0)
        );
    }
        axis
    {
        type empty;
        faces
        (
            (0 16 16 0)
                        (16 1 1 16)
        );
    }
        frontPlane
    {
        type wedge;
        faces
        (
            (0 16 8 7)
                        (16 1 12 11)
                        (11 12 5 15)
                        (7 8 11 18)
                        (18 11 15 4)
        );
    }
        backPlane
    {
        type wedge;
        faces
        (
            (0 16 9 6)
                        (16 1 13 10)
                        (10 13 2 14)
                        (6 9 10 17)
                        (17 10 14 3)
                );
    }
);

mergePatchPairs
(
);

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


Venky_94 August 8, 2021 22:52

1 Attachment(s)
Quote:

Originally Posted by Venky_94 (Post 809918)
I'm new to OpenFOAM and I'm trying to create a wedge geometry using Block mesh. I'm facing a couple of issues with the mesh creation. I'm sharing an image showing the boundaries I'll be needing for the simulation.
  1. I'm trying to create a wall at the face marked nozzle wall but I'm getting an error saying "--> FOAM FATAL ERROR: (openfoam-2012)
    Trying to specify a boundary face 4(6 7 8 9) on the face on cell 0 which is either an internal face or already belongs to the same patch. This is face 0 of patch 3 named orificewall." I'd like to know how to create an wall at that internal face.
  2. I tried leaving out the orificewall boundary and creating the geometry to debug the issue and I identified another issue which is that the face marked by an ellipse is being detected as a wall by default and falls under the patch "defaultfaces". I do not require a boundary at that position.

I'd be really grateful if someone could point me in the right direction.

Here's my blockmesh file.
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2012                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale  1;

vertices
(
    (0 0 0)
    (0.0105 0 0)
    (0.0105 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
    (0.0105 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
        (0 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
        (0 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
        (0.001 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
        (0.001 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
        (0.001 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0.001 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
        (0.0105 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
        (0.0105 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0.001 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
        (0.001 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
        (0.001 0 0)
        (0 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
);

blocks
(
//Orifice Block//
    hex (0 16 9 6 0 16 8 7) (25 10 1) simpleGrading (1 1 1)
//Block to the left of orifice (Pair 1)//
        hex (6 9 10 17 7 8 11 18) (25 90 1) simpleGrading (1 1 1)
//Block to the far left of orifice (Pair 2)//
        hex (17 10 14 3 18 11 15 4) (25 100 1) simpleGrading (1 1.5 1)
//Block above orifice (Pair 1)//
        hex (16 1 13 10 16 1 12 11) (300 100 1) simpleGrading (1.5 1.5 1)
//Block above orifice and to the left (Pair 2)//
        hex (10 13 2 14 11 12 5 15) (300 100 1) simpleGrading (1.5 1.5 1)
);

edges
(
);

boundary
(
        upperwall
    {
        type wall;
        faces
        (
            (3 4 15 14)
                        (14 15 5 2)
        );
    }
        lowerwall
    {
        type wall;
        faces
        (
            (6 7 18 17)
                        (17 18 4 3)
        );
    }
        pressure_outlet
    {
        type patch;
        faces
        (
            (1 12 13 1)
                        (13 12 5 2)
        );
    }
        orificewall
    {
        type wall;
        faces
        (
            (6 7 8 9)
        );
    }
        airinlet
    {
        type patch;
        faces
        (
            (0 7 6 0)
        );
    }
        axis
    {
        type empty;
        faces
        (
            (0 16 16 0)
                        (16 1 1 16)
        );
    }
        frontPlane
    {
        type wedge;
        faces
        (
            (0 16 8 7)
                        (16 1 12 11)
                        (11 12 5 15)
                        (7 8 11 18)
                        (18 11 15 4)
        );
    }
        backPlane
    {
        type wedge;
        faces
        (
            (0 16 9 6)
                        (16 1 13 10)
                        (10 13 2 14)
                        (6 9 10 17)
                        (17 10 14 3)
                );
    }
);

mergePatchPairs
(
);

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


The attachment was missed out in the original post. PFA

piu58 August 9, 2021 05:59

You cannot change two sides of a patch into a boundary. If you really need a boundary in the very inner of your domain, you have to create two patches.

Venky_94 August 10, 2021 00:38

Quote:

Originally Posted by piu58 (Post 809938)
You cannot change two sides of a patch into a boundary. If you really need a boundary in the very inner of your domain, you have to create two patches.

Can you please explain how to do that? Like have duplicate vertices for the same coordinates and then define both sides of the patches as walls (with the different coordinates?)

piu58 August 10, 2021 03:41

> Like have duplicate vertices for the same coordinates and then define both sides of the patches as walls (with the different coordinates?

That is what I recommend.

Venky_94 August 10, 2021 09:49

Quote:

Originally Posted by piu58 (Post 809994)
> Like have duplicate vertices for the same coordinates and then define both sides of the patches as walls (with the different coordinates?

That is what I recommend.

Thanks. That worked out fine. I now have a wall in place at the nozzle wall section.

What would you suggest for the second part of my issue though? The interface between the blocks 0,3 and 1,3 is being detected as a wall. How can I change that?

Venky_94 August 10, 2021 11:09

Quote:

Originally Posted by Venky_94 (Post 810028)
Thanks. That worked out fine. I now have a wall in place at the nozzle wall section.

What would you suggest for the second part of my issue though? The interface between the blocks 0,3 and 1,3 is being detected as a wall. How can I change that?

I tried mergePatchPairs but I'm getting the below error, which I'm not able to understand. I'm sharing my blockMesh file as well. Pls suggest.

Quote:

--> FOAM FATAL ERROR: (openfoam-2012)
Bad points: (0.001 0 0) (0.001 0 0) (1.001 0 0)

From void Foam:: plane::calcFromEmbeddedPoints(const point&, const point&, const point&, const char*)
in file meshes/primitiveShapes/plane/plane.C at line 108.
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2012                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale  1;

vertices
(
    (0 0 0)
    (0.0105 0 0)
    (0.0105 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
    (0.0105 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
        (0 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
        (0 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
        (0.001 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
        (0.001 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
        (0.001 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0.001 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
        (0.0105 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
        (0.0105 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0.001 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
        (0.001 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
        (0.001 0 0)
        (0 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
        (0 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
        (0 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908) //Copy of pt. 6//
        (0 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908) //Copy of pt. 7//
        (0.001 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908) //Copy of pt. 8//
        (0.001 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908) //Copy of pt. 9//
        (0.001 0 0) //Copy of pt. 16//
        (0.001 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694) //Copy of pt. 10//
        (0.001 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694) //Copy of pt. 11//
);

blocks
(
//Orifice Block//
    hex (0 16 22 19 0 16 21 20) (25 10 1) simpleGrading (1 1 1)
//Block to the left of orifice//
        hex (6 9 24 17 7 8 25 18) (25 90 1) simpleGrading (1 1 1)
//Block to the far left of orifice//
        hex (17 10 14 3 18 11 15 4) (25 100 1) simpleGrading (1 1.5 1)
//Block above orifice//
        hex (23 1 13 10 23 1 12 11) (300 100 1) simpleGrading (1.5 1.5 1)
//Block above orifice and to the left//
        hex (10 13 2 14 11 12 5 15) (300 100 1) simpleGrading (1.5 1.5 1)
);

edges
(
);

boundary
(
        upperwall
    {
        type wall;
        faces
        (
            (3 4 15 14)
                        (14 15 5 2)
        );
    }
        lowerwall
    {
        type wall;
        faces
        (
            (6 7 18 17)
                        (17 18 4 3)
        );
    }
        pressure_outlet
    {
        type patch;
        faces
        (
            (1 12 13 1)
                        (13 12 5 2)
        );
    }
        orificewall
    {
        type wall;
        faces
        (
            (6 7 8 9)
                        (19 20 21 22)
        );
    }
        airinlet
    {
        type patch;
        faces
        (
            (0 20 19 0)
        );
    }
        axis
    {
        type empty;
        faces
        (
            (0 16 16 0)
                        (23 1 1 23)
        );
    }
        frontPlane
    {
        type wedge;
        faces
        (
            (0 16 21 20)
                        (23 1 12 11)
                        (11 12 5 15)
                        (7 8 25 18)
                        (18 11 15 4)
        );
    }
        backPlane
    {
        type wedge;
        faces
        (
            (0 16 22 19)
                        (23 1 13 10)
                        (10 13 2 14)
                        (6 9 24 17)
                        (17 10 14 3)
                );
    }
        mpatch
    {
        type patch;
        faces
        (
                        (23 11 10 23)
        );
    }
        spatch1 //Outlet of orifice//
    {
        type patch;
        faces
        (
            (16 21 22 16)
        );
    }
        spatch2 //Patch to left of orifice outlet//
    {
        type patch;
        faces
        (
            (8 25 24 9)
        );
    }
);

mergePatchPairs
(
        (mpatch spatch1)
        (mpatch spatch2)
);

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



All times are GMT -4. The time now is 20:45.