WOLFRAM|DEMONSTRATIONS PROJECT

Solving the Convection-Diffusion Equation in 1D Using Finite Differences

​
solve
pause
step
reset
grid
lines
line
points
joined
show initial conditions
3D solution plot
3D plot for speed
geometry/boundary conditions
initial conditions
test case
1
c
u
x,x
= d
u
t
+ a
u
x
grid size
0.03
​
​
length
1.00
​
​
Δt multiplier
0.25
​
​
c (diffusion)
1.00
​
​
d (advection)
1.00
​
​
a (convection)
8.00
​
​
run time
0.02
centered grid
​
​
​
​
​
auto y scale
manual
1.1
This Demonstration shows the solution of the convection-diffusion partial differential equation (PDE)
c
u
xx
=d
u
t
+a
u
x
in one dimension with periodic boundary conditions. You can specify different initial conditions. Selected preconfigured test cases are available from the dropdown menu.
The system is discretized in space and for each time step the solution is found using
n+1
u
=A
n
u
. The plot shown represents the solution
u(x,t)
. You can select a 3D or 2D view using the controls at the top of the display.