Skip to content

refineMesh

Natalie Wagenbrenner edited this page Apr 16, 2015 · 4 revisions

After moveDynamicMesh runs, refineMesh is used to refine the near-surface cells in order to get a finer final mesh resolution near the ground. The syntax is:

refineMesh -dict system/refineMeshDict

The list of cells to refine is specified in system/refineMeshDict by the following line:

set refineCells

The list of cells (refineCells) can be generated by:

topoSet -dict system/topoSetDict

which generates a list of cells based on the settings in system/topoSetDict. There are multiple ways to generate cell lists. These are the settings we use to define cells near the ground:

actions
(
    // Select based on surface
    {   
        name   refineCells;
        type   cellSet;
        action new;
        source surfaceToCell;
        sourceInfo
        {   
            file            "constant/triSurface/askervein.stl";
            outsidePoints   ((0 0 300));    // definition of outside
            includeCut      false;              // cells cut by surface
            includeInside   false;              // cells not on outside of surf
            includeOutside  false;              // cells on outside of surf
            nearDistance    50.0;                 // cells with centre near surf
                                        // (set to -1 if not used)
            curvature       -100;                // cells within nearDistance
                                        // and near surf curvature
                                        // (set to -100 if not used)
        }   
    }   
);

See system/topoSetDict and here for other methods:https://openfoamwiki.net/index.php/TopoSet