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

Explicit solution of heat/diffusion equation

  1. Nov 23, 2007 #1
    I am trying to use a explicit FDM for transient 1d conditions with linear elements for specific diffusion equation:


    the problem is that I am using different, nonlinear functions describing diffusion constant D(x) and reaction rate R(s).
    The diffusion parameter is dependent on position along x and in general case is a function with non-continuous dD(x)/dx at some points. I am using average value of diffusion parameter for each linear element but the solution seems to be not right. I think that is the problem, because when I use constant D everything looks all right. Especially plot of d2s/dx2 is very wired.
    What I am doing wrong?
  2. jcsd
  3. Nov 23, 2007 #2

    Chris Hillman

    User Avatar
    Science Advisor



    Wired as in wire-frame plot? Or is that "weird"?
  4. Nov 23, 2007 #3
    'wired' as strange. it has to many bumps. should be less compicated in places where D is changing
  5. Nov 28, 2007 #4

    Chris Hillman

    User Avatar
    Science Advisor

    Gentle hint

    So, weird as in "strange"? Too many bumps? Less complicated? And what is FDM? "Finite difference method", perchance? Is your diffusion equation
    \frac{\partial u}{\partial t} = f(x) \, \frac{\partial^2 u}{\partial x^2}+ g(u)
    where u is an unknown function of x,t and f,g are known functions of one variable, and where f is continuous but only piecewise differentiable? You hinted at initial conditions--- what are they?
    Last edited: Nov 28, 2007
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook