Charts need a uniform starting concentration and simple boundaries. The explicit finite-difference (Schmidt) method handles any starting profile with one spreadsheet formula, provided you respect its stability limit.
Learning objectives
- Write the explicit finite-difference equation for an interior node, and the special forms for insulated and convective surfaces.
- Choose and so that satisfies the stability limit.
- Build the march in a spreadsheet, and check convergence by refining the grid.
- Recognize unstable and non-monotonic results, and explain where they come from.
Background
Real problems often start from a measured, non-uniform profile. Some have a surface condition that changes, or a diffusivity that varies with concentration, and no chart covers those. The fix is to cut the slab into nodes apart and march forward in time steps . A mass balance on each node gives:
With (the Schmidt method), each new value is just the average of its two neighbours: . In a spreadsheet that is one formula filled right and down. At an insulated face or a plane of symmetry, use a mirror node. A convective surface needs its own node equation, with , and a stricter limit of .
The method is stable only for . That is the same as Perry’s limit for the explicit (forward Euler) method in Sec. 3, “Parabolic Equations in One Dimension” (pp. 3-46 to 3-47). Below that limit the weight on turns negative, and the solution oscillates and can go negative. Implicit and Crank-Nicolson methods remove the limit at the cost of solving simultaneous equations.
Always check a numerical answer: halve , cut by four to keep the same, and see whether the answer moves. The simulator’s exact series reference shows the error directly.
Simulator
Finite-Difference Diffusion: Schmidt Stepper
Diffusion profile
Half-slab: x = 0 is the symmetry plane, x = x₁ is the exposed face.
Use Draw initial profile to change the starting concentration with a pointer, or use the sliders for a uniform initial profile.
Gold line: straight line from the left neighbour to the right neighbour. Gold dot: its midpoint, the new value at this interior node.
All values are within the plot axis.
Centre / sealed-face history
Reference: 80-term analytical slab series, uniform initial concentration.
Model settings
Enter Nₛ + 1 values (4 to 40 slices). The slice count follows the length of the list; Δx = x₁/Nₛ. Any consistent concentration unit works; plots switch to dimensional values.
Worked solutions differ on this choice. It changes the first few rows of the node table, not the long-time behaviour.
Bi = k_c a / (KD) = 2; N = k_c Δx / (KD) = 0.2.
k_c is the fluid-film coefficient: surface flux = k_c(c_bulk − c_s/K) = (k_c/K)(cₐ − c_s).
Governing equations
∂c/∂t = D ∂²c/∂x²cᵢʲ⁺¹ = [cᵢ₊₁ʲ + (M − 2)cᵢʲ + cᵢ₋₁ʲ] / Mc₀ʲ⁺¹ = c₀ʲ + 2(c₁ʲ − c₀ʲ)/Mc𝒇ʲ⁺¹ = [2N cₐ + (M − 2N − 2)c𝒇ʲ + 2c𝒇₋₁ʲ] / MΔx = a/Nₛ; M = Δx²/(DΔt); Δt = Δx²/(MD)
X = Dt/a²; n = x/a; N = k_cΔx/(KD); Bi = k_ca/(KD)Y = Σ Cₖ exp(−λₖ²X) cos(λₖn)
λₖ tan λₖ = Bi; Cₖ = 4 sin λₖ/(2λₖ + sin 2λₖ)
Fixed face: λₖ = (k − ½)π, k = 1, 2, …Spreadsheet node table
The last 15 time steps, with row 0 retained until it scrolls out. Columns 0 to Nₛ span the sealed / centre node through the exposed surface. Scroll horizontally to view all nodes.
Self-checks
Benchmark convention: uniform c₀ = 1, equilibrium concentration = 0, x₁ = 0.01 m, D = 10⁻⁹ m²/s, 10 slices, X = 0.5. Expected values come from an independent implementation; every check starts afresh and runs the real solver. None is a homework answer.
Open this simulator on its own page.
Try this
- Load the “unstable” preset and step slowly. What happens to neighbouring nodes from one step to the next, and why?
- Compare the default grid with “fine-grid” at the same . How much does the centre value change, and is the coarse grid good enough?
- Switch on Draw initial profile and sketch a profile that is high near the surface and low at the centre. What happens at the centre at first, and why can a chart not show it?
Credits and sources
- Perry’s Chemical Engineers’ Handbook, 9th ed.: Sec. 3, “Parabolic Equations in One Dimension”, pp. 3-46 to 3-47; Eq. 5-193b, p. 5-47.
- Secondary: Geankoplis, 3rd ed., Sec. 7.7 (numerical methods for unsteady diffusion) and Sec. 5.4 (heat analog).
- Simulator: Dr. Ray’s Learning Center. Drafted with AI assistance, then checked against the exact slab series.
Course: Transport Phenomena. Previous: Multidimensional Bodies: the Product Rule.