CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

blockMesh: merging two unmatching faces

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 31, 2011, 13:00
Default blockMesh: merging two unmatching faces
  #1
New Member
 
Evren
Join Date: Mar 2010
Posts: 20
Rep Power: 7
pbe_cfd is on a distinguished road
Hi,

I try to mesh the following geometry to understand how "mergePatchPairs" works.
mergeTwoblocks.jpg

The mesh looks fine but I strongly doubt that faces are merged properly. Here is the blockMeshDict,
blockMeshDict.txt

Moreover, checkMesh doesn't complain and indicates only 1 Region, however icoFoam doesn't run for this mesh and complains as follows .

++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++
This mesh contains patches of type empty but is not 1D or 2D by virtue of
the fact that the number of faces of this empty patch is not divisible by
the number of cells.
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++

I suppose, an experienced eye will catch the mistake(s) immediately...

cheers,
Evren
pbe_cfd is offline   Reply With Quote

Old   May 31, 2011, 15:28
Default
  #2
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 11
MartinB is on a distinguished road
Hi Evren,

you must define the wall patches, afterwards it works fine (tested with simpleFoam):
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.6                                   |
|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (0.0  0.00 0.0 )//0
    (1.0  0.00 0.0 )//1
    (1.0  1.00 0.0 )//2
    (0.0  1.00 0.0 )//3
    (1.0  0.25 0.25)//4
    (2.0  0.25 0.25)//5
    (2.0  0.75 0.25)//6
    (1.0  0.75 0.25)//7
    (0.0  0.00 1.0 )//8
    (1.0  0.00 1.0 )//9
    (1.0  1.00 1.0 )//10
    (0.0  1.00 1.0 )//11
    (1.0  0.25 0.75)//12
    (2.0  0.25 0.75)//13
    (2.0  0.75 0.75)//14
    (1.0  0.75 0.75)//15
);

blocks
(
    hex (0 1 2 3 8 9 10 11  ) block1 (4 4 4) simpleGrading (1 1 1)//B1
    hex (4 5 6 7 12 13 14 15) block2 (2 2 2) simpleGrading (1 1 1)//B2
);

edges
(
);

patches
(
    patch inlet
    (
        (5 13 14 6)
    )
    patch outlet
    (
        (0 8 11 3)
    )
    patch master1
    (
        (1 9 10 2) // face of the big cube
    )
    patch slave1
    (
        (4 12 15 7) // face of the small cube
    )
    wall wall
    (
        (8 9 10 11)
        (11 10 2 3)
        (0 1 2 3)
        (12 13 14 15)
        (15 14 6 7)
        (12 13 5 4)
        (4 5 6 7)
        (8 9 1 0)
    )
);

mergePatchPairs
(
        (master1 slave1)
);

// ************************************************************************* //
Since master1 and slave1 do not fit exactly, you must define a patch for master1 in U and p.

Martin
MartinB is offline   Reply With Quote

Old   June 1, 2011, 05:28
Default
  #3
New Member
 
Luis Blanes
Join Date: Mar 2011
Location: Cardiff. UK.
Posts: 12
Rep Power: 6
lmblanes is on a distinguished road
I dont think you have to specify Slave and Mater either, if the two boxes are matching their surfaces try to simple input "mergepatchpairs" and that's it...

BlockMesh needs for all the block surfaces to be defined as a patch. If not, it generates a "defaultFaces" patch set to "empty", that means that there is no solution for the surface, therefore is a 1D or a 2D problem. As your geometry is 3D, the error message is warning you about that issue, and that it will not run.

For this simple geometry you can just set it manually in the "boundary" dictionary, and set the defaultPatch type to "wall"

Consult the User Guide first Tutorial.
LuisBlanes
lmblanes is offline   Reply With Quote

Old   June 1, 2011, 07:30
Default
  #4
New Member
 
Evren
Join Date: Mar 2010
Posts: 20
Rep Power: 7
pbe_cfd is on a distinguished road
As Martin suggests it works with icoFoam, as well. Moreover, Luis has a point if in the boundary file defaultPatch is set to wall, it's not necessary to specify every single cell for walls. That is a trick, I have already used couple of time, even for more complex geometries it works well. Nevertheless, one has to specify which patches to be merged.

@ Luis:
Quote:
if the two boxes are matching their surfaces try to simple input "mergepatchpairs" and that's it...
could you be a little more specific, please?

Thanks,
Evren
pbe_cfd is offline   Reply With Quote

Old   June 1, 2011, 08:01
Default
  #5
New Member
 
Luis Blanes
Join Date: Mar 2011
Location: Cardiff. UK.
Posts: 12
Rep Power: 6
lmblanes is on a distinguished road
I just was stating that:

Page U-138 of the User Guide
(...)To connect two blocks with face matching, the two patches that form the connection should simply be ignored from the patches list. blockMesh then identifies that the faces do not form an external boundary and combines each collocated pair into a single internal faces that connects cells from the two blocks (...)

yours
Luis Blanes
lmblanes is offline   Reply With Quote

Old   June 1, 2011, 08:04
Default
  #6
New Member
 
Evren
Join Date: Mar 2010
Posts: 20
Rep Power: 7
pbe_cfd is on a distinguished road
Ok, that's clear for matching faces, that's no good for unmatching faces... Everything is clear....

by the way thanks ;-)

Cheers,
Evren
pbe_cfd is offline   Reply With Quote

Old   October 22, 2014, 04:51
Default
  #7
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 8
vaina74 is on a distinguished road
Hi foamers, I'm trying to use blockMesh and mergePatchPairs and my starting simple case is similar to pbe_cfd's one.
If I'm correct, p and U need a boundary definition only for the big block face and not for the small cube one. It's not clear to me how to apply patch settings to the not-overlapped area, I think that a wall boundary (for the patch and p or U) on the big block face is not compatible with the inlet or outlet flow. I open a thread but I had no reply so far.
Thanks for your attention.
vaina74 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SnappyHexMesh for internal Flow vishwa OpenFOAM Native Meshers: snappyHexMesh and Others 23 August 6, 2014 03:50
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 10:37


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