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

Diffusion equation in sperical coordinates

  1. Jun 21, 2010 #1
    I have the following diffusion equation

    \frac{\partial^{2}c}{\partial r^{2}} + \frac{2}{r}\frac{\partial c}{\partial r} = \frac{1}{\alpha}\frac{\partial c}{\partial t}

    where [tex]\alpha[/tex] is the diffusivity. The solution progresses in a finite domain where [tex]0 < r < b[/tex], with initial condition
    [tex] c(r,0) = g(r) [/tex]

    and the boundary conditions

    c(b,t) = 1

    c(0,t) = 0

    How will I proceed with this using the separation of variables?
    I think the time-dependent part is straight forward after separation of variables. But how will I deal with the spatial part where Bessel functions have to be dealt with?

    Last edited: Jun 21, 2010
  2. jcsd
  3. Jun 21, 2010 #2
    [tex] \frac{\partial^{2}c}{\partial r^{2}} + \frac{2}{r}\frac{\partial c}{\partial r} = \lambda[/tex]

    [tex] \frac{r}{2} \frac{\partial^{2}c}{\partial r^{2}} + \frac{\partial c}{\partial r} = \frac{r \lambda}{2}[/tex]

    Let u = r/2 and you should be able to get it into the form of [tex]x \frac{d^2 y}{dx^2} + \frac{dy}{dx} = \frac{d}{dx} (x \frac{dy}{dx})[/tex]
  4. Jun 22, 2010 #3
    Hello thanks for the reply. I've found out that my spatial equation is in the form of the spherical Bessel function equation, where the Bessel functions of the first and second kinds are given by

    [tex]J_0(\lambda{r}) = \frac{\sin(\lambda{r})}{\lambda{r}}[/tex]
    [tex]Y_0(\lambda{r}) = -\frac{\cos(\lambda{r})}{\lambda{r}}[/tex]

    I ignore [tex]Y_0[/tex] since it goes to infinity when [tex]r=0[/tex]. The general solution then becomes


    Now the problem I'm having is finding the constant D and [tex]\lambda[/tex] using the initial and boundary conditions.

    The initial condition is [tex]c(r,0)=g(r)[/tex]

    I first apply the initial condition to obtain


    I now apply the boundary condition [tex]c(b,t)=1[/tex] to obtain



    Therefore the solution is


    but my problem is [tex]g(b)=1[/tex] for the profile, which means that the solution is actually


    i.e. it doesn't change with time! I don't think this makes sense.
    What am I doing wrong here?


    I realised that I've forgotten a simple rule of calculus where I should apply both the boundary conditions first before I apply the initial conditions. However, this gives another problem because applying the first boundary condition

    [tex]c(0,t)=0[/tex] gives me


    and the second boundary condition [tex]c(b,t)=1[/tex] gives


    I don't know how this could be solved. It could be that my boundary conditions are incorrect.
    Last edited: Jun 22, 2010
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook