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,339 @@
1
+ #!/usr/bin/env python
2
+ # -*-coding: utf-8 -*-
3
+
4
+ #-----------------------------------------------
5
+
6
+ # Name: fluids.py
7
+ # Author: Maximilian A. Beeskow
8
+ # Version: 1.0
9
+ # Date: 16.02.2020
10
+
11
+ #-----------------------------------------------
12
+
13
+ ## MODULES
14
+ import numpy as np
15
+ from numpy import round
16
+ from random import *
17
+ import random as rd
18
+ from modules import minerals
19
+ from modules.elements import elements
20
+ from modules.geophysics import BoreholeGeophysics as bg
21
+
22
+ class Gas:
23
+ #
24
+ def __init__(self):
25
+ pass
26
+ #
27
+ def air(self):
28
+ # [symbol, atomic number, atomic mass, molar volume, density, bulk modulus, shear modulus, young's modulus, vP, vS]
29
+ nitrogen = elements.N(self)
30
+ oxygen = elements.O(self)
31
+ argon = elements.Ar(self)
32
+ element = [nitrogen, oxygen, argon]
33
+ #
34
+ data = []
35
+ #
36
+ fluid = "air"
37
+ #
38
+ # Molar mass
39
+ w_N = 0.78
40
+ w_O = 0.21
41
+ w_Ar = 0.01
42
+ M = round(w_N*nitrogen[2] + w_O*oxygen[2] + w_Ar*argon[2], 3)
43
+ weights = [w_N, w_O, w_Ar]
44
+ # Density
45
+ rho = 1.2041
46
+ # Bulk modulus
47
+ K = round(131126.49, 3)
48
+ # Shear modulus
49
+ G = 0.0
50
+ # Young's modulus
51
+ E = (9*K*G)/(3*K + G)
52
+ # Poisson's ratio
53
+ nu = (3*K - 2*G)/(2*(3*K + G))
54
+ # vP/vS
55
+ vPvS = np.inf
56
+ # P-wave velocity
57
+ vP = ((K + 4/3*G)/(rho))**(0.5)
58
+ # S-wave velocity
59
+ vS = ((G)/(rho))**(0.5)
60
+ # Gamma ray
61
+ GR = 0
62
+ # Photoelectricity
63
+ PE = bg.calculate_pe(self, x_list=weights, elements_list=element)
64
+ U = PE*rho*10**(-3)
65
+ #
66
+ data.append(fluid)
67
+ data.append(round(M,2))
68
+ data.append(round(rho,1))
69
+ data.append([round(K*10**(-9),2), round(G*10**(-9),2), round(E*10**(-9),2), round(nu,2), round(vPvS,2)])
70
+ data.append([round(vP,1), round(vS,1)])
71
+ data.append([round(GR,2), round(PE,2), round(U,2)])
72
+ data.append(weights)
73
+ #
74
+ return data
75
+ #
76
+ class Water:
77
+ #
78
+ def __init__(self):
79
+ pass
80
+ #
81
+ def seawater(self):
82
+ # [symbol, atomic number, atomic mass, molar volume, density, bulk modulus, shear modulus, young's modulus, vP, vS]
83
+ chemNa = elements.Na(self)
84
+ chemCl = elements.Cl(self)
85
+ # [molar mass, density, bulk modulus, shear modulus, vP, vS, GR]
86
+ chemWater = Water.water("")
87
+ chemHalite = minerals.halides.halite("")
88
+ #
89
+ chemSeawater = []
90
+ # [molar mass, density, bulk modulus, shear modulus, vP, vS, GR]
91
+ saltAmount = 0.035
92
+ M = (1-saltAmount)*chemWater[1]+saltAmount*(chemHalite[1]) # Molar mass
93
+ x_Water = round((1-saltAmount)*chemWater[1]/M, 4)
94
+ x_Salt = round(saltAmount*chemHalite[1]/M, 4)
95
+ weights = [x_Water, x_Salt]
96
+ chemSeawater.append(M)
97
+ rho = round(np.random.normal(997, 0),1) # Density
98
+ chemSeawater.append(rho)
99
+ K = round(chemWater[2],2) # Bulk modulus
100
+ chemSeawater.append(K)
101
+ G = round(chemWater[3],2) # Shear modulus
102
+ chemSeawater.append(G)
103
+ vP = ((K*10**9 + 4/3 * G*10**9)/(rho))**(0.5) # P-wave velocity
104
+ chemSeawater.append(round(vP,1))
105
+ vS = ((G*10**9)/(rho))**(0.5) # S-wave velocity
106
+ chemSeawater.append(round(vS,1))
107
+ GR = 0 # Gamma ray
108
+ chemSeawater.append(GR)
109
+ #
110
+ data = []
111
+ #
112
+ fluid = "H2O"
113
+ #
114
+ # Molar mass
115
+ M = (1-saltAmount)*chemWater[1]+saltAmount*(chemHalite[1])
116
+ x_Water = round((1-saltAmount)*chemWater[1]/M, 4)
117
+ x_Salt = round(saltAmount*chemHalite[1]/M, 4)
118
+ weights = [x_Water, x_Salt]
119
+ # Density
120
+ dataV = minerals.CrystalPhysics([[4.51, 7.35], [], "hexagonal"])
121
+ V = dataV.calculate_volume()
122
+ dataRho = minerals.CrystalPhysics([M, 4, V])
123
+ rho = dataRho.calculate_bulk_density()
124
+ # Bulk modulus
125
+ K = 2.1*10**9
126
+ # Shear modulus
127
+ G = 0.0
128
+ # Young's modulus
129
+ E = (9*K*G)/(3*K + G)
130
+ # Poisson's ratio
131
+ nu = (3*K - 2*G)/(2*(3*K + G))
132
+ # vP/vS
133
+ vPvS = np.inf
134
+ # P-wave velocity
135
+ vP = ((K + 4/3*G)/(rho))**(0.5)
136
+ # S-wave velocity
137
+ vS = ((G)/(rho))**(0.5)
138
+ # Gamma ray
139
+ GR = 0
140
+ # Photoelectricity
141
+ PE = x_Water*chemWater[5][1] + x_Salt*chemHalite[5][1]
142
+ U = PE*rho*10**(-3)
143
+ #
144
+ data.append(fluid)
145
+ data.append(round(M,2))
146
+ data.append(round(rho,1))
147
+ data.append([round(K*10**(-9),2), round(G*10**(-9),2), round(E*10**(-9),2), round(nu,2), round(vPvS,2)])
148
+ data.append([round(vP,1), round(vS,1)])
149
+ data.append([round(GR,2), round(PE,2), round(U,2)])
150
+ #
151
+ return data
152
+ #
153
+ def water(self): # H2O
154
+ # [symbol, atomic number, atomic mass, molar volume, density, bulk modulus, shear modulus, young's modulus, vP, vS]
155
+ chem_H = elements.H(self)
156
+ chem_O = elements.O(self)
157
+ element = [chem_H, chem_O]
158
+ #
159
+ data = []
160
+ #
161
+ mineral = "H2O"
162
+ #
163
+ # Molar mass
164
+ M = round(2*chem_H[2] + chem_O[2],3)
165
+ x_H = round(2*chem_H[2]/M, 4)
166
+ x_O = round(chem_O[2]/M, 4)
167
+ weights = [x_H, x_O]
168
+ # Density
169
+ dataV = minerals.CrystalPhysics([[4.51, 7.35], [], "hexagonal"])
170
+ V = dataV.calculate_volume()
171
+ dataRho = minerals.CrystalPhysics([M, 4, V])
172
+ rho_calc = dataRho.calculate_bulk_density()
173
+ rho = rho_calc*1000/rho_calc
174
+ # Bulk modulus
175
+ K = 2.1*10**9
176
+ # Shear modulus
177
+ G = 0.0
178
+ # Young's modulus
179
+ E = (9*K*G)/(3*K + G)
180
+ # Poisson's ratio
181
+ nu = (3*K - 2*G)/(2*(3*K + G))
182
+ # vP/vS
183
+ vPvS = np.inf
184
+ # P-wave velocity
185
+ vP = ((K + 4/3*G)/(rho))**(0.5)
186
+ # S-wave velocity
187
+ vS = ((G)/(rho))**(0.5)
188
+ # Gamma ray
189
+ GR = 0
190
+ # Photoelectricity
191
+ PE = bg.calculate_pe(self, x_list=weights, elements_list=element)
192
+ U = PE*rho*10**(-3)
193
+ #
194
+ data.append(mineral)
195
+ data.append(round(M, 2))
196
+ data.append(round(rho, 1))
197
+ data.append([round(K*10**(-9), 2), round(G*10**(-9), 2), round(E*10**(-9), 2), round(nu, 2), round(vPvS, 2)])
198
+ data.append([round(vP, 1), round(vS, 1)])
199
+ data.append([round(GR, 2), round(PE, 2), round(U, 2)])
200
+ #
201
+ return data
202
+ #
203
+ class Hydrocarbons:
204
+ #
205
+ def __init__(self):
206
+ pass
207
+ #
208
+ def oil(self):
209
+ # [symbol, atomic number, atomic mass, molar volume, density, bulk modulus, shear modulus, young's modulus, vP, vS]
210
+ hydrogen = elements.H(self)
211
+ carbon = elements.C(self)
212
+ nitrogen = elements.N(self)
213
+ oxygen = elements.O(self)
214
+ sulfur = elements.S(self)
215
+ element = [hydrogen, carbon, nitrogen, oxygen, sulfur]
216
+ #
217
+ data = []
218
+ #
219
+ fluid = "oil"
220
+ #
221
+ # Molar mass
222
+ condition = False
223
+ condition_2 = False
224
+ while condition == False and condition_2 == False:
225
+ w_C = round(rd.uniform(0.83, 0.85), 4)
226
+ w_H = round(rd.uniform(0.10, 0.14), 4)
227
+ w_N = round(rd.uniform(0.001, 0.02), 4)
228
+ w_O = round(rd.uniform(0.0005, 0.015), 4)
229
+ w_S = round(1-w_C-w_H-w_N-w_O, 4)
230
+ w = w_H + w_C + w_N + w_O + w_S
231
+ if w == 1.0:
232
+ M = round(w_H*hydrogen[2] + w_C*carbon[2] + w_N*nitrogen[2] + w_O*oxygen[2] + w_S*sulfur[2], 3)
233
+ weights = [w_H, w_C, w_N, w_O, w_S]
234
+ # Density
235
+ V_m = round(w_H*hydrogen[3] + w_C*carbon[3] + w_N*nitrogen[3] + w_O*oxygen[3] + w_S*sulfur[3], 3)
236
+ rho = round(M/1000/V_m/0.0135, 4)
237
+ if 850 <= rho <= 950:
238
+ condition = True
239
+ condition_2 = True
240
+ else:
241
+ condition = False
242
+ condition_2 = False
243
+ else:
244
+ condition = False
245
+ # Bulk modulus
246
+ K = round(w_H*hydrogen[5] + w_C*carbon[5] + w_N*nitrogen[5] + w_O*oxygen[5] + w_S*sulfur[5], 3)
247
+ # Shear modulus
248
+ G = 0.0
249
+ # Young's modulus
250
+ E = (9*K*G)/(3*K + G)
251
+ # Poisson's ratio
252
+ nu = (3*K - 2*G)/(2*(3*K + G))
253
+ # vP/vS
254
+ vPvS = np.inf
255
+ # P-wave velocity
256
+ vP = ((K + 4/3*G)/(rho))**(0.5)
257
+ # S-wave velocity
258
+ vS = ((G)/(rho))**(0.5)
259
+ # Gamma ray
260
+ GR = 0
261
+ # Photoelectricity
262
+ PE = bg.calculate_pe(self, x_list=weights, elements_list=element)
263
+ U = PE*rho*10**(-3)
264
+ #
265
+ data.append(fluid)
266
+ data.append(round(M,2))
267
+ data.append(round(rho,1))
268
+ data.append([round(K*10**(-9),2), round(G*10**(-9),2), round(E*10**(-9),2), round(nu,2), round(vPvS,2)])
269
+ data.append([round(vP,1), round(vS,1)])
270
+ data.append([round(GR,2), round(PE,2), round(U,2)])
271
+ data.append(weights)
272
+ #
273
+ return data
274
+ #
275
+ def natural_gas(self):
276
+ # [symbol, atomic number, atomic mass, molar volume, density, bulk modulus, shear modulus, young's modulus, vP, vS]
277
+ hydrogen = elements.H(self)
278
+ carbon = elements.C(self)
279
+ nitrogen = elements.N(self)
280
+ oxygen = elements.O(self)
281
+ sulfur = elements.S(self)
282
+ element = [hydrogen, carbon, nitrogen, oxygen, sulfur]
283
+ #
284
+ data = []
285
+ #
286
+ fluid = "gas"
287
+ #
288
+ # Molar mass
289
+ condition = False
290
+ condition_2 = False
291
+ while condition == False and condition_2 == False:
292
+ w_C = round(rd.uniform(0.83, 0.85), 4)
293
+ w_H = round(rd.uniform(0.10, 0.14), 4)
294
+ w_N = round(rd.uniform(0.001, 0.02), 4)
295
+ w_O = round(rd.uniform(0.0005, 0.015), 4)
296
+ w_S = round(1-w_C-w_H-w_N-w_O, 4)
297
+ w = w_H + w_C + w_N + w_O + w_S
298
+ if w == 1.0:
299
+ M = round(w_H*hydrogen[2] + w_C*carbon[2] + w_N*nitrogen[2] + w_O*oxygen[2] + w_S*sulfur[2], 3)
300
+ weights = [w_H, w_C, w_N, w_O, w_S]
301
+ # Density
302
+ V_m = round(w_H*hydrogen[3] + w_C*carbon[3] + w_N*nitrogen[3] + w_O*oxygen[3] + w_S*sulfur[3], 3)
303
+ rho = round(M/1000/V_m/0.0145, 4)
304
+ if 750 <= rho <= 850:
305
+ condition = True
306
+ condition_2 = True
307
+ else:
308
+ continue
309
+ else:
310
+ condition = False
311
+ # Bulk modulus
312
+ K = round(w_H*hydrogen[5] + w_C*carbon[5] + w_N*nitrogen[5] + w_O*oxygen[5] + w_S*sulfur[5], 3)
313
+ # Shear modulus
314
+ G = 0.0
315
+ # Young's modulus
316
+ E = (9*K*G)/(3*K + G)
317
+ # Poisson's ratio
318
+ nu = (3*K - 2*G)/(2*(3*K + G))
319
+ # vP/vS
320
+ vPvS = np.inf
321
+ # P-wave velocity
322
+ vP = ((K + 4/3*G)/(rho))**(0.5)
323
+ # S-wave velocity
324
+ vS = ((G)/(rho))**(0.5)
325
+ # Gamma ray
326
+ GR = 0
327
+ # Photoelectricity
328
+ PE = bg.calculate_pe(self, x_list=weights, elements_list=element)
329
+ U = PE*rho*10**(-3)
330
+ #
331
+ data.append(fluid)
332
+ data.append(round(M,2))
333
+ data.append(round(rho,1))
334
+ data.append([round(K*10**(-9),2), round(G*10**(-9),2), round(E*10**(-9),2), round(nu,2), round(vPvS,2)])
335
+ data.append([round(vP,1), round(vS,1)])
336
+ data.append([round(GR,2), round(PE,2), round(U,2)])
337
+ data.append(weights)
338
+ #
339
+ return data