Uncertainty Quantification in Codes
A prediction without an uncertainty is not a scientific result; UQ turns a single number into a defensible range with stated sources.
From Point to Distribution
A simulation returns numbers, but the inputs, the model, and the numerics are all uncertain, so the honest output is a distribution, not a point. Uncertainty quantification (UQ) is the discipline of characterizing how uncertainty in inputs and model choices propagates to the quantities of interest, and of combining that with the numerical error already established by verification.
Sources of Uncertainty
- Parameter uncertainty: imperfectly known material properties, rate coefficients, and boundary values.
- Numerical uncertainty: discretization, iterative, and round-off error from verification.
- Model-form uncertainty: the model omits or approximates physics.
- Aleatory uncertainty: genuine variability that no amount of information removes.
Forward Propagation
The core task is forward propagation: given distributions on the inputs, find the distribution on the output. Monte Carlo sampling is the general method, running the code many times with sampled inputs. Because each run may be expensive, surrogate models and structured expansions such as polynomial chaos are used to reduce the number of full runs needed.
import numpy as np
rng = np.random.default_rng(0)
# propagate uncertain conductivity k through a toy model
k = rng.normal(10.0, 0.5, size=100000) # input distribution
q = 1.0 / k # quantity of interest
print('mean', q.mean(), 'std', q.std())
print('95% interval', np.percentile(q, [2.5, 97.5]))
Reporting
A credible UQ result states which sources were included, which were excluded and why, the method used, and the resulting interval with its coverage interpretation. Excluding model-form uncertainty is common and often necessary, but it must be declared, because it is frequently the largest term. UQ that reports only parameter uncertainty while ignoring numerics or model form gives a false sense of precision.
In a design context, UQ feeds directly into the error budget and into margin decisions: a quantity known to lie within a wide band demands more conservative design than one known tightly.