  Rigorous assessment of uncertainty is crucial to the utility of DNS results.
Uncertainties in the computed statistics arise from two sources: finite
statistical sampling and the discretization of the Navier-Stokes equations. Due
to the presence of non-trivial sampling error, standard techniques for
estimating discretization error (such as Richardson extrapolation) fail or are
unreliable. This work provides a systematic and unified approach for estimating
these errors. First, a sampling error estimator that accounts for correlation
in the input data is developed. Then, this sampling error estimate is used as
part of a Bayesian extension of Richardson extrapolation in order to
characterize the discretization error. These methods are tested using the
Lorenz equations and are shown to perform well. These techniques are then used
to investigate the sampling and discretization errors in the DNS of a
wall-bounded turbulent flow. For both cases, it is found that while the
sampling uncertainty is large enough to make the order of accuracy difficult to
determine, the estimated discretization errors are quite small. This indicates
that the commonly used heuristics provide ad- equate resolution for this class
of problems. However, it is also found that, for some quantities, the
discretization error is not small relative to sampling error, indicating that
the conventional wisdom that sampling error dominates discretization error for
this class of simulations needs to be reevaluated.
