Beispiel #1
0
z = np.linspace(-L, 0., int(L) + 1)

#---- Define mesh objects
lg = PyLaGriT()
m = lg.gridder(x,
               y,
               z,
               connect=True,
               elem_type='hex',
               name='3Dfracture_mesh',
               filename='mesh.inp')
#  m = lg.create(name='3Dfracture_mesh')

# Define enclosing volume
box = lg.surface_box([-10., -10., -100.], [10., 10., 0.],
                     name='fullbox',
                     ibtype='reflect')

# NOT SURE IF NEED TO DEFINE INTERIOR INTERFACE(S)
#--- interfaces cannot be coincident w/ reflective boundaries
fractureplane = lg.surface_box([-0.5, -10.1, -100.1], [0.5, 10.1, 0.1],
                               name='fractureplane',
                               ibtype='intrface')

# Divide enclosing volume into regions
#-- Matrix region (surrounding fracture)
m_boolstr = 'le fullbox and gt fractureplane'
m_region = lg.region_bool(m_boolstr, name='matrix')
#-- Fracture region
f_boolstr = 'le fullbox and le fractureplane'
f_region = lg.region_bool(f_boolstr, name='fracture')
---------------------------------------------------
- Define an enclosing volume using the surface command
- Since we are defining an exterior boundary, the boundary type is reflect.
"""
#  # not really sure how to do this in pylagrit...
#  mini = 0.0
#  maxi = 1.0
#  x = np.array([mini,maxi])
#  y = x
#  z = y
#
#  cube = lg.gridder(x,y,z)

#----
cube = lg.surface_box([0., 0., 0.], [1., 1., 1.],
                      name='cube',
                      ibtype='reflect')
"""
(3) Define interior interfaces
---------------------------------------------------
- Interfaces are defined with the surface command.
- In this case the boundary type is intrface
- divide the unit cube defined above in half vertically
"""

cutplane = lg.surface_plane([0., 0., 0.5], [1., 0., 0.5], [1., 1., 0.5],
                            name='cutplane',
                            ibtype='intrface')
"""
(4) Divide the enclosing volume into regions
---------------------------------------------------