next up previous
Next: Source term integration Up: Making a hydrodynamics code Previous: Making a hydrodynamics code

Choosing the time step

The maximum time step one can take is set by the assumption that one can consider each cell only to interact with its direct neighbours: the domain of influence of cell $i$ should not reach cells $i-2$ and $i+2$! Since the maximum communication speed is $v-s$ or $v+s$, this gives a condition on the time step. This is known as the Courant-Friedrichs-Lewy (CFL) condition. If your time step exceeds this value, the method will become unstable. Since this maximum time step depends on $v$ and $s$, this means that the time step is not fixed, but depends on the conditions on the grid, and should be re-calculated every time step. It is normally wise to take a fraction between 1 and 0.5 of this maximum time step.

Garrelt Mellema 2003-01-20