petrelpy.wellconnection¶
Work with Eclipse well connection files.
These are a handy export from Petrel that can get you well-specific properties.
Functions¶
|
Get average properties along the laterals for a well connection file. |
|
Get all the well names from a well connection file. |
|
Get columns used for well trajectory. |
|
Get average properties along the well lateral from the geomodel. |
|
Get trajectory for a well from the well connection file. |
|
Get section of well connection file for well. |
|
Get well's name from string. |
Module Contents¶
- petrelpy.wellconnection.process_well_connection_file(well_connection_file: str, wellname_to_heel: pandas.DataFrame, property_aggregates: dict[str, Any] | None = None, col_names: list[str] | None = None) pandas.DataFrame¶
Get average properties along the laterals for a well connection file.
- Parameters:
well_connection_file (str) – Eclipse well connection file exported from Petrel
wellname_to_heel (pd.DataFrame) – DataFrame containing UWI,Name,Depth_Heel for each well in the connection file
property_aggregates (dict[str,Any]) – properties from the well connection file to extract and how to aggregate them
col_names (list) – dictionary of column names in the well connection file you can check this with get_trajectory_geomodel_columns(well_connection_file) the first few are usually [‘MD_ENTRY’, ‘GRID_I’, ‘GRID_J’, ‘GRID_K’,’WELL_ENTRY_X’, ‘WELL_ENTRY_Y’,’WELL_ENTRY_Z’,’ENTRY_FACE’,’MD_EXIT’,’WELL_EXIT_X’,’WELL_EXIT_Y’, ‘WELL_EXIT_Z’,’EXIT_FACE’,]
- Output: pd.DataFrame
DataFrame indexed by UWI, with columns that are the keys of property_aggregates
- Note: vertical wells get everything included, wells not in wellname_to_heel are treated
as vertical and have their wellname as their index
- petrelpy.wellconnection.get_wellnames(wc_file: str | pathlib.Path) list[str]¶
Get all the well names from a well connection file.
- petrelpy.wellconnection.get_trajectory_geomodel_columns(fname: str | pathlib.Path) list[str]¶
Get columns used for well trajectory.
- petrelpy.wellconnection.process_well_lateral(well_string: str, wellname_to_heel: pandas.DataFrame, property_aggregates: dict[str, Any] | None = None, col_names: list[str] | None = None) pandas.Series¶
Get average properties along the well lateral from the geomodel.
- Parameters:
- Returns:
average properties along the well’s lateral
- Return type:
pd.Series
- petrelpy.wellconnection.get_trajectory(well_string: str, col_names: list[str] | None = None) pandas.DataFrame¶
Get trajectory for a well from the well connection file.
- petrelpy.wellconnection.get_well(file_obj: collections.abc.Iterator[str])¶
Get section of well connection file for well.
- Parameters:
file_obj (Iterator[str]) – loaded well connection file, iterated over row-by-row
- Yields:
Iterator[str] – string containing well properties