Finite Difference method to solve PDEs

Click For Summary
SUMMARY

The discussion focuses on using the finite difference method to solve a set of 1D partial differential equations (PDEs). Shankar proposes a first-order forward difference scheme but encounters a challenge at the last node (node 'n') where the derivative \(\partial u/\partial x\) requires a value from outside the domain. The solution involves using derivatives from adjacent nodes, specifically employing the average of derivatives at nodes \(n\) and \(n-1\) to compute the required value. This approach allows for accurate approximation without needing to extend the domain.

PREREQUISITES
  • Understanding of finite difference methods for numerical analysis
  • Familiarity with partial differential equations (PDEs)
  • Knowledge of numerical differentiation techniques
  • Basic proficiency in mathematical notation and calculus
NEXT STEPS
  • Research advanced finite difference schemes, such as the Crank-Nicolson method
  • Explore stability and convergence criteria for finite difference methods
  • Learn about boundary conditions and their implementation in PDEs
  • Investigate software tools for numerical simulations, such as MATLAB or Python's NumPy
USEFUL FOR

Mathematicians, engineers, and researchers involved in computational fluid dynamics, numerical analysis, or anyone seeking to solve PDEs using finite difference methods.

iamkratos
Messages
5
Reaction score
0
Hello:

I am looking to solve a set of 1D PDEs. I thought the finite difference method would be a good way to go about it. So I decided to pick a simple first order forward difference scheme to obtain preliminary results.

I just have 1 question: According to my scheme, at the last node (node 'n') - \partialu/\partialx will be (u_{n+1}-u_{n})/\Deltax. But node 'n+1' is outside my domain. How would 1 traditionally go about this problem?
Also: Is it generally required to stick to 1 discretization scheme for a system?

Thanks in advance,

-Shankar
 
Physics news on Phys.org
There are a variety of ways that you can go about this.
1) You can use the derivative the same between the nth and (n-1)th as the (n-2)th and (n-1)th points.
2) The derivative at the point (n-1/2) is given by:
<br /> \frac{\partial u}{\partial x}\Bigg|_{n-\frac{1}{2}}=\frac{u_{n}-u_{n-1}}{\delta x}\quad \frac{\partial u}{\partial x}\Bigg|_{n-1}=\frac{u_{n}-u_{n-2}}{2\delta x}<br />
But the derivative at the point n-1/2 is just the average of the derivatives at n and n-1, so we write:
<br /> \frac{\partial u}{\partial x}\Bigg|_{n-\frac{1}{2}}=\frac{1}{2}\left(\frac{\partial u}{\partial x}\Bigg|_{n}+\frac{\partial u}{\partial x}\Bigg|_{n-1}\right)<br />
So it is a simple matter of substitution to find that:
<br /> \frac{\partial u}{\partial x}\Bigg|_{n}=\frac{4u_{n-1}-u_{n-2}-3u_{n}}{2\delta x}<br />
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K