Beispiel #1
0
    dataframe.loc[len(dataframe), :] = [0, 0, 0, np.nan, "test", 0, 0, 1 / val]
    model = GeologicalModel(
        -radius_mult * np.ones(3) * np.array([10, 10, 1]),
        radius_mult * np.ones(3) * np.array([10, 10, 1]),
        rescale=False,
    )
    model.data = dataframe
    model.create_and_add_foliation(
        "test", nelements=5e4,
        interpolatortype=interpolator)  # ,gpw=1,cpw=1,cgw=0.05)

    view.clear()
    view.model = model
    view.add_isosurface(model.features[0], nslices=5, name="test")
    view.add_data(model.features[0])
    view.rotation = [-64.91520690917969, -46.954345703125, -13.14844036102295]
    images[interpolator][val] = view.image_array()
fig, ax = plt.subplots(1, 3, figsize=(30, 10))
ax[0].imshow(images["FDI"][1])
ax[1].imshow(images["FDI"][5])
ax[2].imshow(images["FDI"][9])
ax[0].axis("off")
ax[1].axis("off")
ax[2].axis("off")
ax[0].set_title(f"A. Value range {1.0} ")
ax[1].set_title(f"B. Value range 5.0 ")
ax[2].set_title(f"C. Value range 9.0 ")

######################################################################
# Setting magnitude of norm to be 1
# ---------------------------------
Beispiel #2
0
                                   interpolatortype='PLI',
                                   buffer=0.3)

viewer = LavaVuModelViewer(model)
viewer.add_isosurface(fault,
                      isovalue=0
                      #                       slices=[0,1]#nslices=10
                      )
xyz = model.data[model.data['feature_name'] == 'strati'][['X', 'Y',
                                                          'Z']].to_numpy()
xyz = xyz[fault.evaluate(xyz).astype(bool), :]
viewer.add_vector_field(fault, locations=xyz)
viewer.add_points(
    model.data[model.data['feature_name'] == 'strati'][['X', 'Y', 'Z']],
    name='prefault')
viewer.rotation = [-73.24819946289062, -86.82220458984375, -13.912878036499023]
viewer.display()

displacement = 400  #INSERT YOUR DISPLACEMENT NUMBER HERE BEFORE #

model = GeologicalModel(bb[0, :], bb[1, :])
model.set_model_data(data)
fault = model.create_and_add_fault('fault',
                                   displacement,
                                   nelements=2000,
                                   steps=4,
                                   interpolatortype='PLI',
                                   buffer=2)
strati = model.create_and_add_foliation('strati',
                                        nelements=30000,
                                        interpolatortype='PLI',
##############################
# Or build directly from the dataframe and processor attributes.

model2 = GeologicalModel(processor.origin, processor.maximum)
model2.data = processor.data
model2.create_and_add_foliation("supergroup_0")
model2.update()

##############################
# Visualising model
# ~~~~~~~~~~~~~~~~~

view = LavaVuModelViewer(model)
view.add_model_surfaces()
view.rotation = [-37.965614318847656, 13.706363677978516, 3.110347032546997]
view.display()

##############################
# Adding faults
# ~~~~~~~~~~~~~

fault_orientations

fault_edges

fault_properties

processor = ProcessInputData(
    contacts=contacts,
    contact_orientations=stratigraphic_orientations.rename(
Beispiel #4
0
processor = ProcessInputData(
    fault_orientations=ori,
    fault_locations=df,
    origin=origin,
    maximum=maximum,
    fault_edges=[("fault_2", "fault_1")],
    fault_edge_properties=[{"angle": 10}],
)

model = GeologicalModel.from_processor(processor)
model.update()

view = LavaVuModelViewer(model)
for f in model.faults:
    view.add_isosurface(f, slices=[0])  #
view.rotation = [-50.92916488647461, -30.319700241088867, -20.521053314208984]
view.display()

##############################
# Modelling abutting faults
# ~~~~~~~~~~~~~~~~~~~~~~~~~
# In this exampe we will use the same faults but specify the angle between the faults as $40^\circ$ which will change the fault relationship to be abutting rather than splay.

processor = ProcessInputData(
    fault_orientations=ori,
    fault_locations=df,
    origin=origin,
    maximum=maximum,
    fault_edges=[("fault_2", "fault_1")],
    fault_edge_properties=[{"angle": 40}],
)