Group of Surfaces
In [1]:
Copied!
# Surface Group
# Surface Group
In [2]:
Copied!
import numpy as np
import pandas as pd
from volumetricspy import Surface, SurfaceGroup
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
from volumetricspy import Surface, SurfaceGroup
import matplotlib.pyplot as plt
import seaborn as sns
In [3]:
Copied!
s1 = Surface(name='anticline')
s1.from_z_map('anticline',crs=3117)
sg1 = SurfaceGroup(name='Test')
sg1.add_surface(s1)
s1 = Surface(name='anticline')
s1.from_z_map('anticline',crs=3117)
sg1 = SurfaceGroup(name='Test')
sg1.add_surface(s1)
In [4]:
Copied!
sg1.surfaces['anticline'].contourf()
sg1.surfaces['anticline'].contourf()
Out[4]:
<matplotlib.contour.QuadContourSet at 0x7fc490a43490>
In [5]:
Copied!
sg1.create_parallel_surfaces('anticline',[-180,-250,-320])
sg1.create_parallel_surfaces('anticline',[-180,-250,-320])
In [6]:
Copied!
sg1.surfaces.keys()
sg1.surfaces.keys()
Out[6]:
dict_keys(['anticline', 'anticline_-180.0', 'anticline_-250.0', 'anticline_-320.0'])
In [7]:
Copied!
sg1.surfaces['anticline_-180.0'].contourf()
sg1.surfaces['anticline_-180.0'].contourf()
Out[7]:
<matplotlib.contour.QuadContourSet at 0x7fc490acb4c0>
In [8]:
Copied!
rv, area = sg1.get_volume_bounds(
top_surface = 'anticline',
bottom_surface = 'anticline_-180.0',
method ='contours',
zmin = -5400,zmax=-4900
)
rv
rv, area = sg1.get_volume_bounds(
top_surface = 'anticline',
bottom_surface = 'anticline_-180.0',
method ='contours',
zmin = -5400,zmax=-4900
)
rv
Out[8]:
800015.9260285863
In [9]:
Copied!
fig, ax = plt.subplots(1,1,figsize=(10,10))
sns.lineplot(data=area.reset_index(),x='index',y='area_top',ax=ax)
sns.lineplot(data=area.reset_index(),x='index',y='area_bottom',ax=ax)
fig, ax = plt.subplots(1,1,figsize=(10,10))
sns.lineplot(data=area.reset_index(),x='index',y='area_top',ax=ax)
sns.lineplot(data=area.reset_index(),x='index',y='area_bottom',ax=ax)
Out[9]:
<AxesSubplot:xlabel='index', ylabel='area_top'>
In [10]:
Copied!
surv1_grid = sg1.surfaces['anticline'].make_grid(dz=-100,nz=5)
surv1_grid = sg1.surfaces['anticline'].make_grid(dz=-100,nz=5)
In [11]:
Copied!
#surv1_vtk.plot()
#surv1_vtk.plot()
In [12]:
Copied!
surv_grid_vtk = surv1_grid.unstructured_grid_vtk()
surv_grid_vtk = surv1_grid.unstructured_grid_vtk()
In [17]:
Copied!
surv_grid_vtk.save('test.vtk')
surv_grid_vtk.save('test.vtk')
In [28]:
Copied!
surv_grid_vtk
surv_grid_vtk
Out[28]:
Header | Data Arrays | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
In [32]:
Copied!
surv1_grid.nz
surv1_grid.nz
Out[32]:
4
In [ ]:
Copied!