freeflow library description

- Introduction

** freeflow** is a library for a mathematical modeling of pressure fields. To start using this library you should type the command:

$ load libfreeflow[info sharedlibextension] |

** freeflow** provides gridding rules, commands and variables. Using freeflow gridding rules with some of surfit gridding rules you can create special gridding algorithms for solving 2d hydrodynamics tasks.

- Description
- Energy state of a productive oil formation is an important indicator used for the correct and effective planning of its further development.
implements the way of pressure fields reconstruction based on the constructing and consecutive minimization of functional sequence. In other words`freeflow`

extends gridding algorithm with new gridding rules. It allows to reconstruct pressure fields from different data of different extent of thruth.`freeflow`

- Two main ways of pressure fields reconstruction

There are two widely-used ways of solving pressure reconstruction problem:

- Interpolation of the so-called "formation pressures", pressures measured in wells after two or three days of shut-down.

- Creation of the mathematical model describing fluid filtration using the language of partial differential equations.

Due to the simplicity of usage, the first way is much more widely used PU (performance unit): there is no necessity in model tuning and algorithms are simply to use. Obtained pressure field is often physically inadequate, nevertheless it is used to analyze energy state of oil formation, to detect boundaries of reduced and raised pressure zones and calculate weighted average pressures within areas.

The second way is usually used in research institutes and model creation is well-expensive. Usually it takes about one year. The significant constraint involuntarily set up to mathematical models described by the terms of partial differential equations is connected with the correctness of a boundary problem. For example, to describe a well in mathematical model we set only fluid rate/injectivity or bottom hole pressure. The simultaneous setting of rates and pressures may lead to incorrect (overdetermined) boundary problem. However, the simultaneous setting of inconsistent data is frequent for solving of underground fluid filtration problems - there is a lot of inconsistent data with different levels of errors. Existent mathematical models require precise data with no errors (rates, pressures, permeability), but it is impossible in the real life. That's why the ability of mathematical model to take into account inconsistent data and data with errors is of high-interest for ** freeflow** authors.

** freeflow** implements the method, which has the features of the both considered ways and has the ability to take into account often inconsistent values of rates and bottom hole pressures in wells.

- Classical statement of the problem in the differential form.

We are considering the task of calculating an pressure field for a homogeneous productive oil formation with a relatively small thickness . In this case the function of the formation pressure can be considered two-dimensional. is obtained by solving the boundary problem:

where is permeability ( ), - liquid viscosity ( ). The vertical wells are described as point sources with volume flow rates of ). The position of horizontal (directional) wells and formation fractures are described by a curve with the curved source density of .

The boundary conditions are:

- - value of pressure on the boundary (oil bearing outer contour);
- - downhole pressures;
- - condition of non-filtration on the curves (boundaries of non-productive formations, tectonic zones).

For a differential equation of elliptical type the simultaneous setting of rates and pressures for the same points and/or curves of the area is incorrect but it is frequent when the formation energy state is studied. In order to use the overdetermined conditions and avoid the incorrectness the boundary problem is re-formulated as a variational problem.

- Variational statement of the problem.

The pressure field is determined as cells of equidistant grid with values:

where ,

For each cell we use the flowing hypothesis:

- cell pressure is a constant value
- liquid viscosity and liquid density are constant for cell
- liquid filtration processes because of different pressure in neighbour cells. Filtration processes in perpendicular direction to borders. For each border constant permeability coefficient is set.

Following linear Darcy law, evalute filtration speeds throuth the cell borders:

where cell permeability in direction, liquid viscosity for (i,j) cell, unit vector in X direction, unit vector in Y direction.

Consider two functionals:

- Pressure in the cell:

- Cell rate: we use well-known variational principle describing filtration in porous medium: among all possible isothermal laminar flows of homogeneous incompressible liquid in cell with heterogeneous borders with filtration speed set, the real filtration flow is that the pressure forces work spent for filtration resistance is minimal. For work of pressure forces in the cell we can write:
implements the law of conservation of mass in the simplest statement : lcm_simple. To represent impermeable lines it is necessary to set zero filtration speed via suitable cell borders. It is effective to use fault gridding rule for that.`freeflow`

For each cell we consider three possible situations:

- We know exact pressure for the cell.

- We know exact cell rate and permeable cell borders.

- We know cell debit with permeable cell borders and pressure for the cell. When we minimize combination of functionals:

where determines degree of reliability for each of the functionals.

In case if we use only 1 and 2 types of functionals to obtain the solution, the solution will be the same as for corresponding boundary problem because we use only consistent data. In case of redundant and inconsistent data we use the third functional.

- Example 1:

On the pictures you can see the results of the proposed algorithm. On the contour showed by a dashed line pressure of 250 atmospheres was set. On the first picture at the center the well with pressure of 200 atmospheres was set. For the second picture in the center rate in 97 m3 per a second was assumed. The third picture is the result of calculation when both pressure and debit were assumed in the center. As you can see this result is approximately in the middle of results, showed in the first and second pictures. It means that we can take into account both of data - pressures and debits that is impossible to get by solving of a boundary problem. This result was obtained from scripts:

- Example 2:

The second example is about determination of formation fracture for Arigol oilfield direction. Two situations were considered: horizontal and vertical formation fracture direction. For this fracture we know the rate and pressure and take them into account writing the combination of two functionals. The result is that the best direction is vertical, because in this case each of the two functionals takes lower values, than for horizontal direction. This criterion is explained by the idea, that the correct fracture direction makes pressure and rate more consistent.

This result was obtained from scripts:

`surfit`: gridding and contouring software.