resqpy.derived_model.add_faults

resqpy.derived_model.add_faults(epc_file, source_grid, polylines=None, lines_file_list=None, lines_crs_uuid=None, full_pillar_list_dict=None, left_right_throw_dict=None, create_gcs=True, inherit_properties=False, inherit_realization=None, inherit_all_realizations=False, new_grid_title=None, new_epc_file=None)

Extends epc file with a new grid which is a version of the source grid with new curtain fault(s) added.

Parameters:
  • epc_file (string) – file name to rewrite the model’s xml to; if source grid is None, model is loaded from this file

  • source_grid (grid.Grid object, optional) – if None, the epc_file is loaded and it should contain one ijk grid object (or one ‘ROOT’ grid) which is used as the source grid

  • polylines (lines.PolylineSet or list of lines.Polyline, optional) – list of poly lines for which curtain faults are to be added; either this or lines_file_list or full_pillar_list_dict must be present

  • lines_file_list (list of str, optional) – a list of file paths, each containing one or more poly lines in simple ascii format§; see notes; either this or polylines or full_pillar_list_dicr must be present

  • lines_crs_uuid (uuid, optional) – if present, the uuid of a coordinate reference system with which to interpret the contents of the lines files; if None, the crs used by the grid will be assumed

  • full_pillar_list_dict (dict mapping str to list of pairs of ints, optional) – dictionary mapping from a fault name to a list of pairs of ints being the ordered neigbouring primary pillar (j0, i0) defining the curtain fault; either this or polylines or lines_file_list must be present

  • left_right_throw_dict (dict mapping str to pair of floats, optional) – dictionary mapping from a fault name to a pair of floats being the semi-throw adjustment on the left and the right of the fault (see notes); semi-throw values default to (+0.5, -0.5)

  • create_gcs (boolean, default True) – if True, and faults are being defined by lines, a grid connection set is created with one feature per new fault and associated organisational objects are also created; ignored if lines_file_list is None

  • inherit_properties (boolean, default False) – if True, the new grid will have a copy of any properties associated with the source grid

  • inherit_realization (int, optional) – realization number for which properties will be inherited; ignored if inherit_properties is False

  • inherit_all_realizations (boolean, default False) – if True (and inherit_realization is None), properties for all realizations will be inherited; if False, only properties with a realization of None are inherited; ignored if inherit_properties is False or inherit_realization is not None

  • new_grid_title (string) – used as the citation title text for the new grid object

  • new_epc_file (string, optional) – if None, the source epc_file is extended with the new grid object; if present, a new epc file (& associated h5 file) is created to contain the unsplit grid (& crs)

Returns:

a new grid (grid.Grid object) which is a copy of the source grid with the structure modified to incorporate the new faults

Notes

full_pillar_list_dict is typically generated by Grid.make_face_sets_from_pillar_lists(); pillars will be split as needed to model the new faults, though existing splits will be used as appropriate, so this function may also be used to add a constant to the throw of existing faults; the left_right_throw_dict contains a pair of floats for each fault name (as found in keys of full_pillar_list_dict); these throw values are lengths in the uom of the crs used by the grid (which must have the same xy units as z units);

this function does not add a GridConnectionSet to the model – calling code may wish to do that