In [1]:
Copied!
%load_ext autoreload
%autoreload 2
%load_ext autoreload
%autoreload 2
Switches¶
In [2]:
Copied!
from digirock import Switch, load_pvtw
from digirock.datasets import fetch_example_data
example_data = fetch_example_data()
pvtos = load_pvtw(example_data["COMPLEX_PVT.inc"])
sw = Switch("pvt", list(pvtos.values()), ["density", "velocity", "bulk_modulus"], name='PVT_Water')
from digirock import Switch, load_pvtw
from digirock.datasets import fetch_example_data
example_data = fetch_example_data()
pvtos = load_pvtw(example_data["COMPLEX_PVT.inc"])
sw = Switch("pvt", list(pvtos.values()), ["density", "velocity", "bulk_modulus"], name='PVT_Water')
In [3]:
Copied!
sw.all_keys()
sw.all_keys()
Out[3]:
['pvt', 'temp', 'pres']
In [4]:
Copied!
props = dict(temp=110, pres=50, pvt=[0, 7, 6])
print("Bulk Modulus in 3 PVT Zones (switches)\n", sw.bulk_modulus(props))
print("Density in 3 PVT Zones (switches)\n", sw.density(props))
print("Velocity in 3 PVT Zones (switches)\n", sw.velocity(props))
props = dict(temp=110, pres=50, pvt=[0, 7, 6])
print("Bulk Modulus in 3 PVT Zones (switches)\n", sw.bulk_modulus(props))
print("Density in 3 PVT Zones (switches)\n", sw.density(props))
print("Velocity in 3 PVT Zones (switches)\n", sw.velocity(props))
Bulk Modulus in 3 PVT Zones (switches) [3.3825713 3.3825713 3.38380363] Density in 3 PVT Zones (switches) [1.118596 1.118596 1.11900353] Velocity in 3 PVT Zones (switches) [1738.94901286 1738.94901286 1738.94901286]
In [ ]:
Copied!