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] blockMesh and internal faces (https://www.cfd-online.com/Forums/openfoam-meshing/72270-blockmesh-internal-faces.html)

piprus January 31, 2010 14:00

blockMesh and internal faces
 
Hi everyone,

My question concerns probably silly issue, but I can't see the solution at the moment, so I hope you can give me some hint. What's the problem? So... I made a 2D geometry just by defining verticies, blocks (hex) and edges (because I have some splines and arcs) in one blockMeshDict file. Everything looks great, as you can see at the attached picture (sorry for the low resolution).

http://a.c1.fotka.pl/042/204/42204600_1024.jpg

My blockMeshDict defines hexahedrals as shown at the schematic picture below (green lines depict borders of those hexes):

http://a.c5.fotka.pl/042/204/42204614_1024.jpg

And now my fundamental question is. Should I expect that all of the hexahedrals are automatically connected one to another or should I define some patches between them or even merge them somehow?

Just as a addition I should say that I added until now two patches that I need for sure. They are inlet (top of a pipe in the middle) and outlet (on top right of a tank).

Thomas Baumann February 1, 2010 04:01

Hi piprus,

1. the blocks are all automatically connected if you use the same vertices at the matching faces while defining the blocks using the blockMesh-utility. Here it is not neccessary to define internal faces.

2. If you are using different vertices at the matching faces (even if they have the same coordiantes) you have to define internal patches and merge them using mergePatchFields in the blockMeshdict (here you can have a different discretication of the blocks). But it's neccessary in this case the different blocks don't use the same vertices not to get trouble during mergePatchPairs...


Regards Thomas

piprus February 1, 2010 08:09

Exactly! Thanks a lot...

Now I see that I missed one chapter in the UserManual.

T.D. February 25, 2011 09:29

hi, concerning mergePatchPairs.
I have a mesh in wedge type, with two block connected by an interface1, where i connected interface1 with interface2 by mergePatchPairs. The mesh is ok and the checkMesh is OK.
The problem is in the 0 folder where it cannot recognize the defined BC for the interface1.
Any ideas

here is my mesh
FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//original in cm
convertToMeters 0.01;


//geometry Couette with gap up on top =0.3
//couette wedge 5°

//Ri=1.4 cm R=1.45 cm Ht=3.3 cm Hi=3 cm

vertices
(

(1.448619921 0.063248112 0)
(1.448619921 -0.063248112 0)
(1.39866751 0.061067142 3)
(1.39866751 -0.061067142 3)
(1.448619921 0.063248112 3.3)
(1.448619921 -0.063248112 3.3)
(1.39866751 0.061067142 3.3)
(1.39866751 -0.061067142 3.3)


(1.39866751 0.061067142 0)
(1.39866751 -0.061067142 0)
(1.448619921 0.063248112 3)
(1.448619921 -0.063248112 3)

(1.39866751 0.061067142 3)
(1.448619921 0.063248112 3)
(1.448619921 -0.063248112 3)
(1.39866751 -0.061067142 3)


(1.448619921 0.063248112 3.3)
(1.448619921 -0.063248112 3.3)
(1.39866751 0.061067142 3.3)
(1.39866751 -0.061067142 3.3)


);

blocks
(

hex (9 1 0 8 3 11 10 2) (1 1 100) simpleGrading (1 1 1)
hex (15 14 13 12 7 5 4 6) (1 1 1) simpleGrading (1 1 1)

);

edges
(
);

patches
(

wedge front
(
(8 2 10 0)
(12 6 4 13)
)

wedge back
(
(9 3 11 1)
(15 7 5 14)
)
patch in
(
(8 2 3 9)
(12 6 7 15)
)
patch out
(
(0 10 11 1)
(13 4 5 14)
)

patch up
(
(6 4 5 7)
)

patch down
(
(8 0 1 9)
)

patch inerface1
(
(2 10 11 3)
)
patch interface2
(
(12 13 14 15)
)


);

mergeParchPairs
(
(interface1 interface2)
);


Any ideas ?

Thanks a lot

fakekarma November 9, 2011 05:19

Hi T.D.,
If the blockMeshDict reported from you as been simply pasted here maybe there is a mistake when you define the patch as:

patch inerface1
(
(2 10 11 3)
)

instead of:

patch interface1
(
(2 10 11 3)
)

So when you look for it in

mergeParchPairs
(
(interface1 interface2)
);

so it will never find it. Hope it can help,

Best regards

ehsan December 10, 2011 15:08

Mesh moving
 
Hi

I like to move my mesh's cell only by dx/2 and dy/2 and create a new mesh. Could you please help me how to change the blockmesh file to create a new mesh whose cells are moved by dx/2 and dy/2 relative to the first mesh?

Thanks a lot

fakekarma December 10, 2011 15:49

Hallo Ehsan,

have you already tried with the translate operator inside ParaFoam?
I think there exists also a command line version (transformPoints), as reported here http://www.openfoam.com/features/mesh-manipulation.php.

I hope it helps,

Cheers,

Elia

P.S.
if this not suffice maybe in another thread you will find out more...

RLFerreira July 13, 2015 19:51

Hello everbody!

I appreciate your helps. I am trying to solve a very simple problem, which is a flow inside the circular duct. So, I have three patches in my blockMeshDict file: inlet, outlet and walls. I want to add internal face as a patch to me use the patchAverage utility to compute the pressure average in given section of the duct. How can I set it in the blockMeshDict. Is it possible? How can I set it on the boundary condtions file inside of "0" directory?

I tried the "patch" and "empty" to set internal face patches and blockMesh doesn't work!

The other alternative is set a surface sampling data in sampleDict file. However, I would to know if possible add internal face with empty boundary condition.

Best Regards,
Ricardo.

T.D. July 16, 2015 08:01

Hi Ricardo,

You can use GMSH for example, and do then whatever you want with it.
see this:
https://openfoamwiki.net/index.php/2...ial_using_GMSH

regards,

T.D.


All times are GMT -4. The time now is 11:34.