Find answers, ask questions, and connect with our <br>community around the world.

Home Forums OpenFOAM Forum Blockmesh problem in execution

• # Blockmesh problem in execution

Posted by on January 13, 2024 at 10:25 am

I am attaching the screenshots of my block mesh dict file and the error. I couldn’t get what the mistake was.

2 Members · 13 Replies
• 13 Replies
• ### BarÄ±ÅŸ Bicer

Moderator
January 13, 2024 at 2:10 pm

Hi Yagna,

To speed up the process, please draw your geometry and indicate each points on the vertex of geometry and paste here.

First block which you have built up looks problematic. I think that you mixed to points. If you draw and paste the geometry we can find the problem easily.

• ### Yagna Murthy

Member
January 13, 2024 at 3:19 pm

Here is the snap, sir, as you requested.

• ### BarÄ±ÅŸ Bicer

Moderator
January 15, 2024 at 10:07 pm

Hi Yagna,

When Ä± checked your geometry, I saw that you missed some points of vertices. Listen 4 vertices should create a surface. In this example you should created 3 blocks. Add points where I showed in below pic and re-create blocks please.

• ### Yagna Murthy

Member
January 16, 2024 at 6:05 am

Sir, compare my diagram with the mesh that I shared earlier. And also, the vertices values

For 1st block 0,1,3,2 at the front side and at backside 8,9,11,10.

similarly for 2nd block 2,3,6,5 and at back 10,11,13,14

for3rd blocks 3,4,7,6 and 11,12,15,14 respectively. my figure might confuse you, but I hope my interpretation is correct!

• ### BarÄ±ÅŸ Bicer

Moderator
January 16, 2024 at 10:21 pm

you second block is wrong oriented: 2 3 6 5 10 11 14 13 should be

• ### Yagna Murthy

Member
January 16, 2024 at 11:38 pm

Yes sir I mentioned it like that only in meshdict. But here it’s my mistake.

• ### BarÄ±ÅŸ Bicer

Moderator
January 17, 2024 at 9:08 pm

Can you write points name near the vertices where we can check easily

• ### Yagna Murthy

Member
January 20, 2024 at 1:02 pm

Sir, Here I am attaching the snap. with vertices

• ### BarÄ±ÅŸ Bicer

Moderator
January 23, 2024 at 10:10 pm

Hi Yagna,

I will check it directly ok?

Thank you.

Ps: You can send to support directly!

• ### Yagna Murthy

Member
January 30, 2024 at 6:50 pm

Sir I have forwarded it to support team. Could you check once?

• ### BarÄ±ÅŸ Bicer

Moderator
January 30, 2024 at 11:21 pm

Hi Murthy,

Before going to solution you should keep in your mind following rule:

• The error (… simpleGrading (1(1) 1(1) 1(1)) is inside-out) is telling you that the order of the faces in this block is reversed. That means that the order of the nodes inside the hex block is not arbitrary, you have to follow the order convention used by blockmesh. You cant give number of vertices according to your wish. ( You can check information here : 4.3 Mesh generation with the blockMesh utility (openfoam.com)
• So, according to order of convention of blockMesh the correct order is as follows: Also I added final result. For your information

/*——————————–*- C++ -*———————————-*\

========= |

\\ / F ield | OpenFOAM: The Open Source CFD Toolbox

\\ / O peration | Website: https://openfoam.org

\\ / A nd | Version: 11

\\/ M anipulation |

\*—————————————————————————*/

FoamFile

{

format ascii;

class dictionary;

object blockMeshDict;

}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices

(

(0 0 0) //Vertices 0

(1 0 0) //vertices 1

(1 0 -1) //Vertices 2 –> old vertices 9

(0 0 -1) //Vertices 3 –> old vertices 8

(0 1.9 0) //Vertices 4 –> old vertices 2

(1 1.9 0) //Vertices 5 –> old vertices 3

(1 1.9 -1) //Vertices 6 –> old vertices 11

(0 1.9 -1) //Vertices 7 –> old Vertices 10

(0 3 0) //Vertices 8 –> old vertices 5

(1 3 0) //Vertices 9 –> old Vertices 6

(1 3 -1) //Vertices 10 –> old Vertices 14

(0 3 -1) //Vertices 11 –> old Vertices 13

(2.5 1.9 0) //Vertices 12 –> old vertices 4

(2.5 1.9 -1) //Vertices 13 –> old Vertices 12

(2.5 3 -1) //Vertices 14 –> old Vertices 15

(2.5 3 0) //Vertices 15 –> old Vertices 7

);

blocks

(

hex (0 1 2 3 4 5 6 7) (50 10 10) simpleGrading (1 1 1)

hex (4 5 6 7 8 9 10 11) (50 10 10) simpleGrading (1 1 1)

hex (5 12 13 6 9 15 14 10) (50 10 10) simpleGrading (1 1 1)

);

boundary

(

inlet

{

type patch;

faces

(

(0 4 7 3)

(4 8 11 7)

);

}

outlet

{

type patch;

faces

(

(12 13 14 15)

);

}

bottom

{

type symmetryPlane;

faces

(

(0 3 2 1)

);

}

top

{

type symmetryPlane;

faces

(

(8 9 10 11)

(9 15 14 10)

);

}

obstacle

{

type patch;

faces

(

(1 2 6 5)

(5 6 13 12)

);

}

);

mergePatchPairs

(

);

// ************************************************************************* //

• ### Yagna Murthy

Member
January 13, 2024 at 3:38 pm

In addition to the above question. I have a small doubt about meshing without inserting any CAD profile into the open FOAM. I answered how the meshing is happening and that vertices, which we mentioned in the first block in the meshdict file, will do that.

hex (0 1 3 2 8 9 11 10) (25 10 1) simpleGrading (1 1 1)

Only the second part of block creation is for meshing that is also in blocks.

Then, how do I insert a different geometry profile?

The answer is an STL file.

Could you confirm my assumptions?

• ### BarÄ±ÅŸ Bicer

Moderator
January 15, 2024 at 10:08 pm

Hi again,

blockMesh is used for simple Geomtries. For complex geometries we use snappy. did you make snappy lesson? If not, you will learn in the next lessons after blockMesh