6

Next: Merging meshes Up: Mesh Generation using snappyHexMesh Previous: Wheel mesh   Contents   Index

Volute mesh

The third mesh to create is the mesh of the volute. It is biggest in dimension; still, the cell count is smaller than in the wheel region due to weaker volume refinement. We use, again, the same background mesh, which we used in the previous two regions. By running the meshers blockMesh and snappyHexMesh we complete the volute mesh.

The computation is started by typing:

# blockMesh

# snappyHexMesh
The important section of the settings for snappyHexMesh is presented in the next listing:

castellatedMesh true;
snap            true;
addLayers       false;


// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
    outflow.obj
    {
        type triSurfaceMesh;
        name outflow_wall;
    }
    housing.obj
    {
        type triSurfaceMesh;
        name housing_wall;
    }
    wheel_disc1.obj
    {
        type triSurfaceMesh;
        name volute_disc1_wall;
    }
    wheel_disc2.obj
    {
        type triSurfaceMesh;
        name volute_disc2_wall;
    }
    wheel_pivot.obj
    {
        type triSurfaceMesh;
        name volute_pivot_wall;
    }
    wheel_pad.obj
    {
        type triSurfaceMesh;
        name volute_pad_wall;
    }
    wheel_outlet.obj
    {
        type triSurfaceMesh;
        name wheel_outlet_2;
    }
};



// Settings for the castellatedMesh generation.
castellatedMeshControls
{

    // Refinement parameters
    // ~~~~~~~~~~~~~~~~~~~~~

    // If local number of cells is >= maxLocalCells on any processor
    // switches from from refinement followed by balancing
    // (current method) to (weighted) balancing before refinement.
    maxLocalCells 1000000;

    // Overall cell limit (approximately). Refinement will stop immediately
    // upon reaching this number so a refinement level might not complete.
    // Note that this is the number of cells before removing the part which
    // is not 'visible' from the keepPoint. The final number of cells might
    // actually be a lot less.
    maxGlobalCells 5000000;

    // The surface refinement loop might spend lots of iterations refining just a
    // few cells. This setting will cause refinement to stop if <= minimumRefine
    // are selected for refinement. Note: it will at least do one iteration
    // (unless the number of cells to refine is 0)
    minRefinementCells 0;

    // Number of buffer layers between different levels.
    // 1 means normal 2:1 refinement restriction, larger means slower
    // refinement.
    nCellsBetweenLevels 2;



    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies a level for any cell intersected by its edges.
    // This is a featureEdgeMesh, read from constant/triSurface for now.
    features
    (
        {
            file    "features.obj";
            levels
            (
                (0 4)
            );
        }
    );



    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies two levels for every surface. The first is the minimum level,
    // every cell intersecting a surface gets refined up to the minimum level.
    // The second level is the maximum level. Cells that 'see' multiple
    // intersections where the intersections make an
    // angle > resolveFeatureAngle get refined up to the maximum level.

    refinementSurfaces
    {
        "(volute_disc1_wall|volute_disc2_wall)"
        {
            level (5 5);
            patchInfo
            {
                type wall;
            }
        }
        "(outflow_wall|housing_wall|volute_pivot_wall|volute_pad_wall)"
        {
            level (3 3);
            patchInfo
            {
                type wall;
            }
        }
        wheel_outlet_2
        {
            level (4 4);
        }
    }

    resolveFeatureAngle 10;


    // Region-wise refinement
    // ~~~~~~~~~~~~~~~~~~~~~~

    // Specifies refinement level for cells in relation to a surface. One of
    // three modes
    // - distance. 'levels' specifies per distance to the surface the
    //   wanted refinement level. The distances need to be specified in
    //   descending order.
    // - inside. 'levels' is only one entry and only the level is used. All
    //   cells inside the surface get refined up to the level. The surface
    //   needs to be closed for this to be possible.
    // - outside. Same but cells outside.

    refinementRegions
    {
    }

    // Mesh selection
    // ~~~~~~~~~~~~~~

    // After refinement patches get added for all refinementSurfaces and
    // all cells intersecting the surfaces get put into these patches. The
    // section reachable from the locationInMesh is kept.
    // NOTE: This point should never be on a face, always inside a cell, even
    // after refinement.
    // This is an outside point locationInMesh (-0.033 -0.033 0.0033);
    locationInMesh (-2 0.5 0.001); // Inside point

    // Whether any faceZones (as specified in the refinementSurfaces)
    // are only on the boundary of corresponding cellZones or also allow
    // free-standing zone faces. Not used if there are no faceZones.
    allowFreeStandingZoneFaces true;
}

The surface refinement levels are chosen to be consistent with the wheel region. So, for wheel parts we use level 5, for interface level 4 and for the rest level 3. Lines 112-118 request the mesher to refine also some other cells, that are along the feature edges stored in the file features.obj. These edges are part of the housing geometry, which is large, and we do not want to needlessly refine the whole patch. Instead of that some edges have been extracted and supplied as features.