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

[blockMesh] Number of cells

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2019, 11:01
Default Number of cells
  #1
New Member
 
Sama
Join Date: Jan 2019
Posts: 16
Rep Power: 7
Samsam2 is on a distinguished road
Hello,
How I can define number of cells in my blockmeshDict:
blocks
(
hex (0 9 8 1 10 19 18 11) (16 16 216) simpleGrading (1 1 1)
hex (1 8 5 2 11 18 15 12) (16 16 216) simpleGrading (1 1 1)
hex (2 5 4 3 12 15 14 13) (16 16 216) simpleGrading (1 1 1)
hex (8 7 6 5 18 17 16 15) (16 16 216) simpleGrading (1 1 1)
);

I dont know how (16 16 216) is defined?? AS I want to use this code for other geometry and dont know where I should find number of cells in x, y and Z direction.
Thank you,
Samsam2 is offline   Reply With Quote

Old   November 24, 2019, 06:50
Default
  #2
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 7
Carlo_P is on a distinguished road
Hey,
you can have a look into:
http://www.wolfdynamics.com/wiki/mes..._blockmesh.pdf

In this case:
blocks
(
hex (0 9 8 1 10 19 18 11) (16 16 216) simpleGrading (1 1 1)
hex (1 8 5 2 11 18 15 12) (16 16 216) simpleGrading (1 1 1)
hex (2 5 4 3 12 15 14 13) (16 16 216) simpleGrading (1 1 1)
hex (8 7 6 5 18 17 16 15) (16 16 216) simpleGrading (1 1 1)
);

16 16 216 are the number of cells respectively in x,y,z direction.
The (1 1 1) is the value of grading, if you want to have an homogeneous division.
If you are an user, use always (1 1 1).
Another trick: try to use the same dimension (number of cells/extension of the box) in every direction, in order to start with an homogenus mesh.
Carlo_P is offline   Reply With Quote

Old   November 24, 2019, 10:49
Default reply
  #3
New Member
 
Sama
Join Date: Jan 2019
Posts: 16
Rep Power: 7
Samsam2 is on a distinguished road
Hello Carlo,
Thank you so much for your answer. If I change the number of cells to (16 16 16), does it make any problem for my results accuracy?
because my geometry dimension is not the same in XY and Z direction.
Thnak you,
Samsam2 is offline   Reply With Quote

Old   November 24, 2019, 11:49
Default
  #4
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 7
Carlo_P is on a distinguished road
Yes, if you change in (16 16 16) you should have a coarser mesh, so, probably a less accurate result.
Furthermore, you can also have stability problem, due to the small quality of the mesh, since the blockMesh cells are very not regular.
You have to set the (xcell ycell zcell) in order to have a quite regular hexaedral, so the xcell should be xlength/cellDimension
ycell should be ylength/cellDimension
zcell should be zlength/cellDimension

where cellDimension should the same.

Obviously, this is a very simple first rule.
Carlo_P is offline   Reply With Quote

Old   November 26, 2019, 09:05
Default Inconsistent number of faces
  #5
New Member
 
Sama
Join Date: Jan 2019
Posts: 16
Rep Power: 7
Samsam2 is on a distinguished road
Hello Carlo,
Thank you so much for your reply. I dont know what is wrong with my mesh. I get error of "Inconsistent number of faces between block pair 0 and 1". Here is copy of my blockmesh dict:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}

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

scale 1;

vertices
(
(-296 -296.6 -5000)
(-296 -296.6 2192)
(-296 -296.6 2792)
(-296 -296.6 2992)
(-296 296.6 2992)
(-296 296.6 2792)
(-296 396.6 2792)
(-296 396.6 2192)
(-296 296.6 2192)
(-296 296.6 -5000)
(296 -296.6 -5000)
(296 -296.6 2192)
(296 -296.6 2792)
(296 -296.6 2992)
(296 296.6 2992)
(296 296.6 2792)
(296 396.6 2792)
(296 396.6 2192)
(296 296.6 2192)
(296 296.6 -5000)

);
blocks
(
hex (0 9 8 1 10 19 18 11) (16 16 194) simpleGrading (1 1 1)
hex (1 8 5 2 11 18 15 12) (16 16 22) simpleGrading (1 1 1)
hex (2 5 4 3 12 15 14 13) (16 16 5) simpleGrading (1 1 1)
hex (8 7 6 5 18 17 16 15) (16 2 22) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
frontAndBack
{
type wall;
faces
(
(10 11 18 19)
(11 12 15 18)
(12 13 14 15)
(18 15 16 17)
(9 8 1 0)
(8 5 2 1)
(5 4 3 2)
(7 6 5 8)
);
}
walls
{
type wall;
faces
(
(0 1 11 10)
(1 2 12 11)
(2 3 13 12)
(15 14 4 5)
(16 15 5 6)
(18 17 7 8)
(19 18 8 9)
);
}
outlet
{
type patch;
faces
(
(0 10 19 9)
);
}
inletone
{
type patch;
faces
(
(3 13 14 4)
);
}
inlettwo
{
type patch;
faces
(
(17 16 6 7)
);
}
);

Could you please help me how to solve this problem?
Thanks alot!
Samsam2 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
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
decomposePar -allRegions stru OpenFOAM Pre-Processing 2 August 25, 2015 03:58
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 17:12


All times are GMT -4. The time now is 17:14.