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

[blockMesh] Merging multiple blocks of diferent mesh density.

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Antimony

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2017, 21:27
Default Merging multiple blocks of diferent mesh density.
  #1
New Member
 
Tom
Join Date: May 2017
Posts: 9
Rep Power: 8
Algebraist is on a distinguished road
Hello all,

I'm trying to set up the following geometry in with blockMesh:


Where the light blue area represents a coarse mesh, and the darker blue a fine mesh.

The simplest way to do it would be to simply use face matching to ensure the rough sections is all connected, but then using mergePatchPairs to connect the three inner faces of the fine section won't work because of adjacency.

Merging the top and bottom boxes into the center box and then using merging the left rough box into that combined box doesn't work either because it creates faces with less then 3 points.

Can anyone suggest a work around?

I've also heard people suggesting connecting such a geometry with cyclical boundaries - but doesn't that only work with meshes of the same density?
Algebraist is offline   Reply With Quote

Old   July 15, 2017, 15:04
Default
  #2
New Member
 
Tom
Join Date: May 2017
Posts: 9
Rep Power: 8
Algebraist is on a distinguished road
CyclicAMI seems to actually be my best bet, but I'm not sure how to use it. Below is my best guess based on checking several threads here on CFD Online and the OpenFOAM user guide.

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

convertToMeters 0.1;

vertices
(
//left rough 'c' box
    //back plane
        (0 0 0)//0
        (180 0 0)//1
        (260 0 0)//2
        (260 90 0)//3
        (180 90 0)//4
        (180 170 0)//5
        (260 170 0)//6
        (260 260 0)//7
        (180 260 0)//8
        (0 260 0)//9
    //front plane
        (0 0 20)//10
        (180 0 20)//11
        (260 0 20)//12
        (260 90 20)//13
        (180 90 20)//14
        (180 170 20)//15
        (260 170 20)//16
        (260 260 20)//17
        (180 260 20)//18
        (0 260 20)//19
        
//left center box
    //back plane
        (180 90 0)//20
        (260 90 0)//21
        (260 170 0)//22
        (180 170 0)//23

    //front plane
        (180 90 20)//24
        (260 90 20)//25
        (260 170 20)//26
        (180 170 20)//27

); 

blocks
(
    hex (0 1 8 9 10 11 18 19) (18 26 20) simpleGrading (1 1 1)//left rough box
    hex (1 2 3 4 11 12 13 14) (8 9 20) simpleGrading (1 1 1)//left bottom box
    hex (20 21 22 23 24 25 26 27) (16 160 20) simpleGrading (1 1 1)//left center box, note doubled mesh density
    hex (5 6 7 8 15 16 17 18) (8 9 20) simpleGrading (1 1 1)//left top box
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (10 11 18 19)//left rough box
            (11 12 13 14)//left bottom box
            (24 25 26 27)//left center box
            (15 16 17 18)//left top box
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (0 1 8 9)//left rough box
            (1 2 3 4)//left bottom box
            (20 21 22 23)//left center box
            (5 6 7 8)//left top box
        );
    }
    fixedWalls
    {
        type wall;
        faces
        (
            //left rough box
        (0 1 11 10)//bottom
        (0 10 19 9)//left wall
        (8 9 19 18)//top
            //left bottom box
        (1 2 12 11)//bottom
        (2 3 13 12)//right
            //left center box
        (21 22 26 25)//right
            //left top box
        (8 18 17 7)//top
        (6 7 17 16)//right
        );
    }   

//use the Arbitray Mesh Interface next  

//*********************
    inTopInterface
    {
        type cyclicAMI;
    neighborPatch outTopInterface;
        faces
        (
            (22 23 27 26)//
        );
    }   
    outTopInterface//
    {
        type cyclicAMI;
    neighborPatch inTopInterface;
        faces
        (
            (5 6 16 15)//
        );
    }


//*********************
    outBottomInterface
    {
        type cyclicAMI;
    neighborPatch inBottomInterface;
        faces
        (
            (3 4 14 13)//
        );
    }
    inBottomInterface
    {
        type cyclicAMI;
    neighborPatch outBottomInterface;
        faces
        (
            (20 21 25 24)//
        );
    }
//*********************
    leftRightInterface
    {
        type cyclicAMI;
    neighborPatch rightLeftInterface;
        faces
        (
            (1 8 18 11)//
        );
    }
    rightLeftInterface
    {
        type cyclicAMI;
    neighborPatch leftRightInterface;
        faces
        (
            (20 24 27 23)//
        );
    }

);

// ************************************************************************* //
Unfortunately, it's giving me the following error:

Quote:
--> FOAM FATAL IO ERROR:
No "neighbourPatch" or "coupleGroup" provided.
I'm at a loss as to how to proceed.
Algebraist is offline   Reply With Quote

Old   July 18, 2017, 23:28
Default
  #3
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

Seems to me that it is a simple issue with your spelling.

neighbourPatch uses the British spelling, while you have used the American spelling.

Cheers,
Antimony
Algebraist likes this.
Antimony is offline   Reply With Quote

Old   July 19, 2017, 10:29
Default
  #4
New Member
 
Tom
Join Date: May 2017
Posts: 9
Rep Power: 8
Algebraist is on a distinguished road
Quote:
Originally Posted by Antimony View Post
Hi,

Seems to me that it is a simple issue with your spelling.

neighbourPatch uses the British spelling, while you have used the American spelling.

Cheers,
Antimony
It's always the little things that get you.

Thanks Antimony.
Algebraist is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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] Add Mesh Layers doesnt work on the whole surface Kryo OpenFOAM Meshing & Mesh Conversion 13 February 17, 2022 08:34
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 05:17
[Other] Multiple blocks for moving mesh jiahui_93 OpenFOAM Meshing & Mesh Conversion 0 March 4, 2018 03:24
[ICEM] meshing-incomplete mesh in part after moving blocks to separate domains Mfaizan ANSYS Meshing & Geometry 8 November 29, 2015 22:11


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