Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Analysis of spatial discretization of a PDE

  1. Jul 14, 2011 #1
    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.
  2. jcsd
  3. Jul 14, 2011 #2


    User Avatar
    Homework Helper

    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.
  4. Jul 14, 2011 #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.
  5. Jul 14, 2011 #4


    User Avatar
    Homework Helper

    How about he chooses a particular time and examines the [itex]\ell^{2}[/itex] norm of the differences?
  6. Jul 14, 2011 #5
    Yes, of course. But that's just one number. I think you want more fine-grained information.
  7. Jul 14, 2011 #6


    User Avatar
    Homework Helper

    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.
  8. Jul 14, 2011 #7
    Well, you did say "How about he chooses a particular time..."

    This is why I suggested plotting the solutions.
  9. Jul 14, 2011 #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.
  10. Jul 15, 2011 #9
    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.
  11. Jul 15, 2011 #10
    Interesting ..., I get your point. Do you know references that have presented/discussed what you have told me above? Could you tell me please?
  12. Jul 15, 2011 #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.

    Attached Files:

  13. Jul 15, 2011 #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.
  14. Jul 15, 2011 #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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook