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

[blockMesh] Very Basic Meshing Query

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2022, 03:10
Question Very Basic Meshing Query
  #1
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 5
CHUMMAR is on a distinguished road
Hi ,
I have made a blockMeshDict file consisitng of a cube with 10 meter length, breadth and height. I have written a line like this : hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1);
Is there any way of increasing the cell count. My total cell count now is 20*20*20 = 8000.
Is there any way of increasing it to a much larger number like, for example : hex (0 1 2 3 4 5 6 7) (1000 1000 1000) simpleGrading (1 1 1);
I tried editing like this but it wont run.

blockMeshDict file :
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0 0 0)
(10 0 0)
(10 10 0)
(0 10 0)
(0 0 10)
(10 0 10)
(10 10 10)
(0 10 10)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
);

boundary
(
hotwall
{
type wall;
faces
(
(0 4 7 3)
);
}

coldwall
{
type wall;
faces
(
(2 6 5 1)
);
}

bottom
{
type wall;
faces
(
(1 5 4 0)
);
}

top
{
type wall;
faces
(
(3 7 6 2)
);
}

front
{
type wall;
faces
(
(6 7 4 5)
);
}

back
{
type wall;
faces
(
(0 3 2 1)
);
}

);


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

After running blockMesh and then checkMesh

*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 10-2c6a80318abb
Exec : checkMesh
Date : Aug 02 2022
Time : 11:38:08
Host : "amalchummar-GL553VE"
PID : 12623
I/O : uncollated
Case : /home/amalchummar/OpenFOAM/amalchummar-10/run/Turbcube
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0s

Mesh stats
points: 9261
faces: 25200
internal faces: 22800
cells: 8000
faces per cell: 6
boundary patches: 6
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 8000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
hotwall 400 441 ok (non-closed singly connected)
coldwall 400 441 ok (non-closed singly connected)
bottom 400 441 ok (non-closed singly connected)
top 400 441 ok (non-closed singly connected)
front 400 441 ok (non-closed singly connected)
back 400 441 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (0 0 0) (10 10 10)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (0 0 0) OK.
Max cell openness = 0 OK.
Max aspect ratio = 1 OK.
Minimum face area = 0.25. Maximum face area = 0.25. Face area magnitudes OK.
Min volume = 0.125. Max volume = 0.125. Total volume = 1000. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End

Thank you so very much
CHUMMAR is offline   Reply With Quote

Old   August 2, 2022, 09:54
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Amal,

Yes you can increase the cell number in blockMeshDict but blockMesh generates mesh on a single core. Running this setup: hex (0 1 2 3 4 5 6 7) (1000 1000 1000) simpleGrading (1 1 1); means you are creating a 1 billion cells mesh on a single core:
  1. You need the appropriate amount of RAM to store such a big mesh. If you don't, blockMesh will just crash while trying to create the mesh
  2. Considering you have the appropriate amount of RAM, it's going to take ages to generate since blockMesh only run on a single core

As a workaround, you could create a coarse mesh with blockMesh and then use utilities such as refineMesh or refineHexMesh to refine your mesh in parallel.

Another way around would be to use volume refinement in snappyHexMesh.

Regards,
Yann
AtoHM and CHUMMAR like this.
Yann is online now   Reply With Quote

Old   August 2, 2022, 20:15
Talking Salome as Mesher
  #3
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 5
CHUMMAR is on a distinguished road
Thank you Yann,
I came across a tool called Salome to deal with the meshing. Is this easier than snappyHexMesh. Will using Salome be equally efficient as snappyHexMesh for meshing and then implement it somehow into the solving part
CHUMMAR is offline   Reply With Quote

Old   August 4, 2022, 04:37
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Amal,

Both have pros and cons. You can create your volume mesh in Salome and convert it to use in OpenFOAM but since I never used Salome myself I'm probably not the best person to advise you about it.

I would say it also depends on the geometry you need to mesh and the expectations you have regarding the mesh, for instance for boundary layer meshing (which is a bit annoying to deal with in snappyHexMesh)

Yann
Yann is online now   Reply With Quote

Reply

Tags
blockmesh dict, cell count


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
Map of this Meshing (sub-)Forum wyldckat OpenFOAM Meshing & Mesh Conversion 0 April 27, 2019 10:33
Meshing Query AVINASH CHANDRA Mesh Generation & Pre-Processing 0 October 29, 2013 07:00
Basic steps meshing an airfoil [ICEM] peterputer111 ANSYS Meshing & Geometry 4 April 19, 2010 13:08
Question on Basic Meshing Rule Huygen Main CFD Forum 0 January 15, 2009 13:20
Best Meshing scheme for Cylinder Nutrex Main CFD Forum 4 July 29, 2008 12:03


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