Mid term project - Stability analysis in the unsteady problem
This mid-term project was done as a part of the course- Introduction to CFD using MATLAB and OpenFOAM
The Courant-Friedrichs-Lewy (CFL) Condition:
- The CFL condition is the condition for stability and to check the convergence criteria of the numerical solution.
- It is defined as-'The full numerical domain of dependence must contain the physical domain of dependence.' This means that the information travel during each timestep must be lower than the distance between the corresponding mesh elements.
- However, the CFL condition is not the sole condition that ensures system stability. A lot of other factors such as the mesh size and system constants play an important role in the stability analysis.
The CFL number is given as:
where alpha= thermal diffusivity
dt= time step,
dx= mesh size
For the problem in consideration, the values of alpha and dx were fixed and dt was varied to change the CFL number.
alpha= 0.01
dx= 0.01
Observations:
A) Explicit Scheme:
As can be seen from the graphs below, the solution was stable till CFL number 0.002 and started oscillating from CFL number 0.003. The oscillations occur as the solver calculates values on either side of the solution node alternately. The solutions for CFL=0.05,0.5 and 0.1 were also of oscillating nature.
B) Implicit Scheme:
For implicit schemes, the CFL number does not play a role in the stability since the entire domain is used to calculate values at a certain point.
Hence, as indicated by the graphs below, the implicit scheme maintains its stability even at higher CFL numbers of 2. This is because the stability of the system is independent of the mesh size.
However, for non-linear implicit schemes, the high CFL values usually lead to instability.
The other drawbacks of using the implicit scheme are the higher cost of simulations and the decrease of accuracy with increase in time step value.
Hence, usually an explicit scheme with lower time step is used.