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

Easy problem - blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2009, 03:10
Default Easy problem - blockMesh
  #1
Member
 
Join Date: Jun 2009
Posts: 36
Rep Power: 16
dipling is on a distinguished road
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
Attached Images
File Type: gif meshing.GIF (2.4 KB, 26 views)
dipling is offline   Reply With Quote

Old   July 24, 2009, 03:49
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by dipling View Post
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)
gschaider is offline   Reply With Quote

Old   July 24, 2009, 04:26
Default
  #3
Member
 
Join Date: Jun 2009
Posts: 36
Rep Power: 16
dipling is on a distinguished road
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
dipling is offline   Reply With Quote

Old   July 24, 2009, 04:29
Default
  #4
Member
 
Julien Schaguene
Join Date: Apr 2009
Location: France
Posts: 55
Rep Power: 17
Schag is on a distinguished road
Take a look in the tutorials, lesInterFoam, nozzleFlow2D, blockMeshDict, I think the same kind of geometry is implemented there.
Schag is offline   Reply With Quote

Old   July 24, 2009, 04:32
Default
  #5
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
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
henrik is offline   Reply With Quote

Old   July 24, 2009, 04:36
Default
  #6
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   July 24, 2009, 04:41
Default
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Schag View Post
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.
gschaider is offline   Reply With Quote

Old   July 24, 2009, 04:48
Default
  #8
Member
 
Join Date: Jun 2009
Posts: 36
Rep Power: 16
dipling is on a distinguished road
Quote:
Originally Posted by ngj View Post
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
dipling is offline   Reply With Quote

Old   July 24, 2009, 05:02
Default
  #9
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Try this

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

Best regards,

Niels
ngj is offline   Reply With Quote

Old   July 24, 2009, 05:09
Default
  #10
Member
 
Join Date: Jun 2009
Posts: 36
Rep Power: 16
dipling is on a distinguished road
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
dipling is offline   Reply With Quote

Old   July 24, 2009, 05:16
Default
  #11
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
Dipling,

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

Henrik
henrik is offline   Reply With Quote

Old   July 24, 2009, 05:17
Default
  #12
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   July 24, 2009, 08:28
Default
  #13
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by ngj View Post
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
gschaider is offline   Reply With Quote

Old   July 27, 2009, 07:19
Default
  #14
Member
 
Join Date: Jun 2009
Posts: 36
Rep Power: 16
dipling is on a distinguished road
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.

Last edited by dipling; July 27, 2009 at 07:40.
dipling 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
Incoherent problem table in hollow-fiber spinning Gianni FLUENT 0 April 5, 2008 10:33
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Problem in Tutorial problem of fluent Phanindra FLUENT 5 April 17, 2007 09:57
problem with using colocated code Jack Main CFD Forum 0 December 15, 2002 00:15
GAMBIT meshing problem Gauthier Lambert Main CFD Forum 1 August 3, 2000 09:22


All times are GMT -4. The time now is 12:43.