CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] Mesh refinement (https://www.cfd-online.com/Forums/openfoam-meshing/194756-mesh-refinement.html)

Friendly October 23, 2017 10:41

Mesh refinement
 
Hello,

I would like to refine a mesh next to a wall with several layers with a structured mesh. The problem is that my body is not a cuboid, so the refinement box doesnt fitt well.

My first try to solve the problem:

I have created a faceSet and then added all cells which are in contact with the faces to cellSet and then refined my layer. But this method works only with one layer.

Code:

{
        name    cells_wall;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name "Front|Back|Top|Bottom|p1|Left|Right";
        }
    }

{
        name    cells_wall;
        type    faceSet;
        action  subset;
        source  boxToFace;
        sourceInfo
        {
            box (-100 -100  0) (100 100 100);
        }
    }
    {
        name    box;
        type    cellSet;
        action  new;
        source  faceToCell;
        sourceInfo
        {
            set    cells_wall;
            option  any;
        }
    }

Does anyone know how to do this with n layers? For example to select all cells which are in contact with the cells of "cells_wall" and add them to the cellSet?


All times are GMT -4. The time now is 17:31.