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,2166 @@
1
+ #!/usr/bin/env python
2
+ # -*-coding: utf-8 -*-
3
+
4
+ #-----------------------------------------------
5
+
6
+ # Name: sequences.py
7
+ # Author: Maximilian A. Beeskow
8
+ # Version: 1.0
9
+ # Date: 17.05.2023
10
+
11
+ #-----------------------------------------------
12
+
13
+ ## MODULES
14
+ import sys
15
+ import numpy as np
16
+ from numpy import round
17
+ import random as rd
18
+ from random import randint
19
+ from modules.carbonates import limestone, dolomite
20
+ from modules.siliciclastics import sandstone, shale, Soil
21
+ from modules.igneous import plutonic, volcanic, Plutonic, Volcanic
22
+ from modules.evaporites import evaporites, Evaporites
23
+ from modules import minerals
24
+ from modules.elements import elements
25
+ from modules import fluids
26
+
27
+ class DataProcessing:
28
+ #
29
+ def __init__(self, dataset):
30
+ self.dataset = dataset
31
+ #
32
+ def extract_lithology(self, type="sequence"):
33
+ """Returns a list that contains the lithology of a previously generated sequence or the name of a rock.
34
+ **Arguments**:
35
+ type: sequence, rock
36
+ **Outputs**:
37
+ data: list of rock names
38
+ """
39
+ data = []
40
+ if type == "sequence":
41
+ for i in range(len(self.dataset)):
42
+ for j in range(len(self.dataset[i])):
43
+ data.append(self.dataset[i][j][0])
44
+ else:
45
+ data.append(self.dataset[0][0])
46
+ #
47
+ return data
48
+ #
49
+ def extract_thickness(self, type="sequence"):
50
+ """Returns a list that contains the thickness of previously generated rock units.
51
+ **Arguments**:
52
+ type: sequence, rock
53
+ **Outputs**:
54
+ data: list of thicknesses
55
+ """
56
+ data = []
57
+ if type == "sequence":
58
+ for i in range(len(self.dataset)):
59
+ for j in range(len(self.dataset[i])):
60
+ data.append(self.dataset[i][j][1])
61
+ else:
62
+ for i in range(len(self.dataset)):
63
+ data.append(self.dataset[i][1])
64
+ #
65
+ return np.array(data)
66
+ #
67
+ def extract_top(self, type="sequence"):
68
+ """Returns a list that contains the top depths of previously generated rock units.
69
+ **Arguments**:
70
+ type: sequence, rock
71
+ **Outputs**:
72
+ data: list of top depths
73
+ """
74
+ data = []
75
+ if type == "sequence":
76
+ for i in range(len(self.dataset)):
77
+ for j in range(len(self.dataset[i])):
78
+ data.append(self.dataset[i][j][2])
79
+ else:
80
+ for i in range(len(self.dataset)):
81
+ data.append(self.dataset[i][2])
82
+ #
83
+ return np.array(data)
84
+ #
85
+ def extract_bottom(self, type="sequence"):
86
+ """Returns a list that contains the bottom depths of previously generated rock units.
87
+ **Arguments**:
88
+ type: sequence, rock
89
+ **Outputs**:
90
+ data: list of bottom depths
91
+ """
92
+ data = []
93
+ if type == "sequence":
94
+ for i in range(len(self.dataset)):
95
+ for j in range(len(self.dataset[i])):
96
+ data.append(self.dataset[i][j][3])
97
+ else:
98
+ for i in range(len(self.dataset)):
99
+ data.append(self.dataset[i][3])
100
+ #
101
+ return np.array(data)
102
+ #
103
+ def extract_mineralogy(self, type="sequence"):
104
+ """Returns a list that contains the mineralogical assemblage of the previously generated rock units.
105
+ **Arguments**:
106
+ type: sequence, rock
107
+ **Outputs**:
108
+ data: list of incorporated minerals
109
+ """
110
+ data = []
111
+ if type == "sequence":
112
+ for i in range(len(self.dataset)):
113
+ for j in range(len(self.dataset[i])):
114
+ data.append(self.dataset[i][j][4][0][1])
115
+ else:
116
+ data = self.dataset[0][4][0][1]
117
+ #
118
+ return data
119
+ #
120
+ def extract_elements(self, type="sequence"):
121
+ """Returns a list that contains the chemical elements incorporated in the previously generated rock units.
122
+ **Arguments**:
123
+ type: sequence, rock
124
+ **Outputs**:
125
+ data: list of incorporated elements
126
+ """
127
+ data = []
128
+ if type == "sequence":
129
+ for i in range(len(self.dataset)):
130
+ for j in range(len(self.dataset[i])):
131
+ data.append(self.dataset[i][j][4][0][0])
132
+ else:
133
+ data = self.dataset[0][4][0][0]
134
+ #
135
+ return data
136
+ #
137
+ def extract_molar_mass(self):
138
+ """Returns a list that contains the molar mass of the previously generated minerals.
139
+ **Arguments**:
140
+ **Outputs**:
141
+ data: list of molar masses
142
+ """
143
+ data = []
144
+ for i in range(len(self.dataset)):
145
+ data.append(self.dataset[i][1])
146
+ #
147
+ return np.array(data)
148
+ #
149
+ def extract_densities(self, type="sequence", keyword="bulk", dict=False):
150
+ """Returns a list that contains the densities of the previously generated rock units.
151
+ **Arguments**:
152
+ type: sequence, rock
153
+ keyword: all, bulk, solid, fluid
154
+ **Outputs**:
155
+ data: list of densities
156
+ """
157
+ data = []
158
+ if type == "sequence":
159
+ for i in range(len(self.dataset)):
160
+ for j in range(len(self.dataset[i])):
161
+ if keyword == "all":
162
+ data.append(self.dataset[i][j][4][1])
163
+ elif keyword == "bulk":
164
+ data.append(self.dataset[i][j][4][1][0])
165
+ elif keyword == "solid":
166
+ data.append(self.dataset[i][j][4][1][1])
167
+ elif keyword == "fluid":
168
+ data.append(self.dataset[i][j][4][1][2])
169
+ elif type == "random":
170
+ for i in range(len(self.dataset)):
171
+ if keyword == "all":
172
+ data.append(self.dataset[i][1])
173
+ elif keyword == "bulk":
174
+ data.append(self.dataset[i][1][0])
175
+ elif keyword == "solid":
176
+ data.append(self.dataset[i][1][1])
177
+ elif keyword == "fluid":
178
+ data.append(self.dataset[i][1][2])
179
+ elif type == "mineral":
180
+ for i in range(len(self.dataset)):
181
+ data.append(self.dataset[i][2])
182
+ elif type == "rock":
183
+ for i in range(len(self.dataset)):
184
+ if dict == False:
185
+ data.append(self.dataset[i][2])
186
+ else:
187
+ data.append(self.dataset[i]["rho"])
188
+ else:
189
+ for i in range(len(self.dataset)):
190
+ if keyword == "all":
191
+ data.append(self.dataset[i][4][1])
192
+ elif keyword == "bulk":
193
+ data.append(self.dataset[i][4][1][0])
194
+ elif keyword == "solid":
195
+ data.append(self.dataset[i][4][1][1])
196
+ elif keyword == "fluid":
197
+ data.append(self.dataset[i][4][1][2])
198
+ #
199
+ return np.array(data)
200
+ #
201
+ def extract_elastic_moduli(self, type="sequence", keyword="bulk", dict=False):
202
+ """Returns a list that contains the elastic moduli of the previously generated rock units.
203
+ **Arguments**:
204
+ type: sequence, rock
205
+ **Outputs**:
206
+ data: list of elastic moduli
207
+ """
208
+ data = []
209
+ if type == "sequence":
210
+ for i in range(len(self.dataset)):
211
+ for j in range(len(self.dataset[i])):
212
+ if keyword == "all":
213
+ data.append(self.dataset[i][j][4][2])
214
+ elif keyword == "bulk" or keyword == "K":
215
+ data.append(self.dataset[i][j][4][2][0])
216
+ elif keyword == "shear" or keyword == "G":
217
+ data.append(self.dataset[i][j][4][2][1])
218
+ elif keyword == "young" or keyword == "E":
219
+ data.append(self.dataset[i][j][4][2][2])
220
+ elif keyword == "poisson" or keyword == "nu":
221
+ data.append(self.dataset[i][j][4][2][3])
222
+ elif type == "random":
223
+ for i in range(len(self.dataset)):
224
+ if keyword == "all":
225
+ data.append(self.dataset[i][2])
226
+ elif keyword == "bulk" or keyword == "K":
227
+ data.append(self.dataset[i][2][0])
228
+ elif keyword == "shear" or keyword == "G":
229
+ data.append(self.dataset[i][2][1])
230
+ elif keyword == "young" or keyword == "E":
231
+ data.append(self.dataset[i][2][2])
232
+ elif keyword == "poisson" or keyword == "nu":
233
+ data.append(self.dataset[i][2][3])
234
+ elif type == "mineral":
235
+ for i in range(len(self.dataset)):
236
+ if keyword == "all":
237
+ data.append(self.dataset[i][3])
238
+ elif keyword == "bulk" or keyword == "K":
239
+ data.append(self.dataset[i][3][0])
240
+ elif keyword == "shear" or keyword == "G":
241
+ data.append(self.dataset[i][3][1])
242
+ elif keyword == "young" or keyword == "E":
243
+ data.append(self.dataset[i][3][2])
244
+ elif keyword == "poisson" or keyword == "nu":
245
+ data.append(self.dataset[i][3][3])
246
+ elif type == "rock":
247
+ for i in range(len(self.dataset)):
248
+ if dict == False:
249
+ if keyword == "all":
250
+ data.append(self.dataset[i][2])
251
+ elif keyword == "bulk" or keyword == "K":
252
+ data.append(self.dataset[i][2][0])
253
+ elif keyword == "shear" or keyword == "G":
254
+ data.append(self.dataset[i][2][1])
255
+ elif keyword == "young" or keyword == "E":
256
+ data.append(self.dataset[i][2][2])
257
+ elif keyword == "poisson" or keyword == "nu":
258
+ data.append(self.dataset[i][2][3])
259
+ else:
260
+ data.append(self.dataset[i][keyword])
261
+ else:
262
+ for i in range(len(self.dataset)):
263
+ if keyword == "all":
264
+ data.append(self.dataset[i][4][2])
265
+ elif keyword == "bulk" or keyword == "K":
266
+ data.append(self.dataset[i][4][2][0])
267
+ elif keyword == "shear" or keyword == "G":
268
+ data.append(self.dataset[i][4][2][1])
269
+ elif keyword == "young" or keyword == "E":
270
+ data.append(self.dataset[i][4][2][2])
271
+ elif keyword == "poisson" or keyword == "nu":
272
+ data.append(self.dataset[i][4][2][3])
273
+ #
274
+ return np.array(data)
275
+ #
276
+ def extract_seismic_velocities(self, type="sequence", keyword="p-wave", dict=False):
277
+ """Returns a list that contains the seismic velocities of the previously generated rock units.
278
+ **Arguments**:
279
+ type: sequence, rock
280
+ **Outputs**:
281
+ data: list of seismic velocities
282
+ """
283
+ data = []
284
+ if type == "sequence":
285
+ for i in range(len(self.dataset)):
286
+ for j in range(len(self.dataset[i])):
287
+ if keyword == "all":
288
+ data.append(self.dataset[i][j][4][3])
289
+ elif keyword in ["p-wave", "compressional", "vP"]:
290
+ data.append(self.dataset[i][j][4][3][0])
291
+ elif keyword in ["s-wave", "shear", "vS"]:
292
+ data.append(self.dataset[i][j][4][3][1])
293
+ elif type == "random":
294
+ for i in range(len(self.dataset)):
295
+ if keyword == "all":
296
+ data.append(self.dataset[i][3])
297
+ elif keyword in ["p-wave", "compressional", "vP"]:
298
+ data.append(self.dataset[i][3][0])
299
+ elif keyword in ["s-wave", "shear", "vS"]:
300
+ data.append(self.dataset[i][3][1])
301
+ elif type == "mineral":
302
+ for i in range(len(self.dataset)):
303
+ if keyword == "all":
304
+ data.append(self.dataset[i][4])
305
+ elif keyword in ["p-wave", "compressional", "vP"]:
306
+ data.append(self.dataset[i][4][0])
307
+ elif keyword in ["s-wave", "shear", "vS"]:
308
+ data.append(self.dataset[i][4][1])
309
+ elif keyword in ["vPvS"]:
310
+ data.append(self.dataset[i][4][2])
311
+ elif type == "rock":
312
+ for i in range(len(self.dataset)):
313
+ if dict == False:
314
+ if keyword == "all":
315
+ data.append(self.dataset[i][3])
316
+ elif keyword in ["p-wave", "compressional", "vP"]:
317
+ data.append(self.dataset[i][3][0])
318
+ elif keyword in ["s-wave", "shear", "vS"]:
319
+ data.append(self.dataset[i][3][1])
320
+ else:
321
+ data.append(self.dataset[i][keyword])
322
+ else:
323
+ for i in range(len(self.dataset)):
324
+ if keyword == "all":
325
+ data.append(self.dataset[i][4][3])
326
+ elif keyword in ["p-wave", "compressional", "vP"]:
327
+ data.append(self.dataset[i][4][3][0])
328
+ elif keyword in ["s-wave", "shear", "vS"]:
329
+ data.append(self.dataset[i][4][3][1])
330
+ #
331
+ return np.array(data)
332
+ #
333
+ def extract_porosity(self, type="sequence", keyword="phi", dict=False):
334
+ """Returns a list that contains the porosities of the previously generated rock units.
335
+ **Arguments**:
336
+ type: sequence, rock
337
+ **Outputs**:
338
+ data: list of porosities
339
+ """
340
+ data = []
341
+ if type == "sequence":
342
+ for i in range(len(self.dataset)):
343
+ for j in range(len(self.dataset[i])):
344
+ data.append(self.dataset[i][j][4][4][0])
345
+ elif type == "random":
346
+ for i in range(len(self.dataset)):
347
+ data.append(self.dataset[i][4][0])
348
+ elif type == "rock":
349
+ for i in range(len(self.dataset)):
350
+ if dict == False:
351
+ data.append(self.dataset[i][4][0])
352
+ else:
353
+ data.append(self.dataset[i][keyword])
354
+ else:
355
+ for i in range(len(self.dataset)):
356
+ data.append(self.dataset[i][4][4][0])
357
+ #
358
+ return np.array(data)
359
+ #
360
+ def extract_fluid(self, type="sequence"):
361
+ """Returns a list that contains the fluid within the previously generated rock units.
362
+ **Arguments**:
363
+ type: sequence, rock
364
+ **Outputs**:
365
+ data: list of fluids
366
+ """
367
+ data = []
368
+ if type == "sequence":
369
+ data.append(self.dataset[0][0][4][5])
370
+ else:
371
+ data.append(self.dataset[0][4][5])
372
+ #
373
+ return data
374
+ #
375
+ def extract_gamma_ray(self, type="sequence", keyword="GR", dict=False):
376
+ """Returns a list that contains the natural gamma ray values of the previously generated rock units.
377
+ **Arguments**:
378
+ type: sequence, rock
379
+ **Outputs**:
380
+ data: list of natural gamma ray values
381
+ """
382
+ data = []
383
+ if type == "sequence":
384
+ for i in range(len(self.dataset)):
385
+ for j in range(len(self.dataset[i])):
386
+ data.append(self.dataset[i][j][4][6][0])
387
+ elif type == "random":
388
+ for i in range(len(self.dataset)):
389
+ data.append(self.dataset[i][6][0])
390
+ elif type == "mineral":
391
+ for i in range(len(self.dataset)):
392
+ data.append(self.dataset[i][5][0])
393
+ elif type == "rock":
394
+ for i in range(len(self.dataset)):
395
+ if dict == False:
396
+ data.append(self.dataset[i][6][0])
397
+ else:
398
+ data.append(self.dataset[i][keyword])
399
+ else:
400
+ for i in range(len(self.dataset)):
401
+ data.append(self.dataset[i][4][6][0])
402
+ #
403
+ return np.array(data)
404
+ #
405
+ def extract_photoelectricity(self, type="sequence", keyword="PE", dict=False):
406
+ """Returns a list that contains the photoelectricity values of the previously generated rock units.
407
+ **Arguments**:
408
+ type: sequence, rock
409
+ **Outputs**:
410
+ data: list of photoelectricity values
411
+ """
412
+ data = []
413
+ if type == "sequence":
414
+ for i in range(len(self.dataset)):
415
+ for j in range(len(self.dataset[i])):
416
+ data.append(self.dataset[i][j][4][6][1])
417
+ elif type == "random":
418
+ for i in range(len(self.dataset)):
419
+ data.append(self.dataset[i][6][1])
420
+ elif type == "mineral":
421
+ for i in range(len(self.dataset)):
422
+ data.append(self.dataset[i][5][2])
423
+ elif type == "rock":
424
+ for i in range(len(self.dataset)):
425
+ if dict == False:
426
+ data.append(self.dataset[i][6][1])
427
+ else:
428
+ data.append(self.dataset[i][keyword])
429
+ else:
430
+ for i in range(len(self.dataset)):
431
+ data.append(self.dataset[i][4][6][1])
432
+ #
433
+ return np.array(data)
434
+ #
435
+ def extract_data(self, keyword="rho"):
436
+ """Returns a list that contains the photoelectricity values of the previously generated rock units.
437
+ **Arguments**:
438
+ type: keyword
439
+ **Outputs**:
440
+ data: list of photoelectricity values
441
+ """
442
+ data = []
443
+ for index, item in enumerate(self.dataset, start=0):
444
+ data.append(item[keyword])
445
+ #
446
+ return np.array(data)
447
+ #
448
+ def extract_element_amounts(self, type="sequence", pos=None, element=None):
449
+ """Returns a list that contains the amounts of the elements within the previously generated rock units.
450
+ **Arguments**:
451
+ type: sequence, rock
452
+ **Outputs**:
453
+ data: list of element amounts
454
+ """
455
+ data = []
456
+ if type == "sequence":
457
+ for i in range(len(self.dataset)):
458
+ for j in range(len(self.dataset[i])):
459
+ data.append(self.dataset[i][j][4][7])
460
+ elif type == "mineral":
461
+ for i in range(len(self.dataset)):
462
+ if pos != None:
463
+ data.append(self.dataset[i][6][pos])
464
+ if element != None:
465
+ for item in self.dataset[i][6]:
466
+ if element in item:
467
+ data.append(item[2])
468
+ else:
469
+ for i in range(len(self.dataset)):
470
+ data.append(self.dataset[i][4][7])
471
+ #
472
+ return np.array(data)
473
+ #
474
+ def extract_mineral_amounts(self, type="sequence"):
475
+ """Returns a list that contains the amounts of the minerals within the previously generated rock units.
476
+ **Arguments**:
477
+ type: sequence, rock
478
+ **Outputs**:
479
+ data: list of mineral amounts
480
+ """
481
+ data = []
482
+ if type == "sequence":
483
+ for i in range(len(self.dataset)):
484
+ for j in range(len(self.dataset[i])):
485
+ data.append(self.dataset[i][j][4][8])
486
+ elif type == "rock":
487
+ for i in range(len(self.dataset)):
488
+ data.append(self.dataset[i][0][1])
489
+ else:
490
+ for i in range(len(self.dataset)):
491
+ data.append(self.dataset[i][4][8])
492
+ #
493
+ return np.array(data)
494
+
495
+ class surface:
496
+ #
497
+ def __init__(self, surface, actualThickness):
498
+ self.surface = surface
499
+ self.actualThickness = actualThickness
500
+ #
501
+ def createSurface(self):
502
+ # [symbol, atomic number, atomic mass, oxidation states, melting point, boiling point, density, electronegativity]
503
+ chemH = ["H", 1, 1.0078, 1, 13.99, 20.271, 0.084, 2.2]
504
+ chemC = elements.C(self)
505
+ # [molar mass, density, bulk modulus, shear modulus, vP, vS, GR]
506
+ chemSeawater = fluids.Water.seawater("")
507
+ chemWater = [18.0146, 997, 2.08, 1444.0]
508
+ # [chemical formula, molar mass, density, bulk modulus, shear modulus, vP, vS]
509
+ chemDolomite = minerals.carbonates.dolomite("")
510
+ chemCalcite = minerals.carbonates.calcite("")
511
+ chemQuartz = minerals.oxides.quartz("")
512
+ chemOrthoclase = minerals.tectosilicates.orthoclase("")
513
+ chemBiotite = minerals.Biotites.biotite_group(self, "Biotite")
514
+ #
515
+ # sequence = [lithology, thickness, top depth, bottom depth, density, vP, GR, neutron porosity]
516
+ sequence = []
517
+ #
518
+ if self.surface == "water":
519
+ thicknessUnit = randint(10, 50)
520
+ newThickness = self.actualThickness + thicknessUnit
521
+ #
522
+ cond = False
523
+ composition = []
524
+ while cond == False:
525
+ xWater = 1
526
+ sumMin = xWater
527
+ if sumMin == 1:
528
+ cond = True
529
+ composition.extend([["Seawater", round(xWater, 2)]])
530
+ else:
531
+ cond = False
532
+ xWater = composition[0][1]
533
+ #
534
+ phi = 1
535
+ rhoSolid = (xWater * chemSeawater[2]) / 1000
536
+ vPSolid = xWater * chemSeawater[4][0]
537
+ vSSolid = xWater * chemSeawater[4][1]
538
+ rho = (1 - phi) * rhoSolid + phi * chemSeawater[2] / 1000
539
+ vP = (1-phi)*vPSolid + phi*chemSeawater[4][0]
540
+ vS = (1 - phi) * vSSolid
541
+ shearModulus = vS**2 * rho
542
+ bulkModulus = vP**2 * rho - 4/3*shearModulus
543
+ poisson = (3*bulkModulus - 2*shearModulus)/(6*bulkModulus + 2*shearModulus)
544
+ velocities = [round(vP,2), round(vS,2), round(vPSolid,2), round(chemSeawater[4][0],2)]
545
+ GR = chemSeawater[5][0]
546
+ PE = 0.81
547
+ phiD = (rhoSolid - rho) / (rhoSolid - chemSeawater[1]/1000 / 1000)
548
+ #phiN = ((2 * phi ** 2 - phiD ** 2) ** (0.5))*100
549
+ phiN = 100
550
+ sequence.extend(["water", thicknessUnit, self.actualThickness, newThickness, round(rho,3), velocities, round(GR, 1), round(phiN, 1), "water", composition, round(poisson,2), round(PE,2)])
551
+ elif self.surface == "dry sand":
552
+ thicknessUnit = randint(10, 50)
553
+ newThickness = self.actualThickness + thicknessUnit
554
+ #
555
+ cond = False
556
+ composition = []
557
+ while cond == False:
558
+ xQuartz = round(randint(65, 100)/100, 2)
559
+ xCalcite = round(randint(0, 10)/100, 2)
560
+ xDolomite = round(randint(0, 10)/100, 2)
561
+ xOrthoclase = round(randint(5, 30)/100, 2)
562
+ xBiotite = round(randint(0, 5)/100, 2)
563
+ sumMin = xQuartz + xCalcite + xDolomite + xOrthoclase + xBiotite
564
+ if sumMin == 1:
565
+ cond = True
566
+ composition.extend([["Qz", round(xQuartz, 2)], ["Cal", round(xCalcite, 2)], ["Dol", round(xDolomite, 2)], ["Or", round(xOrthoclase, 2)], ["Bt", round(xBiotite,2), round(chemBiotite[1][0],2), round(chemBiotite[1][1],2), round(chemBiotite[1][2],2)]])
567
+ else:
568
+ cond = False
569
+ xQuartz = composition[0][1]
570
+ xCalcite = composition[1][1]
571
+ xDolomite = composition[2][1]
572
+ xOrthoclase = composition[3][1]
573
+ xBiotite = composition[4][1]
574
+ #
575
+ phi = randint(35, 50) / 100
576
+ rhoSolid = (xQuartz*chemQuartz[2] + xCalcite*chemCalcite[2] + xDolomite*chemDolomite[2] + xOrthoclase*chemOrthoclase[2] + xBiotite *chemBiotite[2]) / 1000
577
+ vPSolid = xQuartz*chemQuartz[4][0] + xCalcite*chemCalcite[4][0] + xDolomite*chemDolomite[4][0] + xOrthoclase*chemOrthoclase[4][0] + xBiotite * chemBiotite[4][0]
578
+ vSSolid = xQuartz*chemQuartz[4][1] + xCalcite*chemCalcite[4][1] + xDolomite*chemDolomite[4][1] + xOrthoclase*chemOrthoclase[4][1] + xBiotite * chemBiotite[4][1]
579
+ rho = (1 - phi) * rhoSolid + phi * chemWater[1] / 1000
580
+ vP = (1-phi)*vPSolid + phi*chemWater[3]
581
+ vS = (1 - phi) * vSSolid
582
+ shearModulus = vS**2 * rho
583
+ bulkModulus = vP**2 * rho - 4/3*shearModulus
584
+ poisson = (3*bulkModulus - 2*shearModulus)/(6*bulkModulus + 2*shearModulus)
585
+ velocities = [round(vP,2), round(vS,2), round(vPSolid,2), round(chemWater[3],2)]
586
+ GR = xQuartz*chemQuartz[5][0] + xCalcite*chemCalcite[5][0] + xDolomite*chemDolomite[5][0] + xOrthoclase*chemOrthoclase[5][0] + xBiotite * chemBiotite[5][0]
587
+ PE = xQuartz*chemQuartz[5][1] + xCalcite*chemCalcite[5][1] + xDolomite*chemDolomite[5][1] + xOrthoclase*chemOrthoclase[5][1] + xBiotite * chemBiotite[5][1]
588
+ phiD = (rhoSolid - rho) / (rhoSolid - chemWater[1] / 1000)
589
+ phiN = ((2 * phi ** 2 - phiD ** 2) ** (0.5))*100
590
+ sequence.extend(["dry sand", thicknessUnit, self.actualThickness, newThickness, round(rho,3), velocities, round(GR, 1), round(phiN, 1), "water", composition, round(poisson,2), round(PE,2)])
591
+ elif self.surface == "soil":
592
+ thicknessUnit = randint(10, 50)
593
+ newThickness = self.actualThickness + thicknessUnit
594
+ #
595
+ cond = False
596
+ composition = []
597
+ while cond == False:
598
+ xOrganic = round(randint(3, 7)/100, 2)
599
+ xQuartz = round(randint(65, 100)/100, 2)
600
+ xCalcite = round(randint(0, 10)/100, 2)
601
+ xOrthoclase = round(randint(5, 15)/100, 2)
602
+ xBiotite = round(randint(0, 5)/100, 2)
603
+ sumMin = xQuartz + xCalcite + xOrganic + xOrthoclase + xBiotite
604
+ if sumMin == 1:
605
+ cond = True
606
+ composition.extend([["Qz", round(xQuartz, 2)], ["Cal", round(xCalcite, 2)], ["Org", round(xOrganic, 2)], ["Or", round(xOrthoclase, 2)], ["Bt", round(xBiotite,2), round(chemBiotite[1][0],2), round(chemBiotite[1][1],2), round(chemBiotite[1][2],2)]])
607
+ else:
608
+ cond = False
609
+ xQuartz = composition[0][1]
610
+ xCalcite = composition[1][1]
611
+ xOrganic = composition[2][1]
612
+ xOrthoclase = composition[3][1]
613
+ xBiotite = composition[4][1]
614
+ #
615
+ phi = randint(30, 50) / 100
616
+ rhoSolid = (xQuartz*chemQuartz[2] + xCalcite*chemCalcite[2] + xOrganic * chemC[4] + xOrthoclase*chemOrthoclase[2] + xBiotite *chemBiotite[2]) / 1000
617
+ vPSolid = xQuartz*chemQuartz[4][0] + xCalcite*chemCalcite[4][0] + xOrganic * chemC[8] + xOrthoclase*chemOrthoclase[4][0] + xBiotite * chemBiotite[4][0]
618
+ vSSolid = xQuartz*chemQuartz[4][1] + xCalcite*chemCalcite[4][1] + xOrganic * chemC[9] + xOrthoclase*chemOrthoclase[4][1] + xBiotite * chemBiotite[4][1]
619
+ rho = (1 - phi) * rhoSolid + phi * chemWater[1] / 1000
620
+ vP = (1-phi)*vPSolid + phi*chemWater[3]
621
+ vS = (1 - phi) * vSSolid
622
+ shearModulus = vS**2 * rho
623
+ bulkModulus = vP**2 * rho - 4/3*shearModulus
624
+ poisson = (3*bulkModulus - 2*shearModulus)/(6*bulkModulus + 2*shearModulus)
625
+ velocities = [round(vP,2), round(vS,2), round(vPSolid,2), round(chemWater[3],2)]
626
+ GR = xQuartz*chemQuartz[5][0] + xCalcite*chemCalcite[5][0] + xOrthoclase*chemOrthoclase[5][0] + xBiotite * chemBiotite[5][0]
627
+ PE = xQuartz*chemQuartz[5][1] + xCalcite*chemCalcite[5][1] + xOrthoclase*chemOrthoclase[5][1] + xBiotite * chemBiotite[5][1]
628
+ phiD = (rhoSolid - rho)/(rhoSolid - (chemWater[1] + 1.2920)/1000)
629
+ phiN = np.real((2*phi**2 - phiD**2)**(0.5))*100
630
+ sequence.extend(["soil", thicknessUnit, self.actualThickness, newThickness, round(rho,3), velocities, round(GR, 1), round(phiN, 1), "water", composition, round(poisson,2), round(PE,2)])
631
+ #
632
+ return sequence
633
+ #
634
+ class sand:
635
+ #
636
+ def __init__(self, actualThickness):
637
+ self.actualThickness = actualThickness
638
+ #
639
+ def createWetSand(self):
640
+ # [molar mass, density, bulk modulus, vP]
641
+ chemWater = [18.0146, 997, 2.08, 1444]
642
+ # [chemical formula, molar mass, density, bulk modulus, shear modulus, vP, vS]
643
+ chemDolomite = minerals.carbonates.dolomite("")
644
+ chemCalcite = minerals.carbonates.calcite("")
645
+ chemQuartz = minerals.oxides.quartz("")
646
+ chemOrthoclase = minerals.tectosilicates.orthoclase("")
647
+ chemBiotite = minerals.Biotites.biotite_group(self, "Biotite")
648
+ #
649
+ # sequence = [lithology, thickness, top depth, bottom depth, density, vP, GR, neutron porosity]
650
+ sequence = []
651
+ #
652
+ thicknessUnit = randint(10, 25)
653
+ newThickness = self.actualThickness + thicknessUnit
654
+ #
655
+ cond = False
656
+ composition = []
657
+ while cond == False:
658
+ xQuartz = round(randint(65, 100)/100, 2)
659
+ xCalcite = round(randint(0, 10)/100, 2)
660
+ xDolomite = round(randint(0, 10)/100, 2)
661
+ xOrthoclase = round(randint(5, 30)/100, 2)
662
+ xBiotite = round(randint(0, 5)/100, 2)
663
+ sumMin = xQuartz + xCalcite + xDolomite + xOrthoclase + xBiotite
664
+ if sumMin == 1:
665
+ cond = True
666
+ composition.extend([["Qz", round(xQuartz,2), round(chemQuartz[1],2)], ["Cal", round(xCalcite,2), round(chemCalcite[1],2)], ["Dol", round(xDolomite,2), round(chemDolomite[1],2)], ["Or", round(xOrthoclase,2), round(chemOrthoclase[1],2)], ["Bt", round(xBiotite,2), round(chemBiotite[1][0],2), round(chemBiotite[1][1],2), round(chemBiotite[1][2],2)]])
667
+ else:
668
+ cond = False
669
+ xQuartz = composition[0][1]
670
+ xCalcite = composition[1][1]
671
+ xDolomite = composition[2][1]
672
+ xOrthoclase = composition[3][1]
673
+ xBiotite = composition[4][1]
674
+ #
675
+ phi = randint(25, 40) / 100
676
+ rhoSolid = (xQuartz*chemQuartz[2] + xCalcite*chemCalcite[2] + xDolomite*chemDolomite[2] + xOrthoclase*chemOrthoclase[2] + xBiotite *chemBiotite[2]) / 1000
677
+ vPSolid = xQuartz*chemQuartz[4][0] + xCalcite*chemCalcite[4][0] + xDolomite*chemDolomite[4][0] + xOrthoclase*chemOrthoclase[4][0] + xBiotite * chemBiotite[4][0]
678
+ vSSolid = xQuartz*chemQuartz[4][1] + xCalcite*chemCalcite[4][1] + xDolomite*chemDolomite[4][1] + xOrthoclase*chemOrthoclase[4][1] + xBiotite * chemBiotite[4][1]
679
+ rho = (1 - phi) * rhoSolid + phi * chemWater[1] / 1000
680
+ vP = (1-phi)*vPSolid + phi*chemWater[3]
681
+ vS = (1 - phi) * vSSolid
682
+ shearModulus = vS**2 * rho
683
+ bulkModulus = vP**2 * rho - 4/3*shearModulus
684
+ poisson = (3*bulkModulus - 2*shearModulus)/(6*bulkModulus + 2*shearModulus)
685
+ velocities = [round(vP,2), round(vS,2), round(vPSolid,2), round(chemWater[3],2)]
686
+ GR = xQuartz*chemQuartz[5][0] + xCalcite*chemCalcite[5][0] + xDolomite*chemDolomite[5][0] + xOrthoclase*chemOrthoclase[5][0] + xBiotite*chemBiotite[5][0]
687
+ PE = xQuartz*chemQuartz[5][1] + xCalcite*chemCalcite[5][1] + xDolomite*chemDolomite[5][1] + xOrthoclase*chemOrthoclase[5][1] + xBiotite*chemBiotite[5][1]
688
+ phiD = (rhoSolid - rho)/(rhoSolid - chemWater[1]/1000)
689
+ phiN = np.real((2*phi**2 - phiD**2)**(0.5))*100
690
+ sequence.extend(["wet sand", thicknessUnit, self.actualThickness, newThickness, round(rho,3), velocities, round(GR, 1), round(phiN, 1), "water", composition, round(poisson,2), round(PE,2)])
691
+ #
692
+ return sequence
693
+ #
694
+ class subsurface:
695
+ #
696
+ def __init__(self, actualThickness, rockType, parts):
697
+ self.actualThickness = actualThickness
698
+ self.rockType = rockType
699
+ self.parts = parts
700
+ #
701
+ def createSiliciclastics(self):
702
+ #
703
+ sequence = []
704
+ minThickness = 5
705
+ maxThickness = 50
706
+ #
707
+ if self.rockType == "shale" or self.rockType == "halite" or self.rockType == "anhydrite":
708
+ magicnumber = randint(0, 2)
709
+ #########
710
+ # water #
711
+ #########
712
+ if magicnumber == 0:
713
+ thicknessUnit = randint(minThickness, maxThickness)
714
+ N = self.parts
715
+ d = float(thicknessUnit/N)
716
+ for i in range(0, N):
717
+ top = self.actualThickness + i*d
718
+ bottom = top + d
719
+ data = sandstone("water", top)
720
+ dataSandstone = data.createSandstone()
721
+ rho = round(dataSandstone[1][0], 3)
722
+ vP = round(dataSandstone[3][0], 1)
723
+ vS = round(dataSandstone[3][1], 1)
724
+ velocities = dataSandstone[3]
725
+ phiN = round(dataSandstone[4][2] * 100, 1)
726
+ GR = round(dataSandstone[6][0], 1)
727
+ PE = round(dataSandstone[6][1], 1)
728
+ fluid = dataSandstone[5]
729
+ composition = dataSandstone[0]
730
+ bulkModulus = dataSandstone[2][0]
731
+ shearModulus = dataSandstone[2][1]
732
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
733
+ poisson = dataSandstone[2][3]
734
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2), dataSandstone[2]])
735
+ ###############
736
+ # oil - water #
737
+ ###############
738
+ elif magicnumber == 1:
739
+ thicknessUnit = randint(minThickness, maxThickness)
740
+ N = self.parts
741
+ d = float(thicknessUnit/N)
742
+ for i in range(0, N):
743
+ top = self.actualThickness + i*d
744
+ bottom = top + d
745
+ data = sandstone("oil", top)
746
+ dataSandstone = data.createSandstone()
747
+ rho = round(dataSandstone[1][0], 3)
748
+ vP = round(dataSandstone[3][0], 1)
749
+ vS = round(dataSandstone[3][1], 1)
750
+ velocities = dataSandstone[3]
751
+ phiN = round(dataSandstone[4][2] * 100, 1)
752
+ GR = round(dataSandstone[6][0], 1)
753
+ PE = round(dataSandstone[6][1], 1)
754
+ fluid = dataSandstone[5]
755
+ composition = dataSandstone[0]
756
+ bulkModulus = dataSandstone[2][0]
757
+ shearModulus = dataSandstone[2][1]
758
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
759
+ poisson = dataSandstone[2][3]
760
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2), dataSandstone[2]])
761
+ #
762
+ thicknessUnit2 = randint(minThickness, maxThickness)
763
+ N = self.parts
764
+ d2 = float(thicknessUnit2/N)
765
+ for i in range(0, N):
766
+ top2 = bottom + i*d2
767
+ bottom2 = top2 + d2
768
+ data = sandstone("water", top2)
769
+ dataSandstone = data.createSandstone()
770
+ rho = round(dataSandstone[1][0], 3)
771
+ vP = round(dataSandstone[3][0], 1)
772
+ vS = round(dataSandstone[3][1], 1)
773
+ velocities = dataSandstone[3]
774
+ phiN = round(dataSandstone[4][2] * 100, 1)
775
+ GR = round(dataSandstone[6][0], 1)
776
+ PE = round(dataSandstone[6][1], 1)
777
+ fluid = dataSandstone[5]
778
+ composition = dataSandstone[0]
779
+ bulkModulus = dataSandstone[2][0]
780
+ shearModulus = dataSandstone[2][1]
781
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
782
+ poisson = dataSandstone[2][3]
783
+ sequence.append(["sandstone", round(d2, 1), round(top2, 1), round(bottom2, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2), dataSandstone[2]])
784
+ #####################
785
+ # gas - oil - water #
786
+ #####################
787
+ elif magicnumber == 2:
788
+ thicknessUnit = randint(minThickness, maxThickness)
789
+ N = self.parts
790
+ d = float(thicknessUnit/N)
791
+ for i in range(0, N):
792
+ top = self.actualThickness + i*d
793
+ bottom = top + d
794
+ data = sandstone("gas", top)
795
+ dataSandstone = data.createSandstone()
796
+ rho = round(dataSandstone[1][0], 3)
797
+ vP = round(dataSandstone[3][0], 1)
798
+ vS = round(dataSandstone[3][1], 1)
799
+ velocities = dataSandstone[3]
800
+ phiN = round(dataSandstone[4][2] * 100, 1)
801
+ GR = round(dataSandstone[6][0], 1)
802
+ PE = round(dataSandstone[6][1], 1)
803
+ fluid = dataSandstone[5]
804
+ composition = dataSandstone[0]
805
+ bulkModulus = dataSandstone[2][0]
806
+ shearModulus = dataSandstone[2][1]
807
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
808
+ poisson = dataSandstone[2][3]
809
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2), dataSandstone[2]])
810
+ #
811
+ thicknessUnit2 = randint(minThickness, maxThickness)
812
+ N = self.parts
813
+ d2 = float(thicknessUnit2/N)
814
+ for i in range(0, N):
815
+ top2 = bottom + i*d2
816
+ bottom2 = top2 + d2
817
+ data = sandstone("oil", top2)
818
+ dataSandstone = data.createSandstone()
819
+ rho = round(dataSandstone[1][0], 3)
820
+ vP = round(dataSandstone[3][0], 1)
821
+ vS = round(dataSandstone[3][1], 1)
822
+ velocities = dataSandstone[3]
823
+ phiN = round(dataSandstone[4][2] * 100, 1)
824
+ GR = round(dataSandstone[6][0], 1)
825
+ PE = round(dataSandstone[6][1], 1)
826
+ fluid = dataSandstone[5]
827
+ composition = dataSandstone[0]
828
+ bulkModulus = dataSandstone[2][0]
829
+ shearModulus = dataSandstone[2][1]
830
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
831
+ poisson = dataSandstone[2][3]
832
+ sequence.append(["sandstone", round(d2, 1), round(top2, 1), round(bottom2, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2), dataSandstone[2]])
833
+ #
834
+ thicknessUnit3 = randint(minThickness, maxThickness)
835
+ N = self.parts
836
+ d3 = float(thicknessUnit3/N)
837
+ for i in range(0, N):
838
+ top3 = bottom2 + i*d3
839
+ bottom3 = top3 + d3
840
+ data = sandstone("water", top3)
841
+ dataSandstone = data.createSandstone()
842
+ rho = round(dataSandstone[1][0], 3)
843
+ vP = round(dataSandstone[3][0], 1)
844
+ vS = round(dataSandstone[3][1], 1)
845
+ velocities = dataSandstone[3]
846
+ phiN = round(dataSandstone[4][2] * 100, 1)
847
+ GR = round(dataSandstone[6][0], 1)
848
+ PE = round(dataSandstone[6][1], 1)
849
+ fluid = dataSandstone[5]
850
+ composition = dataSandstone[0]
851
+ bulkModulus = dataSandstone[2][0]
852
+ shearModulus = dataSandstone[2][1]
853
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
854
+ poisson = dataSandstone[2][3]
855
+ sequence.append(["sandstone", round(d3, 1), round(top3, 1), round(bottom3, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2), dataSandstone[2]])
856
+ else:
857
+ #########
858
+ # water #
859
+ #########
860
+ thicknessUnit = randint(minThickness, maxThickness)
861
+ #
862
+ N = self.parts
863
+ d = float(thicknessUnit/N)
864
+ for i in range(0, N):
865
+ top = self.actualThickness + i*d
866
+ bottom = top + d
867
+ data = sandstone("water", top)
868
+ dataSandstone = data.createSandstone()
869
+ rho = round(dataSandstone[1][0], 3)
870
+ vP = round(dataSandstone[3][0], 1)
871
+ vS = round(dataSandstone[3][1], 1)
872
+ velocities = dataSandstone[3]
873
+ phiN = round(dataSandstone[4][2] * 100, 1)
874
+ GR = round(dataSandstone[6][0], 1)
875
+ PE = round(dataSandstone[6][1], 1)
876
+ fluid = dataSandstone[5]
877
+ composition = dataSandstone[0]
878
+ bulkModulus = dataSandstone[2][0]
879
+ shearModulus = dataSandstone[2][1]
880
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
881
+ poisson = dataSandstone[2][3]
882
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2), dataSandstone[2]])
883
+ #
884
+ return sequence
885
+ #
886
+ def createCarbonates(self, keyword="carbonates"):
887
+ #
888
+ sequence = []
889
+ minThickness = 15
890
+ maxThickness = 60
891
+ self.keyword = keyword
892
+ #
893
+ magicnumber = randint(0, 1)
894
+ if magicnumber == 0 or self.keyword == "limestone":
895
+ if self.rockType == "shale" or self.rockType == "halite" or self.rockType == "anhydrite":
896
+ magicnumber = randint(0, 2)
897
+ #########
898
+ # water #
899
+ #########
900
+ if magicnumber == 0:
901
+ thicknessUnit = randint(minThickness, maxThickness)
902
+ N = self.parts
903
+ d = float(thicknessUnit/N)
904
+ for i in range(0, N):
905
+ top = self.actualThickness + i*d
906
+ bottom = top + d
907
+ data = limestone("water", top)
908
+ dataLimestone = data.createLimestone()
909
+ rho = round(dataLimestone[1][0], 3)
910
+ vP = round(dataLimestone[3][0], 1)
911
+ vS = round(dataLimestone[3][1], 1)
912
+ velocities = dataLimestone[3]
913
+ phiN = round(dataLimestone[4][2] * 100, 1)
914
+ GR = round(dataLimestone[6][0], 1)
915
+ PE = round(dataLimestone[6][1], 1)
916
+ fluid = dataLimestone[5]
917
+ composition = dataLimestone[0]
918
+ bulkModulus = dataLimestone[2][0]
919
+ shearModulus = dataLimestone[2][1]
920
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
921
+ poisson = dataLimestone[2][3]
922
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
923
+ ###############
924
+ # oil - water #
925
+ ###############
926
+ elif magicnumber == 1:
927
+ thicknessUnit = randint(minThickness, maxThickness)
928
+ N = self.parts
929
+ d = float(thicknessUnit/N)
930
+ for i in range(0, N):
931
+ top = self.actualThickness + i*d
932
+ bottom = top + d
933
+ data = limestone("oil", top)
934
+ dataLimestone = data.createLimestone()
935
+ rho = round(dataLimestone[1][0], 3)
936
+ vP = round(dataLimestone[3][0], 1)
937
+ vS = round(dataLimestone[3][1], 1)
938
+ velocities = dataLimestone[3]
939
+ phiN = round(dataLimestone[4][2] * 100, 1)
940
+ GR = round(dataLimestone[6][0], 1)
941
+ PE = round(dataLimestone[6][1], 1)
942
+ fluid = dataLimestone[5]
943
+ composition = dataLimestone[0]
944
+ bulkModulus = dataLimestone[2][0]
945
+ shearModulus = dataLimestone[2][1]
946
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
947
+ poisson = dataLimestone[2][3]
948
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
949
+ #
950
+ thicknessUnit2 = randint(minThickness, maxThickness)
951
+ N = self.parts
952
+ d2 = float(thicknessUnit2/N)
953
+ for i in range(0, N):
954
+ top2 = bottom + i*d2
955
+ bottom2 = top2 + d2
956
+ data = limestone("water", top2)
957
+ dataLimestone = data.createLimestone()
958
+ rho = round(dataLimestone[1][0], 3)
959
+ vP = round(dataLimestone[3][0], 1)
960
+ vS = round(dataLimestone[3][1], 1)
961
+ velocities = dataLimestone[3]
962
+ phiN = round(dataLimestone[4][2] * 100, 1)
963
+ GR = round(dataLimestone[6][0], 1)
964
+ PE = round(dataLimestone[6][1], 1)
965
+ fluid = dataLimestone[5]
966
+ composition = dataLimestone[0]
967
+ bulkModulus = dataLimestone[2][0]
968
+ shearModulus = dataLimestone[2][1]
969
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
970
+ poisson = dataLimestone[2][3]
971
+ sequence.append(["limestone", round(d2, 1), round(top2, 1), round(bottom2, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
972
+ #####################
973
+ # gas - oil - water #
974
+ #####################
975
+ elif magicnumber == 2:
976
+ thicknessUnit = randint(minThickness, maxThickness)
977
+ N = self.parts
978
+ d = float(thicknessUnit/N)
979
+ for i in range(0, N):
980
+ top = self.actualThickness + i*d
981
+ bottom = top + d
982
+ data = limestone("gas", top)
983
+ dataLimestone = data.createLimestone()
984
+ rho = round(dataLimestone[1][0], 3)
985
+ vP = round(dataLimestone[3][0], 1)
986
+ vS = round(dataLimestone[3][1], 1)
987
+ velocities = dataLimestone[3]
988
+ phiN = round(dataLimestone[4][2] * 100, 1)
989
+ GR = round(dataLimestone[6][0], 1)
990
+ PE = round(dataLimestone[6][1], 1)
991
+ fluid = dataLimestone[5]
992
+ composition = dataLimestone[0]
993
+ bulkModulus = dataLimestone[2][0]
994
+ shearModulus = dataLimestone[2][1]
995
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
996
+ poisson = dataLimestone[2][3]
997
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
998
+ #
999
+ thicknessUnit2 = randint(minThickness, maxThickness)
1000
+ N = self.parts
1001
+ d2 = float(thicknessUnit2/N)
1002
+ for i in range(0, N):
1003
+ top2 = bottom + i*d2
1004
+ bottom2 = top2 + d2
1005
+ data = limestone("oil", top2)
1006
+ dataLimestone = data.createLimestone()
1007
+ rho = round(dataLimestone[1][0], 3)
1008
+ vP = round(dataLimestone[3][0], 1)
1009
+ vS = round(dataLimestone[3][1], 1)
1010
+ velocities = dataLimestone[3]
1011
+ phiN = round(dataLimestone[4][2] * 100, 1)
1012
+ GR = round(dataLimestone[6][0], 1)
1013
+ PE = round(dataLimestone[6][1], 1)
1014
+ fluid = dataLimestone[5]
1015
+ composition = dataLimestone[0]
1016
+ bulkModulus = dataLimestone[2][0]
1017
+ shearModulus = dataLimestone[2][1]
1018
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1019
+ poisson = dataLimestone[2][3]
1020
+ sequence.append(["limestone", round(d2, 1), round(top2, 1), round(bottom2, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1021
+ #
1022
+ thicknessUnit3 = randint(minThickness, maxThickness)
1023
+ N = self.parts
1024
+ d3 = float(thicknessUnit3/N)
1025
+ for i in range(0, N):
1026
+ top3 = bottom2 + i*d3
1027
+ bottom3 = top3 + d3
1028
+ data = limestone("water", top3)
1029
+ dataLimestone = data.createLimestone()
1030
+ rho = round(dataLimestone[1][0], 3)
1031
+ vP = round(dataLimestone[3][0], 1)
1032
+ vS = round(dataLimestone[3][1], 1)
1033
+ velocities = dataLimestone[3]
1034
+ phiN = round(dataLimestone[4][2] * 100, 1)
1035
+ GR = round(dataLimestone[6][0], 1)
1036
+ PE = round(dataLimestone[6][1], 1)
1037
+ fluid = dataLimestone[5]
1038
+ composition = dataLimestone[0]
1039
+ bulkModulus = dataLimestone[2][0]
1040
+ shearModulus = dataLimestone[2][1]
1041
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1042
+ poisson = dataLimestone[2][3]
1043
+ sequence.append(["limestone", round(d3, 1), round(top3, 1), round(bottom3, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1044
+ else:
1045
+ #########
1046
+ # water #
1047
+ #########
1048
+ thicknessUnit = randint(minThickness, maxThickness)
1049
+ N = self.parts
1050
+ d = float(thicknessUnit/N)
1051
+ for i in range(0, N):
1052
+ top = self.actualThickness + i*d
1053
+ bottom = top + d
1054
+ data = limestone("water", top)
1055
+ dataLimestone = data.createLimestone()
1056
+ rho = round(dataLimestone[1][0], 3)
1057
+ vP = round(dataLimestone[3][0], 1)
1058
+ vS = round(dataLimestone[3][1], 1)
1059
+ velocities = dataLimestone[3]
1060
+ phiN = round(dataLimestone[4][2] * 100, 1)
1061
+ GR = round(dataLimestone[6][0], 1)
1062
+ PE = round(dataLimestone[6][1], 1)
1063
+ fluid = dataLimestone[5]
1064
+ composition = dataLimestone[0]
1065
+ bulkModulus = dataLimestone[2][0]
1066
+ shearModulus = dataLimestone[2][1]
1067
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1068
+ poisson = dataLimestone[2][3]
1069
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1070
+ #
1071
+ elif magicnumber == 1 or self.keyword == "dolomite":
1072
+ if self.rockType == "shale" or self.rockType == "halite" or self.rockType == "anhydrite":
1073
+ magicnumber = randint(0, 2)
1074
+ #########
1075
+ # water #
1076
+ #########
1077
+ if magicnumber == 0:
1078
+ thicknessUnit = randint(minThickness, maxThickness)
1079
+ N = self.parts
1080
+ d = float(thicknessUnit/N)
1081
+ for i in range(0, N):
1082
+ top = self.actualThickness + i*d
1083
+ bottom = top + d
1084
+ data = dolomite("water", top)
1085
+ dataDolomite = data.createDolomite()
1086
+ rho = round(dataDolomite[1][0], 3)
1087
+ vP = round(dataDolomite[3][0], 1)
1088
+ vS = round(dataDolomite[3][1], 1)
1089
+ velocities = dataDolomite[3]
1090
+ phiN = round(dataDolomite[4][2] * 100, 1)
1091
+ GR = round(dataDolomite[6][0], 1)
1092
+ PE = round(dataDolomite[6][1], 1)
1093
+ fluid = dataDolomite[5]
1094
+ composition = dataDolomite[0]
1095
+ bulkModulus = dataDolomite[2][0]
1096
+ shearModulus = dataDolomite[2][1]
1097
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1098
+ poisson = dataDolomite[2][3]
1099
+ sequence.append(["dolomite", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1100
+ ###############
1101
+ # oil - water #
1102
+ ###############
1103
+ elif magicnumber == 1:
1104
+ thicknessUnit = randint(minThickness, maxThickness)
1105
+ N = self.parts
1106
+ d = float(thicknessUnit/N)
1107
+ for i in range(0, N):
1108
+ top = self.actualThickness + i*d
1109
+ bottom = top + d
1110
+ data = dolomite("oil", top)
1111
+ dataDolomite = data.createDolomite()
1112
+ rho = round(dataDolomite[1][0], 3)
1113
+ vP = round(dataDolomite[3][0], 1)
1114
+ vS = round(dataDolomite[3][1], 1)
1115
+ velocities = dataDolomite[3]
1116
+ phiN = round(dataDolomite[4][2] * 100, 1)
1117
+ GR = round(dataDolomite[6][0], 1)
1118
+ PE = round(dataDolomite[6][1], 1)
1119
+ fluid = dataDolomite[5]
1120
+ composition = dataDolomite[0]
1121
+ bulkModulus = dataDolomite[2][0]
1122
+ shearModulus = dataDolomite[2][1]
1123
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1124
+ poisson = dataDolomite[2][3]
1125
+ sequence.append(["dolomite", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1126
+ #
1127
+ thicknessUnit2 = randint(minThickness, maxThickness)
1128
+ N = self.parts
1129
+ d2 = float(thicknessUnit2/N)
1130
+ for i in range(0, N):
1131
+ top2 = bottom + i*d2
1132
+ bottom2 = top2 + d2
1133
+ data = dolomite("water", top2)
1134
+ dataDolomite = data.createDolomite()
1135
+ rho = round(dataDolomite[1][0], 3)
1136
+ vP = round(dataDolomite[3][0], 1)
1137
+ vS = round(dataDolomite[3][1], 1)
1138
+ velocities = dataDolomite[3]
1139
+ phiN = round(dataDolomite[4][2] * 100, 1)
1140
+ GR = round(dataDolomite[6][0], 1)
1141
+ PE = round(dataDolomite[6][1], 1)
1142
+ fluid = dataDolomite[5]
1143
+ composition = dataDolomite[0]
1144
+ bulkModulus = dataDolomite[2][0]
1145
+ shearModulus = dataDolomite[2][1]
1146
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1147
+ poisson = dataDolomite[2][3]
1148
+ sequence.append(["dolomite", round(d2, 1), round(top2, 1), round(bottom2, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1149
+ #####################
1150
+ # gas - oil - water #
1151
+ #####################
1152
+ elif magicnumber == 2:
1153
+ thicknessUnit = randint(minThickness, maxThickness)
1154
+ N = self.parts
1155
+ d = float(thicknessUnit/N)
1156
+ for i in range(0, N):
1157
+ top = self.actualThickness + i*d
1158
+ bottom = top + d
1159
+ data = dolomite("gas", top)
1160
+ dataDolomite = data.createDolomite()
1161
+ rho = round(dataDolomite[1][0], 3)
1162
+ vP = round(dataDolomite[3][0], 1)
1163
+ vS = round(dataDolomite[3][1], 1)
1164
+ velocities = dataDolomite[3]
1165
+ phiN = round(dataDolomite[4][2] * 100, 1)
1166
+ GR = round(dataDolomite[6][0], 1)
1167
+ PE = round(dataDolomite[6][1], 1)
1168
+ fluid = dataDolomite[5]
1169
+ composition = dataDolomite[0]
1170
+ bulkModulus = dataDolomite[2][0]
1171
+ shearModulus = dataDolomite[2][1]
1172
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1173
+ poisson = dataDolomite[2][3]
1174
+ sequence.append(["dolomite", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1175
+ #
1176
+ thicknessUnit2 = randint(minThickness, maxThickness)
1177
+ N = self.parts
1178
+ d2 = float(thicknessUnit2/N)
1179
+ for i in range(0, N):
1180
+ top2 = bottom + i*d2
1181
+ bottom2 = top2 + d2
1182
+ data = dolomite("oil", top2)
1183
+ dataDolomite = data.createDolomite()
1184
+ rho = round(dataDolomite[1][0], 3)
1185
+ vP = round(dataDolomite[3][0], 1)
1186
+ vS = round(dataDolomite[3][1], 1)
1187
+ velocities = dataDolomite[3]
1188
+ phiN = round(dataDolomite[4][2] * 100, 1)
1189
+ GR = round(dataDolomite[6][0], 1)
1190
+ PE = round(dataDolomite[6][1], 1)
1191
+ fluid = dataDolomite[5]
1192
+ composition = dataDolomite[0]
1193
+ bulkModulus = dataDolomite[2][0]
1194
+ shearModulus = dataDolomite[2][1]
1195
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1196
+ poisson = dataDolomite[2][3]
1197
+ sequence.append(["dolomite", round(d2, 1), round(top2, 1), round(bottom2, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1198
+ #
1199
+ thicknessUnit3 = randint(minThickness, maxThickness)
1200
+ N = self.parts
1201
+ d3 = float(thicknessUnit3/N)
1202
+ for i in range(0, N):
1203
+ top3 = bottom2 + i*d3
1204
+ bottom3 = top3 + d3
1205
+ data = dolomite("water", top3)
1206
+ dataDolomite = data.createDolomite()
1207
+ rho = round(dataDolomite[1][0], 3)
1208
+ vP = round(dataDolomite[3][0], 1)
1209
+ vS = round(dataDolomite[3][1], 1)
1210
+ velocities = dataDolomite[3]
1211
+ phiN = round(dataDolomite[4][2] * 100, 1)
1212
+ GR = round(dataDolomite[6][0], 1)
1213
+ PE = round(dataDolomite[6][1], 1)
1214
+ fluid = dataDolomite[5]
1215
+ composition = dataDolomite[0]
1216
+ bulkModulus = dataDolomite[2][0]
1217
+ shearModulus = dataDolomite[2][1]
1218
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1219
+ poisson = dataDolomite[2][3]
1220
+ sequence.append(["dolomite", round(d3, 1), round(top3, 1), round(bottom3, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1221
+ else:
1222
+ #########
1223
+ # water #
1224
+ #########
1225
+ thicknessUnit = randint(minThickness, maxThickness)
1226
+ N = self.parts
1227
+ d = float(thicknessUnit/N)
1228
+ for i in range(0, N):
1229
+ top = self.actualThickness + i*d
1230
+ bottom = top + d
1231
+ data = dolomite("water", top)
1232
+ dataDolomite = data.createDolomite()
1233
+ rho = round(dataDolomite[1][0], 3)
1234
+ vP = round(dataDolomite[3][0], 1)
1235
+ vS = round(dataDolomite[3][1], 1)
1236
+ velocities = dataDolomite[3]
1237
+ phiN = round(dataDolomite[4][2] * 100, 1)
1238
+ GR = round(dataDolomite[6][0], 1)
1239
+ PE = round(dataDolomite[6][1], 1)
1240
+ fluid = dataDolomite[5]
1241
+ composition = dataDolomite[0]
1242
+ bulkModulus = dataDolomite[2][0]
1243
+ shearModulus = dataDolomite[2][1]
1244
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1245
+ poisson = dataDolomite[2][3]
1246
+ sequence.append(["dolomite", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1247
+ #
1248
+ return sequence
1249
+ #
1250
+ def createShales(self):
1251
+ #
1252
+ sequence = []
1253
+ minThickness = 10
1254
+ maxThickness = 100
1255
+ #
1256
+ thicknessUnit = randint(minThickness, maxThickness)
1257
+ N = self.parts
1258
+ d = float(thicknessUnit/N)
1259
+ for i in range(0, N):
1260
+ top = self.actualThickness + i*d
1261
+ bottom = top + d
1262
+ data = shale()
1263
+ dataShale = data.createShale()
1264
+ rho = round(dataShale[1][0], 3)
1265
+ vP = round(dataShale[3][0], 1)
1266
+ vS = round(dataShale[3][1], 1)
1267
+ velocities = dataShale[3]
1268
+ phiN = round(dataShale[4][2] * 100, 1)
1269
+ GR = round(dataShale[6][0], 1)
1270
+ PE = round(dataShale[6][1], 1)
1271
+ fluid = dataShale[5]
1272
+ composition = dataShale[0]
1273
+ bulkModulus = dataShale[2][0]
1274
+ shearModulus = dataShale[2][1]
1275
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1276
+ poisson = dataShale[2][3]
1277
+ sequence.append(["shale", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1278
+ #
1279
+ return sequence
1280
+ #
1281
+ def createEvaporites(self, keyword):
1282
+ #
1283
+ sequence = []
1284
+ minThickness = 25
1285
+ maxThickness = 150
1286
+ #
1287
+ magicnumber = rd.randint(0, 1)
1288
+ #
1289
+ if magicnumber == 0 and keyword != "Anhydrite":
1290
+ thicknessUnit = randint(minThickness, maxThickness)
1291
+ N = self.parts
1292
+ d = float(thicknessUnit/N)
1293
+ for i in range(0, N):
1294
+ top = self.actualThickness + i*d
1295
+ bottom = top + d
1296
+ data = evaporites()
1297
+ dataHalite = data.createRocksalt()
1298
+ rho = round(dataHalite[1][0], 3)
1299
+ vP = round(dataHalite[3][0], 1)
1300
+ vS = round(dataHalite[3][1], 1)
1301
+ velocities = dataHalite[3]
1302
+ phiN = round(dataHalite[4][2] * 100, 1)
1303
+ GR = round(dataHalite[6][0], 1)
1304
+ PE = round(dataHalite[6][1], 1)
1305
+ fluid = dataHalite[5]
1306
+ composition = dataHalite[0]
1307
+ bulkModulus = dataHalite[2][0]
1308
+ shearModulus = dataHalite[2][1]
1309
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1310
+ poisson = dataHalite[2][3]
1311
+ sequence.append(["halite", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1312
+ elif magicnumber == 1 or keyword == "Anhydrite":
1313
+ thicknessUnit = randint(minThickness, maxThickness)
1314
+ N = self.parts
1315
+ d = float(thicknessUnit/N)
1316
+ for i in range(0, N):
1317
+ top = self.actualThickness + i*d
1318
+ bottom = top + d
1319
+ data = evaporites()
1320
+ dataAnhydrite = data.createAnhydrite()
1321
+ rho = round(dataAnhydrite[1][0], 3)
1322
+ vP = round(dataAnhydrite[3][0], 1)
1323
+ vS = round(dataAnhydrite[3][1], 1)
1324
+ velocities = dataAnhydrite[3]
1325
+ phiN = round(dataAnhydrite[4][2] * 100, 1)
1326
+ GR = round(dataAnhydrite[6][0], 1)
1327
+ PE = round(dataAnhydrite[6][1], 1)
1328
+ fluid = dataAnhydrite[5]
1329
+ composition = dataAnhydrite[0]
1330
+ bulkModulus = dataAnhydrite[2][0]
1331
+ shearModulus = dataAnhydrite[2][1]
1332
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1333
+ poisson = dataAnhydrite[2][3]
1334
+ sequence.append(["anhydrite", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1335
+ #
1336
+ return sequence
1337
+ #
1338
+ def createIgneousRocks(self, rock="None"):
1339
+ #
1340
+ sequence = []
1341
+ minThickness = 15
1342
+ maxThickness = 60
1343
+ #
1344
+ if rock == "None":
1345
+ magicnumber = rd.randint(0, 1)
1346
+ #
1347
+ if magicnumber == 0:
1348
+ thicknessUnit = randint(minThickness, maxThickness)
1349
+ N = self.parts
1350
+ d = float(thicknessUnit/N)
1351
+ for i in range(0, N):
1352
+ top = self.actualThickness + i*d
1353
+ bottom = top + d
1354
+ data = plutonic()
1355
+ dataGranite = data.createGranite()
1356
+ rho = round(dataGranite[1][0], 3)
1357
+ vP = round(dataGranite[3][0], 1)
1358
+ vS = round(dataGranite[3][1], 1)
1359
+ velocities = dataGranite[3]
1360
+ phiN = round(dataGranite[4][2] * 100, 1)
1361
+ GR = round(dataGranite[6][0], 1)
1362
+ PE = round(dataGranite[6][1], 1)
1363
+ fluid = dataGranite[5]
1364
+ composition = dataGranite[0]
1365
+ bulkModulus = dataGranite[2][0]
1366
+ shearModulus = dataGranite[2][1]
1367
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1368
+ poisson = dataGranite[2][3]
1369
+ sequence.append(["granite", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1370
+ elif magicnumber == 1:
1371
+ thicknessUnit = randint(minThickness, maxThickness)
1372
+ N = self.parts
1373
+ d = float(thicknessUnit/N)
1374
+ for i in range(0, N):
1375
+ top = self.actualThickness + i*d
1376
+ bottom = top + d
1377
+ data = volcanic()
1378
+ dataBasalt = data.createBasalt()
1379
+ rho = round(dataBasalt[1][0], 3)
1380
+ vP = round(dataBasalt[3][0], 1)
1381
+ vS = round(dataBasalt[3][1], 1)
1382
+ velocities = dataBasalt[3]
1383
+ phiN = round(dataBasalt[4][2] * 100, 1)
1384
+ GR = round(dataBasalt[6][0], 1)
1385
+ PE = round(dataBasalt[6][1], 1)
1386
+ fluid = dataBasalt[5]
1387
+ composition = dataBasalt[0]
1388
+ bulkModulus = dataBasalt[2][0]
1389
+ shearModulus = dataBasalt[2][1]
1390
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1391
+ poisson = dataBasalt[2][3]
1392
+ sequence.append(["basalt", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1393
+ elif rock == "granite":
1394
+ thicknessUnit = randint(minThickness, maxThickness)
1395
+ N = self.parts
1396
+ d = float(thicknessUnit/N)
1397
+ for i in range(0, N):
1398
+ top = self.actualThickness + i*d
1399
+ bottom = top + d
1400
+ data = plutonic()
1401
+ dataGranite = data.createGranite()
1402
+ rho = round(dataGranite[1][0], 3)
1403
+ vP = round(dataGranite[3][0], 1)
1404
+ vS = round(dataGranite[3][1], 1)
1405
+ velocities = dataGranite[3]
1406
+ phiN = round(dataGranite[4][2] * 100, 1)
1407
+ GR = round(dataGranite[6][0], 1)
1408
+ PE = round(dataGranite[6][1], 1)
1409
+ fluid = dataGranite[5]
1410
+ composition = dataGranite[0]
1411
+ bulkModulus = dataGranite[2][0]
1412
+ shearModulus = dataGranite[2][1]
1413
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1414
+ poisson = dataGranite[2][3]
1415
+ sequence.append(["granite", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1416
+ elif rock == "basalt":
1417
+ thicknessUnit = randint(minThickness, maxThickness)
1418
+ N = self.parts
1419
+ d = float(thicknessUnit/N)
1420
+ for i in range(0, N):
1421
+ top = self.actualThickness + i*d
1422
+ bottom = top + d
1423
+ data = volcanic()
1424
+ dataBasalt = data.createBasalt()
1425
+ rho = round(dataBasalt[1][0], 3)
1426
+ vP = round(dataBasalt[3][0], 1)
1427
+ vS = round(dataBasalt[3][1], 1)
1428
+ velocities = dataBasalt[3]
1429
+ phiN = round(dataBasalt[4][2] * 100, 1)
1430
+ GR = round(dataBasalt[6][0], 1)
1431
+ PE = round(dataBasalt[6][1], 1)
1432
+ fluid = dataBasalt[5]
1433
+ composition = dataBasalt[0]
1434
+ bulkModulus = dataBasalt[2][0]
1435
+ shearModulus = dataBasalt[2][1]
1436
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1437
+ poisson = dataBasalt[2][3]
1438
+ sequence.append(["basalt", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1439
+ #
1440
+ return sequence
1441
+ #
1442
+ def create_ores(self):
1443
+ #
1444
+ sequence = []
1445
+ minThickness = 15
1446
+ maxThickness = 45
1447
+ #
1448
+ ## Fe-bearing ore
1449
+ thicknessUnit = randint(minThickness, maxThickness)
1450
+ N = self.parts
1451
+ d = float(thicknessUnit/N)
1452
+ for i in range(0, N):
1453
+ top = self.actualThickness + i*d
1454
+ bottom = top + d
1455
+ data = ore()
1456
+ data_ore_Fe = data.create_ore_Fe()
1457
+ rho = round(data_ore_Fe[1][0], 3)
1458
+ vP = round(data_ore_Fe[3][0], 1)
1459
+ vS = round(data_ore_Fe[3][1], 1)
1460
+ velocities = data_ore_Fe[3]
1461
+ phiN = round(data_ore_Fe[4][2] * 100, 1)
1462
+ GR = round(data_ore_Fe[6][0], 1)
1463
+ PE = round(data_ore_Fe[6][1], 1)
1464
+ fluid = data_ore_Fe[5]
1465
+ composition = data_ore_Fe[0]
1466
+ bulkModulus = data_ore_Fe[2][0]
1467
+ shearModulus = data_ore_Fe[2][1]
1468
+ #poisson = (vP**2 - 2*vS**2)/(2*(vP**2 - vS**2))
1469
+ poisson = data_ore_Fe[2][3]
1470
+ sequence.append(["ore", round(d, 1), round(top, 1), round(bottom, 1), rho, velocities, GR, phiN, fluid, composition, round(poisson,2), round(PE,2)])
1471
+ #
1472
+ return sequence
1473
+ #
1474
+ class SedimentaryBasin:
1475
+ #
1476
+ def __init__(self, actualThickness=0, parts=None, maximum_thickness=None):
1477
+ self.actualThickness = actualThickness
1478
+ self.parts = parts
1479
+ self.maximum_thickness = maximum_thickness
1480
+ #
1481
+ def create_soil(self, thickness=None, grainsize=False):
1482
+ sequence = []
1483
+ if thickness == None:
1484
+ thickness_max = rd.randint(5, 10)
1485
+ else:
1486
+ thickness_max = thickness
1487
+ #
1488
+ if self.parts == None:
1489
+ d = 1.0
1490
+ self.parts = thickness_max
1491
+ else:
1492
+ d = float(thickness_max/self.parts)
1493
+ #
1494
+ for i in range(self.parts):
1495
+ if i == 0:
1496
+ data = Soil()
1497
+ data_soil = data.create_simple_soil(grainsize_list=grainsize)
1498
+ top = self.actualThickness
1499
+ bottom = top + d
1500
+ sequence.append(["soil", round(d, 1), round(top, 1), round(bottom, 1), data_soil])
1501
+ else:
1502
+ data = Soil()
1503
+ data_soil = data.create_simple_soil(amounts=sequence[-1][4][-2], grainsize_list=grainsize)
1504
+ top = self.actualThickness + i*d
1505
+ bottom = top + d
1506
+ sequence.append(["soil", round(d, 1), round(top, 1), round(bottom, 1), data_soil])
1507
+ #
1508
+ return sequence
1509
+ #
1510
+ def create_sand(self, thickness=None, grainsize=False):
1511
+ sequence = []
1512
+ if thickness == None:
1513
+ thickness_max = rd.randint(5, 15)
1514
+ else:
1515
+ thickness_max = thickness
1516
+ #
1517
+ if self.parts == None:
1518
+ d = 1.0
1519
+ self.parts = thickness_max
1520
+ else:
1521
+ d = float(thickness_max/self.parts)
1522
+ #
1523
+ for i in range(self.parts):
1524
+ if i == 0:
1525
+ data = Soil()
1526
+ data_sand = data.create_simple_sand(grainsize_list=grainsize)
1527
+ top = self.actualThickness
1528
+ bottom = top + d
1529
+ sequence.append(["sand", round(d, 1), round(top, 1), round(bottom, 1), data_sand])
1530
+ else:
1531
+ data = Soil()
1532
+ data_sand = data.create_simple_sand(amounts=sequence[-1][4][-2], grainsize_list=grainsize)
1533
+ top = self.actualThickness + i*d
1534
+ bottom = top + d
1535
+ sequence.append(["sand", round(d, 1), round(top, 1), round(bottom, 1), data_sand])
1536
+ #
1537
+ return sequence
1538
+ #
1539
+ def create_sandstone(self, thickness=None, fluid="water", phi=None, Qz_rich=False, keyword=None):
1540
+ self.fluid = fluid
1541
+ sequence = []
1542
+ if thickness == None:
1543
+ thickness_max = rd.randint(5, 20)
1544
+ else:
1545
+ thickness_max = thickness
1546
+ #
1547
+ if self.parts == None:
1548
+ d = 1.0
1549
+ self.parts = thickness_max
1550
+ else:
1551
+ d = float(thickness_max/self.parts)
1552
+ #
1553
+ for i in range(self.parts):
1554
+ if i == 0 and self.fluid == "water":
1555
+ data = sandstone("water", actualThickness=self.actualThickness)
1556
+ if keyword == None:
1557
+ data_sandstone = data.create_simple_sandstone(porosity=phi, pure=Qz_rich)
1558
+ else:
1559
+ data_sandstone = data.create_feldspathic_sandstone(porosity=phi)
1560
+ top = self.actualThickness
1561
+ bottom = top + d
1562
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), data_sandstone])
1563
+ elif i == 0 and self.fluid == "gas":
1564
+ data = sandstone("gas", actualThickness=self.actualThickness)
1565
+ if keyword == None:
1566
+ data_sandstone = data.create_simple_sandstone(porosity=phi, pure=Qz_rich)
1567
+ else:
1568
+ data_sandstone = data.create_feldspathic_sandstone(porosity=phi)
1569
+ top = self.actualThickness
1570
+ bottom = top + d
1571
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), data_sandstone])
1572
+ elif i == 0 and self.fluid == "oil":
1573
+ data = sandstone("oil", actualThickness=self.actualThickness)
1574
+ if keyword == None:
1575
+ data_sandstone = data.create_simple_sandstone(porosity=phi, pure=Qz_rich)
1576
+ else:
1577
+ data_sandstone = data.create_feldspathic_sandstone(porosity=phi)
1578
+ top = self.actualThickness
1579
+ bottom = top + d
1580
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), data_sandstone])
1581
+ elif i == 0 and self.fluid == "air":
1582
+ data = sandstone("air", actualThickness=self.actualThickness)
1583
+ if keyword == None:
1584
+ data_sandstone = data.create_simple_sandstone(porosity=phi, pure=Qz_rich)
1585
+ else:
1586
+ data_sandstone = data.create_feldspathic_sandstone(porosity=phi)
1587
+ top = self.actualThickness
1588
+ bottom = top + d
1589
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), data_sandstone])
1590
+ elif i > 0 and self.fluid == "water":
1591
+ data = sandstone("water", actualThickness=bottom)
1592
+ if keyword == None:
1593
+ data_sandstone = data.create_simple_sandstone(amounts=sequence[-1][-1][8], porosity=phi, pure=Qz_rich)
1594
+ else:
1595
+ data_sandstone = data.create_feldspathic_sandstone(amounts=sequence[-1][-1][8], porosity=phi)
1596
+ top = self.actualThickness + i*d
1597
+ bottom = top + d
1598
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), data_sandstone])
1599
+ elif i > 0 and self.fluid == "gas":
1600
+ data = sandstone("gas", actualThickness=bottom)
1601
+ if keyword == None:
1602
+ data_sandstone = data.create_simple_sandstone(amounts=sequence[-1][-1][8], porosity=phi, pure=Qz_rich)
1603
+ else:
1604
+ data_sandstone = data.create_feldspathic_sandstone(amounts=sequence[-1][-1][8], porosity=phi)
1605
+ top = self.actualThickness + i*d
1606
+ bottom = top + d
1607
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), data_sandstone])
1608
+ elif i > 0 and self.fluid == "oil":
1609
+ data = sandstone("oil", actualThickness=bottom)
1610
+ if keyword == None:
1611
+ data_sandstone = data.create_simple_sandstone(amounts=sequence[-1][-1][8], porosity=phi, pure=Qz_rich)
1612
+ else:
1613
+ data_sandstone = data.create_feldspathic_sandstone(amounts=sequence[-1][-1][8], porosity=phi)
1614
+ top = self.actualThickness + i*d
1615
+ bottom = top + d
1616
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), data_sandstone])
1617
+ elif i > 0 and self.fluid == "air":
1618
+ data = sandstone("air", actualThickness=bottom)
1619
+ if keyword == None:
1620
+ data_sandstone = data.create_simple_sandstone(amounts=sequence[-1][-1][8], porosity=phi, pure=Qz_rich)
1621
+ else:
1622
+ data_sandstone = data.create_feldspathic_sandstone(amounts=sequence[-1][-1][8], porosity=phi)
1623
+ top = self.actualThickness + i*d
1624
+ bottom = top + d
1625
+ sequence.append(["sandstone", round(d, 1), round(top, 1), round(bottom, 1), data_sandstone])
1626
+ #
1627
+ return sequence
1628
+ #
1629
+ def create_limestone(self, thickness=None, fluid="water"):
1630
+ self.fluid = fluid
1631
+ sequence = []
1632
+ if thickness == None:
1633
+ thickness_max = rd.randint(5, 20)
1634
+ else:
1635
+ thickness_max = thickness
1636
+ #
1637
+ if self.parts == None:
1638
+ d = 1.0
1639
+ self.parts = thickness_max
1640
+ else:
1641
+ d = float(thickness_max/self.parts)
1642
+ #
1643
+ for i in range(self.parts):
1644
+ if i == 0 and self.fluid == "water":
1645
+ data = limestone("water", actualThickness=self.actualThickness)
1646
+ data_limestone = data.create_simple_limestone()
1647
+ top = self.actualThickness
1648
+ bottom = top + d
1649
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), data_limestone])
1650
+ elif i == 0 and self.fluid == "gas":
1651
+ data = limestone("gas", actualThickness=self.actualThickness)
1652
+ data_limestone = data.create_simple_limestone()
1653
+ top = self.actualThickness
1654
+ bottom = top + d
1655
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), data_limestone])
1656
+ elif i == 0 and self.fluid == "oil":
1657
+ data = limestone("oil", actualThickness=self.actualThickness)
1658
+ data_limestone = data.create_simple_limestone()
1659
+ top = self.actualThickness
1660
+ bottom = top + d
1661
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), data_limestone])
1662
+ elif i > 0 and self.fluid == "water":
1663
+ data = limestone("water", actualThickness=bottom)
1664
+ data_limestone = data.create_simple_limestone(amounts=sequence[-1][-1][8])
1665
+ top = self.actualThickness + i*d
1666
+ bottom = top + d
1667
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), data_limestone])
1668
+ elif i > 0 and self.fluid == "gas":
1669
+ data = limestone("gas", actualThickness=bottom)
1670
+ data_limestone = data.create_simple_limestone(amounts=sequence[-1][-1][8])
1671
+ top = self.actualThickness + i*d
1672
+ bottom = top + d
1673
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), data_limestone])
1674
+ elif i > 0 and self.fluid == "oil":
1675
+ data = limestone("oil", actualThickness=bottom)
1676
+ data_limestone = data.create_simple_limestone(amounts=sequence[-1][-1][8])
1677
+ top = self.actualThickness + i*d
1678
+ bottom = top + d
1679
+ sequence.append(["limestone", round(d, 1), round(top, 1), round(bottom, 1), data_limestone])
1680
+ #
1681
+ return sequence
1682
+ #
1683
+ def create_shale(self, thickness=None):
1684
+ sequence = []
1685
+ if thickness == None:
1686
+ thickness_max = rd.randint(5, 20)
1687
+ else:
1688
+ thickness_max = thickness
1689
+ #
1690
+ if self.parts == None:
1691
+ d = 1.0
1692
+ self.parts = thickness_max
1693
+ else:
1694
+ d = float(thickness_max/self.parts)
1695
+ #
1696
+ for i in range(self.parts):
1697
+ if i == 0:
1698
+ data = shale()
1699
+ data_shale = data.create_shale()
1700
+ top = self.actualThickness
1701
+ bottom = top + d
1702
+ sequence.append(["shale", round(d, 1), round(top, 1), round(bottom, 1), data_shale])
1703
+ else:
1704
+ data = shale()
1705
+ data_shale = data.create_shale(amounts=sequence[-1][-1][8])
1706
+ top = self.actualThickness + i*d
1707
+ bottom = top + d
1708
+ sequence.append(["shale", round(d, 1), round(top, 1), round(bottom, 1), data_shale])
1709
+ #
1710
+ return sequence
1711
+ #
1712
+ def create_shale_complex(self, thickness=None):
1713
+ sequence = []
1714
+ if thickness == None:
1715
+ thickness_max = rd.randint(5, 20)
1716
+ else:
1717
+ thickness_max = thickness
1718
+ #
1719
+ if self.parts == None:
1720
+ d = 1.0
1721
+ self.parts = thickness_max
1722
+ else:
1723
+ d = float(thickness_max/self.parts)
1724
+ #
1725
+ for i in range(self.parts):
1726
+ if i == 0:
1727
+ data = shale()
1728
+ data_shale = data.create_simple_shale()
1729
+ top = self.actualThickness
1730
+ bottom = top + d
1731
+ sequence.append(["shale", round(d, 1), round(top, 1), round(bottom, 1), data_shale])
1732
+ else:
1733
+ data = shale()
1734
+ data_shale = data.create_simple_shale(amounts=sequence[-1][-1][8])
1735
+ top = self.actualThickness + i*d
1736
+ bottom = top + d
1737
+ sequence.append(["shale", round(d, 1), round(top, 1), round(bottom, 1), data_shale])
1738
+ #
1739
+ return sequence
1740
+ #
1741
+ def create_rocksalt(self, thickness=None):
1742
+ sequence = []
1743
+ if thickness == None:
1744
+ thickness_max = rd.randint(10, 20)
1745
+ else:
1746
+ thickness_max = thickness
1747
+ #
1748
+ if self.parts == None:
1749
+ d = 1.0
1750
+ self.parts = thickness_max
1751
+ else:
1752
+ d = float(thickness_max/self.parts)
1753
+ #
1754
+ for i in range(self.parts):
1755
+ if i == 0:
1756
+ data = Evaporites("water", actualThickness=self.actualThickness)
1757
+ data_halite = data.create_simple_rocksalt()
1758
+ top = self.actualThickness
1759
+ bottom = top + d
1760
+ sequence.append(["rock salt", round(d, 1), round(top, 1), round(bottom, 1), data_halite])
1761
+ else:
1762
+ data = Evaporites("water", actualThickness=self.actualThickness)
1763
+ data_halite = data.create_simple_rocksalt(amounts=sequence[-1][-1][8])
1764
+ top = self.actualThickness + i*d
1765
+ bottom = top + d
1766
+ sequence.append(["rock salt", round(d, 1), round(top, 1), round(bottom, 1), data_halite])
1767
+ #
1768
+ return sequence
1769
+ #
1770
+ def create_granite(self, thickness=None):
1771
+ sequence = []
1772
+ if thickness == None:
1773
+ thickness_max = rd.randint(10, 20)
1774
+ else:
1775
+ thickness_max = thickness
1776
+ #
1777
+ if self.parts == None:
1778
+ d = 1.0
1779
+ self.parts = thickness_max
1780
+ else:
1781
+ d = float(thickness_max/self.parts)
1782
+ #
1783
+ for i in range(self.parts):
1784
+ if i == 0:
1785
+ data = Plutonic("water", actualThickness=self.actualThickness)
1786
+ data_granite = data.create_simple_granite()
1787
+ top = self.actualThickness
1788
+ bottom = top + d
1789
+ sequence.append(["granite", round(d, 1), round(top, 1), round(bottom, 1), data_granite])
1790
+ else:
1791
+ data = Plutonic("water", actualThickness=self.actualThickness)
1792
+ data_granite = data.create_simple_granite(amounts=sequence[-1][-1][8])
1793
+ top = self.actualThickness + i*d
1794
+ bottom = top + d
1795
+ sequence.append(["granite", round(d, 1), round(top, 1), round(bottom, 1), data_granite])
1796
+ #
1797
+ return sequence
1798
+ #
1799
+ def create_basalt(self, thickness=None):
1800
+ sequence = []
1801
+ if thickness == None:
1802
+ thickness_max = rd.randint(10, 20)
1803
+ else:
1804
+ thickness_max = thickness
1805
+ #
1806
+ if self.parts == None:
1807
+ d = 1.0
1808
+ self.parts = thickness_max
1809
+ else:
1810
+ d = float(thickness_max/self.parts)
1811
+ #
1812
+ for i in range(self.parts):
1813
+ if i == 0:
1814
+ data = Volcanic("water", actualThickness=self.actualThickness)
1815
+ data_basalt = data.create_simple_basalt()
1816
+ top = self.actualThickness
1817
+ bottom = top + d
1818
+ sequence.append(["basalt", round(d, 1), round(top, 1), round(bottom, 1), data_basalt])
1819
+ else:
1820
+ data = Volcanic("water", actualThickness=self.actualThickness)
1821
+ data_basalt = data.create_simple_basalt(amounts=sequence[-1][-1][8])
1822
+ top = self.actualThickness + i*d
1823
+ bottom = top + d
1824
+ sequence.append(["basalt", round(d, 1), round(top, 1), round(bottom, 1), data_basalt])
1825
+ #
1826
+ return sequence
1827
+ #
1828
+ def create_sedimentary_basin(self, maximum_thickness=500, n_units = 15, csv_stratigraphy=False, csv_lithology=False,
1829
+ excludeRocksalt=False, excludeLimestone=False):
1830
+ self.maximum_thickness = maximum_thickness
1831
+ sequence = []
1832
+ thickness_list = [0, rd.randint(5, 10), rd.randint(5, 15)]
1833
+ depth_list = [thickness_list[1]]
1834
+ #
1835
+ for i in range(2, n_units):
1836
+ if len(thickness_list) < n_units:
1837
+ thickness_list.append(rd.randint(int(0.75*(maximum_thickness-sum(thickness_list))/(n_units-len(thickness_list)+1)), int(1.25*(maximum_thickness-sum(thickness_list))/(n_units-len(thickness_list)+1))))
1838
+ depth_list.append(sum(thickness_list[:i+1]))
1839
+ else:
1840
+ thickness_list.append(maximum_thickness-sum(thickness_list))
1841
+ depth_list.append(sum(thickness_list[:i+1]))
1842
+ depth_list.append(sum(thickness_list))
1843
+ del thickness_list[0]
1844
+ #
1845
+ condition = False
1846
+ while condition == False:
1847
+ for i in range(n_units):
1848
+ if len(sequence) == 0:
1849
+ data = SedimentaryBasin(parts=self.parts)
1850
+ data_soil = data.create_soil(thickness=thickness_list[i])
1851
+ sequence.append(data_soil)
1852
+ actual_depth = depth_list[i]
1853
+ elif len(sequence) == 1:
1854
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1855
+ data_sand = data.create_sand(thickness=thickness_list[i])
1856
+ sequence.append(data_sand)
1857
+ actual_depth = depth_list[i]
1858
+ elif actual_depth < 0.85*self.maximum_thickness and sequence[-1][-1][0] not in ["shale", "rock salt"] and sequence[-1][-1][-1][5] not in ["gas", "oil"]:
1859
+ condition_2 = False
1860
+ while condition_2 == False:
1861
+ magicnumber = rd.random()
1862
+ if magicnumber < 0.4:
1863
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1864
+ data_sandstone = data.create_sandstone(thickness=thickness_list[i])
1865
+ sequence.append(data_sandstone)
1866
+ actual_depth = depth_list[i]
1867
+ condition_2 = True
1868
+ elif 0.4 <= magicnumber < 0.8:
1869
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1870
+ data_shale = data.create_shale(thickness=thickness_list[i])
1871
+ sequence.append(data_shale)
1872
+ actual_depth = depth_list[i]
1873
+ condition_2 = True
1874
+ elif 0.8 <= magicnumber < 0.95 and excludeLimestone == False:
1875
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1876
+ data_limestone = data.create_limestone(thickness=thickness_list[i])
1877
+ sequence.append(data_limestone)
1878
+ actual_depth = depth_list[i]
1879
+ condition_2 = True
1880
+ elif magicnumber >= 0.95 and excludeRocksalt == False:
1881
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1882
+ data_rocksalt = data.create_rocksalt(thickness=thickness_list[i])
1883
+ sequence.append(data_rocksalt)
1884
+ actual_depth = depth_list[i]
1885
+ condition_2 = True
1886
+ elif magicnumber >= 0.95 and excludeRocksalt == True:
1887
+ condition_2 = False
1888
+ elif actual_depth < 0.85*self.maximum_thickness and sequence[-1][-1][0] in ["shale", "rock salt"]:
1889
+ condition_3 = False
1890
+ while condition_3 == False:
1891
+ magicnumber = rd.random()
1892
+ if magicnumber < 0.1 and excludeLimestone == False:
1893
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1894
+ data_limestone = data.create_limestone(thickness=thickness_list[i], fluid="gas")
1895
+ sequence.append(data_limestone)
1896
+ actual_depth = depth_list[i]
1897
+ condition_3 = True
1898
+ elif 0.1 <= magicnumber < 0.2 and excludeLimestone == False:
1899
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1900
+ data_limestone = data.create_limestone(thickness=thickness_list[i], fluid="oil")
1901
+ sequence.append(data_limestone)
1902
+ actual_depth = depth_list[i]
1903
+ condition_3 = True
1904
+ elif 0.2 <= magicnumber < 0.3:
1905
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1906
+ data_sandstone = data.create_sandstone(thickness=thickness_list[i], fluid="gas")
1907
+ sequence.append(data_sandstone)
1908
+ actual_depth = depth_list[i]
1909
+ condition_3 = True
1910
+ elif 0.3 <= magicnumber < 0.4:
1911
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1912
+ data_sandstone = data.create_sandstone(thickness=thickness_list[i], fluid="oil")
1913
+ sequence.append(data_sandstone)
1914
+ actual_depth = depth_list[i]
1915
+ condition_3 = True
1916
+ elif 0.4 <= magicnumber < 0.6:
1917
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1918
+ data_sandstone = data.create_sandstone(thickness=thickness_list[i], fluid="water")
1919
+ sequence.append(data_sandstone)
1920
+ actual_depth = depth_list[i]
1921
+ condition_3 = True
1922
+ elif 0.6 <= magicnumber < 0.8 and excludeLimestone == False:
1923
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1924
+ data_limestone = data.create_limestone(thickness=thickness_list[i], fluid="water")
1925
+ sequence.append(data_limestone)
1926
+ actual_depth = depth_list[i]
1927
+ condition_3 = True
1928
+ elif magicnumber >= 0.8:
1929
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1930
+ data_shale = data.create_shale(thickness=thickness_list[i])
1931
+ sequence.append(data_shale)
1932
+ actual_depth = depth_list[i]
1933
+ condition_3 = True
1934
+ elif excludeLimestone == True:
1935
+ condition_3 = False
1936
+ elif actual_depth < 0.85*self.maximum_thickness and sequence[-1][-1][4][5] == "gas" and sequence[-1][-1][0] == "sandstone":
1937
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1938
+ data_sandstone = data.create_sandstone(thickness=thickness_list[i], fluid="oil")
1939
+ sequence.append(data_sandstone)
1940
+ actual_depth = depth_list[i]
1941
+ elif actual_depth < 0.85*self.maximum_thickness and sequence[-1][-1][4][5] == "oil" and sequence[-1][-1][0] == "sandstone":
1942
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1943
+ data_sandstone = data.create_sandstone(thickness=thickness_list[i], fluid="water")
1944
+ sequence.append(data_sandstone)
1945
+ actual_depth = depth_list[i]
1946
+ elif actual_depth < 0.85*self.maximum_thickness and sequence[-1][-1][4][5] == "gas" and sequence[-1][-1][0] == "limestone" and excludeLimestone == False:
1947
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1948
+ data_limestone = data.create_limestone(thickness=thickness_list[i], fluid="oil")
1949
+ sequence.append(data_limestone)
1950
+ actual_depth = depth_list[i]
1951
+ elif actual_depth < 0.85*self.maximum_thickness and sequence[-1][-1][4][5] == "oil" and sequence[-1][-1][0] == "limestone" and excludeLimestone == False:
1952
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1953
+ data_limestone = data.create_limestone(thickness=thickness_list[i], fluid="water")
1954
+ sequence.append(data_limestone)
1955
+ actual_depth = depth_list[i]
1956
+ elif actual_depth >= 0.85*self.maximum_thickness and actual_depth < maximum_thickness:
1957
+ if sequence[-1][-1][0] not in ["granite", "basalt"]:
1958
+ magicnumber = rd.randint(0, 1)
1959
+ elif sequence[-1][-1][0] == "granite":
1960
+ magicnumber = 0
1961
+ elif sequence[-1][-1][0] == "basalt":
1962
+ magicnumber = 1
1963
+ if magicnumber == 0 or sequence[-1][-1][0] == "granite":
1964
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1965
+ data_granite = data.create_granite(thickness=thickness_list[i])
1966
+ sequence.append(data_granite)
1967
+ actual_depth = depth_list[i]
1968
+ elif magicnumber == 1 or sequence[-1][-1][0] == "basalt":
1969
+ data = SedimentaryBasin(parts=self.parts, actualThickness=actual_depth)
1970
+ data_basalt = data.create_basalt(thickness=thickness_list[i])
1971
+ sequence.append(data_basalt)
1972
+ actual_depth = depth_list[i]
1973
+ elif actual_depth >= self.maximum_thickness:
1974
+ condition = True
1975
+ #print("Actual depth for", len(sequence), "units:", actual_depth, "m. -->", sequence[-1][-1][0], sequence[-1][-1][4][5])
1976
+ #
1977
+ units_list = []
1978
+ for i in range(len(sequence)):
1979
+ if sequence[i][0][0] not in units_list:
1980
+ units_list.append(sequence[i][0][0])
1981
+ #
1982
+ if csv_stratigraphy == True:
1983
+ try:
1984
+ file_sb = open("Data_SB_Stratigraphy.csv", "w")
1985
+ except:
1986
+ print("Error")
1987
+ sys.exit(0)
1988
+ file_sb.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("POISSON") + "," + str("FLUID") + "\n")
1989
+ for i in range(len(sequence)):
1990
+ for j in range(len(sequence[i])):
1991
+ if sequence[i][j][0] == "soil":
1992
+ file_sb.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5][0]) + "\n")
1993
+ else:
1994
+ file_sb.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "\n")
1995
+ #
1996
+ if csv_lithology == True:
1997
+ try:
1998
+ file_soil = open("Data_SB_Soil.csv", "w")
1999
+ file_sand = open("Data_SB_Sand.csv", "w")
2000
+ file_sandstone = open("Data_SB_Sandstone.csv", "w")
2001
+ file_limestone = open("Data_SB_Limestone.csv", "w")
2002
+ file_shale = open("Data_SB_Shale.csv", "w")
2003
+ #file_shale_complex = open("Data_SB_Shale_complex.csv", "w")
2004
+ if "rock salt" in units_list:
2005
+ file_rocksalt = open("Data_SB_Rocksalt.csv", "w")
2006
+ file_rocksalt.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("HL") + "," + str("ANH") + "," + str("GP") + "," + str("SYL") + "\n")
2007
+ if "granite" in units_list:
2008
+ file_granite = open("Data_SB_Granite.csv", "w")
2009
+ file_granite.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("QZ") + "," + str("KFS") + "," + str("PL") + "," + str("BT") + "," + str("MS") + "," + str("ACT") + "," + str("TR") + "," + str("AUG") + "\n")
2010
+ if "basalt" in units_list:
2011
+ file_basalt = open("Data_SB_Basalt.csv", "w")
2012
+ file_basalt.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("QZ") + "," + str("KFS") + "," + str("PL") + "," + str("BT") + "," + str("MS") + "," + str("ACT") + "," + str("TR") + "," + str("AUG") + "\n")
2013
+ except:
2014
+ print("Error")
2015
+ sys.exit(0)
2016
+ #
2017
+ file_soil.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL1") + "," + str("RHOFL2") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("QZ") + "," + str("ILT") + "," + str("KLN") + "," + str("ORG") + "\n")
2018
+ file_sand.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("QZ") + "," + str("ILT") + "," + str("KLN") + "," + str("ORG") + "\n")
2019
+ file_sandstone.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("QZ") + "," + str("KFS") + "," + str("PL") + "," + str("CAL") + "," + str("CHL") + "," + str("MS") + "," + str("HEM") + "\n")
2020
+ file_limestone.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("CAL") + "," + str("ARG") + "," + str("DOL") + "," + str("SD") + "," + str("QZ") + "," + str("KFS") + "," + str("PL") + "," + str("MNT") + "," + str("KLN") + "," + str("CHL") + "," + str("PY") + "\n")
2021
+ file_shale.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("ORG") + "," + str("QZ") + "," + str("CAL") + "," + str("ILT") + "," + str("KLN") + "," + str("MNT") + "\n")
2022
+ #file_shale_complex.write(str("LITHOLOGY") + "," + str("THICKNESS") + "," + str("TOP") + "," + str("BOTTOM") + "," + str("RHOB") + "," + str("RHOMA") + "," + str("RHOFL") + "," + str("VP") + "," + str("VS") + "," + str("GR") + "," + str("PE") + "," + str("PHIN") + "," + str("KMOD") + "," + str("GMOD") + "," + str("EMOD") + "," + str("POISSON") + "," + str("FLUID") + "," + str("ORG") + "," + str("QZ") + "," + str("CAL") + "," + str("PY") + "," + str("ILT") + "," + str("KLN") + "," + str("MNT") + "," + str("BT") + "," + str("MS") + "," + str("URN") + "\n")
2023
+ for i in range(len(sequence)):
2024
+ for j in range(len(sequence[i])):
2025
+ if sequence[i][j][0] == "soil":
2026
+ file_soil.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][1][3]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5][0]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + "," + str(sequence[i][j][4][8][3]) + "\n")
2027
+ elif sequence[i][j][0] == "sand":
2028
+ file_sand.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + "," + str(sequence[i][j][4][8][3]) + "\n")
2029
+ elif sequence[i][j][0] == "sandstone":
2030
+ file_sandstone.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + "," + str(sequence[i][j][4][8][3]) + "," + str(sequence[i][j][4][8][4]) + "," + str(sequence[i][j][4][8][5]) + "," + str(sequence[i][j][4][8][6]) + "\n")
2031
+ elif sequence[i][j][0] == "limestone":
2032
+ file_limestone.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + "," + str(sequence[i][j][4][8][3]) + "," + str(sequence[i][j][4][8][4]) + "," + str(sequence[i][j][4][8][5]) + "," + str(sequence[i][j][4][8][6]) + "," + str(sequence[i][j][4][8][7]) + "," + str(sequence[i][j][4][8][8]) + "," + str(sequence[i][j][4][8][9]) + "," + str(sequence[i][j][4][8][10]) + "\n")
2033
+ elif sequence[i][j][0] == "shale":
2034
+ file_shale.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + str(sequence[i][j][4][8][3]) + "," + str(sequence[i][j][4][8][4]) + "," + str(sequence[i][j][4][8][5]) + "\n")
2035
+ #file_shale_complex.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + "," + str(sequence[i][j][4][8][3]) + "," + str(sequence[i][j][4][8][4]) + "," + str(sequence[i][j][4][8][5]) + "," + str(sequence[i][j][4][8][6]) + "," + str(sequence[i][j][4][8][7]) + "," + str(sequence[i][j][4][8][8]) + "," + str(sequence[i][j][4][8][9]) + "\n")
2036
+ elif sequence[i][j][0] == "rock salt":
2037
+ file_rocksalt.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + "," + str(sequence[i][j][4][8][3]) + "\n")
2038
+ elif sequence[i][j][0] == "granite":
2039
+ file_granite.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + "," + str(sequence[i][j][4][8][3]) + "," + str(sequence[i][j][4][8][4]) + "," + str(sequence[i][j][4][8][5]) + "," + str(sequence[i][j][4][8][6]) + "," + str(sequence[i][j][4][8][7]) + "\n")
2040
+ elif sequence[i][j][0] == "basalt":
2041
+ file_basalt.write(str(sequence[i][j][0]) + "," + str(sequence[i][j][1]) + "," + str(sequence[i][j][2]) + "," + str(sequence[i][j][3]) + "," + str(sequence[i][j][4][1][0]) + "," + str(sequence[i][j][4][1][1]) + "," + str(sequence[i][j][4][1][2]) + "," + str(sequence[i][j][4][3][0]) + "," + str(sequence[i][j][4][3][1]) + "," + str(sequence[i][j][4][6][0]) + "," + str(sequence[i][j][4][6][1]) + "," + str(sequence[i][j][4][4][0]) + "," + str(sequence[i][j][4][2][0]) + "," + str(sequence[i][j][4][2][1]) + "," + str(sequence[i][j][4][2][2]) + "," + str(sequence[i][j][4][2][3]) + "," + str(sequence[i][j][4][5]) + "," + str(sequence[i][j][4][8][0]) + "," + str(sequence[i][j][4][8][1]) + "," + str(sequence[i][j][4][8][2]) + "," + str(sequence[i][j][4][8][3]) + "," + str(sequence[i][j][4][8][4]) + "," + str(sequence[i][j][4][8][5]) + "," + str(sequence[i][j][4][8][6]) + "," + str(sequence[i][j][4][8][7]) + "\n")
2042
+ #
2043
+ return sequence
2044
+ #
2045
+ class Plutonite:
2046
+ #
2047
+ def __init__(self, actualThickness=0, parts=None, maximum_thickness=None):
2048
+ self.actualThickness = actualThickness
2049
+ self.parts = parts
2050
+ self.maximum_thickness = maximum_thickness
2051
+ #
2052
+ def create_gabbro(self, thickness=None):
2053
+ sequence = []
2054
+ if thickness == None:
2055
+ thickness_max = rd.randint(10, 20)
2056
+ else:
2057
+ thickness_max = thickness
2058
+ #
2059
+ if self.parts == None:
2060
+ d = 1.0
2061
+ self.parts = thickness_max
2062
+ else:
2063
+ d = float(thickness_max/self.parts)
2064
+ #
2065
+ for i in range(self.parts):
2066
+ if i == 0:
2067
+ data = Plutonic("water", actualThickness=self.actualThickness)
2068
+ data_rock = data.create_simple_gabbro()
2069
+ top = self.actualThickness
2070
+ bottom = top + d
2071
+ sequence.append(["gabbro", round(d, 1), round(top, 1), round(bottom, 1), data_rock])
2072
+ else:
2073
+ data = Plutonic("water", actualThickness=self.actualThickness)
2074
+ data_rock = data.create_simple_gabbro(amounts=sequence[-1][-1][8])
2075
+ top = self.actualThickness + i*d
2076
+ bottom = top + d
2077
+ sequence.append(["gabbro", round(d, 1), round(top, 1), round(bottom, 1), data_rock])
2078
+ #
2079
+ return sequence
2080
+ #
2081
+ def create_granite(self, thickness=None):
2082
+ sequence = []
2083
+ if thickness == None:
2084
+ thickness_max = rd.randint(10, 20)
2085
+ else:
2086
+ thickness_max = thickness
2087
+ #
2088
+ if self.parts == None:
2089
+ d = 1.0
2090
+ self.parts = thickness_max
2091
+ else:
2092
+ d = float(thickness_max/self.parts)
2093
+ #
2094
+ for i in range(self.parts):
2095
+ if i == 0:
2096
+ data = Plutonic("water", actualThickness=self.actualThickness)
2097
+ data_rock = data.create_simple_granite()
2098
+ top = self.actualThickness
2099
+ bottom = top + d
2100
+ sequence.append(["granite", round(d, 1), round(top, 1), round(bottom, 1), data_rock])
2101
+ else:
2102
+ data = Plutonic("water", actualThickness=self.actualThickness)
2103
+ data_rock = data.create_simple_granite(amounts=sequence[-1][-1][8])
2104
+ top = self.actualThickness + i*d
2105
+ bottom = top + d
2106
+ sequence.append(["granite", round(d, 1), round(top, 1), round(bottom, 1), data_rock])
2107
+ #
2108
+ return sequence
2109
+ #
2110
+ def create_felsic(self, thickness=None):
2111
+ sequence = []
2112
+ if thickness == None:
2113
+ thickness_max = rd.randint(10, 20)
2114
+ else:
2115
+ thickness_max = thickness
2116
+ #
2117
+ if self.parts == None:
2118
+ d = 1.0
2119
+ self.parts = thickness_max
2120
+ else:
2121
+ d = float(thickness_max/self.parts)
2122
+ #
2123
+ for i in range(self.parts):
2124
+ if i == 0:
2125
+ data = Plutonic("water", actualThickness=self.actualThickness)
2126
+ data_rock = data.create_felsic()
2127
+ top = self.actualThickness
2128
+ bottom = top + d
2129
+ sequence.append(["felsic rock", round(d, 1), round(top, 1), round(bottom, 1), data_rock])
2130
+ else:
2131
+ data = Plutonic("water", actualThickness=self.actualThickness)
2132
+ data_rock = data.create_felsic(amounts=sequence[-1][-1][8])
2133
+ top = self.actualThickness + i*d
2134
+ bottom = top + d
2135
+ sequence.append(["felsic rock", round(d, 1), round(top, 1), round(bottom, 1), data_rock])
2136
+ #
2137
+ return sequence
2138
+ #
2139
+ def create_intermediate(self, thickness=None):
2140
+ sequence = []
2141
+ if thickness == None:
2142
+ thickness_max = rd.randint(10, 20)
2143
+ else:
2144
+ thickness_max = thickness
2145
+ #
2146
+ if self.parts == None:
2147
+ d = 1.0
2148
+ self.parts = thickness_max
2149
+ else:
2150
+ d = float(thickness_max/self.parts)
2151
+ #
2152
+ for i in range(self.parts):
2153
+ if i == 0:
2154
+ data = Plutonic("water", actualThickness=self.actualThickness)
2155
+ data_rock = data.create_intermediate()
2156
+ top = self.actualThickness
2157
+ bottom = top + d
2158
+ sequence.append(["intermediate rock", round(d, 1), round(top, 1), round(bottom, 1), data_rock])
2159
+ else:
2160
+ data = Plutonic("water", actualThickness=self.actualThickness)
2161
+ data_rock = data.create_intermediate(amounts=sequence[-1][-1][8])
2162
+ top = self.actualThickness + i*d
2163
+ bottom = top + d
2164
+ sequence.append(["intermediate rock", round(d, 1), round(top, 1), round(bottom, 1), data_rock])
2165
+ #
2166
+ return sequence