Skip to content

WiTNO API Reference

pyfastwell.wellflow.wi_tno.WiTNO

well index calculation object

__init__

__init__(inj: WellTreeTNO, prod: WellTreeTNO, ztop, zbottom, kx, ky, kz, muinj=0.001, muprod=0.001, restrictbranch=None, segmentlength=100, verbose=False)

" initialize the well index calculation object

Parameters:

inj: WellTree model of the injection well

prod: WellTree model of the production well

ztop: perforated top of the reservoir [m] (minus sign for values below surface)

zbottom: perforated bottom of the reservoir [m] (minus sign for values below surface)

kx: horizontal permeability [mDarcy]

ky: horizontal permeability [mDarcy]

kz: vertical peremeability [mDarcy]

muinj: viscosity of brine at injector [Pa s]

muprod: viscosity of brine at producer [Pa s]

restrictbranch: restrict the active wells in the well Tree model to this name

segmentlength: coarsening target for the perforated part of the reservoir (will not refine)

verbose: if True, print debug information

setupmatrix_new

setupmatrix_new(n: int = 0, refPprod: float = 100000.0, verbose: bool = False) -> tuple

setup the matrix for the well index calculation, using the control points

Parameters:

n: order of the polynomial representation of the pressure, 0 is constant, 1 is linear, 2 is quadratic

refPprod: reference pressure [Pa] for injectivity and productivity calculation

doprint: if True, print the matrix and the right hand side vector

Returns

tuple of:

  • flowrates of the pressure solution in m3/s for each of the AE segments, positive values are injection, negative production

  • the injection index and the production index (the flow rate in m3/s at the injector and producer for the given reference pressure)