Contrib/blockMeshWithSets

From OpenFOAMWiki
Jump to: navigation, search

Valid versions: OF version 12.png

Contents

1 Short description

Generates a mesh from a blockMeshDict. Upward compatible with blockMesh

Beginning with OpenFOAM 1.3 this utility is obsolete, because its functionality is included in the regula blockMesh.

2 Usage

The usage is similar to blockMesh. The syntax of the dictionaries is the same except for one exception: in a block specification, if there is a word between the vertex numbers and the number of cells, then the block is added to the cell set with that name.

For instance in the example from the UserGuide 2.1.6 the original blocks section

blocks
(
    hex (0 1 4 3 9 10 13 12) (10 10 1) simpleGrading (2 2 1)
    hex (1 2 5 4 10 11 14 13) (10 10 1) simpleGrading (0.5 2 1)
    hex (3 4 7 6 12 13 16 15) (10 10 1) simpleGrading (2 0.5 1)
    hex (4 5 8 7 13 14 17 16) (10 10 1) simpleGrading (0.5 0.5 1)
);

can be changed to

blocks
(
    hex (0 1 4 3 9 10 13 12) set1 (10 10 1) simpleGrading (2 2 1)
    hex (1 2 5 4 10 11 14 13) set2 (10 10 1) simpleGrading (0.5 2 1)
    hex (3 4 7 6 12 13 16 15) (10 10 1) simpleGrading (2 0.5 1)
    hex (4 5 8 7 13 14 17 16) set1 (10 10 1) simpleGrading (0.5 0.5 1)
);

This generates two cell sets:

set1 
consists of the first and the fourth block
set2 
the second block

If the switch --writeZones is used then no cellSets but cellZones are written.

If no cell-sets are found the utility behaves exactely like original blockMesh.

3 Technical

To work around a typo in OpenFOAM 1.2 a dummy faceZone of size 0 is generated and written.

4 Download

The tar file with the sources Basically this is the original blockMesh utility with some minor modifications.

5 History

This utility was discussed in this thread on the Message Board.

--Bgschaid 22:32, 12 Oct 2005 (CEST)

New version that writes cellZones uploaded

--Bgschaid 23:50, 19 Oct 2005 (CEST)