source code in HTML
source code in PDF

Finite difference solution for diffusion-advection-reaction (heat) in 1D

Nasser M. Abbasi

Feb 20, 2012 compiled on — Wednesday July 06, 2016 at 08:23 AM
This Demonstration solves the diffusion-advection-reaction partial differential equation (PDE) cuxx = dut + au+ f (x, t)  in one dimension. The domain is discretized in space and for each time step the solution u  at time tn+1   is found by solving for un+1   from                 n  n+1
Aun+1 = Bun  + f-+f2---   .

The boundary conditions supported are periodic, Dirichlet and Neumann. The solution can be viewed in 3D as well as in 2D. You can select the source term f(x,t)  and the initial conditions from the menus in the main display. Selected preconfigured test cases are available from the pull down menu. In the above PDE cuxx  represents the diffusion, dut  represents the advection and au  the reaction.