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

Mass conservation in radially symmetric parabolic PDE problems

  1. Mar 29, 2010 #1
    Dear all,
    I'm trying to solve the 2d heat equation in a radially symmetric domain, numerically using the Crank-Nicolson method. i.e.

    [tex]\dfrac{\partial u}{\partial t} = D\left( \dfrac{\partial^2u}{\partial r^2}+\dfrac{1}{r}\dfrac{\partial u}{\partial r}\right)[/tex]

    Applying the Crank-Nicolson method basically results in a recurrence relation:

    [tex](-q+\frac{z}{r})u_{i-1,j+1} + (1+2q)u_{i,j+1} - (q+\frac{z}{r})u_{i+1,j+1} = (q-\frac{z}{r})u_{i-1,j} + (1-2q)u_{i,j} + (q+\frac{z}{r})u_{i+1,j} [/tex]

    where [tex]q=\dfrac{\delta t}{2(\delta r)^2}[/tex], [tex]z=\dfrac{\delta t}{4\delta r}[/tex] and [tex]u_{i,j}[/tex] is the solution at [tex]r=i\delta r, t=j\delta t[/tex].

    You can write this into a matrix equation of the form [tex]Au\{j+1\}=Bu\{j\}[/tex], which basically enables you to solve the problem. This all works very nicely for the 1d heat equation (the same differential equation but without the first spatial derivative). However, I now have the problem that the solution doesn't conserve mass. That is, given some initial condition across [tex]r\in (0,R)[/tex], the sum of the solution points decreases over time.

    Clearly, if the column sums of A and B are the row vector of 1s, then I am guaranteed mass conservation. However, this is not the case for my Crank-Nicolson implementation here. This results from the [tex]\frac{z}{r}[/tex] changing values and signs between neighbouring rows, which means they don't cancel.

    Anyone got any comments? Is there a way of solving these parabolic PDEs in radially symmetric domains that preserves the mass conservation law? Or is my implementation incorrect maybe?

    Your assistance would be greatly appreciated,

  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

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

Similar Threads - Mass conservation radially Date
I A common 2nd order ODE from dynamics but... Feb 28, 2018
I Base excitation of undamped Spring-mass system Oct 27, 2016
Creating an Exponential decay equation for given parameters Oct 23, 2014
Mass spring system Oct 8, 2013
Mass conservation Dec 24, 2011