flownet.network_model._mitchell module

flownet.network_model._mitchell._generate_candidates(num_candidates: int, x_min: float, x_max: float, y_min: float, y_max: float, z_min: float, z_max: float, perforation_hull: Optional[scipy.spatial.qhull.Delaunay], concave_hull_bounding_boxes: Optional[numpy.ndarray] = None) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]
Parameters
  • num_candidates – Number of candidates to consider for per additional flow node,

  • x_min – minimum x coordinate of (scaled) perforations,

  • x_max – maximum x coordinate of (scaled) perforations,

  • y_min – minimum y coordinate of (scaled) perforations,

  • y_max – maximum y coordinate of (scaled) perforations,

  • z_min – minimum z coordinate of (scaled) perforations,

  • z_max – maximum z coordinate of (scaled) perforations,

  • perforation_hull – Convex hull of delaunay triangulated (scaled) perforations,

  • x (concave_hull_bounding_boxes Numpy array with) –

  • y

  • block (z min/max boundingboxes for each grid) –

:param :

Returns

Array of length num_candidates containing x coordinates of candidates, y_candidate: Array of length num_candidates containing y coordinates of candidates, z_candidate: Array of length num_candidates containing z coordinates of candidates,

Return type

x_candidate

flownet.network_model._mitchell.mitchell_best_candidate(perforations: List[Union[Tuple[float, float, float], List[float], Tuple[Any, ...]]], num_added_flow_nodes: int, num_candidates: int, hull_factor: float, place_nodes_in_volume_reservoir: Optional[bool] = None, concave_hull_bounding_boxes: Optional[numpy.ndarray] = None, random_seed: Optional[int] = None, mitchell_mode: Optional[str] = 'normal') List[Union[Tuple[float, float, float], List[float], Tuple[Any, ...]]]

Python implementation of a modified Mitchell’s Best-Candidate Algorithm to generate additional flow nodes in real field cases. The algorithm will generate locations for additional flow nodes where the distance to all existing flow nodes is maximized. The added flow nodes are located inside the (possibly scaled) convex hull of the supplied perforations. :param perforations: Python list of real well coordinate tuples

[(xr_1, yr_1, zr_1), …, (xr_N, yr_N, zr_N)]

Parameters
  • num_added_flow_nodes – Number of additional flow nodes to generate

  • num_candidates – Number of candidates to consider per additional flow nodes

  • place_nodes_in_volume_reservoir – When true, additional nodes will initially be placed inside the bounding box of the reservoir or layer instead of the bounding box of the well perforations.

  • hull_factor – Factor to linearly scale the convex hull with. Factor will scale the distance of each point from the centroid of all the points. Default defined in config parser is 1.2.

  • concave_hull_bounding_boxes – Numpy array with x, y, z min/max boundingboxes for each grid block

  • random_seed – Random seed to control the reproducibility of the FlowNet.

  • mitchell_mode – Normal or fast mode to run the mitchell’s best candidate algorithm in.

Returns

Python list of real/original and added flow node coordinate tuples

[(xr_1, yr_1, zr_1), …, (xr_N, yr_N, zr_N), (xi_1, yi1, zi1) … (xi_n_i, yi_n_i, zi_n_i)]

flownet.network_model._mitchell.scale_convex_hull_perforations(perforations: List[Union[Tuple[float, float, float], List[float], Tuple[Any, ...]]], hull_factor: float) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Linear scaling of the perforation points based on the hull_factor. Factor will scale the distance of each point from the centroid of all the points. These scaled points are used to create a convex hull in which additional flow nodes will be placed. :param perforations: Python list of real well coordinate tuples

[(xr_1, yr_1, zr_1), …, (xr_N, yr_N, zr_N)]

Parameters

hull_factor – Factor to linearly scale the convex hull with. Factor will scale the distance of each point from the centroid of all the points.

Returns

The tuple consisting of numpy arrays of x,y,z moved points based on the hull_factor, which are used further on in the code to create a convex hull around the real wells (perforations).