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

[blockMesh] Mixer mesh - negative volume problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 10, 2013, 23:36
Default Mixer mesh - negative volume problem
  #1
New Member
 
Join Date: Jul 2013
Posts: 2
Rep Power: 0
jadtwo is on a distinguished road
Hi everyone, I'm trying to mesh this geometry, but I keep getting negative volume errors. I double checked all the orientations of my blocks, and they seem correct. Here are the errors:

Quote:
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: -0.052635 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: -0.052635 for face 3


--> FOAM FATAL ERROR:
face 15 in patch 0 does not have neighbour cell face: 4(7 0 1 1)

From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 127.

FOAM aborting
And here is the code:

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

convertToMeters .001;

vertices
(
    (0 0 0) // 1
    (.66 0 0) // 2
    (2.965 0 0) // 3
    (0 .66 0) // 4
    (0 2.965 0) // 5 
    (-2.965 0 0) // 6
    (-.66 0 0) // 7
    (0 -.66 0) // 8 
    (0 -2.965 0) // 9
    (0 0 1.45) // 10
    (.66 0 1.45) // 11
    (2.965 0 1.45) // 12
    (0 .66 1.45) // 13
    (0 2.965 1.45) // 14
    (-2.965 0 1.45) // 15
    (-.66 0 1.45) // 16
    (0 -.66 1.45) // 17
    (0 -2.965 1.45) // 18
    (1.84 2.325 0) // 19
    (1.84 5.93 0) // 20
    (2.965 5.93 0) // 21
    (-2.325 1.84 0) // 22
    (-5.93 1.84 0) // 23
    (-5.93 2.965 0) // 24
    (-1.84 -2.325 0) // 25
    (-1.84 -5.93 0) // 26
    (-2.965 -5.93 0) // 27
    (2.325 -1.84 0) // 28
    (5.93 -1.84 0) // 29
    (5.93 -2.965 0) // 30   
    (1.84 2.325 1.45) // 31
    (1.84 5.93 1.45) // 32
    (2.965 5.93 1.45) // 33
    (-2.325 1.84 1.45) // 34
    (-5.93 1.84 1.45) // 35
    (-5.93 2.965 1.45) // 36
    (-1.84 -2.325 1.45) // 37
    (-1.84 -5.93 1.45) // 38
    (-2.965 -5.93 1.45) // 39
    (2.325 -1.84 1.45) // 40
    (5.93 -1.84 1.45) // 41
    (5.93 -2.965 1.45) // 42
    (0 0 14.5) // 43
    (.66 0 14.5) // 44
    (0 .66 14.5) // 45
    (-.66 0 14.5) // 46
    (0 -.66 14.5) // 47
    );


blocks 
(
 hex (0 1 3 0 9 10 12 9) (10 10 10) simpleGrading (1 1 1) 
 hex (6 0 3 6 15 9 12 15) (10 10 10) simpleGrading (1 1 1) 
 hex (0 6 7 0 9 15 16 9) (10 10 10) simpleGrading (1 1 1) 
 hex (1 0 7 0 10 9 16 9) (10 10 10) simpleGrading (1 1 1) 
 hex (1 2 4 3 10 11 13 12) (10 10 10) simpleGrading (1 1 1) 
 hex (5 6 3 4 14 15 12 13) (10 10 10) simpleGrading (1 1 1) 
 hex (6 5 8 7 15 14 17 16) (10 10 10) simpleGrading (1 1 1) 
 hex (2 1 7 8 11 10 16 17) (10 10 10) simpleGrading (1 1 1) 
 hex (20 19 18 2 32 31 30 11) (10 10 10) simpleGrading (1 1 1) 
 hex (22 21 4 23 34 33 13 35) (10 10 10) simpleGrading (1 1 1) 
 hex (26 25 24 5 38 37 36 14) (10 10 10) simpleGrading (1 1 1) 
 hex (8 29 28 27 17 41 40 39) (10 10 10) simpleGrading (1 1 1) 
 hex (9 10 12 9 42 43 44 42) (10 10 10) simpleGrading (1 1 1) 
 hex (15 9 12 15 45 42 44 45) (10 10 10) simpleGrading (1 1 1) 
 hex (9 15 16 9 42 45 46 42) (10 10 10) simpleGrading (1 1 1) 
 hex (10 9 16 10 43 42 46 43) (10 10 10) simpleGrading (1 1 1)  
);

edges
(
 arc 1 3 (.4667 .4667 0) // block 1 
 arc 10 12 (.4667 .4667 1.45) // block 1
 arc 3 6 (-.4667 .4667 0) // block 2
 arc 12 15 (-.4667 .4667 1.45) // block 2
 arc 6 7 (-.4667 -.4667 0) // block 3
 arc 15 16 (-.4667 -.4667 1.45) // block 3
 arc 1 7 (.4667 -.4667 0) // block 4
 arc 10 16 (.4667 -.4667 1.45) // block 4
 arc  2 4 (2.09657 2.09657 0) // block 5
 arc 11 13 (2.09657 2.09657 1.45) // block 5
 arc 4 5 (-2.09657 2.09657 0) // block 6
 arc 13 14 (-2.09657 2.09657 1.45) // block 6
 arc 5 8 (-2.09657 -2.09657 0) // block 7
 arc 14 17 (-2.09657 -2.09657 1.45) // block 7
 arc 2 8 (2.09657 -2.09657 0) // block 8
 arc 11 17 (2.09657 -2.09657 1.45) // block 8
 arc 2 18 (2.09657 2.09657 0) // block 9
 arc 11 30 (2.09657 2.09657 1.45) // block 9
 arc 4 21 (-2.09657 2.09657 0) // block 10
 arc 13 33 (-2.09657 2.09657 1.45) // block 10
 arc 5 24 (-2.09657 -2.09657 0) // block 11
 arc 14 36 (-2.09657 -2.09657 1.45) // block 11
 arc 2 8 (2.09657 -2.09657 0) // block 12
 arc 11 17 (2.09657 -2.09657 1.45) // block 12
 arc 43 44 (.4667 .4667 14.5) // block 13
 arc 44 45 (-.4667 .4667 14.5) // block 14
 arc 45 46 (-.4667 -.4667 14.5) // block 15
 arc 43 46 (.4667 -.4667 14.5) // block 16
);

boundary
(
    walls
    {
        type wall;
        faces
        (
	 (14 13 4 5) // upper left (6)
	 (17 14 5 8) // lower left (7)
	 (11 17 8 2) // lower right (8)
	 (13 11 2 4) // upper right (5)
	 (5 4 3 6) // bottom of 6
	 (8 5 6 7) // bottom of 7
	 (2 8 7 1) // bottom of 8
	 (4 2 1 3) // bottom of 5
	 (13 12 10 11) // top of 5
	 (13 14 15 12) // top of 6
	 (15 14 17 16) // top of 7
	 (11 10 16 17) // top of 8
	 (3 1 0 0) // bottom of 1 
	 (3 0 6 6) // bottom of 2
	 (7 6 0 0) // bottom of 3
	 (7 0 1 1) // bottom of 4
	 (30 31 19 18) // left side of 9
	 (32 11 2 20) // right side of 9
	 (19 20 2 18) // bottom of 9
	 (32 31 30 11) // top of 9
	 (35 13 4 23) // front of 10
	 (33 34 22 21) // back of 10
	 (23 4 21 22) // bottom of 10
	 (13 35 34 33) // top of 10
	 (38 14 5 26) // left of 11
	 (36 37 25 24) // right of 11
	 (5 24 25 26) // bottom of 11
	 (36 14 38 37) // top of 11
	 (39 40 28 27) // front of 12
	 (41 17 8 29) // back of 12
	 (27 28 29 8) // bottom of 12
	 (40 39 17 41) // top of 12
	 (44 43 10 12) // side of 13
	 (45 44 12 15) // side of 14
	 (46 45 15 16) // side of 15
	 (43 46 16 10) // side of 16
	 );
    }
    toMerge
    {
        type patch;
        faces
        (
	 (11 30 18 2) // 9
	 (13 33 21 4) // 10
	 (14 36 24 5) // 11
	 (17 39 27 8) // 12
        );
    }
    inlet1 // upper right
    {
        type patch;
        faces
        (
            (31 32 20 19)
        );
    }
    inlet2 // upper left
    {
      type patch;
      faces 
	(
	 (34 35 23 22)
	 );
    }
    inlet3 // lower left
    {
      type patch;
      faces
	(
	 (37 38 26 25)
	 );
    }
    inlet4 // lower right
    {
      type patch;
      faces 
	(
	 (40 41 29 28)
	 );
    }
    outlet
    {
        type patch;
        faces
        (
	 (43 44 42 42) // 13
	 (44 45 42 42) // 14
	 (45 46 42 42) // 15
	 (46 43 42 42) // 16
        );
    }
);

mergePatchPairs 
(
 ((13 11 2 4) (11 30 18 2)) // upper right
 ((14 13 4 5) (13 33 21 4)) // upper left
 ((17 14 5 8) (14 36 24 5)) // lower left
 ((11 17 8 2) (17 39 27 8)) // lower right
);

// ************************************************************************* //
I'm fairly new to OpenFOAM, so I'm not sure if this is the right approach. Do any errors jump out to anyone, or would anyone know the right approach to meshing this geometry?
jadtwo is offline   Reply With Quote

Old   July 20, 2013, 06:00
Default
  #2
Member
 
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17
Yosmcer will become famous soon enough
I think you should first focus on the fatal error before the warnings.

Code:
--> FOAM FATAL ERROR:
face 15 in patch 0 does not have neighbour cell face: 4(7 0 1 1)
[EDIT] I looked you code a bit further (the first 4 blocks) ans I have an advice and see an error.

Code:
 hex (0 1 3 0 9 10 12 9) (10 10 10) simpleGrading (1 1 1) 
 hex (6 0 3 6 15 9 12 15) (10 10 10) simpleGrading (1 1 1) 
 hex (0 6 7 0 9 15 16 9) (10 10 10) simpleGrading (1 1 1) 
 hex (1 0 7 0 10 9 16 9) (10 10 10) simpleGrading (1 1 1)
You seems to decides making the central cylinder from 4 triangular shapes (that can work, an other possibility is to have one square with rounded edges, but it depend of the meshing you want).

The first hex is right.
The second is right defined, but not symmetric with the first one. In the first case, you put the collapsed vertices in the center for the first one and on one of the side for the second.
This is better to put all in the center to avoid a strange mesh (see first attached picture).
The third block is right.
The forth block is wrong, "070": 07 and 70 is the same line, this cannot give you a block.


To see this, I started by saving a copy of the blockMesh file, and removing all the boundary/patches and blocks. So only remained the vertices (and the edges, but they are not taken into consideration if no block).
Than, I ran "paraFoam -block", that do not need to have blockMesh ran before, and will show me the vertices.
Once I have the vertices, I started to look at your blocks, and I could see the things I pointed here. I advice you to check the other block to be sure to correct them (if needed).
Attached Images
File Type: png Block1-2.png (10.3 KB, 22 views)
Yosmcer is offline   Reply With Quote

Old   November 6, 2014, 17:37
Default
  #3
New Member
 
Join Date: May 2012
Posts: 26
Rep Power: 14
jpando is on a distinguished road
I had to learn the hard way but remember, when you create your block:

the axis origin is the first entry in the block definition, vertex 0 in our example;
the x1 \relax \special {t4ht= direction is described by moving from vertex 0 to vertex 1;
the x2 \relax \special {t4ht= direction is described by moving from vertex 1 to vertex 2;
vertices 0, 1, 2, 3 define the plane x3 = 0 \relax \special {t4ht=;
vertex 4 is found by moving from vertex 0 in the x3 \relax \special {t4ht= direction;
vertices 5,6 and 7 are similarly found by moving in the x3 \relax \special {t4ht= direction from vertices 1,2 and 3 respectively.
jpando is offline   Reply With Quote

Reply

Tags
mesh, negative, volume


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
[ICEM] Problem with using the Delaunay volume mesh method manahara ANSYS Meshing & Geometry 12 December 25, 2014 22:54
'Exhaust Type' Volume Mesh Problem PWeller Siemens 0 April 23, 2014 05:37
Courant number blowing up, non-orthogonal mesh? odellar OpenFOAM Running, Solving & CFD 5 October 22, 2013 20:50
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 10:51.