|
[Sponsors] |
[blockMesh] About Simple Grading in blockMesh |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#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. |
|
![]() |
![]() |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Jon Vegard Venås
Join Date: Apr 2014
Posts: 16
Rep Power: 13 ![]() |
What is the exact formula used here? With
![]() ![]() ![]() ![]() 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 08:46. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 825
Rep Power: 16 ![]() |
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 ![]() ![]() ![]() ![]() ![]() ![]() Armed with this, you can get to the following: ![]() now ![]() ![]() The ![]() ![]() So, the coord of vertex ![]() ![]() Finally, the cell centre is defined as ![]() so you can then calculate the cell coords using ![]() 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?) |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Jon Vegard Venås
Join Date: Apr 2014
Posts: 16
Rep Power: 13 ![]() |
Thanks for your reply, your formula gets me very close. Given a length
![]() ![]() ![]() ![]() ![]() ![]() Solving yields ![]() such that ![]() For ![]() ![]() ![]() ![]() 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 |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SIMPLE algorithm in 3D cylindrical coordinates | zouchu | Main CFD Forum | 1 | January 20, 2014 17:02 |
Inconsistent Grading Caused by Simple Translation | wildfire230 | OpenFOAM Running, Solving & CFD | 5 | August 25, 2013 11:08 |
[ICEM] Subdomain meshing and simple Hexahedral Grading | Mojtaba.a | ANSYS Meshing & Geometry | 0 | April 22, 2013 13:28 |
[blockMesh] A simple problem about blockMesh | sharonyue | OpenFOAM Meshing & Mesh Conversion | 2 | September 30, 2012 20:34 |
Blockmesh cavity error message | tonitoney | OpenFOAM Installation | 2 | March 17, 2008 11:59 |