Skip to content

Commit

Permalink
# Added new model for simple geometry examples
Browse files Browse the repository at this point in the history
  • Loading branch information
javoha authored and Alexander G. Zimmerman committed Jul 1, 2020
1 parent fa99b15 commit 11ec393
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 63 deletions.
9 changes: 7 additions & 2 deletions examples/data/input_data/jan_models/model7_orientations.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
X,Y,Z,azimuth,dip,polarity,formation
100,500,550,90,315,1,rock2
100,500,350,90,315,1,rock1
0,500,450,90,335,1,rock2
0,500,250,90,335,1,rock1
0,0,450,90,335,1,rock2
0,0,250,90,335,1,rock1
0,1000,450,90,335,1,rock2
0,1000,250,90,335,1,rock1
500,500,800,90,0,1,rock3
2000,500,400,90,55,1,fault
146 changes: 85 additions & 61 deletions examples/data/input_data/jan_models/model7_surface_points.csv
Original file line number Diff line number Diff line change
@@ -1,79 +1,103 @@
X,Y,Z,formation
0,200,800,rock3
0,0,800,rock3
0,500,800,rock3
0,800,800,rock3
500,200,800,rock3
0,1000,800,rock3
500,0,800,rock3
500,500,800,rock3
500,800,800,rock3
1000,200,800,rock3
500,1000,800,rock3
1000,0,800,rock3
1000,500,800,rock3
1000,800,800,rock3
1500,200,800,rock3
1000,1000,800,rock3
1500,0,800,rock3
1500,500,800,rock3
1500,800,800,rock3
2000,200,800,rock3
2000,500,800,rock3
2000,800,800,rock3
0,200,450,rock2
1500,1000,800,rock3
2000,0,650,rock3
2000,500,650,rock3
2000,1000,650,rock3
0,0,450,rock2
0,500,450,rock2
0,800,450,rock2
150,200,600,rock2
0,1000,450,rock2
150,0,600,rock2
150,500,600,rock2
150,800,600,rock2
300,200,750,rock2
150,1000,600,rock2
300,0,750,rock2
300,500,750,rock2
300,800,750,rock2
450,200,600,rock2
300,1000,750,rock2
450,0,600,rock2
450,500,600,rock2
450,800,600,rock2
600,200,450,rock2
450,1000,600,rock2
600,0,450,rock2
600,500,450,rock2
600,800,450,rock2
850,200,800,rock2
600,1000,450,rock2
750,0,600,rock2
750,500,600,rock2
750,1000,600,rock2
850,0,800,rock2
850,500,800,rock2
850,800,800,rock2
1550,200,800,rock2
1550,500,800,rock2
1550,800,800,rock2
1800,200,450,rock2
1800,500,450,rock2
1800,800,450,rock2
2000,200,650,rock2
2000,500,650,rock2
2000,800,650,rock2
0,200,250,rock1
850,1000,800,rock2
1500,0,800,rock2
1500,500,800,rock2
1500,1000,800,rock2
1600,0,600,rock2
1600,500,600,rock2
1600,1000,600,rock2
1750,0,450,rock2
1750,500,450,rock2
1750,1000,450,rock2
1850,0,550,rock2
1850,500,550,rock2
1850,1000,550,rock2
2200,0,550,rock2
2200,500,550,rock2
2200,1000,550,rock2
2300,0,650,rock2
2300,500,650,rock2
2300,1000,650,rock2
0,0,250,rock1
0,500,250,rock1
0,800,250,rock1
150,200,400,rock1
0,1000,250,rock1
150,0,400,rock1
150,500,400,rock1
150,800,400,rock1
300,200,550,rock1
150,1000,400,rock1
300,0,550,rock1
300,500,550,rock1
300,800,550,rock1
450,200,400,rock1
300,1000,550,rock1
450,0,400,rock1
450,500,400,rock1
450,800,400,rock1
600,200,250,rock1
450,1000,400,rock1
600,0,250,rock1
600,500,250,rock1
600,800,250,rock1
900,200,550,rock1
600,1000,250,rock1
750,0,350,rock1
750,500,350,rock1
750,1000,350,rock1
900,0,550,rock1
900,500,550,rock1
900,800,550,rock1
1500,200,550,rock1
1500,500,550,rock1
1500,800,550,rock1
1800,200,250,rock1
1800,500,250,rock1
1800,800,250,rock1
2000,200,450,rock1
2000,500,450,rock1
2000,800,450,rock1
1050,200,799,rock1
900,1000,550,rock1
1450,0,550,rock1
1450,500,550,rock1
1450,1000,550,rock1
1600,0,350,rock1
1600,500,350,rock1
1600,1000,350,rock1
1750,0,250,rock1
1750,500,250,rock1
1750,1000,250,rock1
1850,0,350,rock1
1850,500,350,rock1
1850,1000,350,rock1
2200,0,350,rock1
2200,500,350,rock1
2200,1000,350,rock1
2300,0,450,rock1
2300,500,450,rock1
2300,1000,450,rock1
1050,0,799,rock1
1050,500,799,rock1
1050,800,799,rock1
1350,200,799,rock1
1350,500,799,rock1
1350,800,799,rock1



1050,1000,799,rock1
1300,0,799,rock1
1300,500,799,rock1
1300,1000,799,rock1
2000,0,400,fault
2000,500,400,fault
2000,1000,400,fault
72 changes: 72 additions & 0 deletions examples/examples/geometries/7_combination.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
"""
Model 7 - Combination
======================
"""

# %%
# A folded domain featuring an unconformity and a fault. We start by importing
# the necessary dependencies:
#

# %%
# Importing GemPy
import gempy as gp

import pandas as pd
pd.set_option('precision', 2)

# %%
# Creating the model by importing the input data and displaying it:
#

# %%
data_path = 'https://raw.githubusercontent.com/cgre-aachen/gempy_data/master/'
path_to_data = data_path + "/data/input_data/jan_models/"

geo_data = gp.create_data('unconformity', extent=[0, 2500, 0, 1000, 0, 1000], resolution=[125, 50, 50],
path_o=path_to_data + "model7_orientations.csv",
path_i=path_to_data + "model7_surface_points.csv")

# %%
geo_data.get_data()

# %%
# Setting and ordering the units and series:
#

# %%
gp.map_stack_to_surfaces(geo_data, {"Fault_Series": ('fault'), "Strat_Series1": ('rock3'),
"Strat_Series2": ('rock2','rock1'),
"Basement_Series":('basement')})

geo_data.set_is_fault(['Fault_Series'])

# %%
gp.plot_2d(geo_data, direction='y')

# %%
# Calculating the model:
#

# %%
interp_data = gp.set_interpolator(geo_data, theano_optimizer='fast_compile')

# %%
sol = gp.compute_model(geo_data)

# %%
# Displaying the result in x and y direction:
#

# %%
gp.plot_2d(geo_data, cell_number=5,
direction='y', show_data=False, show_boundaries=True)

# %%
# sphinx_gallery_thumbnail_number = 2
gp.plot_2d(geo_data, cell_number=5,
direction='x', show_data=True)

# %%
gp.plot_3d(geo_data)

0 comments on commit 11ec393

Please sign in to comment.