CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Best approach to study temporal and spatial convergence (https://www.cfd-online.com/Forums/main/120827-best-approach-study-temporal-spatial-convergence.html)

ndabir July 15, 2013 16:20

Best approach to study temporal and spatial convergence
 
Hi all,

I am doing an unsteady CFD simulation and I am totally confused of what approach to take to study both temporal and spatial convergence. here is the options that I think might be helpful:

1) First refine the grid with a specific time step until the spatial error goes to zero. Then take that grid and use different time steps to study temporal convergence.

2) Other approach can be the opposite of the above. Which means, first study the time step effect on a specific grid and then after reducing time step error to almost zero, then fix the refined time step and reduce the mesh size.

Which one is better? Is there any better approach?
My simulations take relatively long time to give results (2 days) so I need a good approach to avoid long simulations.

triple_r July 15, 2013 19:01

I don't have much experience in this kind of problems, but here are my two cents:

Time step might be dependent on the spacial resolution, specially if you are using explicit methods, so the second method is not something that I would try. When you increase the grid resolution while keeping the time step the same, you are essentially increasing the CFL number, and that might cause instabilities in the code.

Also, try using an adaptive time-stepping method: select a time step and march one step, then use two steps two march the same time and compare your result of interest, if the difference is smaller than a threshold, use the larger step for the next time step. If the difference is too large, use four steps (or three) and repeat this until you get a difference small enough for your case.

This might seem very time consuming, but if you are planning on running the whole simulation with different time steps to check the time-step independency, then you are already solving with the smaller and larger steps, this might even help you save solution time.

ndabir July 15, 2013 20:25

Thanks for your response. My simulation is a bubble collapse near a wall. The bubble collapses because of the pressure difference between inside bubble (low pressure) and outside bubble inside water higher pressure. I use VOF (Volume of Fluid) to capture the interface. I use SIMPLE algorithm in FLUENT which is basically an implicit solver. Previously I used explicit method to only discretize VOF equation but because of stability issues, I changed it to implicit. Now I am not facing any divergence problems but temporal and spatial convergence is an issue.
The problem with my simulation is the process is very slow at the beginning of simulation but most of the important physics happen only in the last 20% time of the simulation. So I definitely need variable time step during one simulation. This makes it harder to do the temporal convergence.

FMDenaro July 16, 2013 04:47

First I strongly suggest to chech for a simple analytical solution!

Then:

Spatial accuracy: use a fixed dt, taken as small as possible
Temporal accuracy: use a fixes space step taken as small as possible

Remember that the local truncation error is a function of L = L(dt,dx,dy,dz) therefore to chech for a single discretization parameter you must ensure that the other do not enter into the convergence (you see that when the convergence is not reached)

In general the accuracy analysis is performed by fixing dt/h = constant

ndabir July 16, 2013 10:43

how to determine the value of dt/h=constant? I mean what should the value of this "constant" be?

FMDenaro July 16, 2013 11:32

the value is constrained by the stability requirement of the scheme

triple_r July 16, 2013 11:46

And if the time-advancing scheme is unconditionally stable, then the time step size comes from the fastest physical phenomenon happening during the simulation. If this fastest event has a time scale of Dt, then your time step, dt, should be smaller to make sure you are capturing that event.

BTW, I think I remember you being able to specify a CFL number in FLUENT instead of specifying a constant time step. You might be better off with that since, as you said, in the early stages it is quite calm so time step can be large for a given CFL, but when the bubble starts imploding, things move faster and for CFL to remain constant the software has to bring the time step down. Then, for time-step independency study, you can run your simulation for different upper limits for CFL. I hope it makes sense.


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