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/)
-   -   [blockMesh] Creating O-meshes (https://www.cfd-online.com/Forums/openfoam-meshing/69523-creating-o-meshes.html)

MadsR October 26, 2009 08:44

Creating O-meshes
 
Hi.

I need to make an O-mesh using blockMesh, is someone able to help me out?
I need it for an airfoil, but a cylinder-example or the like would be great.


Thanks a lot!

/Mads

akidess October 26, 2009 11:56

There you go. This mesh has refinement towards both ends of the cylinder, so it could be simplified to use only five blocks.

Code:


FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.025;

vertices
(
    (0.21 0.21 0)
    (-0.21 0.21 0)
    (-0.21 -0.21 0)
    (0.21 -0.21 0)
    (0.21 0.21 1.2)
    (-0.21 0.21 1.2)
    (-0.21 -0.21 1.2)
    (0.21 -0.21 1.2)
    (0.353553 0.353553 0)
    (-0.353553 0.353553 0)
    (-0.353553 -0.353553 0)
    (0.353553 -0.353553 0)
    (0.353553 0.353553 1.2)
    (-0.353553 0.353553 1.2)
    (-0.353553 -0.353553 1.2)
    (0.353553 -0.353553 1.2)
    (0.21 0.21 0.6)
    (-0.21 0.21 0.6)
    (-0.21 -0.21 0.6)
    (0.21 -0.21 0.6)
    (0.353553 0.353553 0.6)
    (-0.353553 0.353553 0.6)
    (-0.353553 -0.353553 0.6)
    (0.353553 -0.353553 0.6)
);

blocks
(
    // center block 1
    hex (2 3 0 1 18 19 16 17) (23 23 53) simpleGrading (1 1 2.5)
    // right 1
    hex (3 11 8 0 19 23 20 16) (17 23 53) simpleGrading (1 1 2.5)
    // top 1
    hex (1 0 8 9 17 16 20 21) (23 17 53) simpleGrading (1 1 2.5)
    // left 1
    hex (10 2 1 9 22 18 17 21) (17 23 53) simpleGrading (1 1 2.5)
    // bottom 1
    hex (10 11 3 2 22 23 19 18) (23 17 53) simpleGrading (1 1 2.5)

    // center block 2
    hex (18 19 16 17 6 7 4 5) (23 23 53) simpleGrading (1 1 0.4)
    // right 2
    hex (19 23 20 16 7 15 12 4) (17 23 53) simpleGrading (1 1 0.4)
    // top 2
    hex (17 16 20 21 5 4 12 13) (23 17 53) simpleGrading (1 1 0.4)
    // left 2
    hex (22 18 17 21 14 6 5 13) (17 23 53) simpleGrading (1 1 0.4)
    // bottom 2
    hex (22 23 19 18 14 15 7 6) (23 17 53) simpleGrading (1 1 0.4)
);

edges
(
    arc 11 8 (0.5 0 0)
    arc 8 9 (0 0.5 0)
    arc 9 10 (-0.5 0 0)
    arc 10 11 (0 -0.5 0)
    arc 15 12 (0.5 0 1.2)
    arc 12 13 (0 0.5 1.2)
    arc 13 14 (-0.5 0 1.2)
    arc 14 15 (0 -0.5 1.2)
    arc 23 20 (0.5 0 0.6)
    arc 20 21 (0 0.5 0.6)
    arc 21 22 (-0.5 0 0.6)
    arc 22 23 (0 -0.5 0.6)
);

patches
(
    wall sideWalls
    (
        (11 23 20 8)
        (23 15 12 20)
        (8 20 21 9)
        (20 12 13 21)
        (9 10 22 21)
        (21 22 14 13)
        (10 11 23 22)
        (22 23 15 14)
    )

    wall bottomWall
    (
        (2 3 0 1)
        (3 11 8 0)
        (0 8 9 1)
        (2 1 9 10)
        (2 10 11 3)
    )

    wall topWall
    (
        (6 7 4 5)
        (7 15 12 4)
        (4 12 13 5)
        (6 5 13 14)
        (6 14 15 7)
    )

);

mergePatchPairs
(
);

// ************************************************************************* //


MadsR October 29, 2009 04:40

Thanks Anton.

I am trying to extend this to a mesh around an airfoil, and it's pretty hard (well, in principle it's simple, but it's so tedious work :-) ). You wouldn't happen to have a version for an airfoil which might be easier to extend? I'd like to make an automatic blockMeshDict generator for airfoil meshes (say, from a x,y,z airfoil-data file).

/Mads

akidess October 29, 2009 12:00

Unfortunately that's all I have, I've never tried to mesh an airfoil. Slightly offtopic, but isn't the mesh you need C-type? Because it collapses at the thin side of the foil?

Wouldn't it be possible to have your airfoil data-file as STL, and then just make the mesh with snappyHexMesh?

MadsR October 30, 2009 02:39

Anton, you are absolutely right about the C-mesh, typically used. But my airfoil has a blunt trailing edge (it's truncated and sharp), and an o-mesh is probably best in such cases.

I have tried snappyHexMesh (I think this tool is great, and I am looking forward to it being improved even more) but it has trouble with capturing the sharp trailing edge AND having it making boundary layers never really worked out for me...


All times are GMT -4. The time now is 13:01.