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
modules/ore.py ADDED
@@ -0,0 +1,1628 @@
1
+ #!/usr/bin/env python
2
+ # -*-coding: utf-8 -*-
3
+
4
+ # -----------------------------------------------
5
+
6
+ # Name: ore.py
7
+ # Author: Maximilian A. Beeskow
8
+ # Version: 1.0
9
+ # Date: 10.12.2024
10
+
11
+ # -----------------------------------------------
12
+
13
+ # MODULES
14
+ import time
15
+ import numpy as np
16
+ import random as rd
17
+ from modules.silicates import Phyllosilicates, Tectosilicates, Nesosilicates, Sorosilicates, Inosilicates, Cyclosilicates
18
+ from modules.oxides import Oxides
19
+ from modules.carbonates import Carbonates
20
+ from modules.sulfides import Sulfides
21
+ from modules.phosphates import Phosphates
22
+ from modules import fluids
23
+ from modules.fluids import Water
24
+ from modules.geophysics import Elasticity as elast
25
+ from modules.chemistry import PeriodicSystem, OxideCompounds
26
+ from modules.minerals import CrystalPhysics
27
+ from modules.geophysics import BoreholeGeophysics as bg
28
+ from modules.geophysics import WellLog as wg
29
+ from modules.geochemistry import MineralChemistry
30
+ from modules.pyllosilicates import Pyllosilicates
31
+ from modules.petrophysics import SeismicVelocities
32
+
33
+ class OreRocks:
34
+ #
35
+ def __init__(self, fluid, actual_thickness, porosity):
36
+ ## Settings
37
+ self.fluid = fluid
38
+ self.actual_thickness = actual_thickness
39
+ self.porosity = porosity
40
+ #
41
+ ## Minerals
42
+ self.data_quartz = Oxides(data_type=True).create_quartz()
43
+ self.data_magnetite = Oxides(data_type=True).create_magnetite()
44
+ self.data_hematite = Oxides(data_type=True).create_hematite()
45
+ self.data_goethite = Oxides(data_type=True).create_goethite()
46
+ self.data_gibbsite = Oxides(data_type=True).create_gibbsite()
47
+ self.data_boehmite = Oxides(data_type=True).create_boehmite()
48
+ self.data_anatase = Oxides(data_type=True).create_anatase()
49
+ self.data_calcite = Carbonates(data_type=True).create_calcite()
50
+ self.data_siderite = Carbonates(data_type=True).create_siderite()
51
+ self.data_kaolinite = Phyllosilicates(impurity="pure", data_type=True).create_kaolinite()
52
+ self.data_pyrite = Sulfides(impurity="pure", data_type=True).create_pyrite()
53
+ #
54
+ ## Fluids
55
+ #
56
+ self.data_water = Water.water("")
57
+ #
58
+ def create_siliciclastic_itabirite(self, rock="Itabirite", number=1, composition=None, classification="Itabirite"):
59
+ #
60
+ results_container = {}
61
+ results_container["rock"] = rock
62
+ results_container["mineralogy"] = {}
63
+ results_container["chemistry"] = {}
64
+ results_container["compounds"] = {}
65
+ results_container["phi"] = []
66
+ results_container["fluid"] = self.fluid
67
+ results_container["rho_s"] = []
68
+ results_container["rho"] = []
69
+ results_container["vP"] = []
70
+ results_container["vS"] = []
71
+ results_container["vP/vS"] = []
72
+ results_container["K"] = []
73
+ results_container["G"] = []
74
+ results_container["E"] = []
75
+ results_container["nu"] = []
76
+ results_container["GR"] = []
77
+ results_container["PE"] = []
78
+
79
+ n = 0
80
+
81
+ classification = rock
82
+
83
+ while n < number:
84
+ data_biotite = Phyllosilicates(impurity="pure", data_type=True).create_biotite()
85
+ #
86
+ mineralogy = {"Hem": self.data_hematite, "Goe": self.data_goethite, "Kln": self.data_kaolinite,
87
+ "Qz": self.data_quartz, "Mag": self.data_magnetite, "Gbs": self.data_gibbsite,
88
+ "Bt": data_biotite}
89
+ #
90
+ minerals_list = list(mineralogy.keys())
91
+ #
92
+ if minerals_list[0] not in results_container["mineralogy"]:
93
+ for mineral in minerals_list:
94
+ results_container["mineralogy"][mineral] = []
95
+ #
96
+ condition = False
97
+ #
98
+ while condition == False:
99
+ elements_list = []
100
+ phi_minerals = {}
101
+ w_minerals = {}
102
+ w_elements = {}
103
+ #
104
+ if composition != None:
105
+ phi_hem = composition["Hem"]
106
+ phi_goe = composition["Goe"]
107
+ phi_kln = composition["Kln"]
108
+ phi_qz = composition["Qz"]
109
+ phi_mag = composition["Mag"]
110
+ phi_gbs = composition["Gbs"]
111
+ phi_bt = composition["Bt"]
112
+ #
113
+ phi_minerals["Hem"] = phi_hem
114
+ phi_minerals["Goe"] = phi_goe
115
+ phi_minerals["Kln"] = phi_kln
116
+ phi_minerals["Qz"] = phi_qz
117
+ phi_minerals["Mag"] = phi_mag
118
+ phi_minerals["Gbs"] = phi_gbs
119
+ phi_minerals["Bt"] = phi_bt
120
+ #
121
+ else:
122
+ condition_2 = False
123
+ while condition_2 == False:
124
+ if classification == "Itabirite":
125
+ gbs_limits = [0.0, 0.05]
126
+ qz_limits = [0.0, 0.4]
127
+ mag_limits = [0.0, 0.05]
128
+ hem_limits = [0.3, 0.7]
129
+ goe_limits = [0.05, 0.26]
130
+ kln_limits = [0.0, 0.14]
131
+ bt_limits = [0.0, 0.05]
132
+ elif classification == "Banded Iron Formation":
133
+ gbs_limits = [0.0, 0.05]
134
+ qz_limits = [0.4, 0.75]
135
+ mag_limits = [0.15, 0.4]
136
+ hem_limits = [0.05, 0.20]
137
+ goe_limits = [0.0, 0.05]
138
+ kln_limits = [0.0, 0.15]
139
+ bt_limits = [0.0, 0.05]
140
+ elif classification == "Compact Hematite":
141
+ gbs_limits = [0.0, 0.05]
142
+ qz_limits = [0.0, 0.05]
143
+ mag_limits = [0.0, 0.05]
144
+ hem_limits = [0.7, 0.8]
145
+ goe_limits = [0.05, 0.15]
146
+ kln_limits = [0.0, 0.1]
147
+ bt_limits = [0.0, 0.05]
148
+ elif classification == "Friable Hematite":
149
+ gbs_limits = [0.0, 0.02]
150
+ qz_limits = [0.0, 0.02]
151
+ mag_limits = [0.0, 0.02]
152
+ hem_limits = [0.85, 0.95]
153
+ goe_limits = [0.04, 0.06]
154
+ kln_limits = [0.0, 0.02]
155
+ bt_limits = [0.0, 0.02]
156
+ elif classification == "Goethite Hematite":
157
+ gbs_limits = [0.05, 0.09]
158
+ qz_limits = [0.0, 0.02]
159
+ mag_limits = [0.0, 0.02]
160
+ hem_limits = [0.66, 0.72]
161
+ goe_limits = [0.18, 0.22]
162
+ kln_limits = [0.0, 0.02]
163
+ bt_limits = [0.0, 0.02]
164
+ elif classification == "Al-rich Itabirite":
165
+ gbs_limits = [0.0, 0.02]
166
+ qz_limits = [0.0, 0.08]
167
+ mag_limits = [0.0, 0.05]
168
+ hem_limits = [0.6, 0.67]
169
+ goe_limits = [0.1, 0.18]
170
+ kln_limits = [0.1, 0.18]
171
+ bt_limits = [0.0, 0.02]
172
+ elif classification == "Compact Quartz Itabirite":
173
+ gbs_limits = [0.0, 0.02]
174
+ qz_limits = [0.42, 0.5]
175
+ mag_limits = [0.0, 0.05]
176
+ hem_limits = [0.42, 0.5]
177
+ goe_limits = [0.0, 0.05]
178
+ kln_limits = [0.0, 0.02]
179
+ bt_limits = [0.0, 0.02]
180
+ elif classification == "Friable Quartz Itabirite":
181
+ gbs_limits = [0.0, 0.02]
182
+ qz_limits = [0.3, 0.38]
183
+ mag_limits = [0.0, 0.05]
184
+ hem_limits = [0.54, 0.62]
185
+ goe_limits = [0.0, 0.05]
186
+ kln_limits = [0.0, 0.02]
187
+ bt_limits = [0.0, 0.02]
188
+ elif classification == "Goethite Itabirite":
189
+ gbs_limits = [0.0, 0.05]
190
+ qz_limits = [0.18, 0.28]
191
+ mag_limits = [0.0, 0.05]
192
+ hem_limits = [0.32, 0.4]
193
+ goe_limits = [0.3, 0.38]
194
+ kln_limits = [0.0, 0.02]
195
+ bt_limits = [0.0, 0.02]
196
+ #
197
+ phi_hem = round(rd.uniform(hem_limits[0], hem_limits[1]), 4)
198
+ phi_goe = round(rd.uniform(goe_limits[0], (1 - phi_hem)), 4)
199
+ phi_kln = round(rd.uniform(kln_limits[0], (1 - phi_hem - phi_goe)), 4)
200
+ phi_qz = round(rd.uniform(qz_limits[0], (1 - phi_hem - phi_goe - phi_kln)), 4)
201
+ phi_mag = round(rd.uniform(mag_limits[0], (1 - phi_hem - phi_goe - phi_kln - phi_qz)), 4)
202
+ phi_gbs = round(rd.uniform(gbs_limits[0], (1 - phi_hem - phi_goe - phi_kln - phi_qz
203
+ - phi_mag)), 4)
204
+ phi_bt = round(1 - phi_hem - phi_goe - phi_kln - phi_qz - phi_mag - phi_gbs, 4)
205
+ #
206
+ phi_total = phi_hem + phi_goe + phi_kln + phi_qz + phi_mag + phi_gbs + phi_bt
207
+ #
208
+ if np.isclose(phi_total, 1.0000) == True:
209
+ if hem_limits[0] <= phi_hem <= hem_limits[1] \
210
+ and goe_limits[0] <= phi_goe <= goe_limits[1] \
211
+ and kln_limits[0] <= phi_kln <= kln_limits[1] \
212
+ and qz_limits[0] <= phi_qz <= qz_limits[1] \
213
+ and mag_limits[0] <= phi_mag <= mag_limits[1] \
214
+ and gbs_limits[0] <= phi_gbs <= gbs_limits[1] \
215
+ and bt_limits[0] <= phi_bt <= bt_limits[1]:
216
+ condition_2 = True
217
+ #
218
+ phi_minerals["Hem"] = phi_hem
219
+ phi_minerals["Goe"] = phi_goe
220
+ phi_minerals["Kln"] = phi_kln
221
+ phi_minerals["Qz"] = phi_qz
222
+ phi_minerals["Mag"] = phi_mag
223
+ phi_minerals["Gbs"] = phi_gbs
224
+ phi_minerals["Bt"] = phi_bt
225
+ #
226
+ rho_s = 0
227
+ for key, value in phi_minerals.items():
228
+ rho_s += phi_minerals[key]*mineralogy[key]["rho"]
229
+ for element, value in mineralogy[key]["chemistry"].items():
230
+ if element not in elements_list:
231
+ elements_list.append(element)
232
+ w_elements[element] = 0.0
233
+ #
234
+ if elements_list[0] not in results_container["chemistry"]:
235
+ for element in elements_list:
236
+ results_container["chemistry"][element] = []
237
+ #
238
+ rho_s = round(rho_s, 3)
239
+ for key, value in phi_minerals.items():
240
+ if key == "Urn":
241
+ n_digits = 4
242
+ else:
243
+ n_digits = 4
244
+ #
245
+ w_minerals[key] = round((phi_minerals[key]*mineralogy[key]["rho"])/rho_s, n_digits)
246
+ #
247
+ if self.porosity == None:
248
+ var_porosity = round(rd.uniform(0.0, 0.1), 4)
249
+ else:
250
+ var_porosity = round(rd.uniform(self.porosity[0], self.porosity[1]), 4)
251
+ #
252
+ if self.fluid == "water":
253
+ data_fluid = self.data_water
254
+ #
255
+ rho = round((1 - var_porosity)*rho_s + var_porosity*data_fluid[2]/1000, 3)
256
+ #
257
+ old_index = elements_list.index("O")
258
+ elements_list += [elements_list.pop(old_index)]
259
+ #
260
+ w_elements_total = 0.0
261
+ for element in elements_list:
262
+ if element != "O":
263
+ for mineral, w_mineral in w_minerals.items():
264
+ if element in mineralogy[mineral]["chemistry"]:
265
+ if element == "U":
266
+ n_digits = 4
267
+ else:
268
+ n_digits = 4
269
+ #
270
+ value = round(w_mineral*mineralogy[mineral]["chemistry"][element], n_digits)
271
+ w_elements[element] += value
272
+ w_elements_total += value
273
+ #
274
+ w_elements[element] = round(w_elements[element], n_digits)
275
+ elif element == "O":
276
+ w_elements[element] += round(1 - w_elements_total, 4)
277
+ #
278
+ w_elements[element] = round(w_elements[element], 4)
279
+ #
280
+ total_w_minerals = round(sum(w_minerals.values()), 4)
281
+ total_w_elements = round(sum(w_elements.values()), 4)
282
+ if total_w_minerals == 1.0 and total_w_elements == 1.0:
283
+ for key, value in w_minerals.items():
284
+ w_minerals[key] = abs(value)
285
+ #
286
+ for key, value in w_elements.items():
287
+ w_elements[key] = abs(value)
288
+ #
289
+ condition = True
290
+ #
291
+ gamma_ray = 0.0
292
+ photoelectricity = 0.0
293
+ #
294
+ K_list = []
295
+ G_list = []
296
+ phi_list = []
297
+ for key, value in phi_minerals.items():
298
+ gamma_ray += phi_minerals[key]*mineralogy[key]["GR"]
299
+ photoelectricity += phi_minerals[key]*mineralogy[key]["PE"]
300
+ #
301
+ gamma_ray = round(gamma_ray, 3)
302
+ photoelectricity = round(photoelectricity, 3)
303
+ #
304
+ K_list.append(round(phi_minerals[key]*mineralogy[key]["K"], 3))
305
+ G_list.append(round(phi_minerals[key]*mineralogy[key]["G"], 3))
306
+ phi_list.append(phi_minerals[key])
307
+ #
308
+ K_geo = elast.calc_geometric_mean(self, phi_list, K_list)
309
+ G_geo = elast.calc_geometric_mean(self, phi_list, G_list)
310
+ #
311
+ anisotropic_factor = 1.0
312
+ #
313
+ bulk_mod = K_geo/anisotropic_factor
314
+ shear_mod = G_geo/anisotropic_factor
315
+ #
316
+ youngs_mod = round((9*bulk_mod*shear_mod)/(3*bulk_mod + shear_mod), 3)
317
+ poisson_rat = round((3*bulk_mod - 2*shear_mod)/(6*bulk_mod + 2*shear_mod), 6)
318
+ vP = round(((bulk_mod*10**9 + 4/3*shear_mod*10**9)/(rho))**0.5, 3)
319
+ vS = round(((shear_mod*10**9)/(rho))**0.5, 3)
320
+ vPvS = round(vP/vS, 6)
321
+ #
322
+ for key, value in w_minerals.items():
323
+ results_container["mineralogy"][key].append(value)
324
+
325
+ amounts = []
326
+ for key, value in w_elements.items():
327
+ results_container["chemistry"][key].append(value)
328
+ chem_data = PeriodicSystem(name=key).get_data()
329
+ amounts.append([key, chem_data[1], value])
330
+
331
+ list_elements = list(w_elements.keys())
332
+ list_oxides = OxideCompounds(var_list_elements=list_elements).find_oxides()
333
+ composition_oxides = {}
334
+ for var_oxide in list_oxides:
335
+ oxide_data = OxideCompounds(var_compound=var_oxide, var_amounts=amounts).get_composition()
336
+ composition_oxides[var_oxide] = round(oxide_data["Oxide"][1], 4)
337
+
338
+ if list_oxides[0] not in results_container["compounds"]:
339
+ for oxide in list_oxides:
340
+ results_container["compounds"][oxide] = []
341
+
342
+ for key, value in composition_oxides.items():
343
+ results_container["compounds"][key].append(value)
344
+
345
+ results_container["mineralogy"] = dict(sorted(
346
+ results_container["mineralogy"].items(), key=lambda item: sum(item[1])/len(item[1]), reverse=True))
347
+ results_container["chemistry"] = dict(sorted(
348
+ results_container["chemistry"].items(), key=lambda item: sum(item[1])/len(item[1]), reverse=True))
349
+ results_container["compounds"] = dict(sorted(
350
+ results_container["compounds"].items(), key=lambda item: sum(item[1])/len(item[1]), reverse=True))
351
+
352
+ results_container["phi"].append(var_porosity)
353
+ results_container["rho_s"].append(rho_s)
354
+ results_container["rho"].append(rho)
355
+ results_container["vP"].append(vP)
356
+ results_container["vS"].append(vS)
357
+ results_container["vP/vS"].append(vPvS)
358
+ results_container["K"].append(bulk_mod)
359
+ results_container["G"].append(shear_mod)
360
+ results_container["E"].append(youngs_mod)
361
+ results_container["nu"].append(poisson_rat)
362
+ results_container["GR"].append(gamma_ray)
363
+ results_container["PE"].append(photoelectricity)
364
+ #
365
+ n += 1
366
+ #
367
+ return results_container
368
+
369
+ def create_bandedironformation(self, rock="Banded Iron Formation", number=1, composition=None, mode="random"):
370
+ results_container = {}
371
+ results_container["rock"] = rock
372
+ results_container["mineralogy"] = {}
373
+ results_container["chemistry"] = {}
374
+ results_container["compounds"] = {}
375
+ results_container["phi"] = []
376
+ results_container["phi_true"] = []
377
+ results_container["fluid"] = self.fluid
378
+ results_container["rho_s"] = []
379
+ results_container["rho"] = []
380
+ results_container["vP"] = []
381
+ results_container["vS"] = []
382
+ results_container["vP/vS"] = []
383
+ results_container["K"] = []
384
+ results_container["G"] = []
385
+ results_container["E"] = []
386
+ results_container["nu"] = []
387
+ results_container["GR"] = []
388
+ results_container["PE"] = []
389
+
390
+ n = 0
391
+ w_last = None
392
+ list_ore_values = np.around(np.linspace(0.25, 0.5, number), 4)
393
+ list_ore_values_reverse = sorted(list_ore_values, reverse=True)
394
+ while n < number:
395
+ data_apatite = Phosphates(data_type=True).create_aptite()
396
+ mineralogy = {
397
+ "Qz": self.data_quartz, "Mag": self.data_magnetite, "Hem": self.data_hematite,
398
+ "Kln": self.data_kaolinite, "Ap": data_apatite}
399
+ minerals_list = list(mineralogy.keys())
400
+
401
+ if minerals_list[0] not in results_container["mineralogy"]:
402
+ for mineral in minerals_list:
403
+ results_container["mineralogy"][mineral] = []
404
+
405
+ condition = False
406
+ while condition == False:
407
+ elements_list = []
408
+ phi_minerals = {}
409
+ w_minerals = {}
410
+ w_elements = {}
411
+
412
+ if composition != None:
413
+ phi_qz = composition["Qz"]
414
+ phi_mag = composition["Mag"]
415
+ phi_hem = composition["Hem"]
416
+ phi_kln = composition["Kln"]
417
+ phi_ap = composition["Ap"]
418
+
419
+ phi_minerals["Qz"] = phi_qz
420
+ phi_minerals["Mag"] = phi_mag
421
+ phi_minerals["Hem"] = phi_hem
422
+ phi_minerals["Kln"] = phi_kln
423
+ phi_minerals["Ap"] = phi_ap
424
+
425
+ else:
426
+ condition_2 = False
427
+ while condition_2 == False:
428
+ if mode == "random":
429
+ amount_ore = round(rd.uniform(0.25, 0.5), 4)
430
+ elif mode == "increasing ore":
431
+ amount_ore = list_ore_values[n]
432
+ elif mode == "decreasing ore":
433
+ amount_ore = list_ore_values_reverse[n]
434
+
435
+ amount_residuals = round(1 - amount_ore, 4)
436
+ amount_mag = round(rd.uniform(0.6, 0.8), 4)
437
+ amount_qz = round(rd.uniform(0.6, 1.0), 4)
438
+
439
+ qz_limits = [0.4, 0.75]
440
+ mag_limits = [0.15, 0.4]
441
+ hem_limits = [0.05, 0.20]
442
+ kln_limits = [0.0, 0.15]
443
+ ap_limits = [0.0, 0.025]
444
+ # Ore minerals
445
+ phi_mag = round(amount_ore*amount_mag, 4)
446
+ phi_hem = round(amount_ore - phi_mag, 4)
447
+ # Other minerals
448
+ phi_qz = round(amount_residuals*amount_qz, 4)
449
+ phi_ap = round(amount_residuals*rd.uniform(0, (1 - amount_qz)), 4)
450
+ phi_kln = round(1 - phi_qz - phi_mag - phi_hem - phi_ap, 4)
451
+
452
+ phi_total = phi_qz + phi_mag + phi_hem + phi_kln + phi_ap
453
+
454
+ if np.isclose(phi_total, 1.0000) == True:
455
+ if (qz_limits[0] <= phi_qz <= qz_limits[1] \
456
+ and mag_limits[0] <= phi_mag <= mag_limits[1] \
457
+ and hem_limits[0] <= phi_hem <= hem_limits[1] \
458
+ and kln_limits[0] <= phi_kln <= kln_limits[1]
459
+ and ap_limits[0] <= phi_ap <= ap_limits[1]):
460
+ condition_2 = True
461
+
462
+ phi_minerals["Qz"] = phi_qz
463
+ phi_minerals["Mag"] = phi_mag
464
+ phi_minerals["Hem"] = phi_hem
465
+ phi_minerals["Kln"] = phi_kln
466
+ phi_minerals["Ap"] = phi_ap
467
+
468
+ rho_s = 0
469
+ for key, value in phi_minerals.items():
470
+ rho_s += phi_minerals[key]*mineralogy[key]["rho"]
471
+ for element, value in mineralogy[key]["chemistry"].items():
472
+ if element not in elements_list:
473
+ elements_list.append(element)
474
+ w_elements[element] = 0.0
475
+
476
+ if elements_list[0] not in results_container["chemistry"]:
477
+ for element in elements_list:
478
+ results_container["chemistry"][element] = []
479
+
480
+ rho_s = round(rho_s, 3)
481
+ for key, value in phi_minerals.items():
482
+ if key == "Urn":
483
+ n_digits = 4
484
+ else:
485
+ n_digits = 4
486
+
487
+ w_minerals[key] = round((phi_minerals[key]*mineralogy[key]["rho"])/rho_s, n_digits)
488
+
489
+ if self.fluid == "water":
490
+ data_fluid = self.data_water
491
+
492
+ old_index = elements_list.index("O")
493
+ elements_list += [elements_list.pop(old_index)]
494
+
495
+ w_elements_total = 0.0
496
+ for element in elements_list:
497
+ if element != "O":
498
+ for mineral, w_mineral in w_minerals.items():
499
+ if element in mineralogy[mineral]["chemistry"]:
500
+ if element == "U":
501
+ n_digits = 4
502
+ else:
503
+ n_digits = 4
504
+
505
+ value = round(w_mineral*mineralogy[mineral]["chemistry"][element], n_digits)
506
+ w_elements[element] += value
507
+ w_elements_total += value
508
+ w_elements[element] = round(w_elements[element], n_digits)
509
+ elif element == "O":
510
+ w_elements[element] += round(1 - w_elements_total, 4)
511
+ w_elements[element] = round(w_elements[element], 4)
512
+
513
+ total_w_minerals = round(sum(w_minerals.values()), 4)
514
+ total_w_elements = round(sum(w_elements.values()), 4)
515
+ if total_w_minerals == 1.0 and total_w_elements == 1.0:
516
+ for key, value in w_minerals.items():
517
+ w_minerals[key] = abs(value)
518
+ for key, value in w_elements.items():
519
+ w_elements[key] = abs(value)
520
+ condition = True
521
+
522
+ velocity_solid = {"vP": 0, "vS": 0}
523
+ gamma_ray = 0.0
524
+ photoelectricity = 0.0
525
+ for key, value in phi_minerals.items():
526
+ velocity_solid["vP"] += phi_minerals[key]*mineralogy[key]["vP"]
527
+ velocity_solid["vS"] += phi_minerals[key]*mineralogy[key]["vS"]
528
+ gamma_ray += phi_minerals[key]*mineralogy[key]["GR"]
529
+ photoelectricity += phi_minerals[key]*mineralogy[key]["PE"]
530
+
531
+ ## Bulk Density, Porosity, Seismic Velocities
532
+ rho_solid = round(rho_s, 3)
533
+ vP, vS, vPvS, rho, var_porosity = SeismicVelocities(
534
+ rho_solid=rho_solid, rho_fluid=self.data_water[2]).calculate_seismic_velocities(
535
+ rho_limits=[3000, 4500], vP_limits=[2500, 5000], vS_limits=[1500, 3000], delta=0.05,
536
+ porosity=self.porosity)
537
+ phi_neutron = round((1900/rho)*0.15, 4)
538
+ ## Elastic Parameters
539
+ bulk_modulus, shear_modulus, youngs_modulus, poisson_ratio = SeismicVelocities(
540
+ rho_solid=None, rho_fluid=None).calculate_elastic_properties(
541
+ rho=rho, vP=vP, vS=vS)
542
+ ## Gamma Ray
543
+ gamma_ray = round(gamma_ray, 3)
544
+ ## Photoelectricity
545
+ photoelectricity = round(photoelectricity, 3)
546
+
547
+ for key, value in w_minerals.items():
548
+ results_container["mineralogy"][key].append(value)
549
+ # for key, value in w_elements.items():
550
+ # results_container["chemistry"][key].append(value)
551
+ # w_last = w_minerals
552
+
553
+ amounts = []
554
+ for key, value in w_elements.items():
555
+ results_container["chemistry"][key].append(value)
556
+ chem_data = PeriodicSystem(name=key).get_data()
557
+ amounts.append([key, chem_data[1], value])
558
+
559
+ list_elements = list(w_elements.keys())
560
+ list_oxides = OxideCompounds(var_list_elements=list_elements).find_oxides()
561
+ composition_oxides = {}
562
+ for var_oxide in list_oxides:
563
+ oxide_data = OxideCompounds(var_compound=var_oxide, var_amounts=amounts).get_composition()
564
+ composition_oxides[var_oxide] = round(oxide_data["Oxide"][1], 4)
565
+
566
+ if list_oxides[0] not in results_container["compounds"]:
567
+ for oxide in list_oxides:
568
+ results_container["compounds"][oxide] = []
569
+
570
+ for key, value in composition_oxides.items():
571
+ results_container["compounds"][key].append(value)
572
+
573
+ results_container["mineralogy"] = dict(sorted(
574
+ results_container["mineralogy"].items(), key=lambda item: sum(item[1])/len(item[1]), reverse=True))
575
+ results_container["chemistry"] = dict(sorted(
576
+ results_container["chemistry"].items(), key=lambda item: sum(item[1])/len(item[1]), reverse=True))
577
+ results_container["compounds"] = dict(sorted(
578
+ results_container["compounds"].items(), key=lambda item: sum(item[1])/len(item[1]), reverse=True))
579
+
580
+ # Results
581
+ results_container["phi"].append(phi_neutron)
582
+ results_container["phi_true"].append(var_porosity)
583
+ results_container["rho_s"].append(rho_s)
584
+ results_container["rho"].append(rho)
585
+ results_container["vP"].append(vP)
586
+ results_container["vS"].append(vS)
587
+ results_container["vP/vS"].append(vPvS)
588
+ results_container["K"].append(bulk_modulus)
589
+ results_container["G"].append(shear_modulus)
590
+ results_container["E"].append(youngs_modulus)
591
+ results_container["nu"].append(poisson_ratio)
592
+ results_container["GR"].append(gamma_ray)
593
+ results_container["PE"].append(photoelectricity)
594
+ n += 1
595
+
596
+ return results_container
597
+
598
+ def create_bauxite(self, rock="Bauxite", number=1, composition=None, mode="random"):
599
+ results_container = {}
600
+ results_container["rock"] = rock
601
+ results_container["mineralogy"] = {}
602
+ results_container["chemistry"] = {}
603
+ results_container["compounds"] = {}
604
+ results_container["phi"] = []
605
+ results_container["phi_true"] = []
606
+ results_container["fluid"] = self.fluid
607
+ results_container["rho_s"] = []
608
+ results_container["rho"] = []
609
+ results_container["vP"] = []
610
+ results_container["vS"] = []
611
+ results_container["vP/vS"] = []
612
+ results_container["K"] = []
613
+ results_container["G"] = []
614
+ results_container["E"] = []
615
+ results_container["nu"] = []
616
+ results_container["GR"] = []
617
+ results_container["PE"] = []
618
+
619
+ mineralogy = {
620
+ "Gbs": self.data_gibbsite, "Bhm": self.data_boehmite, "Goe": self.data_goethite, "Hem": self.data_hematite,
621
+ "Kln": self.data_kaolinite, "Anat": self.data_anatase}
622
+ minerals_list = list(mineralogy.keys())
623
+ if minerals_list[0] not in results_container["mineralogy"]:
624
+ for mineral in minerals_list:
625
+ results_container["mineralogy"][mineral] = []
626
+
627
+ n = 0
628
+ w_last = None
629
+ list_ore_values = np.around(np.linspace(0.25, 0.5, number), 4)
630
+ list_ore_values_reverse = sorted(list_ore_values, reverse=True)
631
+ while n < number:
632
+ condition = False
633
+ while condition == False:
634
+ elements_list = []
635
+ phi_minerals = {}
636
+ w_minerals = {}
637
+ w_elements = {}
638
+
639
+ if composition != None:
640
+ phi_gbs = composition["Gbs"]
641
+ phi_bhm = composition["Bhm"]
642
+ phi_goe = composition["Goe"]
643
+ phi_hem = composition["Hem"]
644
+ phi_kln = composition["Kln"]
645
+ phi_anat = composition["Anat"]
646
+
647
+ phi_minerals["Gbs"] = phi_gbs
648
+ phi_minerals["Bhm"] = phi_bhm
649
+ phi_minerals["Goe"] = phi_goe
650
+ phi_minerals["Hem"] = phi_hem
651
+ phi_minerals["Kln"] = phi_kln
652
+ phi_minerals["Anat"] = phi_anat
653
+
654
+ else:
655
+ condition_2 = False
656
+ while condition_2 == False:
657
+ if mode == "random":
658
+ amount_al_ore = round(rd.uniform(0.35, 0.65), 4)
659
+ elif mode == "increasing ore":
660
+ amount_al_ore = list_ore_values[n]
661
+ elif mode == "decreasing ore":
662
+ amount_al_ore = list_ore_values_reverse[n]
663
+
664
+ amount_fe_ore = round(rd.uniform(0.10, (1 - amount_al_ore)), 4)
665
+ amount_residuals = round(1 - amount_al_ore - amount_fe_ore, 4)
666
+ amount_gbs = round(rd.uniform(0.2, 0.8), 4)
667
+ amount_goe = round(rd.uniform(0.7, 0.9), 4)
668
+ amount_kln = round(rd.uniform(0.4, 0.9), 4)
669
+
670
+ # Al ore minerals
671
+ phi_gbs = round(amount_al_ore*amount_gbs, 4)
672
+ phi_bhm = round(amount_al_ore - phi_gbs, 4)
673
+ # Fe ore minerals
674
+ phi_goe = round(amount_fe_ore*amount_goe, 4)
675
+ phi_hem = round(amount_fe_ore - phi_goe, 4)
676
+ # Other minerals
677
+
678
+ phi_kln = round(amount_residuals*amount_kln, 4)
679
+ phi_anat = round(1 - phi_gbs - phi_bhm - phi_goe - phi_hem - phi_kln, 4)
680
+
681
+ phi_total = phi_gbs + phi_bhm + phi_goe + phi_hem + phi_kln + phi_anat
682
+
683
+ gbs_limits = [0.2, 0.8]
684
+ bhm_limits = [0.2, 0.6]
685
+ goe_limits = [0.2, 0.5]
686
+ hem_limits = [0.0, 0.25]
687
+ kln_limits = [0.0, 0.3]
688
+ anat_limits = [0.0, 0.10]
689
+
690
+ if np.isclose(phi_total, 1.0000) == True:
691
+ if (gbs_limits[0] <= phi_gbs <= gbs_limits[1] \
692
+ and bhm_limits[0] <= phi_bhm <= bhm_limits[1] \
693
+ and goe_limits[0] <= phi_goe <= goe_limits[1] \
694
+ and hem_limits[0] <= phi_hem <= hem_limits[1] \
695
+ and kln_limits[0] <= phi_kln <= kln_limits[1] \
696
+ and anat_limits[0] <= phi_kln <= anat_limits[1]):
697
+ condition_2 = True
698
+
699
+ phi_minerals["Gbs"] = phi_gbs
700
+ phi_minerals["Bhm"] = phi_bhm
701
+ phi_minerals["Goe"] = phi_goe
702
+ phi_minerals["Hem"] = phi_hem
703
+ phi_minerals["Kln"] = phi_kln
704
+ phi_minerals["Anat"] = phi_anat
705
+
706
+ rho_s = 0
707
+ for key, value in phi_minerals.items():
708
+ rho_s += phi_minerals[key]*mineralogy[key]["rho"]
709
+ for element, value in mineralogy[key]["chemistry"].items():
710
+ if element not in elements_list:
711
+ elements_list.append(element)
712
+ w_elements[element] = 0.0
713
+
714
+ if elements_list[0] not in results_container["chemistry"]:
715
+ for element in elements_list:
716
+ results_container["chemistry"][element] = []
717
+
718
+ rho_s = round(rho_s, 3)
719
+ for key, value in phi_minerals.items():
720
+ if key == "Urn":
721
+ n_digits = 4
722
+ else:
723
+ n_digits = 4
724
+
725
+ w_minerals[key] = round((phi_minerals[key]*mineralogy[key]["rho"])/rho_s, n_digits)
726
+
727
+ if self.fluid == "water":
728
+ data_fluid = self.data_water
729
+
730
+ old_index = elements_list.index("O")
731
+ elements_list += [elements_list.pop(old_index)]
732
+
733
+ w_elements_total = 0.0
734
+ for element in elements_list:
735
+ if element != "O":
736
+ for mineral, w_mineral in w_minerals.items():
737
+ if element in mineralogy[mineral]["chemistry"]:
738
+ if element == "U":
739
+ n_digits = 4
740
+ else:
741
+ n_digits = 4
742
+
743
+ value = round(w_mineral*mineralogy[mineral]["chemistry"][element], n_digits)
744
+ w_elements[element] += value
745
+ w_elements_total += value
746
+ w_elements[element] = round(w_elements[element], n_digits)
747
+ elif element == "O":
748
+ w_elements[element] += round(1 - w_elements_total, 4)
749
+ w_elements[element] = round(w_elements[element], 4)
750
+
751
+ total_w_minerals = round(sum(w_minerals.values()), 4)
752
+ total_w_elements = round(sum(w_elements.values()), 4)
753
+ if total_w_minerals == 1.0 and total_w_elements == 1.0:
754
+ for key, value in w_minerals.items():
755
+ w_minerals[key] = abs(value)
756
+ for key, value in w_elements.items():
757
+ w_elements[key] = abs(value)
758
+ condition = True
759
+
760
+ velocity_solid = {"vP": 0, "vS": 0}
761
+ gamma_ray = 0.0
762
+ photoelectricity = 0.0
763
+ for key, value in phi_minerals.items():
764
+ velocity_solid["vP"] += phi_minerals[key]*mineralogy[key]["vP"]
765
+ velocity_solid["vS"] += phi_minerals[key]*mineralogy[key]["vS"]
766
+ gamma_ray += phi_minerals[key]*mineralogy[key]["GR"]
767
+ photoelectricity += phi_minerals[key]*mineralogy[key]["PE"]
768
+
769
+ ## Bulk Density, Porosity, Seismic Velocities
770
+ rho_solid = round(rho_s, 3)
771
+ vP, vS, vPvS, rho, var_porosity = SeismicVelocities(
772
+ rho_solid=rho_solid, rho_fluid=self.data_water[2]).calculate_seismic_velocities(
773
+ rho_limits=[2500, 4000], vP_limits=[3000, 5000], vS_limits=[1500, 3000], delta=0.05,
774
+ porosity=self.porosity)
775
+ phi_neutron = round((1900/rho)*0.15, 4)
776
+ ## Elastic Parameters
777
+ bulk_modulus, shear_modulus, youngs_modulus, poisson_ratio = SeismicVelocities(
778
+ rho_solid=None, rho_fluid=None).calculate_elastic_properties(
779
+ rho=rho, vP=vP, vS=vS)
780
+ ## Gamma Ray
781
+ gamma_ray = round(gamma_ray, 3)
782
+ ## Photoelectricity
783
+ photoelectricity = round(photoelectricity, 3)
784
+ # Composition data
785
+ for key, value in w_minerals.items():
786
+ results_container["mineralogy"][key].append(value)
787
+
788
+ amounts = []
789
+ for key, value in w_elements.items():
790
+ results_container["chemistry"][key].append(value)
791
+ chem_data = PeriodicSystem(name=key).get_data()
792
+ amounts.append([key, chem_data[1], value])
793
+
794
+ list_elements = list(w_elements.keys())
795
+ list_oxides = OxideCompounds(var_list_elements=list_elements).find_oxides()
796
+ composition_oxides = {}
797
+ for var_oxide in list_oxides:
798
+ oxide_data = OxideCompounds(var_compound=var_oxide, var_amounts=amounts).get_composition()
799
+ composition_oxides[var_oxide] = round(oxide_data["Oxide"][1], 4)
800
+
801
+ if list_oxides[0] not in results_container["compounds"]:
802
+ for oxide in list_oxides:
803
+ results_container["compounds"][oxide] = []
804
+
805
+ for key, value in composition_oxides.items():
806
+ results_container["compounds"][key].append(value)
807
+ # Results
808
+ results_container["phi"].append(phi_neutron)
809
+ results_container["phi_true"].append(var_porosity)
810
+ results_container["rho_s"].append(rho_s)
811
+ results_container["rho"].append(rho)
812
+ results_container["vP"].append(vP)
813
+ results_container["vS"].append(vS)
814
+ results_container["vP/vS"].append(vPvS)
815
+ results_container["K"].append(bulk_modulus)
816
+ results_container["G"].append(shear_modulus)
817
+ results_container["E"].append(youngs_modulus)
818
+ results_container["nu"].append(poisson_ratio)
819
+ results_container["GR"].append(gamma_ray)
820
+ results_container["PE"].append(photoelectricity)
821
+ n += 1
822
+
823
+ return results_container
824
+
825
+ class Ores:
826
+ #
827
+ def __init__(self, fluid, actualThickness, porosity=None, data_type=False):
828
+ self.fluid = fluid
829
+ self.actualThickness = actualThickness
830
+ self.porosity = porosity
831
+ self.data_type = data_type
832
+ self.data_water = Water.water("")
833
+ #
834
+ def create_kupferschiefer(self, w_Cu=None, amounts=None):
835
+ #
836
+ results = {}
837
+ results["rock"] = "Kupferschiefer"
838
+ #
839
+ self.w_Cu = w_Cu
840
+ self.amounts = amounts
841
+ #
842
+ # Mineralogy
843
+ quartz = Oxides(data_type=True).create_quartz()
844
+ calcite = Carbonates(data_type=True).create_calcite()
845
+ pyrite = Sulfides(impurity="pure", data_type=True).create_pyrite()
846
+ chalcopyrite = Sulfides(impurity="pure", data_type=True).create_chalcopyrite()
847
+ galena = Sulfides(impurity="pure", data_type=True).create_galena()
848
+ bornite = Sulfides(impurity="pure", data_type=True).create_bornite()
849
+ sphalerite = Sulfides(impurity="pure", data_type=True).create_sphalerite()
850
+ chalcocite = Sulfides(impurity="pure", data_type=True).create_chalcocite()
851
+ covellite = Sulfides(impurity="pure", data_type=True).create_covellite()
852
+ digenite = Sulfides(impurity="pure", data_type=True).create_digenite()
853
+ illite = Pyllosilicates(impurity="pure", dict=True).create_illite()
854
+ kaolinite = Pyllosilicates(impurity="pure", dict=True).create_kaolinite()
855
+ montmorillonite = Pyllosilicates(impurity="pure", dict=True).create_montmorillonite()
856
+ #
857
+ mineralogy = [illite, kaolinite, montmorillonite, quartz, calcite, chalcopyrite, bornite, chalcocite, covellite,
858
+ digenite, galena, sphalerite, pyrite]
859
+ #
860
+ water = fluids.Water.water("")
861
+ #
862
+ data = []
863
+ #
864
+ cond = False
865
+ composition = []
866
+ while cond == False:
867
+ if self.w_Cu == None and self.amounts == None:
868
+ w_clay = round(rd.uniform(0.4, 0.6), 4)
869
+ w_ore = round(rd.uniform(0.4, (1-w_clay)), 4)
870
+ w_misc = round(rd.uniform(0.0, (1-w_clay-w_ore)), 4)
871
+ #
872
+ w_ilt = round(w_clay*rd.uniform(0.5, 1), 4)
873
+ w_kln = round(w_clay*rd.uniform(0, (1-w_ilt)), 4)
874
+ w_mnt = round(w_clay-w_ilt-w_kln, 4)
875
+ #
876
+ magicnumber = rd.randint(1, 7)
877
+ if magicnumber == 1:
878
+ w_cv = round(w_ore*rd.uniform(0.5, 1), 4)
879
+ w_bn = round(w_ore*rd.uniform(0, (1-w_cv)), 4)
880
+ w_cc = round(w_ore*rd.uniform(0, (1-w_cv-w_bn)), 4)
881
+ w_ccp = round(w_ore*rd.uniform(0, (1-w_cv-w_bn-w_cc)), 4)
882
+ w_dg = round(w_ore-w_cv-w_bn-w_cc-w_ccp, 4)
883
+ #
884
+ w_gn = 0.0
885
+ w_py = 0.0
886
+ w_sp = 0.0
887
+ elif magicnumber == 2:
888
+ w_bn = round(w_ore*rd.uniform(0.5, 1), 4)
889
+ w_ccp = round(w_ore*rd.uniform(0, (1-w_bn)), 4)
890
+ w_sp = round(w_ore*rd.uniform(0, (1-w_bn-w_ccp)), 4)
891
+ w_dg = round(w_ore-w_bn-w_ccp-w_sp, 4)
892
+ #
893
+ w_cv = 0.0
894
+ w_cc = 0.0
895
+ w_gn = 0.0
896
+ w_py = 0.0
897
+ w_dg = 0.0
898
+ elif magicnumber == 3:
899
+ w_cc = round(w_ore*rd.uniform(0.5, 1), 4)
900
+ w_gn = round(w_ore*rd.uniform(0, (1-w_cc)), 4)
901
+ w_sp = round(w_ore-w_cc-w_gn, 4)
902
+ #
903
+ w_cv = 0.0
904
+ w_bn = 0.0
905
+ w_ccp = 0.0
906
+ w_py = 0.0
907
+ w_dg = 0.0
908
+ elif magicnumber == 4:
909
+ w_gn = round(w_ore*rd.uniform(0.33, 0.67), 4)
910
+ w_ccp = round(w_ore*rd.uniform(0.05, (1-w_gn)), 4)
911
+ w_py = round(w_ore*rd.uniform(0, (1-w_gn-w_ccp)), 4)
912
+ w_sp = round(w_ore-w_gn-w_ccp-w_py, 4)
913
+ #
914
+ w_cv = 0.0
915
+ w_bn = 0.0
916
+ w_cc = 0.0
917
+ w_dg = 0.0
918
+ elif magicnumber == 5:
919
+ w_py = round(w_ore*rd.uniform(0.33, 0.67), 4)
920
+ w_gn = round(w_ore*rd.uniform(0, (1-w_py)), 4)
921
+ w_sp = round(w_ore*rd.uniform(0, (1-w_py-w_gn)), 4)
922
+ w_ccp = round(w_ore-w_py-w_gn-w_sp, 4)
923
+ #
924
+ w_cv = 0.0
925
+ w_bn = 0.0
926
+ w_cc = 0.0
927
+ w_dg = 0.0
928
+ elif magicnumber == 6:
929
+ w_sp = round(w_ore*rd.uniform(0.33, 0.67), 4)
930
+ w_ccp = round(w_ore*rd.uniform(0.05, (1-w_sp)), 4)
931
+ w_gn = round(w_ore*rd.uniform(0, (1-w_sp-w_ccp)), 4)
932
+ w_py = round(w_ore-w_sp-w_ccp-w_gn, 4)
933
+ #
934
+ w_cv = 0.0
935
+ w_bn = 0.0
936
+ w_cc = 0.0
937
+ w_dg = 0.0
938
+ elif magicnumber == 7:
939
+ w_dg = round(w_ore*rd.uniform(0.5, 1), 4)
940
+ w_cv = round(w_ore*rd.uniform(0, (1-w_dg)), 4)
941
+ w_bn = round(w_ore*rd.uniform(0, (1-w_dg-w_cv)), 4)
942
+ w_cc = round(w_ore*rd.uniform(0, (1-w_dg-w_cv-w_bn)), 4)
943
+ w_ccp = round(w_ore-w_dg-w_cv-w_bn-w_cc, 4)
944
+ #
945
+ w_gn = 0.0
946
+ w_py = 0.0
947
+ w_sp = 0.0
948
+ #
949
+ w_qz = round(w_misc*rd.uniform(0, 1), 4)
950
+ w_cal = round(1 - w_clay - w_ore - w_qz, 4)
951
+ elif self.w_Cu != None:
952
+ w_clay = round(rd.uniform(0.33, 0.67), 4)
953
+ w_ore = round(rd.uniform(0.33, (1-w_clay)), 4)
954
+ w_misc = round(rd.uniform(0.0, (1-w_clay-w_ore)), 4)
955
+ #
956
+ w_ilt = round(w_clay*rd.uniform(0, 1), 4)
957
+ w_kln = round(w_clay*rd.uniform(0, (1-w_ilt)), 4)
958
+ w_mnt = round(w_clay-w_ilt-w_kln, 4)
959
+ #
960
+ w_cv = round(w_ore*rd.uniform(0, 1), 4)
961
+ w_bn = round(w_ore*rd.uniform(0, (1-w_cv)), 4)
962
+ w_cc = round(w_ore*rd.uniform(0, (1-w_cv-w_bn)), 4)
963
+ w_ccp = round(w_ore*rd.uniform(0, (1-w_cv-w_bn-w_cc)), 4)
964
+ w_gn = round(w_ore*rd.uniform(0, (1-w_cv-w_bn-w_cc-w_ccp)), 4)
965
+ w_py = round(w_ore*rd.uniform(0, (1-w_cv-w_bn-w_cc-w_ccp-w_gn)), 4)
966
+ w_dg = round(w_ore*rd.uniform(0, (1-w_cv-w_bn-w_cc-w_ccp-w_gn-w_py)), 4)
967
+ w_sp = round(w_ore-w_cv-w_bn-w_cc-w_ccp-w_gn-w_py-w_dg, 4)
968
+ #
969
+ w_qz = round(w_misc*rd.uniform(0, 1), 4)
970
+ w_cal = 1 - w_clay - w_ore - w_qz
971
+ elif type(self.amounts) is list:
972
+ w_hl = round(abs(np.random.normal(self.amounts[0], 0.025)), 4)
973
+ w_anh = round(abs(np.random.normal(self.amounts[1], 0.025)), 4)
974
+ w_gp = round(abs(np.random.normal(self.amounts[2], 0.025)), 4)
975
+ w_syl = round(1-w_hl-w_anh-w_gp, 4)
976
+ #
977
+ if w_ilt >= 0.0 and w_kln >= 0.0 and w_mnt >= 0.0 and w_cv >= 0.0 and w_bn >= 0.0 and w_cc >= 0.0 \
978
+ and w_ccp >= 0.0 and w_gn >= 0.0 and w_py >= 0.0 and w_dg >= 0.0 and w_sp >= 0.0 and w_qz >= 0.0 \
979
+ and w_cal >= 0.0:
980
+ sumMin = round(w_ilt + w_kln + w_mnt + w_cv + w_bn + w_cc + w_ccp + w_gn + w_py + w_dg + w_sp + w_qz + w_cal, 4)
981
+ else:
982
+ sumMin = 0
983
+ #
984
+ w_H = round(w_ilt*illite["chemistry"]["H"] + w_kln*kaolinite["chemistry"]["H"] + w_mnt*montmorillonite["chemistry"]["H"], 4)
985
+ w_C = round(w_cal*calcite["chemistry"]["C"], 4)
986
+ w_Na = round(w_mnt*montmorillonite["chemistry"]["Na"], 4)
987
+ w_Mg = round(w_ilt*illite["chemistry"]["Mg"] + w_mnt*montmorillonite["chemistry"]["Mg"], 4)
988
+ w_Al = round(w_ilt*illite["chemistry"]["Al"] + w_kln*kaolinite["chemistry"]["Al"] + w_mnt*montmorillonite["chemistry"]["Al"], 4)
989
+ w_Si = round(w_ilt*illite["chemistry"]["Si"] + w_kln*kaolinite["chemistry"]["Si"] + w_mnt*montmorillonite["chemistry"]["Si"] + w_qz*quartz["chemistry"]["Si"], 4)
990
+ w_S = round(w_cv*covellite["chemistry"]["S"] + w_bn*bornite["chemistry"]["S"] + w_cc*chalcocite["chemistry"]["S"] + w_ccp*chalcopyrite["chemistry"]["S"] + w_gn*galena["chemistry"]["S"] + w_py*pyrite["chemistry"]["S"] + w_sp*sphalerite["chemistry"]["S"] + w_dg*digenite["chemistry"]["S"], 4)
991
+ w_K = round(w_ilt*illite["chemistry"]["K"], 4)
992
+ w_Ca = round(w_mnt*montmorillonite["chemistry"]["Ca"] + w_cal*calcite["chemistry"]["Ca"], 4)
993
+ w_Fe = round(w_ilt*illite["chemistry"]["Fe"] + w_bn*bornite["chemistry"]["Fe"] + w_ccp*chalcopyrite["chemistry"]["Fe"] + w_py*pyrite["chemistry"]["Fe"], 4)
994
+ w_Cu = round(w_cv*covellite["chemistry"]["Cu"] + w_bn*bornite["chemistry"]["Cu"] + w_cc*chalcocite["chemistry"]["Cu"] + w_ccp*chalcopyrite["chemistry"]["Cu"] + w_dg*digenite["chemistry"]["Cu"], 4)
995
+ w_Zn = round(w_sp*sphalerite["chemistry"]["Zn"], 4)
996
+ w_Pb = round(w_gn*galena["chemistry"]["Pb"], 4)
997
+ w_O = round(1 - w_H - w_C - w_Na - w_Mg - w_Al - w_Si - w_S - w_K - w_Ca - w_Fe - w_Cu - w_Zn - w_Pb, 4)
998
+ sumConc = round(w_H + w_C + w_O + w_Na + w_Mg + w_Al + w_Si + w_S + w_K + w_Ca + w_Fe + w_Cu + w_Zn + w_Pb, 4)
999
+ #print("Amount:", sumMin, "C:", sumConc)
1000
+ #
1001
+ if sumMin == 1 and sumConc == 1:
1002
+ cond = True
1003
+ composition.extend((["Ilt", "Kln", "Mnt", "Qz", "Cal", "Ccp", "Bn", "Cc", "Cv", "Dg", "Gn", "Sp", "Py"]))
1004
+ concentrations = [w_H, w_C, w_O, w_Na, w_Mg, w_Al, w_Si, w_S, w_K, w_Ca, w_Fe, w_Cu, w_Zn, w_Pb]
1005
+ amounts = [w_ilt, w_kln, w_mnt, w_qz, w_cal, w_ccp, w_bn, w_cc, w_cv, w_dg, w_gn, w_sp, w_py]
1006
+ else:
1007
+ cond = False
1008
+ #
1009
+ element_list = ["H", "C", "O", "Na", "Mg", "Al", "Si", "S", "K", "Ca", "Fe", "Cu", "Zn", "Pb"]
1010
+ mineral_list = ["Ilt", "Kln", "Mnt", "Qz", "Cal", "Ccp", "Bn", "Cc", "Cv", "Dg", "Gn", "Sp", "Py"]
1011
+ data.append(composition)
1012
+ results["chemistry"] = {}
1013
+ results["mineralogy"] = {}
1014
+ for index, element in enumerate(element_list, start=0):
1015
+ results["chemistry"][element] = concentrations[index]
1016
+ for index, mineral in enumerate(mineral_list, start=0):
1017
+ results["mineralogy"][mineral] = amounts[index]
1018
+ #
1019
+ rhoSolid = (w_ilt*illite["rho"] + w_kln*kaolinite["rho"] + w_mnt*montmorillonite["rho"] + w_qz*quartz["rho"]
1020
+ + w_cal*calcite["rho"] + w_ccp*chalcopyrite["rho"] + w_bn*bornite["rho"] + w_cc*chalcocite["rho"]
1021
+ + w_cv*covellite["rho"] + w_dg*digenite["rho"] + w_gn*galena["rho"] + w_sp*sphalerite["rho"]
1022
+ + w_py*pyrite["rho"]) / 1000
1023
+ X = [w_ilt, w_kln, w_mnt, w_qz, w_cal, w_ccp, w_bn, w_cc, w_cv, w_dg, w_gn, w_sp, w_py]
1024
+ K_list = [mineralogy[i]["K"] for i in range(len(mineralogy))]
1025
+ G_list = [mineralogy[i]["G"] for i in range(len(mineralogy))]
1026
+ K_geo = elast.calc_geometric_mean(self, X, K_list)
1027
+ G_geo = elast.calc_geometric_mean(self, X, G_list)
1028
+ K_solid = K_geo
1029
+ G_solid = G_geo
1030
+ vP_solid = np.sqrt((K_solid*10**9+4/3*G_solid*10**9)/(rhoSolid*10**3))
1031
+ vS_solid = np.sqrt((G_solid*10**9)/(rhoSolid*10**3))
1032
+ #
1033
+ if self.porosity == None:
1034
+ if self.actualThickness <= 1000:
1035
+ phi = rd.uniform(0.0, 0.1)
1036
+ elif self.actualThickness > 1000 and self.actualThickness <= 2000:
1037
+ phi = rd.uniform(0.0, 0.075)
1038
+ elif self.actualThickness > 2000 and self.actualThickness <= 3000:
1039
+ phi = rd.uniform(0.0, 0.05)
1040
+ elif self.actualThickness > 3000 and self.actualThickness <= 4000:
1041
+ phi = rd.uniform(0.0, 0.025)
1042
+ elif self.actualThickness > 4000:
1043
+ phi = rd.uniform(0.0, 0.0125)
1044
+ else:
1045
+ phi = self.porosity
1046
+ #
1047
+ results["phi"] = phi
1048
+ results["fluid"] = self.fluid
1049
+ #
1050
+ rho = (1 - phi) * rhoSolid + phi * water[2] / 1000
1051
+ vP = (1-phi)*vP_solid + phi*water[4][0]
1052
+ vS = (1 - phi) * vS_solid
1053
+ G_bulk = vS**2 * rho
1054
+ K_bulk = vP**2 * rho - 4/3*G_bulk
1055
+ E_bulk = (9*K_bulk*G_bulk)/(3*K_bulk+G_bulk)
1056
+ phiD = (rhoSolid - rho) / (rhoSolid - water[2] / 1000)
1057
+ phiN = (2 * phi ** 2 - phiD ** 2) ** (0.5)
1058
+ GR = w_ilt*illite["GR"] + w_kln*kaolinite["GR"] + w_mnt*montmorillonite["GR"] + w_qz*quartz["GR"] \
1059
+ + w_cal*calcite["GR"] + w_ccp*chalcopyrite["GR"] + w_bn*bornite["GR"] + w_cc*chalcocite["GR"] \
1060
+ + w_cv*covellite["GR"] + w_dg*digenite["GR"] + w_gn*galena["GR"] + w_sp*sphalerite["GR"] + w_py*pyrite["GR"]
1061
+ PE = w_ilt*illite["PE"] + w_kln*kaolinite["PE"] + w_mnt*montmorillonite["PE"] + w_qz*quartz["PE"] \
1062
+ + w_cal*calcite["PE"] + w_ccp*chalcopyrite["PE"] + w_bn*bornite["PE"] + w_cc*chalcocite["PE"] \
1063
+ + w_cv*covellite["PE"] + w_dg*digenite["PE"] + w_gn*galena["PE"] + w_sp*sphalerite["PE"] + w_py*pyrite["PE"]
1064
+ poisson_seismic = 0.5*(vP**2 - 2*vS**2)/(vP**2 - vS**2)
1065
+ poisson_elastic = (3*K_bulk - 2*G_bulk)/(6*K_bulk + 2*G_bulk)
1066
+ poisson_mineralogical = w_ilt*illite["nu"] + w_kln*kaolinite["nu"] + w_mnt*montmorillonite["nu"] + w_qz*quartz["nu"] \
1067
+ + w_cal*calcite["nu"] + w_ccp*chalcopyrite["nu"] + w_bn*bornite["nu"] + w_cc*chalcocite["nu"] \
1068
+ + w_cv*covellite["nu"] + w_dg*digenite["nu"] + w_gn*galena["nu"] + w_sp*sphalerite["nu"] + w_py*pyrite["nu"]
1069
+ #
1070
+ if self.data_type == False:
1071
+ #
1072
+ data.append([round(rho, 3), round(rhoSolid, 3), round(water[2] / 1000, 6)])
1073
+ data.append([round(K_bulk*10**(-6), 2), round(G_bulk*10**(-6), 2), round(E_bulk*10**(-6), 2), round(poisson_mineralogical, 3)])
1074
+ data.append([round(vP, 2), round(vS, 2), round(vP_solid, 2), round(water[4][0], 2)])
1075
+ data.append([round(phi, 3), round(phiD, 3), round(phiN, 3)])
1076
+ data.append("water")
1077
+ data.append([round(GR, 3), round(PE, 3)])
1078
+ data.append(concentrations)
1079
+ data.append(amounts)
1080
+ #
1081
+ return data
1082
+ else:
1083
+ #
1084
+ results["rho"] = round(rho*1000, 4)
1085
+ results["rho_s"] = round(rhoSolid*1000, 4)
1086
+ results["vP"] = round(vP, 4)
1087
+ results["vS"] = round(vS, 4)
1088
+ results["vP/vS"] = round(vP/vS, 4)
1089
+ results["G"] = round(G_bulk*10**(-6), 4)
1090
+ results["K"] = round(K_bulk*10**(-6), 4)
1091
+ results["E"] = round(E_bulk*10**(-6), 4)
1092
+ results["nu"] = round(poisson_mineralogical, 4)
1093
+ results["GR"] = round(GR, 4)
1094
+ results["PE"] = round(PE, 4)
1095
+ #
1096
+ return results
1097
+ #
1098
+ def create_compact_hematite_ore(self, number, porosity=None):
1099
+ #
1100
+ data_quartz = Oxides(impurity="pure", data_type=True).create_quartz() # fixed
1101
+ data_hematite = Oxides(impurity="pure", data_type=True).create_hematite() # fixed
1102
+ data_magnetite = Oxides(impurity="pure", data_type=True).create_magnetite() # fixed
1103
+ data_pyrite = Sulfides(impurity="pure", data_type=True).create_pyrite() # fixed
1104
+ data_rutile = Oxides(impurity="pure", data_type=True).create_rutile() # fixed
1105
+ #
1106
+ assemblage_minerals = [data_quartz, data_hematite, data_magnetite, data_pyrite, data_rutile]
1107
+ #
1108
+ amounts_mineralogy = {}
1109
+ amounts_chemistry = {}
1110
+ bulk_properties = {}
1111
+ properties = ["rho_s", "rho", "K", "G", "E", "nu", "vP", "vS", "vPvS", "GR", "PE", "phi"]
1112
+ for property in properties:
1113
+ bulk_properties[property] = []
1114
+ mineral_list = []
1115
+ elements = []
1116
+ for mineral in assemblage_minerals:
1117
+ amounts_mineralogy[mineral["mineral"]] = []
1118
+ mineral_list.append(mineral["mineral"])
1119
+ elements_mineral = list(mineral["chemistry"].keys())
1120
+ for element in elements_mineral:
1121
+ if element not in elements:
1122
+ elements.append(element)
1123
+ amounts_chemistry[element] = []
1124
+ mineral_list.sort()
1125
+ elements.sort()
1126
+ #
1127
+ n = 0
1128
+ amounts_helper = []
1129
+ while n < number:
1130
+ w_total = 0
1131
+ n_minerals = 0
1132
+ for mineral in mineral_list:
1133
+ if mineral == "Qz":
1134
+ if n_minerals < len(mineral_list)-1:
1135
+ value = round(rd.uniform(0.10, 0.35), 4)
1136
+ else:
1137
+ value = round(1-w_total, 4)
1138
+ if value >= 0.0 and 0.10 <= value <= 0.35:
1139
+ amounts_helper.append(value)
1140
+ w_total += value
1141
+ n_minerals += 1
1142
+ elif mineral == "Hem":
1143
+ if n_minerals < len(mineral_list)-1:
1144
+ value = round(rd.uniform(0.45, 0.80), 4)
1145
+ else:
1146
+ value = round(1-w_total, 4)
1147
+ if value >= 0.0 and 0.45 <= value <= 0.80:
1148
+ amounts_helper.append(value)
1149
+ w_total += value
1150
+ n_minerals += 1
1151
+ elif mineral == "Mag":
1152
+ if n_minerals < len(mineral_list)-1:
1153
+ value = round(rd.uniform(0.10, 0.20), 4)
1154
+ else:
1155
+ value = round(1-w_total, 4)
1156
+ if value >= 0.0 and 0.10 <= value <= 0.20:
1157
+ amounts_helper.append(value)
1158
+ w_total += value
1159
+ n_minerals += 1
1160
+ elif mineral == "Py":
1161
+ if n_minerals < len(mineral_list)-1:
1162
+ value = round(rd.uniform(0.0, 0.10), 4)
1163
+ else:
1164
+ value = round(1-w_total, 4)
1165
+ if value >= 0.0 and 0.0 <= value <= 0.10:
1166
+ amounts_helper.append(value)
1167
+ w_total += value
1168
+ n_minerals += 1
1169
+ elif mineral == "Rt":
1170
+ if n_minerals < len(mineral_list)-1:
1171
+ value = round(1-w_total, 4)
1172
+ else:
1173
+ value = round(1-w_total, 4)
1174
+ if value >= 0.0 and 0.0 <= value <= 0.05:
1175
+ amounts_helper.append(value)
1176
+ w_total += value
1177
+ n_minerals += 1
1178
+ #
1179
+ if np.sum(amounts_helper) == 1.0 and n_minerals == len(mineral_list):
1180
+ for index, mineral in enumerate(mineral_list):
1181
+ amounts_mineralogy[mineral].append(amounts_helper[index])
1182
+ n += 1
1183
+ amounts_helper.clear()
1184
+ else:
1185
+ n += 0
1186
+ amounts_helper.clear()
1187
+ #
1188
+ n = 0
1189
+ amounts_helper = {}
1190
+ while n < number:
1191
+ amounts_helper.clear()
1192
+ w_total = 0
1193
+ n_elements = 0
1194
+ rho_s_helper = 0
1195
+ bulkmod_helper = 0
1196
+ shearmod_helper = 0
1197
+ gr_helper = 0
1198
+ pe_helper = 0
1199
+ if porosity == None:
1200
+ phi_helper = round(rd.uniform(0.0, 0.05), 4)
1201
+ else:
1202
+ phi_helper = porosity
1203
+ #
1204
+ for element in elements:
1205
+ amounts_helper[element] = 0
1206
+ if element in data_quartz["chemistry"]:
1207
+ if n_elements < len(elements)-1:
1208
+ value = amounts_mineralogy["Qz"][n]*data_quartz["chemistry"][element]
1209
+ else:
1210
+ value = 1-w_total
1211
+ amounts_helper[element] += round(value, 4)
1212
+ w_total += round(value, 4)
1213
+ if element in data_hematite["chemistry"]:
1214
+ if n_elements < len(elements)-1:
1215
+ value = amounts_mineralogy["Hem"][n]*data_hematite["chemistry"][element]
1216
+ else:
1217
+ value = 1-w_total
1218
+ amounts_helper[element] += round(value, 4)
1219
+ w_total += round(value, 4)
1220
+ if element in data_magnetite["chemistry"]:
1221
+ if n_elements < len(elements)-1:
1222
+ value = amounts_mineralogy["Mag"][n]*data_magnetite["chemistry"][element]
1223
+ else:
1224
+ value = 1-w_total
1225
+ amounts_helper[element] += round(value, 4)
1226
+ w_total += round(value, 4)
1227
+ if element in data_pyrite["chemistry"]:
1228
+ if n_elements < len(elements)-1:
1229
+ value = amounts_mineralogy["Py"][n]*data_pyrite["chemistry"][element]
1230
+ else:
1231
+ value = 1-w_total
1232
+ amounts_helper[element] += round(value, 4)
1233
+ w_total += round(value, 4)
1234
+ if element in data_rutile["chemistry"]:
1235
+ if n_elements < len(elements)-1:
1236
+ value = amounts_mineralogy["Rt"][n]*data_rutile["chemistry"][element]
1237
+ else:
1238
+ value = 1-w_total
1239
+ amounts_helper[element] += round(value, 4)
1240
+ w_total += round(value, 4)
1241
+ #
1242
+ n_elements += 1
1243
+ #
1244
+ value_total = 0
1245
+ for element, value in amounts_helper.items():
1246
+ amounts_helper[element] = round(value, 4)
1247
+ value_total += int(round(amounts_helper[element]*10000, 4))
1248
+ value_total = int(value_total)
1249
+ if value_total == 10000:
1250
+ condition_sum = True
1251
+ else:
1252
+ condition_sum = False
1253
+ if sum(amounts_helper.values()) == 1.0 or condition_sum == True or w_total == 1.0:
1254
+ for key, value in amounts_helper.items():
1255
+ amounts_chemistry[key].append(round(value, 4))
1256
+ for mineral in mineral_list:
1257
+ if mineral == "Qz":
1258
+ rho_s_helper += round(amounts_mineralogy[mineral][n]*data_quartz["rho"], 3)
1259
+ bulkmod_helper += round(amounts_mineralogy[mineral][n]*data_quartz["K"], 3)
1260
+ shearmod_helper += round(0.67*amounts_mineralogy[mineral][n]*data_quartz["G"], 3)
1261
+ gr_helper += round(amounts_mineralogy[mineral][n]*data_quartz["GR"], 3)
1262
+ pe_helper += round(amounts_mineralogy[mineral][n]*data_quartz["PE"], 3)
1263
+ elif mineral == "Hem":
1264
+ rho_s_helper += round(amounts_mineralogy[mineral][n]*data_hematite["rho"], 3)
1265
+ bulkmod_helper += round(amounts_mineralogy[mineral][n]*data_hematite["K"], 3)
1266
+ shearmod_helper += round(0.67*amounts_mineralogy[mineral][n]*data_hematite["G"], 3)
1267
+ gr_helper += round(amounts_mineralogy[mineral][n]*data_hematite["GR"], 3)
1268
+ pe_helper += round(amounts_mineralogy[mineral][n]*data_hematite["PE"], 3)
1269
+ elif mineral == "Mag":
1270
+ rho_s_helper += round(amounts_mineralogy[mineral][n]*data_magnetite["rho"], 3)
1271
+ bulkmod_helper += round(amounts_mineralogy[mineral][n]*data_magnetite["K"], 3)
1272
+ shearmod_helper += round(0.67*amounts_mineralogy[mineral][n]*data_magnetite["G"], 3)
1273
+ gr_helper += round(amounts_mineralogy[mineral][n]*data_magnetite["GR"], 3)
1274
+ pe_helper += round(amounts_mineralogy[mineral][n]*data_magnetite["PE"], 3)
1275
+ elif mineral == "Py":
1276
+ rho_s_helper += round(amounts_mineralogy[mineral][n]*data_pyrite["rho"], 3)
1277
+ bulkmod_helper += round(amounts_mineralogy[mineral][n]*data_pyrite["K"], 3)
1278
+ shearmod_helper += round(0.67*amounts_mineralogy[mineral][n]*data_pyrite["G"], 3)
1279
+ gr_helper += round(amounts_mineralogy[mineral][n]*data_pyrite["GR"], 3)
1280
+ pe_helper += round(amounts_mineralogy[mineral][n]*data_pyrite["PE"], 3)
1281
+ elif mineral == "Rt":
1282
+ rho_s_helper += round(amounts_mineralogy[mineral][n]*data_rutile["rho"], 3)
1283
+ bulkmod_helper += round(amounts_mineralogy[mineral][n]*data_rutile["K"], 3)
1284
+ shearmod_helper += round(0.67*amounts_mineralogy[mineral][n]*data_rutile["G"], 3)
1285
+ gr_helper += round(amounts_mineralogy[mineral][n]*data_rutile["GR"], 3)
1286
+ pe_helper += round(amounts_mineralogy[mineral][n]*data_rutile["PE"], 3)
1287
+ #
1288
+ rho_helper = round((1-phi_helper)*rho_s_helper + phi_helper*self.data_water[2]/1000, 3)
1289
+ youngsmod_helper = round((9*bulkmod_helper*shearmod_helper)/(3*bulkmod_helper + shearmod_helper), 3)
1290
+ poisson_helper = round((3*bulkmod_helper - 2*shearmod_helper)/(6*bulkmod_helper + 2*shearmod_helper), 3)
1291
+ vP_helper = round(((bulkmod_helper*10**9 + 4/3*shearmod_helper*10**9)/(rho_helper))**0.5, 3)
1292
+ vS_helper = round(((shearmod_helper*10**9)/(rho_helper))**0.5, 3)
1293
+ vPvS_helper_helper = round(vP_helper/vS_helper, 3)
1294
+ #
1295
+ bulk_properties["rho_s"].append(round(rho_s_helper, 3))
1296
+ bulk_properties["rho"].append(rho_helper)
1297
+ bulk_properties["K"].append(round(bulkmod_helper, 3))
1298
+ bulk_properties["G"].append(round(shearmod_helper, 3))
1299
+ bulk_properties["E"].append(youngsmod_helper)
1300
+ bulk_properties["nu"].append(poisson_helper)
1301
+ bulk_properties["vP"].append(vP_helper)
1302
+ bulk_properties["vS"].append(vS_helper)
1303
+ bulk_properties["vPvS"].append(vPvS_helper_helper)
1304
+ bulk_properties["GR"].append(round(gr_helper, 3))
1305
+ bulk_properties["PE"].append(round(pe_helper, 3))
1306
+ bulk_properties["phi"].append(round(phi_helper, 3))
1307
+ n += 1
1308
+ #else:
1309
+ # break
1310
+ #
1311
+ results = {}
1312
+ results["rock"] = "Compact Hematite Ore"
1313
+ if number > 1:
1314
+ results["mineralogy"] = amounts_mineralogy
1315
+ results["chemistry"] = amounts_chemistry
1316
+ results["phi"] = bulk_properties["phi"]
1317
+ results["fluid"] = "water"
1318
+ results["rho_s"] = bulk_properties["rho_s"]
1319
+ results["rho"] = bulk_properties["rho"]
1320
+ results["vP"] = bulk_properties["vP"]
1321
+ results["vS"] = bulk_properties["vS"]
1322
+ results["vP/vS"] = bulk_properties["vPvS"]
1323
+ results["K"] = bulk_properties["K"]
1324
+ results["G"] = bulk_properties["G"]
1325
+ results["E"] = bulk_properties["E"]
1326
+ results["nu"] = bulk_properties["nu"]
1327
+ results["GR"] = bulk_properties["GR"]
1328
+ results["PE"] = bulk_properties["PE"]
1329
+ else:
1330
+ single_amounts_mineralogy = {}
1331
+ single_amounts_chemistry = {}
1332
+ for mineral, value in amounts_mineralogy.items():
1333
+ single_amounts_mineralogy[mineral] = value[0]
1334
+ for element, value in amounts_chemistry.items():
1335
+ single_amounts_chemistry[element] = value[0]
1336
+ results["mineralogy"] = single_amounts_mineralogy
1337
+ results["chemistry"] = single_amounts_chemistry
1338
+ results["phi"] = bulk_properties["phi"][0]
1339
+ results["fluid"] = "water"
1340
+ results["rho_s"] = bulk_properties["rho_s"][0]
1341
+ results["rho"] = bulk_properties["rho"][0]
1342
+ results["vP"] = bulk_properties["vP"][0]
1343
+ results["vS"] = bulk_properties["vS"][0]
1344
+ results["vP/vS"] = bulk_properties["vPvS"][0]
1345
+ results["K"] = bulk_properties["K"][0]
1346
+ results["G"] = bulk_properties["G"][0]
1347
+ results["E"] = bulk_properties["E"][0]
1348
+ results["nu"] = bulk_properties["nu"][0]
1349
+ results["GR"] = bulk_properties["GR"][0]
1350
+ results["PE"] = bulk_properties["PE"][0]
1351
+ #
1352
+ return results
1353
+
1354
+ #
1355
+ def create_banded_iron_formation(self, number, porosity=None):
1356
+ #
1357
+ data_quartz = Oxides(impurity="pure", data_type=True).create_quartz() # fixed
1358
+ data_hematite = Oxides(impurity="pure", data_type=True).create_hematite() # fixed
1359
+ data_magnetite = Oxides(impurity="pure", data_type=True).create_magnetite() # fixed
1360
+ data_kaolinite = Phyllosilicates(impurity="pure", data_type=True).create_kaolinite() # fixed
1361
+ data_goethite = Oxides(impurity="pure", data_type=True).create_goethite() # fixed
1362
+ #
1363
+ assemblage_minerals = [data_quartz, data_hematite, data_magnetite, data_kaolinite, data_goethite]
1364
+ #
1365
+ amounts_mineralogy = {}
1366
+ amounts_chemistry = {}
1367
+ bulk_properties = {}
1368
+ properties = ["rho_s", "rho", "K", "G", "E", "nu", "vP", "vS", "vPvS", "GR", "PE", "phi"]
1369
+ for property in properties:
1370
+ bulk_properties[property] = []
1371
+ mineral_list = []
1372
+ elements = []
1373
+ for mineral in assemblage_minerals:
1374
+ amounts_mineralogy[mineral["mineral"]] = []
1375
+ mineral_list.append(mineral["mineral"])
1376
+ elements_mineral = list(mineral["chemistry"].keys())
1377
+ for element in elements_mineral:
1378
+ if element not in elements:
1379
+ elements.append(element)
1380
+ amounts_chemistry[element] = []
1381
+ mineral_list.sort()
1382
+ elements.sort()
1383
+ #
1384
+ n = 0
1385
+ amounts_helper = []
1386
+ while n < number:
1387
+ w_total = 0
1388
+ n_minerals = 0
1389
+ for mineral in mineral_list:
1390
+ if mineral == "Qz":
1391
+ if n_minerals < len(mineral_list) - 1:
1392
+ value = round(1 - w_total, 4)
1393
+ else:
1394
+ value = round(1 - w_total, 4)
1395
+ if value >= 0.0 and 0.10 <= value <= 0.35:
1396
+ amounts_helper.append(value)
1397
+ w_total += value
1398
+ n_minerals += 1
1399
+ elif mineral == "Hem":
1400
+ if n_minerals < len(mineral_list) - 1:
1401
+ value = round(rd.uniform(0.25, 0.70), 4)
1402
+ else:
1403
+ value = round(1 - w_total, 4)
1404
+ if value >= 0.0 and 0.25 <= value <= 0.70:
1405
+ amounts_helper.append(value)
1406
+ w_total += value
1407
+ n_minerals += 1
1408
+ elif mineral == "Mag":
1409
+ if n_minerals < len(mineral_list) - 1:
1410
+ value = round(rd.uniform(0.10, 0.25), 4)
1411
+ else:
1412
+ value = round(1 - w_total, 4)
1413
+ if value >= 0.0 and 0.10 <= value <= 0.15:
1414
+ amounts_helper.append(value)
1415
+ w_total += value
1416
+ n_minerals += 1
1417
+ elif mineral == "Kln":
1418
+ if n_minerals < len(mineral_list) - 1:
1419
+ value = round(rd.uniform(0.10, 0.25), 4)
1420
+ else:
1421
+ value = round(1 - w_total, 4)
1422
+ if value >= 0.0 and 0.10 <= value <= 0.25:
1423
+ amounts_helper.append(value)
1424
+ w_total += value
1425
+ n_minerals += 1
1426
+ elif mineral == "Goe":
1427
+ if n_minerals < len(mineral_list) - 1:
1428
+ value = round(rd.uniform(0.05, 0.25), 4)
1429
+ else:
1430
+ value = round(1 - w_total, 4)
1431
+ if value >= 0.0 and 0.05 <= value <= 0.25:
1432
+ amounts_helper.append(value)
1433
+ w_total += value
1434
+ n_minerals += 1
1435
+ #
1436
+ if np.sum(amounts_helper) == 1.0 and n_minerals == len(mineral_list):
1437
+ for index, mineral in enumerate(mineral_list):
1438
+ amounts_mineralogy[mineral].append(amounts_helper[index])
1439
+ n += 1
1440
+ amounts_helper.clear()
1441
+ else:
1442
+ n += 0
1443
+ amounts_helper.clear()
1444
+ #
1445
+ n = 0
1446
+ amounts_helper = {}
1447
+ while n < number:
1448
+ amounts_helper.clear()
1449
+ w_total = 0
1450
+ n_elements = 0
1451
+ rho_s_helper = 0
1452
+ bulkmod_helper = 0
1453
+ shearmod_helper = 0
1454
+ gr_helper = 0
1455
+ pe_helper = 0
1456
+ if porosity == None:
1457
+ phi_helper = round(rd.uniform(0.0, 0.05), 4)
1458
+ else:
1459
+ phi_helper = porosity
1460
+ #
1461
+ for element in elements:
1462
+ amounts_helper[element] = 0
1463
+ if element in data_quartz["chemistry"]:
1464
+ if n_elements < len(elements) - 1:
1465
+ value = amounts_mineralogy["Qz"][n] * data_quartz["chemistry"][element]
1466
+ else:
1467
+ value = 1 - w_total
1468
+ amounts_helper[element] += round(value, 4)
1469
+ w_total += round(value, 4)
1470
+ if element in data_hematite["chemistry"]:
1471
+ if n_elements < len(elements) - 1:
1472
+ value = amounts_mineralogy["Hem"][n] * data_hematite["chemistry"][element]
1473
+ else:
1474
+ value = 1 - w_total
1475
+ amounts_helper[element] += round(value, 4)
1476
+ w_total += round(value, 4)
1477
+ if element in data_magnetite["chemistry"]:
1478
+ if n_elements < len(elements) - 1:
1479
+ value = amounts_mineralogy["Mag"][n] * data_magnetite["chemistry"][element]
1480
+ else:
1481
+ value = 1 - w_total
1482
+ amounts_helper[element] += round(value, 4)
1483
+ w_total += round(value, 4)
1484
+ if element in data_kaolinite["chemistry"]:
1485
+ if n_elements < len(elements) - 1:
1486
+ value = amounts_mineralogy["Kln"][n] * data_kaolinite["chemistry"][element]
1487
+ else:
1488
+ value = 1 - w_total
1489
+ amounts_helper[element] += round(value, 4)
1490
+ w_total += round(value, 4)
1491
+ if element in data_goethite["chemistry"]:
1492
+ if n_elements < len(elements) - 1:
1493
+ value = amounts_mineralogy["Goe"][n] * data_goethite["chemistry"][element]
1494
+ else:
1495
+ value = 1 - w_total
1496
+ amounts_helper[element] += round(value, 4)
1497
+ w_total += round(value, 4)
1498
+ #
1499
+ n_elements += 1
1500
+ #
1501
+ value_total = 0
1502
+ for element, value in amounts_helper.items():
1503
+ amounts_helper[element] = round(value, 4)
1504
+ value_total += int(round(amounts_helper[element] * 10000, 4))
1505
+ value_total = int(value_total)
1506
+ if value_total == 10000:
1507
+ condition_sum = True
1508
+ else:
1509
+ condition_sum = False
1510
+ if sum(amounts_helper.values()) == 1.0 or condition_sum == True or w_total == 1.0:
1511
+ for key, value in amounts_helper.items():
1512
+ amounts_chemistry[key].append(round(value, 4))
1513
+ for mineral in mineral_list:
1514
+ if mineral == "Qz":
1515
+ rho_s_helper += round(amounts_mineralogy[mineral][n] * data_quartz["rho"], 3)
1516
+ bulkmod_helper += round(amounts_mineralogy[mineral][n] * data_quartz["K"], 3)
1517
+ shearmod_helper += round(0.67 * amounts_mineralogy[mineral][n] * data_quartz["G"], 3)
1518
+ gr_helper += round(amounts_mineralogy[mineral][n] * data_quartz["GR"], 3)
1519
+ pe_helper += round(amounts_mineralogy[mineral][n] * data_quartz["PE"], 3)
1520
+ elif mineral == "Hem":
1521
+ rho_s_helper += round(amounts_mineralogy[mineral][n] * data_hematite["rho"], 3)
1522
+ bulkmod_helper += round(amounts_mineralogy[mineral][n] * data_hematite["K"], 3)
1523
+ shearmod_helper += round(0.67 * amounts_mineralogy[mineral][n] * data_hematite["G"], 3)
1524
+ gr_helper += round(amounts_mineralogy[mineral][n] * data_hematite["GR"], 3)
1525
+ pe_helper += round(amounts_mineralogy[mineral][n] * data_hematite["PE"], 3)
1526
+ elif mineral == "Mag":
1527
+ rho_s_helper += round(amounts_mineralogy[mineral][n] * data_magnetite["rho"], 3)
1528
+ bulkmod_helper += round(amounts_mineralogy[mineral][n] * data_magnetite["K"], 3)
1529
+ shearmod_helper += round(0.67 * amounts_mineralogy[mineral][n] * data_magnetite["G"], 3)
1530
+ gr_helper += round(amounts_mineralogy[mineral][n] * data_magnetite["GR"], 3)
1531
+ pe_helper += round(amounts_mineralogy[mineral][n] * data_magnetite["PE"], 3)
1532
+ elif mineral == "Kln":
1533
+ rho_s_helper += round(amounts_mineralogy[mineral][n] * data_kaolinite["rho"], 3)
1534
+ bulkmod_helper += round(amounts_mineralogy[mineral][n] * data_kaolinite["K"], 3)
1535
+ shearmod_helper += round(0.67 * amounts_mineralogy[mineral][n] * data_kaolinite["G"], 3)
1536
+ gr_helper += round(amounts_mineralogy[mineral][n] * data_kaolinite["GR"], 3)
1537
+ pe_helper += round(amounts_mineralogy[mineral][n] * data_kaolinite["PE"], 3)
1538
+ elif mineral == "Goe":
1539
+ rho_s_helper += round(amounts_mineralogy[mineral][n] * data_goethite["rho"], 3)
1540
+ bulkmod_helper += round(amounts_mineralogy[mineral][n] * data_goethite["K"], 3)
1541
+ shearmod_helper += round(0.67 * amounts_mineralogy[mineral][n] * data_goethite["G"], 3)
1542
+ gr_helper += round(amounts_mineralogy[mineral][n] * data_goethite["GR"], 3)
1543
+ pe_helper += round(amounts_mineralogy[mineral][n] * data_goethite["PE"], 3)
1544
+ #
1545
+ rho_helper = round((1 - phi_helper) * rho_s_helper + phi_helper * self.data_water[2] / 1000, 3)
1546
+ youngsmod_helper = round(
1547
+ (9 * bulkmod_helper * shearmod_helper) / (3 * bulkmod_helper + shearmod_helper), 3)
1548
+ poisson_helper = round(
1549
+ (3 * bulkmod_helper - 2 * shearmod_helper) / (6 * bulkmod_helper + 2 * shearmod_helper), 3)
1550
+ vP_helper = round(
1551
+ ((bulkmod_helper * 10 ** 9 + 4 / 3 * shearmod_helper * 10 ** 9) / (rho_helper)) ** 0.5, 3)
1552
+ vS_helper = round(((shearmod_helper * 10 ** 9) / (rho_helper)) ** 0.5, 3)
1553
+ vPvS_helper_helper = round(vP_helper / vS_helper, 3)
1554
+ #
1555
+ bulk_properties["rho_s"].append(round(rho_s_helper, 3))
1556
+ bulk_properties["rho"].append(rho_helper)
1557
+ bulk_properties["K"].append(round(bulkmod_helper, 3))
1558
+ bulk_properties["G"].append(round(shearmod_helper, 3))
1559
+ bulk_properties["E"].append(youngsmod_helper)
1560
+ bulk_properties["nu"].append(poisson_helper)
1561
+ bulk_properties["vP"].append(vP_helper)
1562
+ bulk_properties["vS"].append(vS_helper)
1563
+ bulk_properties["vPvS"].append(vPvS_helper_helper)
1564
+ bulk_properties["GR"].append(round(gr_helper, 3))
1565
+ bulk_properties["PE"].append(round(pe_helper, 3))
1566
+ bulk_properties["phi"].append(round(phi_helper, 3))
1567
+ n += 1
1568
+ #else:
1569
+ # break
1570
+ #
1571
+ results = {}
1572
+ results["rock"] = "Banded Iron Formation"
1573
+ if number > 1:
1574
+ results["mineralogy"] = amounts_mineralogy
1575
+ results["chemistry"] = amounts_chemistry
1576
+ results["phi"] = bulk_properties["phi"]
1577
+ results["fluid"] = "water"
1578
+ results["rho_s"] = bulk_properties["rho_s"]
1579
+ results["rho"] = bulk_properties["rho"]
1580
+ results["vP"] = bulk_properties["vP"]
1581
+ results["vS"] = bulk_properties["vS"]
1582
+ results["vP/vS"] = bulk_properties["vPvS"]
1583
+ results["K"] = bulk_properties["K"]
1584
+ results["G"] = bulk_properties["G"]
1585
+ results["E"] = bulk_properties["E"]
1586
+ results["nu"] = bulk_properties["nu"]
1587
+ results["GR"] = bulk_properties["GR"]
1588
+ results["PE"] = bulk_properties["PE"]
1589
+ else:
1590
+ single_amounts_mineralogy = {}
1591
+ single_amounts_chemistry = {}
1592
+ for mineral, value in amounts_mineralogy.items():
1593
+ single_amounts_mineralogy[mineral] = value[0]
1594
+ for element, value in amounts_chemistry.items():
1595
+ single_amounts_chemistry[element] = value[0]
1596
+ results["mineralogy"] = single_amounts_mineralogy
1597
+ results["chemistry"] = single_amounts_chemistry
1598
+ results["phi"] = bulk_properties["phi"][0]
1599
+ results["fluid"] = "water"
1600
+ results["rho_s"] = bulk_properties["rho_s"][0]
1601
+ results["rho"] = bulk_properties["rho"][0]
1602
+ results["vP"] = bulk_properties["vP"][0]
1603
+ results["vS"] = bulk_properties["vS"][0]
1604
+ results["vP/vS"] = bulk_properties["vPvS"][0]
1605
+ results["K"] = bulk_properties["K"][0]
1606
+ results["G"] = bulk_properties["G"][0]
1607
+ results["E"] = bulk_properties["E"][0]
1608
+ results["nu"] = bulk_properties["nu"][0]
1609
+ results["GR"] = bulk_properties["GR"][0]
1610
+ results["PE"] = bulk_properties["PE"][0]
1611
+ #
1612
+ return results
1613
+ #
1614
+ ## TEST
1615
+ # print("Test: Compact Hematite Ore")
1616
+ # start = time.process_time()
1617
+ # data = []
1618
+ # for i in range(100):
1619
+ # data.append(Ores(fluid="water", actualThickness=0).create_compact_hematite_ore(number=1))
1620
+ # # print(Ores(fluid="water", actualThickness=0).create_compact_hematite_ore(number=1))
1621
+ # print(data)
1622
+ # end1 = time.process_time() - start
1623
+ # print(end1)
1624
+ # start = time.process_time()
1625
+ # print(Ores(fluid="water", actualThickness=0).create_compact_hematite_ore(number=100))
1626
+ # end2 = time.process_time() - start
1627
+ # print(end2)
1628
+ # print(end2/end1)