User:Frode54/sandbox

Morris Muskat et al developed the governing equation for multiphase flow in porous media as a generalisation of Darcy's equation (or Darcy's law) for water flow in porous media. The porous media are usually sedimentary rocks such as clastic rocks or carbonate rocks.


 * $$\mathbf{u}_a = -\mu_a^{-1} K_{ra} \mathbf{K} \cdot \left( \nabla P - \rho_a \mathbf{g} \right) $$ where a = w, o, g

The present fluid phases are water, oil and gas, and they are represented by the subscript a = w,o,g respectively. The gravitational acceleration with direction is represented as $$ \mathbf{g} $$ or $$ g\nabla z $$ or $$ g{e_z}{^{3}} $$. Notice that in petroleum engineering the spacial co-ordinate system is right-hand-oriented with z-axis pointing downward.

In 1940 M.C. Leverett pointed out that in order to include capillary pressure effects in the flow equation, the pressure must be phase dependent. The flow equation then becomes


 * $$\mathbf{u}_a = -\mu_a^{-1} K_{ra} \mathbf{K} \cdot \left( \nabla P_a - \rho_a \mathbf{g} \right) $$ where a = w, o, g

Leverett also pointed out that the capillary pressure shows significant hysteresis effects. This means that the capillary pressure for a drainage process is different from the capillary pressure of an imbibition process with the same fluid phases. Hysteresis does not change the shape of the governing flow equation, but it increases (usually doubles) the number of constitutive equations for properties involved in the hysteresis.

During 1951-1970 commercial computers entered the scene of scientific and engineering calculations and model simulations. Computer simulation of the dynamic behaviour of oil reservoirs soon became a target for the petroleum industry, but the computing power was very weak at that time.

With weak computing power, the reservoir models were correspondingly coarse, but upscaling of the static parameters were fairly simple and partly compensated for the coarseness. The question of upscaling relative permeability curves from the rock curves derived at core plug scale (which is often denoted the micro scale) to the coarse grids cells of the reservoir models (which is often called the macro scale) is much more difficult, and it became an important research field that is still ongoing. But the progress in upscaling was slow, and it was not until 1990-2000 that directional dependency of relative permerability and need for tensor representation was clearly demonstrated, even though at least one capable method was developed already in 1975. One such upscaling case is a slanted reservoir where the water (and gas) will segregate vertically relative to the oil in addition to the horizontal motion. The vertical size of a grid cell is also usually much smaller than the horizontal size of a grid cell, creating small and large flux areas respectively. All this requires different relative permeability curves for the x and z directions. Geological heterogeneities in the reservoirs like laminas or crossbedded permeability struktures in the rock, also cause directional relative permeabilities. This tells us that relative permeability should, in the most general case, be represented by a tensor. The flow equations then becomes


 * $$\mathbf{u}_a = -\mu_a^{-1} \mathbf{K}_{ra} \cdot \mathbf{K} \cdot \left( \nabla P_a - \rho_a \mathbf{g} \right) $$  where a = w, o, g

The above mentioned case reflected downdip water (or updip gas) injection or production be depletion. If you inject water updip (or gas downdip) for a period of time, it will give rise to different relative permeability curves in the x+ and x- directions. This is not a hysteresis process in the traditional sense, and it cannot be represented by a traditional tensor. It can be represented by an IF-statement in the software code, and it occurs in some commercial reservoir simulators. The process (or rather sequence of processes) may be due to a backup plan for field recovery, or the injected fluid may flow to another reservoir rock formation due to an unexpected open part of a fault or a non-sealing cement in the annulus of the injection well. The option for relative permeability is seldom used, and we just note that it does not change (the analytical shape of) the governing equation, but increases (usually doubles) the number of constitutive equations for the properties involved.

The above equation is a vector form of the most general equation for fluid flow in porous media, and it gives the reader a good overview of the terms and quantities involved. Before you go ahead and transform the differential equation into difference equations, to be used by the computers, you must write the flow equation in component form. The flow equation in component form is


 * $$u{_a}^\sigma = -\mu_a^{-1} K_{ra}{^\sigma}_{\beta}  K{^\beta}_{\gamma}  \left( \nabla^{\gamma} P_a - \rho_a g {e_z}{^{\gamma}} \right) $$  where a = w, o, g where $$\sigma$$ = 1,2,3

The Darcy velocity $$ \mathbf{u}_a $$ is not the velocity of a fluid particle, but the volumetric flux (frequently represented by the symbol $$ \mathbf{q}_a $$) of the fluid stream. The fluid velocity in the pores $$ \mathbf{v}_a $$ (or short but inaccurately called pore velocity) is related to Darcy velocity by the relation


 * $$\mathbf{v}_a = \phi^{-1} \mathbf{q}_a = \phi^{-1} \mathbf{u}_a $$ where a = w, o, g

The volumetric flux is an intensive quantity, so it is not good at describing how much fluid is coming per time. The preferred variable to understand this is the extensive quantity called volumetric flow rate which tells us how much fluid is coming out of (or going into) a given area per time, and it is related to Darcy velocity by the relation


 * $$Q_a = \mathbf{A} \cdot \mathbf{u}_a $$ where a = w, o, g

We notice that the volumetric flow rate $$Q_a $$ is a scalar quantity, and that the direction is taken care of by the normal vector of the surface (area) and the volumetric flux (Darcy velocity).

In a reservoir model the geometric volume is divided into grid cells, and the area of interest now is the intersectional area between two adjoing cells. If these are true neighboring cells, the area is the common side surface, and if a fault is dividing the two cells, the intersection area are usually less than the full side surface of both adjoining cells. A version of the multiphase flow equation that is discretized and used in reservoir simulators is thus


 * $$Q_a = -\mu_a^{-1} \mathbf{A} \cdot \mathbf{K}_{ra} \cdot \mathbf{K} \cdot \left( \nabla P_a - \rho_a \mathbf{g} \right) $$ where a = w, o, g

In expanded (component) form it becomes


 * $$Q{_a} = -\mu_a^{-1} A{_{\sigma}} K_{ra}{^\sigma}_{\beta} K{^\beta}_{\gamma}  \left( \nabla^{\gamma} P_a - \rho_a g {e_z}{^{\gamma}} \right) $$  where a = w, o, g

The (initial) hydrostatic pressure at a depth (or level) z above (or below) a reference depth z0 is calculated by


 * $$P{_a} = P_{a0} + \int\limits_^{z}  \rho_a \left( z \right) g \left( z \right) dz $$  where a = w, o, g

When calculations of hydrostatic pressure are executed, one normally does not apply a phase subscript, but switch formula / quantity according to what phase is observed at the actual depth, but we have included the phase subscript here for clarity and consistency. However, when calculations of hydrostatic pressure is executed one may use an acceleration of gravity that varies with depth in order to increase accuracy. If such high accuracy is not needed, the acceleration of gravity is kept constant, and the calculated pressure is called overburden pressure. Such high accuracy is not needed in reservoir simulations so acceleration of gravity is treated as a constant in this discussion. The initial pressure in the reservoir model is calculated using the formula for (initial) overburden pressure which is


 * $$P{_a} = P_{a0} + g \int\limits_^{z}  \rho_a \left( z \right) dz $$  where a = w, o, g

In order to simplify the terms within the parentesis of the flow equation, you can introduce the fluid potential (also called $$\psi $$ -potential) which is defined by


 * $$\psi_a = P{_a} - g \int\limits_^{z}  \rho_a \left( z \right) dz $$  where a = w, o, g

It consists of two terms which are absolute pressure and gravity head. To save computing time the integral can be calculated initially and stored as a table to be used in the computantionally cheaper table-lookup. Introduction of the fluid potential implies that


 * $$\nabla \psi_a = \nabla P_a - \rho_a g \nabla z $$ where a = w, o, g

The multiphase flow equation for porous media now becomes


 * $$Q_a = -\mu_a^{-1} \mathbf{A} \cdot \mathbf{K}_{ra} \cdot \mathbf{K} \cdot \nabla \psi_a $$ where a = w, o, g

This multiphase flow equation has traditionally been the starting point for the software programmer when he/she starts transforming the equation from differential equation to difference equation in order to write a program code for a reservoir simulator to be used in the petroleum industry. The unknown dependent variables have traditionally been oil pressure (for oil fields) and volumetric quantities for the fluids involved, but one may rewrite the total set of model equations to be solved for oil pressure and mass or mole quantities for the fluid components involved.

The above equations are written in basic SI units which does not need any unit conversion constants. The petroleum industry applies a variety of units, of which a least two have some prevalence. If you want to apply units other than basic SI units, you must establish correct unit conversion constants for the multiphase flow equations.