Morris Muskat et al. developed the governing equations for multiphase flow (one vector equation for each fluid phase) 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 (mostly sandstone) or carbonate rocks.

  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  or  or . Notice that in petroleum engineering the spatial co-ordinate system is right-hand-oriented with z-axis pointing downward. The physical property that links the flow equations of the three fluid phases, is relative permeability of each fluid phase and pressure. This property of the fluid-rock system (i.e. water-oil-gas-rock system) is mainly a function of the fluid saturations, and it is linked to capillary pressure and the flowing process, implying that it is subject to hysteresis effect.

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

  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 permeability 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 structures 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 become

  where a = w, o, g

The above-mentioned case reflected downdip water injection (or updip gas injection) or production by pressure 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 behind casing 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 (using summation convention) is

  where a = w, o, g where  = 1,2,3

The Darcy velocity  is not the velocity of a fluid particle, but the volumetric flux (frequently represented by the symbol ) of the fluid stream. The fluid velocity in the pores  (or short but inaccurately called pore velocity) is related to Darcy velocity by the relation

  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

  where a = w, o, g

We notice that the volumetric flow rate  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 adjoining 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 is usually less than the full side surface of both adjoining cells. A version of the multiphase flow equation, before it is discretized and used in reservoir simulators, is thus

  where a = w, o, g

In expanded (component) form it becomes

  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

  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 are 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

  where a = w, o, g

In order to simplify the terms within the parenthesis of the flow equation, we can introduce a flow potential called the  -potential, pronounced psi-potential, which is defined by

  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 computationally cheaper table-lookup. Introduction of the  -potential implies that

  where a = w, o, g

The psi-potential is also frequently called the "datum pressure", since the function represents the pressure at any point in the reservoir after being transferred to the datum plane / depth z0. In practical engineering work it is very useful to refer pressures measured in wells to a datum level or to map the distribution of datum pressures throughout the reservoir. In this way the direction of fluid movement in the reservoir can be seen at a glance since the datum pressure distribution is equivalent to the potential distribution. Two simple examples will clarify this. A reservoir may consists of several flow units that are separated by tight shale layers. Fluid from one reservoir or flow unit can enter a fault at one depth and exit the fault in another reservoir or flow unit at another depth. Likewise can fluid enter a production well in one flow unit and exit the production well in another flow unit or reservoir.

The multiphase flow equation for porous media now becomes

  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 SI units and we are assuming that all material properties are also defined within the SI units. A result of this is that above versions of the equations do 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 SI units, you must establish correct unit conversion constants for the multiphase flow equations.

Conversion of units 
The above equations are written in SI units (short SI) suppressing that the unit D (darcy) for the absolute permeability is defined in non-SI units. That is why there are no unit-related constants. The petroleum industry doesn't use the SI units. Instead, they use a special version of SI units that we will call Applied SI units, or they use another set of units called Field units which has its origin from US and UK. Temperature is not included in the equations, so we can use the factor-label method (also called unit-factor method) which says that if we have a variable/parameter with unit H, we multiply this variable/parameter by a conversion constant C and then the variable gets the unit G that we want. This means that we apply the transformation H*C = G, and the non-SI effect of the definition of permeability is included in the conversion factor C for permeability. The transformation H*C = G apply for every spatial dimension so we concentrate on the main terms, neglecting the signs, and then complete the parenthesis with the gravity term. Before we start the conversion, we notice that both the original (single phase) the flow equation of Darcy and the generalized (or extended) multiphase flow equations of Muskat et al. are using reservoir velocity (volume flux), volume rate and densities. The units of these quantities are given a prefix r (or R) in order to distinguish them from their counterparts at standard surface conditions which gets a prefix s (or S). This is especially important when we convert the equations to Field units. The reason for going into details in the seemingly simple topic of unit conversion, is that many people make mistakes when doing unit conversions.

Now we are ready to start the conversion work. First, we take the flux version of the equation and rewrite it as

  where a = w, o, g

We want to place the composite conversion factor together with the permeability parameter. Here we note that our equation is written in SI units, and that the group of variables/parameters (hereafter called parameters for short) on the right-hand side constitute a dimensionless group. Now we convert each parameter and collect these conversions into a single conversion constant. Now we note that our list with conversion constants (the C's) goes from applied unit to SI units, and this very common for such conversion lists. We therefore assume that our parameters are entered in applied units and convert them (back) to SI units.

  where a = w, o, g

Notice that we have removed relative permeability which is a dimensionless parameter. This composite conversion factor is called Darcy's constant for the flux formulated equation, and it is

Since our parameter group is dimensionless in base SI units, we don't need to include the SI units in the units for our composite conversion factor as you can see in the second table. Next, we take the rate version of the equation and rewrite it as

  where a = w, o, g

Now we convert each parameter and collect these conversions into a single conversion constant.

  where a = w, o, g

Notice that we have removed relative permeability which is a dimensionless parameter. This composite conversion factor is called Darcy's constant for the flux formulated equation, and it is

The pressure gradient and the gravity term are identical for the flux and the rate equations, and will, therefore, be discussed only once. The task here is to have a gravity term that is consistent with the applied units ("H-units") for the pressure gradient. We must, therefore, place our conversion factor together with the gravity parameters. We write "the parenthesis" in SI units as

  where a = w, o, g

and rewrite it as

  where a = w, o, g

Now we convert each parameter and collect these conversions into a single conversion constant. First, we note that our equation is written in SI units, and that the group of parameters on the right-hand side constitute a dimensionless group. We, therefore, assume that our parameters are entered in applied units and convert them (back) to SI units.

  where a = w, o, g

This gives the composite conversion factor for the consistency-conversion as

Since our parameter group is dimensionless in SI units, we don't need to include the SI units in the units for our composite conversion factor as you can see in the second table.

This is it for the analytical equations, but when the programmer transform the flow equation into a finite difference equation and further into a numerical algorithm, they are eager to minimize the number of computational operations. Here is an example with two constants that can be reduced to one by the fusion

Using industry units, the flux version of the flow equation in vector form becomes

  where a = w, o, g

and in component form it becomes

  where a = w, o, g where  = 1,2,3

Using industry units, the rate version of the flow equation in vector form becomes

  where a = w, o, g

and in component form it becomes

  where a = w, o, g

Conversion of units is a fairly rare activity, even for technical professionals, but that is also the reason why people forget how to do it correctly.

See also 

 Petroleum reservoir
 Reservoir engineering
 Reservoir modeling
 Reservoir simulation
 Black oil equations

 Conversion of units – includes tables of conversion factors
 Dimensionless numbers in fluid mechanics
 Fermi problem – used to teach dimensional analysis
 Rayleigh's method of dimensional analysis
 Similitude (model) – an application of dimensional analysis
 System of measurement
 Units of measurement
 List of dimensionless quantities
 Orders of magnitude (numbers)
 Dimensional analysis
 Normalization (statistics) and standardized moment, the analogous concepts in statistics
 Buckingham π theorem

References 

Fluid dynamics