Using backward vs central finite difference approximation

Click For Summary
SUMMARY

This discussion focuses on the numerical solution of the 2nd-order wave equation using finite difference methods. The central difference approximation performs well, while higher-order backward difference approximations lead to divergence due to stability issues and grid resolution requirements. The Courant number's influence on stability is highlighted, particularly when using high wave speeds like c = 3 x 10^8 m/s. Suggestions for improving stability include using staggered grids, implicit schemes, and exploring spectral methods for enhanced accuracy.

PREREQUISITES
  • Understanding of the 2nd-order wave equation
  • Familiarity with finite difference methods
  • Knowledge of the Courant-Friedrichs-Lewy (CFL) condition
  • Basic programming skills for numerical implementation
NEXT STEPS
  • Research staggered grid methods for finite difference schemes
  • Learn about implicit finite difference methods for stability
  • Explore spectral methods for solving wave equations
  • Study the implementation of BDF methods for stiff equations
USEFUL FOR

Numerical analysts, computational physicists, and engineers working on wave propagation problems or those interested in enhancing the stability and accuracy of numerical simulations.

TheCanadian
Messages
361
Reaction score
13
I am solving the simple 2nd-order wave equation:

$$ \frac {\partial ^2 E}{\partial t^2} = c^2 \frac {\partial ^2 E}{\partial z^2} $$

Over a domain of (in SI units):

## z = [0,L=10]##m, ##t = [0,t_{max} = 10]##s

and boundary/initial conditions:

$$ E(z=0) = E(z=L) = 0 $$

$$ E(t=0) = -E(t=t_{max}) = sin(\frac{\pi z}{L}) $$

I know the analytic solution, but am trying to solve it numerically. (The numerical and analytic solutions are compared to test accuracy.) I just had a couple questions:

1) When I solve the wave equation by applying a central difference approximation of order 2 on the second derivative of time, the code works perfectly fine. Although when I apply http://(https://en.wikipedia.org/wiki/Finite_difference_coefficient#Forward_and_backward_finite_difference) of higher orders for the second derivative in time, my solution diverges. Is there any particular reason why using a backward difference approximation would be worse than a central difference approximation of the same order? I was under the impression using a higher order backward difference method would give me higher accuracy, but it appears to not work at all. I can supply the code if needed, although it's a fairly basic implementation.

2) I am able to solve the equation above when using a central difference approximation and setting ## c = 1## m/s, but if I use ##c = 3 \times 10^8## m/s, the solution diverges. This makes sense as the Courant number (##C_o = c \frac {\Delta t}{\Delta x}##) is much greater than one. But I am curious: are there any possible finite difference schemes that can be applied to numerically solve the equation if ##C_o >> 1##? I have read a bit about BDF methods to help solve stiff equations, but in this case, the only problem is that a more precise grid is needed, correct? I had also heard about spectral methods, but am still trying to learn how to implement them and if they would be applicable/accurate enough if other (nonlinear) terms were included in the wave equation.
 
Last edited by a moderator:
Technology news on Phys.org


1) There are a few reasons why using a backward difference approximation may not work as well as a central difference approximation. First, backward difference approximations are known to be less stable than central difference approximations, meaning that small errors in the initial conditions or boundary conditions can lead to large errors in the solution. This could be one reason why your solution is diverging. Additionally, higher order backward difference approximations may require more points to be accurate, so if your grid is not fine enough, the solution may not be accurate. Another possibility is that there may be an error in your implementation of the backward difference scheme.

2) It is possible to use finite difference methods to solve the wave equation with a large Courant number, but it may require some modifications to the standard scheme. One approach is to use a staggered grid, where the spatial and temporal grid points are offset from each other. This can help improve stability and accuracy for large Courant numbers. Another approach is to use an implicit scheme, where the time derivative is discretized using a backward difference approximation. This can be more stable for large Courant numbers, but it may also require solving a system of equations at each time step. Spectral methods can also be used for the wave equation, but they may require more points and can be more complex to implement. Ultimately, the best approach will depend on the specific problem and the desired level of accuracy.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K