Can the thermal problem have a steady solution?
A one-dimensional bar of unit length and cross section obeys \(-u''=2\) in scaled units. Prescribe outward conductive fluxes \(q_L=0.5\), \(q_R=1.2\). Integrate the equation before solving. What physical quantity changes with time under these fluxes? Correct the right flux while keeping the left.
Work through the solution
Outward flux is \(-u'n\). Total outward flux must equal the integrated source, 2. The prescribed sum is 1.7, leaving a positive heating imbalance of 0.3. With finite heat capacity the mean temperature rises. A compatible right flux is 1.5. A steady calculation with purely Neumann data then needs a reference temperature. Use the Neumann compatibility experiment. Its left sensor reports zero rightward flux. For this comparison set \(v=u-0.5x\), which shifts the rightward flux by +0.5 at both ends. The original measurement then corresponds to the slider setting “Right flux minus 2” of −0.30, and the corrected data correspond to zero.
Fix the reference and check signs
For the compatible data, find the quadratic solution with zero spatial mean. Verify both fluxes and show which part a gradient measurement cannot recover.
Work through the solution
Integrating twice gives \(u=-x^2+0.5x+C\) because at the left \(q_L=u'(0)=0.5\). At the right \(-u'(1)=1.5\). The mean is \(-1/3+1/4+C\), so \(C=1/12\). Adding any constant leaves every flux and gradient unchanged. A measured mean supplies information absent from the differential equation.
Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.
Explain the missing inter-element curvature
Interpolate that exact quadratic linearly on uniform elements of width \(h\). Derive the peak pointwise interpolation error on one element and the jump in its piecewise-constant derivative between adjacent elements. Predict what happens when \(h\) halves. Compare the two errors with the residual and refinement example, which uses unequal sources on the two halves and reports a global energy norm.
Work through the solution
On \([a,b]\), \(u-I_hu=-(x-a)(x-b)\), which peaks at \(h^2/4\). The slope of each secant equals the exact derivative at its midpoint. Moving to the next element changes this slope by \(-2h\). Halving \(h\) quarters the peak value error and halves the jump magnitude. The adaptive experiment measures the gradient error in an energy norm. Uniformly halving all element widths would halve that norm for this quadratic. Selective refinement can give a different global ratio. Machine-small residual in the assembled linear system alone measures neither the field error nor the derivative jump.
Test an independent transient boundary condition
Now join the ends periodically. For \(u_t=u_{xx}\) on a unit ring, a sine of mode \(m\) decays at rate \((2\pi m)^2\). Derive the semi-discrete finite-difference rate and evaluate its ratio to the true rate at eight points per wavelength.
Work through the solution
A Fourier mode on the grid acquires factor \(-4\sin^2(\pi m h)/h^2\) under the centred second difference. At eight points per wavelength, the ratio is \([\sin(\pi/8)/(\pi/8)]^2\approx0.94964\). Numerical decay is about 5% too slow even with exact time integration. Compare with the modal diffusion experiment with 16 nodes and mode 2. The frequency and domain scaling differ, but the decay-rate ratio depends only on points per wavelength. Periodic and flux tests isolate distinct boundary and discretisation errors.