resqpy.grid_surface.generate_torn_surface_for_layer_interface

resqpy.grid_surface.generate_torn_surface_for_layer_interface(grid, k0=0, ref_k_faces='top', quad_triangles=True)

Returns a Surface object generated from the grid layer interface points.

Parameters
  • grid (grid.Grid object) – the grid object from which a layer interface is to be converted to a surface

  • k0 (int) – the layer number (zero based) to be used

  • ref_k_faces (string) – either ‘top’ (the default) or ‘base’, indicating whether the top or the base interface of the layer is to be used

  • quad_triangles (boolean, optional, default True) – if True, 4 triangles are used to represent each cell k face, which gives a unique solution with a shared node of the 4 triangles at the mean point of the 4 corners of the face; if False, only 2 triangles are used, which gives a non-unique solution

Returns

a resqml_surface.Surface object with a single triangulated patch

Notes

The resulting surface is assigned to the same model as grid, though xml is not generated and hdf5 is not written. Strictly, the RESQML business rules for a triangulated surface require a separate patch for areas of the surface which are not joined; therefore, if fault tears cut off one area of the surface (eg. a fault running fully across the grid), then more than one patch should be generated; however, at present the code uses a single patch regardless.