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

[blockMesh] blockMesh: merging two unmatching faces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2011, 14:00
Default blockMesh: merging two unmatching faces
  #1
New Member
 
Evren
Join Date: Mar 2010
Posts: 20
Rep Power: 16
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, 16:28
Default
  #2
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
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, 06:28
Default
  #3
New Member
 
Luis Blanes
Join Date: Mar 2011
Location: Cardiff. UK.
Posts: 12
Rep Power: 15
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, 08:30
Default
  #4
New Member
 
Evren
Join Date: Mar 2010
Posts: 20
Rep Power: 16
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, 09:01
Default
  #5
New Member
 
Luis Blanes
Join Date: Mar 2011
Location: Cardiff. UK.
Posts: 12
Rep Power: 15
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, 09:04
Default
  #6
New Member
 
Evren
Join Date: Mar 2010
Posts: 20
Rep Power: 16
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, 05:51
Default
  #7
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
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

Old   December 10, 2019, 06:38
Default connecting to objects
  #8
New Member
 
suhrab
Join Date: Nov 2019
Posts: 2
Rep Power: 0
suhrab yousufzai is on a distinguished road
hello every one



I am trying to connect a rectangular canal to a cylindrical basin in blockMesh as a signal object, but when i run my blockMesh it become tow independent objects.


here is my BlockMesh file


how can i connect these?
blockMesh.txt








thank you for your help



suhrab
suhrab yousufzai is offline   Reply With Quote

Reply


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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
[snappyHexMesh] Help with Snappy: no layers growing GianF OpenFOAM Meshing & Mesh Conversion 2 September 23, 2020 09:26
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 06:29
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 04:21
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 14:38


All times are GMT -4. The time now is 16:09.