CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   HOW to set a circular face by toposet (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/123221-how-set-circular-face-toposet.html)

Jessica September 7, 2013 06:26

HOW to set a circular face by toposet
 
Hello,everyone
There is a simple blockmesh, it is easy to set a square face on the boundray by topoSet using 'boxtoface' as follows.

Code:

BLOCKMESH:
vertices
(
    (-0.5 -0.5 0)
    ( 0.5 -0.5 0)
    ( 0.5 -0.5 1)
    (-0.5 -0.5 1)
    (-0.5  0.5 0)
    ( 0.5  0.5 0)
    ( 0.5  0.5 1)
    (-0.5  0.5 1)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    base
    {
        type patch;
        faces
        (
            (0 1 5 4)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (3 2 6 7)
        );
    }
    sides
    {
        type patch;
        faces
        (
            (0 4 7 3)
            (0 1 2 3)
            (1 5 6 2)
            (4 5 6 7)
        );
    }
);

TOPOSET:
actions
(
    {
        name    f0;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (-0.1 -0.001 -0.1)(0.1 0.005 0.1);
        }
    }
);

But I don't know how to set a circular face using the toposet, and I am puzzled after 'cylinderToCell' , please help me!

Code:

TOPOSET
  {
        name    c0;
        type    cellSet;
        action  new;
        source  cylinderToCell;
        sourceInfo
        {
        p1      (0 0 -0.001); // start point on cylinder axis
        p2      (0 0 0.025);  // end point on cylinder axis
        radius  0.2;
        }
    }

Thanks in advance!!!

Artur September 11, 2013 06:33

As far as I know, cylinderToCell will select all cells inside the cylinder with the two circle centres at p1 and p2 with radius r, that's about it. If your mesh is a box then it will not turn it into a cylindrical mesh, I think.

The way I use it to create AMI interfaces is by snapping the mesh to a cylindrical shape and then using the cylinderToCell to select the snapped cells, much as in the propeller tutorial.

Jessica September 12, 2013 21:54

Quote:

Originally Posted by Artur (Post 451089)
As far as I know, cylinderToCell will select all cells inside the cylinder with the two circle centres at p1 and p2 with radius r, that's about it. If your mesh is a box then it will not turn it into a cylindrical mesh, I think.

The way I use it to create AMI interfaces is by snapping the mesh to a cylindrical shape and then using the cylinderToCell to select the snapped cells, much as in the propeller tutorial.

Hi,Autur,
Thank you for you reply. I'm trying.


All times are GMT -4. The time now is 14:28.