EXPLICIT METHOD FOR 1D HEAT EQUATION WITH FULL STABILITY ANALYSIS
We consider:
∂u ∂2u
= α 2, 0 ≤ x ≤ L, t>0
∂t ∂x
Where: - u(x, t) = temperature (or any diffusing quantity) - α = thermal diffusivity
Step 1: Discretize the domain
1.1 Spatial discretization
Divide the domain into N nodes with spacing Δx :
xi = iΔx, i = 0, 1, 2, ..., N
1.2 Time discretization
Divide time into steps Δt :
tn = nΔt, n = 0, 1, 2, ...
Here: un
i = u(xi , tn )
Step 2: Approximate derivatives
2.1 Time derivative (forward difference)
∂u un+1 − uni
≈ i
∂t Δt
2.2 Spatial derivative (central difference)
∂2u uni+1 − 2uni + uni−1
≈
∂x2 Δx2
Step 3: Formulate explicit scheme
Substitute derivatives into PDE:
un+1 − uni un − 2uni + uni−1
i
= α i+1
Δt Δx2
Solve for un+1
i :
1
αΔt
un+1
i = uni + r (uni+1 − 2uni + uni−1 ) , r=
Δx2
• r is the Fourier number.
Step 4: Apply initial and boundary conditions
4.1 Initial condition
u0i = f (xi ), i = 0, 1, ..., N
4.2 Boundary conditions
• Dirichlet: fixed values at boundaries, e.g., un
0 = unL = 0
• Neumann: zero flux, ∂u
∂x = 0 → use ghost points
Step 5: March in time
• Start from n=0 (initial condition)
• Use explicit formula to calculate u_i^1
• Repeat until final time
Step 6: Detailed Stability Analysis (Von Neumann Method)
6.1 Assume a Fourier mode solution
We assume:
uni = Gn ejkiΔx
Where: - G = amplification factor - k = wave number - j = sqrt(-1)
6.2 Substitute Fourier mode into the explicit scheme
Gn+1 ejkiΔx = Gn ejkiΔx + r[Gn ejk(i+1)Δx − 2Gn ejkiΔx + Gn ejk(i−1)Δx ]
Divide both sides by Gn ejkiΔx :
G = 1 + r(ejkΔx − 2 + e−jkΔx )
6.3 Simplify using Euler’s formula
G = 1 − 2r(1 − cos(kΔx))
6.4 Express in terms of sine
G = 1 − 4r sin2 (kΔx/2)
2
6.5 Apply Von Neumann criterion
For stability: ∣G∣ ≤1
∣1 − 4r sin2 (kΔx/2)∣ ≤ 1
6.6 Evaluate maximum case
2
Maximum of sin (kΔx/2) = 1 :
∣1 − 4r∣ ≤ 1
6.7 Solve the inequality
• Left side: −1 ≤ 1 − 4r ⇒ r ≤ 0.5
• Right side: 1 − 4r ≤ 1 ⇒ r ≥ 0 ✅ always true
6.8 Stability condition
αΔt
r= ≤ 0.5
Δx2
- If r > 0.5 → unstable, solution blows up - If r ≤ 0.5 → stable
Step 7: Summary Table
Parameter Condition
Fourier number r ≤ 0.5
Explicit method Conditionally stable
Δt for given Δx Δt ≤ Δx² / 2α
Time marching Start n=0, compute u_i^{n+1}, repeat
Initial condition u_i^0 = f(x_i)
Boundary condition u_0^n = u_L^n or ∂u/∂x=0