When you are learning a technical subject that has numerous equations and relationships, such as petrophysics, it can sometimes be difficult to understand how all of the parameters tie together.
Back when I started out in petrophysics many years ago, I used Excel to explore some common equations, such as the Archie Water Saturation equation. It was a great way to understand the impact of each of the parameters on the calculated result.
Within this article we will explore, with Python, three different ways that we can learn and understand the impacts of different parameters on an equation. The example equation used is the Archie Water Saturation (Sw) equation, which is used to calculate the amount of pore volume within a rock that is filled with water. This can then be used to infer how much hydrocarbon is present in the rock.
If you are not familiar with petrophysics, then the same workflow and examples can be applied to any equation of your choice. You may need to adjust the final example to show the data you want to see.
The simplest way to explore an equation is to create a function with the calculations. This function will accept a number of parameters, each of which is assigned a default value.
By providing default values for the parameters it allows us to call upon the parameters we want to change rather than entering them each time. For example, if we want to change the rt parameter, we would call upon the function like so: archie_sw(rt=100)
def archie_sw(a=1, phi=0.15, m=2, rw=0.2, rt=200, n=2):
Sw = ((a / phi**m) * (rw / rt))**(1/n)
return Sw
However, to begin with, if we call the function and provide no parameters, then the default values will be used.
archie_sw()
And this will return an Sw of:
0.21081851067789195
If we change some of the parameters, such as the tortuosity (a) and porosity (phi )…