该函数用于设置地质层面对象,即通过将网格中的节点分配到不同的地质层面对象中来构建3D地质模型。
None
import gempy
model = gempy.create_model('Test_Model')
# First we need to activate the model by specifying the extent and resolution
# of the model (surfaces, resolution)
model = gempy.initialize_model(model, [0, 1000., 0, 1000., 0, 1000.], [50, 50, 50])
# Then we add three surfaces using three points and give them a name and an id
gempy.add_surface_points(model, [0, 1000, 500, 600, 350, 450, 500, 400],
[0, 0, 350, 400, 800, 800, 500, 550],
[0, 0, 0, 0, 0, 900, 0, 900],
['Surface 1', 'Surface 2', 'Surface 3',],
[1, 2, 2])
# Finally we interpolate the Geological Model
gempy.interpolator.interpolator_3D(model)
# Now we can set the surfaces object
surfaces = {}
surfaces['Surface 1'] = {'id': 1, 'vertices': model.surfaces_df[model.surfaces_df['surface'] == 'Surface 1'].iloc[:, :3].values,
'interpolation_points': model.interpolator.interpolator_object.get_surface_points('Surface 1'),
'prop': u'basement',
'values': model.interpolator.interpolator_object.get_raw_data('gp')[0].reshape(-1)}
surfaces['Surface 2'] = {'id': 2, 'vertices': model.surfaces_df[model.surfaces_df['surface'] == 'Surface 2'].iloc[:, :3].values,
'interpolation_points': model.interpolator.interpolator_object.get_surface_points('Surface 2'),
'prop': u'granularity',
'values': model.interpolator.interpolator_object.get_raw_data('gp')[0].reshape(-1)}
surfaces['Surface 3'] = {'id': 2, 'vertices': model.surfaces_df[model.surfaces_df['surface'] == 'Surface 3'].iloc[:, :3].values,
'interpolation_points': model.interpolator.interpolator_object.get_surface_points('Surface 3'),
'prop': u'porosity',
'values': model.interpolator.interpolator_object.get_raw_data('gp')[0].reshape(-1)}
gempy.set_surfaces_object(model, surfaces)