|
[Sponsors] |
October 7, 2018, 04:50 |
Determining Ideal Mesh Size
|
#1 |
New Member
Jacob
Join Date: Sep 2018
Posts: 7
Rep Power: 8 |
Dear All,
I'm pretty new to CFD in general and am using Ansys Fluent. I have sketched out what i need in design modeller. However, I'm quite concern on the mesh size. Is there a relation between velocity of the air and mesh size? I can't decide on what mesh size and the amount of elements to use. Thank you guys. |
|
October 7, 2018, 13:46 |
|
#2 |
Senior Member
Join Date: Dec 2016
Posts: 152
Rep Power: 10 |
Hey, welcome to the world of CFD.
Short answer, yes, mesh size is really important and there are a few equations (like in turublence, the calculation of the y+ value, and the Flow Courant Number) that you can use depending on your flow conditions to maintain a good equation. However, these will only give an approximation and cannot be used to give the perfect mesh the first time. Iteration must be used to determine the ideal mesh. Long answer, let's say that you mesh your fluid domain with a really coarse mesh and run your simulation. You get your results, and they don't really match up to your hand-calculated values (if you can hand-calculate), or they just don't make sense. The next step would be to make your elements smaller, AKA increase your mesh resolution. You run your simulation again, and you get in the ball park of where you're supposed to be. Congrats, you have a decent solution. Now, this does not mean this is right. There are a lot of numerical errors that are introduced in CFD due to mesh size. Sometimes there are a lot of elements where nothing particularily interesting is happening in the fluid, and not enough where there's this awesome vortex going on. And obvious solution would be to make a super-fine mesh (>1 billion elements) that can capture everything in the domain perfectly. However, this is not computationally efficient, nor is it even possible. Furthermore, there's a relationship between the size of your mesh and how nicely your solution converges (coarse mesh usually leads to better convergence, fine mesh usually leads to divergence). The goal is to fine the happy medium. So, back to your decent solution. How exactly can engineers trust these results? Easy, we prove that the mesh size is adequate to give our desired solution, while not being too computationally expensive. To do this, we run a mesh sensitivity analysis. To do this, we start out with a mesh size that we think is good, and then refine it. Then, we either run the simulation again or, if the simulation takes a long time, we run a steady-state simulation at the most chaotic time point/conditions. We then export a global value (like velocity along a set line in each domain, or pressure along the exterior of the surface, etc.) and compare it to the first mesh. Remember that numerical error I mentioned earlier? Well, this will prove its existence, as the two values will not be the same. Then, you take a coarser mesh and run it again, and compare the values. Is the percent difference between the coarse mesh and the original mesh under what you think is acceptable (< 5%)? What about from the original to the fine mesh? Can you justify the length it took to run the fine mesh over the original mesh? For extra references, check out (https://caeai.com/blog/how-do-i-know...sh-good-enough), (Grid sensitivity analysis), or just google "mesh sensitivity analysis". As for the quantities I mentioned earlier, feel free to look them up if you like, but I'm not sure they would benefit you at the moment. |
|
October 7, 2018, 23:05 |
|
#3 |
New Member
Jacob
Join Date: Sep 2018
Posts: 7
Rep Power: 8 |
Thank you for your informative insights. I will take your advice and look more into it.
|
|
October 8, 2018, 11:45 |
|
#4 |
Senior Member
André
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
If you are running a transient simulation, you can look calculate the Courant number:
Co = v * dt / dx, where v is your maximum velocity in the domain, dt is your time step (defined in solver), and dx is your typical mesh size. This number should be close to 1 to ensure accuracy and numerical stability. If you are running a steady-state simulation, typically the smaller the better, but you need to have a reasonable number of total elements depending on what hardware capabilities you have. There are also some implications if you use turbulence models, which dictate the recommended cell size near walls based on the fluid velocity and properties.
__________________
Sapere aude! |
|
October 23, 2019, 19:22 |
|
#5 |
New Member
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9 |
Thanks for the information but would you let me know how I should decide about the smallest single mesh size in a simulation respective to the dimensions of body?or domain. Do we need to try on various range based upon former knowledge either experience or if there is identical equation or solution for calculating smallest cell size in the steady state simulation?
|
|
October 23, 2019, 19:33 |
|
#6 |
Senior Member
Join Date: Dec 2016
Posts: 152
Rep Power: 10 |
I'm guessing by "single mesh size" you mean cell (aka, element), in which you have to follow exactly what I just stated above. Now, if you're running a simulation similar to what others have published, look at what they've done for a mesh sensitivity analysis and try to emulate it. There is no such thing as "best mesh", there's only the most "reliable mesh" which you determine from running a sensitivity analysis.
|
|
October 23, 2019, 21:08 |
|
#7 |
New Member
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9 |
Really appreciate that.
Regards |
|
September 15, 2022, 01:34 |
reply
|
#8 |
New Member
gedu
Join Date: Aug 2022
Posts: 1
Rep Power: 0 |
in this of transient analysis. There is only one equation and two unknowns( timestep and the mesh size).
Co = v * dt / dx so what to determine whether mesh size or the time step? |
|
April 14, 2023, 08:37 |
|
#9 |
Senior Member
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 133
Rep Power: 6 |
||
April 14, 2023, 12:39 |
|
#10 |
Senior Member
Join Date: Jun 2009
Location: Technische Universität Chemnitz
Posts: 107
Rep Power: 17 |
Fluent is an implicit solver, so the CFL is not the speed limit that it is for an explicit method. Depending on the model, it is not uncommon to have CFL>100 for certain parts of the flow field.
|
|
Tags |
mesh and grid, mesh element, velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
[Other] dynamicTopoFVMesh and pointDisplacement | RandomUser | OpenFOAM Meshing & Mesh Conversion | 6 | April 26, 2018 08:30 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
[ICEM] Holes in geometry appearing when surface mesh size decreases | CCHunter | ANSYS Meshing & Geometry | 0 | February 20, 2015 22:30 |