CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

BlockMesh Grading Ambiguity: How to Get Desired y1

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By linuxpirates

Reply
 
LinkBack Thread Tools Display Modes
Old   July 9, 2012, 23:09
Default BlockMesh Grading Ambiguity: How to Get Desired y1
  #1
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 151
Rep Power: 8
dancfd is on a distinguished road
Hello all,

I am having trouble getting blockMesh to produce the right y1 for my mesh. If I follow the equations in the User Guide 2.0.0 section 2.1.6.2:

Desired y1: 0.0006996
Desired cell size of last cell: 0.15
l = 1.499364 % Length of block
n = 100 % Number of cells

Therefore:
R = 0.15 / 0.0006996 = 214.408 % ratio of last to first cell size
r = R^(1/(n-1)) = 1.0557179202 % ratio of each cell to its neighbour
Alpha = R (R > 1)
Delta_x_s = 0.000370711 % Size of smallest cell

Here is the issue: Delta_x_s is supposed to equal my desired y1. The problem is blockMesh grading uses a ratio, R, to define the grading. Therefore if the same factor is applied to both first and last cell, blockMesh will not know the difference: R is the same. The only way to adjust the y1 is then to change the number of cells, I suppose - but that leaves me no control over the number of cells. Is there any way to control both the number of cells and y1?

Thanks,
Dan
dancfd is offline   Reply With Quote

Old   December 31, 2012, 04:26
Default
  #2
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Hi Dan,

Have you figured this out, if you have then please share

Happy new year!

Robert
rob3rt 0ng is offline   Reply With Quote

Old   January 2, 2013, 21:41
Default
  #3
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 151
Rep Power: 8
dancfd is on a distinguished road
Hello Robert,

Unfortunately I have not found a solution.

Happy New Year,
Dan
dancfd is offline   Reply With Quote

Old   January 4, 2013, 02:45
Default
  #4
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 255
Rep Power: 12
kalle is on a distinguished road
Quote:
Originally Posted by dancfd View Post
... Is there any way to control both the number of cells and y1?
...
Stupid answer is; adjust the length of the edge. More useful answer may be: divide the block in two, where the block close to the wall has grading such that you get delta_x_small and delta_x_large as you like, and the outer block has no grading and all cells with size delta_x_large. (or optionally also a grading, which is different from the wall block)

K
kalle is offline   Reply With Quote

Old   January 5, 2013, 04:53
Default
  #5
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Hi Karl,

But that would increase the aspect ratio both and eventually will affect the convergence, wouldn't it? Isn't there anyway to control y+ without increasing number of cells and without getting a high enough aspect ratios? Sorry for the rather impetuous question.

Regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   January 5, 2013, 14:49
Default
  #6
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 255
Rep Power: 12
kalle is on a distinguished road
You mean that the cells next to the wall becomes kind of pancake cells? That is a de facto standard of achieving near wall resolution in more or less all types of meshes. This is generally also ok, as derivatives are largest in the wall-normal direction.

If you want isotropic cells to the wall (like in the case of wall-resolved LES), you can use refineHexMesh on cells adjacent to the wall. Then you will get polyhedral cells in the interface between refined and non-refined cells (hence breaking the constraints of pure hexahedral mesh). Of course this may lead to vast amount of cells.

K
kalle is offline   Reply With Quote

Old   June 4, 2014, 01:04
Default
  #7
New Member
 
Join Date: May 2014
Posts: 1
Rep Power: 0
linuxpirates is on a distinguished road
I appear to be slightly late to the party, but it's very simple.

If you have a length L, and divide it by N elements, each element will have a size L/N.

Applying an expansion R across the entire length L, means that the first element will have a size (L/N)/sqrt(R) and the last element will have a size (L/N)*sqrt(R).

As proof, consider the ratio of the sizes of the first and last elements, you have:

(L/N)*sqrt(R) / (L/N)/sqrt(R) = R

Hence, if you want to prescribe your desired y1, you would do:

y1 = (L/N)/sqrt(R) -----> R = L^2 / (N y1)^2
Tushar@cfd likes this.
linuxpirates is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
blockMesh with double grading. spwater OpenFOAM Native Meshers: blockMesh 78 March 12, 2015 15:54
BlockMesh grading calculator hartinger OpenFOAM Native Meshers: blockMesh 24 August 14, 2014 06:45
grading in the BlockMesh Astarta OpenFOAM Native Meshers: blockMesh 1 May 23, 2011 15:39
Blockmesh cavity error message tonitoney OpenFOAM Installation 2 March 17, 2008 12:59
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 8 March 12, 2008 05:58


All times are GMT -4. The time now is 01:47.