wells module

Modules defines main functions connected to wells

wells.inj_well(m, t, p, s, tr, trock_matrix, dtime, fi, acc, n2e, nc, z, mat, am, nodes_top, nodes_in_elements)[source]

Description of injection well

Parameters:
  • m – mass flux [kg/s]

  • t – inlet temperature [°C]

  • p – pressure at the depth of a well liner [Pa]

  • s – TDS [kg/kg]

  • tr – matrix of rock temperature in nodes belonged to a well (only), nw is a node number tr[n,0] - node number nw where is the side of a well, tr[n,1] - radius of a side of a well [m], tr[n,2] - Z coordinate [m], tr[n,3] - temperature [°C]

  • trock_matrix – the matrix with temperature in nodes at the following time step [°C]. 1D matrix = vector

  • dtime – time step value [s]

  • fi – pipe wall roughness coefficient, usually has the values:1 –for smooth, new pipes made of steel, copper, brass, 1.1 – for new cast iron pipes, 1.56 – for cast iron and riveted steel, 1.78 – for old steel pipes (this value can be considered typical for drill pipes), 2.22 – for old riveted steel pipes,

  • acc – required accuracy

  • n2e – matrix describing how nodes belonges to elements

  • nc – matrix with nodes coordinates R,Z

  • z – matrix with the Z coordinate

  • mat – the matrix materials linked to elements in a grid

  • am – matrix of temperature equalization factor [m2/s]

  • nodes_top – nodes in

  • nodes_in_elements – matrix includes information how nodes are linked with elements, in rows - number of elements, in columns - number of nodes in an element

Returns:

matrix with parameters at the begining and at the end of n zone. Col 0-rock temperature in nodes belonged to a well, 1-temperature of rock in a side of the well ,2-temperature of brine entering zone n, 3- temperature of brine leaving zone n, 4- pressure of brine entering zone n, 5-pressure of brine leaving zone n, 6- heat convection coefficient in zone n

Note

gravity value g=9.80655

wells.prod_well(m, t, p, s, tr, trock_matrix, dtime, fi, acc, n2e, nc, z, mat, am, nodes_in_elements)[source]

Description of production well

Parameters:
  • m – mass flux [kg/s]

  • t – inlet temperature [°C]

  • p – pressure at the depth of a well liner [Pa]

  • s – TDS [kg/kg]

  • tr – matrix of rock temperature in nodes belonged to a well (only), nw is a node number tr[n,0] - node number nw where is the side of a well, tr[n,1] - radius of a side of a well [m], tr[n,2] - Z coordinate [m], tr[n,3] - temperature [°C]

  • trock_matrix – the matrix with temperature in nodes at the following time step [°C]. 1D matrix = vector

  • dtime – time step value [s]

  • fi – pipe wall roughness coefficient

  • acc – required accuracy

  • n2e – matrix describing how nodes belonges to elements

  • nc – matrix with nodes coordinates R,Z

  • z – matrix with the Z coordinate

  • mat – the matrix materials linked to elements in a grid

  • am – matrix of temperature equalization factor [m^2/s]

  • nodes_in_elements – matrix includes information how nodes are linked with elements, in rows - number of elements, in columns - number of nodes in an element

Returns:

matrix with parameters at the begining and at the end of n zone. Col 0-rock temperature in nodes belonged to a well, 1-temperature of rock in a side of the well ,2-temperature of brine entering zone n, 3- temperature of brine leaving zone n, 4- pressure of brine entering zone n, 5-pressure of brine leaving zone n, 6- heat convection coefficient in zone n

Note

gravity value g=9.80655

wells.third_type_boundary(nlayer, alfa, tbrine, tnext, tside0, dtime, n2e, twell, nc, z, mat, am, nodes_in_elements)[source]

Collecting all the data set neccessary for temperature of rock in a side of the well estimation

Parameters:
  • nlayer – number of layer in a well

  • alfa – heat convection coefficient [W/(m2 K)]

  • tbrine – the brine (fluid) temperature [°C]

  • tnext – temperature of the next node, linked with an element belonging to a well side, next by radius

  • dtime – time step [s]

  • n2c – nodes in element

  • twell – matrix includes information in rows - number of zones in a well, columns: 0-node number, 1-radius (coordinate R),2-hight counted from the bottom of the well (Z coordinate, 0. = bottom), 3-temperature distribution

  • nc – matrix nodes coordinate

  • z – coordinates of nodes by Z

  • mat – matrix includes information how elements are filled by materials

  • am – matrix of temperature equalization factor [m2/s]

  • nodes_in_elements – matrix includes information how nodes are linked with elements, in rows - number of elements, in columns - number of nodes in an element

Returns:

time on a well side after the time step dtime

wells.twell_convert_twell0(twell0, z)[source]

Function which convert initial parameters of well