1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Large wave number region of difference method of diffusion

  1. Jan 30, 2012 #1
    I am trying to do a simple numerical calculation of diffusion equation.
    ∂t u(x, t) = ∂x^2 u(x, t).

    I could replicate a seemingly appropriate result ( 1.png ).

    However, I found the spectrum of the result is quite strange ( 2.png ).
    Since "∂x^2 u(x, t)" becomes "-k^2 uk" in fourier space (uk is fourier coefficient of u), the spectrum of large wave number region must be smaller.

    To confirm it, I solved the same equation using spectral method.
    d/dt uk = -k^2 uk.
    Then I obtained the third figure ( 3.png ) which seems appropriate.

    I interpret such a difference between finite difference and spectral methods in large wave number region as following.

    The finite difference equation is,
    ∂t u = [u(x+Δx) - 2u(x) + u(x-Δx)]/Δx^2.

    If we substitute u(x) = uk exp(ikx), the above equation becomes
    d/dt uk = uk [exp(ikΔx) + exp(-ikΔx) -2]/Δx^2 ≈ uk [-k^2 + O(k^4 Δx^2)].

    Therefore, there remains O(k^4 Δx^2) difference with spectral method.
    Even if Δx is small enough, the large k region have big error.

    Now, could you tell me whether this interpretation is correct.
    And I would like to know the remedy of this problem.
    Last edited: Jan 30, 2012
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted