{ "cells": [ { "cell_type": "markdown", "id": "be0fca1e", "metadata": {}, "source": [ "# Ultrasonic Meter Wet Gas Over-Reading Correction (Van Putten)\n", "\n", "An ultrasonic meter placed in wet gas reads too high, because the liquid occupies part of the pipe cross section. This example demonstrates the Van Putten over-reading correction, which converts the indicated gas volume flow into the actual gas volume flow.\n", "\n", "The correction is available in two variants, which differ only in how the critical gas Froude number is obtained:\n", "\n", "- from the water-liquid ratio, Equation (27)\n", "- from the gas Ohnesorge number, Equations (25)-(26)\n", "\n", "Reference: van Putten et al., *Ultrasonic Meters in Wet Gas Application*, North Sea Flow Measurement Workshop, 2015. [Paper](https://nfogm.no/wp-content/uploads/2019/02/2015-02-Ultrasonic-Meters-in-Wet-Gas-Application-van-Putten-DNV-GL.pdf)" ] }, { "cell_type": "markdown", "id": "84e6b23e", "metadata": {}, "source": [ "## Equations\n", "\n", "The gas void fraction determines the over-reading, Equations (29)-(30):\n", "\n", "$$\\chi(X)=\\frac{1}{1+X}-X^{0.76}+1.44X$$\n", "\n", "$$\\alpha_g=\\begin{cases}\\chi, & Fr_g" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "DR = 0.02 # Density ratio rho_gas/rho_liquid [-]\n", "Fr_crit = ultrasonic_flowmeters.critical_froude_from_WLR_VanPutten_2015(WLR=0.0)\n", "\n", "Fr_grid, X_grid = np.meshgrid(np.linspace(0.5, 5.0, 60), np.linspace(0.0, 0.35, 60), indexing='ij')\n", "OR_grid = np.zeros_like(Fr_grid)\n", "\n", "for i, j in np.ndindex(Fr_grid.shape):\n", " # The gas volume fraction must be consistent with X at the chosen density ratio\n", " GVF_ij = fluid_mechanics.lockhart_martinelli_to_GVF(X_grid[i, j], density_liquid=1.0, density_gas=DR)\n", " OR_grid[i, j] = 1 / ultrasonic_flowmeters.gas_void_fraction_VanPutten_2015(X_grid[i, j], Fr_grid[i, j], GVF_ij, Fr_crit)\n", "\n", "fig = plt.figure(figsize=(9, 7))\n", "ax = fig.add_subplot(111, projection='3d')\n", "ax.plot_surface(Fr_grid, X_grid, OR_grid, cmap='jet', rstride=2, cstride=2, linewidth=0.3, edgecolors='k', alpha=0.9)\n", "ax.set_xlabel('$Fr_g$ [-]', labelpad=12)\n", "ax.set_ylabel('$X_{LM}$ [-]', labelpad=12)\n", "ax.set_zlabel('OR [-]', labelpad=8)\n", "ax.set_xlim(0.5, 5.0)\n", "ax.set_ylim(0.0, 0.35)\n", "ax.set_zlim(0.9, 1.45)\n", "ax.set_yticks([0, 0.1, 0.2, 0.3])\n", "ax.set_zticks([0.9, 1.0, 1.1, 1.2, 1.3, 1.4])\n", "ax.view_init(elev=22, azim=-60)\n", "ax.set_title(f'USM wet gas over-reading, DR = {DR}, $Fr_g^*$ = {Fr_crit:.2f}')\n", "plt.show()" ] }, { "cell_type": "markdown", "id": "9c249bf1", "metadata": {}, "source": [ "## Case\n", "\n", "An ultrasonic meter reads 1000 m3/h of gas. The liquid loading is known from another source. The liquid is an oil-water mixture. Gas-liquid interfacial tension is estimated using a simplified linear rule, weighting the gas-oil and gas-water values by their liquid volume-flow fractions (1 - WLR and WLR). This is an approximation, not a general interfacial-property model." ] }, { "cell_type": "code", "execution_count": 3, "id": "2583331c", "metadata": { "execution": { "iopub.execute_input": "2026-09-22T07:41:53.156267Z", "iopub.status.busy": "2026-09-22T07:41:53.155993Z", "iopub.status.idle": "2026-09-22T07:41:53.162659Z", "shell.execute_reply": "2026-09-22T07:41:53.161513Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Liquid density: 915.0 kg/m3\n", "Estimated gas-liquid interfacial tension: 0.040 N/m\n" ] } ], "source": [ "D = 0.15 # Inner pipe diameter [m]\n", "rho_g = 20.0 # Gas density at line conditions [kg/m3]\n", "rho_oil = 800.0 # Oil density at line conditions [kg/m3]\n", "rho_water = 1030.0 # Water density at line conditions [kg/m3]\n", "WLR = 0.5 # Water volume flow / total liquid volume flow [-]\n", "GVF = 0.99 # Gas volume flow / total volume flow [-]\n", "VolFlow_gas_measured = 1000.0 # Indicated gas volume flow at line conditions [m3/h]\n", "mu_g = 1.2e-5 # Gas viscosity at line conditions [Pa.s]\n", "sigma_gas_oil = 0.025 # Gas-oil interfacial tension [N/m]\n", "sigma_gas_water = 0.055 # Gas-water interfacial tension [N/m]\n", "\n", "rho_l = fluid_mechanics.mixture_density_homogeneous([1 - WLR, WLR], [rho_oil, rho_water])\n", "# Estimate gas-liquid interfacial tension by liquid volume-flow weighting [N/m]\n", "sigma_gas_liquid_estimated = fluid_mechanics.gas_liquid_interfacial_tension_linear_mixing(\n", " WLR, sigma_gas_oil, sigma_gas_water\n", ")\n", "\n", "print(f'Liquid density: {rho_l:.1f} kg/m3')\n", "print(f'Estimated gas-liquid interfacial tension: {sigma_gas_liquid_estimated:.3f} N/m')" ] }, { "cell_type": "markdown", "id": "ff03c851", "metadata": {}, "source": [ "## Correction\n", "\n", "The critical Froude number is calculated both ways. The WLR variant is the default, while the Ohnesorge variant is passed in explicitly." ] }, { "cell_type": "code", "execution_count": 4, "id": "d503c551", "metadata": { "execution": { "iopub.execute_input": "2026-09-22T07:41:53.165010Z", "iopub.status.busy": "2026-09-22T07:41:53.164655Z", "iopub.status.idle": "2026-09-22T07:41:53.184808Z", "shell.execute_reply": "2026-09-22T07:41:53.182998Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Equation (27), WLREquation (26), Ohnesorge
LockhartMartinelli0.0683220.068322
DR0.0218580.021858
Fr_gas1.7781971.752071
Fr_gas_crit1.351.854292
alpha_gas0.9178190.904334
OverRead1.0895391.105786
VolFlow_gas_corrected917.819352904.334455
within_JIP_envelopeTrueTrue
\n", "
" ], "text/plain": [ " Equation (27), WLR Equation (26), Ohnesorge\n", "LockhartMartinelli 0.068322 0.068322\n", "DR 0.021858 0.021858\n", "Fr_gas 1.778197 1.752071\n", "Fr_gas_crit 1.35 1.854292\n", "alpha_gas 0.917819 0.904334\n", "OverRead 1.089539 1.105786\n", "VolFlow_gas_corrected 917.819352 904.334455\n", "within_JIP_envelope True True" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Fr_crit_Ohnesorge = ultrasonic_flowmeters.critical_froude_from_Ohnesorge_VanPutten_2015(rho_g, mu_g, sigma_gas_liquid_estimated, D)\n", "\n", "results = {\n", " 'Equation (27), WLR': ultrasonic_flowmeters.calculate_flow_wetgas_USM_VanPutten_2015(\n", " VolFlow_gas_measured=VolFlow_gas_measured, D=D, rho_g=rho_g, rho_l=rho_l,\n", " GVF=GVF, WLR=WLR, check_input=True),\n", " 'Equation (26), Ohnesorge': ultrasonic_flowmeters.calculate_flow_wetgas_USM_VanPutten_2015(\n", " VolFlow_gas_measured=VolFlow_gas_measured, D=D, rho_g=rho_g, rho_l=rho_l,\n", " GVF=GVF, Fr_gas_crit=Fr_crit_Ohnesorge, check_input=True),\n", "}\n", "\n", "keys = ['LockhartMartinelli', 'DR', 'Fr_gas', 'Fr_gas_crit', 'alpha_gas', 'OverRead',\n", " 'VolFlow_gas_corrected', 'within_JIP_envelope']\n", "pd.DataFrame({name: {key: result[key] for key in keys} for name, result in results.items()})" ] }, { "cell_type": "markdown", "id": "63778abc", "metadata": {}, "source": [ "The gas Froude number falls between the two critical values, so the WLR variant uses the dispersed branch while the Ohnesorge variant uses the stratified branch. The two therefore give different corrected flow rates.\n", "\n", "`within_JIP_envelope` only confirms that GVF, X, density ratio and gas Froude number are inside the ranges reported from the JIP tests. Meter type, pipe size, installation and fluids still require engineering assessment." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.14.7" } }, "nbformat": 4, "nbformat_minor": 5 }