class Gabriel(*args, **kwargs)[source]


Random network formed by Gabriel tessellation of arbitrary base points

This operates by performing a Deluanay tessellation, then removing connections that do not adhere to the definition of the Gabriel graph

This produces a network that has fewer throats than a Delaunay network. Since the longer-range throats tend to be removed this might be more realistic in some cases.

  • points (array_like or int) – Can either be an N-by-3 array of point coordinates which will be used, or a scalar value indicating the number of points to generate

  • shape (array_like) –

    The size of the domain. It’s possible to create cubic, or 2D square domains by changing the domain shape as follows:

    [x, y, z] - will produce a normal cubic domain of dimension x, and and z

    [x, y, 0] - will produce a 2D square domain of size x by y

  • name (string) – An optional name for the object to help identify it. If not given, one will be generated.

  • project (OpenPNM Project object, optional) – Each OpenPNM object must be part of a Project. If none is supplied then one will be created and this Network will be automatically assigned to it. To create a Project use openpnm.Project().


>>> import openpnm as op
>>> import scipy as sp
>>> import matplotlib.pyplot as plt
>>> pts = np.random.rand(100, 3) * [1, 1, 0]  # Set z-axis to 0
>>> gn =[1, 1, 0], points=pts)
>>> dn =[1, 1, 0], points=pts)

Now compare them side by side:

>>> gn['pore.coords'] += [1, 0, 0]
>>> op.topotools.merge_networks(dn, gn)
>>> fig, ax = plt.subplots()
>>> _ = op.topotools.plot_connections(dn, ax=ax)
>>> _ = op.topotools.plot_coordinates(dn, c='r', s=100, ax=ax)