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

[blockMesh] blockMesh: how the mesh can be graded in the top and the botoom

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By GerhardHolzinger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2018, 06:19
Default blockMesh: how the mesh can be graded in the top and the botoom
  #1
MFN
New Member
 
nbdy
Join Date: May 2018
Posts: 6
Rep Power: 7
MFN is on a distinguished road
hello,


i'am using blockmesh for meshing and i dont know how the mesh can be graded on the top of my geometry ?

The expansion ratio enables the mesh to be graded only in the bottom with SimpleGrading.




Code:
hex (27 26 15 14 0 1 12 13) (100 180 1) sampleGrading (1 18 1) // block 0 outlet
hex (26 25 16 15 1 2 11 12) (800 180 1) sampleGrading (1 18 1) // block 1
hex (25 24 17 16 2 3 10 11) (10 180 1) sampleGrading (1 18 1) // block 2 inlet
hex (24 23 18 17 3 4 9 10) (10  180 1) sampleGrading (1 18 1) // block 3 inlet
hex (23 22 19 18 4 5 8 9) (800 180 1) sampleGrading (1 18 1) // block 4
hex (22 21 20 19 5 6 7 8) (100 180 1) sampleGrading (1 18 1) // block 5 outlet2
Anyone can help me please ?




MFN is offline   Reply With Quote

Old   August 22, 2018, 18:53
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 14
clapointe is on a distinguished road
I came upon this thread yesterday -- it looks like what you're looking for has been coded previously : https://www.cfd-online.com/Forums/op...e-grading.html.

Otherwise, I've created half my domain and used mirrorMesh before to obtain the same result.

Caelan
clapointe is offline   Reply With Quote

Old   August 23, 2018, 04:16
Default
  #3
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
With the current version of OpenFOAM, this is possible using standard blockMesh, see the user guide

Apart from the usual expansion ratio per direction, you can specify the grading for sections in a certain direction. The example below defines 2 sections with different grading in x-direction, and a uniform grading in the other directions.

Code:
// ( % dir, % No. of cells, expansion ratio )
hex ( 27 36 36 27 28 37 41 32 )   ( 96 1 11 )  grading (  ((0.05 0.3 50) (0.95 0.7 3.5)) 1 1  )
Each triple defines
  • percentage of the edge's length
  • percentage of the number of cells to use
  • expansion ratio

Thus, the block definition above translates to a block, having 96 cells in x-direction, with a grading in x-direction of
  • 30 % of the cells, on 5 % of the edge having an expansion ratio of 50
  • 70 % of the cells, on 95 % of the edge having an expansion ratio of 3.5


The user guide says, that the percentages do not need to add up to 1 or 100. They simply specify the relative amount of the edge's length, or the number of cells.
GerhardHolzinger 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



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