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.
- gebpy/__init__.py +55 -0
- gebpy/__pycache__/__init__.cpython-310.pyc +0 -0
- gebpy/adapters/__init__.py +0 -0
- gebpy/cli/__init__.py +0 -0
- gebpy/core/__init__.py +0 -0
- gebpy/core/chemistry/__init__.py +0 -0
- gebpy/core/chemistry/common.py +1369 -0
- gebpy/core/chemistry/elements.py +317 -0
- gebpy/core/chemistry/geochemistry.py +1728 -0
- gebpy/core/fluids/__init__.py +0 -0
- gebpy/core/io/__init__.py +0 -0
- gebpy/core/mathematics/__init__.py +0 -0
- gebpy/core/minerals/__init__.py +0 -0
- gebpy/core/minerals/carbonates.py +412 -0
- gebpy/core/minerals/common.py +555 -0
- gebpy/core/minerals/config.py +77 -0
- gebpy/core/minerals/cyclosilicates.py +0 -0
- gebpy/core/minerals/halides.py +0 -0
- gebpy/core/minerals/inosilicates.py +0 -0
- gebpy/core/minerals/nesosilicates.py +0 -0
- gebpy/core/minerals/organics.py +0 -0
- gebpy/core/minerals/oxides.py +589 -0
- gebpy/core/minerals/phosphates.py +0 -0
- gebpy/core/minerals/phospides.py +0 -0
- gebpy/core/minerals/phyllosilicates.py +436 -0
- gebpy/core/minerals/sorosilicates.py +0 -0
- gebpy/core/minerals/sulfates.py +0 -0
- gebpy/core/minerals/sulfides.py +459 -0
- gebpy/core/minerals/synthesis.py +201 -0
- gebpy/core/minerals/tectosilicates.py +433 -0
- gebpy/core/physics/__init__.py +0 -0
- gebpy/core/physics/common.py +53 -0
- gebpy/core/physics/geophysics.py +351 -0
- gebpy/core/rocks/__init__.py +0 -0
- gebpy/core/rocks/anisotropic_rocks.py +395 -0
- gebpy/core/rocks/common.py +95 -0
- gebpy/core/rocks/config.py +77 -0
- gebpy/core/rocks/isotropic_rocks.py +395 -0
- gebpy/core/rocks/sedimentary.py +385 -0
- gebpy/core/subsurface/__init__.py +0 -0
- gebpy/data_minerals/__init__.py +0 -0
- gebpy/data_minerals/albite.yaml +59 -0
- gebpy/data_minerals/anatase.yaml +43 -0
- gebpy/data_minerals/ankerite.yaml +47 -0
- gebpy/data_minerals/annite.yaml +57 -0
- gebpy/data_minerals/anorthite.yaml +59 -0
- gebpy/data_minerals/antigorite.yaml +53 -0
- gebpy/data_minerals/aragonite.yaml +48 -0
- gebpy/data_minerals/argutite.yaml +43 -0
- gebpy/data_minerals/arsenolite.yaml +40 -0
- gebpy/data_minerals/au3oxide.yaml +46 -0
- gebpy/data_minerals/avicennite.yaml +40 -0
- gebpy/data_minerals/azurite.yaml +53 -0
- gebpy/data_minerals/baddeleyite.yaml +49 -0
- gebpy/data_minerals/bismite.yaml +49 -0
- gebpy/data_minerals/boehmite.yaml +48 -0
- gebpy/data_minerals/brookite.yaml +46 -0
- gebpy/data_minerals/brucite.yaml +45 -0
- gebpy/data_minerals/bunsenite.yaml +40 -0
- gebpy/data_minerals/calcite.yaml +45 -0
- gebpy/data_minerals/cassiterite.yaml +43 -0
- gebpy/data_minerals/cerussite.yaml +48 -0
- gebpy/data_minerals/chamosite.yaml +56 -0
- gebpy/data_minerals/chlorite.yaml +75 -0
- gebpy/data_minerals/chromite.yaml +42 -0
- gebpy/data_minerals/chrysotile.yaml +53 -0
- gebpy/data_minerals/claudetite.yaml +49 -0
- gebpy/data_minerals/clinochlore.yaml +55 -0
- gebpy/data_minerals/cochromite.yaml +42 -0
- gebpy/data_minerals/corundum.yaml +43 -0
- gebpy/data_minerals/crocoite.yaml +51 -0
- gebpy/data_minerals/cuprite.yaml +40 -0
- gebpy/data_minerals/cuprospinel.yaml +42 -0
- gebpy/data_minerals/diaspore.yaml +48 -0
- gebpy/data_minerals/dolomite.yaml +47 -0
- gebpy/data_minerals/eastonite.yaml +57 -0
- gebpy/data_minerals/eskolaite.yaml +43 -0
- gebpy/data_minerals/fechlorite.yaml +61 -0
- gebpy/data_minerals/fecolumbite.yaml +48 -0
- gebpy/data_minerals/ferberite.yaml +51 -0
- gebpy/data_minerals/fetantalite.yaml +48 -0
- gebpy/data_minerals/franklinite.yaml +42 -0
- gebpy/data_minerals/gahnite.yaml +42 -0
- gebpy/data_minerals/galaxite.yaml +42 -0
- gebpy/data_minerals/geikielite.yaml +45 -0
- gebpy/data_minerals/gibbsite.yaml +51 -0
- gebpy/data_minerals/glauconite.yaml +69 -0
- gebpy/data_minerals/goethite.yaml +48 -0
- gebpy/data_minerals/groutite.yaml +48 -0
- gebpy/data_minerals/hematite.yaml +43 -0
- gebpy/data_minerals/hercynite.yaml +42 -0
- gebpy/data_minerals/huebnerite.yaml +51 -0
- gebpy/data_minerals/ikaite.yaml +53 -0
- gebpy/data_minerals/illite.yaml +55 -0
- gebpy/data_minerals/ilmenite.yaml +45 -0
- gebpy/data_minerals/jacobsite.yaml +42 -0
- gebpy/data_minerals/kalsilite.yaml +47 -0
- gebpy/data_minerals/kaolinite.yaml +59 -0
- gebpy/data_minerals/karelianite.yaml +43 -0
- gebpy/data_minerals/lime.yaml +40 -0
- gebpy/data_minerals/litharge.yaml +43 -0
- gebpy/data_minerals/magnesiochromite.yaml +42 -0
- gebpy/data_minerals/magnesioferrite.yaml +42 -0
- gebpy/data_minerals/magnesite.yaml +45 -0
- gebpy/data_minerals/magnetite.yaml +41 -0
- gebpy/data_minerals/malachite.yaml +53 -0
- gebpy/data_minerals/manganite.yaml +51 -0
- gebpy/data_minerals/manganochromite.yaml +42 -0
- gebpy/data_minerals/manganosite.yaml +40 -0
- gebpy/data_minerals/marialite.yaml +49 -0
- gebpy/data_minerals/massicot.yaml +46 -0
- gebpy/data_minerals/meionite.yaml +49 -0
- gebpy/data_minerals/mgchlorite.yaml +61 -0
- gebpy/data_minerals/mgcolumbite.yaml +48 -0
- gebpy/data_minerals/mgtantalite.yaml +48 -0
- gebpy/data_minerals/microcline.yaml +59 -0
- gebpy/data_minerals/minium.yaml +44 -0
- gebpy/data_minerals/mnchlorite.yaml +61 -0
- gebpy/data_minerals/mncolumbite.yaml +48 -0
- gebpy/data_minerals/mntantalite.yaml +48 -0
- gebpy/data_minerals/monteponite.yaml +40 -0
- gebpy/data_minerals/montmorillonite.yaml +77 -0
- gebpy/data_minerals/muscovite.yaml +55 -0
- gebpy/data_minerals/nanepheline.yaml +47 -0
- gebpy/data_minerals/nichlorite.yaml +61 -0
- gebpy/data_minerals/nichromite.yaml +42 -0
- gebpy/data_minerals/nimite.yaml +55 -0
- gebpy/data_minerals/nontronite.yaml +73 -0
- gebpy/data_minerals/orthoclase.yaml +53 -0
- gebpy/data_minerals/paratellurite.yaml +43 -0
- gebpy/data_minerals/pennantite.yaml +61 -0
- gebpy/data_minerals/periclase.yaml +40 -0
- gebpy/data_minerals/phlogopite.yaml +57 -0
- gebpy/data_minerals/plattnerite.yaml +43 -0
- gebpy/data_minerals/powellite.yaml +45 -0
- gebpy/data_minerals/pyrite.yaml +40 -0
- gebpy/data_minerals/pyrolusite.yaml +43 -0
- gebpy/data_minerals/pyrophanite.yaml +45 -0
- gebpy/data_minerals/pyrophyllite.yaml +59 -0
- gebpy/data_minerals/quartz.yaml +43 -0
- gebpy/data_minerals/rhodochrosite.yaml +45 -0
- gebpy/data_minerals/rutile.yaml +43 -0
- gebpy/data_minerals/saponite.yaml +77 -0
- gebpy/data_minerals/scheelite.yaml +45 -0
- gebpy/data_minerals/scrutinyite.yaml +46 -0
- gebpy/data_minerals/senarmontite.yaml +40 -0
- gebpy/data_minerals/siderite.yaml +45 -0
- gebpy/data_minerals/siderophyllite.yaml +57 -0
- gebpy/data_minerals/smithsonite.yaml +45 -0
- gebpy/data_minerals/spinel.yaml +42 -0
- gebpy/data_minerals/stishovite.yaml +43 -0
- gebpy/data_minerals/stolzite.yaml +45 -0
- gebpy/data_minerals/talc.yaml +53 -0
- gebpy/data_minerals/tistarite.yaml +43 -0
- gebpy/data_minerals/trevorite.yaml +42 -0
- gebpy/data_minerals/ulvoespinel.yaml +42 -0
- gebpy/data_minerals/uraninite.yaml +40 -0
- gebpy/data_minerals/valentinite.yaml +46 -0
- gebpy/data_minerals/vermiculite.yaml +69 -0
- gebpy/data_minerals/wulfenite.yaml +45 -0
- gebpy/data_minerals/wustite.yaml +40 -0
- gebpy/data_minerals/zincite.yaml +43 -0
- gebpy/data_minerals/zincochromite.yaml +42 -0
- gebpy/data_rocks/__init__.py +0 -0
- gebpy/data_rocks/dolostone.yaml +40 -0
- gebpy/data_rocks/limestone.yaml +40 -0
- gebpy/data_rocks/marl.yaml +50 -0
- gebpy/data_rocks/sandstone.yaml +39 -0
- gebpy/data_rocks/shale.yaml +50 -0
- gebpy/gebpy_app.py +8732 -0
- gebpy/gui/__init__.py +0 -0
- gebpy/lib/images/GebPy_Header.png +0 -0
- gebpy/lib/images/GebPy_Icon.png +0 -0
- gebpy/lib/images/GebPy_Logo.png +0 -0
- gebpy/main.py +29 -0
- gebpy/modules/__init__.py +0 -0
- gebpy/modules/__pycache__/__init__.cpython-310.pyc +0 -0
- gebpy/modules/__pycache__/metamorphics.cpython-310.pyc +0 -0
- gebpy/modules/__pycache__/silicates.cpython-310.pyc +0 -0
- gebpy/modules/carbonates.py +2658 -0
- gebpy/modules/chemistry.py +1369 -0
- gebpy/modules/core.py +1805 -0
- gebpy/modules/elements.py +317 -0
- gebpy/modules/evaporites.py +1299 -0
- gebpy/modules/exploration.py +1145 -0
- gebpy/modules/fluids.py +339 -0
- gebpy/modules/geochemistry.py +1727 -0
- gebpy/modules/geophysics.py +351 -0
- gebpy/modules/gui.py +9093 -0
- gebpy/modules/gui_elements.py +145 -0
- gebpy/modules/halides.py +485 -0
- gebpy/modules/igneous.py +2241 -0
- gebpy/modules/metamorphics.py +3222 -0
- gebpy/modules/mineralogy.py +442 -0
- gebpy/modules/minerals.py +7954 -0
- gebpy/modules/ore.py +1648 -0
- gebpy/modules/organics.py +530 -0
- gebpy/modules/oxides.py +9057 -0
- gebpy/modules/petrophysics.py +98 -0
- gebpy/modules/phosphates.py +589 -0
- gebpy/modules/phospides.py +194 -0
- gebpy/modules/plotting.py +619 -0
- gebpy/modules/pyllosilicates.py +380 -0
- gebpy/modules/sedimentary_rocks.py +908 -0
- gebpy/modules/sequences.py +2166 -0
- gebpy/modules/series.py +1625 -0
- gebpy/modules/silicates.py +11102 -0
- gebpy/modules/siliciclastics.py +1846 -0
- gebpy/modules/subsurface_2d.py +179 -0
- gebpy/modules/sulfates.py +1629 -0
- gebpy/modules/sulfides.py +4786 -0
- gebpy/plotting/__init__.py +0 -0
- gebpy/ui_nb/__init__.py +0 -0
- gebpy/user_data/.gitkeep +0 -0
- gebpy-1.1.3.dist-info/LICENSE +165 -0
- gebpy-1.1.3.dist-info/METADATA +207 -0
- gebpy-1.1.3.dist-info/RECORD +254 -0
- gebpy-1.1.3.dist-info/WHEEL +5 -0
- gebpy-1.1.3.dist-info/entry_points.txt +2 -0
- gebpy-1.1.3.dist-info/top_level.txt +1 -0
- modules/__init__.py +0 -0
- modules/carbonates.py +2658 -0
- modules/chemistry.py +1369 -0
- modules/core.py +1805 -0
- modules/elements.py +317 -0
- modules/evaporites.py +1299 -0
- modules/exploration.py +765 -0
- modules/fluids.py +339 -0
- modules/geochemistry.py +1727 -0
- modules/geophysics.py +337 -0
- modules/gui.py +9093 -0
- modules/gui_elements.py +145 -0
- modules/halides.py +485 -0
- modules/igneous.py +2196 -0
- modules/metamorphics.py +2699 -0
- modules/mineralogy.py +442 -0
- modules/minerals.py +7954 -0
- modules/ore.py +1628 -0
- modules/organics.py +530 -0
- modules/oxides.py +9057 -0
- modules/petrophysics.py +98 -0
- modules/phosphates.py +589 -0
- modules/phospides.py +194 -0
- modules/plotting.py +619 -0
- modules/pyllosilicates.py +380 -0
- modules/sedimentary_rocks.py +908 -0
- modules/sequences.py +2166 -0
- modules/series.py +1625 -0
- modules/silicates.py +11102 -0
- modules/siliciclastics.py +1830 -0
- modules/subsurface_2d.py +179 -0
- modules/sulfates.py +1629 -0
- modules/sulfides.py +4786 -0
- notebooks/__init__.py +0 -0
|
@@ -0,0 +1,1299 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*-coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
#-----------------------------------------------
|
|
5
|
+
|
|
6
|
+
# Name: evaporites.py
|
|
7
|
+
# Author: Maximilian A. Beeskow
|
|
8
|
+
# Version: 1.0
|
|
9
|
+
# Date: 20.09.2022
|
|
10
|
+
|
|
11
|
+
#-----------------------------------------------
|
|
12
|
+
|
|
13
|
+
## MODULES
|
|
14
|
+
import numpy as np
|
|
15
|
+
from numpy import round
|
|
16
|
+
from random import *
|
|
17
|
+
from modules import minerals, geochemistry
|
|
18
|
+
import random as rd
|
|
19
|
+
from modules import fluids
|
|
20
|
+
from modules.geophysics import Elasticity as elast
|
|
21
|
+
from modules.sulfates import Sulfates
|
|
22
|
+
from modules.halides import Halides
|
|
23
|
+
from modules.carbonates import Carbonates
|
|
24
|
+
from modules.fluids import Water
|
|
25
|
+
|
|
26
|
+
class evaporites:
|
|
27
|
+
#
|
|
28
|
+
def __init__(self,):
|
|
29
|
+
pass
|
|
30
|
+
#
|
|
31
|
+
def createRocksalt(self):
|
|
32
|
+
# [chemical formula, molar mass, density, bulk modulus, shear modulus, vP, vS]
|
|
33
|
+
chemHalite = minerals.halides.halite("")
|
|
34
|
+
chemSylvite = minerals.halides.sylvite("")
|
|
35
|
+
chemAnhydrite = minerals.sulfates.anhydrite("")
|
|
36
|
+
chemGypsum = minerals.sulfates.gypsum("")
|
|
37
|
+
chemIllite = minerals.phyllosilicates.illite("")
|
|
38
|
+
#
|
|
39
|
+
# [chemical formula, molar mass, density, bulk modulus, shear modulus, vP, vS]
|
|
40
|
+
chemWater = fluids.Water.water("")
|
|
41
|
+
#
|
|
42
|
+
rocksalt = []
|
|
43
|
+
#
|
|
44
|
+
cond = False
|
|
45
|
+
composition = []
|
|
46
|
+
while cond == False:
|
|
47
|
+
xHalides = round(randint(90, 100)/100, 2)
|
|
48
|
+
xHalite2 = round(randint(90, 100)/100, 2)
|
|
49
|
+
xSylvite2 = 1 - xHalite2
|
|
50
|
+
xHalite = round(xHalides * xHalite2, 2)
|
|
51
|
+
xSylvite = round(xHalides * xSylvite2, 2)
|
|
52
|
+
xSulfates = round(randint(0, 10) / 100, 2)
|
|
53
|
+
xAnhydrite2 = round(randint(0, 100) / 100, 2)
|
|
54
|
+
xGypsum2 = 1-xAnhydrite2
|
|
55
|
+
xAnhydrite = round(xSulfates * xAnhydrite2, 2)
|
|
56
|
+
xGypsum = round(xSulfates * xGypsum2, 2)
|
|
57
|
+
xIllite = round(randint(0, 5)/100, 2)
|
|
58
|
+
sumMin = round(xHalite + xAnhydrite + xGypsum + xSylvite + xIllite, 2)
|
|
59
|
+
#print("sumMin:", sumMin)
|
|
60
|
+
if sumMin == 1:
|
|
61
|
+
cond = True
|
|
62
|
+
composition.extend([["Hl", round(xHalite,2), round(chemHalite[1],2)], ["Anh", round(xAnhydrite,2), round(chemAnhydrite[1],2)], ["Gp", round(xGypsum,2), round(chemGypsum[1],2)], ["Syl", round(xSylvite, 2)], ["Ilt", round(xIllite,2), round(chemIllite[1],2)]])
|
|
63
|
+
else:
|
|
64
|
+
cond = False
|
|
65
|
+
xHalite = composition[0][1]
|
|
66
|
+
xAnhydrite = composition[1][1]
|
|
67
|
+
xGypsum = composition[2][1]
|
|
68
|
+
xSylvite = composition[3][1]
|
|
69
|
+
xIllite = composition[4][1]
|
|
70
|
+
rocksalt.append(composition)
|
|
71
|
+
mineralogy = [chemHalite, chemAnhydrite, chemGypsum, chemSylvite, chemIllite]
|
|
72
|
+
#
|
|
73
|
+
rhoSolid = (xHalite*chemHalite[2] + xAnhydrite * chemAnhydrite[2] + xGypsum * chemGypsum[2] + xSylvite * chemSylvite[2] + xIllite * chemIllite[2]) / 1000
|
|
74
|
+
X = [xHalite, xAnhydrite, xGypsum, xSylvite, xIllite]
|
|
75
|
+
K_list = [mineralogy[i][3][0] for i in range(len(mineralogy))]
|
|
76
|
+
G_list = [mineralogy[i][3][1] for i in range(len(mineralogy))]
|
|
77
|
+
K_geo = elast.calc_geometric_mean(self, X, K_list)
|
|
78
|
+
G_geo = elast.calc_geometric_mean(self, X, G_list)
|
|
79
|
+
K_solid = K_geo
|
|
80
|
+
G_solid = G_geo
|
|
81
|
+
vP_solid = np.sqrt((K_solid*10**9+4/3*G_solid*10**9)/(rhoSolid*10**3))
|
|
82
|
+
vS_solid = np.sqrt((G_solid*10**9)/(rhoSolid*10**3))
|
|
83
|
+
E_solid = (9*K_solid*G_solid)/(3*K_solid+G_solid)
|
|
84
|
+
nu_solid = (3*K_solid-2*G_solid)/(2*(3*K_solid+G_solid))
|
|
85
|
+
#
|
|
86
|
+
#phi = randint(0, 0)/100
|
|
87
|
+
phi = 0.0
|
|
88
|
+
rho = (1 - phi) * rhoSolid + phi * chemWater[2] / 1000
|
|
89
|
+
vP = (1-phi)*vP_solid + phi*chemWater[4][0]
|
|
90
|
+
vS = (1 - phi) * vS_solid
|
|
91
|
+
G_bulk = vS**2 * rho
|
|
92
|
+
K_bulk = vP**2 * rho - 4/3*G_bulk
|
|
93
|
+
E_bulk = (9*K_bulk*G_bulk)/(3*K_bulk+G_bulk)
|
|
94
|
+
phiD = (rhoSolid - rho) / (rhoSolid - chemWater[2] / 1000)
|
|
95
|
+
phiN = (2 * phi ** 2 - phiD ** 2) ** (0.5)
|
|
96
|
+
GR = xHalite*chemHalite[5][0] + xAnhydrite*chemAnhydrite[5][0] + xGypsum*chemGypsum[5][0] + xSylvite*chemSylvite[5][0] + xIllite*chemIllite[5][0]
|
|
97
|
+
PE = xHalite*chemHalite[5][1] + xAnhydrite*chemAnhydrite[5][1] + xGypsum*chemGypsum[5][1] + xSylvite*chemSylvite[5][1] + xIllite*chemIllite[5][1]
|
|
98
|
+
poisson_seismic = 0.5*(vP**2 - 2*vS**2)/(vP**2 - vS**2)
|
|
99
|
+
poisson_elastic = (3*K_bulk - 2*G_bulk)/(6*K_bulk + 2*G_bulk)
|
|
100
|
+
poisson_mineralogical = xHalite*chemHalite[3][3] + xAnhydrite*chemAnhydrite[3][3] + xGypsum*chemGypsum[3][3] + xSylvite*chemSylvite[3][3] + xIllite*chemIllite[3][3]
|
|
101
|
+
#print("Poisson:", round(poisson_seismic,3), round(poisson_elastic,3), round(poisson_mineralogical,3))
|
|
102
|
+
#
|
|
103
|
+
rocksalt.append([round(rho, 3), round(rhoSolid, 3), round(chemWater[2] / 1000, 6)])
|
|
104
|
+
rocksalt.append([round(K_bulk*10**(-6), 2), round(G_bulk*10**(-6), 2), round(E_bulk*10**(-6), 2), round(poisson_mineralogical, 3)])
|
|
105
|
+
rocksalt.append([round(vP, 2), round(vS, 2), round(vP_solid, 2), round(chemWater[4][0], 2)])
|
|
106
|
+
rocksalt.append([round(phi, 3), round(phiD, 3), round(phiN, 3)])
|
|
107
|
+
rocksalt.append("water")
|
|
108
|
+
rocksalt.append([GR, PE])
|
|
109
|
+
#
|
|
110
|
+
# rocksalt = [[mineralogical compositon], [densities], [elastic properties], [seismic velocities], [porosities], fluid name, GR]
|
|
111
|
+
#
|
|
112
|
+
return rocksalt
|
|
113
|
+
#
|
|
114
|
+
#
|
|
115
|
+
def createAnhydrite(self):
|
|
116
|
+
# [chemical formula, molar mass, density, bulk modulus, shear modulus, vP, vS]
|
|
117
|
+
chemAnhydrite = minerals.sulfates.anhydrite("")
|
|
118
|
+
chemCalcite = minerals.carbonates.calcite("")
|
|
119
|
+
chemHalite = minerals.halides.halite("")
|
|
120
|
+
chemGalena = minerals.sulfides.galena("")
|
|
121
|
+
chemChalcopyrite = minerals.sulfides.chalcopyrite("")
|
|
122
|
+
chemMolybdenite = minerals.sulfides.molybdenite("")
|
|
123
|
+
chemPyrite = minerals.sulfides.pyrite("")
|
|
124
|
+
#
|
|
125
|
+
# [chemical formula, molar mass, density, bulk modulus, shear modulus, vP, vS]
|
|
126
|
+
chemWater = fluids.Water.water("")
|
|
127
|
+
#
|
|
128
|
+
anhydrite = []
|
|
129
|
+
#
|
|
130
|
+
cond = False
|
|
131
|
+
composition = []
|
|
132
|
+
magicnumber = rd.randint(0,100)
|
|
133
|
+
while cond == False:
|
|
134
|
+
xAnhydrite = round(randint(90, 100)/100, 2)
|
|
135
|
+
xCalcite = round(randint(0, 10)/100, 2)
|
|
136
|
+
xHalite = round(randint(0, 10)/100, 2)
|
|
137
|
+
xSulfides = round(randint(0, 5) / 100, 2)
|
|
138
|
+
if magicnumber in range(0,5):
|
|
139
|
+
xGalena2 = round(randint(0, 100) / 100, 2)
|
|
140
|
+
xChalcopyrite2 = 0.00
|
|
141
|
+
xMolybdenite2 = 1-xGalena2
|
|
142
|
+
xPyrite2 = 0.00
|
|
143
|
+
elif magicnumber in range(5,20):
|
|
144
|
+
xGalena2 = 0.00
|
|
145
|
+
xChalcopyrite2 = round(randint(0, 100) / 100, 2)
|
|
146
|
+
xMolybdenite2 = 0.00
|
|
147
|
+
xPyrite2 = 1-xChalcopyrite2
|
|
148
|
+
else:
|
|
149
|
+
xGalena2 = 0.00
|
|
150
|
+
xChalcopyrite2 = 0.00
|
|
151
|
+
xMolybdenite2 = 0.00
|
|
152
|
+
xPyrite2 = 0.00
|
|
153
|
+
xGalena = round(xSulfides * xGalena2, 2)
|
|
154
|
+
xChalcopyrite = round(xSulfides * xChalcopyrite2, 2)
|
|
155
|
+
xMolybdenite = round(xSulfides * xMolybdenite2, 2)
|
|
156
|
+
xPyrite = round(xSulfides * xPyrite2, 2)
|
|
157
|
+
sumMin = round(xAnhydrite + xCalcite + xHalite + xGalena + xChalcopyrite + xMolybdenite + xPyrite, 2)
|
|
158
|
+
#print("sumMin:", sumMin)
|
|
159
|
+
if sumMin == 1:
|
|
160
|
+
cond = True
|
|
161
|
+
composition.extend([["Anh", round(xAnhydrite,2), round(chemAnhydrite[1],2)], ["Hl", round(xHalite,2), round(chemHalite[1],2)], ["Cal", round(xCalcite,2), round(chemCalcite[1],2)], ["Gn", round(xGalena,2), round(chemGalena[1],2)], ["Ccp", round(xChalcopyrite,2), round(chemChalcopyrite[1],2)], ["Mol", round(xMolybdenite,2), round(chemMolybdenite[1],2)], ["Py", round(xPyrite,2), round(chemPyrite[1],2)]])
|
|
162
|
+
else:
|
|
163
|
+
cond = False
|
|
164
|
+
xAnhydrite = composition[0][1]
|
|
165
|
+
xHalite = composition[1][1]
|
|
166
|
+
xCalcite = composition[2][1]
|
|
167
|
+
xGalena = composition[3][1]
|
|
168
|
+
xChalcopyrite = composition[4][1]
|
|
169
|
+
xMolybdenite = composition[5][1]
|
|
170
|
+
xPyrite = composition[6][1]
|
|
171
|
+
anhydrite.append(composition)
|
|
172
|
+
mineralogy = [chemAnhydrite, chemHalite, chemCalcite, chemGalena, chemChalcopyrite, chemMolybdenite, chemPyrite]
|
|
173
|
+
#
|
|
174
|
+
rhoSolid = (xAnhydrite * chemAnhydrite[2] + xHalite*chemHalite[2] + xCalcite*chemCalcite[2] + xGalena*chemGalena[2] + xChalcopyrite*chemChalcopyrite[2] + xMolybdenite*chemMolybdenite[2] + xPyrite*chemPyrite[2]) / 1000
|
|
175
|
+
X = [xAnhydrite, xHalite, xCalcite, xGalena, xChalcopyrite, xMolybdenite, xPyrite]
|
|
176
|
+
K_list = [mineralogy[i][3][0] for i in range(len(mineralogy))]
|
|
177
|
+
G_list = [mineralogy[i][3][1] for i in range(len(mineralogy))]
|
|
178
|
+
K_geo = elast.calc_geometric_mean(self, X, K_list)
|
|
179
|
+
G_geo = elast.calc_geometric_mean(self, X, G_list)
|
|
180
|
+
K_solid = K_geo
|
|
181
|
+
G_solid = G_geo
|
|
182
|
+
vP_solid = np.sqrt((K_solid*10**9+4/3*G_solid*10**9)/(rhoSolid*10**3))
|
|
183
|
+
vS_solid = np.sqrt((G_solid*10**9)/(rhoSolid*10**3))
|
|
184
|
+
E_solid = (9*K_solid*G_solid)/(3*K_solid+G_solid)
|
|
185
|
+
nu_solid = (3*K_solid-2*G_solid)/(2*(3*K_solid+G_solid))
|
|
186
|
+
#
|
|
187
|
+
phi = randint(0, 2)/100
|
|
188
|
+
rho = (1 - phi) * rhoSolid + phi * chemWater[2] / 1000
|
|
189
|
+
vP = (1-phi)*vP_solid + phi*chemWater[4][0]
|
|
190
|
+
vS = (1 - phi) * vS_solid
|
|
191
|
+
G_bulk = vS**2 * rho
|
|
192
|
+
K_bulk = vP**2 * rho - 4/3*G_bulk
|
|
193
|
+
E_bulk = (9*K_bulk*G_bulk)/(3*K_bulk+G_bulk)
|
|
194
|
+
phiD = (rhoSolid - rho) / (rhoSolid - chemWater[2] / 1000)
|
|
195
|
+
phiN = (2 * phi ** 2 - phiD ** 2) ** (0.5)
|
|
196
|
+
GR = xAnhydrite*chemAnhydrite[5][0] + xHalite*chemHalite[5][0] + xCalcite*chemCalcite[5][0] + xGalena*chemGalena[5][0] + xChalcopyrite*chemChalcopyrite[5][0] + xMolybdenite*chemMolybdenite[5][0] + xPyrite*chemPyrite[5][0]
|
|
197
|
+
PE = xAnhydrite*chemAnhydrite[5][1] + xHalite*chemHalite[5][1] + xCalcite*chemCalcite[5][1] + xGalena*chemGalena[5][1] + xChalcopyrite*chemChalcopyrite[5][1] + xMolybdenite*chemMolybdenite[5][1] + xPyrite*chemPyrite[5][1]
|
|
198
|
+
#poisson_seismic = 0.5*(vP**2 - 2*vS**2)/(vP**2 - vS**2)
|
|
199
|
+
#poisson_elastic = (3*K_bulk - 2*G_bulk)/(6*K_bulk + 2*G_bulk)
|
|
200
|
+
poisson_mineralogical = xAnhydrite*chemAnhydrite[3][3] + xHalite*chemHalite[3][3] + xCalcite*chemCalcite[3][3] + xGalena*chemGalena[3][3] + xChalcopyrite*chemChalcopyrite[3][3] + xMolybdenite*chemMolybdenite[3][3] + xPyrite*chemPyrite[3][3]
|
|
201
|
+
#
|
|
202
|
+
anhydrite.append([round(rho, 3), round(rhoSolid, 3), round(chemWater[2] / 1000, 6)])
|
|
203
|
+
anhydrite.append([round(K_bulk*10**(-6), 2), round(G_bulk*10**(-6), 2), round(E_bulk*10**(-6), 2), round(poisson_mineralogical, 3)])
|
|
204
|
+
anhydrite.append([round(vP, 2), round(vS, 2), round(vP_solid, 2), round(chemWater[4][0], 2)])
|
|
205
|
+
anhydrite.append([round(phi, 3), round(phiD, 3), round(phiN, 3)])
|
|
206
|
+
anhydrite.append("water")
|
|
207
|
+
anhydrite.append([GR, PE])
|
|
208
|
+
#
|
|
209
|
+
# anhydrite = [[mineralogical compositon], [densities], [elastic properties], [seismic velocities], [porosities], fluid name, GR]
|
|
210
|
+
#
|
|
211
|
+
return anhydrite
|
|
212
|
+
#
|
|
213
|
+
class Evaporites:
|
|
214
|
+
#
|
|
215
|
+
def __init__(self, fluid, actualThickness):
|
|
216
|
+
self.fluid = fluid
|
|
217
|
+
self.actualThickness = actualThickness
|
|
218
|
+
#
|
|
219
|
+
self.data_anhydrite = Sulfates(data_type=True).create_anhydrite()
|
|
220
|
+
self.data_gypsum = Sulfates(data_type=True).create_gypsum()
|
|
221
|
+
self.data_kainite = Sulfates(data_type=True).create_kainite()
|
|
222
|
+
self.data_kieserite = Sulfates(data_type=True).create_kieserite()
|
|
223
|
+
self.data_celestine = Sulfates(data_type=True).create_celestine()
|
|
224
|
+
self.data_calcite = Carbonates(data_type=True).create_calcite()
|
|
225
|
+
self.data_dolomite = Carbonates(data_type=True).create_dolomite()
|
|
226
|
+
self.data_magnesite = Carbonates(data_type=True).create_magnesite()
|
|
227
|
+
self.data_halite = Halides(dict=True).create_halite()
|
|
228
|
+
self.data_sylvite = Halides(dict=True).create_sylvite()
|
|
229
|
+
self.data_carnallite = Halides(dict=True).create_carnallite()
|
|
230
|
+
self.data_water = Water.water("")
|
|
231
|
+
#
|
|
232
|
+
def create_simple_rocksalt(self, w_Na=None, w_Cl=None, amounts=None, porosity=None, dict=False):
|
|
233
|
+
#
|
|
234
|
+
results = {}
|
|
235
|
+
results["rock"] = "Rock Salt"
|
|
236
|
+
#
|
|
237
|
+
self.w_Na = w_Na
|
|
238
|
+
self.w_Cl = w_Cl
|
|
239
|
+
self.amounts = amounts
|
|
240
|
+
#
|
|
241
|
+
# [chemical formula, molar mass, density, bulk modulus, shear modulus, vP, vS]
|
|
242
|
+
halite = minerals.halides.halite("")
|
|
243
|
+
anhydrite = minerals.sulfates.anhydrite("")
|
|
244
|
+
gypsum = minerals.sulfates.gypsum("")
|
|
245
|
+
sylvite = minerals.halides.sylvite("")
|
|
246
|
+
#
|
|
247
|
+
mineralogy = [halite, anhydrite, gypsum, sylvite]
|
|
248
|
+
#
|
|
249
|
+
water = fluids.Water.water("")
|
|
250
|
+
#
|
|
251
|
+
data = []
|
|
252
|
+
#
|
|
253
|
+
cond = False
|
|
254
|
+
composition = []
|
|
255
|
+
while cond == False:
|
|
256
|
+
if self.w_Na == None and self.w_Cl == None and self.amounts == None:
|
|
257
|
+
w_hl = round(rd.uniform(0.90, 1), 4)
|
|
258
|
+
w_acc = round((1-w_hl), 4)
|
|
259
|
+
w_anh = round(w_acc*rd.uniform(0, 1), 4)
|
|
260
|
+
w_gp = round(w_acc*rd.uniform(0, (1-w_anh)), 4)
|
|
261
|
+
w_syl = round((1-w_hl-w_anh-w_gp), 4)
|
|
262
|
+
elif self.w_Na != None:
|
|
263
|
+
w_hl = round((self.w_Na)/(halite[6][0]), 4)
|
|
264
|
+
w_acc = round((1-w_hl), 4)
|
|
265
|
+
w_anh = round(abs(w_acc*rd.uniform(0, 1)), 4)
|
|
266
|
+
w_gp = round(abs(w_acc*rd.uniform(0, (1-w_anh))), 4)
|
|
267
|
+
w_syl = round(abs(w_acc*(1-w_anh-w_gp)), 4)
|
|
268
|
+
elif self.w_Cl != None:
|
|
269
|
+
w_acc = round(abs(rd.uniform(0.0, 0.1)), 4)
|
|
270
|
+
w_syl = round(abs(w_acc*rd.uniform(0, 1)), 4)
|
|
271
|
+
w_anh = round(abs(w_acc*rd.uniform(0, (1-w_syl))), 4)
|
|
272
|
+
w_gp = round(abs(w_acc*(1-w_syl-w_anh)), 4)
|
|
273
|
+
w_hl = round((self.w_Cl-w_syl*sylvite[6][0])/(halite[6][0]), 4)
|
|
274
|
+
elif type(self.amounts) is list:
|
|
275
|
+
w_hl = round(abs(np.random.normal(self.amounts[0], 0.025)), 4)
|
|
276
|
+
w_anh = round(abs(np.random.normal(self.amounts[1], 0.025)), 4)
|
|
277
|
+
w_gp = round(abs(np.random.normal(self.amounts[2], 0.025)), 4)
|
|
278
|
+
w_syl = round(1-w_hl-w_anh-w_gp, 4)
|
|
279
|
+
#
|
|
280
|
+
if w_hl >= 0.0 and w_anh >= 0.0 and w_gp >= 0.0 and w_syl >= 0.0:
|
|
281
|
+
sumMin = round(w_hl + w_anh + w_gp + w_syl, 4)
|
|
282
|
+
else:
|
|
283
|
+
sumMin = 0
|
|
284
|
+
#
|
|
285
|
+
w_H = round(w_gp*gypsum[6][0], 4)
|
|
286
|
+
w_O = round(w_anh*anhydrite[6][0] + w_gp*gypsum[6][1], 4)
|
|
287
|
+
w_Na = round(w_hl*halite[6][0], 4)
|
|
288
|
+
w_S = round(w_anh*anhydrite[6][1] + w_gp*gypsum[6][2], 4)
|
|
289
|
+
w_Cl = round(w_hl*halite[6][1] + w_syl*sylvite[6][0], 4)
|
|
290
|
+
w_K = round(w_syl*sylvite[6][1], 4)
|
|
291
|
+
w_Ca = round(w_anh*anhydrite[6][2] + w_gp*gypsum[6][3], 4)
|
|
292
|
+
sumConc = round(w_H + w_O + w_Na + w_S + w_Cl + w_K + w_Ca, 4)
|
|
293
|
+
#print("Amount:", sumMin, "C:", sumConc)
|
|
294
|
+
#
|
|
295
|
+
if sumMin == 1 and sumConc == 1:
|
|
296
|
+
cond = True
|
|
297
|
+
composition.extend((["Hl", "Anh", "Gp", "Syl"]))
|
|
298
|
+
concentrations = [w_H, w_O, w_Na, w_S, w_Cl, w_K, w_Ca]
|
|
299
|
+
amounts = [w_hl, w_anh, w_gp, w_syl]
|
|
300
|
+
else:
|
|
301
|
+
cond = False
|
|
302
|
+
#
|
|
303
|
+
element_list = ["H", "O", "Na", "S", "Cl", "K", "Ca"]
|
|
304
|
+
mineral_list = ["Hl", "Anh", "Gp", "Syl"]
|
|
305
|
+
data.append(composition)
|
|
306
|
+
results["chemistry"] = {}
|
|
307
|
+
results["mineralogy"] = {}
|
|
308
|
+
for index, element in enumerate(element_list, start=0):
|
|
309
|
+
results["chemistry"][element] = concentrations[index]
|
|
310
|
+
for index, mineral in enumerate(mineral_list, start=0):
|
|
311
|
+
results["mineralogy"][mineral] = amounts[index]
|
|
312
|
+
#
|
|
313
|
+
rhoSolid = (w_hl*halite[2] + w_anh*anhydrite[2] + w_gp*gypsum[2] + w_syl*sylvite[2]) / 1000
|
|
314
|
+
X = [w_hl, w_anh, w_gp, w_syl]
|
|
315
|
+
K_list = [mineralogy[i][3][0] for i in range(len(mineralogy))]
|
|
316
|
+
G_list = [mineralogy[i][3][1] for i in range(len(mineralogy))]
|
|
317
|
+
K_geo = elast.calc_geometric_mean(self, X, K_list)
|
|
318
|
+
G_geo = elast.calc_geometric_mean(self, X, G_list)
|
|
319
|
+
K_solid = K_geo
|
|
320
|
+
G_solid = G_geo
|
|
321
|
+
vP_solid = np.sqrt((K_solid*10**9+4/3*G_solid*10**9)/(rhoSolid*10**3))
|
|
322
|
+
vS_solid = np.sqrt((G_solid*10**9)/(rhoSolid*10**3))
|
|
323
|
+
E_solid = (9*K_solid*G_solid)/(3*K_solid+G_solid)
|
|
324
|
+
nu_solid = (3*K_solid-2*G_solid)/(2*(3*K_solid+G_solid))
|
|
325
|
+
#
|
|
326
|
+
if porosity == None:
|
|
327
|
+
if self.actualThickness <= 1000:
|
|
328
|
+
phi = rd.uniform(0.0, 0.025)
|
|
329
|
+
elif self.actualThickness > 1000 and self.actualThickness <= 2000:
|
|
330
|
+
phi = rd.uniform(0.0, 0.025)
|
|
331
|
+
elif self.actualThickness > 2000 and self.actualThickness <= 3000:
|
|
332
|
+
phi = rd.uniform(0.0, 0.025)
|
|
333
|
+
elif self.actualThickness > 3000 and self.actualThickness <= 4000:
|
|
334
|
+
phi = rd.uniform(0.0, 0.025)
|
|
335
|
+
elif self.actualThickness > 4000:
|
|
336
|
+
phi = rd.uniform(0.0, 0.025)
|
|
337
|
+
else:
|
|
338
|
+
phi = porosity
|
|
339
|
+
#
|
|
340
|
+
results["phi"] = phi
|
|
341
|
+
results["fluid"] = self.fluid
|
|
342
|
+
#
|
|
343
|
+
rho = (1 - phi) * rhoSolid + phi * water[2] / 1000
|
|
344
|
+
vP = (1-phi)*vP_solid + phi*water[4][0]
|
|
345
|
+
vS = (1 - phi) * vS_solid
|
|
346
|
+
G_bulk = vS**2 * rho
|
|
347
|
+
K_bulk = vP**2 * rho - 4/3*G_bulk
|
|
348
|
+
E_bulk = (9*K_bulk*G_bulk)/(3*K_bulk+G_bulk)
|
|
349
|
+
phiD = (rhoSolid - rho) / (rhoSolid - water[2] / 1000)
|
|
350
|
+
phiN = (2 * phi ** 2 - phiD ** 2) ** (0.5)
|
|
351
|
+
GR = w_hl*halite[5][0] + w_anh*anhydrite[5][0] + w_gp*gypsum[5][0] + w_syl*sylvite[5][0]
|
|
352
|
+
PE = w_hl*halite[5][1] + w_anh*anhydrite[5][1] + w_gp*gypsum[5][1] + w_syl*sylvite[5][1]
|
|
353
|
+
poisson_seismic = 0.5*(vP**2 - 2*vS**2)/(vP**2 - vS**2)
|
|
354
|
+
poisson_elastic = (3*K_bulk - 2*G_bulk)/(6*K_bulk + 2*G_bulk)
|
|
355
|
+
poisson_mineralogical = w_hl*halite[3][3] + w_anh*anhydrite[3][3] + w_gp*gypsum[3][3] + w_syl*sylvite[3][3]
|
|
356
|
+
#
|
|
357
|
+
results["rho"] = round(rho*1000, 4)
|
|
358
|
+
results["vP"] = round(vP, 4)
|
|
359
|
+
results["vS"] = round(vS, 4)
|
|
360
|
+
results["vP/vS"] = round(vP/vS, 4)
|
|
361
|
+
results["G"] = round(G_bulk*10**(-6), 4)
|
|
362
|
+
results["K"] = round(K_bulk*10**(-6), 4)
|
|
363
|
+
results["E"] = round(E_bulk*10**(-6), 4)
|
|
364
|
+
results["nu"] = round(poisson_mineralogical, 4)
|
|
365
|
+
results["GR"] = round(GR, 4)
|
|
366
|
+
results["PE"] = round(PE, 4)
|
|
367
|
+
#
|
|
368
|
+
data.append([round(rho, 3), round(rhoSolid, 3), round(water[2] / 1000, 6)])
|
|
369
|
+
data.append([round(K_bulk*10**(-6), 2), round(G_bulk*10**(-6), 2), round(E_bulk*10**(-6), 2), round(poisson_mineralogical, 3)])
|
|
370
|
+
data.append([round(vP, 2), round(vS, 2), round(vP_solid, 2), round(water[4][0], 2)])
|
|
371
|
+
data.append([round(phi, 3), round(phiD, 3), round(phiN, 3)])
|
|
372
|
+
data.append("water")
|
|
373
|
+
data.append([round(GR, 3), round(PE, 3)])
|
|
374
|
+
data.append(concentrations)
|
|
375
|
+
data.append(amounts)
|
|
376
|
+
#
|
|
377
|
+
if dict == False:
|
|
378
|
+
return data
|
|
379
|
+
else:
|
|
380
|
+
return results
|
|
381
|
+
#
|
|
382
|
+
def create_simple_anhydrite(self, w_Ca=None, amounts=None, porosity=None, dict=False):
|
|
383
|
+
#
|
|
384
|
+
results = {}
|
|
385
|
+
results["rock"] = "Anhydrite"
|
|
386
|
+
#
|
|
387
|
+
self.w_Ca = w_Ca
|
|
388
|
+
self.amounts = amounts
|
|
389
|
+
#
|
|
390
|
+
# [chemical formula, molar mass, density, bulk modulus, shear modulus, vP, vS]
|
|
391
|
+
anhydrite = minerals.sulfates.anhydrite("")
|
|
392
|
+
calcite = minerals.carbonates.calcite("")
|
|
393
|
+
dolomite = minerals.carbonates.dolomite("")
|
|
394
|
+
gypsum = minerals.sulfates.gypsum("")
|
|
395
|
+
halite = minerals.halides.halite("")
|
|
396
|
+
#
|
|
397
|
+
mineralogy = [anhydrite, calcite, dolomite, gypsum, halite]
|
|
398
|
+
#
|
|
399
|
+
water = fluids.Water.water("")
|
|
400
|
+
#
|
|
401
|
+
data = []
|
|
402
|
+
#
|
|
403
|
+
cond = False
|
|
404
|
+
composition = []
|
|
405
|
+
while cond == False:
|
|
406
|
+
if self.w_Ca == None and self.amounts == None:
|
|
407
|
+
w_anh = round(rd.uniform(0.9, 1), 4)
|
|
408
|
+
w_acc = round((1-w_anh), 4)
|
|
409
|
+
w_cal = round(w_acc*rd.uniform(0, 1), 4)
|
|
410
|
+
w_dol = round(w_acc*rd.uniform(0, (1-w_cal)), 4)
|
|
411
|
+
w_gp = round(w_acc*rd.uniform(0, (1-w_cal-w_dol)), 4)
|
|
412
|
+
w_hl = round(1-w_anh-w_cal-w_dol-w_gp, 4)
|
|
413
|
+
elif self.w_Ca != None:
|
|
414
|
+
w_acc = round(abs(rd.uniform(0, 0.2)), 4)
|
|
415
|
+
w_cal = round(abs(w_acc*rd.uniform(0, 1)), 4)
|
|
416
|
+
w_dol = round(abs(w_acc*rd.uniform(0, (1-w_cal))), 4)
|
|
417
|
+
w_gp = round(abs(w_acc*rd.uniform(0, (1-w_cal-w_dol))), 4)
|
|
418
|
+
w_hl = round(abs(w_acc*(1-w_cal-w_dol-w_gp)), 4)
|
|
419
|
+
w_anh = round((self.w_Ca - w_cal*calcite[6][2] - w_dol*dolomite[6][3] - w_gp*gypsum[6][3])/(anhydrite[6][2]), 4)
|
|
420
|
+
elif type(self.amounts) is list:
|
|
421
|
+
w_anh = round(abs(np.random.normal(self.amounts[0], 0.025)), 4)
|
|
422
|
+
w_cal = round(abs(np.random.normal(self.amounts[1], 0.025)), 4)
|
|
423
|
+
w_dol = round(abs(np.random.normal(self.amounts[2], 0.025)), 4)
|
|
424
|
+
w_gp = round(abs(np.random.normal(self.amounts[3], 0.025)), 4)
|
|
425
|
+
w_hl = round(1-w_anh-w_cal-w_dol-w_gp, 4)
|
|
426
|
+
#
|
|
427
|
+
if w_anh >= 0.0 and w_cal >= 0.0 and w_dol >= 0.0 and w_gp >= 0.0 and w_hl >= 0.0:
|
|
428
|
+
sumMin = round(w_anh + w_cal + w_dol + w_gp + w_hl, 4)
|
|
429
|
+
else:
|
|
430
|
+
sumMin = 0
|
|
431
|
+
#
|
|
432
|
+
w_H = round(w_gp*gypsum[6][0], 4)
|
|
433
|
+
w_C = round(w_cal*calcite[6][0] + w_dol*dolomite[6][0], 4)
|
|
434
|
+
w_O = round(w_anh*anhydrite[6][0] + w_cal*calcite[6][1] + w_dol*dolomite[6][1] + w_gp*gypsum[6][1], 4)
|
|
435
|
+
w_Na = round(w_hl*halite[6][0], 4)
|
|
436
|
+
w_Mg = round(w_dol*dolomite[6][2], 4)
|
|
437
|
+
w_S = round(w_anh*anhydrite[6][1] + w_gp*gypsum[6][2], 4)
|
|
438
|
+
w_Cl = round(w_hl*halite[6][1], 4)
|
|
439
|
+
w_Ca = round(w_anh*anhydrite[6][2] + w_cal*calcite[6][2] + w_dol*dolomite[6][3] + w_gp*gypsum[6][3], 4)
|
|
440
|
+
sumConc = round(w_H + w_C + w_O + w_Na + w_Mg + w_S + w_Cl + w_Ca, 4)
|
|
441
|
+
#print("Amount:", sumMin, "C:", sumConc)
|
|
442
|
+
#
|
|
443
|
+
if sumMin == 1 and sumConc == 1:
|
|
444
|
+
cond = True
|
|
445
|
+
composition.extend((["Anh", w_anh, round(anhydrite[1], 2)], ["Cal", w_cal, round(calcite[1], 2)], ["Dol", w_dol, round(dolomite[1], 2)], ["Gp", w_gp, round(gypsum[1], 2)], ["Hl", w_hl, round(halite[1], 2)]))
|
|
446
|
+
concentrations = [w_H, w_C, w_O, w_Na, w_Mg, w_S, w_Cl, w_Ca]
|
|
447
|
+
amounts = [w_anh, w_cal, w_dol, w_gp, w_hl]
|
|
448
|
+
# phi_V = geochemistry.Fractions.calculate_volume_fraction(self, mineralogy=mineralogy, w=amounts)
|
|
449
|
+
# #print(np.around(phi_V, 4))
|
|
450
|
+
# if 0.8 <= phi_V[0] <= 1.0:
|
|
451
|
+
# cond = True
|
|
452
|
+
# else:
|
|
453
|
+
# composition = []
|
|
454
|
+
# cond = False
|
|
455
|
+
else:
|
|
456
|
+
cond = False
|
|
457
|
+
#
|
|
458
|
+
element_list = ["H", "C", "O", "Na", "Mg", "S", "Cl", "Ca"]
|
|
459
|
+
mineral_list = ["Anh", "Cal", "Dol", "Gp", "Hl"]
|
|
460
|
+
data.append(composition)
|
|
461
|
+
results["chemistry"] = {}
|
|
462
|
+
results["mineralogy"] = {}
|
|
463
|
+
for index, element in enumerate(element_list, start=0):
|
|
464
|
+
results["chemistry"][element] = concentrations[index]
|
|
465
|
+
for index, mineral in enumerate(mineral_list, start=0):
|
|
466
|
+
results["mineralogy"][mineral] = amounts[index]
|
|
467
|
+
#
|
|
468
|
+
rhoSolid = (w_anh*anhydrite[2] + w_cal*calcite[2] + w_dol*dolomite[2] + w_gp*gypsum[2] + w_hl*halite[2]) / 1000
|
|
469
|
+
X = [w_anh, w_cal, w_dol, w_gp, w_hl]
|
|
470
|
+
K_list = [mineralogy[i][3][0] for i in range(len(mineralogy))]
|
|
471
|
+
G_list = [mineralogy[i][3][1] for i in range(len(mineralogy))]
|
|
472
|
+
K_geo = elast.calc_geometric_mean(self, X, K_list)
|
|
473
|
+
G_geo = elast.calc_geometric_mean(self, X, G_list)
|
|
474
|
+
K_solid = K_geo
|
|
475
|
+
G_solid = G_geo
|
|
476
|
+
vP_solid = np.sqrt((K_solid*10**9+4/3*G_solid*10**9)/(rhoSolid*10**3))
|
|
477
|
+
vS_solid = np.sqrt((G_solid*10**9)/(rhoSolid*10**3))
|
|
478
|
+
E_solid = (9*K_solid*G_solid)/(3*K_solid+G_solid)
|
|
479
|
+
nu_solid = (3*K_solid-2*G_solid)/(2*(3*K_solid+G_solid))
|
|
480
|
+
#
|
|
481
|
+
if porosity == None:
|
|
482
|
+
if self.actualThickness <= 1000:
|
|
483
|
+
phi = rd.uniform(0.0, 0.025)
|
|
484
|
+
elif self.actualThickness > 1000 and self.actualThickness <= 2000:
|
|
485
|
+
phi = rd.uniform(0.0, 0.025)
|
|
486
|
+
elif self.actualThickness > 2000 and self.actualThickness <= 3000:
|
|
487
|
+
phi = rd.uniform(0.0, 0.025)
|
|
488
|
+
elif self.actualThickness > 3000 and self.actualThickness <= 4000:
|
|
489
|
+
phi = rd.uniform(0.0, 0.025)
|
|
490
|
+
elif self.actualThickness > 4000:
|
|
491
|
+
phi = rd.uniform(0.0, 0.025)
|
|
492
|
+
else:
|
|
493
|
+
phi = porosity
|
|
494
|
+
#
|
|
495
|
+
results["phi"] = phi
|
|
496
|
+
results["fluid"] = self.fluid
|
|
497
|
+
#
|
|
498
|
+
rho = (1 - phi) * rhoSolid + phi * water[2] / 1000
|
|
499
|
+
vP = (1-phi)*vP_solid + phi*water[4][0]
|
|
500
|
+
vS = (1 - phi) * vS_solid
|
|
501
|
+
G_bulk = vS**2 * rho
|
|
502
|
+
K_bulk = vP**2 * rho - 4/3*G_bulk
|
|
503
|
+
E_bulk = (9*K_bulk*G_bulk)/(3*K_bulk+G_bulk)
|
|
504
|
+
phiD = (rhoSolid - rho) / (rhoSolid - water[2] / 1000)
|
|
505
|
+
phiN = (2 * phi ** 2 - phiD ** 2) ** (0.5)
|
|
506
|
+
GR = w_anh*anhydrite[5][0] + w_cal*calcite[5][0] + w_dol*dolomite[5][0] + w_gp*gypsum[5][0] + w_hl*halite[5][0]
|
|
507
|
+
PE = w_anh*anhydrite[5][1] + w_cal*calcite[5][1] + w_dol*dolomite[5][1] + w_gp*gypsum[5][1] + w_hl*halite[5][1]
|
|
508
|
+
poisson_seismic = 0.5*(vP**2 - 2*vS**2)/(vP**2 - vS**2)
|
|
509
|
+
poisson_elastic = (3*K_bulk - 2*G_bulk)/(6*K_bulk + 2*G_bulk)
|
|
510
|
+
poisson_mineralogical = w_anh*anhydrite[3][3] + w_cal*calcite[3][3] + w_dol*dolomite[3][3] + w_gp*gypsum[3][3] + w_hl*halite[3][3]
|
|
511
|
+
#
|
|
512
|
+
results["rho"] = round(rho*1000, 4)
|
|
513
|
+
results["vP"] = round(vP, 4)
|
|
514
|
+
results["vS"] = round(vS, 4)
|
|
515
|
+
results["vP/vS"] = round(vP/vS, 4)
|
|
516
|
+
results["G"] = round(G_bulk*10**(-6), 4)
|
|
517
|
+
results["K"] = round(K_bulk*10**(-6), 4)
|
|
518
|
+
results["E"] = round(E_bulk*10**(-6), 4)
|
|
519
|
+
results["nu"] = round(poisson_mineralogical, 4)
|
|
520
|
+
results["GR"] = round(GR, 4)
|
|
521
|
+
results["PE"] = round(PE, 4)
|
|
522
|
+
#
|
|
523
|
+
data.append([round(rho, 3), round(rhoSolid, 3), round(water[2] / 1000, 6)])
|
|
524
|
+
data.append([round(K_bulk*10**(-6), 2), round(G_bulk*10**(-6), 2), round(E_bulk*10**(-6), 2), round(poisson_mineralogical, 3)])
|
|
525
|
+
data.append([round(vP, 2), round(vS, 2), round(vP_solid, 2), round(water[4][0], 2)])
|
|
526
|
+
data.append([round(phi, 3), round(phiD, 3), round(phiN, 3)])
|
|
527
|
+
data.append("water")
|
|
528
|
+
data.append([round(GR, 3), round(PE, 3)])
|
|
529
|
+
data.append(concentrations)
|
|
530
|
+
data.append(amounts)
|
|
531
|
+
#
|
|
532
|
+
if dict == False:
|
|
533
|
+
return data
|
|
534
|
+
else:
|
|
535
|
+
return results
|
|
536
|
+
#
|
|
537
|
+
def create_anhydrite(self, number, porosity=None):
|
|
538
|
+
#
|
|
539
|
+
#
|
|
540
|
+
assemblage = [self.data_anhydrite, self.data_calcite, self.data_dolomite, self.data_magnesite, self.data_halite,
|
|
541
|
+
self.data_sylvite]
|
|
542
|
+
#
|
|
543
|
+
amounts_mineralogy = {}
|
|
544
|
+
amounts_chemistry = {}
|
|
545
|
+
bulk_properties = {}
|
|
546
|
+
properties = ["rho_s", "rho", "K", "G", "E", "nu", "vP", "vS", "vPvS", "GR", "PE", "phi"]
|
|
547
|
+
for property in properties:
|
|
548
|
+
bulk_properties[property] = []
|
|
549
|
+
mineral_list = []
|
|
550
|
+
elements = []
|
|
551
|
+
for mineral in assemblage:
|
|
552
|
+
amounts_mineralogy[mineral["mineral"]] = []
|
|
553
|
+
mineral_list.append(mineral["mineral"])
|
|
554
|
+
elements_mineral = list(mineral["chemistry"].keys())
|
|
555
|
+
for element in elements_mineral:
|
|
556
|
+
if element not in elements:
|
|
557
|
+
elements.append(element)
|
|
558
|
+
amounts_chemistry[element] = []
|
|
559
|
+
mineral_list.sort()
|
|
560
|
+
elements.sort()
|
|
561
|
+
#
|
|
562
|
+
n = 0
|
|
563
|
+
amounts_helper = []
|
|
564
|
+
while n < number:
|
|
565
|
+
w_total = 0
|
|
566
|
+
n_minerals = 0
|
|
567
|
+
for mineral in mineral_list:
|
|
568
|
+
if mineral == "Anh":
|
|
569
|
+
if n_minerals < len(mineral_list) - 1:
|
|
570
|
+
value = round(rd.uniform(0.7, 1.0), 4)
|
|
571
|
+
else:
|
|
572
|
+
value = round(1 - w_total, 4)
|
|
573
|
+
if 0.7 <= value <= 1.0:
|
|
574
|
+
amounts_helper.append(value)
|
|
575
|
+
w_total += value
|
|
576
|
+
n_minerals += 1
|
|
577
|
+
elif mineral == "Cal":
|
|
578
|
+
if n_minerals < len(mineral_list) - 1:
|
|
579
|
+
value = round(rd.uniform(0.0, 0.2), 4)
|
|
580
|
+
else:
|
|
581
|
+
value = round(1 - w_total, 4)
|
|
582
|
+
if 0.0 <= value <= 0.2:
|
|
583
|
+
amounts_helper.append(value)
|
|
584
|
+
w_total += value
|
|
585
|
+
n_minerals += 1
|
|
586
|
+
elif mineral == "Dol":
|
|
587
|
+
if n_minerals < len(mineral_list) - 1:
|
|
588
|
+
value = round(rd.uniform(0.0, 0.2), 4)
|
|
589
|
+
else:
|
|
590
|
+
value = round(1 - w_total, 4)
|
|
591
|
+
if 0.0 <= value <= 0.2:
|
|
592
|
+
amounts_helper.append(value)
|
|
593
|
+
w_total += value
|
|
594
|
+
n_minerals += 1
|
|
595
|
+
elif mineral == "Mgs":
|
|
596
|
+
if n_minerals < len(mineral_list) - 1:
|
|
597
|
+
value = round(rd.uniform(0.0, 0.1), 4)
|
|
598
|
+
else:
|
|
599
|
+
value = round(1 - w_total, 4)
|
|
600
|
+
if 0.0 <= value <= 0.1:
|
|
601
|
+
amounts_helper.append(value)
|
|
602
|
+
w_total += value
|
|
603
|
+
n_minerals += 1
|
|
604
|
+
elif mineral == "Hl":
|
|
605
|
+
if n_minerals < len(mineral_list) - 1:
|
|
606
|
+
value = round(rd.uniform(0.0, 0.1), 4)
|
|
607
|
+
else:
|
|
608
|
+
value = round(1 - w_total, 4)
|
|
609
|
+
if 0.0 <= value <= 0.1:
|
|
610
|
+
amounts_helper.append(value)
|
|
611
|
+
w_total += value
|
|
612
|
+
n_minerals += 1
|
|
613
|
+
elif mineral == "Syl":
|
|
614
|
+
if n_minerals < len(mineral_list) - 1:
|
|
615
|
+
value = round(rd.uniform(0.0, 0.1), 4)
|
|
616
|
+
else:
|
|
617
|
+
value = round(1 - w_total, 4)
|
|
618
|
+
if 0.0 <= value <= 0.1:
|
|
619
|
+
amounts_helper.append(value)
|
|
620
|
+
w_total += value
|
|
621
|
+
n_minerals += 1
|
|
622
|
+
#
|
|
623
|
+
if np.sum(amounts_helper) == 1.0 and n_minerals == len(mineral_list):
|
|
624
|
+
for index, mineral in enumerate(mineral_list):
|
|
625
|
+
amounts_mineralogy[mineral].append(amounts_helper[index])
|
|
626
|
+
n += 1
|
|
627
|
+
amounts_helper.clear()
|
|
628
|
+
else:
|
|
629
|
+
n += 0
|
|
630
|
+
amounts_helper.clear()
|
|
631
|
+
#
|
|
632
|
+
n = 0
|
|
633
|
+
amounts_helper = {}
|
|
634
|
+
while n < number:
|
|
635
|
+
w_total = 0
|
|
636
|
+
n_elements = 0
|
|
637
|
+
rho_s_helper = 0
|
|
638
|
+
bulkmod_helper = 0
|
|
639
|
+
shearmod_helper = 0
|
|
640
|
+
gr_helper = 0
|
|
641
|
+
pe_helper = 0
|
|
642
|
+
if porosity == None:
|
|
643
|
+
phi_helper = round(rd.uniform(0.0, 0.05), 4)
|
|
644
|
+
else:
|
|
645
|
+
phi_helper = round(rd.uniform(porosity[0], porosity[1]), 4)
|
|
646
|
+
#
|
|
647
|
+
for element in elements:
|
|
648
|
+
amounts_helper[element] = 0
|
|
649
|
+
if element in self.data_anhydrite["chemistry"]:
|
|
650
|
+
if n_elements < len(elements) - 1:
|
|
651
|
+
value = round(amounts_mineralogy["Anh"][n] * self.data_anhydrite["chemistry"][element], 4)
|
|
652
|
+
else:
|
|
653
|
+
value = round(1 - w_total, 4)
|
|
654
|
+
amounts_helper[element] += value
|
|
655
|
+
w_total += value
|
|
656
|
+
if element in self.data_calcite["chemistry"]:
|
|
657
|
+
if n_elements < len(elements) - 1:
|
|
658
|
+
value = round(amounts_mineralogy["Cal"][n] * self.data_calcite["chemistry"][element], 4)
|
|
659
|
+
else:
|
|
660
|
+
value = round(1 - w_total, 4)
|
|
661
|
+
amounts_helper[element] += value
|
|
662
|
+
w_total += value
|
|
663
|
+
if element in self.data_dolomite["chemistry"]:
|
|
664
|
+
if n_elements < len(elements) - 1:
|
|
665
|
+
value = round(amounts_mineralogy["Dol"][n] * self.data_dolomite["chemistry"][element], 4)
|
|
666
|
+
else:
|
|
667
|
+
value = round(1 - w_total, 4)
|
|
668
|
+
amounts_helper[element] += value
|
|
669
|
+
w_total += value
|
|
670
|
+
if element in self.data_magnesite["chemistry"]:
|
|
671
|
+
if n_elements < len(elements) - 1:
|
|
672
|
+
value = round(amounts_mineralogy["Mgs"][n] * self.data_magnesite["chemistry"][element], 4)
|
|
673
|
+
else:
|
|
674
|
+
value = round(1 - w_total, 4)
|
|
675
|
+
amounts_helper[element] += value
|
|
676
|
+
w_total += value
|
|
677
|
+
if element in self.data_halite["chemistry"]:
|
|
678
|
+
if n_elements < len(elements) - 1:
|
|
679
|
+
value = round(amounts_mineralogy["Hl"][n] * self.data_halite["chemistry"][element], 4)
|
|
680
|
+
else:
|
|
681
|
+
value = round(1 - w_total, 4)
|
|
682
|
+
amounts_helper[element] += value
|
|
683
|
+
w_total += value
|
|
684
|
+
if element in self.data_sylvite["chemistry"]:
|
|
685
|
+
if n_elements < len(elements) - 1:
|
|
686
|
+
value = round(amounts_mineralogy["Syl"][n] * self.data_sylvite["chemistry"][element], 4)
|
|
687
|
+
else:
|
|
688
|
+
value = round(1 - w_total, 4)
|
|
689
|
+
amounts_helper[element] += value
|
|
690
|
+
w_total += value
|
|
691
|
+
#
|
|
692
|
+
n_elements += 1
|
|
693
|
+
#
|
|
694
|
+
shear_factor = 1.0
|
|
695
|
+
#
|
|
696
|
+
if sum(amounts_helper.values()) == 1.0:
|
|
697
|
+
for key, value in amounts_helper.items():
|
|
698
|
+
amounts_chemistry[key].append(round(value, 4))
|
|
699
|
+
for mineral in mineral_list:
|
|
700
|
+
if mineral == "Anh":
|
|
701
|
+
rho_s_helper += round(amounts_mineralogy[mineral][n] * self.data_anhydrite["rho"], 3)
|
|
702
|
+
bulkmod_helper += round(amounts_mineralogy[mineral][n] * self.data_anhydrite["K"], 3)
|
|
703
|
+
shearmod_helper += round(
|
|
704
|
+
shear_factor * amounts_mineralogy[mineral][n] * self.data_anhydrite["G"], 3)
|
|
705
|
+
gr_helper += round(amounts_mineralogy[mineral][n] * self.data_anhydrite["GR"], 3)
|
|
706
|
+
pe_helper += round(amounts_mineralogy[mineral][n] * self.data_anhydrite["PE"], 3)
|
|
707
|
+
elif mineral == "Cal":
|
|
708
|
+
rho_s_helper += round(amounts_mineralogy[mineral][n] * self.data_calcite["rho"], 3)
|
|
709
|
+
bulkmod_helper += round(amounts_mineralogy[mineral][n] * self.data_calcite["K"], 3)
|
|
710
|
+
shearmod_helper += round(
|
|
711
|
+
shear_factor * amounts_mineralogy[mineral][n] * self.data_calcite["G"],
|
|
712
|
+
3)
|
|
713
|
+
gr_helper += round(amounts_mineralogy[mineral][n] * self.data_calcite["GR"], 3)
|
|
714
|
+
pe_helper += round(amounts_mineralogy[mineral][n] * self.data_calcite["PE"], 3)
|
|
715
|
+
elif mineral == "Dol":
|
|
716
|
+
rho_s_helper += round(amounts_mineralogy[mineral][n] * self.data_dolomite["rho"], 3)
|
|
717
|
+
bulkmod_helper += round(amounts_mineralogy[mineral][n] * self.data_dolomite["K"], 3)
|
|
718
|
+
shearmod_helper += round(
|
|
719
|
+
shear_factor * amounts_mineralogy[mineral][n] * self.data_dolomite["G"], 3)
|
|
720
|
+
gr_helper += round(amounts_mineralogy[mineral][n] * self.data_dolomite["GR"], 3)
|
|
721
|
+
pe_helper += round(amounts_mineralogy[mineral][n] * self.data_dolomite["PE"], 3)
|
|
722
|
+
elif mineral == "Mgs":
|
|
723
|
+
rho_s_helper += round(amounts_mineralogy[mineral][n] * self.data_magnesite["rho"], 3)
|
|
724
|
+
bulkmod_helper += round(amounts_mineralogy[mineral][n] * self.data_magnesite["K"], 3)
|
|
725
|
+
shearmod_helper += round(shear_factor * amounts_mineralogy[mineral][n] * self.data_magnesite["G"],
|
|
726
|
+
3)
|
|
727
|
+
gr_helper += round(amounts_mineralogy[mineral][n] * self.data_magnesite["GR"], 3)
|
|
728
|
+
pe_helper += round(amounts_mineralogy[mineral][n] * self.data_magnesite["PE"], 3)
|
|
729
|
+
elif mineral == "Hl":
|
|
730
|
+
rho_s_helper += round(amounts_mineralogy[mineral][n] * self.data_halite["rho"], 3)
|
|
731
|
+
bulkmod_helper += round(amounts_mineralogy[mineral][n] * self.data_halite["K"], 3)
|
|
732
|
+
shearmod_helper += round(
|
|
733
|
+
shear_factor * amounts_mineralogy[mineral][n] * self.data_halite["G"], 3)
|
|
734
|
+
gr_helper += round(amounts_mineralogy[mineral][n] * self.data_halite["GR"], 3)
|
|
735
|
+
pe_helper += round(amounts_mineralogy[mineral][n] * self.data_halite["PE"], 3)
|
|
736
|
+
elif mineral == "Syl":
|
|
737
|
+
rho_s_helper += round(amounts_mineralogy[mineral][n] * self.data_sylvite["rho"], 3)
|
|
738
|
+
bulkmod_helper += round(amounts_mineralogy[mineral][n] * self.data_sylvite["K"], 3)
|
|
739
|
+
shearmod_helper += round(
|
|
740
|
+
shear_factor * amounts_mineralogy[mineral][n] * self.data_sylvite["G"], 3)
|
|
741
|
+
gr_helper += round(amounts_mineralogy[mineral][n] * self.data_sylvite["GR"], 3)
|
|
742
|
+
pe_helper += round(amounts_mineralogy[mineral][n] * self.data_sylvite["PE"], 3)
|
|
743
|
+
#
|
|
744
|
+
rho_helper = round((1 - phi_helper) * rho_s_helper + phi_helper * self.data_water[2] / 1000, 3)
|
|
745
|
+
youngsmod_helper = round(
|
|
746
|
+
(9 * bulkmod_helper * shearmod_helper) / (3 * bulkmod_helper + shearmod_helper), 3)
|
|
747
|
+
poisson_helper = round(
|
|
748
|
+
(3 * bulkmod_helper - 2 * shearmod_helper) / (6 * bulkmod_helper + 2 * shearmod_helper), 3)
|
|
749
|
+
vP_helper = round(
|
|
750
|
+
((bulkmod_helper * 10 ** 9 + 4 / 3 * shearmod_helper * 10 ** 9) / (rho_helper)) ** 0.5, 3)
|
|
751
|
+
vS_helper = round(((shearmod_helper * 10 ** 9) / (rho_helper)) ** 0.5, 3)
|
|
752
|
+
vPvS_helper_helper = round(vP_helper / vS_helper, 3)
|
|
753
|
+
#
|
|
754
|
+
bulk_properties["rho_s"].append(round(rho_s_helper, 3))
|
|
755
|
+
bulk_properties["rho"].append(rho_helper)
|
|
756
|
+
bulk_properties["K"].append(round(bulkmod_helper, 3))
|
|
757
|
+
bulk_properties["G"].append(round(shearmod_helper, 3))
|
|
758
|
+
bulk_properties["E"].append(youngsmod_helper)
|
|
759
|
+
bulk_properties["nu"].append(poisson_helper)
|
|
760
|
+
bulk_properties["vP"].append(vP_helper)
|
|
761
|
+
bulk_properties["vS"].append(vS_helper)
|
|
762
|
+
bulk_properties["vPvS"].append(vPvS_helper_helper)
|
|
763
|
+
bulk_properties["GR"].append(round(gr_helper, 3))
|
|
764
|
+
bulk_properties["PE"].append(round(pe_helper, 3))
|
|
765
|
+
bulk_properties["phi"].append(round(phi_helper, 3))
|
|
766
|
+
n += 1
|
|
767
|
+
#
|
|
768
|
+
results = {}
|
|
769
|
+
results["rock"] = "Anhydrite"
|
|
770
|
+
if number > 1:
|
|
771
|
+
results["mineralogy"] = amounts_mineralogy
|
|
772
|
+
results["chemistry"] = amounts_chemistry
|
|
773
|
+
results["phi"] = bulk_properties["phi"]
|
|
774
|
+
results["fluid"] = "water"
|
|
775
|
+
results["rho_s"] = bulk_properties["rho_s"]
|
|
776
|
+
results["rho"] = bulk_properties["rho"]
|
|
777
|
+
results["vP"] = bulk_properties["vP"]
|
|
778
|
+
results["vS"] = bulk_properties["vS"]
|
|
779
|
+
results["vP/vS"] = bulk_properties["vPvS"]
|
|
780
|
+
results["K"] = bulk_properties["K"]
|
|
781
|
+
results["G"] = bulk_properties["G"]
|
|
782
|
+
results["E"] = bulk_properties["E"]
|
|
783
|
+
results["nu"] = bulk_properties["nu"]
|
|
784
|
+
results["GR"] = bulk_properties["GR"]
|
|
785
|
+
results["PE"] = bulk_properties["PE"]
|
|
786
|
+
else:
|
|
787
|
+
single_amounts_mineralogy = {}
|
|
788
|
+
single_amounts_chemistry = {}
|
|
789
|
+
for mineral, value in amounts_mineralogy.items():
|
|
790
|
+
single_amounts_mineralogy[mineral] = value[0]
|
|
791
|
+
for element, value in amounts_chemistry.items():
|
|
792
|
+
single_amounts_chemistry[element] = value[0]
|
|
793
|
+
results["mineralogy"] = single_amounts_mineralogy
|
|
794
|
+
results["chemistry"] = single_amounts_chemistry
|
|
795
|
+
results["phi"] = bulk_properties["phi"][0]
|
|
796
|
+
results["fluid"] = "water"
|
|
797
|
+
results["rho_s"] = bulk_properties["rho_s"][0]
|
|
798
|
+
results["rho"] = bulk_properties["rho"][0]
|
|
799
|
+
results["vP"] = bulk_properties["vP"][0]
|
|
800
|
+
results["vS"] = bulk_properties["vS"][0]
|
|
801
|
+
results["vP/vS"] = bulk_properties["vPvS"][0]
|
|
802
|
+
results["K"] = bulk_properties["K"][0]
|
|
803
|
+
results["G"] = bulk_properties["G"][0]
|
|
804
|
+
results["E"] = bulk_properties["E"][0]
|
|
805
|
+
results["nu"] = bulk_properties["nu"][0]
|
|
806
|
+
results["GR"] = bulk_properties["GR"][0]
|
|
807
|
+
results["PE"] = bulk_properties["PE"][0]
|
|
808
|
+
#
|
|
809
|
+
return results
|
|
810
|
+
#
|
|
811
|
+
def create_anhydrite_rock(self, number=1, composition=None, porosity=None):
|
|
812
|
+
#
|
|
813
|
+
mineralogy = {"Anh": self.data_anhydrite, "Cal": self.data_calcite, "Dol": self.data_dolomite,
|
|
814
|
+
"Mgs": self.data_magnesite, "Hl": self.data_halite, "Syl": self.data_sylvite}
|
|
815
|
+
#
|
|
816
|
+
condition = False
|
|
817
|
+
#
|
|
818
|
+
while condition == False:
|
|
819
|
+
elements_list = []
|
|
820
|
+
phi_minerals = {}
|
|
821
|
+
w_minerals = {}
|
|
822
|
+
w_elements = {}
|
|
823
|
+
#
|
|
824
|
+
if composition != None:
|
|
825
|
+
phi_anh = composition["Anh"]
|
|
826
|
+
phi_cal = composition["Cal"]
|
|
827
|
+
phi_dol = composition["Dol"]
|
|
828
|
+
phi_mgs = composition["Mgs"]
|
|
829
|
+
phi_hl = composition["Hl"]
|
|
830
|
+
phi_syl = composition["Syl"]
|
|
831
|
+
#
|
|
832
|
+
phi_minerals["Anh"] = phi_anh
|
|
833
|
+
phi_minerals["Cal"] = phi_cal
|
|
834
|
+
phi_minerals["Dol"] = phi_dol
|
|
835
|
+
phi_minerals["Mgs"] = phi_mgs
|
|
836
|
+
phi_minerals["Hl"] = phi_hl
|
|
837
|
+
phi_minerals["Syl"] = phi_syl
|
|
838
|
+
else:
|
|
839
|
+
condition_2 = False
|
|
840
|
+
while condition_2 == False:
|
|
841
|
+
phi_anh = round(rd.uniform(0.67, 1.0), 4)
|
|
842
|
+
phi_cal = round(rd.uniform(0.0, (1.0 - phi_anh)), 4)
|
|
843
|
+
phi_dol = round(rd.uniform(0.0, (1.0 - phi_anh - phi_cal)), 4)
|
|
844
|
+
phi_mgs = round(rd.uniform(0.0, (1.0 - phi_anh - phi_cal - phi_dol)), 4)
|
|
845
|
+
phi_hl = round(rd.uniform(0.0, (1.0 - phi_anh - phi_cal- phi_dol - phi_mgs)), 4)
|
|
846
|
+
phi_syl = round(1 - phi_anh - phi_cal - phi_dol - phi_mgs - phi_hl, 4)
|
|
847
|
+
phi_total = phi_anh + phi_cal + phi_dol + phi_mgs + phi_hl + phi_syl
|
|
848
|
+
#
|
|
849
|
+
if np.isclose(phi_total, 1.0000) == True:
|
|
850
|
+
if 0.67 <= phi_anh <= 1.0 and 0.0 <= phi_cal <= 0.2 and 0.0 <= phi_dol <= 0.2 \
|
|
851
|
+
and 0.0 <= phi_mgs <= 0.1 and 0.0 <= phi_hl <= 0.05 and 0.0 <= phi_syl <= 0.05:
|
|
852
|
+
condition_2 = True
|
|
853
|
+
#
|
|
854
|
+
phi_minerals["Anh"] = phi_anh
|
|
855
|
+
phi_minerals["Cal"] = phi_cal
|
|
856
|
+
phi_minerals["Dol"] = phi_dol
|
|
857
|
+
phi_minerals["Mgs"] = phi_mgs
|
|
858
|
+
phi_minerals["Hl"] = phi_hl
|
|
859
|
+
phi_minerals["Syl"] = phi_syl
|
|
860
|
+
#
|
|
861
|
+
rho_s = 0
|
|
862
|
+
for key, value in phi_minerals.items():
|
|
863
|
+
rho_s += phi_minerals[key] * mineralogy[key]["rho"]
|
|
864
|
+
for element, value in mineralogy[key]["chemistry"].items():
|
|
865
|
+
if element not in elements_list:
|
|
866
|
+
elements_list.append(element)
|
|
867
|
+
w_elements[element] = 0.0
|
|
868
|
+
rho_s = round(rho_s, 3)
|
|
869
|
+
for key, value in phi_minerals.items():
|
|
870
|
+
w_minerals[key] = round((phi_minerals[key] * mineralogy[key]["rho"]) / rho_s, 4)
|
|
871
|
+
#
|
|
872
|
+
if porosity == None:
|
|
873
|
+
phi = round(rd.uniform(0.1, 0.4), 4)
|
|
874
|
+
else:
|
|
875
|
+
phi = round(rd.uniform(porosity[0], porosity[1]), 4)
|
|
876
|
+
rho = round((1 - phi) * rho_s + phi * self.data_water[2] / 1000, 3)
|
|
877
|
+
#
|
|
878
|
+
old_index = elements_list.index("O")
|
|
879
|
+
elements_list += [elements_list.pop(old_index)]
|
|
880
|
+
#
|
|
881
|
+
w_elements_total = 0.0
|
|
882
|
+
for element in elements_list:
|
|
883
|
+
if element != "O":
|
|
884
|
+
for mineral, w_mineral in w_minerals.items():
|
|
885
|
+
if element in mineralogy[mineral]["chemistry"]:
|
|
886
|
+
value = round(w_mineral * mineralogy[mineral]["chemistry"][element], 4)
|
|
887
|
+
w_elements[element] += value
|
|
888
|
+
w_elements_total += value
|
|
889
|
+
#
|
|
890
|
+
w_elements[element] = round(w_elements[element], 4)
|
|
891
|
+
elif element == "O":
|
|
892
|
+
w_elements[element] += round(1 - w_elements_total, 4)
|
|
893
|
+
#
|
|
894
|
+
w_elements[element] = round(w_elements[element], 4)
|
|
895
|
+
#
|
|
896
|
+
if sum(w_minerals.values()) == 1.0 and sum(w_elements.values()) == 1.0:
|
|
897
|
+
condition = True
|
|
898
|
+
#
|
|
899
|
+
bulk_mod = 0.0
|
|
900
|
+
shear_mod = 0.0
|
|
901
|
+
gamma_ray = 0.0
|
|
902
|
+
photoelectricity = 0.0
|
|
903
|
+
for key, value in phi_minerals.items():
|
|
904
|
+
bulk_mod += phi_minerals[key] * mineralogy[key]["K"]
|
|
905
|
+
shear_mod += phi_minerals[key] * mineralogy[key]["G"]
|
|
906
|
+
gamma_ray += phi_minerals[key] * mineralogy[key]["GR"]
|
|
907
|
+
photoelectricity += phi_minerals[key] * mineralogy[key]["PE"]
|
|
908
|
+
#
|
|
909
|
+
bulk_mod = round(bulk_mod, 3)
|
|
910
|
+
shear_mod = round(shear_mod, 3)
|
|
911
|
+
gamma_ray = round(gamma_ray, 3)
|
|
912
|
+
photoelectricity = round(photoelectricity, 3)
|
|
913
|
+
#
|
|
914
|
+
youngs_mod = round((9 * bulk_mod * shear_mod) / (3 * bulk_mod + shear_mod), 3)
|
|
915
|
+
poisson_rat = round((3 * bulk_mod - 2 * shear_mod) / (6 * bulk_mod + 2 * shear_mod), 4)
|
|
916
|
+
vP = round(((bulk_mod * 10 ** 9 + 4 / 3 * shear_mod * 10 ** 9) / (rho)) ** 0.5, 3)
|
|
917
|
+
vS = round(((shear_mod * 10 ** 9) / (rho)) ** 0.5, 3)
|
|
918
|
+
vPvS = round(vP / vS, 3)
|
|
919
|
+
#
|
|
920
|
+
results = {}
|
|
921
|
+
results["rock"] = "Anhydrite"
|
|
922
|
+
if number > 1:
|
|
923
|
+
results["mineralogy"] = w_minerals
|
|
924
|
+
results["chemistry"] = w_elements
|
|
925
|
+
results["phi"] = phi
|
|
926
|
+
results["fluid"] = "water"
|
|
927
|
+
results["rho_s"] = rho_s
|
|
928
|
+
results["rho"] = rho
|
|
929
|
+
results["vP"] = vP
|
|
930
|
+
results["vS"] = vS
|
|
931
|
+
results["vP/vS"] = vPvS
|
|
932
|
+
results["K"] = bulk_mod
|
|
933
|
+
results["G"] = shear_mod
|
|
934
|
+
results["E"] = youngs_mod
|
|
935
|
+
results["nu"] = poisson_rat
|
|
936
|
+
results["GR"] = gamma_ray
|
|
937
|
+
results["PE"] = photoelectricity
|
|
938
|
+
else:
|
|
939
|
+
single_amounts_mineralogy = {}
|
|
940
|
+
single_amounts_chemistry = {}
|
|
941
|
+
for mineral, value in w_minerals.items():
|
|
942
|
+
single_amounts_mineralogy[mineral] = value
|
|
943
|
+
for element, value in w_elements.items():
|
|
944
|
+
single_amounts_chemistry[element] = value
|
|
945
|
+
results["mineralogy"] = single_amounts_mineralogy
|
|
946
|
+
results["chemistry"] = single_amounts_chemistry
|
|
947
|
+
results["phi"] = phi
|
|
948
|
+
results["fluid"] = "water"
|
|
949
|
+
results["rho_s"] = rho_s
|
|
950
|
+
results["rho"] = rho
|
|
951
|
+
results["vP"] = vP
|
|
952
|
+
results["vS"] = vS
|
|
953
|
+
results["vP/vS"] = vPvS
|
|
954
|
+
results["K"] = bulk_mod
|
|
955
|
+
results["G"] = shear_mod
|
|
956
|
+
results["E"] = youngs_mod
|
|
957
|
+
results["nu"] = poisson_rat
|
|
958
|
+
results["GR"] = gamma_ray
|
|
959
|
+
results["PE"] = photoelectricity
|
|
960
|
+
#
|
|
961
|
+
return results
|
|
962
|
+
#
|
|
963
|
+
def create_rocksalt(self, number=1, composition=None, porosity=None):
|
|
964
|
+
#
|
|
965
|
+
mineralogy = {"Anh": self.data_anhydrite, "Cal": self.data_calcite, "Dol": self.data_dolomite,
|
|
966
|
+
"Mgs": self.data_magnesite, "Hl": self.data_halite, "Syl": self.data_sylvite}
|
|
967
|
+
#
|
|
968
|
+
condition = False
|
|
969
|
+
#
|
|
970
|
+
while condition == False:
|
|
971
|
+
elements_list = []
|
|
972
|
+
phi_minerals = {}
|
|
973
|
+
w_minerals = {}
|
|
974
|
+
w_elements = {}
|
|
975
|
+
#
|
|
976
|
+
if composition != None:
|
|
977
|
+
phi_anh = composition["Anh"]
|
|
978
|
+
phi_cal = composition["Cal"]
|
|
979
|
+
phi_dol = composition["Dol"]
|
|
980
|
+
phi_mgs = composition["Mgs"]
|
|
981
|
+
phi_hl = composition["Hl"]
|
|
982
|
+
phi_syl = composition["Syl"]
|
|
983
|
+
#
|
|
984
|
+
phi_minerals["Anh"] = phi_anh
|
|
985
|
+
phi_minerals["Cal"] = phi_cal
|
|
986
|
+
phi_minerals["Dol"] = phi_dol
|
|
987
|
+
phi_minerals["Mgs"] = phi_mgs
|
|
988
|
+
phi_minerals["Hl"] = phi_hl
|
|
989
|
+
phi_minerals["Syl"] = phi_syl
|
|
990
|
+
else:
|
|
991
|
+
condition_2 = False
|
|
992
|
+
while condition_2 == False:
|
|
993
|
+
phi_hl = round(rd.uniform(0.75, 1.0), 4)
|
|
994
|
+
phi_cal = round(rd.uniform(0.0, (1.0 - phi_hl)), 4)
|
|
995
|
+
phi_dol = round(rd.uniform(0.0, (1.0 - phi_hl - phi_cal)), 4)
|
|
996
|
+
phi_mgs = round(rd.uniform(0.0, (1.0 - phi_hl - phi_cal - phi_dol)), 4)
|
|
997
|
+
phi_anh = round(rd.uniform(0.0, (1.0 - phi_hl - phi_cal - phi_dol - phi_mgs)), 4)
|
|
998
|
+
phi_syl = round(1 - phi_hl - phi_cal - phi_dol - phi_mgs - phi_anh, 4)
|
|
999
|
+
phi_total = phi_hl + phi_cal + phi_dol + phi_mgs + phi_anh + phi_syl
|
|
1000
|
+
#
|
|
1001
|
+
if np.isclose(phi_total, 1.0000) == True:
|
|
1002
|
+
if 0.67 <= phi_hl <= 1.0 and 0.0 <= phi_cal <= 0.2 and 0.0 <= phi_dol <= 0.2 \
|
|
1003
|
+
and 0.0 <= phi_mgs <= 0.1 and 0.0 <= phi_anh <= 0.05 and 0.0 <= phi_syl <= 0.05:
|
|
1004
|
+
condition_2 = True
|
|
1005
|
+
#
|
|
1006
|
+
phi_minerals["Anh"] = phi_anh
|
|
1007
|
+
phi_minerals["Cal"] = phi_cal
|
|
1008
|
+
phi_minerals["Dol"] = phi_dol
|
|
1009
|
+
phi_minerals["Mgs"] = phi_mgs
|
|
1010
|
+
phi_minerals["Hl"] = phi_hl
|
|
1011
|
+
phi_minerals["Syl"] = phi_syl
|
|
1012
|
+
#
|
|
1013
|
+
rho_s = 0
|
|
1014
|
+
for key, value in phi_minerals.items():
|
|
1015
|
+
rho_s += phi_minerals[key] * mineralogy[key]["rho"]
|
|
1016
|
+
for element, value in mineralogy[key]["chemistry"].items():
|
|
1017
|
+
if element not in elements_list:
|
|
1018
|
+
elements_list.append(element)
|
|
1019
|
+
w_elements[element] = 0.0
|
|
1020
|
+
rho_s = round(rho_s, 3)
|
|
1021
|
+
for key, value in phi_minerals.items():
|
|
1022
|
+
w_minerals[key] = round((phi_minerals[key] * mineralogy[key]["rho"]) / rho_s, 4)
|
|
1023
|
+
#
|
|
1024
|
+
if porosity == None:
|
|
1025
|
+
phi = round(rd.uniform(0.1, 0.4), 4)
|
|
1026
|
+
else:
|
|
1027
|
+
phi = round(rd.uniform(porosity[0], porosity[1]), 4)
|
|
1028
|
+
rho = round((1 - phi) * rho_s + phi * self.data_water[2] / 1000, 3)
|
|
1029
|
+
#
|
|
1030
|
+
old_index = elements_list.index("O")
|
|
1031
|
+
elements_list += [elements_list.pop(old_index)]
|
|
1032
|
+
#
|
|
1033
|
+
w_elements_total = 0.0
|
|
1034
|
+
for element in elements_list:
|
|
1035
|
+
if element != "O":
|
|
1036
|
+
for mineral, w_mineral in w_minerals.items():
|
|
1037
|
+
if element in mineralogy[mineral]["chemistry"]:
|
|
1038
|
+
value = round(w_mineral * mineralogy[mineral]["chemistry"][element], 4)
|
|
1039
|
+
w_elements[element] += value
|
|
1040
|
+
w_elements_total += value
|
|
1041
|
+
#
|
|
1042
|
+
w_elements[element] = round(w_elements[element], 4)
|
|
1043
|
+
elif element == "O":
|
|
1044
|
+
w_elements[element] += round(1 - w_elements_total, 4)
|
|
1045
|
+
#
|
|
1046
|
+
w_elements[element] = round(w_elements[element], 4)
|
|
1047
|
+
#
|
|
1048
|
+
if sum(w_minerals.values()) == 1.0 and sum(w_elements.values()) == 1.0:
|
|
1049
|
+
condition = True
|
|
1050
|
+
#
|
|
1051
|
+
bulk_mod = 0.0
|
|
1052
|
+
shear_mod = 0.0
|
|
1053
|
+
gamma_ray = 0.0
|
|
1054
|
+
photoelectricity = 0.0
|
|
1055
|
+
for key, value in phi_minerals.items():
|
|
1056
|
+
bulk_mod += phi_minerals[key] * mineralogy[key]["K"]
|
|
1057
|
+
shear_mod += phi_minerals[key] * mineralogy[key]["G"]
|
|
1058
|
+
gamma_ray += phi_minerals[key] * mineralogy[key]["GR"]
|
|
1059
|
+
photoelectricity += phi_minerals[key] * mineralogy[key]["PE"]
|
|
1060
|
+
#
|
|
1061
|
+
bulk_mod = round(bulk_mod, 3)
|
|
1062
|
+
shear_mod = round(shear_mod, 3)
|
|
1063
|
+
gamma_ray = round(gamma_ray, 3)
|
|
1064
|
+
photoelectricity = round(photoelectricity, 3)
|
|
1065
|
+
#
|
|
1066
|
+
youngs_mod = round((9 * bulk_mod * shear_mod) / (3 * bulk_mod + shear_mod), 3)
|
|
1067
|
+
poisson_rat = round((3 * bulk_mod - 2 * shear_mod) / (6 * bulk_mod + 2 * shear_mod), 4)
|
|
1068
|
+
vP = round(((bulk_mod * 10 ** 9 + 4 / 3 * shear_mod * 10 ** 9) / (rho)) ** 0.5, 3)
|
|
1069
|
+
vS = round(((shear_mod * 10 ** 9) / (rho)) ** 0.5, 3)
|
|
1070
|
+
vPvS = round(vP / vS, 3)
|
|
1071
|
+
#
|
|
1072
|
+
results = {}
|
|
1073
|
+
results["rock"] = "Rock Salt"
|
|
1074
|
+
if number > 1:
|
|
1075
|
+
results["mineralogy"] = w_minerals
|
|
1076
|
+
results["chemistry"] = w_elements
|
|
1077
|
+
results["phi"] = phi
|
|
1078
|
+
results["fluid"] = "water"
|
|
1079
|
+
results["rho_s"] = rho_s
|
|
1080
|
+
results["rho"] = rho
|
|
1081
|
+
results["vP"] = vP
|
|
1082
|
+
results["vS"] = vS
|
|
1083
|
+
results["vP/vS"] = vPvS
|
|
1084
|
+
results["K"] = bulk_mod
|
|
1085
|
+
results["G"] = shear_mod
|
|
1086
|
+
results["E"] = youngs_mod
|
|
1087
|
+
results["nu"] = poisson_rat
|
|
1088
|
+
results["GR"] = gamma_ray
|
|
1089
|
+
results["PE"] = photoelectricity
|
|
1090
|
+
else:
|
|
1091
|
+
single_amounts_mineralogy = {}
|
|
1092
|
+
single_amounts_chemistry = {}
|
|
1093
|
+
for mineral, value in w_minerals.items():
|
|
1094
|
+
single_amounts_mineralogy[mineral] = value
|
|
1095
|
+
for element, value in w_elements.items():
|
|
1096
|
+
single_amounts_chemistry[element] = value
|
|
1097
|
+
results["mineralogy"] = single_amounts_mineralogy
|
|
1098
|
+
results["chemistry"] = single_amounts_chemistry
|
|
1099
|
+
results["phi"] = phi
|
|
1100
|
+
results["fluid"] = "water"
|
|
1101
|
+
results["rho_s"] = rho_s
|
|
1102
|
+
results["rho"] = rho
|
|
1103
|
+
results["vP"] = vP
|
|
1104
|
+
results["vS"] = vS
|
|
1105
|
+
results["vP/vS"] = vPvS
|
|
1106
|
+
results["K"] = bulk_mod
|
|
1107
|
+
results["G"] = shear_mod
|
|
1108
|
+
results["E"] = youngs_mod
|
|
1109
|
+
results["nu"] = poisson_rat
|
|
1110
|
+
results["GR"] = gamma_ray
|
|
1111
|
+
results["PE"] = photoelectricity
|
|
1112
|
+
#
|
|
1113
|
+
return results
|
|
1114
|
+
#
|
|
1115
|
+
def create_potash(self, number=1, composition=None, porosity=None, dominance=None):
|
|
1116
|
+
#
|
|
1117
|
+
mineralogy = {"Hl": self.data_halite, "Syl": self.data_sylvite, "Car": self.data_carnallite,
|
|
1118
|
+
"Ka": self.data_kainite, "Kie": self.data_kieserite}
|
|
1119
|
+
#
|
|
1120
|
+
condition = False
|
|
1121
|
+
#
|
|
1122
|
+
while condition == False:
|
|
1123
|
+
elements_list = []
|
|
1124
|
+
phi_minerals = {}
|
|
1125
|
+
w_minerals = {}
|
|
1126
|
+
w_elements = {}
|
|
1127
|
+
#
|
|
1128
|
+
if composition != None:
|
|
1129
|
+
phi_hl = composition["Hl"]
|
|
1130
|
+
phi_syl = composition["Syl"]
|
|
1131
|
+
phi_car = composition["Car"]
|
|
1132
|
+
phi_Ka = composition["Ka"]
|
|
1133
|
+
phi_Kie = composition["Kie"]
|
|
1134
|
+
#
|
|
1135
|
+
phi_minerals["Hl"] = phi_hl
|
|
1136
|
+
phi_minerals["Syl"] = phi_syl
|
|
1137
|
+
phi_minerals["Car"] = phi_car
|
|
1138
|
+
phi_minerals["Ka"] = phi_Ka
|
|
1139
|
+
phi_minerals["Kie"] = phi_Kie
|
|
1140
|
+
else:
|
|
1141
|
+
condition_2 = False
|
|
1142
|
+
while condition_2 == False:
|
|
1143
|
+
if dominance == None:
|
|
1144
|
+
phi_hl = round(rd.uniform(0.5, 0.8), 4)
|
|
1145
|
+
phi_syl = round(rd.uniform(0.15, (1.0 - phi_hl)), 4)
|
|
1146
|
+
phi_car = round(rd.uniform(0.0, (1.0 - phi_hl - phi_syl)), 4)
|
|
1147
|
+
phi_Ka = round(rd.uniform(0.0, (1.0 - phi_hl - phi_syl - phi_car)), 4)
|
|
1148
|
+
phi_Kie = round(1 - phi_hl - phi_syl - phi_car - phi_Ka, 4)
|
|
1149
|
+
phi_total = phi_hl + phi_syl + phi_car + phi_Ka + phi_Kie
|
|
1150
|
+
#
|
|
1151
|
+
if np.isclose(phi_total, 1.0000) == True:
|
|
1152
|
+
if 0.5 <= phi_hl <= 0.8 and 0.15 <= phi_syl <= 0.3 and 0.0 <= phi_car <= 0.2 \
|
|
1153
|
+
and 0.0 <= phi_Ka <= 0.2 and 0.0 <= phi_Kie <= 0.2:
|
|
1154
|
+
condition_2 = True
|
|
1155
|
+
elif dominance == "Syl":
|
|
1156
|
+
phi_hl = round(rd.uniform(0.3, 0.6), 4)
|
|
1157
|
+
phi_syl = round(rd.uniform(0.3, (1.0 - phi_hl)), 4)
|
|
1158
|
+
phi_car = round(rd.uniform(0.0, (1.0 - phi_hl - phi_syl)), 4)
|
|
1159
|
+
phi_Ka = round(rd.uniform(0.0, (1.0 - phi_hl - phi_syl - phi_car)), 4)
|
|
1160
|
+
phi_Kie = round(1 - phi_hl - phi_syl - phi_car - phi_Ka, 4)
|
|
1161
|
+
phi_total = phi_hl + phi_syl + phi_car + phi_Ka + phi_Kie
|
|
1162
|
+
#
|
|
1163
|
+
if np.isclose(phi_total, 1.0000) == True:
|
|
1164
|
+
if 0.3 <= phi_hl <= 0.6 and 0.3 <= phi_syl <= 0.6 and 0.0 <= phi_car <= 0.2 \
|
|
1165
|
+
and 0.0 <= phi_Ka <= 0.2 and 0.0 <= phi_Kie <= 0.2:
|
|
1166
|
+
condition_2 = True
|
|
1167
|
+
elif dominance == "Kie":
|
|
1168
|
+
phi_hl = round(rd.uniform(0.3, 0.6), 4)
|
|
1169
|
+
phi_syl = round(rd.uniform(0.0, (1.0 - phi_hl)), 4)
|
|
1170
|
+
phi_car = round(rd.uniform(0.0, (1.0 - phi_hl - phi_syl)), 4)
|
|
1171
|
+
phi_Ka = round(rd.uniform(0.0, (1.0 - phi_hl - phi_syl - phi_car)), 4)
|
|
1172
|
+
phi_Kie = round(1 - phi_hl - phi_syl - phi_car - phi_Ka, 4)
|
|
1173
|
+
phi_total = phi_hl + phi_syl + phi_car + phi_Ka + phi_Kie
|
|
1174
|
+
#
|
|
1175
|
+
if np.isclose(phi_total, 1.0000) == True:
|
|
1176
|
+
if 0.3 <= phi_hl <= 0.6 and 0.0 <= phi_syl <= 0.2 and 0.0 <= phi_car <= 0.2 \
|
|
1177
|
+
and 0.0 <= phi_Ka <= 0.2 and 0.3 <= phi_Kie <= 0.6:
|
|
1178
|
+
condition_2 = True
|
|
1179
|
+
elif dominance == "Car":
|
|
1180
|
+
phi_hl = round(rd.uniform(0.3, 0.6), 4)
|
|
1181
|
+
phi_syl = round(rd.uniform(0.0, (1.0 - phi_hl)), 4)
|
|
1182
|
+
phi_car = round(rd.uniform(0.3, (1.0 - phi_hl - phi_syl)), 4)
|
|
1183
|
+
phi_Ka = round(rd.uniform(0.0, (1.0 - phi_hl - phi_syl - phi_car)), 4)
|
|
1184
|
+
phi_Kie = round(1 - phi_hl - phi_syl - phi_car - phi_Ka, 4)
|
|
1185
|
+
phi_total = phi_hl + phi_syl + phi_car + phi_Ka + phi_Kie
|
|
1186
|
+
#
|
|
1187
|
+
if np.isclose(phi_total, 1.0000) == True:
|
|
1188
|
+
if 0.3 <= phi_hl <= 0.6 and 0.0 <= phi_syl <= 0.2 and 0.3 <= phi_car <= 0.6 \
|
|
1189
|
+
and 0.0 <= phi_Ka <= 0.2 and 0.3 <= phi_Kie <= 0.2:
|
|
1190
|
+
condition_2 = True
|
|
1191
|
+
#
|
|
1192
|
+
phi_minerals["Hl"] = phi_hl
|
|
1193
|
+
phi_minerals["Syl"] = phi_syl
|
|
1194
|
+
phi_minerals["Car"] = phi_car
|
|
1195
|
+
phi_minerals["Ka"] = phi_Ka
|
|
1196
|
+
phi_minerals["Kie"] = phi_Kie
|
|
1197
|
+
#
|
|
1198
|
+
rho_s = 0
|
|
1199
|
+
for key, value in phi_minerals.items():
|
|
1200
|
+
rho_s += phi_minerals[key] * mineralogy[key]["rho"]
|
|
1201
|
+
for element, value in mineralogy[key]["chemistry"].items():
|
|
1202
|
+
if element not in elements_list:
|
|
1203
|
+
elements_list.append(element)
|
|
1204
|
+
w_elements[element] = 0.0
|
|
1205
|
+
rho_s = round(rho_s, 3)
|
|
1206
|
+
for key, value in phi_minerals.items():
|
|
1207
|
+
w_minerals[key] = round((phi_minerals[key] * mineralogy[key]["rho"]) / rho_s, 4)
|
|
1208
|
+
#
|
|
1209
|
+
if porosity == None:
|
|
1210
|
+
phi = round(rd.uniform(0.1, 0.4), 4)
|
|
1211
|
+
else:
|
|
1212
|
+
phi = round(rd.uniform(porosity[0], porosity[1]), 4)
|
|
1213
|
+
rho = round((1 - phi) * rho_s + phi * self.data_water[2] / 1000, 3)
|
|
1214
|
+
#
|
|
1215
|
+
old_index = elements_list.index("O")
|
|
1216
|
+
elements_list += [elements_list.pop(old_index)]
|
|
1217
|
+
#
|
|
1218
|
+
w_elements_total = 0.0
|
|
1219
|
+
for element in elements_list:
|
|
1220
|
+
if element != "O":
|
|
1221
|
+
for mineral, w_mineral in w_minerals.items():
|
|
1222
|
+
if element in mineralogy[mineral]["chemistry"]:
|
|
1223
|
+
value = round(w_mineral * mineralogy[mineral]["chemistry"][element], 4)
|
|
1224
|
+
w_elements[element] += value
|
|
1225
|
+
w_elements_total += value
|
|
1226
|
+
#
|
|
1227
|
+
w_elements[element] = round(w_elements[element], 4)
|
|
1228
|
+
elif element == "O":
|
|
1229
|
+
w_elements[element] += round(1 - w_elements_total, 4)
|
|
1230
|
+
#
|
|
1231
|
+
w_elements[element] = round(w_elements[element], 4)
|
|
1232
|
+
#
|
|
1233
|
+
if sum(w_minerals.values()) == 1.0 and sum(w_elements.values()) == 1.0:
|
|
1234
|
+
condition = True
|
|
1235
|
+
#
|
|
1236
|
+
bulk_mod = 0.0
|
|
1237
|
+
shear_mod = 0.0
|
|
1238
|
+
gamma_ray = 0.0
|
|
1239
|
+
photoelectricity = 0.0
|
|
1240
|
+
for key, value in phi_minerals.items():
|
|
1241
|
+
bulk_mod += phi_minerals[key] * mineralogy[key]["K"]
|
|
1242
|
+
shear_mod += phi_minerals[key] * mineralogy[key]["G"]
|
|
1243
|
+
gamma_ray += phi_minerals[key] * mineralogy[key]["GR"]
|
|
1244
|
+
photoelectricity += phi_minerals[key] * mineralogy[key]["PE"]
|
|
1245
|
+
#
|
|
1246
|
+
bulk_mod = round(bulk_mod, 3)
|
|
1247
|
+
shear_mod = round(shear_mod, 3)
|
|
1248
|
+
gamma_ray = round(gamma_ray, 3)
|
|
1249
|
+
photoelectricity = round(photoelectricity, 3)
|
|
1250
|
+
#
|
|
1251
|
+
youngs_mod = round((9 * bulk_mod * shear_mod) / (3 * bulk_mod + shear_mod), 3)
|
|
1252
|
+
poisson_rat = round((3 * bulk_mod - 2 * shear_mod) / (6 * bulk_mod + 2 * shear_mod), 4)
|
|
1253
|
+
vP = round(((bulk_mod * 10 ** 9 + 4 / 3 * shear_mod * 10 ** 9) / (rho)) ** 0.5, 3)
|
|
1254
|
+
vS = round(((shear_mod * 10 ** 9) / (rho)) ** 0.5, 3)
|
|
1255
|
+
vPvS = round(vP / vS, 3)
|
|
1256
|
+
#
|
|
1257
|
+
results = {}
|
|
1258
|
+
results["rock"] = "Potash"
|
|
1259
|
+
if number > 1:
|
|
1260
|
+
results["mineralogy"] = w_minerals
|
|
1261
|
+
results["chemistry"] = w_elements
|
|
1262
|
+
results["phi"] = phi
|
|
1263
|
+
results["fluid"] = "water"
|
|
1264
|
+
results["rho_s"] = rho_s
|
|
1265
|
+
results["rho"] = rho
|
|
1266
|
+
results["vP"] = vP
|
|
1267
|
+
results["vS"] = vS
|
|
1268
|
+
results["vP/vS"] = vPvS
|
|
1269
|
+
results["K"] = bulk_mod
|
|
1270
|
+
results["G"] = shear_mod
|
|
1271
|
+
results["E"] = youngs_mod
|
|
1272
|
+
results["nu"] = poisson_rat
|
|
1273
|
+
results["GR"] = gamma_ray
|
|
1274
|
+
results["PE"] = photoelectricity
|
|
1275
|
+
else:
|
|
1276
|
+
single_amounts_mineralogy = {}
|
|
1277
|
+
single_amounts_chemistry = {}
|
|
1278
|
+
for mineral, value in w_minerals.items():
|
|
1279
|
+
single_amounts_mineralogy[mineral] = value
|
|
1280
|
+
for element, value in w_elements.items():
|
|
1281
|
+
single_amounts_chemistry[element] = value
|
|
1282
|
+
results["mineralogy"] = single_amounts_mineralogy
|
|
1283
|
+
results["chemistry"] = single_amounts_chemistry
|
|
1284
|
+
results["phi"] = phi
|
|
1285
|
+
results["fluid"] = "water"
|
|
1286
|
+
results["rho_s"] = rho_s
|
|
1287
|
+
results["rho"] = rho
|
|
1288
|
+
results["vP"] = vP
|
|
1289
|
+
results["vS"] = vS
|
|
1290
|
+
results["vP/vS"] = vPvS
|
|
1291
|
+
results["K"] = bulk_mod
|
|
1292
|
+
results["G"] = shear_mod
|
|
1293
|
+
results["E"] = youngs_mod
|
|
1294
|
+
results["nu"] = poisson_rat
|
|
1295
|
+
results["GR"] = gamma_ray
|
|
1296
|
+
results["PE"] = photoelectricity
|
|
1297
|
+
#
|
|
1298
|
+
return results
|
|
1299
|
+
#
|