-
When using GemPy for 3D geological modeling, I set up the fault relationship matrix, and the model loaded successfully, but the strata near the fault did not show any displacement. What is the reason for this? How can I solve this problem?This is my first time using GitHub, and my question format might not be standard, so I hope you seniors can understand. %% [markdown]# 1.5: Fault relationsGemPy断层关系建模示例%% [markdown]## 1. 导入依赖库%%import gempy as gp 固定随机种子保证可重复性np.random.seed(1515) %% [markdown]## 2. 数据准备%%读取表面点和方向数据df = pd.read_csv("6个别数据.CSV") 初始化颜色生成器color_gen = ColorsGenerator() %% [markdown]## 3. 构建结构框架%%初始化结构框架(含地层、断层、基底三组)structural_frame = gp.data.StructuralFrame( %% [markdown]### 3.1 创建结构元素%%为每个surface创建结构元素unique_surfaces = df['surface'].unique() for name in unique_surfaces:
%% [markdown]## 4. 创建地质模型%%设置模型范围extent = [ 初始化地质模型geo_model = gp.create_geomodel( %% [markdown]## 5. 配置断层关系%%获取断层元素fault1 = geo_model.structural_frame.get_element_by_name("Fault_1") 移除默认的Faults组Faults = geo_model.structural_frame.get_group_by_name("Faults") %% [markdown]### 5.1 定义断层系列%%添加新的断层结构组gp.add_structural_group( gp.add_structural_group( gp.add_structural_group( 执行清除geo_model.structural_frame.structural_groups = [ print("清除后结构组:") %% [markdown]### 5.2 设置断层关系矩阵%%配置断层关系矩阵gp.set_fault_relation( 更新模型geo_model.update_transform() #%% %% [markdown]## 6. 可视化结果%%2D剖面可视化gpv.plot_2d(geo_model, show_data=True) %%3D交互式可视化gpv.plot_3d( 当前结构组顺序(与 fault_relation 矩阵行列一致): |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @kaikai430, thanks for your question. It is really hard to figure out the exact problem in your code just by looking at it here. From what I can see, in the last thing you output your fault relations contains all
Ma suggestion would be to use the alternative way to set faults in gempy and use the default behavior without setting the fault relation matrix actively:
Also make sure to watch these videos to make sure you understand all the implications if you havent done so already. If you are able to provide your full code with the input data as a zip file I could also take a closer look. Cheers, |
Beta Was this translation helpful? Give feedback.
Hello @kaikai430,
thanks for your question. It is really hard to figure out the exact problem in your code just by looking at it here. From what I can see, in the last thing you output your fault relations contains all
False
, which means all your faults do not cause any offset. So my assumption is that the mistake happens whenyou sert your fault relations:Ma suggestion would be to use the alternative way to set faults in gempy and use the default behavior without setting the fault relation matrix actively:
gp.set_is_faul…