# Numerical solution of non-linear diffusion equation via finite-difference with the Crank-Nicolson method

I want to numerically solve the non-linear diffusion equation:

$$\frac{\partial}{\partial t} T(x,t)= \frac{\partial}{\partial x}\left(T^{5/2} \frac{\partial T}{\partial x} \right)$$

I want to use finite difference approach to solve it via Crank-Nicolson method. But I don't understand how to treat the non-linear coefficient when applying the numerical method.

• Please specify the boundary conditions you wish to implement. Commented Jun 24, 2013 at 12:55

## 1 Answer

The Crank-Nicolson discretization of this equation will read $$\frac{T^n-T^{n-1}}{\Delta t} = \frac 12 \left[ \partial_x \left((T^n)^{5/2} \partial_x T^n\right) + \partial_x \left((T^{n-1})^{5/2} \partial_x T^{n-1}\right) \right]$$ which is a nonlinear, time-independent, elliptic partial differential equation in $T^n$. The way to solve such equations is summarized in step-15 of the deal.II tutorial, see http://www.dealii.org/developer/doxygen/deal.II/step_15.html .

(Disclaimer: I'm one of the authors of deal.II, and I supervised the student who wrote step-15.)

• Dear Wolfgang, I need to communicate with you via email. I have some questions. Commented Jun 25, 2013 at 4:51
• @user4624; I'm easy to find on the internet. Send me an email. Commented Jun 25, 2013 at 13:47