Calculation of fluid leakage in ball valves