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.
freeflow
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.There are two widely-used ways of solving pressure reconstruction problem:
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.
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:
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.
The pressure field is determined as cells of equidistant grid with values:
where ,
For each cell we use the flowing hypothesis:
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:
where is an informational weight, determines the level of truth for the well pressure. This functional describes the way of taking into account pressures of the wells, which belong to the (i,j) cell. Differentiation of this functional by leads to the equation:
Differentiation of this expression by leads to law of conservation of mass written for the cell (i,j).
freeflow
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.For each cell we consider three possible situations:
The functional describing pressure is the first to be minimized, the functional describing rate is the second.
he functional describing rate is the first to be minimized, the functional describing pressure is the second.
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.
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:
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.