CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Ansys fluent grid independence test (https://www.cfd-online.com/Forums/fluent/170289-ansys-fluent-grid-independence-test.html)

Jesh April 28, 2016 07:26

Ansys fluent grid independence test
 
Hii.. i am new to CFD. I am doing spanwise lift analysis for my wing design.i have no idea how to do grid independence test for my model.please help me with it.:confused:

scipy April 28, 2016 10:27

Just start with a coarse grid (let's say 50 points spanwise) and refine the mesh in all directions (both normal to the wing and spanwise/chordwise) until results stop differing between the solutions (or at least differ <2%). Then you can call your solution grid independent.

Jesh April 28, 2016 10:38

okay...but what u mean by solution? the Cl values which i want to get from cfd post?

scipy April 28, 2016 10:48

Yes. Any observable value or whatever you're aiming to present. You can also set up a Cl, Cd, Cm or other monitor in FLUENT (no need to wait until it's all over to get to CFD-Post). So, let's say you're trying to match the results of an experiment and those are Cd=0.15 and Cl=0.5 or whatever.

Your first (coarse/rough) grid gives you Cd=0.19 and Cl=0.33, then you refine your grid and run the simulation again, this time Cd=0.17 and Cl=0.42. Next refinement step Cd=0.157 maybe and Cl=0.485.. and last refinement you get to 0.152 and 0.496.

The percentile change between the last two Cd results is ~3% and for Cl it's ~2,3%. You might as well call this grid independent or do another refinement and run again. It's just important to show that you are asymptotically approaching a single value (this can be an experimental value or an analytical solution) - at least until things like round off errors and discretisation errors come into play.

Jesh April 28, 2016 10:54

oh okay..thank you so much..that was very helpful sir :)

ENG.AHMAD February 3, 2020 17:24

Quote:

Originally Posted by scipy (Post 597161)
Yes. Any observable value or whatever you're aiming to present. You can also set up a Cl, Cd, Cm or other monitor in FLUENT (no need to wait until it's all over to get to CFD-Post). So, let's say you're trying to match the results of an experiment and those are Cd=0.15 and Cl=0.5 or whatever.

Your first (coarse/rough) grid gives you Cd=0.19 and Cl=0.33, then you refine your grid and run the simulation again, this time Cd=0.17 and Cl=0.42. Next refinement step Cd=0.157 maybe and Cl=0.485.. and last refinement you get to 0.152 and 0.496.

The percentile change between the last two Cd results is ~3% and for Cl it's ~2,3%. You might as well call this grid independent or do another refinement and run again. It's just important to show that you are asymptotically approaching a single value (this can be an experimental value or an analytical solution) - at least until things like round off errors and discretisation errors come into play.

When the number of grid elements increased from 28 million to 29 million, the Nusselt number and the pressure drop were changed by 2.61% and 0.39%, respectively, can my grid be now considered independent?!

scipy February 3, 2020 17:39

This depends on the grids you used previously and where exactly you squeezed the 1 million elements.

For example... a grid that goes from 28 mil to 29 mil is baaasically the same. Unless you fit all 1 million elements directly into an area that was under-defined (let's say the boundary layer). I'd say that grid is already detailed enough but I don't know the details of your problem. To show grid independence for a problem that you now know requires around 30 million elements, you should start much lower/coarser.

Grid 1 = 500 000 elements
Grid 2 = 2 mil elements
Grid 3 = 5-8 mil
Grid 4 = 12-15 mil
Grid 5 = 25-30 mil

Then you can show that the change from Grid 4 to Grid 5 was negligible OR if it wasn't for some reason, you should change your approach. Use higher quality elements for the domain (such as hex instead of tetra), add elements in the normal direction of the wall (boundary layer), place elements in areas where flow features require it or something else entirely. Maybe you can do a Grid 6 of 35 mil to show that the change is then irrelevant and then call Grid 5 your grid-independent solution.

It all depends on the problem you're trying to solve, your resources, meshing methods, solvers used and a shitload of other stuff.

o/

ENG.AHMAD February 4, 2020 02:54

Quote:

Originally Posted by scipy (Post 756607)
This depends on the grids you used previously and where exactly you squeezed the 1 million elements.

For example... a grid that goes from 28 mil to 29 mil is baaasically the same. Unless you fit all 1 million elements directly into an area that was under-defined (let's say the boundary layer). I'd say that grid is already detailed enough but I don't know the details of your problem. To show grid independence for a problem that you now know requires around 30 million elements, you should start much lower/coarser.

Grid 1 = 500 000 elements
Grid 2 = 2 mil elements
Grid 3 = 5-8 mil
Grid 4 = 12-15 mil
Grid 5 = 25-30 mil

Then you can show that the change from Grid 4 to Grid 5 was negligible OR if it wasn't for some reason, you should change your approach. Use higher quality elements for the domain (such as hex instead of tetra), add elements in the normal direction of the wall (boundary layer), place elements in areas where flow features require it or something else entirely. Maybe you can do a Grid 6 of 35 mil to show that the change is then irrelevant and then call Grid 5 your grid-independent solution.

It all depends on the problem you're trying to solve, your resources, meshing methods, solvers used and a shitload of other stuff.

o/

Thank you very much for your prompt response. I followed the method of changing the value of y + in order to change the size of the grid. Is this method correct, or should the size of the maximum element size or the number of layers in the inflation of the boundary layer be changed? please follow any methods that should be used for scaling the grid size.
Many thanks in advance

scipy February 4, 2020 04:45

It's not possible for me to know that since I don't know anything about your problem. Also, there's a LOT of difference in grids that need to have a y+<1, y+<5 or wall-function grids where y+ can be anywhere from 30-300. If you're in the log-law region then refining the grid for y+ won't really bring you that much, but if it's a direct wall resolving grid then all the solutions where y+ is out of the specified range are basically garbage.

y+ in an of itself might not be enough. Imagine you had the first element close enough to the wall for the y+ to be OK but then you just transition right away into tetrahedral elements. That grid would be garbage since it wouldn't resolve the whole boundary layer. You should read the meshing recommendations that come with your solver or at least ones for your specific turbulence model and wall resolving approach (wall functions or direct). Usually these will say "at least 10 prism elements in the normal direction with a growth no more than 20% in this direction". For wall resolving grids, even that is too low and you usually have to have as many layers as needed so that the last prismatic elements are "tall" enough so that the volumetric transition ratio into the first tetra or poly elements is not more than 30% - the volume of the last prism has to be just 20-30% less than the volume of the first attaching tetra/poly element.

Your refinements should be in all these directions AND account for areas with large pressure gradients or other values of interest. If you have shockwaves in your problem, then your mesh has too be refined along the lines of huge pressure changes in order to be able to resolve that area at all. Just an example..

ENG.AHMAD February 4, 2020 08:47

Quote:

Originally Posted by scipy (Post 756652)
It's not possible for me to know that since I don't know anything about your problem. Also, there's a LOT of difference in grids that need to have a y+<1, y+<5 or wall-function grids where y+ can be anywhere from 30-300. If you're in the log-law region then refining the grid for y+ won't really bring you that much, but if it's a direct wall resolving grid then all the solutions where y+ is out of the specified range are basically garbage.

y+ in an of itself might not be enough. Imagine you had the first element close enough to the wall for the y+ to be OK but then you just transition right away into tetrahedral elements. That grid would be garbage since it wouldn't resolve the whole boundary layer. You should read the meshing recommendations that come with your solver or at least ones for your specific turbulence model and wall resolving approach (wall functions or direct). Usually these will say "at least 10 prism elements in the normal direction with a growth no more than 20% in this direction". For wall resolving grids, even that is too low and you usually have to have as many layers as needed so that the last prismatic elements are "tall" enough so that the volumetric transition ratio into the first tetra or poly elements is not more than 30% - the volume of the last prism has to be just 20-30% less than the volume of the first attaching tetra/poly element.

Your refinements should be in all these directions AND account for areas with large pressure gradients or other values of interest. If you have shockwaves in your problem, then your mesh has too be refined along the lines of huge pressure changes in order to be able to resolve that area at all. Just an example..

Thanks a lot for the explanation you provided

LuckyTran February 4, 2020 09:02

Grid independence is a misleading term. You'll never get 0% change.


Grid sensitivity is a better mindset to have. You need to quantify the sensitivity of the "sought-after-parameter" on the grid by testing various grids. You'll find some finite % change. You decide whether that % change is acceptable or not using whatever criteria is relevant.

vinerm February 4, 2020 09:54

Very true
 
Yes, that's true; grid independence is a misnomer. Grid Sensitivity is more appropriate and is subjective. Similarly, this is also true that most users think of refining the mesh whenever they have to study the grid sensitivity. While this is incorrect. Coarsening of the mesh is equally effective and is used by professionals most of the time. If lift or drag variation is within 1 to 2% for two meshes, then both are equally good; of course, coarser is meant to be used. Lift and drag are only examples; you should monitor the field that is most specific to your case.


All times are GMT -4. The time now is 23:46.