# Stability and Accuracy of Diffusion Equation Solution

1. Jan 30, 2014

### baseball07

I have a general question about the solution to the Diffusion equation using the explicit finite difference method. Now, it is known the solution is stable when D*dt/dx^2 is less than 0.5, based on the choice of time and space steps. However, how does the choice of the time and space steps affect the actual numerical solution values, say if we were to compare with some experimental data? That is, a D*dt/dx^2 of 0.48 and 0.3 are both indeed stable, but they will both have different numerical values, correct? So how does one choose the correct time and space steps to get the closest solution?

2. Jan 30, 2014

### Staff: Mentor

You can compare against analytic solutions. You can set the value of D*dt/dx^2 constant, and solve the equations using progressively smaller values of dx and dt (at fixed D*dt/dx^2 ) until you are satisfied that the solutions have stopped changing (to your satisfaction). You can also try this for several values of D*dt/dx^2 and compare results.

3. Feb 3, 2014

### ClamShell

Yes, this is probably the only thing you can do. I've used it in heat transfer
studies to verify/validate finite element simulations compared to analytic
heat diffusion solutions for regular geometric shapes. Eg, if I was
modeling the cooling of an avocado, I would test the numerical
simulation against spheres and short columns.

Last edited: Feb 3, 2014
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for Stability Accuracy Diffusion
A Stability for a system of nonlinear ODEs
I What is the propagation speed of a diffusion