CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   non-orthogonal faces and incorrect orientation? (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/116253-non-orthogonal-faces-incorrect-orientation.html)

nennbs April 16, 2013 03:11

non-orthogonal faces and incorrect orientation?
 
Hello, guys.

When I run blockMesh, the errors are listed as follows,

<<Writing 310090 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 935400 faces are incorrectly oriented.
<<Writing 625310 faces with incorrect orientation to set wrongOrientedFaces
Max skewness = 0.000312539 OK.


Why?

thank you in advance.


my blockDict:
convertToMeters 0.001;

vertices
(
(0 -11 0.1)
(100 -11 0.1)
(100 -3 0.1)
(0 -3 0.1)
(0 3 0.1)
(100 3 0.1)
(100 11 0.1)
(0 11 0.1)
(106 -11 0.1)
(306 -11 0.1)
(306 -3 0.1)
(106 -3 0.1)
(106 3 0.1)
(306 3 0.1)
(306 11 0.1)
(106 11 0.1)

(0 -11 -0.1)
(100 -11 -0.1)
(100 -3 -0.1)
(0 -3 -0.1)
(0 3 -0.1)
(100 3 -0.1)
(100 11 -0.1)
(0 11 -0.1)
(106 -11 -0.1)
(306 -11 -0.1)
(306 -3 -0.1)
(106 -3 -0.1)
(106 3 -0.1)
(306 3 -0.1)
(306 11 -0.1)
(106 11 -0.1)
);

blocks
(
hex (4 5 6 7 20 21 22 23) (500 40 1) simpleGrading (1 1 1)
hex (3 2 5 4 19 18 21 20) (500 30 1) simpleGrading (1 1 1)
hex (0 1 2 3 16 17 18 19) (500 40 1) simpleGrading (1 1 1)
hex (2 11 12 5 18 27 28 21) (30 30 1) simpleGrading (1 1 1)
hex (12 13 14 15 28 29 30 31) (1000 40 1) simpleGrading (1 1 1)
hex (11 10 13 12 27 26 29 28) (1000 30 1) simpleGrading (1 1 1)
hex (8 9 10 11 24 25 26 27) (1000 30 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(3 0 16 19)
(4 3 19 20)
(7 4 20 23)
);
}
outlet
{
type patch;
faces
(
(9 10 26 25)
(10 13 29 26)
(13 14 30 29)
);
}
walls
{
type wall;
faces
(
(7 6 22 23)
(5 6 22 21)
(5 21 28 12)
(12 15 31 28)
(15 14 30 31)

(0 1 17 16)
(1 2 18 17)
(2 11 27 18)
(11 8 24 27)
(8 9 25 24)
);
}
frontAndBack
{
type empty;
faces
(
(7 4 5 6)
(23 20 21 22)
(4 3 2 5)
(20 19 18 21)
(3 0 1 2)
(19 16 17 18)
(5 2 11 12)
(21 18 27 28)
(15 12 13 14)
(31 28 29 30)
(12 11 10 13)
(28 27 26 29)
(11 8 9 10)
(27 24 25 26)
);
}
);

mergePatchPairs
(
);


At the same time, can you give me some suggestions about blockMesh too?

nennbs April 16, 2013 10:02

can anyone help me
 
can anyone help me?

colinB April 16, 2013 10:20

type:

paraFoam -block

and you will see that you have some orders of the numbers incorrect

if this is not the case you might want to provide us the
checkMesh results and some pictures ;)

regards

immortality April 16, 2013 18:17

you should put vertex numbers in opposite to clock direction.first lower page and then upper one.
And also faces should have right hand rule(normal of faces be outward).

nennbs April 17, 2013 04:20

Thank you for your help, I have changed some orientation but it still doesn´t work.

The checkMesh is listed as follows:


Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 315222
internal points: 0
faces: 625310
internal faces: 310090
cells: 155900
boundary patches: 4
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 155900
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
inlet 110 222 ok (non-closed singly connected)
outlet 100 202 ok (non-closed singly connected)
walls 3210 6424 ok (non-closed singly connected)
frontAndBack 311800 315222 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (0 -0.011 -0.0001) (0.306 0.011 0.0001)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 0)
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (3.10402e-19 5.83093e-17 1.00277e-14) OK.
Max cell openness = 1.65436e-16 OK.
Max aspect ratio = 1.33333 OK.
Minumum face area = 4e-08. Maximum face area = 5.33333e-08. Face area magnitudes OK.
Min volume = 2e-300. Max volume = 2e-300. Total volume = 3.118e-295. Cell volumes OK.
Mesh non-orthogonality Max: 180 average: 180
***Number of non-orthogonality errors: 310090.
<<Writing 310090 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 935400 faces are incorrectly oriented.
<<Writing 625310 faces with incorrect orientation to set wrongOrientedFaces
Max skewness = 0.000312539 OK.
Coupled point location match (average 0) OK.

Failed 2 mesh checks.

End


And blockMesh is as follows:

Create time

Creating block mesh from
"/home/ifas/turbulent/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file blockMesh/blockMeshTopology.C at line 255
negative volume block : 0, probably defined inside-out
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -20 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -20 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -20 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -20 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -20 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -20 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file blockMesh/blockMeshTopology.C at line 255
negative volume block : 1, probably defined inside-out
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -26.6667 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file blockMesh/blockMeshTopology.C at line 255
negative volume block : 2, probably defined inside-out
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -1.2 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -1.2 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -1.2 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -1.2 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -1.2 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -1.2 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file blockMesh/blockMeshTopology.C at line 255
negative volume block : 3, probably defined inside-out
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file blockMesh/blockMeshTopology.C at line 255
negative volume block : 4, probably defined inside-out
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -40 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -40 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -40 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -40 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -40 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -40 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file blockMesh/blockMeshTopology.C at line 255
negative volume block : 5, probably defined inside-out
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 0
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 1
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 2
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 3
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 4
--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -53.3333 for face 5
--> FOAM Warning :
From function blockMesh::createTopology(IOdictionary&)
in file blockMesh/blockMeshTopology.C at line 255
negative volume block : 6, probably defined inside-out

Check topology

Basic statistics
Number of internal faces : 6
Number of boundary faces : 30
Number of defined boundary faces : 30
Number of undefined boundary faces : 0
Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 0.001

Writing polyMesh
----------------
Mesh Information
----------------
boundingBox: (0 -0.011 -0.0001) (0.306 0.011 0.0001)
nPoints: 315222
nCells: 155900
nFaces: 625310
nInternalFaces: 310090
----------------
Patches
----------------
patch 0 (start: 310090 size: 110) name: inlet
patch 1 (start: 310200 size: 100) name: outlet
patch 2 (start: 310300 size: 3210) name: walls
patch 3 (start: 313510 size: 311800) name: frontAndBack

End





And my blockMeshDict is changed as follows:

convertToMeters 0.001;

vertices
(
(0 -11 0.1)
(100 -11 0.1)
(100 -3 0.1)
(0 -3 0.1)
(0 3 0.1)
(100 3 0.1)
(100 11 0.1)
(0 11 0.1)
(106 -11 0.1)
(306 -11 0.1)
(306 -3 0.1)
(106 -3 0.1)
(106 3 0.1)
(306 3 0.1)
(306 11 0.1)
(106 11 0.1)

(0 -11 -0.1)
(100 -11 -0.1)
(100 -3 -0.1)
(0 -3 -0.1)
(0 3 -0.1)
(100 3 -0.1)
(100 11 -0.1)
(0 11 -0.1)
(106 -11 -0.1)
(306 -11 -0.1)
(306 -3 -0.1)
(106 -3 -0.1)
(106 3 -0.1)
(306 3 -0.1)
(306 11 -0.1)
(106 11 -0.1)
);

blocks
(
hex (0 1 2 3 16 17 18 19) (500 40 1) simpleGrading (1 1 1)
hex (3 2 5 4 19 18 21 20) (500 30 1) simpleGrading (1 1 1)
hex (4 5 6 7 20 21 22 23) (500 40 1) simpleGrading (1 1 1)
hex (2 11 12 5 18 27 28 21) (30 30 1) simpleGrading (1 1 1)
hex (8 9 10 11 24 25 26 27) (1000 30 1) simpleGrading (1 1 1)
hex (11 10 13 12 27 26 29 28) (1000 30 1) simpleGrading (1 1 1)
hex (12 13 14 15 28 29 30 31) (1000 40 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(0 3 19 16)
(3 4 20 19)
(4 7 23 20)
);
}
outlet
{
type patch;
faces
(
(10 9 25 26)
(13 10 26 29)
(14 13 29 30)
);
}
walls
{
type wall;
faces
(
(7 6 22 23)
(6 5 21 22)
(5 12 28 21)
(12 15 31 28)
(15 14 30 31)

(0 1 17 16)
(2 1 17 18)
(2 11 27 18)
(11 8 24 27)
(8 9 25 24)
);
}
frontAndBack
{
type empty;
faces
(
(7 4 5 6)
(23 20 21 22)
(4 3 2 5)
(20 19 18 21)
(3 0 1 2)
(19 16 17 18)
(5 2 11 12)
(21 18 27 28)
(15 12 13 14)
(31 28 29 30)
(12 11 10 13)
(28 27 26 29)
(11 8 9 10)
(27 24 25 26)
);
}
);

mergePatchPairs
(
);

thank you a lot.

nennbs April 17, 2013 04:23

Thank you, I have changed some orientations but it still doesnt work. the blockMesh and changed blockMeshDict. are listed as above, and you can have a look.

Thank you a lot.

colinB April 17, 2013 04:55

Hey nennbs,

I still would say that your vertices are not in the correct order.

if you have a look at the warning messages they say:


Code:

(...)
negative volume block : 0, probably defined inside-out
(...)
negative volume block : 1, probably defined inside-out
(...)
negative volume block : 2, probably defined inside-out
(...)
negative volume block : 3, probably defined inside-out
(...)
negative volume block : 4, probably defined inside-out
(...)
negative volume block : 5, probably defined inside-out
(...)
negative volume block : 6, probably defined inside-out
(...)

Apparently you have consequently ill defined all the blocks
so that you have these troubles.

I checked block number 0 and the correct numbers are:

0 1 17 16 3 2 18 19

if you apply this principle to the other blocks you should get a valid
blockMeshDict file.
Eventually you have to check also your number of cells per edge
for they are related to this issue.

For further reference see the userguide section of blockMesh
where there is a detailed sketch of an example block and its
numbering.

regards

nennbs April 17, 2013 05:42

Thanks millions, It works.


All times are GMT -4. The time now is 04:57.