LoopStructural icon indicating copy to clipboard operation
LoopStructural copied to clipboard

[Question]fault box

Open HzjFirst opened this issue 9 months ago • 4 comments

Hello, can this library set the extension range of faults?

HzjFirst avatar Apr 09 '25 03:04 HzjFirst

hi @HzjFirst, if you are asking whether LoopStructural can make finite faults as opposed to faults which cut the entire domain, yes it can. For more info take a look at the documentation https://loop3d.org/LoopStructural/user_guide/fault_modelling.html

lachlangrose avatar Apr 15 '25 01:04 lachlangrose

Hi, sorry, I haven't watched GitHub these days.Thank you very much for your reply.I have ten geological layers. How to set the fault to only cut the middle two layers?

HzjFirst avatar Apr 30 '25 10:04 HzjFirst

One way to do this is to restrict the influence area of the fault using the major axis, minor axis and intermediate axis arguments. See below.

from LoopStructural import GeologicalModel
from LoopStructural.visualisation import Loop3DView
import pandas as pd

# generate a synthetic data set for horizontal stratigraphy and a fault.
strati_df = pd.DataFrame(
    [
        [0.1, 0.5, 0.1, 0.1, 0, 0, 1.0, "strati"],
        [0.1, 0.5, 0.2, 0.2, 0, 0, 1.0, "strati"],
        [0.1, 0.5, 0.3, 0.3, 0, 0, 1.0, "strati"],
        [0.1, 0.5, 0.4, 0.4, 0, 0, 1.0, "strati"],
        [0.1, 0.5, 0.5, 0.5, 0, 0, 1.0, "strati"],
        [0.1, 0.5, 0.6, 0.6, 0, 0, 1.0, "strati"],
        [0.1, 0.5, 0.7, 0.7, 0, 0, 1.0, "strati"],
        [0.1, 0.5, 0.8, 0.8, 0, 0, 1.0, "strati"],
        [0.1, 0.5, 0.9, 0.9, 0, 0, 1.0, "strati"],
    ],
    columns=["X", "Y", "Z", "val", "nx", "ny", "nz", "feature_name"],
)
fault_df = pd.DataFrame(
    [[0.5, 0.5, 0.5, 0, "fault"], [0.5, 0.1, 0.5, 0.0, "fault"]],
    columns=["X", "Y", "Z", "val", "feature_name"],
)
model = GeologicalModel([0, 0, 0], [1, 1, 1])
model.data = pd.concat([strati_df, fault_df])
# the fault is striking north south. So the major axis is the y direction, the minor axis is the x direction and the intermediate axis is the z direction.
# use the axes arguments to change the influence areas of the fault on stratigraphy. Fault displacement will be maximal in the centre of the fault and decrease
# to 0 towards the edges of the ellipsoid.
model.create_and_add_fault(
    "fault",
    0.2,
    fault_center=[0.5, 0.5, 0.5],
    major_axis=1,
    minor_axis=1,
    intermediate_axis=0.15,
    faultfunction="BaseFault3D",
)
model.create_and_add_foliation("strati")
model.update()
view = Loop3DView(model)
# visualise the stratigraphy surfaces and the fault surface.
view.plot_surface(
    model["strati"],
    [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9],
    paint_with=model["strati"],
)
view.plot_surface(model["fault"])
view.view_xz()
view.show()

lachlangrose avatar Apr 30 '25 22:04 lachlangrose

OK. I will try this method. I will contact you if there are any issues. Thank you.

HzjFirst avatar May 06 '25 02:05 HzjFirst