1f. Unconformities#

This tutorial will demonstrate how to add unconformities to a mode using LoopStructural.

from LoopStructural import GeologicalModel
import pandas as pd
import numpy as np
from LoopStructural.visualisation import LavaVuModelViewer

Generate synthetic data#

Model 3 scalar fields where the top is horizontal, the middle is dipping and the bottom is horizontal.

data = pd.DataFrame(
    [
        [0, 0, 3, 0, 0, 0, 1, "unit_a"],
        [0, 0, 1, 1, 0, 0.7, 0.7, "unit_b"],
        [0, 0, 0, 0, 0, 0.7, 0.7, "unit_b"],
        [0, 0, -3, 0, 0, 0, -1, "unit_c"],
    ],
    columns=["X", "Y", "Z", "val", "nx", "ny", "nz", "feature_name"],
)

model = GeologicalModel(np.ones(3) * -5, np.ones(3) * 7)
model.data = data
model.create_and_add_foliation("unit_a")
model.create_and_add_foliation("unit_b")
model.create_and_add_foliation("unit_c")

model.update()
  0%|          | 0/3 [00:00<?, ?it/s]
Interpolating unit_a:   0%|          | 0/3 [00:00<?, ?it/s]
Interpolating unit_b:  33%|███▎      | 1/3 [00:00<00:00, 16.84it/s]
Interpolating unit_b:  67%|██████▋   | 2/3 [00:00<00:00, 16.41it/s]
Interpolating unit_c:  67%|██████▋   | 2/3 [00:00<00:00, 16.41it/s]
Interpolating unit_c: 100%|██████████| 3/3 [00:00<00:00, 16.67it/s]

Visualise the model without unconformities#

view = LavaVuModelViewer(model)
view.add_isosurface(model["unit_a"], nslices=5)
view.add_isosurface(model["unit_b"], nslices=5)
view.add_isosurface(model["unit_c"], nslices=5)
view.camera = {
    "translate": [0.0, 0.0, -20.67],
    "rotate": [-0.562, -0.438, -0.442, 0.544],
    "xyzrotate": [-94.021, -77.018, 2.784],
    "fov": 45.0,
}
view.display()
plot 6 unconformities
lv.translation(0.0, 0.0, -20.67)
lv.rotation(-94.021, -77.018, 2.784)

Add unconformities#

We add two unconformities to the model 1. the isovalue of 0 of unit_a is an unconformity 2. the isovalue of 0 of unit_b is an unconformity

This means unit_a should not occur below isovalue of 0, unit_b should truncate at unit_a isovalue 0 and unit_b should not occur below isovalue of 0 and unit_c should not occur below unit_b isovalue of 0

-----------------------------------------------------
unit_c 1
-----------------------------------------------------
    1 regions
            <bound method BaseFeature.__str__ of -----------------------------------------------------
unit_b_unconformity 7
-----------------------------------------------------
    0 regions
    0 faults.
    Fault enabled True
>
    0 faults.
    Fault enabled True

We can examine the model by printing the object#

print(model)

model.update()
GeologicalModel - 12.0 x 12.0 x 12.0
------------------------------------------
The model contains 5 GeologicalFeatures
------------------------------------------
Model origin: -5.0 -5.0 -5.0
Model maximum: 7.0 7.0 7.0
Model rescale factor: 1.0
------------------------------------------
Feature list:
  unit_a
  unit_a_unconformity
  unit_b
  unit_b_unconformity
  unit_c


  0%|          | 0/3 [00:00<?, ?it/s]
Interpolating unit_a:   0%|          | 0/3 [00:00<?, ?it/s]
Interpolating unit_a_unconformity:  33%|███▎      | 1/3 [00:00<00:00, 17.21it/s]
Interpolating unit_b:  67%|██████▋   | 2/3 [00:00<00:00, 34.35it/s]
Interpolating unit_b: 100%|██████████| 3/3 [00:00<00:00, 24.77it/s]
Interpolating unit_b_unconformity: 100%|██████████| 3/3 [00:00<00:00, 24.77it/s]
Interpolating unit_c: : 4it [00:00, 24.77it/s]
Interpolating unit_c: : 5it [00:00, 27.92it/s]

Visualise the model without unconformities#

view = LavaVuModelViewer(model)
view.add_isosurface(model["unit_a"], nslices=5)
view.add_isosurface(model["unit_b"], nslices=5)
view.add_isosurface(model["unit_c"], nslices=5)
view.camera = {
    "translate": [0.0, 0.0, -20.67],
    "rotate": [-0.562, -0.438, -0.442, 0.544],
    "xyzrotate": [-94.021, -77.018, 2.784],
    "fov": 45.0,
}
view.display()
plot 6 unconformities
lv.translation(0.0, 0.0, -20.67)
lv.rotation(-94.021, -77.018, 2.784)

Adding onlap unconformity#

We can also add onlap unconformities to the model, using the previous example lets change the unconformity between b and c to be an onlap. This means the geometry of c truncates b

  0%|          | 0/3 [00:00<?, ?it/s]
Interpolating unit_a:   0%|          | 0/3 [00:00<?, ?it/s]
Interpolating unit_a_unconformity:  33%|███▎      | 1/3 [00:00<00:00, 17.29it/s]
Interpolating unit_b:  67%|██████▋   | 2/3 [00:00<00:00, 34.51it/s]
Interpolating unit_b: 100%|██████████| 3/3 [00:00<00:00, 25.05it/s]
Interpolating unit_c: 100%|██████████| 3/3 [00:00<00:00, 25.05it/s]
Interpolating unit_c_unconformity: : 4it [00:00, 25.05it/s]
Interpolating unit_c_unconformity: : 5it [00:00, 28.14it/s]

Visualise the model with onlap#

view = LavaVuModelViewer(model)
view.add_isosurface(model["unit_a"], nslices=5)
view.add_isosurface(model["unit_b"], nslices=5)
view.add_isosurface(model["unit_c"], nslices=5)

view.camera = {
    "translate": [0.0, 0.0, -20.67],
    "rotate": [-0.562, -0.438, -0.442, 0.544],
    "xyzrotate": [-94.021, -77.018, 2.784],
    "fov": 45.0,
}

view.display()
plot 6 unconformities
lv.translation(0.0, 0.0, -20.67)
lv.rotation(-94.021, -77.018, 2.784)

Total running time of the script: (0 minutes 2.431 seconds)

Gallery generated by Sphinx-Gallery