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] Declaring two vertices with the same coordinates (https://www.cfd-online.com/Forums/openfoam-meshing/154828-declaring-two-vertices-same-coordinates.html)

Snapdad June 19, 2015 14:26

Declaring two vertices with the same coordinates
 
Hello,

I have no background in fluid dynamics or OpenFOAM to speak of, but I've been tasked with writing a script to generate a blockMeshDict file from a matrix.

My question is this - if I wanted to generate two cubes which share a face, is it acceptable to use two separately-declared vertices with the same coordinates? In other words, would this:

vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 0.1)
(1 0 0.1)
(1 1 0.1)
(0 1 0.1)
(1 0 0)
(2 0 0)
(2 1 0)
(1 1 0)
(1 0 0.1)
(2 0 0.1)
(2 1 0.1)
(1 1 0.1)
);

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

have the same result as this?

vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 0.1)
(1 0 0.1)
(1 1 0.1)
(0 1 0.1)
(2 0 0)
(2 1 0)
(2 0 0.1)
(2 1 0.1)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
hex (1 8 9 2 5 10 11 6) (20 20 1) simpleGrading (1 1 1)
);

Thank you very much for any assistance.

alexB June 26, 2015 08:24

Hi snapdad,

both versions of your blockMeshDict would work and would look the same in e.g. paraView .

But in the first version your blocks wouldn't be connected, so OF couldn't compute the flow between both blocks... and other errors could occur.
You could connect these blocks with the function mergepatchpairs . But I am not familiar with it... I always worked around this function.

regards
Alex

Snapdad July 2, 2015 15:03

Alex,

Thank you very much for your help. Your answer was precisely what I needed to know.

With much appreciation,
Mike


All times are GMT -4. The time now is 06:50.