I have a basic simulation in Ansys cfx and I want study Grid Convergence Index on that in order to speed up the simulation. But I have no idea how to do that. Could anyone please help me ?
The procedure could be summarized as in the following.
1. Set up a way to produce finer grids in controlled manner, such that you define the number of elements as
N = f(m), where m is some parameter under designer's control and f() is usual a power law.
2. Identify one or more (but it should be a finite set) output measurements at some specific location that play a significant role in your simulation (pressure, velocity, shear stress at specific points). The best option is to choose values that can be computed analytically; otherwise you should choose quantities for which you have reference correct value from experiments, another validated numerical model or the literature (if you don't have any of them, choose results which you can evaluate with physical intuition).
3. Run a number of simulation with the same physical parameters but different meshes.
4. Substract the selected outputs from their "correct" value (or viceversa, just pay attention to the meaning of the sign) and plot them. If your simulation is converging, you should see the curve decreasing, If not, go back and review your code. If yes, you might try to interpolate the error curve to get a function error = error(N) or error = error(m). You might also want to do the same for the relative error, which you compute just dividing by the "correct" value. If you don't have a correct value, you might substract the value for two consecutive mesh refinements (finer-coarser, or viceversa, again pay attention to the meaning of the sign). If there's convergence, you should the error curve goes to zero when the number of elements is increasing.
For more detailed discussions see for example the following references:
perform many simulations reducing the mesh size. Once the results, for example the pressure fiels, remains constant even by reducing the mesh size, you have reached the optimal mesh size that combines the accuracy of the results and a low computational effort.
The procedure could be summarized as in the following.
1. Set up a way to produce finer grids in controlled manner, such that you define the number of elements as
N = f(m), where m is some parameter under designer's control and f() is usual a power law.
2. Identify one or more (but it should be a finite set) output measurements at some specific location that play a significant role in your simulation (pressure, velocity, shear stress at specific points). The best option is to choose values that can be computed analytically; otherwise you should choose quantities for which you have reference correct value from experiments, another validated numerical model or the literature (if you don't have any of them, choose results which you can evaluate with physical intuition).
3. Run a number of simulation with the same physical parameters but different meshes.
4. Substract the selected outputs from their "correct" value (or viceversa, just pay attention to the meaning of the sign) and plot them. If your simulation is converging, you should see the curve decreasing, If not, go back and review your code. If yes, you might try to interpolate the error curve to get a function error = error(N) or error = error(m). You might also want to do the same for the relative error, which you compute just dividing by the "correct" value. If you don't have a correct value, you might substract the value for two consecutive mesh refinements (finer-coarser, or viceversa, again pay attention to the meaning of the sign). If there's convergence, you should the error curve goes to zero when the number of elements is increasing.
For more detailed discussions see for example the following references: