# Statistical Uncertainty of DNS in Geometries without Homogeneous Directions
## 2 Numerical Model
### Channel Flow  
The details of numerical set-up for a channel flow are described by [PERSON] et al. [8]. The infinite channel corresponds to the flow between two infinite parallel walls; it allows for implementation of periodic boundary conditions in \(x\) and \(z\) directions only: in the \(y\) direction the domain is limited by walls. The time and space averaged results are thus one-dimensional. The domain in the particular case considered in the present paper is \(4\pi\) units long, 2 units tall and \(4\pi/3\) units wide  
The above Navier-Stokes system of equations was transformed into a conservative form that can be used with periodic boundary conditions, by adding an artificial force term in the momentum equation, which drives the flow through the channel. The procedure can be found in various sources, however, we suggest the one by [PERSON] et al. [11]. The friction Reynolds number \(\mathrm{Re}_{\mathrm{T}}\) in the simulation was set to 180. The equations are solved with a pseudo-spectral scheme. Fourier series are used in \(x\) and \(z\) directions, while Chebyshev polynomials are used in the \(y\) direction. 128 modes were used in \(x\) and \(z\) directions each, while 129 modes were used in the \(y\) direction.  
Second-order accurate time differencing (Crank-Nicolson scheme for diffusive terms and Adams-Bashforth scheme for other terms) is used with maximum Courant number kept at approximately 0.1. The aliasing error is removed with computation of the nonlinear terms on a grid 1.5 times finer in all directions. The computer code is based on the code developed by [12], which was later modified by [13]. The code was used and verified in simulations of [14; 15; 16].  
In the channel, results are presented with two types of averaging:  
* \"standard\" averaging used in channel flow DNS studies, where time averaging is supported with spatial averaging in two homogeneous directions. At each time step, the spatially averaged values are stored for uncertainty analyses.
* time averaging only in a selected line, perpendicular to the channel walls. In monitor points on this line, the whole history of velocity and pressure is saved from which the averages and uncertainties of these averages can be estimated.  
The uncertainty is calculated with the help of ar program from arsel library [2]. In a similar way to the channel case, the monitor point data is saved at each time step. In the post-processing phase, the ar program is used to estimate the decorrelation time \(T_{0}\) or associated number of time steps \(N_{0}\), which is the time or number of time steps, respectively, when the variable samples become independent. More rigorously, \(T_{0}\) is the time when the estimated autocorrelation function becomes insignificant. This technique is explained by [PERSON] et al. [2]. The sampling error or the estimate of uncertainty \(\sigma\) of a variable \(x\) is:  
\[\sigma^{2}=\frac{N_{0}}{N(N-N_{0})}\sum_{i=1}^{N}(x_{i}-\langle x\rangle)^{2}, \tag{3}\]  
where \(\langle x\rangle\) is the estimation of the average, derived from the \(N\) samples. In the present study, the samples are equidistant in time. The uncertainty still has the dependency \(1/\sqrt{N}\) at values for \(N\gg N_{0}\).