rock-physics-open 0.1.2__py3-none-any.whl → 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rock-physics-open might be problematic. Click here for more details.
- rock_physics_open/equinor_utilities/snapshot_test_utilities/compare_snapshots.py +5 -4
- rock_physics_open/equinor_utilities/snapshot_test_utilities/snapshots.py +17 -9
- rock_physics_open/fluid_models/oil_model/oil_properties.py +13 -11
- rock_physics_open/span_wagner/co2_properties.py +11 -5
- rock_physics_open/version.py +2 -2
- {rock_physics_open-0.1.2.dist-info → rock_physics_open-0.2.0.dist-info}/METADATA +8 -6
- {rock_physics_open-0.1.2.dist-info → rock_physics_open-0.2.0.dist-info}/RECORD +10 -10
- {rock_physics_open-0.1.2.dist-info → rock_physics_open-0.2.0.dist-info}/WHEEL +1 -1
- {rock_physics_open-0.1.2.dist-info → rock_physics_open-0.2.0.dist-info}/licenses/LICENSE +0 -0
- {rock_physics_open-0.1.2.dist-info → rock_physics_open-0.2.0.dist-info}/top_level.txt +0 -0
|
@@ -11,18 +11,19 @@ from rock_physics_open.equinor_utilities.various_utilities import disp_result_st
|
|
|
11
11
|
|
|
12
12
|
from .snapshots import get_snapshot_name
|
|
13
13
|
|
|
14
|
-
DISPLAY_RESULTS = False
|
|
15
|
-
|
|
16
14
|
|
|
17
15
|
def compare_snapshots(
|
|
18
16
|
test_results: Union[np.ndarray, tuple, DataFrame],
|
|
19
17
|
saved_results: tuple,
|
|
18
|
+
name_arr=None,
|
|
19
|
+
display_results: bool = False,
|
|
20
20
|
) -> bool:
|
|
21
21
|
test_results = _validate_input(test_results, saved_results)
|
|
22
22
|
|
|
23
|
-
if
|
|
23
|
+
if display_results:
|
|
24
24
|
title = str(inspect.stack()[1].function)
|
|
25
|
-
|
|
25
|
+
if not name_arr:
|
|
26
|
+
name_arr = [f"arr_{i}" for i in range(len(test_results))]
|
|
26
27
|
disp_result_stats(title, test_results, name_arr)
|
|
27
28
|
|
|
28
29
|
r_tol = 0.01
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import inspect
|
|
2
|
-
import os
|
|
3
2
|
from pathlib import Path
|
|
4
3
|
|
|
5
4
|
import numpy as np
|
|
@@ -9,7 +8,6 @@ INITIATE = False
|
|
|
9
8
|
|
|
10
9
|
def get_snapshot_name(step: int = 1, include_snapshot_dir=True) -> str:
|
|
11
10
|
"""
|
|
12
|
-
|
|
13
11
|
Parameters
|
|
14
12
|
----------
|
|
15
13
|
step: number of steps in the trace to collect information from
|
|
@@ -18,15 +16,25 @@ def get_snapshot_name(step: int = 1, include_snapshot_dir=True) -> str:
|
|
|
18
16
|
Returns
|
|
19
17
|
-------
|
|
20
18
|
name of snapshot file
|
|
21
|
-
|
|
22
19
|
"""
|
|
23
|
-
# Get filename and function name of calling function
|
|
24
20
|
trace = inspect.stack()
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
for frame in trace[step:]:
|
|
22
|
+
if not any(
|
|
23
|
+
keyword in frame.filename
|
|
24
|
+
for keyword in [
|
|
25
|
+
"pydev",
|
|
26
|
+
"ipython-input",
|
|
27
|
+
"interactiveshell",
|
|
28
|
+
"async_helpers",
|
|
29
|
+
]
|
|
30
|
+
):
|
|
31
|
+
break
|
|
32
|
+
else:
|
|
33
|
+
frame = trace[step]
|
|
34
|
+
|
|
35
|
+
dir_name = Path(frame.filename).parent / "snapshots"
|
|
36
|
+
file_name = f"{Path(frame.filename).stem}_{frame.function}.npz"
|
|
37
|
+
return str(dir_name / file_name) if include_snapshot_dir else file_name
|
|
30
38
|
|
|
31
39
|
|
|
32
40
|
def store_snapshot(snapshot_name: str, *args: np.ndarray) -> bool:
|
|
@@ -10,19 +10,19 @@ from .oil_bubble_point import bp_standing
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def oil_properties(
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
temperature: np.ndarray | float,
|
|
14
|
+
pressure: np.ndarray | float,
|
|
15
15
|
rho0: np.ndarray | float,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
gas_oil_ratio: np.ndarray | float,
|
|
17
|
+
gas_gravity: np.ndarray | float,
|
|
18
18
|
) -> np.ndarray | float:
|
|
19
19
|
"""
|
|
20
|
-
:param
|
|
21
|
-
:param
|
|
20
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
21
|
+
:param pressure: Pressure (Pa) of oil
|
|
22
22
|
:param rho0: Density of the oil without dissolved gas at 15.6 degrees Celsius and
|
|
23
23
|
atmospheric pressure. (kg/m^3)
|
|
24
|
-
:param
|
|
25
|
-
:param
|
|
24
|
+
:param gas_oil_ratio: The volume ratio of gas to oil [l/l]
|
|
25
|
+
:param gas_gravity: Gas Gravity, molar mass of gas relative to air molar mas.
|
|
26
26
|
:return: vel_oil, den_oil, k_oil
|
|
27
27
|
"""
|
|
28
28
|
# Since live_oil with gas_oil_ratio=0.0 is not equal to dead oil
|
|
@@ -41,9 +41,11 @@ def oil_properties(
|
|
|
41
41
|
window = np.clip((np.abs(x) - length / 2) / (length / 2), 0, 1)
|
|
42
42
|
return 1 - window
|
|
43
43
|
|
|
44
|
-
loil_den, loil_vel = live_oil(
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
loil_den, loil_vel = live_oil(
|
|
45
|
+
temperature, pressure, rho0, gas_oil_ratio, gas_gravity
|
|
46
|
+
)
|
|
47
|
+
doil_den, doil_vel = dead_oil(temperature, pressure, rho0)
|
|
48
|
+
window = triangular_window(gas_oil_ratio)
|
|
47
49
|
den_oil = doil_den * window + (1 - window) * loil_den
|
|
48
50
|
vel_oil = doil_vel * window + (1 - window) * loil_vel
|
|
49
51
|
k_oil = vel_oil**2 * den_oil
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
|
|
1
3
|
import numpy as np
|
|
2
|
-
import pkg_resources
|
|
3
4
|
import scipy.optimize
|
|
4
5
|
from scipy.interpolate import RegularGridInterpolator
|
|
5
6
|
|
|
@@ -420,11 +421,16 @@ def carbon_dioxide_density(absolute_temperature, pressure, interpolate=False, **
|
|
|
420
421
|
absolute_temperature, pressure, **kwargs
|
|
421
422
|
)
|
|
422
423
|
assert interpolate is True
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
|
|
425
|
+
ref = (
|
|
426
|
+
importlib.resources.files(
|
|
427
|
+
"rock_physics.fluid_models.gas_model.span_wagner.tables"
|
|
428
|
+
)
|
|
429
|
+
/ "carbon_dioxide_density.npz"
|
|
426
430
|
)
|
|
427
|
-
|
|
431
|
+
with importlib.resources.as_file(ref) as fp:
|
|
432
|
+
interpolator = load_lookup_table_interpolator(fp)
|
|
433
|
+
|
|
428
434
|
return interpolator(absolute_temperature, pressure)
|
|
429
435
|
|
|
430
436
|
|
rock_physics_open/version.py
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rock_physics_open
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Equinor Rock Physics Module
|
|
5
5
|
Author-email: Harald Flesche <hfle@equinor.com>, Eivind Jahren <ejah@equinor.com>, Jimmy Zurcher <jiz@equinor.com>
|
|
6
6
|
Maintainer-email: Harald Flesche <hfle@equinor.com>, Eirik Ola Aksnes <eoaksnes@equinor.com>, Christopher Collin Løkken <chcl@equinor.com>, Sivert Utne <sutn@equinor.com>
|
|
7
7
|
Project-URL: Repository, https://github.com/equinor/rock-physics-open
|
|
8
8
|
Project-URL: Homepage, https://github.com/equinor/rock-physics-open
|
|
9
|
+
Project-URL: Changelog, https://github.com/equinor/rock-physics-open/blob/main/CHANGELOG.md
|
|
9
10
|
Keywords: energy,subsurface,seismic,rock physics,scientific,engineering
|
|
10
11
|
Classifier: Intended Audience :: Science/Research
|
|
11
12
|
Classifier: Topic :: Scientific/Engineering
|
|
@@ -14,6 +15,7 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
14
15
|
Classifier: Topic :: Utilities
|
|
15
16
|
Classifier: Operating System :: POSIX :: Linux
|
|
16
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
19
|
Classifier: Natural Language :: English
|
|
18
20
|
Requires-Python: >=3.11
|
|
19
21
|
Description-Content-Type: text/markdown
|
|
@@ -34,7 +36,7 @@ Dynamic: license-file
|
|
|
34
36
|
|
|
35
37
|
<div align="center">
|
|
36
38
|
|
|
37
|
-
#
|
|
39
|
+
# rock-physics-open
|
|
38
40
|
|
|
39
41
|
[![License: LGPL v3][license-badge]][license]
|
|
40
42
|
[![SCM Compliance][scm-compliance-badge]][scm-compliance]
|
|
@@ -67,10 +69,10 @@ definition of equations and other utilities.
|
|
|
67
69
|
|
|
68
70
|
## Installation
|
|
69
71
|
|
|
70
|
-
This module can be installed through
|
|
72
|
+
This module can be installed through [PyPI](https://pypi.org/project/rock-physics-open/) with:
|
|
71
73
|
|
|
72
74
|
```sh
|
|
73
|
-
pip install
|
|
75
|
+
pip install rock-physics-open
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
Alternatively, you can update the dependencies in your `pyproject.toml` file:
|
|
@@ -78,14 +80,14 @@ Alternatively, you can update the dependencies in your `pyproject.toml` file:
|
|
|
78
80
|
<!-- x-release-please-start-version -->
|
|
79
81
|
```toml
|
|
80
82
|
dependencies = [
|
|
81
|
-
"
|
|
83
|
+
"rock-physics-open == 0.2.0",
|
|
82
84
|
]
|
|
83
85
|
```
|
|
84
86
|
<!-- x-release-please-end-version -->
|
|
85
87
|
|
|
86
88
|
<!-- External Links -->
|
|
87
89
|
[scm-compliance]: https://developer.equinor.com/governance/scm-policy/
|
|
88
|
-
[scm-compliance-badge]: https://scm-compliance-api.radix.equinor.com/repos/equinor/
|
|
90
|
+
[scm-compliance-badge]: https://scm-compliance-api.radix.equinor.com/repos/equinor/rock-physics-open/badge
|
|
89
91
|
[license]: https://www.gnu.org/licenses/lgpl-3.0
|
|
90
92
|
[license-badge]: https://img.shields.io/badge/License-LGPL_v3-blue.svg
|
|
91
93
|
[on-push-main-action]: https://github.com/equinor/rock-physics-open/actions/workflows/on-push-main.yaml
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
rock_physics_open/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
rock_physics_open/version.py,sha256=
|
|
2
|
+
rock_physics_open/version.py,sha256=iB5DfB5V6YB5Wo4JmvS-txT42QtmGaWcWp3udRT7zCI,511
|
|
3
3
|
rock_physics_open/equinor_utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
rock_physics_open/equinor_utilities/anisotropy.py,sha256=toEsuIW_gHr34gZQpam3sQTl0ap6nAq1pW5hcX9GOHI,4469
|
|
5
5
|
rock_physics_open/equinor_utilities/conversions.py,sha256=d6SGPbzYsmYBvhDqnohg1lPjAeYGOc0z_vdsuFeNlb4,194
|
|
@@ -23,8 +23,8 @@ rock_physics_open/equinor_utilities/machine_learning_utilities/import_ml_models.
|
|
|
23
23
|
rock_physics_open/equinor_utilities/machine_learning_utilities/run_regression.py,sha256=L0bCEsMCvcOn6Ji9oDLztY-TaEEYvp1b7bYZQSJ_-II,4799
|
|
24
24
|
rock_physics_open/equinor_utilities/machine_learning_utilities/sigmoidal_model.py,sha256=XczrkhwSF1bAO0XcYMirbj0ilLyZG6RgT7cX2owPufw,6001
|
|
25
25
|
rock_physics_open/equinor_utilities/snapshot_test_utilities/__init__.py,sha256=lcbI80ZH6JQS0jI-eUITFBafHVRdhQ5VwttPolHnJyI,255
|
|
26
|
-
rock_physics_open/equinor_utilities/snapshot_test_utilities/compare_snapshots.py,sha256
|
|
27
|
-
rock_physics_open/equinor_utilities/snapshot_test_utilities/snapshots.py,sha256=
|
|
26
|
+
rock_physics_open/equinor_utilities/snapshot_test_utilities/compare_snapshots.py,sha256=DBF9SNrC7H2V_zTNjmWK-Nz5b0uqNdx5Nktt858VJak,5457
|
|
27
|
+
rock_physics_open/equinor_utilities/snapshot_test_utilities/snapshots.py,sha256=fiFqqKh7iTHMoo2rjl41KovbOm2_B2rw_QLWhI9XIBU,1731
|
|
28
28
|
rock_physics_open/equinor_utilities/std_functions/__init__.py,sha256=MLOfMxRazS9tGOVvuLkUp-E4b6jRWOP4YCLf8si624c,1121
|
|
29
29
|
rock_physics_open/equinor_utilities/std_functions/backus_ave.py,sha256=sYaXSfqjR69U_UFaMmrD5aEbR_0FrL7ZIWGg-Yi8QNo,1607
|
|
30
30
|
rock_physics_open/equinor_utilities/std_functions/dvorkin_nur.py,sha256=TerlLcuP92ihf5vHaJES5KLyleG3CR7NWSExDI1jLIY,2138
|
|
@@ -61,7 +61,7 @@ rock_physics_open/fluid_models/oil_model/dead_oil_velocity.py,sha256=jA-XxbxsBzs
|
|
|
61
61
|
rock_physics_open/fluid_models/oil_model/live_oil_density.py,sha256=oURrY4YM28RoC6I513xWiWIUi6hWSNIFgdb5D01kjwE,2775
|
|
62
62
|
rock_physics_open/fluid_models/oil_model/live_oil_velocity.py,sha256=pPAZm24CPTJQYF9CK69t7UWkWI2JjGksR9XKccUPhbI,937
|
|
63
63
|
rock_physics_open/fluid_models/oil_model/oil_bubble_point.py,sha256=hWxxJtYZFK8_mVuKTYGipLmkT6DJobz6SVm53fa_rSc,2605
|
|
64
|
-
rock_physics_open/fluid_models/oil_model/oil_properties.py,sha256=
|
|
64
|
+
rock_physics_open/fluid_models/oil_model/oil_properties.py,sha256=U8CbgrnwYT9c3lSw9yILwm8_Mau7sKpFM1BLc3zlIOw,4242
|
|
65
65
|
rock_physics_open/sandstone_models/__init__.py,sha256=KC_b_SMFzIeTVXZy1IDFVSa0jC5sHlONJjun5R12H6A,1955
|
|
66
66
|
rock_physics_open/sandstone_models/cemented_shalysand_sandyshale_models.py,sha256=jXEuEOMOmiAukYlDgV3-vd2tiZWW8Dm59PaeP-XXh8Y,8516
|
|
67
67
|
rock_physics_open/sandstone_models/constant_cement_models.py,sha256=kHRcPEC114uolMZvvPxzvHJhF9wdSuuDKNS0mNFrqtI,7223
|
|
@@ -86,7 +86,7 @@ rock_physics_open/shale_models/sca.py,sha256=eSzPBFQnm6SoL8f5UACs_PSlCgXU3QgwK69
|
|
|
86
86
|
rock_physics_open/shale_models/shale4_mineral.py,sha256=aJ2KIWR3EUtjDjJ-mBYQACVv6QQg_73HFW9FNwicwsc,3862
|
|
87
87
|
rock_physics_open/shale_models/shale4_mineral_dem_overlay.py,sha256=ty8yKoUVuBKeLT17gdS1BHBV1EJCQIpl-b5JG2fF4I8,2660
|
|
88
88
|
rock_physics_open/span_wagner/__init__.py,sha256=cnvKCSmO0_KkEhbbV3BoDsV-NhlGLnDpBwErI8TPKuQ,80
|
|
89
|
-
rock_physics_open/span_wagner/co2_properties.py,sha256=
|
|
89
|
+
rock_physics_open/span_wagner/co2_properties.py,sha256=7w-VZjR6vUOxX-NWTpLhoXH4fiUCNXd8-HBTrg-nm4w,16358
|
|
90
90
|
rock_physics_open/span_wagner/coefficients.py,sha256=dGSW58MWnx064LaW0RwIaSDjP1aqV_5Bs9pk9Aaz9j0,3878
|
|
91
91
|
rock_physics_open/span_wagner/equations.py,sha256=wE99XBrx70NqgxS1qdyGlKTusGihWrtdv3KlpifCz_c,3001
|
|
92
92
|
rock_physics_open/span_wagner/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -135,8 +135,8 @@ rock_physics_open/ternary_plots/shale_prop_ternary.py,sha256=5-NB4LoXRP7JPQYaJBZ
|
|
|
135
135
|
rock_physics_open/ternary_plots/ternary_patches.py,sha256=oYaIkCbzC4L19VWBz5iphVdQnpHX9kdy0p2NK65aIIM,7256
|
|
136
136
|
rock_physics_open/ternary_plots/ternary_plot_utilities.py,sha256=weFDWyzd7wgr3xB63Q-xtT-KoJA6FNIDWuTkA7jr94Q,5669
|
|
137
137
|
rock_physics_open/ternary_plots/unconventionals_ternary.py,sha256=KWjcBrjI8Tgr2FYpz1ey-DPuhUeSC7b5mpN8OzwNa4I,1823
|
|
138
|
-
rock_physics_open-0.
|
|
139
|
-
rock_physics_open-0.
|
|
140
|
-
rock_physics_open-0.
|
|
141
|
-
rock_physics_open-0.
|
|
142
|
-
rock_physics_open-0.
|
|
138
|
+
rock_physics_open-0.2.0.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
139
|
+
rock_physics_open-0.2.0.dist-info/METADATA,sha256=swSAgEPAbnAGWi5i3eQ3nQDEc4T0AfPDD_2lMoIS5Ug,4077
|
|
140
|
+
rock_physics_open-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
141
|
+
rock_physics_open-0.2.0.dist-info/top_level.txt,sha256=zFBbfbv2pshFJvcvcLLigDmlJjjg08iDdb6ABgncaP8,18
|
|
142
|
+
rock_physics_open-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|