resqpy.grid_surface.find_first_intersection_of_trajectory_with_layer_interface¶
- resqpy.grid_surface.find_first_intersection_of_trajectory_with_layer_interface(trajectory, grid, k0=0, ref_k_faces='top', start=0, heal_faults=False, quad_triangles=True, is_regular=False)¶
Returns info about the first intersection of well trajectory(s) with layer interface.
- Parameters
trajectory (well.Trajectory object; or list thereof) – the wellbore trajectory object(s) to find the intersection for; if a list of trajectories is provided then the return value is a corresponding list
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
start (int, default 0) – an index into the trajectory knots to start the search from; is applied naively to all trajectories when a trajectory list is passed
heal_faults (boolean, default False) – if True, faults will be ‘healed’ to give an untorn surface before looking for intersections; if False and the trajectory passes through a fault plane without intersecting the layer interface then no intersection will be identified; makes no difference if the grid is unfaulted
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
is_regular (boolean, default False) – set True if grid is a RegularGrid with IJK axes aligned with xyz axes
- Returns
(numpy float array of shape (3,), int, (int, int)) – being the (x, y, z) intersection point, and the trajectory segment number, and the (j0, i0) column number of the first intersection point; or None, None, (None, None) if no intersection found; if the trajectory argument is a list of trajectories, then correponding list of numpy array, list of int, list of int pair are returned
Notes
interseections are found based on straight line segments between the trajectory control points, this will result in errors where there is significant curvature between neighbouring control points