pywaterflood.multiwellproductivity

Interwell connectivity through geometric considerations.

Attributes

idx

Functions

calc_gains_homogeneous(→ pandas.DataFrame)

Calculate gains from injectors to producers using multiwell productivity index.

translate_locations(→ pandas.DataFrame)

Translate locations to prepare for building connectivity matrix.

calc_influence_matrix(→ pandas.DataFrame)

Calculate influence matrix A.

calc_A_ij(→ float)

Calculate element in the influence matrix.

Module Contents

pywaterflood.multiwellproductivity.idx
pywaterflood.multiwellproductivity.calc_gains_homogeneous(locations: pandas.DataFrame, x_e: float, y_e: float) pandas.DataFrame[source]

Calculate gains from injectors to producers using multiwell productivity index.

The equation for the influence of injection on production is

\[\mathbf{\Lambda} = \frac{\mathbf{A}_p^{-1}}{\sum \mathbf{A}_p^{-1}} \times \left(\mathbf{1} \times \mathbf{A}_p^{-1} \times \mathbf{A}_c^T - 1\right) - \left( \mathbf{A}_p^{-1} \times \mathbf{A}_c^T \right)\]
Parameters:
  • locations (pd.DataFrame) – columns include: X : x-location for well Y : y-location for well Type: (“Producer” or “Injector”)

  • x_e (float) – scaling in x-direction (unit size)

  • y_e (float) – scaling in y-direction (unit size)

Returns:

Lambda – contains the production-injection multiwell productivity index

Return type:

pd.DataFrame

Notes

This assumes a roughly rectangular unit with major axes at x and y. You might want to rotate your locations.

Lambda is negative. Not sure why. Negate it to get positive injection leading to positive production.

References

Kaviani, D. and Valkó, P.P., 2010. Inferring interwell connectivity using multiwell productivity index (MPI). Journal of Petroleum Science and Engineering, 73(1-2), p.48-58.

pywaterflood.multiwellproductivity.translate_locations(locations: pandas.DataFrame, x_col: str, y_col: str, type_col: str) pandas.DataFrame[source]

Translate locations to prepare for building connectivity matrix.

Moves the lower left edge of the reservoir to (0, 0), and sets up the matrix columns to work with calc_gains_homogeneous

Parameters:
  • locations (pd.DataFrame) – Has the x,y locations and type assignment for all wells

  • x_col (str) – Column in locations for the x-location

  • y_col (str) – Column in locations for the y-location

  • type_col (str) – Column in locations for the type (producer or injector)

Returns:

locations_out – columns are X (x-location), Y (y-location), Type (producer or injector)

Return type:

pd.DataFrame

pywaterflood.multiwellproductivity.calc_influence_matrix(locations: pandas.DataFrame, y_D: float, matrix_type: str = 'conn', m_max: int = 100) pandas.DataFrame[source]

Calculate influence matrix A.

Parameters:
  • locations (pd.DataFrame) – Has the x,y locations and type assignment for all wells columns are X (x-location), Y (y-location), Type (producer or injector)

  • y_D (float) – dimensionless scaling for y-direction

  • matrix_type (str, choice of conn or prod) – injector-producer matrix or producer-producer matrix

  • m_max (int > 0) – number of terms in the series to calculate. 100 is a good default.

Returns:

influence_matrix – a matrix with the influences between wells

Return type:

pd.DataFrame

pywaterflood.multiwellproductivity.calc_A_ij(x_i: float, y_i: float, x_j: float, y_j: float, y_D: float, m: numpy.ndarray) float[source]

Calculate element in the influence matrix.

\[A_{ij} = 2 \pi y_D (\frac13 - \frac{y_i}{y_D} + \frac{y_i^2 + y_j^2}{2 y_D^2}) + \sum_{m=1}^\infty \frac{t_m}m \cos(m\pi \tilde x_i) \cos(m \pi \tilde x_j)\]

where

\[t_m = \frac{\cosh\left(m\pi (y_D - |\tilde y_i - \tilde y_j|)\right) + \cosh\left(m\pi (y_D - \tilde y_i - \tilde y_j\right)} {\sinh\left(m\pi y_D \right)}\]
Parameters:
  • x_i (float) – x-location of i’th well

  • y_i (float) – y-location of i’th well

  • x_j (float) – x-location of j’th well

  • y_j (float) – y-location of j’th well

  • y_D (float) – dimensionless parameter for y-direction

  • m (ndarray) – series terms, from 1 to m_max

Returns:

A_ij

Return type:

float

References

Kaviani, D. and Valkó, P.P., 2010. Inferring interwell connectivity using multiwell productivity index (MPI). Journal of Petroleum Science and Engineering, 73(1-2), p.48-58. https://doi.org/10.1016/j.petrol.2010.05.006