What is a Courant Number?
The courant number is a dimensionless value representing the time a particle stays in one cell of the mesh. It must be below 1 and should be below 0.7. The intention of this article is to give a best practice of how to set your mesh and timestep in case you have problems with the courant number. If you want to have more details you should read this article.
If the courant number exceeds 1, the timestep is to large to see the particle in one cell, it “skips” the cell. If it is smaller than 0.7, the particle stays in the cell for at least two timesteps. The picture below visualizes this situation.
When the courant number exceeds one, instabilities are amplified throughout the domain and cause divergence of the simulation. Accordingly to decrease the courant number we can either:
- decrease the time step or
- coarsen the mesh
- Make sure the sizes of the elements in the mesh do not differ too much. Measure the average cell size of your mesh, in our case it is about 1.7 mm.
- Now have a look at your flow velocity, let’s assume it is 30 m/s. Accordingly the average time a particle stays in one cell is (1,7e-3/30) 5.67e-5s.
- This is the basis for defining the timestep: To make sure your time is not too high set your initial timestep to 10% this calculated value (in our case this would be 5.6e-6s).
- Multiply this time by the number of timesteps you want to calculate to receive the value for the end time.
Often the reason for a failed simulation is not actually the courant number, but something else. This issue might just result in a bad courant number. If you followed this guideline and still get error messages have a closer look to your boundary conditions and the quality of your mesh.