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

Problem with blockMeshDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2021, 12:48
Default Problem with blockMeshDict
  #1
New Member
 
Anjul Pandey
Join Date: Jul 2020
Posts: 16
Rep Power: 5
anjul is on a distinguished road
Hello everyone, I am trying to make a cylindrical mesh with a square inside it. I wrote the blockMeshDict file, reviewed it but still couldn't figure out the issue. My blockMeshDict file is:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


convertToMeters 0.001; // meters


//Domain length
Length 150;

//Square inside cylinder
Spoint 1.0; //Square point
Mspoint -1.0; //Negative direction square point

//Points of cylinder
icpoint 10.0; //ic-> inner Circle
Micpoint -10.0; //M-> minus

//Interpolation points to make arc
apoint 14.14213562; //arcpoint
Mapoint -14.14213562;


vertices
(
//Bottom

(0 0 0) //0

//Inner Square
(0 $Spoint $Mspoint) //1
(0 $Mspoint $Mspoint) //2
(0 $Mspoint $Spoint) //3
(0 $Spoint $Spoint) //4

//Circle
(0 $icpoint $Micpoint) //5
(0 $Micpoint $Micpoint) //6
(0 $Micpoint $icpoint) //7
(0 $icpoint $icpoint) //8


//Top

($Length 0 0) //9

//Inner Square
($Length $Spoint $Mspoint) //10
($Length $Mspoint $Mspoint) //11
($Length $Mspoint $Spoint) //12
($Length $Spoint $Spoint) //13

//Circle
($Length $icpoint $Micpoint) //14
($Length $Micpoint $Micpoint) //15
($Length $Micpoint $icpoint) //16
($Length $icpoint $icpoint) //17
);



//Mesh resolution

Nsqy 20; //Number of cells in square in y direction
Nsqz 20; //Number of cells in square in z direction
Nax 100; //Number of cells in axial direction


blocks
(

hex (1 4 3 2 10 13 12 11) ($Nax $Nsqy $Nsqz) simpleGrading (1 1 1)

hex (1 5 8 4 10 14 17 13) ($Nax $Nsqy $Nsqz) simpleGrading (1 1 1)
hex (4 8 7 3 13 17 16 12) ($Nax $Nsqy $Nsqz) simpleGrading (1 1 1)
hex (3 7 6 2 12 16 15 11) ($Nax $Nsqy $Nsqz) simpleGrading (1 1 1)
hex (2 6 5 1 11 15 14 10) ($Nax $Nsqy $Nsqz) simpleGrading (1 1 1)
);


edges
(
//Bottom
arc 5 6 (0 0 $Mapoint)
arc 6 7 (0 $Mapoint 0)
arc 7 8 (0 0 $apoint)
arc 8 5 (0 $apoint 0)

//Top
arc 14 15 ($Length 0 $Mapoint)
arc 15 16 ($Length $Mapoint 0)
arc 16 17 ($Length 0 $apoint)
arc 17 14 ($Length $apoint 0)

);


boundary
(


inlet
{
type patch;
physicalType noParticleOutFlow;
faces
(
(1 2 3 4)

(1 5 6 2)
(2 6 7 3)
(3 7 8 4)
(4 8 5 1)
);
}

outlet
{
type patch;
physicalType particleOutFlow;
faces
(
(10 11 12 13)

(10 14 15 11)
(11 15 16 12)
(12 16 17 13)
(13 17 14 10)
);
}

side
{
type patch;
physicalType particleoutFlow;
faces
(
(5 14 15 6)
(6 15 16 7)
(7 16 17 8)
(8 17 14 5)
);
}
);

mergePatchPairs
(
);
/// ************************************************** *********************** //

I am getting this error:

--> FOAM FATAL ERROR:
Inconsistent number of faces between block pair 0 and 1

From function void Foam::blockMesh::calcMergeInfo()
in file blockMesh/blockMeshMerge.C at line 217.

FOAM exiting

Any help would be appreciated.
anjul is offline   Reply With Quote

Old   June 9, 2021, 11:45
Default paraFoam -block
  #2
Member
 
Rahul Vadrabade
Join Date: Apr 2018
Posts: 46
Rep Power: 8
Rvadrabade is on a distinguished road
Hi,

I couldn't try at the moment but can you check that the topology of block is correct by defining a single hex block at a time, commenting other lines. Probably you can find clue to issue.

To check blocks are correct, try 'paraFoam -block'.
Rvadrabade is offline   Reply With Quote

Old   June 10, 2021, 05:37
Default
  #3
New Member
 
Anjul Pandey
Join Date: Jul 2020
Posts: 16
Rep Power: 5
anjul is on a distinguished road
Thank you for your response. I tried what you said and found out the issue. It's in the way I was giving the cells in each direction. The correct way is:
($Nsqy $Nsqz $Nax)
in all hex cells as both Nsqy and Nsqz are 20.
anjul is offline   Reply With Quote

Reply

Tags
blockmesh dict, meshing 3d, openfoam 5.x


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
SU2-7.0.1 on ubuntu 18.04 hyunko SU2 Installation 7 March 16, 2020 04:37
BuoyantBoussinesqSimpleFoam_Facing problem Mondal131211 OpenFOAM Running, Solving & CFD 1 April 10, 2019 19:41
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13


All times are GMT -4. The time now is 20:37.