.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/geometries/h08_more_examples.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_geometries_h08_more_examples.py: GemPy Models - Some More Complex Examples ----------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 8-9 Importing gempy .. GENERATED FROM PYTHON SOURCE LINES 9-16 .. code-block:: Python import gempy as gp import gempy_viewer as gpv # Aux imports import numpy as np import os .. GENERATED FROM PYTHON SOURCE LINES 17-36 Choose a model and load the corresponding data set in the line below ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Model 1: Discordant layering Model 2: Anticlinal layering Model 3: Parallel steep dipping layers Model 5: Normal faulting Model 6: Synclinal layering Model 7: Graben structure with two faults Model 8: Similar to Model 5 Model 9: Parallel flat dipping layers .. GENERATED FROM PYTHON SOURCE LINES 38-42 .. code-block:: Python data_path = os.path.abspath('../..') .. GENERATED FROM PYTHON SOURCE LINES 43-138 .. code-block:: Python def create_example(name_model, plot_section=True): """ Create an inter_data from one of the examples data_set Attr: name_model (str): name of the model that you want to generate. It has to be in ['Model 1' ,'Model 2', 'Model 3', 'Model 4','Model 5' 'Model 6','Model 7', 'Model 8', 'Model 9'] save_pickle (bool, str): Save to a pickle the interp_data object. You can pass the path as a string otherwse the default name will be given plot_section (bool) """ name_list = np.array(['Model 1', 'Model 2', 'Model 3', 'Model 4', 'Model 5', 'Model 6', 'Model 7', 'Model 8', 'Model 9']) assert name_model in name_list, 'Name model must be in the following list: ' + str(name_list) # Extract number of the model n_model = name_model[-1] # # Load right gempy geodata geo_data: gp.data.GeoModel = gp.create_geomodel( project_name=name_model, extent=[0, 2000, 0, 2000, 0, 1600], resolution=[50, 50, 50], refinement=6, # * For this model is better not to use octrees because we want to see what is happening in the scalar fields importer_helper=gp.data.ImporterHelper( path_to_orientations=data_path + "/data/input_data/lisa_models/foliations" + n_model + ".csv", path_to_surface_points=data_path + "/data/input_data/lisa_models/interfaces" + n_model + ".csv", ) ) # Set the right sequential pile subset_list_1 = np.array(['Model 1']) subset_list_2 = np.array(['Model 5', 'Model 8']) subset_list_3 = np.array(['Model 2', 'Model 3', 'Model 9', 'Model 6']) subset_list_4 = np.array(['Model 7']) ### Model 1 - Discordant layering ### if name_model in subset_list_1: gp.map_stack_to_surfaces( gempy_model=geo_data, mapping_object={ "Strat_Series_1": ('Sandstone', 'Siltstone', 'Shale'), "Strat_Series_2": ('Sandstone2', 'Siltstone2', 'Shale2') }, ) ### Model 5 - One normal Fault ### ### Model 8 - ### elif name_model in subset_list_2: gp.map_stack_to_surfaces( gempy_model=geo_data, mapping_object={ "Fault_Series": 'Main_Fault', "Strat_Series": ('Sandstone', 'Siltstone', 'Shale', 'Sandstone_2', 'Schist', 'Gneiss') }, ) gp.set_is_fault(geo_data, ['Fault_Series']) elif name_model in subset_list_3: ### Model 2 - Aufwölbung (durch Salzstock?) ### ### Model 3+9 - Parallele NNE Schichtung ohne Verwerfung ### ### Model 6 - Mulde ### gp.map_stack_to_surfaces( gempy_model=geo_data, mapping_object={ "Strat_Series": ('Sandstone', 'Siltstone', 'Shale', 'Sandstone_2', 'Schist', 'Gneiss') }, ) elif name_model in subset_list_4: ### Model 7 - Graben ### gp.map_stack_to_surfaces( gempy_model=geo_data, mapping_object={ "Fault_1": 'Fault_1', "Fault_2": 'Fault_2', "Strat_Series": ('Sandstone', 'Siltstone', 'Shale', 'Sandstone_2', 'Schist', 'Gneiss') }, ) gp.set_is_fault(geo_data, ['Fault_1', 'Fault_2']) else: print('You would never reach this point. Look for the bug') # Interpolation and Computation sol = gp.compute_model( gempy_model=geo_data, engine_config=gp.data.GemPyEngineConfig(backend=gp.data.AvailableBackends.PYTORCH) ) if plot_section is True: # 2D Plot gpv.plot_2d(geo_data, cell_number=['mid'], direction='y', show_data=True) gpv.plot_3d(geo_data, image=False) return geo_data.structural_frame .. GENERATED FROM PYTHON SOURCE LINES 139-141 Discordant layering 1 ===================== .. GENERATED FROM PYTHON SOURCE LINES 141-144 .. code-block:: Python create_example('Model 1') .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_001.png :alt: h08 more examples :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_001.png :class: sphx-glr-single-img .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_002.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.PYTORCH .. raw:: html
Structural Groups: StructuralGroup:
Name:Strat_Series_1
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone

StructuralElement:
Name:Siltstone

StructuralElement:
Name:Shale

StructuralGroup:
Name:Strat_Series_2
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone2

StructuralElement:
Name:Siltstone2

StructuralElement:
Name:Shale2
Fault Relations:
Strat_Seri...Strat_Seri...
Strat_Series_1
Strat_Series_2
True
False


.. GENERATED FROM PYTHON SOURCE LINES 145-147 Discordant layering 2 ===================== .. GENERATED FROM PYTHON SOURCE LINES 147-150 .. code-block:: Python create_example('Model 2') .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_003.png :alt: h08 more examples :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_003.png :class: sphx-glr-single-img .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_004.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_004.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.PYTORCH .. raw:: html
Structural Groups: StructuralGroup:
Name:Strat_Series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone

StructuralElement:
Name:Siltstone

StructuralElement:
Name:Shale

StructuralElement:
Name:Sandstone_2

StructuralElement:
Name:Schist

StructuralElement:
Name:Gneiss
Fault Relations:
Strat_Seri...
Strat_Series
True
False


.. GENERATED FROM PYTHON SOURCE LINES 151-153 Discordant layering 3 ===================== .. GENERATED FROM PYTHON SOURCE LINES 153-156 .. code-block:: Python create_example('Model 3') .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_005.png :alt: h08 more examples :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_005.png :class: sphx-glr-single-img .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_006.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_006.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.PYTORCH .. raw:: html
Structural Groups: StructuralGroup:
Name:Strat_Series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone

StructuralElement:
Name:Siltstone

StructuralElement:
Name:Shale

StructuralElement:
Name:Sandstone_2

StructuralElement:
Name:Schist

StructuralElement:
Name:Gneiss
Fault Relations:
Strat_Seri...
Strat_Series
True
False


.. GENERATED FROM PYTHON SOURCE LINES 157-159 One normal Fault 1 ================== .. GENERATED FROM PYTHON SOURCE LINES 159-162 .. code-block:: Python create_example('Model 5') .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_007.png :alt: h08 more examples :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_007.png :class: sphx-glr-single-img .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_008.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_008.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.PYTORCH .. raw:: html
Structural Groups: StructuralGroup:
Name:Fault_Series
Structural Relation:StackRelationType.FAULT
Elements:
StructuralElement:
Name:Main_Fault

StructuralGroup:
Name:Strat_Series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone

StructuralElement:
Name:Siltstone

StructuralElement:
Name:Shale

StructuralElement:
Name:Sandstone_2

StructuralElement:
Name:Schist

StructuralElement:
Name:Gneiss
Fault Relations:
Fault_Seri...Strat_Seri...
Fault_Series
Strat_Series
True
False


.. GENERATED FROM PYTHON SOURCE LINES 163-165 Fold ==== .. GENERATED FROM PYTHON SOURCE LINES 165-168 .. code-block:: Python create_example('Model 6') .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_009.png :alt: h08 more examples :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_009.png :class: sphx-glr-single-img .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_010.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_010.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.PYTORCH .. raw:: html
Structural Groups: StructuralGroup:
Name:Strat_Series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone

StructuralElement:
Name:Siltstone

StructuralElement:
Name:Shale

StructuralElement:
Name:Sandstone_2

StructuralElement:
Name:Schist

StructuralElement:
Name:Gneiss
Fault Relations:
Strat_Seri...
Strat_Series
True
False


.. GENERATED FROM PYTHON SOURCE LINES 169-171 Graben ====== .. GENERATED FROM PYTHON SOURCE LINES 171-174 .. code-block:: Python create_example('Model 7') .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_011.png :alt: h08 more examples :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_011.png :class: sphx-glr-single-img .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_012.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_012.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.PYTORCH .. raw:: html
Structural Groups: StructuralGroup:
Name:Fault_1
Structural Relation:StackRelationType.FAULT
Elements:
StructuralElement:
Name:Fault_1

StructuralGroup:
Name:Fault_2
Structural Relation:StackRelationType.FAULT
Elements:
StructuralElement:
Name:Fault_2

StructuralGroup:
Name:Strat_Series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone

StructuralElement:
Name:Siltstone

StructuralElement:
Name:Shale

StructuralElement:
Name:Sandstone_2

StructuralElement:
Name:Schist

StructuralElement:
Name:Gneiss
Fault Relations:
Fault_1Fault_2Strat_Seri...
Fault_1
Fault_2
Strat_Series
True
False


.. GENERATED FROM PYTHON SOURCE LINES 175-177 One normal Fault 2 =================== .. GENERATED FROM PYTHON SOURCE LINES 177-180 .. code-block:: Python create_example('Model 8') .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_013.png :alt: h08 more examples :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_013.png :class: sphx-glr-single-img .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_014.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_014.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.PYTORCH .. raw:: html
Structural Groups: StructuralGroup:
Name:Fault_Series
Structural Relation:StackRelationType.FAULT
Elements:
StructuralElement:
Name:Main_Fault

StructuralGroup:
Name:Strat_Series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone

StructuralElement:
Name:Siltstone

StructuralElement:
Name:Shale

StructuralElement:
Name:Sandstone_2

StructuralElement:
Name:Schist

StructuralElement:
Name:Gneiss
Fault Relations:
Fault_Seri...Strat_Seri...
Fault_Series
Strat_Series
True
False


.. GENERATED FROM PYTHON SOURCE LINES 181-183 Horizontal tilted ================= .. GENERATED FROM PYTHON SOURCE LINES 183-186 .. code-block:: Python create_example('Model 9') .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_015.png :alt: h08 more examples :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_015.png :class: sphx-glr-single-img .. image-sg:: /examples/geometries/images/sphx_glr_h08_more_examples_016.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_h08_more_examples_016.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.PYTORCH .. raw:: html
Structural Groups: StructuralGroup:
Name:Strat_Series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:Sandstone

StructuralElement:
Name:Siltstone

StructuralElement:
Name:Shale

StructuralElement:
Name:Sandstone_2

StructuralElement:
Name:Schist

StructuralElement:
Name:Gneiss
Fault Relations:
Strat_Seri...
Strat_Series
True
False


.. GENERATED FROM PYTHON SOURCE LINES 187-191 .. code-block:: Python # generate_all_models(['Model 1', 'Model 2', 'Model 3', # 'Model 5', 'Model 6', 'Model 7', # 'Model 8', 'Model 9']) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 10.935 seconds) .. _sphx_glr_download_examples_geometries_h08_more_examples.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: h08_more_examples.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: h08_more_examples.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_