An explicit finite-difference diffusion code with a random source term at every grid point

PHYSICS · Multi-part · Fermi University Physics · Scientific Practice & Experimental Methods · Mathematical Methods for Physics · Uncertainty in measurement

Scientific Computing for Physicists, Ch The uncertainty of a simulated number: inputs, sensitivity and correlated output

Problem

An explicit finite-difference diffusion code with a random source term at every grid point, drawn afresh each step from a seeded generator, is run until the density field is statistically steady. It then records the local density at one grid point once per step, N=8192N = 8192 samples, with sample variance σ2=0.85\sigma^2 = 0.85 (in units of a reference density, squared). The autocorrelation function of the series, computed via the fast Fourier transform (the Wiener-Khinchin route of the spectral-estimation chapter), is kk: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ρ^(k)\hat\rho(k): 0.62, 0.39, 0.24, 0.15, 0.09, 0.06, 0.04, 0.02, 0.01, 0.01, −0.01-0.01, 0.00, 0.01, −0.01-0.01 Separately, the mean local density itself was recomputed on grids with Δx\Delta x and Δx/2\Delta x/2 (diffusion number α≤12\alpha \le \tfrac12 throughout); Richardson extrapolation, assuming the scheme's formal order p=2p = 2, gives it a numerical uncertainty unum=0.0150u_{\rm num} = 0.0150 in the same density units. ((a)) Apply the chapter's self-consistent window rule, the smallest MM with M≥6 τ^int(M)M \ge 6\,\hat\tau_{\rm int}(M) where τ^int(M)=12+∑k=1Mρ^(k)\hat\tau_{\rm int}(M) = \tfrac12 + \sum_{k=1}^{M}\hat\rho(k), to find τ^int\hat\tau_{\rm int} and the statistical inefficiency s=2τ^ints = 2\hat\tau_{\rm int}. Say what stopping the sum at lag 66 would have given. ((b)) Find the effective sample size and the statistical uncertainty ustatu_{\rm stat} of the mean local density. ((c)) Combine unumu_{\rm num} and ustatu_{\rm stat} into the mean density's combined uncertainty usimu_{\rm sim}.

Browse the problem library