rock-physics-open 0.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/__init__.py +0 -0
- rock_physics_open/equinor_utilities/__init__.py +0 -0
- rock_physics_open/equinor_utilities/anisotropy.py +162 -0
- rock_physics_open/equinor_utilities/classification_functions/__init__.py +17 -0
- rock_physics_open/equinor_utilities/classification_functions/class_stats.py +58 -0
- rock_physics_open/equinor_utilities/classification_functions/lin_class.py +47 -0
- rock_physics_open/equinor_utilities/classification_functions/mahal_class.py +56 -0
- rock_physics_open/equinor_utilities/classification_functions/norm_class.py +65 -0
- rock_physics_open/equinor_utilities/classification_functions/poly_class.py +40 -0
- rock_physics_open/equinor_utilities/classification_functions/post_prob.py +26 -0
- rock_physics_open/equinor_utilities/classification_functions/two_step_classification.py +46 -0
- rock_physics_open/equinor_utilities/conversions.py +10 -0
- rock_physics_open/equinor_utilities/gen_utilities/__init__.py +11 -0
- rock_physics_open/equinor_utilities/gen_utilities/dict_to_float.py +33 -0
- rock_physics_open/equinor_utilities/gen_utilities/dim_check_vector.py +83 -0
- rock_physics_open/equinor_utilities/gen_utilities/filter_input.py +126 -0
- rock_physics_open/equinor_utilities/gen_utilities/filter_output.py +78 -0
- rock_physics_open/equinor_utilities/machine_learning_utilities/__init__.py +14 -0
- rock_physics_open/equinor_utilities/machine_learning_utilities/dummy_vars.py +42 -0
- rock_physics_open/equinor_utilities/machine_learning_utilities/exponential_model.py +119 -0
- rock_physics_open/equinor_utilities/machine_learning_utilities/import_ml_models.py +61 -0
- rock_physics_open/equinor_utilities/machine_learning_utilities/run_regression.py +151 -0
- rock_physics_open/equinor_utilities/machine_learning_utilities/sigmoidal_model.py +188 -0
- rock_physics_open/equinor_utilities/snapshot_test_utilities/__init__.py +10 -0
- rock_physics_open/equinor_utilities/snapshot_test_utilities/compare_snapshots.py +145 -0
- rock_physics_open/equinor_utilities/snapshot_test_utilities/snapshots.py +54 -0
- rock_physics_open/equinor_utilities/std_functions/__init__.py +43 -0
- rock_physics_open/equinor_utilities/std_functions/backus_ave.py +53 -0
- rock_physics_open/equinor_utilities/std_functions/dvorkin_nur.py +69 -0
- rock_physics_open/equinor_utilities/std_functions/gassmann.py +140 -0
- rock_physics_open/equinor_utilities/std_functions/hashin_shtrikman.py +195 -0
- rock_physics_open/equinor_utilities/std_functions/hertz_mindlin.py +43 -0
- rock_physics_open/equinor_utilities/std_functions/moduli_velocity.py +51 -0
- rock_physics_open/equinor_utilities/std_functions/reflection_eq.py +98 -0
- rock_physics_open/equinor_utilities/std_functions/rho.py +59 -0
- rock_physics_open/equinor_utilities/std_functions/voigt_reuss_hill.py +128 -0
- rock_physics_open/equinor_utilities/std_functions/walton.py +38 -0
- rock_physics_open/equinor_utilities/std_functions/wood_brie.py +77 -0
- rock_physics_open/equinor_utilities/various_utilities/Equinor_logo.gif +0 -0
- rock_physics_open/equinor_utilities/various_utilities/Equinor_logo.ico +0 -0
- rock_physics_open/equinor_utilities/various_utilities/__init__.py +24 -0
- rock_physics_open/equinor_utilities/various_utilities/display_result_statistics.py +83 -0
- rock_physics_open/equinor_utilities/various_utilities/gassmann_dry_mod.py +37 -0
- rock_physics_open/equinor_utilities/various_utilities/gassmann_mod.py +37 -0
- rock_physics_open/equinor_utilities/various_utilities/gassmann_sub_mod.py +53 -0
- rock_physics_open/equinor_utilities/various_utilities/hs_average.py +40 -0
- rock_physics_open/equinor_utilities/various_utilities/pressure.py +88 -0
- rock_physics_open/equinor_utilities/various_utilities/reflectivity.py +85 -0
- rock_physics_open/equinor_utilities/various_utilities/timeshift.py +91 -0
- rock_physics_open/equinor_utilities/various_utilities/vp_vs_rho_set_statistics.py +154 -0
- rock_physics_open/equinor_utilities/various_utilities/vrh_3_min.py +61 -0
- rock_physics_open/fluid_models/__init__.py +9 -0
- rock_physics_open/fluid_models/brine_model/__init__.py +5 -0
- rock_physics_open/fluid_models/brine_model/brine_properties.py +143 -0
- rock_physics_open/fluid_models/gas_model/__init__.py +5 -0
- rock_physics_open/fluid_models/gas_model/gas_properties.py +277 -0
- rock_physics_open/fluid_models/oil_model/__init__.py +5 -0
- rock_physics_open/fluid_models/oil_model/dead_oil_density.py +60 -0
- rock_physics_open/fluid_models/oil_model/dead_oil_velocity.py +28 -0
- rock_physics_open/fluid_models/oil_model/live_oil_density.py +79 -0
- rock_physics_open/fluid_models/oil_model/live_oil_velocity.py +24 -0
- rock_physics_open/fluid_models/oil_model/oil_bubble_point.py +69 -0
- rock_physics_open/fluid_models/oil_model/oil_properties.py +114 -0
- rock_physics_open/sandstone_models/__init__.py +57 -0
- rock_physics_open/sandstone_models/cemented_shalysand_sandyshale_models.py +304 -0
- rock_physics_open/sandstone_models/constant_cement_models.py +204 -0
- rock_physics_open/sandstone_models/constant_cement_optimisation.py +122 -0
- rock_physics_open/sandstone_models/contact_cement_model.py +138 -0
- rock_physics_open/sandstone_models/curvefit_sandstone_models.py +143 -0
- rock_physics_open/sandstone_models/friable_models.py +178 -0
- rock_physics_open/sandstone_models/friable_optimisation.py +112 -0
- rock_physics_open/sandstone_models/friable_shalysand_sandyshale_models.py +235 -0
- rock_physics_open/sandstone_models/patchy_cement_fluid_substitution_model.py +477 -0
- rock_physics_open/sandstone_models/patchy_cement_model.py +286 -0
- rock_physics_open/sandstone_models/patchy_cement_optimisation.py +251 -0
- rock_physics_open/sandstone_models/unresolved_cemented_sandshale_models.py +134 -0
- rock_physics_open/sandstone_models/unresolved_friable_sandshale_models.py +126 -0
- rock_physics_open/shale_models/__init__.py +19 -0
- rock_physics_open/shale_models/dem.py +174 -0
- rock_physics_open/shale_models/dem_dual_por.py +61 -0
- rock_physics_open/shale_models/kus_tok.py +59 -0
- rock_physics_open/shale_models/multi_sca.py +133 -0
- rock_physics_open/shale_models/pq.py +102 -0
- rock_physics_open/shale_models/sca.py +90 -0
- rock_physics_open/shale_models/shale4_mineral.py +147 -0
- rock_physics_open/shale_models/shale4_mineral_dem_overlay.py +92 -0
- rock_physics_open/span_wagner/__init__.py +5 -0
- rock_physics_open/span_wagner/co2_properties.py +438 -0
- rock_physics_open/span_wagner/coefficients.py +165 -0
- rock_physics_open/span_wagner/equations.py +104 -0
- rock_physics_open/span_wagner/tables/__init__.py +0 -0
- rock_physics_open/span_wagner/tables/carbon_dioxide_density.npz +0 -0
- rock_physics_open/span_wagner/tables/lookup_table.py +33 -0
- rock_physics_open/t_matrix_models/Equinor_logo.ico +0 -0
- rock_physics_open/t_matrix_models/__init__.py +45 -0
- rock_physics_open/t_matrix_models/carbonate_pressure_substitution.py +124 -0
- rock_physics_open/t_matrix_models/curvefit_t_matrix_exp.py +124 -0
- rock_physics_open/t_matrix_models/curvefit_t_matrix_min.py +86 -0
- rock_physics_open/t_matrix_models/opt_subst_utilities.py +415 -0
- rock_physics_open/t_matrix_models/parse_t_matrix_inputs.py +297 -0
- rock_physics_open/t_matrix_models/run_t_matrix.py +243 -0
- rock_physics_open/t_matrix_models/t_matrix_C.py +210 -0
- rock_physics_open/t_matrix_models/t_matrix_opt_fluid_sub_exp.py +137 -0
- rock_physics_open/t_matrix_models/t_matrix_opt_fluid_sub_petec.py +163 -0
- rock_physics_open/t_matrix_models/t_matrix_opt_forward_model_exp.py +72 -0
- rock_physics_open/t_matrix_models/t_matrix_opt_forward_model_min.py +86 -0
- rock_physics_open/t_matrix_models/t_matrix_parameter_optimisation_exp.py +172 -0
- rock_physics_open/t_matrix_models/t_matrix_parameter_optimisation_min.py +159 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/__init__.py +12 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/array_functions.py +75 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_c_eff.py +163 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_isolated.py +95 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_kd.py +40 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_kd_eff.py +116 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_kd_uuv.py +18 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_pressure.py +140 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_t.py +71 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_td.py +42 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_theta.py +43 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_x.py +33 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/calc_z.py +50 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/check_and_tile.py +43 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/g_tensor.py +140 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/iso_av.py +60 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/iso_ave_all.py +55 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/pressure_input.py +44 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/t_matrix_vec.py +278 -0
- rock_physics_open/t_matrix_models/t_matrix_vector/velocity_vti_angles.py +81 -0
- rock_physics_open/t_matrix_models/tmatrix_python.dll +0 -0
- rock_physics_open/t_matrix_models/tmatrix_python.so +0 -0
- rock_physics_open/ternary_plots/__init__.py +3 -0
- rock_physics_open/ternary_plots/gen_ternary_plot.py +73 -0
- rock_physics_open/ternary_plots/shale_prop_ternary.py +337 -0
- rock_physics_open/ternary_plots/ternary_patches.py +277 -0
- rock_physics_open/ternary_plots/ternary_plot_utilities.py +197 -0
- rock_physics_open/ternary_plots/unconventionals_ternary.py +75 -0
- rock_physics_open/version.py +21 -0
- rock_physics_open-0.0.dist-info/METADATA +92 -0
- rock_physics_open-0.0.dist-info/RECORD +142 -0
- rock_physics_open-0.0.dist-info/WHEEL +5 -0
- rock_physics_open-0.0.dist-info/licenses/LICENSE +165 -0
- rock_physics_open-0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def pressure_adjusted_dead_oil_density(
|
|
5
|
+
pressure: np.ndarray | float,
|
|
6
|
+
reference_density: np.ndarray | float,
|
|
7
|
+
) -> np.ndarray | float:
|
|
8
|
+
"""
|
|
9
|
+
Adjusts density of a dead oil (without dissolved gas) to a given pressure.
|
|
10
|
+
|
|
11
|
+
Uses equation 18 from Batzle & Wang [1].
|
|
12
|
+
|
|
13
|
+
:param reference_density: The density (g/cc) of the dead oil at 15.6 degrees Celsius
|
|
14
|
+
and atmospheric pressure.
|
|
15
|
+
:param pressure: Pressure (MPa) to adjust to.
|
|
16
|
+
:return: Density of oil at given pressure and 21 degrees Celsius (~70 degrees
|
|
17
|
+
Farenheit).
|
|
18
|
+
"""
|
|
19
|
+
return (
|
|
20
|
+
reference_density
|
|
21
|
+
+ (0.00277 * pressure - 1.71 * 10**-7 * pressure**3)
|
|
22
|
+
* (reference_density - 1.15) ** 2
|
|
23
|
+
+ 3.49 * 10**-4 * pressure
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def temperature_adjusted_dead_oil_density(
|
|
28
|
+
temperature: np.ndarray | float,
|
|
29
|
+
density_at_21c: np.ndarray,
|
|
30
|
+
) -> np.ndarray | float:
|
|
31
|
+
"""
|
|
32
|
+
Adjusts density of a dead oil (without dissolved gas) to a given temperature.
|
|
33
|
+
|
|
34
|
+
Uses equation 19 from Batzle & Wang [1].
|
|
35
|
+
|
|
36
|
+
:param density_at_21c: The density (g/cc) of the dead oil at 21 degrees Celsius
|
|
37
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
38
|
+
:return: Density of oil at given temperature.
|
|
39
|
+
"""
|
|
40
|
+
return density_at_21c / (0.972 + 3.81 * (10**-4) * (temperature + 17.78) ** 1.175)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def dead_oil_density(
|
|
44
|
+
temperature: np.ndarray | float,
|
|
45
|
+
pressure: np.ndarray | float,
|
|
46
|
+
reference_density: np.ndarray | float,
|
|
47
|
+
) -> np.ndarray | float:
|
|
48
|
+
"""
|
|
49
|
+
The density of oil without dissolved gas (dead).
|
|
50
|
+
|
|
51
|
+
Uses equation 18 & 19 from Batzle & Wang [1].
|
|
52
|
+
|
|
53
|
+
:param reference_density: Density of oil at 15.6 degrees Celsius and atmospheric
|
|
54
|
+
pressure. (g/cc)
|
|
55
|
+
:param pressure: Pressure (MPa) of oil
|
|
56
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
57
|
+
:return: density of dead oil at given conditions.
|
|
58
|
+
"""
|
|
59
|
+
density_p = pressure_adjusted_dead_oil_density(pressure, reference_density)
|
|
60
|
+
return temperature_adjusted_dead_oil_density(temperature, density_p)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def dead_oil_velocity(
|
|
5
|
+
temperature: np.ndarray | float,
|
|
6
|
+
pressure: np.ndarray | float,
|
|
7
|
+
reference_density: np.ndarray | float,
|
|
8
|
+
) -> np.ndarray | float:
|
|
9
|
+
"""
|
|
10
|
+
The primary wave velocity in oil without dissolved gas (dead).
|
|
11
|
+
|
|
12
|
+
Uses equation 20a from Batzle & Wang [1].
|
|
13
|
+
|
|
14
|
+
:param reference_density: Density of oil at 15.6 degrees Celsius and atmospheric
|
|
15
|
+
pressure (g/cc)
|
|
16
|
+
:param pressure: Pressure (MPa) of oil
|
|
17
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
18
|
+
:return: primary velocity of dead oil in m/s.
|
|
19
|
+
"""
|
|
20
|
+
return (
|
|
21
|
+
2096 * np.sqrt(reference_density / (2.6 - reference_density))
|
|
22
|
+
- 3.7 * temperature
|
|
23
|
+
+ 4.64 * pressure
|
|
24
|
+
+ 0.0115
|
|
25
|
+
* (4.12 * np.sqrt(1.08 * reference_density**-1 - 1) - 1)
|
|
26
|
+
* temperature
|
|
27
|
+
* pressure
|
|
28
|
+
)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def live_oil_density(
|
|
5
|
+
temperature,
|
|
6
|
+
pressure: np.ndarray | float | None,
|
|
7
|
+
reference_density: np.ndarray | float,
|
|
8
|
+
gas_oil_ratio: np.ndarray | float,
|
|
9
|
+
gas_gravity: np.ndarray | float,
|
|
10
|
+
) -> np.ndarray | float:
|
|
11
|
+
"""
|
|
12
|
+
Density of live oil at saturation.
|
|
13
|
+
|
|
14
|
+
Equation 24 in Batzle & Wang [1].
|
|
15
|
+
|
|
16
|
+
:param reference_density: Density of the oil without dissolved gas
|
|
17
|
+
at 15.6 degrees Celsius and atmospheric pressure. (g/cc)
|
|
18
|
+
:param pressure: Pressure (MPa) of oil (for future implementation only)
|
|
19
|
+
:param gas_oil_ratio: The volume ratio of gas to oil [l/l]
|
|
20
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
21
|
+
:param gas_gravity: molar mass of gas relative to air molar mas.
|
|
22
|
+
:return: Density of live oil [g/cc].
|
|
23
|
+
"""
|
|
24
|
+
b0 = live_oil_volume_factor(
|
|
25
|
+
temperature, reference_density, gas_oil_ratio, gas_gravity
|
|
26
|
+
)
|
|
27
|
+
return (reference_density + 0.0012 * gas_gravity * gas_oil_ratio) / b0
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def live_oil_pseudo_density(
|
|
31
|
+
temperature: np.ndarray | float,
|
|
32
|
+
reference_density: np.ndarray | float,
|
|
33
|
+
gas_oil_ratio: np.ndarray | float,
|
|
34
|
+
gas_gravity: np.ndarray | float,
|
|
35
|
+
) -> np.ndarray | float:
|
|
36
|
+
"""
|
|
37
|
+
Pseudo density used to substitute reference density in dead_oil_wave_velocity
|
|
38
|
+
for live oils.
|
|
39
|
+
|
|
40
|
+
Equation 22 in Batzle & Wang [1].
|
|
41
|
+
|
|
42
|
+
:param reference_density: Density of the oil without dissolved gas
|
|
43
|
+
at 15.6 degrees Celsius and atmospheric pressure. (g/cc)
|
|
44
|
+
:param gas_oil_ratio: The volume ratio of gas to oil [l/l]
|
|
45
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
46
|
+
:param gas_gravity: molar mass of gas relative to air molar mas.
|
|
47
|
+
:return: Pseudo-density of live oil.
|
|
48
|
+
"""
|
|
49
|
+
b0 = live_oil_volume_factor(
|
|
50
|
+
temperature, reference_density, gas_oil_ratio, gas_gravity
|
|
51
|
+
)
|
|
52
|
+
return (reference_density / b0) / (1 + 0.001 * gas_oil_ratio)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def live_oil_volume_factor(
|
|
56
|
+
temperature: np.ndarray | float,
|
|
57
|
+
reference_density: np.ndarray | float,
|
|
58
|
+
gas_oil_ratio: np.ndarray | float,
|
|
59
|
+
gas_gravity: np.ndarray | float,
|
|
60
|
+
) -> np.ndarray | float:
|
|
61
|
+
"""
|
|
62
|
+
Volume factor derived by Standing (1962), equation 23 in Batzle & Wang [1].
|
|
63
|
+
:param reference_density: Density of the oil without dissolved gas
|
|
64
|
+
at 15.6 degrees Celsius and atmospheric pressure. (g/cc)
|
|
65
|
+
:param gas_oil_ratio: The volume ratio of gas to oil [l/l]
|
|
66
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
67
|
+
:param gas_gravity: molar mass of gas relative to air molar mas.
|
|
68
|
+
:return: A volume factor in calculating pseudo-density of live oil.
|
|
69
|
+
"""
|
|
70
|
+
return (
|
|
71
|
+
0.972
|
|
72
|
+
+ 0.00038
|
|
73
|
+
* (
|
|
74
|
+
2.4 * gas_oil_ratio * np.sqrt(gas_gravity / reference_density)
|
|
75
|
+
+ temperature
|
|
76
|
+
+ 17.8
|
|
77
|
+
)
|
|
78
|
+
** 1.175
|
|
79
|
+
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from .dead_oil_velocity import dead_oil_velocity
|
|
2
|
+
from .live_oil_density import live_oil_pseudo_density
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def live_oil_velocity(
|
|
6
|
+
temperature, pressure, reference_density, gas_oil_ratio, gas_gravity
|
|
7
|
+
):
|
|
8
|
+
"""
|
|
9
|
+
Primary wave velocity of live oil at saturation.
|
|
10
|
+
|
|
11
|
+
Substitute Equation 22 in Equation 20 of Batzle & Wang [1].
|
|
12
|
+
|
|
13
|
+
:param reference_density: Density of the oil without dissolved gas
|
|
14
|
+
at 15.6 degrees Celsius and atmospheric pressure. (g/cc)
|
|
15
|
+
:param pressure: Pressure (MPa) of oil
|
|
16
|
+
:param gas_oil_ratio: The volume ratio of gas to oil [l/l]
|
|
17
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
18
|
+
:param gas_gravity: molar mass of gas relative to air molar mas.
|
|
19
|
+
:return: Primary wave velocity of live oil [m/s].
|
|
20
|
+
"""
|
|
21
|
+
rho_marked = live_oil_pseudo_density(
|
|
22
|
+
temperature, reference_density, gas_oil_ratio, gas_gravity
|
|
23
|
+
)
|
|
24
|
+
return dead_oil_velocity(temperature, pressure, rho_marked)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def bp_standing(
|
|
5
|
+
density: np.ndarray | float,
|
|
6
|
+
gas_oil_ratio: np.ndarray | float,
|
|
7
|
+
gas_gravity: np.ndarray | float,
|
|
8
|
+
temperature: np.ndarray | float,
|
|
9
|
+
) -> np.ndarray | float:
|
|
10
|
+
"""
|
|
11
|
+
Reservoir oils include some natural gas in solution. The pressure at which
|
|
12
|
+
this natural gas begins to come out of solution and form bubbles is known
|
|
13
|
+
as the bubble point pressure. See https://petrowiki.org/Oil_bubblepoint_pressure
|
|
14
|
+
Based on the correlation from:
|
|
15
|
+
Standing, M. B. "A pressure-volume-temperature correlation for mixtures of
|
|
16
|
+
California oils and gases." Drilling and Production Practice. American
|
|
17
|
+
Petroleum Institute, 1947.
|
|
18
|
+
Uses refinment described here: https://petrowiki.org/Oil_bubblepoint_pressure
|
|
19
|
+
:param density: density of oil at room conditions [kg/m^3]
|
|
20
|
+
:param gas_oil_ratio: The volume ratio of gas to oil [l/l]
|
|
21
|
+
:param gas_gravity: molar mass of gas relative to air molar mas.
|
|
22
|
+
:param temperature: temperature of oil [°C]
|
|
23
|
+
:return: bubble point pressure [Pa]
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
# Standing, M.B. (1947) uses:
|
|
27
|
+
# * pressure in psi
|
|
28
|
+
# * temperature in F
|
|
29
|
+
# * gas oil ratio in cu ft per bbl
|
|
30
|
+
# * bubble point in in absolute psi
|
|
31
|
+
# * gravity_of_tank_oil in API
|
|
32
|
+
#
|
|
33
|
+
# The paper describes that bubble point is a function of
|
|
34
|
+
# (gor / gr) ** 0.83
|
|
35
|
+
# * (10**(0.00091 * t)/10**(0.0125*gravity_of_tank_oil))
|
|
36
|
+
#
|
|
37
|
+
# and gives the following example:
|
|
38
|
+
# Bubble point pressure at 200° F
|
|
39
|
+
# of a liquid having gas-oil ratio
|
|
40
|
+
# 350 CFB, a gas gravity 0.75, and
|
|
41
|
+
# a tank oil gravity of 30° API.
|
|
42
|
+
# The required pressure is found
|
|
43
|
+
# to be 1930 psia.
|
|
44
|
+
#
|
|
45
|
+
# We could scale to fit this example, however,
|
|
46
|
+
# we use 1896 psia.
|
|
47
|
+
#
|
|
48
|
+
# For density in kg/m^3:
|
|
49
|
+
# 10**(0.0125*gravity_of_tank_oil)=
|
|
50
|
+
# 10**(1770.79/density - 1.64375)=
|
|
51
|
+
# e**(4072.69738323/density - 3.78487)
|
|
52
|
+
# For temperature in Celsius:
|
|
53
|
+
# 10**(0.00091 * Farenheit) =
|
|
54
|
+
# 10**(0.001638*Celsius + 0.02912) =
|
|
55
|
+
# e**(0.00377163*Celsius + 0.0670513)
|
|
56
|
+
#
|
|
57
|
+
# Removing constants factors we get
|
|
58
|
+
# (gor_ratio /
|
|
59
|
+
# gas_gravity)) ** 0.83 / ( np.exp(4072.69738323 / density -
|
|
60
|
+
# 0.00377163438 * temperature_c)
|
|
61
|
+
#
|
|
62
|
+
# The equation occurs in this form as equation 21a in
|
|
63
|
+
# Batzle, Michael, and Zhijing Wang. "Seismic properties of pore fluids."
|
|
64
|
+
# Geophysics 57.11 (1992): 1396-1408.
|
|
65
|
+
|
|
66
|
+
ratio = gas_oil_ratio / gas_gravity
|
|
67
|
+
denominator = np.exp(4072 / density - 0.00377 * temperature)
|
|
68
|
+
|
|
69
|
+
return 24469793.9134 * ratio**0.83 / denominator
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
|
|
5
|
+
from .dead_oil_density import dead_oil_density
|
|
6
|
+
from .dead_oil_velocity import dead_oil_velocity
|
|
7
|
+
from .live_oil_density import live_oil_density
|
|
8
|
+
from .live_oil_velocity import live_oil_velocity
|
|
9
|
+
from .oil_bubble_point import bp_standing
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def oil_properties(
|
|
13
|
+
temp: np.ndarray | float,
|
|
14
|
+
pres: np.ndarray | float,
|
|
15
|
+
rho0: np.ndarray | float,
|
|
16
|
+
gor: np.ndarray | float,
|
|
17
|
+
gr: np.ndarray | float,
|
|
18
|
+
) -> np.ndarray | float:
|
|
19
|
+
"""
|
|
20
|
+
:param temp: Temperature (Celsius) of oil.
|
|
21
|
+
:param pres: Pressure (Pa) of oil
|
|
22
|
+
:param rho0: Density of the oil without dissolved gas at 15.6 degrees Celsius and
|
|
23
|
+
atmospheric pressure. (kg/m^3)
|
|
24
|
+
:param gor: The volume ratio of gas to oil [l/l]
|
|
25
|
+
:param gr: Gas Gravity, molar mass of gas relative to air molar mas.
|
|
26
|
+
:return: vel_oil, den_oil, k_oil
|
|
27
|
+
"""
|
|
28
|
+
# Since live_oil with gas_oil_ratio=0.0 is not equal to dead oil
|
|
29
|
+
# we use an apodization function to interpolate between the two
|
|
30
|
+
|
|
31
|
+
def triangular_window(x, length=2):
|
|
32
|
+
"""
|
|
33
|
+
A triangular window function around the origin, 1.0 at x=0.0, linear
|
|
34
|
+
and 0.0 outside the window.
|
|
35
|
+
:param length: total length of the window, ie., function is nonzero in
|
|
36
|
+
[-length/2, length/2].
|
|
37
|
+
:param x: numpy array containing x'es to evaluate the window at
|
|
38
|
+
:return: value of window function at x.
|
|
39
|
+
"""
|
|
40
|
+
x = np.asarray(x) # Ensure x is a numpy array
|
|
41
|
+
window = np.clip((np.abs(x) - length / 2) / (length / 2), 0, 1)
|
|
42
|
+
return 1 - window
|
|
43
|
+
|
|
44
|
+
loil_den, loil_vel = live_oil(temp, pres, rho0, gor, gr)
|
|
45
|
+
doil_den, doil_vel = dead_oil(temp, pres, rho0)
|
|
46
|
+
window = triangular_window(gor)
|
|
47
|
+
den_oil = doil_den * window + (1 - window) * loil_den
|
|
48
|
+
vel_oil = doil_vel * window + (1 - window) * loil_vel
|
|
49
|
+
k_oil = vel_oil**2 * den_oil
|
|
50
|
+
return vel_oil, den_oil, k_oil
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def dead_oil(
|
|
54
|
+
temperature: np.ndarray | float,
|
|
55
|
+
pressure: np.ndarray | float,
|
|
56
|
+
reference_density: np.ndarray | float,
|
|
57
|
+
) -> tuple[np.ndarray | float, np.ndarray | float]:
|
|
58
|
+
"""
|
|
59
|
+
:param reference_density: Density of the oil without dissolved gas
|
|
60
|
+
at 15.6 degrees Celsius and atmospheric pressure. kg/m3
|
|
61
|
+
:param gas_oil_ratio: The volume ratio of gas to oil [l/l]
|
|
62
|
+
:param gas_gravity: molar mass of gas relative to air molar mas.
|
|
63
|
+
:param pressure: Pressure (Pa) of oil
|
|
64
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
65
|
+
:return: dead_oil_density, dead_oil_velocity
|
|
66
|
+
"""
|
|
67
|
+
dead_oil_den = 1000 * dead_oil_density(
|
|
68
|
+
temperature, pressure * 1e-6, reference_density / 1000
|
|
69
|
+
)
|
|
70
|
+
dead_oil_vel = dead_oil_velocity(
|
|
71
|
+
temperature, pressure * 1e-6, reference_density / 1000
|
|
72
|
+
)
|
|
73
|
+
return dead_oil_den, dead_oil_vel
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def live_oil(
|
|
77
|
+
temperature: np.ndarray | float,
|
|
78
|
+
pressure: np.ndarray | float,
|
|
79
|
+
reference_density: np.ndarray | float,
|
|
80
|
+
gas_oil_ratio: np.ndarray | float,
|
|
81
|
+
gas_gravity: np.ndarray | float,
|
|
82
|
+
) -> tuple[np.ndarray | float, np.ndarray | float]:
|
|
83
|
+
"""
|
|
84
|
+
:param reference_density: Density of the oil without dissolved gas
|
|
85
|
+
at 15.6 degrees Celsius and atmospheric pressure. (kg/m^3)
|
|
86
|
+
:param gas_oil_ratio: The volume ratio of gas to oil [l/l]
|
|
87
|
+
:param gas_gravity: molar mass of gas relative to air molar mas.
|
|
88
|
+
:param pressure: Pressure (Pa) of oil
|
|
89
|
+
:param temperature: Temperature (Celsius) of oil.
|
|
90
|
+
:return: live_oil_density, live_oil_velocity
|
|
91
|
+
"""
|
|
92
|
+
if np.any(
|
|
93
|
+
pressure
|
|
94
|
+
< bp_standing(reference_density, gas_oil_ratio, gas_gravity, temperature)
|
|
95
|
+
):
|
|
96
|
+
warnings.warn(
|
|
97
|
+
"Pressure is below bubble point of oil, estimated elastic properties can be inaccurate",
|
|
98
|
+
stacklevel=1,
|
|
99
|
+
)
|
|
100
|
+
live_oil_den = 1000 * live_oil_density(
|
|
101
|
+
temperature,
|
|
102
|
+
pressure * 1e-6,
|
|
103
|
+
reference_density / 1000,
|
|
104
|
+
gas_oil_ratio,
|
|
105
|
+
gas_gravity,
|
|
106
|
+
)
|
|
107
|
+
live_oil_vel = live_oil_velocity(
|
|
108
|
+
temperature,
|
|
109
|
+
pressure * 1e-6,
|
|
110
|
+
reference_density / 1000,
|
|
111
|
+
gas_oil_ratio,
|
|
112
|
+
gas_gravity,
|
|
113
|
+
)
|
|
114
|
+
return live_oil_den, live_oil_vel
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from .cemented_shalysand_sandyshale_models import cemented_shaly_sand_sandy_shale_model
|
|
2
|
+
from .constant_cement_models import (
|
|
3
|
+
constant_cement_model,
|
|
4
|
+
constant_cement_model_dry,
|
|
5
|
+
)
|
|
6
|
+
from .constant_cement_optimisation import constant_cement_model_optimisation
|
|
7
|
+
from .contact_cement_model import contact_cement_model
|
|
8
|
+
from .curvefit_sandstone_models import (
|
|
9
|
+
curvefit_constant_cement,
|
|
10
|
+
curvefit_friable,
|
|
11
|
+
curvefit_patchy_cement,
|
|
12
|
+
)
|
|
13
|
+
from .friable_models import (
|
|
14
|
+
friable_model,
|
|
15
|
+
friable_model_dry,
|
|
16
|
+
)
|
|
17
|
+
from .friable_optimisation import friable_model_optimisation
|
|
18
|
+
from .friable_shalysand_sandyshale_models import friable_shaly_sand_sandy_shale_model
|
|
19
|
+
from .patchy_cement_fluid_substitution_model import (
|
|
20
|
+
patchy_cement_pressure_fluid_substitution,
|
|
21
|
+
)
|
|
22
|
+
from .patchy_cement_model import (
|
|
23
|
+
constant_cement_model_pcm,
|
|
24
|
+
patchy_cement_model_cem_frac,
|
|
25
|
+
patchy_cement_model_weight,
|
|
26
|
+
)
|
|
27
|
+
from .patchy_cement_optimisation import (
|
|
28
|
+
patchy_cement_model_optimisation,
|
|
29
|
+
patchy_cement_model_optimisation_multiwell,
|
|
30
|
+
)
|
|
31
|
+
from .unresolved_cemented_sandshale_models import (
|
|
32
|
+
unresolved_constant_cement_sand_shale_model,
|
|
33
|
+
)
|
|
34
|
+
from .unresolved_friable_sandshale_models import unresolved_friable_sand_shale_model
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"cemented_shaly_sand_sandy_shale_model",
|
|
38
|
+
"constant_cement_model",
|
|
39
|
+
"constant_cement_model_dry",
|
|
40
|
+
"constant_cement_model_optimisation",
|
|
41
|
+
"contact_cement_model",
|
|
42
|
+
"curvefit_constant_cement",
|
|
43
|
+
"curvefit_friable",
|
|
44
|
+
"curvefit_patchy_cement",
|
|
45
|
+
"friable_model",
|
|
46
|
+
"friable_model_dry",
|
|
47
|
+
"friable_model_optimisation",
|
|
48
|
+
"friable_shaly_sand_sandy_shale_model",
|
|
49
|
+
"patchy_cement_pressure_fluid_substitution",
|
|
50
|
+
"constant_cement_model_pcm",
|
|
51
|
+
"patchy_cement_model_cem_frac",
|
|
52
|
+
"patchy_cement_model_weight",
|
|
53
|
+
"patchy_cement_model_optimisation",
|
|
54
|
+
"patchy_cement_model_optimisation_multiwell",
|
|
55
|
+
"unresolved_constant_cement_sand_shale_model",
|
|
56
|
+
"unresolved_friable_sand_shale_model",
|
|
57
|
+
]
|