Analysis of spatial discretization of a PDE

In summary: This is important because Gaussian smoothing is the most efficient numerical method for the heat equation. In summary, There are methods such as stability criteria and frequency space solutions that can be used to analyze the influence of spatial discretization on the analytic solution for a 1D heat equation solved using finite-difference method. However, there is no specific tool or software package available for this purpose. Some suggestions for analysis include comparing solutions, plotting differences, and using the Nyquist criterion. Additionally, solving the problem in frequency space can provide more efficient results. Some references and lecture notes are available for further understanding of these methods.
  • #1
zhidayat
8
0
Hi everybody,

I hope I am asking in the right forum.
Let describe the problem as follows:
I have a 1D heat equation. To solve it, I use finite-difference method to discretize the PDE and obtain a set of N ODEs. The larger N gives the better solution, i.e., the closer the solution to the original PDE. I can also further discretized in time so that I have a set of difference-equations and find the temperature distribution.

My question:
Are there tools that can be used to analyze the influence of the discretization (spatially) to the analytic solution?

Thank you in advance.
 
Physics news on Phys.org
  • #2
Not too sure what you're asking but there are tests to tell you the stability of your finite difference scheme, suppose that dx and dt are the increments in x and t than there is a rule involving dx and dt which gives you a restriction on what values of dx and dt you are able to take.

These are in general called stability criterion I believe.
 
  • #3
I think I understand what zhidayat is asking. He's solved his problem numerically by a finite difference method, and he also has an analytic solution. He wants to analyze how good a job the FDM does. Of course, if you have an analytic solution, the FDM solution is kind of pointless, but what he proposes nevertheless makes sense as a way of seeing how well the FDM works.

Unfortunately, I don't know of any tools, in the sense of software packages, or special techniques. I expect they exist, since FDM solution of DEs is an important and difficult topic, but I just don't know about them. But the particular problem he's solving is a pretty easy one. I would just plot the solutions against each other and plot the difference between them, then redo the numerical solution with the interval decreased by a factor of two. That's not too sophisticated but will give you a fair idea of how well it works and what pathologies it might develop.
 
  • #4
How about he chooses a particular time and examines the [itex]\ell^{2}[/itex] norm of the differences?
 
  • #5
Yes, of course. But that's just one number. I think you want more fine-grained information.
 
  • #6
It's one number for a given time, do this for all the time steps and you will end up with a function that will gives you the general feeling of the convergence.
 
  • #7
hunt_mat said:
It's one number for a given time, do this for all the time steps and you will end up with a function that will gives you the general feeling of the convergence.
Well, you did say "How about he chooses a particular time..."

This is why I suggested plotting the solutions.
 
  • #8
Thanks for some ideas.
I am thinking of something similar as the Shannon-Nyquist theorem for which gives condition for minimum sampling period with respect to information not stability.
But perhaps the method is non exist, I do not know.
 
  • #9
zhidayat said:
Thanks for some ideas.
I am thinking of something similar as the Shannon-Nyquist theorem for which gives condition for minimum sampling period with respect to information not stability.
But perhaps the method is non exist, I do not know.
The Nyquist criterion applies -- if you want spatial frequencies up to B (for bandwidth), you need to sample at 2B -- i.e. your grid points should be <= 1/2B apart. But this is simple for the heat equation. Diffusion makes high frequencies go away very rapidly. The decay rate is proportional to the square of the frequency. In fact, if you're concerned about the frequency spectrum, you should solve the problem in frequency space directly. Diffusion is equivalent to Gaussian smoothing. This is actually the most efficient numerical method to solve the heat equation, too.
 
  • #10
pmsrw3 said:
The Nyquist criterion applies -- if you want spatial frequencies up to B (for bandwidth), you need to sample at 2B -- i.e. your grid points should be <= 1/2B apart. But this is simple for the heat equation. Diffusion makes high frequencies go away very rapidly. The decay rate is proportional to the square of the frequency. In fact, if you're concerned about the frequency spectrum, you should solve the problem in frequency space directly. Diffusion is equivalent to Gaussian smoothing. This is actually the most efficient numerical method to solve the heat equation, too.

Interesting ..., I get your point. Do you know references that have presented/discussed what you have told me above? Could you tell me please?
 
  • #11
Here are my notes from some lectures I gave on this topic. Note sure how much sense they'll make without the talk, but you can take a look at them. If you have the fortitude to wade through them, I'll try to answer any questions.
 

Attachments

  • notes_v1.pdf
    1.8 MB · Views: 365
  • notes_v4.pdf
    1.9 MB · Views: 407
  • #12
Thank you pmsrw3. Browsing the notes, they has something to do with Fourier series/transform I guess. I will read it more careful later.
 
  • #13
They are about using the heat equation (which, for reasons of context, I refer to as the diffusion equation -- but it's the same) as a way to introduce Fourier transforms. Anyway, they demonstrate that the heat equation is equivalent to Gaussian smoothing.
 

What is spatial discretization in the context of PDE analysis?

Spatial discretization is a numerical method used to approximate the solution of a partial differential equation (PDE) in a finite amount of space. It involves dividing the continuous domain of the PDE into smaller subdomains, or grid cells, and solving the equation at discrete points within each cell.

Why is spatial discretization important in PDE analysis?

Spatial discretization is important because it allows for the numerical solution of PDEs, which often cannot be solved analytically. It also allows for the efficient computation of solutions for complex problems with large domains.

What are some common methods used for spatial discretization in PDE analysis?

Some common methods for spatial discretization include finite difference methods, finite element methods, and spectral methods. Each method has its own advantages and disadvantages, and the choice of method depends on the specific problem being solved.

What factors should be considered when choosing a spatial discretization method for a PDE analysis?

The choice of spatial discretization method should take into account the order of accuracy, stability, and computational efficiency of the method. Other factors to consider include the complexity of the problem, the required level of precision, and the availability of software or tools for implementing the method.

How does the choice of spatial discretization affect the accuracy and convergence of a PDE analysis?

The choice of spatial discretization can significantly impact the accuracy and convergence of a PDE analysis. A higher order method will generally have a more accurate solution, but may also require more computational resources. Unstable or poorly designed discretization methods can lead to inaccurate or non-convergent solutions.

Similar threads

  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
5
Views
2K
Replies
5
Views
1K
  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
2
Views
2K
  • Differential Equations
Replies
6
Views
1K
  • Differential Equations
Replies
9
Views
2K
Replies
2
Views
1K
  • Differential Equations
Replies
5
Views
2K
  • Differential Equations
Replies
1
Views
994
Back
Top