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] face normal direction of a wedge (https://www.cfd-online.com/Forums/openfoam-meshing/156941-face-normal-direction-wedge.html)

popokaka July 15, 2015 19:51

face normal direction of a wedge
 
http://s30.postimg.org/fgcq0ylm9/Untitled.pnghttp://postimg.org/image/5j1p7we0d/

I tried to create a wedge for a axial symmetrical problem. This figure is the geometry. Following is my
blockMeshDict file.

According to the user guide, the normal direction of any boundary face should point to outside of the computational zone. So I defined all the faces in this way. Error messages popped out when I run blockMesh, saying outlet and axi_symm-r don't have neighbor cell faces.

I found that if I change the vertices in the reversed order (the quoted lines) I can generate the mesh successfully. But in this case, the normal directions of these two faces are actually pointing into the computational zone. I wonder what is wrong. Thanks

convertToMeters 1;

vertices
(
(0 0 0) //0
(8 0 0) //1
(0 -0.0034905 0.099985) //2
(8 -0.0034905 0.099985) //3
(8 0.0034905 0.099985) //4
(0 0.0034905 0.099985) //5
);

blocks
(
hex (0 1 1 0 2 3 4 5) (100 1 20)
simpleGrading
(
1
1
(
(0.5 0.5 4)
(0.5 0.5 0.25)
)
)

);

edges
(
arc 2 5 (0 0 0.1)
arc 3 4 (8 0 0.1)
);

patches
(
patch
inlet
(
(0 2 5 0)
)

patch
outlet
(
// (1 3 4 1)
(1 4 3 1)
)

wedge
axi_symm-f
(
(0 1 3 2)
)

wedge
axi_symm-r
(
// (0 1 4 5)
(0 5 4 1)
)

wall
wall
(
(2 3 4 5)
)
);

mergePatchPairs
(
);

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

alexB July 16, 2015 04:48

Hi popo, or kaka or whatever (I hope you aren't german :D )

You made an fault by defining your block.
If you want to let collapse some points to create a prism... don't let the first 4 collapse, as they are used to define your local coordinate system of the block.

I hope it helps
regards
Alex

popokaka July 16, 2015 13:39

Thanks for the response.

I changed the geometry. So now it is like:
http://s27.postimg.org/c7l9rgo77/Untitled.png

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.4.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
 FoamFile
 {
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 convertToMeters 0.01;
 
 vertices       
 (
    (-0.008026884 0 -1)            //0
    (0.008026884 0 -1)          //1
    (0.008026884 8.8 -1)            //2
    (-0.008026884 8.8 -1)              //3
    (0 0 0)              //4
    (0 8.8 0)            //5
 );
 
 blocks         
 (
        hex (0 1 2 3 4 5 5 4) (1 100 20)
        simpleGrading
        (
            1
            1
            (
                (0.5 0.5 4)
                (0.5 0.5 0.25)
            )           
        )
 
 );
 
 edges         
 (
 );
 
 patches       
 (
        patch
        inlet
        (
                (4 0 1 4)
        )
 
        patch
        outlet
        (
                (2 3 5 5)
        )
 
        wedge
        axi_symm-f
        (
                (1 2 5 4)
        )
 
        wedge
        axi_symm-r
        (
                (0 4 5 3)
        )
               
        wall
        wall
        (
                (0 3 2 1)
        )
 );
 
 mergePatchPairs
 (
 );
 
 // ************************************************************************* //

However, I still had the same error message:
--> FOAM FATAL ERROR:
face 0 in patch 0 does not have neighbour cell face: 4(4 0 1 4)


Quote:

Originally Posted by alexB (Post 555687)
Hi popo, or kaka or whatever (I hope you aren't german :D )

You made an fault by defining your block.
If you want to let collapse some points to create a prism... don't let the first 4 collapse, as they are used to define your local coordinate system of the block.

I hope it helps
regards
Alex


popokaka July 16, 2015 14:39

I didn't find it in the user guide. But does the symmetrical axis need to be one of the coordinate axis?

thanks

Quote:

Originally Posted by alexB (Post 555687)
Hi popo, or kaka or whatever (I hope you aren't german :D )

You made an fault by defining your block.
If you want to let collapse some points to create a prism... don't let the first 4 collapse, as they are used to define your local coordinate system of the block.

I hope it helps
regards
Alex


alexB July 16, 2015 17:23

hmmm, looks good so far...

but I am not sure about your multi-grading-thing... never done that... I hope you are sure that there is no error.

Furthermore I always rather describe the boundary than the patches.
like here http://cfd.direct/openfoam/user-guide/blockmesh/ see under 5.3.1.5 The boundary

I hope it helps

Edit:
Another possible error could be that you haven't defined the empty patch (4 5 5 4) . But I don't know it refers to the error message.

popokaka July 17, 2015 10:45

I found this example:
https://openfoamwiki.net/index.php/M...s/AxiSymmetric

But even in this case, the normal direction of the outlet is pointing to the computational domain. I am really confused...

Quote:

Originally Posted by alexB (Post 555794)
hmmm, looks good so far...

but I am not sure about your multi-grading-thing... never done that... I hope you are sure that there is no error.

Furthermore I always rather describe the boundary than the patches.
like here http://cfd.direct/openfoam/user-guide/blockmesh/ see under 5.3.1.5 The boundary

I hope it helps

Edit:
Another possible error could be that you haven't defined the empty patch (4 5 5 4) . But I don't know it refers to the error message.


alexB July 17, 2015 15:47

the rule to set the boundary is defined in the users guide as
Quote:

The order in which the vertices are given must be such that, looking from inside the block and starting with any vertex, the face must be traversed in a clockwise direction to define the other vertices
but I thought it fits to your dict

popokaka July 17, 2015 16:30

yeah, in my case, it fits. But the case doesn't work.

All the working cases I saw so far have one or two faces violating this rule. I am really confused...

Quote:

Originally Posted by alexB (Post 555922)
the rule to set the boundary is defined in the users guide as

but I thought it fits to your dict


alexB July 19, 2015 13:13

sorry, but I am at my wits end.

Have you defined the empty face?

popokaka July 20, 2015 11:29

I tried that as well.

Thanks for your help anyway

alexB July 20, 2015 15:44

there is no try... do it ;)

I wanted to say that it's necessary to define the collapsed face explicitly. (as I read it in the guide)

And one thing I wanted to say at first when I saw your dict (but I forgot it) :

I think you have to write:
Code:

        inlet
            {
            type patch;
            faces
            (
                (4 0 1 4)
            );
        }

Instead of:
Code:


patch
inlet
(
 (4 0 1 4)
)


popokaka July 30, 2015 17:36

I did.

Take a look at this example:
https://openfoamwiki.net/index.php/M...s/AxiSymmetric

The normal direction of the outlet is in the "wrong direction". If you change that, the case won't work. Everything else you mentioned was in this case. The empty face. The way of defining faces for the new version of openFOAM

Quote:

Originally Posted by alexB (Post 556208)
there is no try... do it ;)

I wanted to say that it's necessary to define the collapsed face explicitly. (as I read it in the guide)

And one thing I wanted to say at first when I saw your dict (but I forgot it) :

I think you have to write:
Code:

        inlet
            {
            type patch;
            faces
            (
                (4 0 1 4)
            );
        }

Instead of:
Code:


patch
inlet
(
 (4 0 1 4)
)




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