A virtual flow meter downstream of various elbow configurations

When flow meters are installed in disturbed flow conditions caused by pipe configurations such as junctions or elbows, significant measurement errors can occur. With existing knowledge of the flow conditions, those errors can be corrected using suitable calibration factors. This paper presents a surrogate model based on computational fluid dynamics simulation results that can predict velocity profiles downstream of single and double elbows in- and out-of-plane. The simulated flow profiles are decomposed into a fully-developed and a disturbed part, which allows changing the Reynolds number and roughness of the pipe wall without performing additional simulations. Furthermore, proper orthogonal decomposition and interpolation using piecewise linear splines enables the real-time evaluation of the model for a wide range of curvature radii and distances between the elbows. By incorporating a measurement principle, calibration factors for different flow meter designs can be predicted. The model is validated on the example of an ultrasonic flow meter by comparison with measurement data obtained from a clamp-on flow meter.


Introduction
Flow meters are usually provided with calibration values that rely on the assumption of a fully developed symmetrical velocity distribution. Such ideal flow conditions require a long, straight pipe section to develop. In practical applications, however, the presence of elbow configurations, junctions, and other installations cause disturbed flow conditions with asymmetric velocity distributions and secondary flow motions. This can create significant measurement errors * Author to whom any correspondence should be addressed.
Original Content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. leading to incorrect billing and inefficiencies in industrial processes. With existing knowledge of the local flow conditions, the meter error due to flow disturbances can be corrected for any particular measurement procedure and design. This can be accomplished by means of fluid mechanical calibration factors, which can be determined experimentally through measurements with the meter itself or calculated from the velocity distributions provided by visualizing techniques such as laser Doppler anemometry and particle image velocimetry (PIV). Alternatively, calibration factors can be determined in flow simulations using computational fluid dynamics (CFD).
While measurements can provide highly accurate results, they are often costly and time-consuming and thus, limited to specific geometries only. This presents a problem as in reality there is a wide range of potential elbow configurations, each resulting in a different flow development downstream. More specifically, the standards for butt-welding pipe fittings EN 10 253-2/-4:2017 [5,6] distinguish between 2D, 3D, and 5D models with curvature radii of around 1.0, 1.5 and 2.5 pipe diameters. Additionally, custom-built elbows with curvature radii ranging from 0.5 to 5 pipe diameters or even higher are used. Double elbow configurations may also vary in the orientation and distance between the two bends. In comparison to experiments, CFD simulations can be conducted for a broad variety of configurations. On the downside, their accuracy is dependent on the validity of the underlying model assumptions and on how accurately the geometry, boundary conditions, etc can be reproduced in the numerical model. Simulations with the industry standard RANS (Reynolds-averaged Navier-Stokes) can be carried out in relatively short time but are known to be inaccurate in complex flows that include swirl or flow separation. Transient, scale-resolving models on the other hand are too time-consuming to be practical for a large number of parameters and relevant Reynolds numbers in industrial applications.
Various studies have been conducted to assess the effects of elbow configurations on the downstream flow development, especially with regard to flow meter performance. As for numerical studies, the flow development downstream of both single and double elbows out-of-plane has been investigated with regard to varying inflow conditions (Weissenbrunner et al [34,35]), Reynolds numbers (Martins [16], Holm et al [12]), circumferential and axial mounting positions of ultrasonic flow meters and the sensitivity of the associated simulations (Martins et al [17,18]), comparison with measured data from laser Doppler velocimeters (Moniz Pereira [22]) and ultrasonic velocity profilers (Tsuzuki et al [31]). Other numerical studies have examined the flow adaptivity of ultrasonic flow meters downstream of a SE (Zheng et al [41]), the effects of pipe wall roughness downstream of a double elbow out-of-plane (Morrison and Tung [23]) and the flow behind 180 • elbows with different curvature radii (Bilde et al [1]). Zheng et al [40] present simulations that are able to infer the effect of the disturbed flow past single and double elbow geometries on the sound pressure propagation. As for experimental studies, LDV measurements downstream of both single and double elbows out-of-plane have been performed to analyze the disturbed velocity profiles (Wendt et al [37]), and, to investigate the effects on ultrasonic and electromagnetic flow meters (Turiso et al [32], Straka et al [28], Halttungen [10]) as well as on turbine meters, orifice flow meters and tube bundles (Mattingly and Yeh [19][20][21], Kelner [14]). Furthermore, PIV measurements have been carried out downstream of a double elbow out-ofplane in conjunction with flow conditioners (Xiong et al [39]), with focus on the spatio-temporal flow structures downstream of a SE (Hellstroem et al [11]) and with emphasis on the decay of Dean vortices downstream of a SE (Kalpakli and Örlü [13]). Although research activity is very high, the majority of scientific investigations have been constrained to examining only one or a few distinct elbow geometries.
However, comprehensive models to efficiently predict calibration factors in a broad range of geometric parameters do not yet exist.
The aim of this study is to develop a tool capable of determining the flow conditions downstream of practically relevant elbow configurations. This is realized by means of a surrogate model constructed from a total of 263 RANS simulations. Its scope covers single and double elbow configurations both inand out-of-plane with curvature radii and distances between the elbows ranging from 0.5 to 10 and 0 to 5.5 pipe diameters, respectively. Furthermore, it is possible to modify the Reynolds number and pipe wall roughness. By modeling the measurement principle, calibration factors for arbitrary meter designs can be calculated.
The paper is structured as follows: section 2 covers the numerical setup for the CFD simulations and a selection of simulation results to illustrate the diverse flow phenomena downstream of different elbow geometries. The construction of the surrogate model is described in section 3. This includes decomposing the velocity fields predicted in the CFD simulations into fully developed and disturbed parts as well as a proper orthogonal decomposition (POD) analysis to reduce the amount of data. Finally, the utilization of the surrogate model as a virtual flow meter is demonstrated on the example of an ultrasonic flow meter in section 4. This includes a validation with calibration factors obtained from measurements with clamp-on flow meters installed downstream of a single and a double elbow out-of-plane.

Simulation setup
In this section, the numerical setup of the CFD simulations is described. This includes the geometry, flow conditions, solver settings and a grid study. Additionally, a selection of flow profiles downstream of the elbow configurations is shown to demonstrate the dynamics in the parameter space.

Geometry
Three different 90 • elbow configurations of circular pipes with a pipe diameter of D = 0.1 m are studied: a single elbow (SE), a double elbow out-of-plane (DE) and a double S-elbow (DSE), compare figure 1. The geometrical degrees of freedom are the curvature radius R c (for all cases) and the distance between the two elbows d l (for the geometries with two elbows DE and DSE). Multiple geometries with different parameter realizations are generated. For the SE case, the curvature radius R c is sampled between R c.min = 0.51 D and R c.max = 10 D in N Rc = 21 steps. Note that R c.min is chosen to be 0.01 D higher than the theoretical minimum (0.5 D) to avoid a sharp edge, which would lead to grid elements with low quality. As the dynamics are expected to be higher at lower values of R c , the sample positions are distributed according to For the other two cases, values of R c.max = 5.51 D and N Rc = 11 are chosen. The distance between the two elbows d l ∈ [d l.min , d l.max ] is distributed according to where the minimum and maximum distances are d l.min = 0.01 D and d l.max = 10.01 D, respectively. The number of parameter values is N d l = 11. Altogether, a total of 263 geometries are processed. The geometries and meshes are generated automatically using the BlockMesh implementation from [24]. In the computational domain, the length from the inlet to the entry of the upstream elbow is 7 D, while the straight pipe section between the exit of the downstream elbow and the outlet has a length of 100 D.

Flow conditions
The flow conditions in the simulations are selected in conformity with the measurement setup described in Straka et al [28,29]. The water temperature is 30 • C, which results in a kinematic viscosity of 0.8 · 10 −6 m 2 s −1 . Furthermore, the flow rate is 11.32 m 3 h −1 , which corresponds to a volumetric velocity of u vol = 0.4 m s −1 . This results in a diameter-based Reynolds number of Re = 5 · 10 4 and a friction Reynolds number of Re τ = 1288 for a smooth pipe. At the inlet, a fully developed velocity profile and turbulent viscosity taken from a precursor simulation of a straight pipe is prescribed. At the outlet zero pressure, and zero velocity at the pipe walls, are prescribed.

Solver settings
In order to perform a CFD simulation, it is necessary to solve mathematical equations that describe the behavior of the fluid. The fluid motion of water can be described by the incompressible Navier-Stokes equations. As the resolution of all turbulent fluctuations is computationally too expensive, additional equations can be included to model the effects of turbulence. There are different types of turbulence models for transient simulations such as large eddy simulation (LES) or detached eddy simulation (DES), see, e.g. Ferzinger and Peric [7], Wilcox [38]. These models resolve large turbulent flow structures and model the effect of the smallest turbulent scales, yet they are still too computationally expensive, especially for high Reynolds numbers. In this study a large number of simulations needs to be performed at a comparatively high Reynolds number. Therefore, RANS models are employed, which are less computationally expensive by several orders of magnitude. RANS models rely on a timeaveraged version of the Navier-Stokes equations and additional transport equations to calculate an artificial local eddy viscosity that accounts for all turbulent fluctuations. Among the RANS type models, the most common approaches are the k-ε, k-ω and SST model. As of today, these models are still the industry standard. In this study, the Spalart-Allmaras turbulence model [26] is used, which consists of one partial differential equation for calculating the eddy viscosityν t . Although being less computationally expensive, it has been demonstrated to be equally or even more precise compared to other RANS models in pipe flow applications, see Straka et al [29].
Second order discretization schemes are chosen, for divergence of the velocity bounded Gauss linear and bounded Gauss linearUpwind grad(U) for the divergence of the turbulent viscosity. Moreover, Gauss linear and Gauss linear corrected are used for the gradient and Laplacian schemes, respectively. For the DE and DSE the solver OpenFOAM version 1812 is used, whereas for the SE, RapidCFD is used. Both solvers are based on the finite volume method. RapidCFD is a fork of OpenFOAM (version 2.3) operating on GPU, which produces similar results for the Spalart-Allmaras turbulence model, see Ekat et al [4].

Grid study
A grid-independence study is conducted to ensure the accuracy of the numerical solution of the mathematical equations. Block-structured hexahedral O-grids are created using BlockMesh with increasing grid densities. The study is conducted for a DE with R c = 1.425 D and d l = 0.01 D. Five grids are created, each with an inlet length of 7 D between the inlet and the elbow entrance, and an outlet length of 42 D downstream of the last elbow. The coarsest grid, labeled G 0 , contains 160 000 elements. Subsequent grids G 1 and G 3 have twice and quadruple the number of grid cells in all three dimensions compared to G 0 . Grid G 2 is created by  refining G 1 slightly, and the finest grid, G 4 , is generated by moderately refining G 3 . The grid parameters are summarized in table 1. A quarter of the pipe cross section for G 0 , G 1 , G 3 and G 4 as well as the full cross section of G 2 are presented in figure 2.
To compare the performance of the grids, the magnitude of the difference between the velocity vectors of the results with each grid u i and the finest grid −u ref is calculated according to After that, the L 2 -norm over the cross sections Ω is evaluated at multiple downstream positions z: Here, A is the area of the cross section Ω. All velocities u * are normalized with the bulk velocity u vol , so that u = u * u vol . The result of each grid is interpolated onto the cell centers of the coarsest grid G 0 . All integrals are calculated using piecewise linear shape functions on a Delaunay triangulation of the x-y coordinates. It can be observed that for all grids the highest deviations appear near the elbow exit and decline with further distance, compare figure 3 (left). In figure 3 (right), the maximum of E over all evaluated cross sections for each grid, max z E(z), is shown over the number of grid elements. As a compromise between accuracy and efficiency, the parameters of G 2 are chosen for the simulations of the elbows with the geometry variation. Other than in the grid study, the length of the straight pipe downstream the elbow is extended to 100 D. This leads to a number of grid elements between 2 · 10 6 and 5 · 10 6 .

Results
In general, the flow downstream of all geometries is highly disturbed which manifests in asymmetric axial velocity profiles and enhanced secondary flow motions. A brief overview of the resulting velocity profiles at z = 6 D with different values of R c and d l is shown in figure 4. For the SE (top row), the typical sickle-shaped axial velocity profile can be observed, where the conformation of the shape differs with different values of R c . The secondary flow motions, which are represented by arrows, show two counter-rotating swirls. Downstream of the DE (center row) the profile is also sickle-shaped but, in contrast to the SE, it is rotating clockwise due to the centered single swirl. The variation of shapes downstream of the DSE (bottom row) is more divers. The position of the highest axial velocities varies between the upper, lower, and center part of the pipe cross section. The secondary flow motions build two counter-rotating swirls, similar to the SE but in opposite direction. With higher values of R c and d l , the strength of the swirl gets weaker for the depicted velocity profiles. Note that the plots represent only a small part of the results, but illustrate the complexity of the dynamics in the parameter space.

Construction of a surrogate model
In this section the construction of a surrogate model based on the simulation results in section 2 is described. It allows the prediction of the time-averaged velocity fields for arbitrary positions up to 100 D downstream of the SE, DE or DSE for any curvature radius R c ∈ [0.51, 5.51] D, any in-between distance d l ∈ [0.01, 10.01] D, and any Reynolds number Re ∈ [5, 50] · 10 4 . The following steps are performed to construct the surrogate model: At first, the velocity data is sampled from the simulation results and the velocity profiles are decomposed into a fully developed and a disturbed part. Then, a POD is performed to reduce the amount of data. Finally, an interpolation is proposed that can be used to predict velocity profiles throughout the specified range of geometrical parameters.

Data sampling
For each simulation, the velocity field at each cross section is sampled in cylindrical coordinates (r, φ, z). Whereas the angular positions are chosen uniformly, the radial positions are chosen to be more dense at the wall according to   Similarly, the downstream positions z are sampled with a higher density close to the elbow exit with The corresponding number of sampled data points are summarized in table 2.

Decomposition of the velocity profile
The axial velocity profile u z can be decomposed into a fully developed part u fully and a disturbed part u dis according to This decomposition offers the benefit of utilizing an analytical approach for the fully developed part of the profile. Consequently, varying the Reynolds number (Re) or sand grain roughness (k s ) can be achieved without the requirement of performing a new simulation. By replacing u fully with modified parameters of Re and k s in equation (6), a new profile u z is created. In figure 5, the decomposition of the velocity profile is illustrated on the example of a vertical line at z = 6 D downstream of the SE with R c = 1.1 D with original parameters (Re = 5 · 10 4 , k s = 0) and with modified parameters (Re = 5 · 10 5 , k s = 0) and (Re = 5 · 10 4 , k s = 0.01 D). As an important property, this decomposition conserves the flow rate. This approach implies that u dis is independent of the Reynolds number and the pipe wall roughness. A similar approach can be found in Gersten and Papenfuss [9]. This approach is reasonable for moderately high Reynolds numbers (Re > 5 · 10 4 ). Note that for the decomposition, u fully is taken from a simulation of a long straight pipe, whereas for the reconstruction, u fully is calculated with the semi-analytical formulation from Gersten [8]. This alteration of the profile is insignificant in regions of strong disturbance (close to the elbows), but eliminates systematic errors which are inherent in simulation results of fully developed pipe flow. Even though the theoretical profile is also an approximation, it is in better agreement with measurement data than simulation results with RANS models, see, e.g. Tawackolian [30].

POD
To reduce the amount of data, the velocity profiles ⃗ u = (u x , u y , u dis ) T can be further decomposed with the method of POD. While POD is extensively used in the analysis of temporal fluctuations in fluid dynamics, see, e.g. Hellstroem et al [11] or Sieber et al [25], it can also be used to reduce the dimensions of a data set, e.g. Brunton and Kutz [2]. To accomplish that, the data matrices need to be reorganized such that the data matrix of each of the N s cross sections is flattened as a row vector b i , i = 1, . . . , N s . These vectors are treated as snapshots, similar to transient data, and are stored in the rows of the matrix B = [b 1 , b 2 , . . .b Ns ]. Then, the mean vectorb over all rows b i is subtracted to receive the matrix and its covariance matrix Its eigenvalues λ and modes Φ are calculated by an eigendecomposition λ, Φ = eig(C).
The modes are sorted in descending order of their corresponding eigenvalues, so that the first modes contain most of the energy. The coefficient matrix A can be determined by the scalar product of the data matrix ⃗ X and the modes Φ according to The original data matrix B can be approximately reconstructed with where a i and ϕ i are the ith column of A and Φ, respectively, and N m is the number of modes used for the reconstruction. Furthermore, N c = N u N r N φ is the number of data in one cross section and N s the number of sampled planes ('snapshots'). Instead of storing the data matrix B ∈ R Ns×Nc , only the mean data vectorb ∈ R Nc , the coefficient matrix A ∈ R Ns×Nm and the modes Φ ∈ R Nc×Nm need to be stored. If the number of used modes N m is small enough, the amount of data is reduced, since N s N m + N c (N m + 1) < N s N c if N m < NsNc−Nc Ns+Nc . In this paper, the POD is not just done for one set of parameters but for all parameter combinations and cases together. Hence, the data matrix B is constructed by stacking the velocity profiles of all cases, resulting in N s = ∑ cases N Rc N d l N z . Contour plots of u dis and vector plots of the secondary flow motions u x and u y of the mean profileb and the first eight modes are shown in figure 6. The typical sickle-shaped asymmetry of the velocity profiles can be observed, especially in the mean profile. Also, different flow structures such as single swirl (mean profile and mode 2), typically for the DE case, as well as pairs of counter-rotating swirls, so called Dean vortices [15], (mode 4 and mode 7) can be observed.
To determine the number of modes that have to be considered, the velocity field u is reconstructed for an increasing number of modes. The L 2 -error E(R c , d l , z) from equation (3) is calculated, with ε(R c , d l , x, y, z) = ∥ũ i (R c , d l , x, y, z) − u(R c , d l , x, y, z)∥ 2 being the magnitude of the difference of the approximated velocity fieldũ i (⃗ B i ) reconstructed with i modes and u ( ⃗ B) the original simulation data. Both the mean and maximum of E(R c , d l , z) over the whole data set for each case and over the number of used modes N m is shown in figure 7. It can be observed that the errors decline with an increasing number of modes, and that the mean errors are smaller than the maximum errors by a factor of about 10. A total of N m = 400 modes are chosen as a good balance between accuracy and efficiency. As a result, the maximum error E(R c , d l , z) is 0.35% and the mean error of E(R c , d l , z) is smaller than 0.025%. This means that the data can be reduced by a factor of 20. In other words, it is possible to reconstruct the entire data with an error of less than 0.4% by storing 5% of the data.

Interpolation of the POD coefficients
Predicting the velocity distribution within the three dimensional (physical) space and for arbitrary values in the space of geometry parameters requires an interpolation of the POD coefficients. In the x-y (or r-φ) space, the interpolation can be performed within each of the POD modes. To obtain the velocity profile at any spatial position z, curvature radius R c and in-between distance d l , the POD coefficients a i of each mode (compare equation (11)) need to be interpolated. The high dynamics of a 1 for low parameter values can be observed in the contour plots of figure 8. To perform the interpolation, a i (R c , d l , z) must be reshaped to restore its original dimensionality R NR c ×N d l ×Nz . This corresponds to a 2D interpolation for the SE and 3D interpolation for the two other cases. Here, a tensorproduct spline interpolation implemented in the python package scipy.interpolate called RegularGridInterpolator is used, see Weiser and Zarantonello [33]. This method enables an interpolation on n-dimensional rectangular shaped grids.
To check the accuracy of the interpolation, a so called cross validation procedure is performed, in which one of the sample positions in a i (R c , d l , z) is left out. To maintain the rectangular grid structure of the samples, a whole slice (row/column in 2D) of values is removed. Afterwards, the interpolation is performed with the remaining samples and the velocities⃗ u are calculated for the previously eliminated parameters. The difference to the original simulation results  is calculated as ε = ∥⃗ u −⃗ u∥ 2 and assessed by means of the L 2 -error E, compare equation (3). The procedure is repeated consecutively for each value of the sampled parameters except for the upper and lower parameter values, which are always included. Interpolations with spline functions of polynomial degree p = 1 (linear), p = 3 (cubic) and p = 5 (quintic) are compared in figure 9(a), where the mean L 2 -error over all R c and d l , E(R c , d l ), is shown for the interpolation at each downstream distance z. For the linear interpolation, errors with a maximum of 2% occur near z = 0.1 D. For the higher polynomial spline interpolations, the errors are distinctively lower. Figure 9(b) shows the mean of E(z, d l ) over all z and d l at each curvature radius R c for the SE, DE and DSE cases. With linear interpolation, the values rise up to 6% at R c ≈ 1, whereas the errors of the cubic spline polynomials are in general slightly higher. Quintic interpolation produces significantly high errors for both the DE and DSE cases.
The mean of E(z, R c ) over all z and R c is shown at each in-between distance d l for the DE and DSE in figure 9(c).
Errors with piecewise linear interpolation show a maximum of 4% at d l ≈ 1 for the DE and below 1% for the DSE. For the DE, the cubic interpolation errors are higher than the linear, and the quintic ones are beyond 10% for d l > 5.5.
In conclusion, the cross validation study is useful to identify parameter regions worth of refining, as well as for comparing the performance of different interpolation methods. In certain cases, the failure of spline interpolation with higher order polynomials can be attributed to its oscillating nature, which has a tendency to over-and undershoot, especially if the interpolation points are not perfectly smooth. Moreover, the steep gradients concentrated at low values of R c , z and d l as well as the unsteadiness of the sampled data are challenging for any interpolation method. The high interpolation errors are located at positions in proximity to the elbow exit z < 1 D and small values of R c , where recirculating flow is present. Overall, the comparison between the spline interpolations with different polynomial degrees yields that piecewise linear interpolation provides the most reliable method with mean errors of less than 6%.

Flow meter evaluation
The calculated velocity profiles can be used to predict errors, calibration factors or uncertainties of specific types of flow meters. Especially non intrusive measurement principles such as ultrasonic and electro-magnetic flow meters can be modeled in post processing. In the following, the procedure is shown on the example of an ultrasonic flow meter. Calibration factors for this type of flow meter are modeled and compared with measurement data of an ultrasonic clamp-on flow meter.

Model of an ultrasonic flow meter
The most common type of ultrasonic flow meter uses the timeof-flight principle. A transducer (A) induces a sonic wave into the pipe, which is detected by another transducer (B) installed further downstream. The time between sending and receiving the signal is measured. This procedure is repeated, whereas the downstream transducer is sending and the upstream transducer is receiving. Since the fluid flow is carrying the sound waves, the measured time is proportional to the mean flow velocity along its traveled path u path . The transducers can be aligned to directly send the sonic waves to each other or by using one or more reflections at the pipe wall. A common configuration with one reflection is the so-called V-path configuration, compare figure 10. If the velocities in the pipe are known, the measurement value of an ultrasonic flow meter can be predicted by evaluating the integral Here, L = ∑ N i =1 L i denotes the length of the ultrasonic path from one transducer to the other, e i is the direction vector parallel to the ultrasonic beam, and e z = 1 N ∑ N i =1 e i.z the mean axial share of the direction vectors e i .
To determine the volume flow Q of the fluid inside the pipe, the measured path velocity u path must be multiplied by the area of the pipe cross section A and a calibration factor k that assigns the mean velocity over the path to a mean velocity over the pipe cross section: The calibration factor k is dependent on the velocity profile. For fully developed flow conditions, it only depends on the Reynolds number Re and the wall roughness k s as u fully only depends on r, Re, and k s (cp. equation (6)):   For disturbed flow conditions, an additional calibration factor can be introduced. The fluid-specific calibration factor is then calculated as k = k fully k d . In a long straight pipe, k d is approaching a value of one, as u path dis is converging to zero.

Interpolation of the flow meter evaluation
To predict the calibration factor k d for any geometric parameter (R c or d l ), interpolation can be performed on the flow meter values directly (instead of interpolating the POD coefficients, see section 3.4). A cross validation study similar to the POD coefficients in section 3.4 is performed for interpolating u path dis . The mean errors resulting from leaving out one value of R c and d l are shown in figures 11 and 12, respectively. Similar to the results in section 3.4, the spline interpolations with higher polynomial degrees lead to higher errors, and piecewise linear interpolation is the most reliable. Here, the errors are below 1.2% for interpolating R c and below 3% for d l . Furthermore, the mean errors resulting from leaving out a value of z are below 0.2% and therefore not shown here. Note that maximum errors of more than 60% occur in regions with recirculating flows, i.e. in the immediate vicinity to the elbow exit (z < 1 D), especially for small values of R c . Therefore, the predicted calibration factors might not be meaningful in this region. Likewise, flow rate measurement in separated flows might not be meaningful as the measurement value could approach zero, which is the denominator in the calibration factor, compare equation (15). In the following, the values of k d are calculated using the velocities reconstructed from the POD results at the sample positions and be interpolated with piecewise linear splines.     detailed description of the measurement setup and the experimental determination of the calibration factors k d , see Straka et al [29]. The surrogate model is evaluated with the parameters present in the measurement setup and compared to the experimental data. Figure 13 shows the calibration factor k d over the distance z for four different parameter sets. In figure 13(a), the measurement values are in close agreement with the predicted ones, which is also true for z < 22.5 D as shown in figure 13(b). The oscillations of k d are stemming from the nature of the flow structure. That is, the centered single swirl, causing a rotation of the velocity profile in every downstream position and thus, the value of k d . In figures 13(c) and (d), the prediction follows the tendency presumed by the experimental data, but misses the exact values.
The mean of the difference between the predicted (k d ) and measured (k meas d ) calibration factors δ 1 = k d − k meas d is −0.77% and the standard deviation is 1.36%. The mean of the absolute difference |δ 1 | is 1.26% and the maximum absolute deviation is 4.65%. All statistics are summarized in table 3.
It is well known that for rotating flows, such as downstream of a DE, the strength of the swirl cannot be accurately predicted by RANS turbulence models, compare, e.g. [3,27]. This becomes even more evident if the inflow conditions upstream of the elbows are disturbed. In consequence, the phase of the profile cannot be predicted and the evaluation of k d for a specific angle might become biased. To overcome this issue, the angular orientation of the velocity field, respectively the angular orientation of the flow meter, can be taken as random as proposed in earlier works [34,35]. With this approach, expected values, standard deviations and maximum/minimum bounds of k d can be determined and used as a pragmatic prediction and estimation of the uncertainty. In figure 14, the angular mean k d = 1 with its corresponding standard deviation and maximum/minimum bounds downstream of the SE is compared to the measurement data for two Reynolds numbers. It can be observed that k d is a good estimation for all angular orientations of the measurements, as most of the measurement data coincide within the standard deviation, all within the upper and lower bounds. In figures 15 and 16, the same evaluation is performed for the other parameter sets and plotted beside the measurement data for Re = 5 · 10 4 and Re = 5 · 10 5 , respectively. Although the expected (mean) calibration factors follow the trend of the measurement data, they slightly underestimate them. Most data coincides with the maximum/minimum bounds and the uncertainty of the measurement values. An exception is the DE with d l = 0 D and Re = 5 · 10 4 , see figure 15(a), where the underestimation of the experimental data is more significant. Altogether 91.25% of the measurement data including its uncertainty range are inside the standard deviation of the model and 97.2% of the data are between the maximum and minimum bounds. The mean of the difference δ 2 = k d − k meas d is −0.78% with a standard deviation of 1.14%, whereas the mean of the absolute difference is 1.06% with a maximum of the absolute deviation of 5%. All statistics are summarized in table 4.
In all parameter variations, the measurement data at the higher Reynolds number (5 · 10 5 ) are closer to the model predictions. This is remarkable, as the model is based on the simulations with the lower Reynolds number (5 · 10 4 ). In general, the Reynolds number dependency of k d is low.

Conclusion
In this contribution a model was developed that enables the prediction of velocity profiles and calibration factors for flow meters downstream of a SE and double elbows in-and outof-plane. It is based on the velocity distributions from 263 CFD simulations of different geometries using the Spalart-Allmaras turbulence model. These velocity profiles were decomposed into a fully developed and disturbed part, which allowed for changing the Reynolds number and pipe wall roughness. With the method of POD the amount of data was reduced to only 5% with a maximum L 2 -error of less than 0.4%. Spline interpolations were performed to enable the evaluation of the model in the continuous parameter space. In a cross validation study it was shown that piecewise linear interpolation provided the most reliable results, whereas splines with higher order polynomials exhibited significant increased errors for specific parameter combinations. It could be concluded that interpolation in recirculating flows as occurring in the vicinity of an elbow exit with a small curvature radius was not reliable.
The resulting model allows real-time data evaluation with the following six parameters to choose: Reynolds number Re, sand grain wall roughness k s , curvature radius R c , distance between the elbows d l , and downstream distance z. It predicts the velocity profile in the whole cross section. Hence, flow meters of different designs can be evaluated at any installation position. Calibration factors calculated for a V-path configuration of an ultrasonic flow meter were presented and compared to measurement data from an ultrasonic clamp-on flow meter. In total, 320 measurement values for five different geometries and two Reynolds numbers were considered. The comparison showed that the predicted values follow the general behaviour observed in the experimental data. However, for some parameter combinations, the predictions did not lie within the uncertainty of the measurement data. These errors can be attributed to the uncertainties of the simulation results, the surrogate model, and the flow meter model. While the exact uncertainty of each parameter combination was not determined in this contribution, it would be worth investigating in future research. Here, instead, a pragmatic approach was used to estimate the model uncertainty by treating the circumferential angle as an uncertain parameter. It was found, that the differences between the expected values and the measurement data were similar to those obtained by directly evaluating the model. Furthermore, it was demonstrated that 90% of the measurement data coincide within the standard deviations of the predictions and 97% within their maximum and minimum bounds. Therefore, the model can be used to predict calibration factors of ultrasonic flow meters within the considered range of geometry parameters. By an implementation of the model directly in a flow meter its measurement accuracy can be enhanced in disturbed conditions. Due to its cost-effective execution, another benefit of the presented model is the ability to evaluate uncertainties and sensitivities of its input parameters, e.g. by using Monte Carlo methods.

Data availability statement
The developed model can be accessed by a graphical user interface, which is available at the gitlab server of the PTB [36]. It allows the exploration of velocity profiles, the evaluation of flow meters, and the determination of uncertainties for any combination of input parameters.