24M0004 1
Blind Experiments with Finite Difference Methods
Patel Jaydipkumar Lalitkumar
Aerospace Engineering Department
Indian Institute of Technology, Bombay
Abstract- This report consists of the explanation of Forward Time Backward Space (FTBS) Scheme: In the
results obtained on the application of finite difference FTBS scheme, the time derivative is approximated by a
methods to solve the one-dimensional advection equation, forward difference, and the spatial derivatives are
by varying Courant-Friedrichs-Lewy (CFL) numbers for approximated by a backward difference (using points
five different initial conditions, using the Python software. behind the current point).
Results show that high CFL values lead to instability,
while low CFL values increase numerical diffusion. The Lax-Wendroff (LW) Scheme: The Lax-Wendroff scheme
comparative analysis gives insights into the different is a higher-order explicit method that improves the
FDM schemes. accuracy of the solution by using both the forward
difference in time and a combination of central
Introduction differences for space. This method helps reduce
numerical dispersion and dissipation, making it more
accurate for solving problems with sharp gradients or
T he Finite Difference Scheme(FDM) is a numerical
method used to solve partial differential equations
by approximating derivatives with finite differences.
rapid changes.
This method is particularly useful for solving complex Beam-Warming (BW) Scheme: The Beam-Warming
equations that cannot be solved analytically. scheme is a higher-order explicit method that uses a
combination of forward time and backward space
First step towards approximate solution of Pde by FDM differences.
is to divide the physical domain into a finite number of
points. Generate the grid. The intersection points of these Fromm (FR) Scheme: The Fromm scheme is a higher-
grid form a set of finite number of grid points. One can order method that uses a weighted combination of
approximate the governing Pde’s at these grid points forward and backward space differences for the spatial
using different FDM schemes. Instead of attempting an derivative, leading to improved accuracy over traditional
exact solution which would be satisfied at each and every central or forward/backward schemes. It is a second-order
possible point of domain, apply an approximate solution accurate scheme in both time and space.
of Pde’s at a finite number of grid points as this approach
is economical and viable where an analytical solution is Implicit Scheme (Backward Time Central Space -
difficult to obtain. BTCS): The BTCS scheme is an implicit method where
the time derivative is approximated by a backward
difference, and the spatial derivative uses a central
Finite Difference Schemes difference. Unlike explicit schemes, the BTCS scheme
does not require a stability condition based on the time
Forward Time Forward Space (FTFS) Scheme: The step, making it more stable for large time steps. However,
FTFS scheme is an explicit method where the time it requires solving a system of equations at each time step,
derivative is approximated by a forward difference, and which makes it computationally more intensive.
the spatial derivatives are also approximated by a forward
difference.
Courant-Friedrichs-Lewy Number
Forward Time Central Space (FTCS) Scheme: The
FTCS scheme is an explicit, the spatial derivatives are c∗Δt
approximated using a central difference (taking points on CFL = ;
𝛥𝑥
both sides of the current point), while the time derivative c is wave speed, 𝛥𝑥 𝑖𝑠 𝑠𝑡𝑒𝑝 𝑙𝑒𝑛𝑔𝑡ℎ 𝑎𝑛𝑑 Δt is time step
uses a forward difference. This provides better accuracy
compared to FTFS.
24M0004@[Link]
24M0004 2
CFL ≤ 1: The CFL number is often considered to be safe for Implicit-Schemes
stability in explicit schemes. When the CFL number is less than
or equal to 1, the numerical scheme is typically stable, meaning In this kind of schemes, the solution involves solving the system
that information does not travel faster than the grid spacing can of having unknowns appearing on both sides. It allows to run
handle, and the solution does not become unstable. the scheme for higher time steps also. Computationally it is
expensive as it requires to solve the system of linear equation at
CFL > 1: If the CFL number exceeds 1, the solution can become each time step. Quite hard to implement as it requires matrix
unstable. In this case, the numerical grid "moves ahead" of the formulation to solve the linear equations.
information it is trying to track, causing oscillations or even
divergence in the solution. This often leads to inaccurate or non-
physical results.
𝑬𝒙𝒑𝒍𝒊𝒄𝒊𝒕: 𝑢(𝑛 + 1) = 𝑢(𝑛) + ℎ. 𝑓(𝑢(𝑛))
Explicit-Schemes 𝑰𝒎𝒑𝒍𝒊𝒄𝒊𝒕: 𝑢(𝑛 + 1) = 𝑢(𝑛) + ℎ. 𝑓(𝑢(𝑛 + 1))
In this kind of schemes, the solution of the next step is wholly ; 𝑢(𝑛)𝑖𝑠 𝑡ℎ𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑢 𝑎𝑡 𝑡 = 𝑛
depended on the previous results obtained. Requires small time ; 𝑢(𝑛 + 1)𝑖𝑠 𝑡ℎ𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑢 𝑎𝑡 𝑡 = (𝑛 + 1)
steps to get stable solution. Computationally cheaper per time
step. Less accurate for larger time step. It is easier to implement
as the future solution is fully depended on past solution.
24M0004@[Link]
24M0004 3
Results and Observations
Forward Time Forward Space (FTFS) scheme
SR
CFL = 0.5 CFL = 1 CFL = 1.5
No.
Oscillations are observed in Kind of same solution as obtained Kind of same solution as obtained
the plot, it proves that this before for same condition except before for same condition except
scheme is not able to provide CFL number. CFL number.
Discontinuous
1 accurate and stable solution
initial solution
kind of same as numerical
results though CFL number
falls in stability criteria.
oscillations are observed, not Kind of same solution as obtained Oscillations are still there but got
an accurate and stable before for same condition except some reduction with considerable
Initial solution solution. CFL number. amount of diffusion, instabilities
2 having two as well as inaccuracy in solution.
periods
oscillations are observed, not Oscillations are still there but now Oscillations are still there but got
an accurate and stable it also results in the dissipation some reduction with considerable
Initial solution solution compared to previous case having amount of diffusion, instabilities
3 having four same conditions except the CFL as well as inaccuracy in solution.
periods number.
oscillations are observed, not Oscillations are still there but now Oscillations are still there but got
an accurate and stable it also results in the dissipation some reduction with considerable
Initial solution solution compared to previous case having amount of diffusion, instabilities
4 having six same conditions except the CFL as well as inaccuracy in solution.
periods number.
Less oscillatory solution Less oscillatory solution Oscillations are still there
compared to previous initial compared to previous initial accompanied with increment in
Initial solution conditions but the solution conditions but the solution faced diffusion, instabilities as well as
5 having Gaussian faced dissipation or say more dissipation or say diffusion, inaccuracy in solution.
curve diffusion, unstable and unstable and inaccurate solution.
inaccurate solution.
** For first initial condition boundary conditions are taken according to given function.
24M0004@[Link]
24M0004 4
24M0004@[Link]
24M0004 5
24M0004@[Link]
24M0004 6
24M0004@[Link]
24M0004 7
Forward Time Central Space (FTCS) scheme
SR
CFL = 0.5 CFL = 1 CFL = 1.5
No.
Oscillations are observed in Kind of same solution as obtained Kind of same solution as obtained
Discontinuous the plot, overall instability before for same condition except before for same condition except
1 initial and in accuracy in solution. CFL number. CFL number.
solution though CFL number falls in
stability criteria.
oscillations are observed, not Kind of same solution as obtained Oscillations are still there but got
Initial an accurate and stable before for same condition except some reduction with considerable
solution. CFL number. amount of diffusion, instabilities
solution
2 as well as inaccuracy in solution.
having two
periods
oscillations are observed, not Oscillations are still there but now Oscillations are still there but got
Initial an accurate and stable it also results in the dissipation some reduction with considerable
solution compared to previous case having amount of diffusion, instabilities
solution
3 same conditions except the CFL as well as inaccuracy in solution.
having four number.
periods
oscillations are observed, not Oscillations are still there but now Oscillations are still there but got
Initial an accurate and stable it also results in the dissipation some reduction with considerable
solution solution compared to previous case having amount of diffusion, instabilities
4 same conditions except the CFL as well as inaccuracy in solution.
having six
number.
periods
Observe less oscillations Kind of same solution as obtained Kind of same solution as obtained
Initial compared to FTFS scheme before for same condition except before for same condition except
solution for same conditions, and it CFL number. CFL number.
5 having also observes the diffusion,
Gaussian overall instability and in
accuracy in solution.
curve
24M0004@[Link]
24M0004 8
24M0004@[Link]
24M0004 9
24M0004@[Link]
24M0004 10
24M0004@[Link]
24M0004 11
Forward Time Backward Space (FTBS) scheme
SR
CFL = 0.5 CFL = 1 CFL = 1.5
No.
Discontinuous Smooth solution, no Perfectly follows the numerical Increment in CFL number results
diffusion quite stable and solution, highly stable and in oscillations, unstable and
1 initial accurate solution. accurate solution. inaccurate solution.
solution
Smooth solution observed Perfectly follows the numerical Oscillations and diffusion in
Initial accompanied with solution, highly stable and solution, unstable and inaccurate
dispersion, kind of accurate accurate solution. solution.
solution
2 and stable solution.
having two
periods
Observed more dispersion Perfectly follows the numerical Oscillations and diffusion in
Initial compared to same initial solution, highly stable and solution, unstable and inaccurate
condition. accurate solution. solution.
solution
3
having four
periods
Observed more dispersion Perfectly follows the numerical Oscillations and diffusion in
Initial compared to same initial solution, highly stable and solution, unstable and inaccurate
solution condition. accurate solution. solution.
4
having six
periods
Smooth solution, accurate Perfectly follows the numerical Oscillations and diffusion in
Initial and stable. solution, highly stable and solution, unstable and inaccurate
solution accurate solution. solution.
5 having
Gaussian
curve
24M0004@[Link]
24M0004 12
24M0004@[Link]
24M0004 13
24M0004@[Link]
24M0004 14
24M0004@[Link]
24M0004 15
Lax-Wendroff (LW) scheme
SR
CFL = 0.5 CFL = 1 CFL = 1.5
No.
Discontinuous Smooth solution, but Perfectly follows the numerical Increment in CFL number results
observe dispersion quite solution, highly stable and in oscillations, unstable and
1 initial stable and accurate solution. accurate solution. inaccurate solution.
solution
Smooth solution observed Perfectly follows the numerical Oscillations and diffusion in
Initial with less dispersion solution, highly stable and solution, unstable and inaccurate
compared to FTBS, kind of accurate solution. solution.
solution
2 accurate and stable solution.
having two
periods
Observed less dispersion Perfectly follows the numerical Oscillations and diffusion in
Initial compared to compared to solution, highly stable and solution, unstable and inaccurate
FTBS, kind of stable accurate solution. solution.
solution
3 solution.
having four
periods
Observed less dispersion Perfectly follows the numerical Oscillations and diffusion in
Initial compared to FTBS. solution, highly stable and solution, unstable and inaccurate
solution accurate solution. solution.
4
having six
periods
Perfectly follows the Perfectly follows the numerical Oscillations and diffusion in
Initial numerical solution, highly solution, highly stable and solution, unstable and inaccurate
solution stable and accurate solution. accurate solution. solution.
5 having
Gaussian
curve
24M0004@[Link]
24M0004 16
24M0004@[Link]
24M0004 17
24M0004@[Link]
24M0004 18
24M0004@[Link]
24M0004 19
Beam-Warming (BW) scheme
SR
CFL = 0.5 CFL = 1 CFL = 1.5
No.
Discontinuous Smooth solution, but Perfectly follows the numerical Smooth solution, but observe
observe dispersion quite solution, highly stable and dispersion quite stable and
1 initial stable and accurate solution. accurate solution. accurate solution.
solution
Smooth solution, but observe
Smooth solution observed Perfectly follows the numerical dispersion quite stable and
Initial with less dispersion solution, highly stable and accurate solution.
compared to LW, kind of accurate solution.
solution
2 accurate and stable solution.
having two
periods
Observed less dispersion Perfectly follows the numerical Smooth solution, but observe
Initial compared to compared to solution, highly stable and dispersion quite stable and
LW, kind of stable solution. accurate solution. accurate solution.
solution
3 .
having four
periods
Observed less dispersion Perfectly follows the numerical Smooth solution, but observe
Initial compared to LW. solution, highly stable and dispersion quite stable and
solution accurate solution. accurate solution.
4
having six
periods
Perfectly follows the Perfectly follows the numerical Smooth solution, but observe
Initial numerical solution, highly solution, highly stable and dispersion quite stable and
solution stable and accurate solution. accurate solution. accurate solution.
5 having
Gaussian
curve
24M0004@[Link]
24M0004 20
24M0004@[Link]
24M0004 21
24M0004@[Link]
24M0004 22
24M0004@[Link]
24M0004 23
Fromm (FR) scheme
SR
CFL = 0.5 CFL = 1 CFL = 1.5
No.
Discontinuous Smooth solution, but Perfectly follows the numerical Very much oscillatory solution,
observe dispersion quite solution, highly stable and unstable and inaccurate.
1 initial stable and accurate solution. accurate solution.
solution
Smooth solution, but Perfectly follows the numerical
Initial observe dispersion quite solution, highly stable and Very much oscillatory solution,
stable and accurate solution. accurate solution. unstable and inaccurate.
solution
2
having two
periods
Smooth solution, but Perfectly follows the numerical
Initial observe dispersion quite solution, highly stable and Very much oscillatory solution,
stable and accurate solution. accurate solution. unstable and inaccurate.
solution
3
having four
periods
Smooth solution, but Perfectly follows the numerical
Initial observe dispersion quite solution, highly stable and Very much oscillatory solution,
solution stable and accurate solution. accurate solution. unstable and inaccurate.
4
having six
periods
Perfectly follows the Perfectly follows the numerical Very much oscillatory solution in
Initial numerical solution, highly solution, highly stable and initial phase, but also follows
solution stable and accurate solution. accurate solution. original solution later on but still
5 having unstable and in accurate solution.
Gaussian
curve
24M0004@[Link]
24M0004 24
24M0004@[Link]
24M0004 25
24M0004@[Link]
24M0004 26
24M0004@[Link]
24M0004 27
Implicit scheme, Backward Time Central Space (BTCS) scheme
SR
CFL = 0.5 CFL = 1 CFL = 1.5
No.
Initially the solution was Initially the solution was smooth Initially the solution was smooth
Discontinuous smooth and stable but later and stable but later on more and stable but later on the solution
1 initial on lots of oscillations and oscillations and inaccurate becomes very much inaccurate
solution inaccuracy observed. compared to 0.5 CFL number. and unstable.
Smooth and less diffused Smooth and less diffused solution Smooth and less diffused solution
Initial solution but kind of but kind of dispersed solution. but kind of dispersed solution.
dispersed solution.
solution
2
having two
periods
Very much diffused solution Very much diffused solution very Very much diffused solution very
Initial very much inaccurate and much inaccurate and not stable. much inaccurate and not stable.
not stable.
solution
3
having four
periods
Very much diffused solution Very much diffused solution very Very much diffused solution very
Initial very much inaccurate and much inaccurate and not stable. much inaccurate and not stable.
solution not stable.
4
having six
periods
Kind of smooth and sort of Kind of smooth and sort of Kind of smooth and sort of
Initial accurate and stable solution. accurate and stable solution. accurate and stable solution but
solution got diffused.
5 having
Gaussian
curve
24M0004@[Link]
24M0004 28
24M0004@[Link]
24M0004 29
24M0004@[Link]
24M0004 30
24M0004@[Link]
24M0004 31
References
• Introduction to CFD (Nptel), Arnab Roy, IIT Kharagpur
• Difference between Explicit and Implicit Schemes---cfd-online
• Simulating Fluid Flows Using Python---Tanmay Agrawal
24M0004@[Link]