CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Easy problem - blockMesh (http://www.cfd-online.com/Forums/openfoam/66792-easy-problem-blockmesh.html)

dipling July 24, 2009 03:10

Easy problem - blockMesh
 
1 Attachment(s)
Good morning,

i have some problems to create a mesh. Always the same errorcode.

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.5                                  |
|  \\  /    A nd          | Web:      http://www.openfoam.org              |
|    \\/    M anipulation  | Project:    dsl      |
\*---------------------------------------------------------------------------*/
 
FoamFile
{
    version        2.0;
    format          ascii;
 
    class          dictionary;
    object          blockMeshDict;
}
 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
convertToMeters 0.001;
 
vertices       
(
    // Block 0
    (0 0 0) //#0
    (50 0 0) // #1
    (25 0 50) //#2
    (0 100 0)  //#3
    (50 100 0) //#4
    (25 100 50) //#5
);
blocks         
(
  hex (0 1 2 0 4 3 5 4) (20 10 10) simpleGrading (2 1 1)
);
edges         
(
);
 
patches       
(
    wall kolben
    (
    (0 0 1 2)
    )
 
    patch repatch
    (   
    (0 1 3 4)
    (1 2 4 5)
    (0 2 3 5)
    )
    symmetryPlane axis
    (
        (0 3 3 0)
    )
    wall cylinderHead
    (
        (3 4 5 3)     
    )
);
 
mergePatchPairs
(
);


I think it is a simple understandingproblem.


ErrorCode:


face 1 in patch 1 does not have neighbour cell face: 4(1 2 4 5)


Big thanks

gschaider July 24, 2009 03:49

Quote:

Originally Posted by dipling (Post 223959)
Good morning,

i have some problems to create a mesh. Always the same errorcode.

[code]
<snip>

patches
(
wall kolben
(
(0 0 1 2)
)

<snip>
symmetryPlane axis
(
(0 3 3 0)
)
<snip>

The answer is a simple "I'm sorry, you shouldn't do that". Think about what will become of the cells near to the axis. But at least you'll have to introduce "shadow points" for 0 and 3 (identical in position) to satisfy the topological needs of blockMesh - I think. Or in other words: take a cube from the tutorials and move two points on top of two others. That should work (good luck with the calculations on that grid)

dipling July 24, 2009 04:26

ok tried it with a simple cube.

Code:

.....
vertices
(
  (0 0 0) //#0
    (50 0 0) // #1
    (50 0 50) //#2
    (0 0 50)  //#3
    (0 100 0) //#4
    (50 100 0) //#5
    (50 100 50)//#6
    (0 100 50)//#7
);

blocks         
(
  hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)
);

.....

patches       
(
    wall kolben
    (
    (0 1 2 3)
    )

    patch repatch
    (   
    (0 1 4 5)
    (1 2 5 6)
    (2 3 6 7)
    (0 3 4 7)
    )
    wall cylinderHead
    (
        (4 5 6 7)     
        //(11 6 5 10)
    )
);

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

Default patch type set to empty


face 0 in patch 1 does not have neighbour cell face: 4(0 1 4 5)


Don't get the problem. It is a simple cube, like in icoFoam an I get so many errors :(

Schag July 24, 2009 04:29

Take a look in the tutorials, lesInterFoam, nozzleFlow2D, blockMeshDict, I think the same kind of geometry is implemented there.

henrik July 24, 2009 04:32

Dipling,

try to mesh with three blocks by putting eight extra points - 3 on the edges and one in the centre of the front and back triangle.

Henrik

ngj July 24, 2009 04:36

You need to be careful with the orientation of your boundary faces. The boundary face causing problems

(0 1 4 5)

should be

(0 1 5 4)

Best regards,

Niels

gschaider July 24, 2009 04:41

Quote:

Originally Posted by Schag (Post 223969)
Take a look in the tutorials, lesInterFoam, nozzleFlow2D, blockMeshDict, I think the same kind of geometry is implemented there.

Yeah. But the crucial difference is that in that example the wedge is 1 cell thick. In dipling's blockMesh it would be 10 cells thick which means that on each point of the axis 10 degenerated cubes will meet. A valid mesh, but the quality of the cells won't be overwhelmingly good, I think.

dipling July 24, 2009 04:48

Quote:

Originally Posted by ngj (Post 223972)
You need to be careful with the orientation of your boundary faces. The boundary face causing problems

(0 1 4 5)

should be

(0 1 5 4)

Best regards,

Niels


Hey Niels, your advice seemed to be help a little bit. Don't get the neighbour face error.But still not creating the mesh for the simple cube-case. Still get errors with zero and negative cellvolumes.:(



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




Default patch type set to empty

Check block mesh topology

Basic statistics
Number of internal faces : 0
Number of boundary faces : 6
Number of defined boundary faces : 6
Number of undefined boundary faces : 0

Checking patch -> block consistency

Creating block offsets

Creating merge list .

Creating points

Creating cells

Creating patches

Creating mesh from block mesh

Default patch type set to empty

Creating merge patch pairs


Writing polyMesh


Failed writing polyMesh.

From function blockMesh
in file genBlockMesh.C at line 422.

FOAM exiting

ngj July 24, 2009 05:02

Try this

hex (0 1 5 4 3 2 6 7) (10 10 10 ) simpleGrading (1 1 1)

Best regards,

Niels

dipling July 24, 2009 05:09

thank u niels,

the errors for the volumes dont appear anymore. Why ( 1 2 3 4 5 6 7) going wrong, and (0 1 5 4 3 2 6 7) not ? I want to understand the problem. ;)

But he still outputs the last error:

Failed writing polyMesh.

From function blockMesh
in file genBlockMesh.C at line 422.

FOAM exiting

henrik July 24, 2009 05:16

Dipling,

the points that define blocks and faces must be ordered in a particular way as described in the manuals.

Henrik

ngj July 24, 2009 05:17

Draw a cube and add the vertex numbers and connect them in the order you specified at first. Then you will realize what went wrong.
If that does not help, you should read the guide in UserGuide very carefully.

Best regards,

Niels

gschaider July 24, 2009 08:28

Quote:

Originally Posted by ngj (Post 223983)
Draw a cube and add the vertex numbers and connect them in the order you specified at first. Then you will realize what went wrong.
If that does not help, you should read the guide in UserGuide very carefully.

Somewhere (either on the Forum or on the Wiki) there is an OpenOffice-document floating around: You print it out, cut by the edges, glue it together and voila you got a 3D-cube with all the numbers in the right places

dipling July 27, 2009 07:19

Ok, thnx @ all. There's still a lot to be done.

Btw:


Failed writing polyMesh.

From function blockMesh
in file genBlockMesh.C at line 422.


Was an access right problem.


All times are GMT -4. The time now is 21:52.