|
[Sponsors] |
[blockMesh] About Simple Grading in blockMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 10, 2016, 21:47 |
About Simple Grading in blockMesh
|
#1 |
Member
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11 |
I understand simple grading is the ratio between the size of the end cell and the size of initial cell.
How about the cell size in between, what kind of changes they follow to reach the final cell? Like constant changes? For instane, the first cell is size 10 and the last cell is size 5, the middle cells will have a size 10-dx*(N-1) ? where the dx is the constant changes between cells, N is the number of cells in that direction. This is how i understand it, not sure if thats right. I am writing a small code to output the cell ID by just inputting the x,y coordinates, however i realised that it only work fine for uniform distributed mesh, not the one with gradings. Hence i came out with this question. Any one have any suggestions? (Or if anyone has faster way to output cell ID (in paraview) and dont mind share with me) Many Thanks. |
|
January 12, 2016, 05:45 |
|
#2 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
The expansion is geometric, not arithmetic. Here is a useful tool that gives you an idea about the expansion from the start cell to the end cell: https://openfoamwiki.net/index.php/S...ng_calculation |
|
May 7, 2020, 06:50 |
|
#3 |
New Member
Jon Vegard Venås
Join Date: Apr 2014
Posts: 16
Rep Power: 12 |
What is the exact formula used here? With being the number of cells, being the expansion ratio, the total length, and based on the distribution of the nodes
the following formula seems reasonable to me Alternatively, the formulas for a geometric expansion but neither matches the program (or OpenFoam?). What is wrong here? Last edited by Zetison; May 8, 2020 at 09:46. |
|
May 8, 2020, 08:47 |
|
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 746
Rep Power: 14 |
Apologies, I did not try to debug your maths above, but for simplicity I will give you the correct expressions below in a simpler and more standard terminology.
For a set of cells, with vertices , where varies from 0 to , then the cell width is the gap between the vertices. If we define a constant stretching rate of then: Armed with this, you can get to the following: now , the ratio of the last to the first cell width, so: The 's form a geometric progression, the sum of which is: So, the coord of vertex is: Finally, the cell centre is defined as so you can then calculate the cell coords using . This is probably what you are outputing from OpenFOAM when you are doing the comparison. Here's a worked example: n = 5 beta = 1.3 r = 2.8561 i, x, dx, xc 0 0.000 0.100 0.050 1 0.100 0.130 0.165 2 0.230 0.169 0.315 3 0.399 0.220 0.509 4 0.619 0.286 0.762 5 0.904 Hope this helps - good luck! (PS - can someone tell me how to format a table in a post, to get the spacing right?) |
|
May 9, 2020, 06:37 |
|
#5 |
New Member
Jon Vegard Venås
Join Date: Apr 2014
Posts: 16
Rep Power: 12 |
Thanks for your reply, your formula gets me very close. Given a length , the width of the start cell and the end cell one can compute the number of cells using the equations
Solving yields such that For I then get and (rounded from ) Comparing this to the "Scripts/blockMesh grading calculation"-tool we have Ps. I do not think it is possible to create tables here considering the lacking response on this post making table in cfd-post with example |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SIMPLE algorithm in 3D cylindrical coordinates | zouchu | Main CFD Forum | 1 | January 20, 2014 18:02 |
Inconsistent Grading Caused by Simple Translation | wildfire230 | OpenFOAM Running, Solving & CFD | 5 | August 25, 2013 12:08 |
[ICEM] Subdomain meshing and simple Hexahedral Grading | Mojtaba.a | ANSYS Meshing & Geometry | 0 | April 22, 2013 14:28 |
[blockMesh] A simple problem about blockMesh | sharonyue | OpenFOAM Meshing & Mesh Conversion | 2 | September 30, 2012 21:34 |
Blockmesh cavity error message | tonitoney | OpenFOAM Installation | 2 | March 17, 2008 12:59 |