Hostname: page-component-77f85d65b8-lfk5g Total loading time: 0 Render date: 2026-03-29T11:08:11.282Z Has data issue: false hasContentIssue false

Enhanced flow rate prediction of disturbed pipe flow using a shallow neural network

Published online by Cambridge University Press:  06 November 2025

Christoph Wilms*
Affiliation:
Physikalisch-Technische Bundesanstalt (PTB), Bundesallee 100, Braunschweig 38116, Germany Physikalisch-Technische Bundesanstalt (PTB), Abbestraße 2-12, Berlin 10587, Germany
Ann-Kathrin Ekat
Affiliation:
Physikalisch-Technische Bundesanstalt (PTB), Abbestraße 2-12, Berlin 10587, Germany
Katja Hertha-Dunkel
Affiliation:
Physikalisch-Technische Bundesanstalt (PTB), Abbestraße 2-12, Berlin 10587, Germany
Thomas Eichler
Affiliation:
Physikalisch-Technische Bundesanstalt (PTB), Abbestraße 2-12, Berlin 10587, Germany
Sonja Schmelter
Affiliation:
Physikalisch-Technische Bundesanstalt (PTB), Abbestraße 2-12, Berlin 10587, Germany
*
Corresponding author: Christoph Wilms; Email: christoph.wilms@ptb.de

Abstract

Trustworthy volumetric flow measurements are essential in many applications such as power plant controls or district heating systems. Flow metering under disturbed flow conditions, such as downstream of bends, is a challenge and leads to errors of up to 20 %. In this paper, an algorithm based on a shallow neural network (SNN) is developed, leading to a significant error reduction for strongly disturbed flow profiles. To cover a wide range of disturbances, the training dataset was chosen to consist of three base types of elbow configurations. For 83 % of the test data, the SNN produces a smaller error than the state-of-the-art approach. The average error is reduced from 2.25 % to 0.42 %. For the SNN, an error of less than 1 % can be achieved for downstream distances greater than 10 pipe diameters. The SNN demonstrated robustness to various reductions of the training dataset, as well as to noisy input data. Additionally, simulation data of a realistic pipe system with a significantly different geometry compared with the training data was used for testing. In this strong extrapolation, the mean error of the SNN was always smaller than the state-of-the-art approach and an error of less than 1 % could be achieved for more than 10 pipe diameters downstream of the last disturbance.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Figure 1. (a) Exemplary 1-D velocity profile (red line) extracted from a strongly disturbed 2-D velocity profile (shown in (b) by the red dots.). In order to consider realistic conditions, the path is limited to 80 % of the pipe diameter, see explanation in § 2.3. The profile is normalised over the pipe diameter $D^*$ and $r^*$ represents the radius coordinate. The dashed line symbolises a reflection of the entire 1-D profile. The blue profile describes the RSA profile (for the core area of the profile the mean of both sides is taken) and is plotted as a 2-D field in (c). The discontinuity of the blue curve at $r^*/\mathit{0.5}D^* \mathit{= \pm 0.6}$ is due to the averaging of the core region. The corresponding mean velocities are denoted as $\overline {u^*}_{\textit{true}}$ and $\overline {u^*}_{rot}$.

Figure 1

Table 1. Overview of the configuration used to train the neural networks.

Figure 2

Figure 2. Overview of the geometrical configurations. (a) Technical drawing of an S-elbow, (b) to (d) schematic renderings of a single elbow, an S-elbow and a double elbow out-of-plane.

Figure 3

Figure 3. Contour plots of the different normalisation steps starting from the original velocity profile at the top left corner: 1. profile normalised by the volumetric flow rate based on the RSA using the selected 1-D profile, 2. profile with subtraction of the Gersten–Herwig profile (visualised in (a)), 3. normalisation using the standard deviation of the 1-D path. (b) Noise can be added to the 1-D profile (here also added for visualisation purposes to the 2-D profile).

Figure 4

Figure 4. Rendering of the real test case including information about the pipe sections. The green-marked pipe sections are analysed in greater detail in the results.

Figure 5

Figure 5. Exemplary comparison of a ground truth velocity 2-D profiles (upper row) with the corresponding SNN prediction (lower row). The red dots indicate the location where the velocity is sampled for the 1-D profile. The profiles are taken from the test case $\mathcal{E}_1$ at different downstream distances increasing from left to right.

Figure 6

Figure 6. (a) The $L^2$ error and (b) $|\delta Q |$ over downstream position $z$ for test case $\mathcal{E}_1$ ($G=\textrm {SE}, R_c = \mathit{0.89}, Re = \mathit{5}\times \mathit{10^4}$). Depicted is a comparison of the RSA (blue) and the SNN (red) approaches. The solid line represents the mean, the dotted lines the mean $\pm$ standard deviation and the coloured areas the minimum and maximum ranges based on the 20 different angular paths per downstream position. The results are averages based on 20 training repetitions, the min/max and standard deviations are calculated after combining the 20 runs by averaging them.

Figure 7

Figure 7. (a) The $L^2$ error and (b) $|\delta Q |$ over downstream position $z$ averaged for all test cases $\mathcal{E}$. Depicted is a comparison of the RSA (blue) and the SNN (red) approaches. The solid line represents the mean, the dotted lines the mean $\pm$ standard deviation and the coloured areas the minimum and maximum ranges based on the 20 different angular paths per downstream position. The results are averages based on 20 training repetitions, the min/max and standard deviations are calculated after combining the 20 runs by averaging them.

Figure 8

Figure 8. Comparison of the model trained on the entire dataset $\mathcal{T}_{M_1}$ (middle) with the RSA (left), and the model trained on practically relevant cases $\mathcal{T}_{{M_2}}$ (right). The performance is evaluated for different test subsets. The upper half describes $|\delta Q |$, and the lower half gives a one-to-one comparison with the RSA. It counts the cases where the RSA results in a lower $|\delta Q |$ than the SNN model. All data of the SNNs are given as an average $\pm$ standard deviation (calculated after averaging the individual predictions per training) obtained from 20 repetitions. Note that the written value and the colour code match only for the centre column. In the remaining columns, the change is illustrated by a deterioration in red shades and an improvement in green shades, in comparison with the middle column.

Figure 9

Figure 9. Repeatability of the model based on 20 training runs depicted in the form of raincloud plots for the test subsets. The individual points represent the average error of one trained model per subset. The crosses mark the training that was used as the base case for the investigations in § 3.4.

Figure 10

Figure 10. Value of $|\delta Q |$ over downstream position $z$ for (a) pipe section 2 and (b) pipe section 5 of the realistic test case. Depicted is a comparison of the RSA (blue) and the SNN (red) approaches. The solid line represents the mean, the dotted lines the mean $\pm$ standard deviation and the coloured areas the minimum and maximum ranges based on the 20 different angular paths per downstream position. The results are averages based on 20 training repetitions.

Figure 11

Figure A1. Polar mesh of the velocity profile. The velocity is given for all intersections of the black lines.

Figure 12

Table B1. Description of the test subsets used in the heatmaps.

Figure 13

Figure C1. The $L^2$ error (left column) and $|\delta Q |$ (right column) over downstream position $z$ for test cases $\mathcal{E}_2$ to $\mathcal{E}_4$. Depicted is a comparison of the RSA (blue) and the SNN (red) approaches. The solid line represents the mean, the dotted lines the mean $\pm$ standard deviation and the coloured areas the minimum and maximum ranges based on the 20 different angular paths per downstream position. The results are averages based on 20 training repetitions, the min/max and standard deviations are calculated after combining the 20 runs by averaging them.

Figure 14

Figure C2. The $L^2$ error (left column) and $|\delta Q |$ (right column) over downstream position $z$ for test cases $\mathcal{E}_5$ to $\mathcal{E}_8$. Depicted is a comparison of the RSA (blue) and the SNN (red) approaches. The solid line represents the mean, the dotted lines the mean $\pm$ standard deviation and the coloured areas the minimum and maximum ranges based on the 20 different angular paths per downstream position. The results are averages based on 20 training repetitions, the min/max and standard deviations are calculated after combining the 20 runs by averaging them.

Figure 15

Figure D1. Heatmap of the volumetric flow rate error for different lengths of the 1-D path (upper half) and a one-to-one comparison with the RSA. Compared are the results for different subsets of the test dataset. The number of points in the 1-D path is given for each column. Note that only for the left column do the written value and the colour code match. Cells with no coloured background represent relative changes which are not defined / infinite.

Figure 16

Figure D2. Heatmap of the volumetric flow rate error for different training dataset sizes. The upper half describes $|\delta Q |$, the lower half gives a one-to-one comparison with the RSA. Compared are the results for different subsets of the test dataset. Note that only for the left column do the written value and the colour code match. Cells with no coloured background represent relative changes which are not defined / infinite.

Figure 17

Figure D3. Heatmap for specific training datasets, namely a dataset optimised for $\textrm {SE}$ ($\mathcal{T}_{{M_1}, \textrm {SE}}$), $\textrm {DE}$ ($\mathcal{T}_{{M_1}, \textrm {DE}}$), $\textrm {SE+DSE}$ ($\mathcal{T}_{{M_1}, \textrm {SE+DSE}}$) and 90 ($\mathcal{T}_{{M_1}, 90}$) and 9 random cases ($\mathcal{T}_{{M_1}, 9}$). The upper half describes the mean error of $Q$, the lower half gives a one-to-one comparison with the RSA. Compared are the results for different subsets of the test dataset. Note that only for the left column do the written value and the colour code match. Cells with no coloured background represent relative changes which are not defined / infinite.

Figure 18

Figure E1. Heatmap of the volumetric flow rate error for different noise levels. Note that only for the second column do the written value and the colour code match. Cells with no coloured background represent relative changes which are not defined / infinite.