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

[blockMesh] Problem with meshing complex geometry

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Kelda

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2020, 11:16
Default Problem with meshing complex geometry
  #1
New Member
 
Carolina
Join Date: Sep 2016
Location: Milan, Italy
Posts: 4
Rep Power: 10
Kelda is on a distinguished road
Greetings to all,

I kindly ask for your help. Please note that up to now I have used OpenFOAM using pre-generated meshes or very simple geometries.

I have a fairly complex geometry that I want to mesh. I'm trying to see if I can do it with blockMesh. So, I have defined all the needed vertexes and arcs. I have then splitted this geometry into two blocks of 4 vertexes each for the meshing.

However, as you can see from the first attached figure, the arcs crosses the boundary of the block. The arcs represents solid cylinders that have to be cut (this geometry represents a sub-channel for a nuclear reactor: a cooling channel surrounded by three solid elements that provide heating).

Geometry.png

Nevertheless, I have tried to mesh this geometry, obtaining the results show in the next two figures. In the regions where the crossing between arcs and block "boundary" occur, some weird things happen. As expected, the checkMesh shows five failed checks, but it is clear that such a mesh cannot be accepted.

Surface.png

Mesh.png

The blockMeshDict is below (please note that this blockMeshDict is incomplete, that is, I have not defined the boundaries yet. But still will produce the mesh above:

Code:
convertToMeters 0.01;

vertices
(
	
	(0 -1.88 0)	// 0 - Element A1 - Bottom
	(0 1.88 0)	        // 1 - Element A1 - Top
	(1.88 2.97 0)	// 2 - Element B2 - Top
	(5.14 1.09 0)	// 3 - Element B2 - Bottom
	(5.14 -1.09 0)	// 4 - Element B3 - Bottom
	(1.88 -2.97 0)	// 5 - Element B3 - Top

	(0 -1.88 40)	// 6
	(0 1.88 40)	// 7
	(1.88 2.97 40)	// 8
	(5.14 1.09 40)	// 9
	(5.14 -1.09 40) // 10
	(1.88 -2.97 40)	// 11
);

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

edges
(
	arc 0 1 (1.88 0 0)
	arc 6 7 (1.88 0 40)

	arc 2 3 (3.51 0.145 0)
	arc 8 9 (3.51 0.145 40)

	arc 4 5 (3.51 -0.145 0)
	arc 10 11 (3.51 -0.145 40)
);	

faces
(
);

boundary
(
);

mergePatchPairs
(
);
I am using OpenFOAM 6 currently. My question is, do you think that I can solve this problem using blockMesh, or shall I switch to other mesh generators (I was thinking about making the CAD for this, export as .stl file and then using snappyHexMesh)?

Thank you all for your help,
Carolina
Kelda is offline   Reply With Quote

Old   April 10, 2020, 18:02
Default
  #2
Senior Member
 
Adhiraj
Join Date: Sep 2010
Location: Karnataka, India
Posts: 187
Rep Power: 16
adhiraj is on a distinguished road
Hello

maybe a dumb question, but is this problem somewhat like a flow in the space between three cylinders whose axes are parallel to each other?

So what I am imagining is like a flow in a duct, and the duct walls are convex inwards.

If so, blockMesh should be able to mesh it.
adhiraj is offline   Reply With Quote

Old   April 10, 2020, 18:33
Default
  #3
New Member
 
Carolina
Join Date: Sep 2016
Location: Milan, Italy
Posts: 4
Rep Power: 10
Kelda is on a distinguished road
Quote:
Hello

maybe a dumb question, but is this problem somewhat like a flow in the space between three cylinders whose axes are parallel to each other?

So what I am imagining is like a flow in a duct, and the duct walls are convex inwards.

If so, blockMesh should be able to mesh it.
Hello, thank you for your reply.

Yes, that is exactly the situation. Water flows in the region between the three cylinders (here I have cut them because I am interested only in the region between them, and also to reduce the size of the mesh).

Indeed, I thought that blockMesh would be able to mesh it, however, with the blockMeshDict file that I have written and posted above, I am not able to. Something weird happens with the cells near the three half-cylinders (on the left in attachment 2). It's like there is a overlap between the border of the cylinder and the border of the first hex block (the one in red in attachment 1).

I guess it is due to the fact that my half cylinder is not fully contained in a single hex block? And this happens even with refining the grid, this overlap keeps appearing, and I am at a loss as to what to do to solve this problem.

Kindly,
Carolina
Kelda is offline   Reply With Quote

Old   April 14, 2020, 11:20
Default
  #4
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
Hi Carolina,

The problem is what you said, your blocks are not well defined, maybe you should try to brake it into smaller blocks and also to take advantage of the symmetry of your geometry (of course, it depends on what kind of simulation you are running). blockMesh can definitely generate a mesh for your case.

Best Regards,
lebc is offline   Reply With Quote

Old   April 16, 2020, 10:21
Default
  #5
New Member
 
Carolina
Join Date: Sep 2016
Location: Milan, Italy
Posts: 4
Rep Power: 10
Kelda is on a distinguished road
Thank you for your replies.

Yes, at the end, I had to redefine the blocks by splitting the arcs in two, so that each arc segment was fully contained in a single block, as well as defining a "inner" triangular block to include the innermost region (the one between the three arcs). I will probably use even more blocks as to provide the required grading near the walls (the idea is to use this mesh for running a LES simulation).

@lebc unfortunately the problem is not symmetric, as the power contribution of each convex wall is different. Still, with my current solution (one central triangular block with three blocks surrounding it) I think I am on the right track.

Thanks again,
Carolina
lebc likes this.
Kelda 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
Meshing Help for turbulent flow of a complex 3d geometry!!! aabir ANSYS Meshing & Geometry 6 June 14, 2016 20:46
meshing problem with huge and complicated geometry mirvakili Mesh Generation & Pre-Processing 3 June 13, 2015 01:41
Problem regarding hexagonal mesh of complex geometry. saurabhk Main CFD Forum 1 September 18, 2014 11:02
Simulation of Flow through Complex 3D Geometry EmersonKB CFX 5 July 2, 2009 09:17
Problem meshing turb. blade tip clearance geometry Balu FLUENT 0 June 7, 2008 22:10


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