CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] snappyHexMesh and cyclic boundaries

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Ruli

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 6, 2013, 08:55
Default snappyHexMesh and cyclic boundaries
  #1
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 14
Ruli is on a distinguished road
Dear Foamers,
again I ask for help. I am working on the simulation of a rotating wind turbine rotor blade. With blockMesh I create a 120° 'wedge' which later shall contain 1 rotor blade (see figure 1). Finally I figured out how to create the blockMesh blocks in a way, that snappy works properly, see here:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}

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

#include        "include/vertices"

convertToMeters 1;

vertices
(
    ($x_up_up         $y_in_out     $z_in_out_pos)
    ($x_up         $y_in_out     $z_in_out_pos)
    ($x_down         $y_in_out     $z_in_out_pos)
    ($x_down_down     $y_in_out     $z_in_out_pos)
    ($x_up_up         $y_mid_out     $z_mid_out_pos)
    ($x_up         $y_mid_out     $z_mid_out_pos)
    ($x_down         $y_mid_out     $z_mid_out_pos)
    ($x_down_down     $y_mid_out     $z_mid_out_pos)
    ($x_up_up         $y_out_out     $z_out_out_pos)
    ($x_up         $y_out_out     $z_out_out_pos)
    ($x_down         $y_out_out     $z_out_out_pos)
    ($x_down_down     $y_out_out     $z_out_out_pos)

    ($x_up_up         $y_in_in     $z_in_in_pos)
    ($x_up         $y_in_in     $z_in_in_pos)
    ($x_down         $y_in_in     $z_in_in_pos)
    ($x_down_down     $y_in_in     $z_in_in_pos)
    ($x_up_up         $y_mid_in     $z_mid_in_pos)
    ($x_up         $y_mid_in     $z_mid_in_pos)
    ($x_down         $y_mid_in     $z_mid_in_pos)
    ($x_down_down     $y_mid_in    $z_mid_in_pos)
    ($x_up_up         $y_out_in    $z_out_in_pos)
    ($x_up         $y_out_in    $z_out_in_pos)
    ($x_down         $y_out_in    $z_out_in_pos)
    ($x_down_down     $y_out_in    $z_out_in_pos)

    ($x_up_up         $y_in_in     $z_in_in_neg)
    ($x_up         $y_in_in    $z_in_in_neg)
    ($x_down         $y_in_in     $z_in_in_neg)
    ($x_down_down     $y_in_in     $z_in_in_neg)
    ($x_up_up         $y_mid_in     $z_mid_in_neg)
    ($x_up         $y_mid_in     $z_mid_in_neg)
    ($x_down         $y_mid_in     $z_mid_in_neg)
    ($x_down_down     $y_mid_in    $z_mid_in_neg)
    ($x_up_up         $y_out_in     $z_out_in_neg)
    ($x_up         $y_out_in     $z_out_in_neg)
    ($x_down         $y_out_in     $z_out_in_neg)
    ($x_down_down     $y_out_in     $z_out_in_neg)

    ($x_up_up         $y_in_out     $z_in_out_neg)
    ($x_up         $y_in_out     $z_in_out_neg)
    ($x_down         $y_in_out     $z_in_out_neg)
    ($x_down_down     $y_in_out     $z_in_out_neg)
    ($x_up_up         $y_mid_out     $z_mid_out_neg)
    ($x_up         $y_mid_out     $z_mid_out_neg)
    ($x_down         $y_mid_out     $z_mid_out_neg)
    ($x_down_down     $y_mid_out     $z_mid_out_neg)
    ($x_up_up         $y_out_out     $z_out_out_neg)
    ($x_up         $y_out_out     $z_out_out_neg)
    ($x_down         $y_out_out     $z_out_out_neg)
    ($x_down_down     $y_out_out     $z_out_out_neg)
);

blocks
(
    hex (12 13 17 16 0 1 5 4) ($N_x_up $N_y_c $N_z_pos) simpleGrading ($R_x_up 1 $R_z_pos)
    hex (24 25 29 28 12 13 17 16) ($N_x_up $N_y_c $N_z_c) simpleGrading ($R_x_up 1 1)
    hex (36 37 41 40 24 25 29 28) ($N_x_up $N_y_c $N_z_neg) simpleGrading ($R_x_up 1 $R_z_neg)

    hex (16 17 21 20 4 5 9 8) ($N_x_up $N_y $N_z_pos) simpleGrading ($R_x_up $R_y $R_z_pos)
    hex (28 29 33 32 16 17 21 20) ($N_x_up $N_y $N_z_c) simpleGrading ($R_x_up $R_y 1)
    hex (40 41 45 44 28 29 33 32) ($N_x_up $N_y $N_z_neg) simpleGrading ($R_x_up $R_y $R_z_neg)

    hex (13 14 18 17 1 2 6 5) ($N_x_c $N_y_c $N_z_pos) simpleGrading (1 1 $R_z_pos)
    hex (25 26 30 29 13 14 18 17) ($N_x_c $N_y_c $N_z_c) simpleGrading (1 1 1)
    hex (37 38 42 41 25 26 30 29) ($N_x_c $N_y_c $N_z_neg) simpleGrading (1 1 $R_z_neg)

    hex (17 18 22 21 5 6 10 9) ($N_x_c $N_y $N_z_pos) simpleGrading (1 $R_y $R_z_pos)
    hex (29 30 34 33 17 18 22 21) ($N_x_c $N_y $N_z_c) simpleGrading (1 $R_y 1)
    hex (41 42 46 45 29 30 34 33) ($N_x_c $N_y $N_z_neg) simpleGrading (1 $R_y $R_z_neg)

    hex (14 15 19 18 2 3 7 6) ($N_x_down $N_y_c $N_z_pos) simpleGrading ($R_x_down 1 $R_z_pos)
    hex (26 27 31 30 14 15 19 18) ($N_x_down $N_y_c $N_z_c) simpleGrading ($R_x_down 1 1)
    hex (38 39 43 42 26 27 31 30) ($N_x_down $N_y_c $N_z_neg) simpleGrading ($R_x_down 1 $R_z_neg)

    hex (18 19 23 22 6 7 11 10) ($N_x_down $N_y $N_z_pos) simpleGrading ($R_x_down $R_y $R_z_pos)
    hex (30 31 35 34 18 19 23 22) ($N_x_down $N_y $N_z_c) simpleGrading ($R_x_down $R_y 1)
    hex (42 43 47 46 30 31 35 34) ($N_x_down $N_y $N_z_neg) simpleGrading ($R_x_down $R_y $R_z_neg)
);

edges
(
    arc 0 12  ($x_up_up     $y_arc_in     $z_arc_in_pos)
    arc 12 24 ($x_up_up     $y_arc_in_c     $z_arc_in_c)
    arc 24 36 ($x_up_up     $y_arc_in     $z_arc_in_neg)

    arc 1 13  ($x_up         $y_arc_in     $z_arc_in_pos)
    arc 13 25 ($x_up         $y_arc_in_c     $z_arc_in_c)
    arc 25 37 ($x_up         $y_arc_in     $z_arc_in_neg)

    arc 2 14  ($x_down         $y_arc_in     $z_arc_in_pos)
    arc 14 26 ($x_down         $y_arc_in_c     $z_arc_in_c)
    arc 26 38 ($x_down         $y_arc_in     $z_arc_in_neg)

    arc 3 15  ($x_down_down     $y_arc_in     $z_arc_in_pos)
    arc 15 27 ($x_down_down     $y_arc_in_c     $z_arc_in_c)
    arc 27 39 ($x_down_down     $y_arc_in     $z_arc_in_neg)

    arc 4 16  ($x_up_up     $y_arc_mid     $z_arc_mid_pos)
    arc 16 28 ($x_up_up     $y_arc_mid_c     $z_arc_mid_c)
    arc 28 40 ($x_up_up     $y_arc_mid     $z_arc_mid_neg)

    arc 5 17  ($x_up         $y_arc_mid     $z_arc_mid_pos)
    arc 17 29 ($x_up         $y_arc_mid_c     $z_arc_mid_c)
    arc 29 41 ($x_up         $y_arc_mid     $z_arc_mid_neg)

    arc 6 18  ($x_down         $y_arc_mid     $z_arc_mid_pos)
    arc 18 30 ($x_down         $y_arc_mid_c     $z_arc_mid_c)
    arc 30 42 ($x_down         $y_arc_mid     $z_arc_mid_neg)

    arc 7 19  ($x_down_down     $y_arc_mid     $z_arc_mid_pos)
    arc 19 31 ($x_down_down     $y_arc_mid_c     $z_arc_mid_c)
    arc 31 43 ($x_down_down     $y_arc_mid     $z_arc_mid_neg)

    arc 8 20  ($x_up_up     $y_arc_out     $z_arc_out_pos)
    arc 20 32 ($x_up_up     $y_arc_out_c     $z_arc_out_c)
    arc 32 44 ($x_up_up     $y_arc_out     $z_arc_out_neg)

    arc 9 21  ($x_up         $y_arc_out     $z_arc_out_pos)
    arc 21 33 ($x_up         $y_arc_out_c     $z_arc_out_c)
    arc 33 45 ($x_up         $y_arc_out     $z_arc_out_neg)

    arc 10 22 ($x_down        $y_arc_out     $z_arc_out_pos)
    arc 22 34 ($x_down         $y_arc_out_c     $z_arc_out_c)
    arc 34 46 ($x_down         $y_arc_out     $z_arc_out_neg)

    arc 11 23 ($x_down_down     $y_arc_out     $z_arc_out_pos)
    arc 23 35 ($x_down_down     $y_arc_out_c     $z_arc_out_c)
    arc 35 47 ($x_down_down     $y_arc_out     $z_arc_out_neg)

    polyLine 24 28 (
    ($x_up_up $y_TE_in $z_TE_in)
    ($x_up_up $y_TE_mid $z_TE_mid)
    ($x_up_up $y_TE_out $z_TE_out)
               )
    polyLine 25 29 (
    ($x_up $y_TE_in $z_TE_in)
    ($x_up $y_TE_mid $z_TE_mid)
    ($x_up $y_TE_out $z_TE_out)
               )
    polyLine 26 30 (
    ($x_down $y_TE_in $z_TE_in)
    ($x_down $y_TE_mid $z_TE_mid)
    ($x_down $y_TE_out $z_TE_out)
               )
    polyLine 27 31 (
    ($x_down_down $y_TE_in $z_TE_in)
    ($x_down_down $y_TE_mid $z_TE_mid)
    ($x_down_down $y_TE_out $z_TE_out)
               )

);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (4 16 12 0)
            (16 28 24 12)
            (28 40 36 24)
            (8 20 16 4)
            (20 32 28 16)
            (32 44 40 28)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (7 3 15 19)
            (19 15 27 31)
            (31 27 39 43)
            (11 7 19 23)
            (23 19 31 35)
            (35 31 43 47)
        );
    }
    innerWall
    {
        type wall;
        faces
        (
            (0 12 13 1)
            (12 24 25 13)
            (24 36 37 25)
            (1 13 14 2)
            (13 25 26 14)
            (25 37 38 26)
            (2 14 15 3)
            (14 26 27 15)
            (26 38 39 27)
        );
    }
    outerWall
    {
        type patch;
        faces
        (
            (8 9 21 20)
            (20 21 33 32)
            (32 33 45 44)
            (9 10 22 21)
            (21 22 34 33)
            (33 34 46 45)
            (10 11 23 22)
            (22 23 35 34)
            (34 35 47 46)
        );
    }
    /*rightWall
    {
        type patch;
    faces
        (
            (8 4 5 9)
            (4 0 1 5)
            (9 5 6 10)
            (5 1 2 6)
            (10 6 7 11)
            (6 2 3 7)
        );
    }
    leftWall
    {
        type patch;
    faces
        (
            (44 45 41 40)
            (40 41 37 36)
            (45 46 42 41)
            (41 42 38 37)
            (46 47 43 42)
            (42 43 39 38)
        );
    }*/
    rightWall
    {
        type cyclic;
        neighbourPatch leftWall;
    faces
        (
            (8 4 5 9)
            (4 0 1 5)
            (9 5 6 10)
            (5 1 2 6)
            (10 6 7 11)
            (6 2 3 7)
        );
    }
    leftWall
    {
        type cyclic;
        neighbourPatch rightWall;
    faces
        (
            (44 45 41 40)
            (40 41 37 36)
            (45 46 42 41)
            (41 42 38 37)
            (46 47 43 42)
            (42 43 39 38)
        );
    }
);

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

// +++ Vertex coodinates
//x-direction
x_up_up            -4;
x_up                -0.04;
x_down_down             7;
x_down                 0.03;
//y-direction
y_in_out             0.03457;
y_mid_out             0.55957;
y_out_out             2.50000;
y_in_in                 0.05988;
y_mid_in             1.10988;
y_out_in             4.33013;
//z-direction
z_in_out_pos         0.05988;
z_in_out_neg         -0.05988;
z_mid_out_pos        0.96921;
z_mid_out_neg        -0.96921;
z_out_out_pos        4.33013;
z_out_out_neg        -4.33013;
z_in_in_pos          0.03457;
z_in_in_neg          -0.03457;
z_mid_in_pos         0.03457;
z_mid_in_neg         -0.03457;
z_out_in_pos         2.50000;
z_out_in_neg         -2.50000;

// +++ Block grading parameters
//x-direction
N_x_c                 20;
N_x_up                 65;
N_x_down             95;
R_x_up                 0.01334;
R_x_down             95.78231;
//y-direction
N_y_c                 300;
N_y                 65;
R_y                 73.47398;
//z-direction
N_z_c                 10;
N_z_pos                 5;
N_z_neg                 5;
R_z_pos                 1.12151;
R_z_neg                 0.89166;

// +++ Arc vertices
//y-coordinates
y_arc_in_c        0.06914;
y_arc_mid_c        1.11914;
y_arc_out_c        5.00000;
y_arc_in        0.04889;
y_arc_mid        0.79135;
y_arc_out        3.53553;
//z-coordinates
z_arc_in_c        0.00000;
z_arc_mid_c        0.00000;
z_arc_out_c        0.00000;
z_arc_in_pos        0.04889;
z_arc_in_neg        -0.04889;
z_arc_mid_pos        0.79135;
z_arc_mid_neg        -0.79135;
z_arc_out_pos        3.53553;
z_arc_out_neg        -3.53553;

// +++ TE vertices
y_TE_in            0.167;
y_TE_mid        0.333;
y_TE_out        0.5;

z_TE_in            -0.07;
z_TE_mid        -0.07;
z_TE_out        -0.03457;


#inputMode           merge

// ************************************************************************* //
But here is my current problem: If I set the faces on the wedge sites as cyclic, snappy does work very slowly (even in non-parallel mode) and brings the following 'error' messages ("Cannot find point ..."):

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.2-9240f8b967db
Exec   : snappyHexMesh
Date   : Dec 06 2013
Time   : 14:33:26
Host   : "julian-Pc"
PID    : 3959
Case   : /home/julian/OpenFOAM/julian-2.2.2/run/mesh_MRF_20131206
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Read mesh in = 1.05 s

Overall mesh bounding box  : (-4 0.03457 -4.33013) (7 5 4.33013)
Relative tolerance         : 1e-06
Absolute matching distance : 1.48545e-05

Reading refinement surfaces.
Read refinement surfaces in = 0.58 s

Reading refinement shells.
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
Checked shell refinement in = 0 s

Reading features.
Read features in = 0 s


Determining initial surface intersections
-----------------------------------------

Edge intersection testing:
    Number of edges             : 3952900
    Number of edges to retest   : 3952900
    Number of intersected edges : 5663
Calculated surface intersections in = 4.89 s

Initial mesh : cells:1314000  faces:3952900  points:1324920
Cells per refinement level:
    0    1314000

Adding patches for surface regions
----------------------------------

Patch    Type    Region
-----    ----    ------
rotor:

6    wall    rotor_OBJECT

Added patches in = 0.09 s

Selecting decompositionMethod none

Refinement phase
----------------

Found point (0 4 0) in cell 607411 on processor 0

Surface refinement iteration 0
------------------------------

Marked for refinement due to surface intersection          : 7630 cells.
Marked for refinement due to curvature/regions             : 0 cells.
Determined cells to refine in = 1.16 s
Selected for refinement : 7630 cells (out of 1314000)
Cannot find point in pts1 matching point 28325 coord:(0.00025 0.035445 -0.0613955) in pts0 when using tolerance 2.47488e-07
Searching started from:0 in pts1
    Compared coord: (0.00025 0.0354477 -0.061394) at index 0 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 28025 coord:(-0.00325 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:0 in pts1
    Compared coord: (0.00025 0.0354477 -0.061394) at index 0 with difference to point 0.0035
    Compared coord: (-0.00325 0.0354477 -0.061394) at index 1 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 28625 coord:(0.00375 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:1 in pts1
    Compared coord: (-0.00325 0.0354477 -0.061394) at index 1 with difference to point 0.007
    Compared coord: (0.00375 0.0354477 -0.061394) at index 2 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 27725 coord:(-0.00675 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:2 in pts1
    Compared coord: (0.00375 0.0354477 -0.061394) at index 2 with difference to point 0.0105
    Compared coord: (-0.00675 0.0354477 -0.061394) at index 3 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 28925 coord:(0.00725 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:3 in pts1
    Compared coord: (-0.00675 0.0354477 -0.061394) at index 3 with difference to point 0.014
    Compared coord: (0.00725 0.0354477 -0.061394) at index 4 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 27425 coord:(-0.01025 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:4 in pts1
    Compared coord: (0.00725 0.0354477 -0.061394) at index 4 with difference to point 0.0175
    Compared coord: (-0.01025 0.0354477 -0.061394) at index 5 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 29225 coord:(0.01075 0.035445 -0.0613955) in pts0 when using tolerance 2.47488e-07
Searching started from:5 in pts1
    Compared coord: (-0.01025 0.0354477 -0.061394) at index 5 with difference to point 0.021
    Compared coord: (0.01075 0.0354477 -0.061394) at index 6 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 27125 coord:(-0.01375 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:6 in pts1
    Compared coord: (0.01075 0.0354477 -0.061394) at index 6 with difference to point 0.0245
    Compared coord: (-0.01375 0.0354477 -0.061394) at index 7 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 29525 coord:(0.01425 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:7 in pts1
    Compared coord: (-0.01375 0.0354477 -0.061394) at index 7 with difference to point 0.028
    Compared coord: (0.01425 0.0354477 -0.061394) at index 8 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 26825 coord:(-0.01725 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:8 in pts1
    Compared coord: (0.01425 0.0354477 -0.061394) at index 8 with difference to point 0.0315
    Compared coord: (-0.01725 0.0354477 -0.061394) at index 9 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 29825 coord:(0.01775 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:9 in pts1
    Compared coord: (-0.01725 0.0354477 -0.061394) at index 9 with difference to point 0.035
    Compared coord: (0.01775 0.0354477 -0.061394) at index 10 with difference to point 3.07029e-06
Cannot find point in pts1 matching point 26525 coord:(-0.02075 0.035445 -0.0613956) in pts0 when using tolerance 2.47488e-07
Searching started from:10 in pts1
    Compared coord: (0.01775 0.0354477 -0.061394) at index 10 with difference to point 0.0385

AND SO ON...
These errors snappy doesn`t create, when I set the side faces as simple patches (see blockMesh comment). I already read a lot of threads on the forum, but haven`t found the right tip yet. I already checked, if snappy is working on the cyclic patches and changing face matching, but they are not changed by snappy.

Does anyone have a tip how to handle this? Thanks!

Best regards
Julian
Attached Images
File Type: jpg Whole_block_mesh.jpg (53.7 KB, 119 views)
File Type: jpg Block_mesh_blade.jpg (92.1 KB, 116 views)
Ruli is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] snappyHexMesh - cyclic boundaries aylalisa OpenFOAM Meshing & Mesh Conversion 3 November 23, 2016 03:49
Possible createPatch/createBaffles bug? simpomann OpenFOAM Bugs 2 July 15, 2014 07:07
[mesh manipulation] cyclic patches with different no. of faces - snappyHexMesh - createPatch KYPCK444 OpenFOAM Meshing & Mesh Conversion 1 September 27, 2013 07:13
[snappyHexMesh] Cyclic BC with snappyHexMesh crashes in multiple processors jgil9 OpenFOAM Meshing & Mesh Conversion 10 September 7, 2013 14:53
[snappyHexMesh] snappyHexMesh with cyclic patches? Axel_T OpenFOAM Meshing & Mesh Conversion 1 October 12, 2010 10:03


All times are GMT -4. The time now is 08:18.