1

Previous: Using blockMesh generator Up: Using blockMesh generator Next: Running blockMesh

This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

File blockMeshDict

  • Let us go through the file:
    # less $FOAM_RUN /cavity/system/blockMeshDict
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  dev                                   |
    |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      blockMeshDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
  • Header of OpenFOAM file
    convertToMeters 0.1;
    
  • Parameter convertToMeters allows the whole mesh scaling

     

blockMesh cartezian numbering verticies

Figure: A general blockMesh hex numbering.

  • vertices        
    (
        (0 0 0)
        (1 0 0)
        (1 1 0)
        (0 1 0)
        (0 0 0.1)
        (1 0 0.1)
        (1 1 0.1)
        (0 1 0.1)
    );
    
  • In section vertices there are written coordinates (points) of blocks of the mesh

     

    blocks          
    (
        hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
    );
    
  • In section blocks there are defined all blocks of the mesh; hex(0 1 2 3 4 5 6 7) (20 20 1) means hexahedral of eight vertices (0-7) according to order in vertices. The block is divided into 20 x 20 x 1 cells
  • Parameter simpleGrading allows refinement setting in the local directions (x y z); (1 1 1) = means uniform distribution in all directions
    The local directions for the block hex(0 1 2 3 4 5 6 7) are defined by following point couples:
    • direction x is defined by points with labels 0 -> 1
    • direction y is defined by points with labels 0 -> 3
    • direction z is defined by points with labels 0 -> 4

     

    edges           
    (
    );
    
  • In section edges there are defined curved edges connecting block vertices
  • If nothing is specified here, blockMesh uses lines

     

    boundary
    (
        movingWall
        {
            type wall;
            faces
            (
                (3 7 6 2)
            );
        }
        fixedWalls
        {
            type wall;
            faces
            (
                (0 4 7 3)
                (2 6 5 1)
                (1 5 4 0)
            );
        }
        frontAndBack
        {
            type empty;
            faces
            (
                (0 3 2 1)
                (4 5 6 7)
            );
        }
    );
    
  • In section boundary there are defined types of boundaries

     

    mergePatchPairs 
    (
    );
    
    // ************************************************************************* //
    
  • In section mergePatchPairs there can be defined boundaries to be merged