CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Grid Independence problem (

immortality May 20, 2013 16:37

Grid Independence problem
4 Attachment(s)
In the case I'm running I changed the mesh(350*20 the original like a shock tube case) and fined the grid(690*40)to and although the residuals are the same,but the values of variables change even I fined grid more(to 1040*60) and to(1380*80) but the values changed again.
now the speed of run has become very low and I don't know if it will reach to constant results that not change with mesh anymore or not and till when can continue. because the results in assigned time(for example 1.2e-5s) are increasing their differences how much I move ahead.
I use rhoCentralFoam and it seems it doesn't have an internal loop in it.can it cause any problem?
the case is like shockTube but is 2D in grid that both smaller sides are moving walls that open and close to the environment(specified values for BC).
since its related to my thesis unfortunately I'm not allowed to put it here,but if there is any hint or advice I will be glad to hear(read)it!

kmooney May 20, 2013 23:03

I wouldn't say its safe to assume that any of the tutorial cases are physically accurate. They're tutorials in case setup not validation cases. Its not surprising that you are seeing grid dependence issues.

immortality May 21, 2013 07:08

Hi dear Kyle
I'm changing the grid sizes and expect that the results change very low after reaching to a fine enough mesh,and also I have used my BC' I don't use the same tutorials but its similar and I originated it from shock tube case.i don't understand your meaning exactly.thank you for more clarification.
new:I have found it:
but why grid near the wall should not be changed?and how could do this in OpenFOAM?

immortality May 22, 2013 15:01

3 Attachment(s)
its necessary to give more information now.
there is a simple rectangular geometry.then whats the approach to study grid independence.
1)does the mesh have to be uniform or non uniform in studying?
2)is it acceptable to fix one direction grid points and fine the mesh by only increase the other side mesh points?

hex (0 1 4 3 9 10 13 12) (500 50 1) simpleGrading (1 4 1)
    hex (1 2 5 4 10 11 14 13) (500 50 1) simpleGrading (1 4 1)
    hex (3 4 7 6 12 13 16 15) (500 50 1) simpleGrading (1 .25 1)
    hex (4 5 8 7 13 14 17 16) (500 50 1) simpleGrading (1 .25 1)

3)what should be "aspect ratio" in each of grids?generally is it require that the mesh be good enough in each step or not important in compare with increasing mesh points(each mesh quality isn't important by itself very much and its sufficient to be somewhat acceptable)?
4)how much change in variables(p,U,T) are acceptable in each step of refining mesh?
5)and generally say whats the approach and way somewhat in details like two questions above.
I want to use grid dependence study first for laminar case,so please guide through this way.

immortality May 23, 2013 04:59

2 Attachment(s)
I have found that all is because of a vortex.
when i fine the mesh,results change very much,because a vortex exists inside and when I fine mesh it shows its center pressure lower and lower.
how can overcome this situation?is the center pressure of vortex important to resolve better (and fine mesh for that) or not?
also when mesh is coarse it doesn't capture vortex at all.
left pic.)fine mesh
right pic.)coarse mesh(it doen't capture the vortex)

immortality May 27, 2013 18:18

criteria of independence
I wonder that is there any criteria for grid independence?
Mean how much difference in variables is acceptable?
Whats the rule of thumb here generally and not case specific?
For example the percent of change of pressure should be around how much generally?
I appreciate all experiences of checking your case grid independence criteria and all advice are thanked.

wyldckat May 28, 2013 18:12

Hi Ehsan,

Since you asked my opinion on this topic, here goes: this is one of those really complicated topics. Specially when it comes to CFD. I'm unfortunately not familiar with any literature on this topic, so this is all I'm able to comment on.

AFAIK, the standard procedure is to have experimental data for comparison. Then configure the mesh, the boundary conditions and the solver algorithms in a way that it's possible to recreate the original experiment. This usually also requires knowledge/understanding of the physical forces that are occurring in the experiment. Then figuring out what can be somewhat ignored, so that we don't need a mesh with 1e60 cells to accurately simulate the case :D

The problem becomes bigger when we do not have experimental data. AFAIK, this is when LES and DNS should be used, since these give the most accurate answers... although proper calibration of the mesh/BCs/solvers is a must. Then compare results with the RANS (OpenFOAM's RAS) executed case, to see what can be discarded and what can be used.

But if you're stuck with RANS only, then things get reaaaaally tricky. The finer the mesh is, the more characteristics you're able to get out of the simulation. For example, it's easy to find vortices, where none existed on a coarser mesh.
This then implies that you also have to take into account the configuration of the "fvSchemes" and "fvSolution", because the finer the mesh is, the more you probably will have to calibrate these parameters.
Then the turbulence model might become inaccurate, due to the finer mesh resolution... as I said, reaaaaally tricky :(

From what I can remember, there are at least two training/testing/validation cases that should be easily found:
  • The 2D case of the cylinder in the middle of a flow. There's tons of experimental data for various numbers of Reynolds, so it's a matter of running simulations to compare results.
  • The Ahmed body, which is an abstract vehicle shape, for which there should be some experimental data as well.
Either one of these cases could be used to help validate your own work, as well as give you more self-assurance on what you're doing for your thesis.

Best regards,

All times are GMT -4. The time now is 08:14.