Solving the Convection-Diffusion Equation in 1D Using Finite Differences
This Demonstration shows the solution of the convection-diffusion partial differential equation (PDE) in one dimension with periodic boundary conditions. You can specify different initial conditions. Selected preconfigured test cases are available from the dropdown menu.[more]
The system is discretized in space and for each time step the solution is found using . The plot shown represents the solution . You can select a 3D or 2D view using the controls at the top of the display.[less]
The convection-diffusion partial differential equation (PDE) solved is , where is the diffusion parameter, is the advection parameter (also called the transport parameter), and is the convection parameter. The domain is with periodic boundary conditions. Initial conditions are given by . You can specify using the initial conditions button. The time step is , where is the multiplier, is the grid size, and is the diffusion parameter. You can change the multiplier using the slider. The total run time of the simulation is specified using the slider labeled "time".
The system solved at each time step is where is the solution of the PDE. The matrix is given by
where and . In the above is taken to be the vector of initial conditions. All values used are assumed to be in SI units.
 S. J. Farlow, Partial Differential Equations for Scientists and Engineers, New York: Dover, 1993.