Introduction I have always been captivated by calculations performed at depth in wells. The numerous correlations and curves that were built in the golden years of production engineering are just fascinating. Thank you Mr. Brown. Thank you Mr. Beggs. From all the various algorithms, I particularly liked one calculating the pressure losses in the tubing as the hydrocarbon fluids ascend to the surface, also called tubing performance, or vertical lift performance (VLP).
Somebody asked me earlier if I know of libraries for Production Engineering written in Python. Meaning, open source code for production engineering, production optimization, artificial lift, or gas lift, specifically.
Unfortunately, to my knowledge, there are not open source Python libraries for Production Engineering. Most of the applications or software for optimization and nodal analysis are proprietary requiring fees and and licenses. From that side, the curious petroleum engineer would have to code everything, practically, from scratch.
It is fun coding petroleum engineering applications with R, a language invented by statisticians. The plotting capabilities of R are unparalleled. You can generate a complex plot in minutes. Couple of days ago I was in need of a log-log plot to show the error versus the step size in an ordinary differential equation (ODE) solver that in a Cartesian plot smaller numbers would make them imperceptible. With the package ggplot2, I was able to obtain a wonderful graph.
Introduction I just released last night a new version of zFactor: v0.1.7. As of this morning, the package has been accepted by CRAN, the Comprehensive R Network Archive. All the code, notes, datasets, notebooks, documentation is publicly available via GitHub at this link.
The zFactor R package also includes its own website: https://f0nzie.github.io/zFactor/
Motivation That is one of the neat things about R: the code and documentation that you write for your package can also be used for automatically generating a website in GitHub.
If you have already installed R and RStudio in your Windows PC or your Linux laptop or your Mac Book, then you need to think about including FORTRAN subroutines in your R toolbox.
There are plenty of excellent math libraries built with old friend FORTRAN that greatly deserve to be part of our engineering library, either, to improve performance, or just avoid retyping (convert) of the whole routine in R.