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

[blockMesh] Why doesn't this simple blockMesh work in v2006?

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By olesen
  • 1 Post By olesen
  • 2 Post By TomWaits

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2020, 10:10
Exclamation Why doesn't this simple blockMesh work in v2006?
  #1
Member
 
Tom Waits
Join Date: Aug 2018
Posts: 38
Rep Power: 7
TomWaits is on a distinguished road
Hi All,

The following blockMeshDict file (to mesh a cylinder) works perfectly in OpenFOAM-v1812:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// convertToMeters 1;
scale 1.0;

vertices
(
	(0.25 0 0) // 0
	(0 0.25 0) // 1
	(-0.25 0 0) // 2
	(0 -0.25 0) // 3

	(0.25 0 1) // 4 
	(0 0.25 1) // 5
	(-0.25 0 1) // 6
	(0 -0.25 1) // 7
	
	(0 0 0) // 8
	(0 0 1) // 9
 
);

blocks
(
	hex (0 1 8 8 4 5 9 9) (25 25 100) simpleGrading (1 1 1)
	hex (1 2 8 8 5 6 9 9) (25 25 100) simpleGrading (1 1 1)
	hex (2 3 8 8 6 7 9 9) (25 25 100) simpleGrading (1 1 1)
	hex (3 0 8 8 7 4 9 9) (25 25 100) simpleGrading (1 1 1)
);

edges
(
arc 0 1 (0.17677 0.17677 0) 
arc 1 2 (-0.17677 0.17677 0)
arc 2 3 (-0.17677 -0.17677 0)
arc 3 0 (0.17677 -0.17677 0)

arc 4 5 (0.17677 0.17677 1)
arc 5 6 (-0.17677 0.17677 1)
arc 6 7 (-0.17677 -0.17677 1)
arc 7 4 (0.17677 -0.17677 1)

);

boundary
(
	inlet
	{

		type patch;
		faces
		(
			(0 8 8 1)
			(1 8 8 2)
			(2 8 8 3)
			(3 8 8 0)
		);
	}
	outlet
	{
		type patch;
		faces
		(
			(5 9 9 4)
			(6 9 9 5)
			(7 9 9 6)
			(4 9 9 7)
		);
	}
	slip
	{
		type patch;
		faces
		(
			(0 1 5 4)
			(1 2 5 6)
			(2 3 7 6)
			(3 0 4 7)
		);
	}

);

mergePatchPairs
(

);

// ************************************************************************* //
However when I try to run blockMesh on OpenFOAM-v2006 I get the following error:

Code:
--> FOAM FATAL ERROR: 
Sub-division mismatch between face 3 of block 0(26 101) and face 3 of block 1(26 101)

    From void Foam::blockMesh::calcTopologicalMerge()
    in file blockMesh/blockMeshMergeTopological.C at line 414.

FOAM exiting
Could somebody help explain why this is happening?

Many thanks,

Tom Waits
TomWaits is offline   Reply With Quote

Old   November 10, 2020, 04:32
Default
  #2
New Member
 
Phi
Join Date: Oct 2018
Posts: 2
Rep Power: 0
cfdphind is on a distinguished road
I have not read through your case, but that is a very simple error, just change the number of mesh cells in each direction (X Y Z) so that common faces of two near blocks have the same number of cells and grading. Remember when using multiple blocks, the number of cells and the expansion ratio on common faces must be matching
Concerning the error:
"--> FOAM FATAL ERROR:
Sub-division mismatch between face 3 of block 0(26 101) and face 3 of block 1(26 101)"
That means the number of cells of the common face of block 0 and block 1 is different. You have to draw again your vertex on a paper for better understanding then change cell number and simpleGrading in order that cells on the common face on those two blocks are matched . A very important point that be aware of how coordinate axis created during blockMesh, this usually leads to misunderstanding the x,y,z direction, hence users usually assign a number of cells improperly as they desire
cfdphind is offline   Reply With Quote

Old   November 12, 2020, 06:21
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by TomWaits View Post
Code:
--> FOAM FATAL ERROR: 
Sub-division mismatch between face 3 of block 0(26 101) and face 3 of block 1(26 101)

    From void Foam::blockMesh::calcTopologicalMerge()
    in file blockMesh/blockMeshMergeTopological.C at line 414.

FOAM exiting
Could somebody help explain why this is happening?
The obvious answer: something incorrect in your definition. But to answer your question about why this didn't show as an error before see the upgrade guide blockMesh.
For degenerate or special cases, revert to geometric merging. You can test on the command-line, and put into your blockMeshDict to be safer.
In most case, the topological merge works well, can be significantly faster and is essential if you have a blockMesh with extremely high aspect ratio cells.

Hope this helps explain what is going on.
deepakvil likes this.
olesen is offline   Reply With Quote

Old   November 12, 2020, 06:33
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by TomWaits View Post
Hi All,

The following blockMeshDict file (to mesh a cylinder) works perfectly in OpenFOAM-v1812:

Code:
...    
edges
(
arc 0 1 (0.17677 0.17677 0) 
arc 1 2 (-0.17677 0.17677 0)
arc 2 3 (-0.17677 -0.17677 0)
arc 3 0 (0.17677 -0.17677 0)

arc 4 5 (0.17677 0.17677 1)
arc 5 6 (-0.17677 0.17677 1)
arc 6 7 (-0.17677 -0.17677 1)
arc 7 4 (0.17677 -0.17677 1)
);
...
For these types of geometries I think you will like the newer alternative way to specify an arc specification, which will be in v2012. If you do a before/after comparison you will see that it makes the specification much less complicated.
RGS likes this.
olesen is offline   Reply With Quote

Old   July 7, 2021, 15:12
Default
  #5
New Member
 
Leeno
Join Date: Jul 2021
Posts: 1
Rep Power: 0
Chemberleen is on a distinguished road
Did you find the reply to this problem? I am having the same issue. This is my first simulation using OpenFoam.
Chemberleen is offline   Reply With Quote

Old   July 7, 2021, 16:34
Default
  #6
Member
 
Tom Waits
Join Date: Aug 2018
Posts: 38
Rep Power: 7
TomWaits is on a distinguished road
Quote:
Originally Posted by Chemberleen View Post
Did you find the reply to this problem? I am having the same issue. This is my first simulation using OpenFoam.
Yes, I used "blockMesh -merge-points" to revert to the old point based merging as in https://develop.openfoam.com/Develop...uide#blockmesh
supvato and xukai like this.
TomWaits 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
blockMesh wmake error for OpenFOAM5 on ubuntu on windows rclement OpenFOAM Programming & Development 2 March 5, 2018 16:57
SIMPLE algorithm in 3D cylindrical coordinates zouchu Main CFD Forum 1 January 20, 2014 17:02
[blockMesh] A simple problem about blockMesh sharonyue OpenFOAM Meshing & Mesh Conversion 2 September 30, 2012 20:34
PISO vs. SIMPLE benedikt flurl Main CFD Forum 2 April 14, 2005 06:54
Does anyone work at SIMPLE in unsteady and compressibel flow Junl Main CFD Forum 1 February 4, 2000 21:24


All times are GMT -4. The time now is 21:22.