Skip to main content

Boundary derivative with one-sided differences

Short answer

Second-order forward difference: f'_0 ≈ (-3f_0+4f_1-f_2)/(2h) derived by eliminating f''_0 from Taylor expansions. For T_0=50, T_1=46, T_2=40°C, h=0.5 mm: first-order gradient = -8000 K/m, second-order = -6000 K/m. Heat flux q'' = -k dT/dx = 3600 W/m² using second-order (first-order gives 4800 W/m², 33% higher).

Derive a second-order accurate one-sided (forward) difference formula for df/dxdf/dx at a boundary node x0x_0, using nodes x0,x1,x2x_0, x_1, x_2 with uniform spacing hh. The temperatures at a wall and the next two points spaced 0.5 mm apart are 50, 46 and 40 °C. Estimate the wall temperature gradient using the first-order and the second-order formula, and find the heat flux if k=0.6k = 0.6 W/m·K.

Derivation

Expand f1f_1 and f2f_2 about x0x_0:

f1=f0+hf0′+h22f0′′+h36f0′′′f_1=f_0+hf'_0+\frac{h^2}{2}f''_0+\frac{h^3}{6}f'''_0 f2=f0+2hf0′+2h2f0′′+4h33f0′′′f_2=f_0+2hf'_0+2h^2f''_0+\frac{4h^3}{3}f'''_0

Eliminate f0′′f''_0: compute 4f1−f24f_1-f_2:

4f1−f2=3f0+2hf0′−2h33f0′′′4f_1-f_2=3f_0+2hf'_0-\frac{2h^3}{3}f'''_0 f0′≈−3f0+4f1−f22h,f0′=approx+h23f0′′′+⋯ ⇒ O(h2)\boxed{f'_0\approx\frac{-3f_0+4f_1-f_2}{2h}},\qquad f'_0=\text{approx}+\frac{h^2}{3}f'''_0+\cdots\ \Rightarrow\ O(h^2)

The first-order formula is f0′≈(f1−f0)/hf'_0\approx(f_1-f_0)/h. The second-order formula is important for evaluating wall shear stress and wall heat flux without needing a node outside the domain.

Numerical

Data: f0=50, f1=46, f2=40f_0=50,\ f_1=46,\ f_2=40 °C, h=0.5×10−3h=0.5\times10^{-3} m.

First-order:

dTdx≈46−500.5×10−3=−8000 K/m\frac{dT}{dx}\approx\frac{46-50}{0.5\times10^{-3}}=-8000\ \text{K/m}

Second-order:

dTdx≈−3(50)+4(46)−402×0.5×10−3=−150+184−4010−3=−6000 K/m\frac{dT}{dx}\approx\frac{-3(50)+4(46)-40}{2\times0.5\times10^{-3}}=\frac{-150+184-40}{10^{-3}}=-6000\ \text{K/m}

The successive differences are -4 and -6, so the temperature curve is getting steeper away from the wall (curvature is present). The first-order formula effectively gives the slope at mid-interval (-8000 K/m), so it overestimates the magnitude of the wall slope; the second-order formula extrapolates to the wall itself.

Wall heat flux, q′′=−k dT/dxq''=-k\,dT/dx:

q′′=−0.6×(−6000)=3600 W/m2q''=-0.6\times(-6000)=3600\ \text{W/m}^2

(first-order would give 4800 W/m², about 33% higher.)

Answer: gradient −8000-8000 K/m (1st order), −6000-6000 K/m (2nd order); q′′=3.6q''=3.6 kW/m² (flux directed in the +x direction).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Applied Computational Fluid Dynamics chapter 3 questions →