CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] face normal direction of a wedge

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2015, 20:51
Default face normal direction of a wedge
  #1
New Member
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
popokaka is on a distinguished road


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
(
);

// ************************************************** *********************** //
popokaka is offline   Reply With Quote

Old   July 16, 2015, 05:48
Default
  #2
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi popo, or kaka or whatever (I hope you aren't german )

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
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   July 16, 2015, 14:39
Default
  #3
New Member
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
popokaka is on a distinguished road
Thanks for the response.

I changed the geometry. So now it is like:


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 View Post
Hi popo, or kaka or whatever (I hope you aren't german )

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 is offline   Reply With Quote

Old   July 16, 2015, 15:39
Default
  #4
New Member
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
popokaka is on a distinguished road
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 View Post
Hi popo, or kaka or whatever (I hope you aren't german )

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 is offline   Reply With Quote

Old   July 16, 2015, 18:23
Default
  #5
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
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.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   July 17, 2015, 11:45
Default
  #6
New Member
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
popokaka is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Old   July 17, 2015, 16:47
Default
  #7
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
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
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   July 17, 2015, 17:30
Default
  #8
New Member
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
popokaka is on a distinguished road
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 View Post
the rule to set the boundary is defined in the users guide as

but I thought it fits to your dict
popokaka is offline   Reply With Quote

Old   July 19, 2015, 14:13
Default
  #9
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
sorry, but I am at my wits end.

Have you defined the empty face?
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   July 20, 2015, 12:29
Default
  #10
New Member
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
popokaka is on a distinguished road
I tried that as well.

Thanks for your help anyway
popokaka is offline   Reply With Quote

Old   July 20, 2015, 16:44
Default
  #11
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
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)
)
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   July 30, 2015, 18:36
Default
  #12
New Member
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
popokaka is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
how to get Face Normal vector and Face Center ? kk415 OpenFOAM Programming & Development 1 July 11, 2018 07:21
Exporting Face Normal of a patch and some other values fredo490 OpenFOAM Post-Processing 7 May 9, 2016 19:28
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 10:53
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


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