rock-physics-open 0.3.2__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.
Files changed (145) hide show
  1. rock_physics_open/__init__.py +0 -0
  2. rock_physics_open/equinor_utilities/__init__.py +0 -0
  3. rock_physics_open/equinor_utilities/anisotropy.py +211 -0
  4. rock_physics_open/equinor_utilities/classification_functions/__init__.py +17 -0
  5. rock_physics_open/equinor_utilities/classification_functions/class_stats.py +68 -0
  6. rock_physics_open/equinor_utilities/classification_functions/lin_class.py +53 -0
  7. rock_physics_open/equinor_utilities/classification_functions/mahal_class.py +63 -0
  8. rock_physics_open/equinor_utilities/classification_functions/norm_class.py +73 -0
  9. rock_physics_open/equinor_utilities/classification_functions/poly_class.py +45 -0
  10. rock_physics_open/equinor_utilities/classification_functions/post_prob.py +27 -0
  11. rock_physics_open/equinor_utilities/classification_functions/two_step_classification.py +60 -0
  12. rock_physics_open/equinor_utilities/conversions.py +10 -0
  13. rock_physics_open/equinor_utilities/gen_utilities/__init__.py +11 -0
  14. rock_physics_open/equinor_utilities/gen_utilities/dict_to_float.py +38 -0
  15. rock_physics_open/equinor_utilities/gen_utilities/dim_check_vector.py +113 -0
  16. rock_physics_open/equinor_utilities/gen_utilities/filter_input.py +131 -0
  17. rock_physics_open/equinor_utilities/gen_utilities/filter_output.py +88 -0
  18. rock_physics_open/equinor_utilities/machine_learning_utilities/__init__.py +15 -0
  19. rock_physics_open/equinor_utilities/machine_learning_utilities/base_pressure_model.py +170 -0
  20. rock_physics_open/equinor_utilities/machine_learning_utilities/dummy_vars.py +53 -0
  21. rock_physics_open/equinor_utilities/machine_learning_utilities/exponential_model.py +137 -0
  22. rock_physics_open/equinor_utilities/machine_learning_utilities/import_ml_models.py +77 -0
  23. rock_physics_open/equinor_utilities/machine_learning_utilities/polynomial_model.py +132 -0
  24. rock_physics_open/equinor_utilities/machine_learning_utilities/run_regression.py +209 -0
  25. rock_physics_open/equinor_utilities/machine_learning_utilities/sigmoidal_model.py +241 -0
  26. rock_physics_open/equinor_utilities/optimisation_utilities/__init__.py +19 -0
  27. rock_physics_open/equinor_utilities/optimisation_utilities/opt_subst_utilities.py +455 -0
  28. rock_physics_open/equinor_utilities/snapshot_test_utilities/__init__.py +10 -0
  29. rock_physics_open/equinor_utilities/snapshot_test_utilities/compare_snapshots.py +184 -0
  30. rock_physics_open/equinor_utilities/snapshot_test_utilities/snapshots.py +97 -0
  31. rock_physics_open/equinor_utilities/std_functions/__init__.py +43 -0
  32. rock_physics_open/equinor_utilities/std_functions/backus_ave.py +68 -0
  33. rock_physics_open/equinor_utilities/std_functions/dvorkin_nur.py +77 -0
  34. rock_physics_open/equinor_utilities/std_functions/gassmann.py +165 -0
  35. rock_physics_open/equinor_utilities/std_functions/hashin_shtrikman.py +224 -0
  36. rock_physics_open/equinor_utilities/std_functions/hertz_mindlin.py +51 -0
  37. rock_physics_open/equinor_utilities/std_functions/moduli_velocity.py +67 -0
  38. rock_physics_open/equinor_utilities/std_functions/reflection_eq.py +120 -0
  39. rock_physics_open/equinor_utilities/std_functions/rho.py +69 -0
  40. rock_physics_open/equinor_utilities/std_functions/voigt_reuss_hill.py +149 -0
  41. rock_physics_open/equinor_utilities/std_functions/walton.py +45 -0
  42. rock_physics_open/equinor_utilities/std_functions/wood_brie.py +94 -0
  43. rock_physics_open/equinor_utilities/various_utilities/Equinor_logo.gif +0 -0
  44. rock_physics_open/equinor_utilities/various_utilities/Equinor_logo.ico +0 -0
  45. rock_physics_open/equinor_utilities/various_utilities/__init__.py +24 -0
  46. rock_physics_open/equinor_utilities/various_utilities/display_result_statistics.py +90 -0
  47. rock_physics_open/equinor_utilities/various_utilities/gassmann_dry_mod.py +56 -0
  48. rock_physics_open/equinor_utilities/various_utilities/gassmann_mod.py +56 -0
  49. rock_physics_open/equinor_utilities/various_utilities/gassmann_sub_mod.py +64 -0
  50. rock_physics_open/equinor_utilities/various_utilities/hs_average.py +59 -0
  51. rock_physics_open/equinor_utilities/various_utilities/pressure.py +96 -0
  52. rock_physics_open/equinor_utilities/various_utilities/reflectivity.py +101 -0
  53. rock_physics_open/equinor_utilities/various_utilities/timeshift.py +104 -0
  54. rock_physics_open/equinor_utilities/various_utilities/vp_vs_rho_set_statistics.py +170 -0
  55. rock_physics_open/equinor_utilities/various_utilities/vrh_3_min.py +83 -0
  56. rock_physics_open/fluid_models/__init__.py +9 -0
  57. rock_physics_open/fluid_models/brine_model/__init__.py +5 -0
  58. rock_physics_open/fluid_models/brine_model/brine_properties.py +178 -0
  59. rock_physics_open/fluid_models/gas_model/__init__.py +5 -0
  60. rock_physics_open/fluid_models/gas_model/gas_properties.py +319 -0
  61. rock_physics_open/fluid_models/oil_model/__init__.py +5 -0
  62. rock_physics_open/fluid_models/oil_model/dead_oil_density.py +65 -0
  63. rock_physics_open/fluid_models/oil_model/dead_oil_velocity.py +30 -0
  64. rock_physics_open/fluid_models/oil_model/live_oil_density.py +82 -0
  65. rock_physics_open/fluid_models/oil_model/live_oil_velocity.py +24 -0
  66. rock_physics_open/fluid_models/oil_model/oil_bubble_point.py +69 -0
  67. rock_physics_open/fluid_models/oil_model/oil_properties.py +146 -0
  68. rock_physics_open/sandstone_models/__init__.py +59 -0
  69. rock_physics_open/sandstone_models/cemented_shalysand_sandyshale_models.py +304 -0
  70. rock_physics_open/sandstone_models/constant_cement_models.py +204 -0
  71. rock_physics_open/sandstone_models/constant_cement_optimisation.py +125 -0
  72. rock_physics_open/sandstone_models/contact_cement_model.py +138 -0
  73. rock_physics_open/sandstone_models/curvefit_sandstone_models.py +143 -0
  74. rock_physics_open/sandstone_models/friable_models.py +177 -0
  75. rock_physics_open/sandstone_models/friable_optimisation.py +115 -0
  76. rock_physics_open/sandstone_models/friable_shalysand_sandyshale_models.py +235 -0
  77. rock_physics_open/sandstone_models/patchy_cement_fluid_substitution_model.py +477 -0
  78. rock_physics_open/sandstone_models/patchy_cement_model.py +384 -0
  79. rock_physics_open/sandstone_models/patchy_cement_optimisation.py +254 -0
  80. rock_physics_open/sandstone_models/unresolved_cemented_sandshale_models.py +134 -0
  81. rock_physics_open/sandstone_models/unresolved_friable_sandshale_models.py +126 -0
  82. rock_physics_open/shale_models/__init__.py +19 -0
  83. rock_physics_open/shale_models/dem.py +174 -0
  84. rock_physics_open/shale_models/dem_dual_por.py +61 -0
  85. rock_physics_open/shale_models/kus_tok.py +59 -0
  86. rock_physics_open/shale_models/multi_sca.py +133 -0
  87. rock_physics_open/shale_models/pq.py +102 -0
  88. rock_physics_open/shale_models/sca.py +90 -0
  89. rock_physics_open/shale_models/shale4_mineral.py +147 -0
  90. rock_physics_open/shale_models/shale4_mineral_dem_overlay.py +92 -0
  91. rock_physics_open/span_wagner/__init__.py +5 -0
  92. rock_physics_open/span_wagner/co2_properties.py +444 -0
  93. rock_physics_open/span_wagner/coefficients.py +165 -0
  94. rock_physics_open/span_wagner/equations.py +104 -0
  95. rock_physics_open/span_wagner/tables/__init__.py +0 -0
  96. rock_physics_open/span_wagner/tables/carbon_dioxide_density.npz +0 -0
  97. rock_physics_open/span_wagner/tables/lookup_table.py +33 -0
  98. rock_physics_open/t_matrix_models/Equinor_logo.ico +0 -0
  99. rock_physics_open/t_matrix_models/__init__.py +35 -0
  100. rock_physics_open/t_matrix_models/carbonate_pressure_substitution.py +124 -0
  101. rock_physics_open/t_matrix_models/curvefit_t_matrix_exp.py +123 -0
  102. rock_physics_open/t_matrix_models/curvefit_t_matrix_min.py +86 -0
  103. rock_physics_open/t_matrix_models/parse_t_matrix_inputs.py +297 -0
  104. rock_physics_open/t_matrix_models/run_t_matrix.py +243 -0
  105. rock_physics_open/t_matrix_models/t_matrix_C.py +210 -0
  106. rock_physics_open/t_matrix_models/t_matrix_opt_fluid_sub_exp.py +137 -0
  107. rock_physics_open/t_matrix_models/t_matrix_opt_fluid_sub_petec.py +167 -0
  108. rock_physics_open/t_matrix_models/t_matrix_opt_forward_model_exp.py +76 -0
  109. rock_physics_open/t_matrix_models/t_matrix_opt_forward_model_min.py +89 -0
  110. rock_physics_open/t_matrix_models/t_matrix_parameter_optimisation_exp.py +176 -0
  111. rock_physics_open/t_matrix_models/t_matrix_parameter_optimisation_min.py +162 -0
  112. rock_physics_open/t_matrix_models/t_matrix_vector/__init__.py +12 -0
  113. rock_physics_open/t_matrix_models/t_matrix_vector/array_functions.py +75 -0
  114. rock_physics_open/t_matrix_models/t_matrix_vector/calc_c_eff.py +163 -0
  115. rock_physics_open/t_matrix_models/t_matrix_vector/calc_isolated.py +95 -0
  116. rock_physics_open/t_matrix_models/t_matrix_vector/calc_kd.py +40 -0
  117. rock_physics_open/t_matrix_models/t_matrix_vector/calc_kd_eff.py +116 -0
  118. rock_physics_open/t_matrix_models/t_matrix_vector/calc_kd_uuv.py +18 -0
  119. rock_physics_open/t_matrix_models/t_matrix_vector/calc_pressure.py +140 -0
  120. rock_physics_open/t_matrix_models/t_matrix_vector/calc_t.py +71 -0
  121. rock_physics_open/t_matrix_models/t_matrix_vector/calc_td.py +42 -0
  122. rock_physics_open/t_matrix_models/t_matrix_vector/calc_theta.py +43 -0
  123. rock_physics_open/t_matrix_models/t_matrix_vector/calc_x.py +33 -0
  124. rock_physics_open/t_matrix_models/t_matrix_vector/calc_z.py +50 -0
  125. rock_physics_open/t_matrix_models/t_matrix_vector/check_and_tile.py +43 -0
  126. rock_physics_open/t_matrix_models/t_matrix_vector/g_tensor.py +140 -0
  127. rock_physics_open/t_matrix_models/t_matrix_vector/iso_av.py +60 -0
  128. rock_physics_open/t_matrix_models/t_matrix_vector/iso_ave_all.py +55 -0
  129. rock_physics_open/t_matrix_models/t_matrix_vector/pressure_input.py +44 -0
  130. rock_physics_open/t_matrix_models/t_matrix_vector/t_matrix_vec.py +278 -0
  131. rock_physics_open/t_matrix_models/t_matrix_vector/velocity_vti_angles.py +81 -0
  132. rock_physics_open/t_matrix_models/tmatrix_python.dll +0 -0
  133. rock_physics_open/t_matrix_models/tmatrix_python.so +0 -0
  134. rock_physics_open/ternary_plots/__init__.py +3 -0
  135. rock_physics_open/ternary_plots/gen_ternary_plot.py +73 -0
  136. rock_physics_open/ternary_plots/shale_prop_ternary.py +337 -0
  137. rock_physics_open/ternary_plots/ternary_patches.py +277 -0
  138. rock_physics_open/ternary_plots/ternary_plot_utilities.py +197 -0
  139. rock_physics_open/ternary_plots/unconventionals_ternary.py +75 -0
  140. rock_physics_open/version.py +34 -0
  141. rock_physics_open-0.3.2.dist-info/METADATA +90 -0
  142. rock_physics_open-0.3.2.dist-info/RECORD +145 -0
  143. rock_physics_open-0.3.2.dist-info/WHEEL +5 -0
  144. rock_physics_open-0.3.2.dist-info/licenses/LICENSE +165 -0
  145. rock_physics_open-0.3.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,102 @@
1
+ import numpy as np
2
+
3
+
4
+ def p_q_fcn(k, mu, k2, mu2, asp):
5
+ """
6
+ Geometric factors used in inclusion models.
7
+
8
+ References
9
+ ----------
10
+ The rock physics handbook, Gary Mavko et al.
11
+
12
+ Parameters
13
+ ----------
14
+ k : np.ndarray
15
+ Bulk modulus of phase 1 [Pa].
16
+ mu : np.ndarray
17
+ Shear modulus of phase 1 [Pa].
18
+ k2 : np.ndarray
19
+ Bulk modulus of phase 2 [Pa].
20
+ mu2 : np.ndarray
21
+ Shear modulus of phase 2 [Pa].
22
+ asp : np.ndarray
23
+ Aspect ratio [ratio].
24
+
25
+ Returns
26
+ -------
27
+ tuple
28
+ p, q : (np.ndarray, np.ndarray).
29
+ geometric factors p and q.
30
+ """
31
+
32
+ # Functions theta and fn defaults to 2/3 and -2/5 for asp == 1.0
33
+ idx_oblate = np.less(asp, 1.0)
34
+ idx_prolate = np.greater(asp, 1.0)
35
+ theta = 2.0 / 3.0 * np.ones(asp.shape)
36
+ fn = -2.0 / 5.0 * np.ones(asp.shape)
37
+
38
+ if np.any(idx_oblate):
39
+ theta[idx_oblate] = (
40
+ asp[idx_oblate] / ((1 - asp[idx_oblate] ** 2) ** (3 / 2))
41
+ ) * (
42
+ np.arccos(asp[idx_oblate])
43
+ - asp[idx_oblate] * np.sqrt(1 - asp[idx_oblate] ** 2)
44
+ )
45
+ fn[idx_oblate] = (asp[idx_oblate] ** 2 / (1 - asp[idx_oblate] ** 2)) * (
46
+ 3 * theta[idx_oblate] - 2
47
+ )
48
+
49
+ if np.any(idx_prolate):
50
+ theta[idx_prolate] = (
51
+ asp[idx_prolate] / ((asp[idx_prolate] ** 2 - 1) ** (3 / 2))
52
+ ) * (
53
+ asp[idx_prolate] * np.sqrt(asp[idx_prolate] ** 2 - 1)
54
+ - np.arccosh(asp[idx_prolate])
55
+ )
56
+ fn[idx_prolate] = (asp[idx_prolate] ** 2 / (asp[idx_prolate] ** 2 - 1)) * (
57
+ 2 - 3 * theta[idx_prolate]
58
+ )
59
+
60
+ nu = (3 * k - 2 * mu) / (2 * (3 * k + mu))
61
+ r = (1 - 2 * nu) / (2 * (1 - nu))
62
+ a = mu2 / mu - 1
63
+ b = (1 / 3) * (k2 / k - mu2 / mu)
64
+
65
+ f1 = 1 + a * (
66
+ (3 / 2) * (fn + theta) - r * ((3 / 2) * fn + (5 / 2) * theta - (4 / 3))
67
+ )
68
+
69
+ f2 = (
70
+ 1
71
+ + a * (1 + (3 / 2) * (fn + theta) - (r / 2) * (3 * fn + 5 * theta))
72
+ + b * (3 - 4 * r)
73
+ + (a / 2)
74
+ * (a + 3 * b)
75
+ * (3 - 4 * r)
76
+ * (fn + theta - r * (fn - theta + 2 * theta**2))
77
+ )
78
+
79
+ f3 = 1 + a * (1 - (fn + (3 / 2) * theta) + r * (fn + theta))
80
+
81
+ f4 = 1 + (a / 4) * (fn + 3 * theta - r * (fn - theta))
82
+
83
+ f5 = a * (-fn + r * (fn + theta - (4 / 3))) + b * theta * (3 - 4 * r)
84
+
85
+ f6 = 1 + a * (1 + fn - r * (fn + theta)) + b * (1 - theta) * (3 - 4 * r)
86
+
87
+ f7 = (
88
+ 2
89
+ + (a / 4) * (3 * fn + 9 * theta - r * (3 * fn + 5 * theta))
90
+ + b * theta * (3 - 4 * r)
91
+ )
92
+
93
+ f8 = a * (1 - 2 * r + (fn / 2) * (r - 1) + (theta / 2) * (5 * r - 3)) + b * (
94
+ 1 - theta
95
+ ) * (3 - 4 * r)
96
+
97
+ f9 = a * ((r - 1) * fn - r * theta) + b * theta * (3 - 4 * r)
98
+
99
+ p = f1 / f2
100
+ q = (1 / 5) * ((2 / f3) + (1 / f4) + ((f4 * f5 + f6 * f7 - f8 * f9) / (f2 * f4)))
101
+
102
+ return p, q
@@ -0,0 +1,90 @@
1
+ import numpy as np
2
+
3
+ from .pq import p_q_fcn
4
+
5
+
6
+ def self_consistent_approximation_model(
7
+ k1, mu1, rho1, k2, mu2, rho2, frac1, asp1, asp2, tol
8
+ ):
9
+ """
10
+ SCA - Effective elastic moduli using Berryman's Self-Consistent
11
+ (Coherent Potential) Approximation method.
12
+
13
+ Parameters
14
+ ----------
15
+ k1 : np.ndarray
16
+ Bulk modulus of background matrix [Pa].
17
+ mu1 : np.ndarray
18
+ Shear modulus of background matrix [Pa].
19
+ rho1 : np.ndarray
20
+ Bulk density of background matrix [kg/m^3].
21
+ k2 : np.ndarray
22
+ Bulk modulus of inclusions [Pa].
23
+ mu2 : np.ndarray
24
+ Shear modulus of inclusions [Pa].
25
+ rho2 : np.ndarray
26
+ Bulk density of inclusions [kg/m^3].
27
+ frac1 : np.ndarray
28
+ Fraction of inclusions [fraction].
29
+ asp1 : np.ndarray
30
+ Aspect ratio of inclusions [ratio].
31
+ asp2 : np.ndarray
32
+ Aspect ratio of inclusions [ratio].
33
+ tol: float
34
+ Desired accuracy in the SCA iterations.
35
+
36
+ Returns
37
+ -------
38
+ tuple
39
+ k, mu, rho : (np.ndarray, np.ndarray, np.ndarray).
40
+ k: effective medium bulk modulus [Pa], mu: effective medium shear modulus [Pa], rho: bulk density [kg/m^3].
41
+
42
+ Comments
43
+ --------
44
+ Based on function by T. Mukerji, SRB, Stanford University, 1994.
45
+ Ported to Python by Harald Flesche, Equinor 2015.
46
+ """
47
+
48
+ # Calculate fn and theta - independent of iteration
49
+ f1 = frac1
50
+ f2 = 1 - frac1
51
+
52
+ k_sc = f1 * k1 + f2 * k2
53
+ mu_sc = f1 * mu1 + f2 * mu2
54
+ rhob = f1 * rho1 + f2 * rho2
55
+
56
+ idx = np.logical_and(np.not_equal(f1, 0.0), np.not_equal(f1, 1.0))
57
+ n_iter = 0
58
+ k_new = np.zeros(np.sum(idx))
59
+ delta = np.absolute(k_sc[idx] - k_new)
60
+ # Express tolerance in terms of k1
61
+ tol = tol * k1[idx]
62
+
63
+ while np.any(delta > tol) and (n_iter < 3000):
64
+ p1, q1 = p_q_fcn(k_sc[idx], mu_sc[idx], k1[idx], mu1[idx], asp1[idx])
65
+ p2, q2 = p_q_fcn(k_sc[idx], mu_sc[idx], k2[idx], mu2[idx], asp2[idx])
66
+
67
+ k_new = (f1[idx] * k1[idx] * p1 + f2[idx] * k2[idx] * p2) / (
68
+ f1[idx] * p1 + f2[idx] * p2
69
+ )
70
+ mu_new = (f1[idx] * mu1[idx] * q1 + f2[idx] * mu2[idx] * q2) / (
71
+ f1[idx] * q1 + f2[idx] * q2
72
+ )
73
+
74
+ delta = np.absolute(k_sc[idx] - k_new)
75
+ k_sc[idx] = k_new
76
+ mu_sc[idx] = mu_new
77
+
78
+ n_iter = n_iter + 1
79
+
80
+ # If all inclusions or all matrix - substitute with inclusion mineral properties
81
+ idx = frac1 == 1.0
82
+ if np.any(idx):
83
+ k_sc[idx] = k1[idx]
84
+ mu_sc[idx] = mu1[idx]
85
+ idx = frac1 == 0.0
86
+ if np.any(idx):
87
+ k_sc[idx] = k2[idx]
88
+ mu_sc[idx] = mu2[idx]
89
+
90
+ return k_sc, mu_sc, rhob
@@ -0,0 +1,147 @@
1
+ import numpy as np
2
+
3
+ from rock_physics_open.equinor_utilities import std_functions
4
+ from rock_physics_open.equinor_utilities.gen_utilities import dim_check_vector
5
+
6
+ from .dem import dem_model
7
+ from .multi_sca import multi_sca
8
+
9
+
10
+ def shale_model_4_mineral_dem(
11
+ k1,
12
+ mu1,
13
+ rho1,
14
+ k2,
15
+ mu2,
16
+ rho2,
17
+ k3,
18
+ mu3,
19
+ rho3,
20
+ k4,
21
+ mu4,
22
+ rho4,
23
+ k_fl,
24
+ rho_fl,
25
+ phi,
26
+ f1,
27
+ f2,
28
+ f3,
29
+ rhob_inp,
30
+ asp1,
31
+ asp2,
32
+ asp3,
33
+ asp4,
34
+ asp,
35
+ mod_type="SCA",
36
+ ):
37
+ """
38
+ Simple shale model with mixture of matrix minerals in self-consistent approximation
39
+ or Voigt-Reuss-Hill average. In the latter case the aspect ratios are ignored.
40
+ Fluid filled porosity is included through a DEM inclusion model.
41
+
42
+ All k, mu inputs have unit [Pa], all rho inputs have unit [kg/m^3], phi and all f and asp have unit [fraction].
43
+
44
+ Parameters
45
+ ----------
46
+ k1, mu1, rho1 : np.ndarray
47
+ Mineral 1 properties [Quartz and feldspar].
48
+ k2, mu2, rho2 : np.ndarray
49
+ Mineral 2 properties [Kerogen].
50
+ k3, mu3, rho3 : np.ndarray
51
+ Mineral 3 properties [Clay].
52
+ k4, mu4, rho4 : np.ndarray
53
+ Mineral 4 properties [Carbonates].
54
+ k_fl, rho_fl : np.ndarray
55
+ Fluid properties.
56
+ phi : np.ndarray
57
+ Phi parmeter.
58
+ f1 : np.ndarray
59
+ Fraction of mineral 1.
60
+ f2 : np.ndarray
61
+ Fraction of mineral 2.
62
+ f3 : np.ndarray
63
+ Fraction of mineral 3.
64
+ rhob_inp : np.ndarray
65
+ Observed density [kg/m^3].
66
+ asp1 : np.ndarray
67
+ Aspect ratio mineral 1 inclusions.
68
+ asp2 : np.ndarray
69
+ Aspect ratio mineral 2 inclusions.
70
+ asp3 : np.ndarray
71
+ Aspect ratio mineral 3 inclusions.
72
+ asp4 : np.ndarray
73
+ Aspect ratio mineral 4 inclusions.
74
+ asp : np.ndarray
75
+ Porosity aspect ratio.
76
+ mod_type : str
77
+ One of 'SCA' or 'VRH'.
78
+
79
+ Returns
80
+ -------
81
+ tuple
82
+ k, mu, rhob, vp, vs, rho_factor : (np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray).
83
+ k - effektive bulk modulus [Pa], mu - effective shear modulus [Pa], rhob - effective density [kg/m^3],
84
+ vp - p-wave velocity [m/s], vs - shear wave velocity [m/s], rho_factor - ratio between modelled and observed
85
+ density [ratio].
86
+ """
87
+
88
+ # tol: DEM model calculation tolerance <= Set as a hardcoded value, not
89
+ # found to influence the results
90
+ tol = 1.0e-6
91
+
92
+ # Calculate effective mineral properties
93
+
94
+ # Too harsh to raise exceptions - do a quiet normalisation instead,
95
+ tot = f1 + f2 + f3
96
+ idx = tot > 1.0
97
+ f1[idx] /= tot[idx]
98
+ f2[idx] /= tot[idx]
99
+ f3[idx] /= tot[idx]
100
+ f4 = 1.0 - f1 - f2 - f3
101
+
102
+ if mod_type == "SCA":
103
+ k_mat, mu_mat, rho_mat = multi_sca(
104
+ k1,
105
+ mu1,
106
+ rho1,
107
+ f1,
108
+ asp1,
109
+ k2,
110
+ mu2,
111
+ rho2,
112
+ f2,
113
+ asp2,
114
+ k3,
115
+ mu3,
116
+ rho3,
117
+ f3,
118
+ asp3,
119
+ k4,
120
+ mu4,
121
+ rho4,
122
+ f4,
123
+ asp4,
124
+ tol=tol,
125
+ )
126
+ elif mod_type == "VRH":
127
+ k_mat, mu_mat = std_functions.multi_voigt_reuss_hill(
128
+ k1, mu1, f1, k2, mu2, f2, k3, mu3, f3, k4, mu4, f4
129
+ )
130
+ rho_mat = f1 * rho1 + f2 * rho2 + f3 * rho3 + f4 * rho4
131
+ else:
132
+ raise ValueError(
133
+ f'{__file__}: unknown type: {mod_type}, should be one of "SCA", "VRH"'
134
+ )
135
+
136
+ k_mat, mu_mat, rho_mat, k_fl, rho_fl, phi, asp = dim_check_vector(
137
+ (k_mat, mu_mat, rho_mat, k_fl, rho_fl, phi, asp)
138
+ )
139
+ k, mu, rhob = dem_model(
140
+ k_mat, mu_mat, rho_mat, k_fl, np.zeros(len(k_fl)), rho_fl, phi, asp, tol
141
+ )
142
+
143
+ rho_factor = rhob / rhob_inp
144
+
145
+ vp, vs = std_functions.velocity(k, mu, rhob)[0:2]
146
+
147
+ return k, mu, rhob, vp, vs, rho_factor
@@ -0,0 +1,92 @@
1
+ import numpy as np
2
+
3
+ from rock_physics_open.equinor_utilities import std_functions
4
+ from rock_physics_open.equinor_utilities.gen_utilities import dim_check_vector
5
+
6
+ from .dem import dem_model
7
+
8
+
9
+ def shale_4_min_dem_overlay(
10
+ k1,
11
+ mu1,
12
+ rho1,
13
+ k2,
14
+ mu2,
15
+ rho2,
16
+ k3,
17
+ mu3,
18
+ rho3,
19
+ k4,
20
+ mu4,
21
+ rho4,
22
+ k_fl,
23
+ rho_fl,
24
+ phi,
25
+ f1,
26
+ f2,
27
+ prop_clay,
28
+ asp,
29
+ ):
30
+ """
31
+ Simple shale model with mixture of matrix minerals in Voigt-Reuss-Hill
32
+ and DEM inclusion model for fluid filled porosity. The model is aimed at
33
+ overlays in cross-plots where two input fractions are given, and the two
34
+ remaining are given as a proportion.
35
+ Fraction of carbonate and clay is implicit 1 - f1 - f2. f1 and f2 can be set to zero
36
+ All k, mu values in [Pa], rho in [kg/m^3], f, phi, prop_clay, asp in [fraction].
37
+
38
+ Parameters
39
+ ----------
40
+ k1, mu1, rho1 : np.ndarray
41
+ Mineral 1 properties [Quartz and feldspar].
42
+ f1 : np.ndarray
43
+ Fraction of mineral 1.
44
+ k2, mu2, rho2 : np.ndarray
45
+ Mineral 2 properties [Kerogen].
46
+ f2 : np.ndarray
47
+ Fraction of mineral 2.
48
+ k3, mu3, rho3 : np.ndarray
49
+ Mineral 3 properties [Clay].
50
+ k4, mu4, rho4 : np.ndarray
51
+ Mineral 4 properties [Carbonates].
52
+ prop_clay : float
53
+ Range 0 - 1 of the fraction that is clay and carbonate.
54
+ k_fl, rho_fl : np.ndarray
55
+ Fluid properties.
56
+ phi : np.ndarray
57
+ Porosity.
58
+ asp:
59
+ Porosity aspect ratio.
60
+
61
+ Returns
62
+ -------
63
+ tuple
64
+ k, mu, rhob : (np.ndarray, np.ndarray, np.ndarray).
65
+ k - effektive bulk modulus [Pa], mu - effective shear modulus [Pa], rhob - effective density [kg/m^3].
66
+ """
67
+
68
+ # tol: DEM model calculation tolerance <= Set as a hardcoded value, not
69
+ # found to influence the results
70
+ tol = 1e-6
71
+
72
+ # Calculate effective mineral properties
73
+ if np.any((f1 + f2) > 1.0):
74
+ raise ValueError(f"{__file__}: fixed mineral fractions exceed 1.0")
75
+ if np.any(np.logical_or(f1 < 0, f2 < 0)):
76
+ raise ValueError(f"{__file__}: negative mineral fractions")
77
+
78
+ f3 = prop_clay * (1.0 - f1 - f2)
79
+ f4 = (1.0 - prop_clay) * (1.0 - f1 - f2)
80
+ k_mat, mu_mat = std_functions.multi_voigt_reuss_hill(
81
+ k1, mu1, f1, k2, mu2, f2, k3, mu3, f3, k4, mu4, f4
82
+ )
83
+ rho_mat = rho1 * f1 + rho2 * f2 + rho3 * f3 + rho4 * f4
84
+
85
+ k_mat, mu_mat, rho_mat, k_fl, rho_fl, phi, asp = dim_check_vector(
86
+ (k_mat, mu_mat, rho_mat, k_fl, rho_fl, phi, asp)
87
+ )
88
+ k, mu, rhob = dem_model(
89
+ k_mat, mu_mat, rho_mat, k_fl, np.zeros(len(k_fl)), rho_fl, phi, asp, tol
90
+ )
91
+
92
+ return k, mu, rhob
@@ -0,0 +1,5 @@
1
+ from .co2_properties import co2_properties
2
+
3
+ __all__ = [
4
+ "co2_properties",
5
+ ]