Partial differential equations · CMNA Laboratory

Watch a temperature profile forget its sharp edges.

Define the initial temperature in R, then play the forward-time central-space scheme through time.

Diffusion as repeated local averaging.

At each interior grid point, the FTCS update looks at the second spatial difference and adjusts the current value accordingly. Sharp local variation gets smoothed as time advances.

Bring your own initial condition

Define u₀(x) in R.

Then play the temperature profile through time and watch a space-time heatmap accumulate underneath it.

RuntimePreparing R…
RDefine u0(x) on 0 ≤ x ≤ 1

time stepmin umean umax u
Book§7.3.1 · The Heat Equation · p. 219Book details
CMNA packageheat
TeachingInstructor notes and chapter contextOpen teaching material