## 4 Oil Film Layer Thickness Estimation
Experimentally measured values--oil film mean masses \(m_{e_{i}}\) in individual one-meter long sections \(i=1,2,\dots,6\)--were compared to theoretical values \(m_{i},i=1,2,\dots,6\) according to Equations (2) and (5), obtained from integrals (1). Figure 6 shows logarithms of the measured data with an asterisk marking for six segments of the one meter length, and the logarithms of theoretical masses \(m_{i}\) (5) calculated for a case of an exponential dependence of the thickness \(h(x)\) (3) on the distance \(x\). The respective parameters \(h_{0}\) and \(a\) are given in the legends. The bottom \"theoretical\" circles serve as the lower \"exponential\" bounds (with one exception of one measurement for 25 mm pipe, see Figure 6b) for the oil mass distribution. Figure 6: Lower and upper exponential bounds (marked by circles) in the logarithmic scale for (**a**) 15 mm, (**b**) 25 mm, and (**c**) 35 mm pipes. Furthermore, we were comparing various dependency types, for example those given in [16] and we finally decided to use a three-parametric dependency in the exponential form:  
\[h(x)=\mathrm{e}^{-p_{1}-p_{2}\cdot x-p_{3}\cdot x^{2}}, \tag{6}\]  
adding one new parameter \(p_{3}\) to the right side in the Equation (3). We calculated the integrals (1) using the Simpson's rule of numerical integration [18,19]. The calculation made use of another open-source program **Octave** (GNU Octave ver. 4.2.1, General Public License, Free Software Foundation) [20]. For our purpose, **Octave** is of equal usability as a commercial program **MATLAB** (The MathWorks, Inc., Natick, Massachusetts, USA) [21]. Functions and scripts used in one of these programs can be used in the other program practically change-free. Therefore, we recommend **Octave** to potential programmers. Initial parameter estimates were obtained using the Nelder-Mead Minimization Method [22, 23, 24]. The author of the function nelder_mead_min is [PERSON], inspired by the book [19]. Figures 7-9 compare the results of experimental data approximation using functions \(h(x)\) of the form (6) via minimization based on four different criteria. We minimized the functions of two vector deviations in various norms:  
1. \(\|\log m_{e}-\log m\|_{\infty}=\max\limits_{i=1,2,\ldots,6}|\log m_{e_{i}}- \log m_{i}|\);
2. \(\|m_{e}-m\|_{\infty}=\max\limits_{i=1,2,\ldots,6}|m_{e_{i}}-m_{i}|\);
3. \(\|\log m_{e}-\log m\|_{1}=\sum\limits_{i=1}^{6}|\log m_{e_{i}}-\log m_{i}|\);
4. \(\|m_{e}-m\|_{1}=\sum\limits_{i=1}^{6}|m_{e_{i}}-m_{i}|\). \[m(x)=\pi\varrho\int_{0}^{x}\left[r^{2}-(r-h(\xi))^{2}\right]\,d\xi=\pi\varrho \int_{0}^{x}h(\xi)\big{[}2r-h(\xi)\big{]}\,d\xi, \tag{1}\]0 (**a**) theoretical values of the logarithms \(m_{i}\) (asterisk * marks measured values) describing average values of 15-mm pipes; (**b**) deviations of theoretical logarithms of the values of \(m_{i}\) from logarithms of the values \(m_{e_{i}}\) obtained experimentally, \(i=1,\ldots,6\) for criteria 1–4. Figure 7 shows the minimization results for 15 mm pipes. Criteria 2 and 4 lead to excessively large underestimation of the measured masses, the results based on criterion 3 are applicable, but the theoretical value of the mass is higher in the third section. Therefore, we determined the appropriate parameters manually--the result is marked by number 5. Looking at the pictures in Figure 8, we can state that, out of the four possibilities mentioned, only the parameters obtained by application of the 4 th method meet the condition of the lower estimate mentioned above--the theoretical oil mass is greater than the measured mass only in the 2 nd section. We can expect that the minimum theoretical thickness, corresponding with the dependency (6) for parameter values given in the last line of the Table 4, provides the lower estimate of the actual minimum thickness of the oil film.