resqpy.grid_surface.populate_blocked_well_from_trajectory(blocked_well, grid, active_only=False, quad_triangles=True, lazy=False, use_single_layer_tactics=True, check_for_reentry=True)[source]

Populate an empty blocked well object based on the intersection of its trajectory with a grid.

  • blocked_well (resqpy.well.BlockedWell object) – a largely empty blocked well object to be populated by this function; note that the trajectory attribute must be set before calling this function

  • grid (resqpy.grid.Grid object) – the grid to intersect the well trajectory with

  • active_only (boolean, default False) – if True, intervals which cover inactive cells will be set as unblocked intervals; if False, intervals covering any cell will be set as blocked intervals

  • quad_triangles (boolean, default True) – if True, each cell face is represented by 4 triangles when calculating intersections; if False, only 2 triangles are used

  • lazy (boolean, default False) – if True, initial penetration must be through a top K face and blocking will cease as soon as the trajectory first leaves the gridded volume; if False, initial entry may be through any external face or a fault face and re-entry will be handled

  • use_single_layer_tactics (boolean, default True) – if True and not lazy and the grid does not have k gaps, fault planes and grid sidewall are initially treated as if the grid were a single layer, when looking for penetrations from outwith the grid

  • check_for_reentry (boolean, default True) – if True, the trajectory is tracked after leaving the grid through the outer skin (eg. base reservoir) in case of re-entry; if False, blocking stops upon the first exit of the trajectory through the skin; ignored (treated as False) if lazy is True


the blocked well object (same object as passed in) if successful; None if unsuccessful


the blocked_well trajectory attribute must be set before calling this function; grids with k gaps might result in very slow processing; the function represents a cell face as 2 or 4 triangles rather than a bilinear patch; setting quad_triangles False is not recommended as the 2 triangle formulation gives a non-unique representation of a face (though the code is designed to use the same representation for a shared face between neighbouring cells); where non-planar faults exist, the triangulation of faces may result in a small misalignment of abutted faces between the opposing sides of the fault; this could potentially result in an extra, small, unblocked interval being introduced as an artefact between the exit point of one cell and the entry point into the abutted cell