gebpy 1.1.3__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 (254) hide show
  1. gebpy/__init__.py +55 -0
  2. gebpy/__pycache__/__init__.cpython-310.pyc +0 -0
  3. gebpy/adapters/__init__.py +0 -0
  4. gebpy/cli/__init__.py +0 -0
  5. gebpy/core/__init__.py +0 -0
  6. gebpy/core/chemistry/__init__.py +0 -0
  7. gebpy/core/chemistry/common.py +1369 -0
  8. gebpy/core/chemistry/elements.py +317 -0
  9. gebpy/core/chemistry/geochemistry.py +1728 -0
  10. gebpy/core/fluids/__init__.py +0 -0
  11. gebpy/core/io/__init__.py +0 -0
  12. gebpy/core/mathematics/__init__.py +0 -0
  13. gebpy/core/minerals/__init__.py +0 -0
  14. gebpy/core/minerals/carbonates.py +412 -0
  15. gebpy/core/minerals/common.py +555 -0
  16. gebpy/core/minerals/config.py +77 -0
  17. gebpy/core/minerals/cyclosilicates.py +0 -0
  18. gebpy/core/minerals/halides.py +0 -0
  19. gebpy/core/minerals/inosilicates.py +0 -0
  20. gebpy/core/minerals/nesosilicates.py +0 -0
  21. gebpy/core/minerals/organics.py +0 -0
  22. gebpy/core/minerals/oxides.py +589 -0
  23. gebpy/core/minerals/phosphates.py +0 -0
  24. gebpy/core/minerals/phospides.py +0 -0
  25. gebpy/core/minerals/phyllosilicates.py +436 -0
  26. gebpy/core/minerals/sorosilicates.py +0 -0
  27. gebpy/core/minerals/sulfates.py +0 -0
  28. gebpy/core/minerals/sulfides.py +459 -0
  29. gebpy/core/minerals/synthesis.py +201 -0
  30. gebpy/core/minerals/tectosilicates.py +433 -0
  31. gebpy/core/physics/__init__.py +0 -0
  32. gebpy/core/physics/common.py +53 -0
  33. gebpy/core/physics/geophysics.py +351 -0
  34. gebpy/core/rocks/__init__.py +0 -0
  35. gebpy/core/rocks/anisotropic_rocks.py +395 -0
  36. gebpy/core/rocks/common.py +95 -0
  37. gebpy/core/rocks/config.py +77 -0
  38. gebpy/core/rocks/isotropic_rocks.py +395 -0
  39. gebpy/core/rocks/sedimentary.py +385 -0
  40. gebpy/core/subsurface/__init__.py +0 -0
  41. gebpy/data_minerals/__init__.py +0 -0
  42. gebpy/data_minerals/albite.yaml +59 -0
  43. gebpy/data_minerals/anatase.yaml +43 -0
  44. gebpy/data_minerals/ankerite.yaml +47 -0
  45. gebpy/data_minerals/annite.yaml +57 -0
  46. gebpy/data_minerals/anorthite.yaml +59 -0
  47. gebpy/data_minerals/antigorite.yaml +53 -0
  48. gebpy/data_minerals/aragonite.yaml +48 -0
  49. gebpy/data_minerals/argutite.yaml +43 -0
  50. gebpy/data_minerals/arsenolite.yaml +40 -0
  51. gebpy/data_minerals/au3oxide.yaml +46 -0
  52. gebpy/data_minerals/avicennite.yaml +40 -0
  53. gebpy/data_minerals/azurite.yaml +53 -0
  54. gebpy/data_minerals/baddeleyite.yaml +49 -0
  55. gebpy/data_minerals/bismite.yaml +49 -0
  56. gebpy/data_minerals/boehmite.yaml +48 -0
  57. gebpy/data_minerals/brookite.yaml +46 -0
  58. gebpy/data_minerals/brucite.yaml +45 -0
  59. gebpy/data_minerals/bunsenite.yaml +40 -0
  60. gebpy/data_minerals/calcite.yaml +45 -0
  61. gebpy/data_minerals/cassiterite.yaml +43 -0
  62. gebpy/data_minerals/cerussite.yaml +48 -0
  63. gebpy/data_minerals/chamosite.yaml +56 -0
  64. gebpy/data_minerals/chlorite.yaml +75 -0
  65. gebpy/data_minerals/chromite.yaml +42 -0
  66. gebpy/data_minerals/chrysotile.yaml +53 -0
  67. gebpy/data_minerals/claudetite.yaml +49 -0
  68. gebpy/data_minerals/clinochlore.yaml +55 -0
  69. gebpy/data_minerals/cochromite.yaml +42 -0
  70. gebpy/data_minerals/corundum.yaml +43 -0
  71. gebpy/data_minerals/crocoite.yaml +51 -0
  72. gebpy/data_minerals/cuprite.yaml +40 -0
  73. gebpy/data_minerals/cuprospinel.yaml +42 -0
  74. gebpy/data_minerals/diaspore.yaml +48 -0
  75. gebpy/data_minerals/dolomite.yaml +47 -0
  76. gebpy/data_minerals/eastonite.yaml +57 -0
  77. gebpy/data_minerals/eskolaite.yaml +43 -0
  78. gebpy/data_minerals/fechlorite.yaml +61 -0
  79. gebpy/data_minerals/fecolumbite.yaml +48 -0
  80. gebpy/data_minerals/ferberite.yaml +51 -0
  81. gebpy/data_minerals/fetantalite.yaml +48 -0
  82. gebpy/data_minerals/franklinite.yaml +42 -0
  83. gebpy/data_minerals/gahnite.yaml +42 -0
  84. gebpy/data_minerals/galaxite.yaml +42 -0
  85. gebpy/data_minerals/geikielite.yaml +45 -0
  86. gebpy/data_minerals/gibbsite.yaml +51 -0
  87. gebpy/data_minerals/glauconite.yaml +69 -0
  88. gebpy/data_minerals/goethite.yaml +48 -0
  89. gebpy/data_minerals/groutite.yaml +48 -0
  90. gebpy/data_minerals/hematite.yaml +43 -0
  91. gebpy/data_minerals/hercynite.yaml +42 -0
  92. gebpy/data_minerals/huebnerite.yaml +51 -0
  93. gebpy/data_minerals/ikaite.yaml +53 -0
  94. gebpy/data_minerals/illite.yaml +55 -0
  95. gebpy/data_minerals/ilmenite.yaml +45 -0
  96. gebpy/data_minerals/jacobsite.yaml +42 -0
  97. gebpy/data_minerals/kalsilite.yaml +47 -0
  98. gebpy/data_minerals/kaolinite.yaml +59 -0
  99. gebpy/data_minerals/karelianite.yaml +43 -0
  100. gebpy/data_minerals/lime.yaml +40 -0
  101. gebpy/data_minerals/litharge.yaml +43 -0
  102. gebpy/data_minerals/magnesiochromite.yaml +42 -0
  103. gebpy/data_minerals/magnesioferrite.yaml +42 -0
  104. gebpy/data_minerals/magnesite.yaml +45 -0
  105. gebpy/data_minerals/magnetite.yaml +41 -0
  106. gebpy/data_minerals/malachite.yaml +53 -0
  107. gebpy/data_minerals/manganite.yaml +51 -0
  108. gebpy/data_minerals/manganochromite.yaml +42 -0
  109. gebpy/data_minerals/manganosite.yaml +40 -0
  110. gebpy/data_minerals/marialite.yaml +49 -0
  111. gebpy/data_minerals/massicot.yaml +46 -0
  112. gebpy/data_minerals/meionite.yaml +49 -0
  113. gebpy/data_minerals/mgchlorite.yaml +61 -0
  114. gebpy/data_minerals/mgcolumbite.yaml +48 -0
  115. gebpy/data_minerals/mgtantalite.yaml +48 -0
  116. gebpy/data_minerals/microcline.yaml +59 -0
  117. gebpy/data_minerals/minium.yaml +44 -0
  118. gebpy/data_minerals/mnchlorite.yaml +61 -0
  119. gebpy/data_minerals/mncolumbite.yaml +48 -0
  120. gebpy/data_minerals/mntantalite.yaml +48 -0
  121. gebpy/data_minerals/monteponite.yaml +40 -0
  122. gebpy/data_minerals/montmorillonite.yaml +77 -0
  123. gebpy/data_minerals/muscovite.yaml +55 -0
  124. gebpy/data_minerals/nanepheline.yaml +47 -0
  125. gebpy/data_minerals/nichlorite.yaml +61 -0
  126. gebpy/data_minerals/nichromite.yaml +42 -0
  127. gebpy/data_minerals/nimite.yaml +55 -0
  128. gebpy/data_minerals/nontronite.yaml +73 -0
  129. gebpy/data_minerals/orthoclase.yaml +53 -0
  130. gebpy/data_minerals/paratellurite.yaml +43 -0
  131. gebpy/data_minerals/pennantite.yaml +61 -0
  132. gebpy/data_minerals/periclase.yaml +40 -0
  133. gebpy/data_minerals/phlogopite.yaml +57 -0
  134. gebpy/data_minerals/plattnerite.yaml +43 -0
  135. gebpy/data_minerals/powellite.yaml +45 -0
  136. gebpy/data_minerals/pyrite.yaml +40 -0
  137. gebpy/data_minerals/pyrolusite.yaml +43 -0
  138. gebpy/data_minerals/pyrophanite.yaml +45 -0
  139. gebpy/data_minerals/pyrophyllite.yaml +59 -0
  140. gebpy/data_minerals/quartz.yaml +43 -0
  141. gebpy/data_minerals/rhodochrosite.yaml +45 -0
  142. gebpy/data_minerals/rutile.yaml +43 -0
  143. gebpy/data_minerals/saponite.yaml +77 -0
  144. gebpy/data_minerals/scheelite.yaml +45 -0
  145. gebpy/data_minerals/scrutinyite.yaml +46 -0
  146. gebpy/data_minerals/senarmontite.yaml +40 -0
  147. gebpy/data_minerals/siderite.yaml +45 -0
  148. gebpy/data_minerals/siderophyllite.yaml +57 -0
  149. gebpy/data_minerals/smithsonite.yaml +45 -0
  150. gebpy/data_minerals/spinel.yaml +42 -0
  151. gebpy/data_minerals/stishovite.yaml +43 -0
  152. gebpy/data_minerals/stolzite.yaml +45 -0
  153. gebpy/data_minerals/talc.yaml +53 -0
  154. gebpy/data_minerals/tistarite.yaml +43 -0
  155. gebpy/data_minerals/trevorite.yaml +42 -0
  156. gebpy/data_minerals/ulvoespinel.yaml +42 -0
  157. gebpy/data_minerals/uraninite.yaml +40 -0
  158. gebpy/data_minerals/valentinite.yaml +46 -0
  159. gebpy/data_minerals/vermiculite.yaml +69 -0
  160. gebpy/data_minerals/wulfenite.yaml +45 -0
  161. gebpy/data_minerals/wustite.yaml +40 -0
  162. gebpy/data_minerals/zincite.yaml +43 -0
  163. gebpy/data_minerals/zincochromite.yaml +42 -0
  164. gebpy/data_rocks/__init__.py +0 -0
  165. gebpy/data_rocks/dolostone.yaml +40 -0
  166. gebpy/data_rocks/limestone.yaml +40 -0
  167. gebpy/data_rocks/marl.yaml +50 -0
  168. gebpy/data_rocks/sandstone.yaml +39 -0
  169. gebpy/data_rocks/shale.yaml +50 -0
  170. gebpy/gebpy_app.py +8732 -0
  171. gebpy/gui/__init__.py +0 -0
  172. gebpy/lib/images/GebPy_Header.png +0 -0
  173. gebpy/lib/images/GebPy_Icon.png +0 -0
  174. gebpy/lib/images/GebPy_Logo.png +0 -0
  175. gebpy/main.py +29 -0
  176. gebpy/modules/__init__.py +0 -0
  177. gebpy/modules/__pycache__/__init__.cpython-310.pyc +0 -0
  178. gebpy/modules/__pycache__/metamorphics.cpython-310.pyc +0 -0
  179. gebpy/modules/__pycache__/silicates.cpython-310.pyc +0 -0
  180. gebpy/modules/carbonates.py +2658 -0
  181. gebpy/modules/chemistry.py +1369 -0
  182. gebpy/modules/core.py +1805 -0
  183. gebpy/modules/elements.py +317 -0
  184. gebpy/modules/evaporites.py +1299 -0
  185. gebpy/modules/exploration.py +1145 -0
  186. gebpy/modules/fluids.py +339 -0
  187. gebpy/modules/geochemistry.py +1727 -0
  188. gebpy/modules/geophysics.py +351 -0
  189. gebpy/modules/gui.py +9093 -0
  190. gebpy/modules/gui_elements.py +145 -0
  191. gebpy/modules/halides.py +485 -0
  192. gebpy/modules/igneous.py +2241 -0
  193. gebpy/modules/metamorphics.py +3222 -0
  194. gebpy/modules/mineralogy.py +442 -0
  195. gebpy/modules/minerals.py +7954 -0
  196. gebpy/modules/ore.py +1648 -0
  197. gebpy/modules/organics.py +530 -0
  198. gebpy/modules/oxides.py +9057 -0
  199. gebpy/modules/petrophysics.py +98 -0
  200. gebpy/modules/phosphates.py +589 -0
  201. gebpy/modules/phospides.py +194 -0
  202. gebpy/modules/plotting.py +619 -0
  203. gebpy/modules/pyllosilicates.py +380 -0
  204. gebpy/modules/sedimentary_rocks.py +908 -0
  205. gebpy/modules/sequences.py +2166 -0
  206. gebpy/modules/series.py +1625 -0
  207. gebpy/modules/silicates.py +11102 -0
  208. gebpy/modules/siliciclastics.py +1846 -0
  209. gebpy/modules/subsurface_2d.py +179 -0
  210. gebpy/modules/sulfates.py +1629 -0
  211. gebpy/modules/sulfides.py +4786 -0
  212. gebpy/plotting/__init__.py +0 -0
  213. gebpy/ui_nb/__init__.py +0 -0
  214. gebpy/user_data/.gitkeep +0 -0
  215. gebpy-1.1.3.dist-info/LICENSE +165 -0
  216. gebpy-1.1.3.dist-info/METADATA +207 -0
  217. gebpy-1.1.3.dist-info/RECORD +254 -0
  218. gebpy-1.1.3.dist-info/WHEEL +5 -0
  219. gebpy-1.1.3.dist-info/entry_points.txt +2 -0
  220. gebpy-1.1.3.dist-info/top_level.txt +1 -0
  221. modules/__init__.py +0 -0
  222. modules/carbonates.py +2658 -0
  223. modules/chemistry.py +1369 -0
  224. modules/core.py +1805 -0
  225. modules/elements.py +317 -0
  226. modules/evaporites.py +1299 -0
  227. modules/exploration.py +765 -0
  228. modules/fluids.py +339 -0
  229. modules/geochemistry.py +1727 -0
  230. modules/geophysics.py +337 -0
  231. modules/gui.py +9093 -0
  232. modules/gui_elements.py +145 -0
  233. modules/halides.py +485 -0
  234. modules/igneous.py +2196 -0
  235. modules/metamorphics.py +2699 -0
  236. modules/mineralogy.py +442 -0
  237. modules/minerals.py +7954 -0
  238. modules/ore.py +1628 -0
  239. modules/organics.py +530 -0
  240. modules/oxides.py +9057 -0
  241. modules/petrophysics.py +98 -0
  242. modules/phosphates.py +589 -0
  243. modules/phospides.py +194 -0
  244. modules/plotting.py +619 -0
  245. modules/pyllosilicates.py +380 -0
  246. modules/sedimentary_rocks.py +908 -0
  247. modules/sequences.py +2166 -0
  248. modules/series.py +1625 -0
  249. modules/silicates.py +11102 -0
  250. modules/siliciclastics.py +1830 -0
  251. modules/subsurface_2d.py +179 -0
  252. modules/sulfates.py +1629 -0
  253. modules/sulfides.py +4786 -0
  254. notebooks/__init__.py +0 -0
@@ -0,0 +1,351 @@
1
+ #!/usr/bin/env python
2
+ # -*-coding: utf-8 -*-
3
+
4
+ #-----------------------------------------------
5
+
6
+ # Name: geophysics.py
7
+ # Author: Maximilian A. Beeskow
8
+ # Version: 1.0
9
+ # Date: 15.12.2025
10
+
11
+ #-----------------------------------------------
12
+
13
+ ## MODULES
14
+ import numpy as np
15
+ from numpy import round
16
+ from random import *
17
+ from scipy import signal
18
+
19
+ class geophysics:
20
+ #
21
+ def __init__(self, sequences):
22
+ self.sequences = sequences
23
+ #
24
+ def calculatePressure(self):
25
+ data = [0]
26
+ g = 9.81
27
+ for i in range(0, len(self.sequences)):
28
+ data.append(data[i]+self.sequences[i][4]*1000*g*(self.sequences[i][3]-self.sequences[i][2]))
29
+ #
30
+ return data
31
+ #
32
+ def calculateTemperature(self):
33
+ data = [randint(0, 25)]
34
+ a = 30/1000
35
+ for i in range(0, len(self.sequences)):
36
+ data.append(round(data[0]+self.sequences[i][3]*a, 1))
37
+ #
38
+ return data
39
+ #
40
+ def calculateTTI(self):
41
+ dataTTI = []
42
+ for i in range(0, len(self.sequences)):
43
+ dataTTI.append([self.sequences[i][0]])
44
+ dataTTI[i].append([self.sequences[i][2], self.sequences[i][3]])
45
+ dataTTI[i].append([(1-0.01*self.sequences[i][7])*1/self.sequences[i][5][0]+0.01*self.sequences[i][7]*1/self.sequences[i][5][3]])
46
+ return dataTTI
47
+ #
48
+ class seismics:
49
+ #
50
+ def __init__(self, input):
51
+ self.input = input
52
+ #
53
+ def calculateImpedance(self):
54
+ # input = sequences
55
+ density = []
56
+ velocity = []
57
+ impedance = []
58
+ for i in range(0, len(self.input)):
59
+ density.append(self.input[i][4]*1000)
60
+ velocity.append(self.input[i][5][0])
61
+ impedance.append(density[i]*velocity[i])
62
+ #
63
+ return impedance
64
+ #
65
+ def calculateReflection(self):
66
+ # input = impedance
67
+ reflection = [0]
68
+ for i in range(1, len(self.input)):
69
+ reflection.append((self.input[i]-self.input[i-1])/(self.input[i]+self.input[i-1]))
70
+ #
71
+ return reflection
72
+ #
73
+ def calculatet0(self):
74
+ # input = sequences
75
+ velocity = []
76
+ thickness = []
77
+ t = []
78
+ t0 = []
79
+ for i in range(0, len(self.input)):
80
+ velocity.append(self.input[i][5][0])
81
+ thickness.append(self.input[i][1])
82
+ t.append((2*thickness[i])/velocity[i])
83
+ for j in range(1, len(t)+1):
84
+ t0.append(sum(t[:j]))
85
+ #
86
+ return t0
87
+ #
88
+ def calculate_travel_times(self):
89
+ # input = sequences
90
+ velocities = np.array(self.input)
91
+ v_p = velocities[:,0]
92
+ v_s = velocities[:,1]
93
+ dtc = 1/v_p*10**6
94
+ dts = 1/v_s*10**6
95
+ #
96
+ return dtc, dts
97
+ #
98
+ class Seismology:
99
+ #
100
+ def __init__(self,):
101
+ pass
102
+ #
103
+ def calculate_impedance(self, velocity=None, density=None, data_all=None):
104
+ """Returns an array that contains the impedance values of the previously generated rock units.
105
+ **Arguments**:
106
+ velocity: array, list of velocity values
107
+ density: array, list of density values
108
+ **Outputs**:
109
+ data: array of seismic impedance values
110
+ """
111
+ if data_all == None and velocity != None and density != None:
112
+ data = velocity*density
113
+ else:
114
+ density = []
115
+ velocity = []
116
+ for i in range(len(data_all)):
117
+ for j in range(len(data_all[i])):
118
+ density.append(data_all[i][j][4][1][0])
119
+ velocity.append(data_all[i][j][4][3][0])
120
+ data = np.array(velocity)*np.array(density)
121
+ #
122
+ return data
123
+ #
124
+ def calculate_reflection_coefficient(self, impedance):
125
+ """Returns an array that contains the reflection coefficient values of the previously generated rock units.
126
+ **Arguments**:
127
+ impedance: array, list of impedance values
128
+ **Outputs**:
129
+ data: array of reflection coefficient values
130
+ """
131
+ data = [0]
132
+ for i in range(1, len(impedance)):
133
+ data.append((impedance[i]-impedance[i-1])/(impedance[i]+impedance[i-1]))
134
+ #
135
+ return np.array(data)
136
+ #
137
+ def calculate_transmission_coefficient(self, impedance):
138
+ """Returns an array that contains the transmission coefficient values of the previously generated rock units.
139
+ **Arguments**:
140
+ impedance: array, list of impedance values
141
+ **Outputs**:
142
+ data: array of transmission coefficient values
143
+ """
144
+ data = []
145
+ for i in range(1, len(impedance)):
146
+ data.append((2*impedance[i-1])/(impedance[i]+impedance[i-1]))
147
+ #
148
+ return np.array(data)
149
+ #
150
+ def calculate_t0(self, thickness, velocity):
151
+ """Returns an array that contains the two-way travel times of the previously generated rock units.
152
+ **Arguments**:
153
+ thickness: array, list of thickness values
154
+ velocity: array, list of velocity values
155
+ **Outputs**:
156
+ data: array of two-way travel times
157
+ """
158
+ data = (2*thickness)/(velocity)
159
+ #
160
+ return np.array(data)
161
+ #
162
+ def create_seismic_trace(self, reflection=None, data_all=None):
163
+ """Returns an array that contains the seismic trace based on the input data.
164
+ **Arguments**:
165
+ reflection: array, list of reflection coefficient values
166
+ **Outputs**:
167
+ data: array of seismic trace values
168
+ """
169
+ if data_all == None and reflection != None:
170
+ points = len(reflection)
171
+ width = points/100
172
+ else:
173
+ density = []
174
+ velocity = []
175
+ for i in range(len(data_all)):
176
+ for j in range(len(data_all[i])):
177
+ density.append(data_all[i][j][4][1][0])
178
+ velocity.append(data_all[i][j][4][3][0])
179
+ impedance = np.array(velocity)*np.array(density)
180
+ reflection = [0]
181
+ for i in range(1, len(impedance)):
182
+ reflection.append((impedance[i]-impedance[i-1])/(impedance[i]+impedance[i-1]))
183
+ points = len(reflection)
184
+ width = points/100
185
+ wavelet = signal.ricker(points, width)
186
+ data = signal.convolve(reflection, wavelet, mode="same")
187
+ #
188
+ return data
189
+
190
+ def create_seismic_trace_new(self, data_reflection):
191
+ """Returns an array that contains the seismic trace based on the input data.
192
+ **Arguments**:
193
+ data_reflection: array, list of reflection coefficient values
194
+ **Outputs**:
195
+ data: array of seismic trace values
196
+ """
197
+ points = len(data_reflection)
198
+ width = points/100
199
+ wavelet = signal.ricker(points, width)
200
+ data = signal.convolve(data_reflection, wavelet, mode="same")
201
+
202
+ return data
203
+ #
204
+ class Mixing:
205
+ #
206
+ def __init__(self,):
207
+ pass
208
+ #
209
+ def mean_arithmetic(self, weight, value):
210
+ """Returns the arithmetic mean of a property considering a mixture
211
+ **Arguments**:
212
+ weight: array of weights
213
+ value: array of property values
214
+ **Outputs**:
215
+ result: bulk property with respect to the arithmetic mean
216
+ """
217
+ result = np.sum(weight*value)
218
+ return result
219
+ #
220
+ def mean_harmonic(self, weight, value):
221
+ """Returns the harmonic mean of a property considering a mixture
222
+ **Arguments**:
223
+ weight: array of weights
224
+ value: array of property values
225
+ **Outputs**:
226
+ result: bulk property with respect to the harmonic mean
227
+ """
228
+ result = (np.sum(weight/value))**(-1)
229
+ return result
230
+ #
231
+ def mean_geometric(self, weight, value):
232
+ """Returns the geometric mean of a property considering a mixture
233
+ **Arguments**:
234
+ weight: array of weights
235
+ value: array of property values
236
+ **Outputs**:
237
+ result: bulk property with respect to the geometric mean
238
+ """
239
+ result = np.prod(value**weight)
240
+ return result
241
+ #
242
+ def mean_squarerootmean(self, weight, value):
243
+ """Returns the square-root mean of a property considering a mixture
244
+ **Arguments**:
245
+ weight: array of weights
246
+ value: array of property values
247
+ **Outputs**:
248
+ result: bulk property with respect to the square-root mean
249
+ """
250
+ result = (np.sum(weight*np.sqrt(value)))**2
251
+ return result
252
+ #
253
+ class Elasticity:
254
+ #
255
+ def __init__(self,):
256
+ pass
257
+ #
258
+ def calc_voigt_bound(self, f, m):
259
+ M = 0
260
+ for i in range(len(f)):
261
+ M += f[i]*m[i]
262
+ return M
263
+ #
264
+ def calc_reuss_bound(self, f, m):
265
+ Minv = 0
266
+ for i in range(len(f)):
267
+ Minv += f[i]*(1/m[i])
268
+ M = 1/Minv
269
+ return M
270
+ #
271
+ def calc_vrh(self, mv, mr):
272
+ M = (mv+mr)/2
273
+ return M
274
+ #
275
+ def calc_harmonic_mean(self, f, m):
276
+ n = np.sum(f)
277
+ a = 0
278
+ for i in range(len(f)):
279
+ a += f[i]/m[i]
280
+ M = n/a
281
+ return M
282
+ #
283
+ def calc_geometric_mean(self, f, m):
284
+ a = 1
285
+ for i in range(len(f)):
286
+ if m[i] > 0:
287
+ a *= m[i]**f[i]
288
+ M = a**(1/np.sum(f))
289
+ return M
290
+ #
291
+ def calc_arithmetic_mean(self, f, m):
292
+ a = 0
293
+ for i in range(len(f)):
294
+ a += f[i]*m[i]
295
+ M = a/(np.sum(f))
296
+ return M
297
+ #
298
+ class BoreholeGeophysics:
299
+ #
300
+ def __init__(self,):
301
+ pass
302
+ #
303
+ def calculate_pe(self, x_list, elements_list):
304
+ contributions = [x_list[i]*(elements_list[i][1]/10)**3.6 for i in range(len(x_list))]
305
+ pe = 0.9115*np.sum(contributions)
306
+ return pe
307
+ #
308
+ class WellLog:
309
+ #
310
+ def __init__(self, amounts=None, elements=None, rho_b=None):
311
+ self.amounts = amounts
312
+ self.elements = elements
313
+ self.rho_b = rho_b
314
+ #
315
+ def calculate_gr(self):
316
+ gr = 0
317
+ for i in range(len(self.elements)):
318
+ if self.elements[i][0] == "K":
319
+ gr += Conversions(amount=self.amounts[i][2]).convert_to_percent()*16
320
+ elif self.elements[i][0] == "Th":
321
+ gr += Conversions(amount=self.amounts[i][2]).convert_to_ppm()*4
322
+ elif self.elements[i][0] == "U":
323
+ gr += Conversions(amount=self.amounts[i][2]).convert_to_ppm()*8
324
+ else:
325
+ gr += 0
326
+ return gr
327
+ #
328
+ def calculate_pe(self):
329
+ pe = 0
330
+ for i in range(len(self.elements)):
331
+ pe += self.amounts[i][2]*(self.elements[i][1]/10)**3.6
332
+ return pe
333
+ #
334
+ def calculate_electron_density(self):
335
+ rho_e = 0
336
+ for i in range(len(self.elements)):
337
+ rho_e += self.amounts[i][2]*(2*self.elements[i][1]/self.elements[i][2])*self.rho_b
338
+ return rho_e
339
+
340
+ class Conversions:
341
+ #
342
+ def __init__(self, amount):
343
+ self.amount = amount
344
+ #
345
+ def convert_to_percent(self):
346
+ result = self.amount*10**2
347
+ return result
348
+ #
349
+ def convert_to_ppm(self):
350
+ result = self.amount*10**6
351
+ return result
File without changes