Sunteți pe pagina 1din 122

What Goes Into Reservoir Simulation?

The basic tool for conducting a reservoir simulation study is a simulator. The development of

this tool requires a good understanding of the physical processes occurring in reservoirs and

a high level of sophistication and maturity in advanced mathematics and computer

programming. Although simulation engineers generally do not get involved in actual software

development, the effective use of reservoir simulators requires that they at least appreciate

what goes into this development.

Like any tool, a reservoir simulator has its strength and limitations, and it is well to keep in

mind the various assumptions that factor into its development. This is not to suggest that all

simulation engineers must be expert programmers; rather, they must be intelligent users.

Therefore, knowledge and understanding of the simulation process are necessary precursors

to a reservoir simulation study.

At first, a simulation study might look like a once-and-for-all exercise. In truth, however, it is

an evolutionary process, throughout which we continually refine our conceptual understanding

of the system. While we cannot overemphasize the importance of accurate reservoir

description in a good reservoir simulation study, we must at the same time acknowledge that

the data needed for an accurate description is seldom available; invariably, studies start out

with less than complete data. However, by carefully analyzing and interpreting the voluminous

information generated during the study, we should be able to refine and extend the input data

base. Such refinement should lead to a better understanding of the system and, ultimately, to

a better reservoir description. Of course, this requires some agility and creativity; there is no

such thing as a casual simulation engineer.

It is, therefore, apparent that there are three basic interwoven components that go into a

simulation study. These are:

The tool: reservoir simulator

The intelligent user: simulation engineer

The pertinent information: reservoir description

Figure 1 depicts the necessary interactions among the simulation engineer, the simulator and the reservoir description.

Figure 1
Figure 1

The engineer is clearly the prime mover in conducting the simulation study, and must be in control of other study components.

This control involves:

being cognizant of the simulator’s limitations and the assumptions that go into its development

being able to adequately describe the reservoir

being fully conversant with the analytical techniques

involved in interpreting the results.

Based on the initial results, it is not uncommon for the simulation engineer to revisit the appropriateness of the reservoir description through concept refinement.

Why Do We Need Reservoir Simulation?

The information we obtain from a newly discovered field is scanty at best. It is also disjointed

to a certain extent, because bits and pieces of information are emanating from different parts

of the field. Our first task is to integrate these pieces of information as accurately as possible

in order to construct a global picture of the system. A reservoir simulation study is the most

effective means of achieving this end. As field development progresses, more information

becomes available, enabling us to continually refine the reservoir description.

Once we establish a good level of confidence in our reservoir description, we can use the

simulator to perform a variety of numerical exercises, with the goal of optimizing field

development and operation strategies. We are often confronted with questions such as

what is the most efficient well spacing?

what are the optimum production strategies?

where are the external boundaries located?

what are the intrinsic reservoir properties?

what is the predominant recovery mechanism?

when and how should we employ infill drilling?

when and which improved recovery technique should we

implement?

These are but a few of the critical questions we may need to answer. A reservoir simulation study is the only practical laboratory in which we can design and conduct tests to adequately address these questions. From this perspective, reservoir simulation is a powerful screening tool.

What are the Simulation Approaches?

The complexity of the problem at hand, the amount of data available, and the study’s

objectives invariably dictate the choice of reservoir simulation approach, granted that we have

already taken into account the appropriate computational environment (both in terms of

hardware and software).

Broadly classified, there are two simulation approaches we can take: analytical and

numerical.

The analytical approach, as is the case in classical well test analysis, involves a great deal of assumptions—in essence, it renders an exact solution to an approximate problem.

The numerical approach, on the other hand, attempts to

solve the more realistic problem with less stringent

assumptions—in other words, it provides an approximate

solution to an exact problem.

From here on, we use the term simulation rather loosely to refer only to the numerical approach.

The domain of interest can form another level of categorization for simulation approach and model selection. For instance, a study may focus on a single well and its interaction with the reservoir within its drainage area (i.e., single-well simulation in radial-cylindrical coordinate system). The other extreme case may be the study of an entire field (field-scale simulation in rectangular coordinate system) in which the overall performance analysis of the field is called for. In between these two extremes comes the case where only a section of the reservoir is targeted (window-study).

Figure 2
Figure 2

Figure 2 schematically represents these three simulation approaches.

What are the Basic Steps of a Simulation Study?

In general, a reservoir simulation study involves five steps:

Setting objectives

Selecting the model and approach

Gathering, collecting and preparing the input data

Planning the computer runs, in terms of history matching

and/or performance prediction

Analyzing, interpreting and reporting the results

A critical step is selecting the model and the approach. We must decide at the outset how many dimensions will be adequate. Such decisions depend on the flow dynamics involved and the amount of detail required. There may be cases when a two-dimensional representation is sufficient to describe a thin reservoir, whereas a three-dimensional model is unavoidable in the case of a thick reservoir. The expected flow structure dictates the choice of the model’s coordinate system. For example, in most single well studies, we may use radial-cylindrical flow geometry. However, if a well is vertically fractured, we should assign an elliptical-cylindrical flow geometry. We also have to decide how best to represent physical phenomena. For instance, if compositional variation is important, we may have to employ a compositional simulator rather than the more commonly used "black oil" model. Similarly, if we intend to study a coalbed methane reservoir, we must use a specialized model that accounts for the desorption process.

One of the most labor-intensive aspects of reservoir simulation study is data gathering,

collection and preparation. Oftentimes, this requires collaboration among technical personnel

with varying levels of expertise. For instance, geological and geophysical data are extremely

crucial and need to be processed in the form that is useful for reservoir description. Data will

be often be sparse or incomplete. In such situations, statistics or other tools can prove quite

helpful. Because of the large volume of data being processed at this stage, and the likelihood

of internal inconsistencies in the data, the engineer must have strong organizational skills and

sound judgment.

In simulation studies, time (both the engineer’s and the computer’s) is of the essence. A

typical simulation study requires a large number of runs, which must be carefully orchestrated

to yield the desired information. As we make each run, we must carefully analyze the results,

and appropriately label them to avoid confusion and costly duplications. In addition, we must

avoid runs that yield no new information. It is pertinent, therefore, to take into account the

inferences from the previous runs in planning the next suite of runs.

Perhaps the most important step in a simulation study is analyzing and interpreting the

results. It is at this stage that our creative and discerning abilities are put to the test. As

tempting as it may be to do so, we should not view every number that comes out of the

computer as the absolute answer. Instead, we must always be asking questions such as,

"what if? what then? why? so what?" In this way, we bring into play our experience, common

sense, and perhaps sometimes extraneous knowledge.

A simulation study’s ultimate objective is to forecast reservoir performance. If we have

selected the correct model, adequately prepared our data, conducted the appropriate

computer runs, and made good, informed analyses, we should be confident of our ability to

predict performance. Any mistakes we make in the previous steps will have a cumulative impact on performance prediction.

We must communicate study results in an appropriate manner to other technical personnel and to management. This should be in the form of a comprehensive technical report with sufficient details for others to assess the study’s quality.

How are Reservoir Simulators Used?

A reservoir simulator can be an effective tool for screening, analysis and design. The thought process that goes into appropriately using a simulator for these purposes, however, is quite involved. Figure 3 illustrates the interactions inherent in this thought process.

Figure 3
Figure 3

The cornerstones of a reservoir simulator are the mathematical model, laboratory

investigation (laboratory data), field observations and the computer code. In using reservoir

simulators, these cornerstones generate signals, which propagate and interact with each other such that a continuous feedback takes place for the mutual benefit and enhancement of all the parts. For example, laboratory investigation, field observations and the computer code can highlight the need for improvement in the mathematical formulation. Similarly, a computer code originated from a robust formulation, together with pertinent field observations, may shed light on the validity of the experimental approach taken in the laboratory. This dynamic interaction illustrates the self-enhancing nature of reservoir simulators.

What Does a Simulation Study Require?

A simulation study is a challenging and demanding task, loaded with opportunities to learn

more about the reservoir. To reap the full benefits of this powerful tool, it is imperative to

recognize the proper roles of the engineer and of the reservoir simulator. In a successful

study, neither of these can afford to dominate the other. The engineer should not demand

from the simulator what it is not meant to do, but neither should he or she become overly

dependent on the simulator. In a nutshell, the success of a simulation study hinges on a

combination of a good engineer and the right simulator.

Steps in a Simulation Study

There are five basic steps in conducting a reservoir simulation study:

setting concrete objectives for the study

selecting the proper simulation approach

preparing the input data

planning the computer runs (including the order in which they occur)

analyzing the results

Setting the Objectives

Setting objectives is the most important step in conducting a simulation study. Clearly defined objectives help us obtain the best information at the lowest cost and in the least amount of time. Improperly set objectives can take the study on a long, roundabout journey which leads to nowhere.

There are a number of factors that help us define appropriate objectives. The most important of these are data availability, the required level of detail, availability of technical support and available resources. In setting objectives , we use all of these factors to determine how to proceed. For example, it is unrealistic to attempt three-dimensional simulation when the available geological data gives no information about the presence and description of the various formation layers present in the reservoir.

In the broadest sense, when we consider all these factors, we will arrive at one of two types of objectives. These are sufficiently distinct that they affect the entire planning process of the simulation study. One type of objective is fact-finding, while the other is to establish an optimization strategy.

Fact-finding involves answering questions about a system or process that is already in place. For example, a simulation study that matches well test data for the purpose of determining the damaged zone around a wellbore is a fact-finding mission.

Optimization involves developing a number of plausible scenarios for a process (e.g., waterflooding) and studying the

system response in an attempt to determine the optimum scenario. In this case,we must design a suite of numerical exercises, being careful to avoid waste on exercises that may not significantly contribute toward the goal.

Choosing the Simulation Approach

In choosing the simulation approach, we need to consider three basic factors:

reservoir complexity

fluid type

scope of the study

While reservoir complexity and the scope of the study determine the simulator’s dimensions and coordinate geometry, the fluid type (together with the processes involved) dictate whether we should use a black-oil model or a more specialized model. For example, predicting well performance in a gas condensate reservoir will require a compositional rather than a black oil simulator. Furthermore, if the reservoir is thin and unlayered, it will be sufficient to use a one-dimensional radial flow geometry. Carrying out such a study with a three-dimensional compositional simulator will require additional computational resources whose added benefit cannot be justified. In any case, we must exercise our judgement and ingenuity in selecting the most appropriate simulation approach.

Preparing the Input Data

Because simulation studies usually require large volumes of information from a wide range of sources, preparing the input data can be a laborious task. However, the time spent in ensuring that data are properly prepared is worthwhile, in that it can prevent a great deal of headaches and waste later on in the study. Often, we discover data input errors only after a problem surfaces during the run, which wastes both time and computing resources.

It is our responsibility to ensure internal consistency in the data. Because data come from different sources, internal inconsistencies are not uncommon. We should resolve inconsistencies during the data input preparation. When data inconsistencies are present, they can lead to an ill-posed problem. Even worse, they could go undetected. With an ill- posed problem, we may be able to find the inconsistency by the failure of the simulator to run; but in the case of buried inconsistencies, the simulator may run and yield erroneous solutions.

Pre-processing capability, particularly for the commercial codes currently available, can facilitate data preparation. Sometimes these processors have internal checks to flag any detected inconsistencies in the data.

While data preparation is the simulation engineer’s job, input from other supporting personnel is extremely important. If inconsistencies appear in the data, or even if some data appear doubtful, it is imperative to resolve the problem with the help of the geologist, geophysicist and perhaps the production engineer. In summary, there is no overemphasizing the importance of adequate data preparation prior to making a simulation study. The payoff is exceptionally good.

Planning the Computer Runs

Planning computer runs is deceptively simple. To understand the necessity and the complexity of this planning, we only need to imagine a simulation study as a complex road map where the traveler knows the point of origin and the destination (these are clear enough

from the objectives of the study). However, just as a traveler requires careful mapping out of the route that will get him or her to the destination in the best time possible, we must carefully map out the type and number of computer runs that will achieve the set objectives at a minimum cost. In so doing, we must account for several factors, which are usually problem dependent. We should consider the number of parameters to be examined, the duration of prediction, and the type of information needed to answer the pertinent questions.

Careful planning of computer runs includes not only determining their order, but also establishing a systematic labeling procedure for them. This is particularly important because of the large number of runs usually required and the voluminous amount of information invariably generated for analysis.

Analyzing the Results

When we have analyzed the results of the simulation study and made pertinent inferences from it, we can evaluate its success. This step caps all the efforts previously discussed. Considering the amount of effort that we expend on the simulation study up to this point, it is tempting to become a biased arbiter of the results. On the contrary, this is the time to ask critical questions and even ponder over the implications of the results. In other words, we must not become easy subscribers to our solutions.

The mode of analysis and the presentation of results will depend very largely on the audience for whom they are meant and the post-processing capability available. The graphics capabilities currently available on most computers makes this process easier and even more inviting. It is now not uncommon to display information using three-dimensional graphics. In addition, graphics features, such as image rotation and animation, enhance our interpretation and inferential ability.

Reservoir Rock Properties

The essential rock properties in reservoir simulation are those that govern the rock’s storage capacity and spatial distribution; its ability to conduct fluids; and its spatial and directional distributions

Porosity

Porosity is a measure of a rock’s storage capacity. In reservoir simulation, we are primarily interested in interconnected pore space. From here on, therefore, we shall understand porosity to mean effective porosity. Effective porosity is a dimensionless quantity, defined as the ratio of interconnected pore volume to the bulk volume. In an idealized arrangement of grains of uniform size the maximum porosity value is 47.64% for cubic packing, and the minimum is 25.96% for rhombohedral packing ( Figure 1 ). However, naturally-occurring reservoirs do not conform to these theoretical limits, due to syn- and post-depositional processes that have taken place (in addition to non-sphericity of the grains). Their porosity can vary widely.

Figure 1
Figure 1

In the flow equations used in reservoir simulation, porosity appears as one of the parameters that scales the volume of fluids present in the reservoir at any time. During production, this volume is depleted, and reservoir pressure drops. The higher the reservoir’s porosity, the less this pressure decline will be over time. The special case in which porosity does not appear in the flow equation is the single-phase incompressible flow system. As we will discuss later, in such a flow system, there is neither accumulation nor depletion, and so porosity vanishes. In the other extreme, there are reservoirs in which porosity changes with pressure, and so appears in the equation as a function of pressure rather than as a constant value.

Permeability

Absolute permeability is a measure of a rock’s ability to transmit fluid. For a hydrocarbon reservoir to be commerical, it must not only be porous, but also permeable. Permeability is analogous to conductivity in heat flow. Since it is a measure of resistance to flow, a higher permeability reservoir experiences less pressure drop than a corresponding low permeability reservoir. The dimension of permeability is length squared [L ], and its practical field unit is darcy or millidarcy. One darcy is approximately equal to 10 -8 cm 2 .

2

Permeability varies widely in naturally occurring reservoirs, from a fraction of a millidarcy to several darcies. Similar to porosity, the permeability of a reservoir could be a function of pressure. Permeability is a key parameter controlling the propagation of transients created by

conditions imposed at the well. It does not determine ultimate recovery, but rather the rate of this recovery.

Homogeneous vs. heterogeneous systems

Homogeneous systems feature uniform spatial distribution, while heterogeneous systems exhibit non-uniform distribution. For simplicity’s sake, we often assume homogeneity in reservoir calculations, even though many reservoirs are heterogeneous. This is where numerical reservoir simulation becomes a very powerful tool, because it allows us to incorporate property variation in the system. It is important that when we describe a reservoir as homogeneous, we specify the property of reference (e.g., "this reservoir is homogeneous with respect to porosity but heterogeneous with respect to permeability"). Although reservoir simulation equations can accommodate property variation within the domain of interest in significant detail, such detailed information may be unavailable, or at best, very sketchy. In such cases, we must employ interpolation techniques and history matching exercises.

Isotropic and anisotropic systems

Some parameters used in reservoir simulation exhibit directional dependency. A reservoir exhibits isotropic property distribution if that property has the same value regardless of the direction in which we measure it. On the other hand, if a property’s value does vary with direction, then the reservoir is anisotropic with respect to that property. One should be careful to note that only those properties that are not volume-based can exhibit directional dependency. Porosity, for example, is a volume-based property by definition. It utilizes all three dimensions, and therefore has zero degrees of freedom in terms of directional variation. Permeability, by contrast, has the dimension of area, leaving one direction in which it can vary. Figure 2 shows all possible permutations of isotropic, anisotropic, homogeneous and heterogeneous systems for two-dimensional cases.

all possible permutations of isotropic, anisotropic, homogeneous and heterogeneous systems for two-dimensional cases.

Figure 2

The existing anisotropy determines the orientation of a coordinate system’s principal axes. In most applications, reservoir simulators employ orthogonal coordinate systems, where all the axes are mutually perpendicular. It is imperative to align these axes with the principal flow directions, so that we may eliminate the six off-diagonal elements of the permeability tensor, and be left with three diagonal elements in a three-dimensional system (two for a two- dimensional system). Otherwise, an incorrect representation of the system results, as shown in Figure 3 .

Figure 3
Figure 3

Reservoir Fluid Properties

Fluid properties, like rock properties, significantly affect fluid flow dynamics in porous media. Unlike rock properties, however, fluid properties exhibit significant pressure dependency. Therefore, it is often necessary in reservoir simulation to estimate these properties using correlations and/or equations of state.

Gas properties

In calculating gas properties such as density, compressibility and formation volume factor, we often use the real gas law as our basis. For more rigorous calculations, we might use a modern engineering equation of state such as the Peng-Robinson equation of state. Invariably, these calculations express density as a function of pressure and temperature.

The properties of interest in the gas flow equation are density, compressibility factor, compressibility, formation volume factor and viscosity. Density appears in the gravity term, and it is often neglected. The compressibility factor introduces an important non-linearity, in that it appears in the formation volume factor. Gas viscosity is also strongly dependent on pressure, and needs to be calculated as pressure varies spatially and temporally. Figure 4 summarizes the equations and correlations necessary for determining gas properties.

Figure 4
Figure 4

Oil properties

Oil properties that appear in the governing flow equations for the oil phase are density, compressibility, formation volume factor, viscosity and solubility of gas in oil. In the absence of gas, these oil properties can be treated as constants, because the compressibility of gas-free oil is very small. However, the presence of dissolved gas in oil necessitates the use of appropriate correlations to determine the variation of these properties with pressure and temperature. A recent review of the available correlations has been provided by McCain (1991). We can also use modern equations of state to calculate these properties.

Theoretically, an infinite amount of gas can dissolve in oil, provided that adequate pressure is available. Accordingly, if pressure is available, it is conceivable that there will be no free gas (undersaturated reservoirs). If pressure is not sufficient some of the gas will exist in the free state (saturated reservoirs). A typical simulation calculation may traverse saturated and undersaturated conditions. Most reservoir simulators implement variable bubble-point algorithms to handle these situations. Figure 5 shows the qualitative variation of several of these properties.

Figure 5
Figure 5

Water properties

McCain (1991) provides correlations for estimating such water properties as density, compressibility, formation volume factor, viscosity and gas solubility. Since gas solubility in water is very small compared to oil, for most practical cases, we assume constant values for these properties that come into play in the water flow equation.

Reservoir Rock/Fluid Interactions

Reservoir fluid flow is governed by complex interactions between the fluids and the reservoir rock. These interactions become more complicated when, as is often the case, two or more fluids are present in the same pore. When a driving force acts on such systems, the fluids compete in motion, because their movement is mutually dependent. To appropriately describe the simultaneous flow of two or more fluids in a porous medium requires a good understanding of both the fluid-fluid and rock-fluid interactions.

Wettability and interfacial tension

The principal fluids in a petroleum reservoir are water, oil and gas. When they exist as free phases, they are generally immiscible (Note: this discussion does not consider emulsions or dissolved gases). When these immiscible fluids co-exist in the reservoir pore space, their interactions with one another and with the containing rock control their spatial distribution and movement. The two principal properties used to quantify these interactions are wettability, which pertains to rock-fluid interactions, and interfacial tension, which relates to fluid-fluid interactions.

When two immiscible fluids co-exist in the same pore space, one preferentially adheres to the rock surface. This phenomenon is known as wetting, and the fluid that is preferentially attracted is referred to as having a higher wettability index. The parameter which determines the wettability index is called adhesion tension, and it is directly related to interfacial tension.

Interfacial tension is a measure of the surface energy per unit area of the interface between two immiscible fluids. Examples of such interfaces include the junction between water and

crude oil and the junction between oil and gas. Figure 6 depicts an oil-water interface.

Figure 6
Figure 6

The study of surface energy phenomena is very important in recovery processes, in that many EOR processes are based on altering the surface energy so as to favor oil recovery. They work on the principle that all interfaces existing under equilibrium conditions have some free energy associated with them. As a two-phase system approaches equilibrium, the interface assumes a configuration that tends to minimize the free surface energy, unless otherwise constrained by external forces. Examples of this behavior abound in nature. A rain drop falling in a vacuum assumes a spherical shape, since this is the geometrical shape that minimizes surface area and, therefore, surface energy. A rain drop falling through the atmosphere would do the same thing, except that an external drag force constrains it from doing so. For this reason, it has a "tear-drop" shape.

Interfacial tension is the surface energy per unit area of a fluid interface. It has units of force per length. For any fluid having contact with a solid surface, the contact between the fluid and the solid has a certain value of interfacial tension associated with it. What differentiates fluids from one another in terms of relative wettability are their values of fluid/solid interfacial tension. The lower the solid-fluid interfacial tension, the lower the surface energy and the higher the tendency for the fluid to wet that surface.

For two immiscible co-existing fluids in porous media, the one with the lower interfacial tension is the wetting phase, while the other is the non-wetting phase. There is a definite relationship between the solid/wetting phase interfacial tension, the solid/non-wetting phase interfacial tension, and the wetting/non-wetting phase interfacial tension. The Young-Dupres equation (Equation 2.1) expresses this relationship.

γSN - γSW = γWN cosθ (2.1)

where

γSN = solid/non-wetting phase interfacial tension

γSW = solid/wetting phase interfacial tension

γWN = wetting/non-wetting phase interfacial tension

θ = angle of contact between the fluid and the rock

Relative permeability

When two or more immiscible fluids flow simultaneously through a porous medium, they compete and do not move at equal velocity. This results on the one hand from interactions between the fluids and the rock, and on the other from interactions among the fluids themselves. As previously mentioned, this manifests itself in interfacial tensions.

Interfacial tensions are not transport properties, and so we cannot use them directly to qualitatively characterize relative motion. We can, however, observe the relative ease with which each of the two competing fluids go through the porous medium—that is, we can measure the relative permeability.

Although relative permeability is not a fundamental property of fluid dynamics, it is the accepted quantitative parameter used in reservoir engineering. Relative permeability appears prominently in the flow equations used in reservoir simulation.

By definition, relative permeability is the ratio of the effective permeability, when more than one fluid is present, to the absolute permeability. Effective permeability is the measured permeability of a porous medium to one fluid when another is present. The effective permeability depends on the relative proportion of the two fluids present, or fluid saturation. Therefore, relative permeability is also a function of fluid saturation. Although there are models for predicting relative permeability, they are all empirically formulated from measured data sets. Figure 7 shows typical relative permeability curves for an oil-water system.

Figure 7
Figure 7

Figure 7 depicts relative permeability as a function of water saturation for a two-phase system. We therefore refer to it as two-phase relative permeability. If a third phase is present, then each fluid has its own relative permeability, which differs from the corresponding two- phase relative permeability.

Because it requires a three-dimensional representation, three-phase relative permeability is often shown on ternary diagrams, with isoperms displayed at various saturation combinations. Leverett and Lewis (1941) were one of the first to use this representation. Figure 8 shows a typical relative permeability curve for a three-phase oil/gas/water system.

Figure 8
Figure 8

Successful simulation of a multiphase system hinges on adequate relative permeability information. Since relative permeability is a function of saturation, which varies over a reservoir’s life, the best way to get adequate information is to incorporate relative permeability models into the reservoir simulator. Several models are available (Honapour, et al. 1986), each claiming varying degrees of merit. The simulation engineer must determine which model is appropriate. Table 1 lists some common relative permeability models.

Table 1
Table 1

Capillary pressure

In everyday experience, water levels in two or more connected containers have the same level if exposed to the same atmosphere. But when it comes to spaces of capillary size (like those we encounter in porous media), we cannot take this rule so literally. To illustrate, consider what happens when a glass tube of capillary size is dipped in a larger container filled with water ( Figure 9 ).

Figure 9
Figure 9

The water in the capillary tube rises above the water level in the container to a height that depends on the capillary size. Although strictly speaking, the water still finds its level, it does so in such a way as to maintain an overall minimum surface energy.

In this situation, the adhesion force allows water to rise up in the capillary tube while gravity

opposes it. The water rises until there is a balance between these two opposing forces. The differential force between adhesion and gravity is the capillary force. This force per unit area

is the capillary pressure. As we might surmise from these observations, there is a relationship

between capillary pressure, P c , and the interfacial tension between the two fluids (in the case

of Figure 9 , water and air).

<

where

(in the case of Figure 9 , water and air). < where (2.2) P c =

(2.2)

P c = capillary pressure

γwn = wetting/non-wetting phase interfacial tension

R = radius of the tube

θ = angle of contact between the solid surface and liquid

Note that the exact opposite happens if the fluid is the non-wetting phase with respect to the tube material. The classic example is oil and mercury in a glass capillary tube, where, instead

of capillary rise, there occurs capillary fall.

Capillary pressure is important in porous media flow description because of the saturation distribution in the capillary-like pore spaces. A plot of capillary pressure versus water saturation has a typical shape, as shown in Figure 10 .

Figure 10
Figure 10

It is interesting to note the hysteresis between the capillary curves for a drainage process (where wetting phase saturation is decreasing) and an imbibition process (where wetting phase saturation is increasing).

Microscopic Properties

Reservoir fluid flow is a fundamentally complex process. Fluid movement depends not only on the fluids themselves, but also on how the fluids interact with the porous medium, which in effect is a huge capillary network. Then, there is the pore structure itself to worry about. On a scientific level, understanding these microscopic properties is a must if we are to capture the essence of the system. However, engineers thrive on approximation, and reservoir simulation engineers are no exception. Using global properties such as permeability, porosity, relative permeability, and capillary pressure, one attempts to procure the best information possible. As research progresses into reservoir characterization, improvement in the modeling approach is inevitable. Meanwhile, we must learn all we can through approximate models.

Flow Geometries and Dimensions

The same factors that dictate our choice of coordinate systems play a dominant role in our deciding how many dimensions to assign to a problem. Engineering, to a large extent, is a marriage between pure science and practical reality. In other words, selecting a higher number of dimensions to represent a system may be scientifically correct, but we may lack the information or the computational overhead needed to assign this many dimensions. So,

we assign fewer dimensions and settle for a less-than-ideal problem definition. Such compromise may seem drastic. But in reality, for most engineering problems, we can generate an adequate amount of information even within these limitations.

Rectangular flow geometry

Rectangular geometry is the one that is most familiar to us, as engineers, dating back to our high school calculus. In reservoir modeling we often use this familiarity to our advantage, since most field-scale multi-well studies are done in this co-ordinate system.

As Figure 1 illustrates, we can consider the reservoir to be a rectangular box with the fluid particles moving in straight lines, perhaps at different speeds in different directions and locations.

Figure 1
Figure 1

In this case, the streamlines are parallel to the three principal axes (x, y, and z), which are orthogonal.

Figure 1 also shows the partition of the box into many smaller boxes, which are rectangular prisms. Each of these rectangular prisms represents a certain portion of the reservoir, about which we can procure information through simulation studies. We use this smaller element of dimensions, (x, y, z) as a control volume to set up and discretize the governing equations.

We should emphasize that a fluid particle entering an elemental volume in one direction does not necessarily exit in the same direction; by the same token, the fluid particle leaving the elemental volume in one direction did not necessarily enter it in the same direction. Formation

characteristics, (such as heterogeneity, permeability contrasts and the force fields imposed by the conditions at the boundaries) dictate the flow path once the element enters the control volume. This is the essence of flow multi-dimensionality.

Figure 2 illustrates the concept of one-dimensional flow along the x-direction. Although it is difficult to find real-world examples of truly one-dimensional flow, many types of analyses and systems do lend themselves to description as one-dimensional.

Figure 2
Figure 2

The flow structure shown in Figure 2 precludes flow in any other direction, which implies there is no property variation along the y and z directions. Therefore, if we take a section perpendicular to the indicated flow direction, there will not be any property variation across the plane. Similarly, any cross section taken in the x-z or x-y planes (parallel to the streamlines) will reveal the uniformity of the flow structure. More explicitly, the pressure profiles of flow paths will be similar. A long, skinny reservoir that is confined between two closely spaced, parallel faults fits this description.

The next level of description used in reservoir simulation is two-dimensional flow. Many reservoir simulation studies employ two-dimensional Cartesian coordinate systems. This makes sense when we consider the large lateral extent of most reservoirs compared with their thicknesses. Figure 3 illustrates a two-dimensional flow structure along the x and y directions.

Figure 3
Figure 3

This precludes flow in the z-direction. Therefore, any slice taken parallel to the x-y plane will not show any variation in terms of property and fluid distribution such as porosity, permeability and saturations. The introduction of the second dimension allows us to describe a wide variety of problems. We can, for instance, account for directional permeability variation and lateral well distributions. Moreover, a two-dimensional approach allows us to represent a variety of well completion strategies (e.g., vertical wells, horizontal wells, stimulated wells). Thin, blanket sands that tend to display large areal coverage are ideally suited for description by a two-dimensional model.

The best representation of flow is the three-dimensional model, because it allows us to procure the most information about the reservoir. Unfortunately, it also requires the largest amount of input information and a higher level of computational power and overhead. Still, incorporating a third dimension gives us the latitude we need to include all the property variations in all three spatial directions. This means that if we take two parallel slices perpendicular to the third dimension, they will exhibit property and flow differences. Figure 4 illustrates a three-dimensional flow structure.

Figure 4
Figure 4

A three-dimensional representation allows us to accommodate a wide variety of problems of

practical interest, such as layered reservoirs (with or without crossflow), partially penetrating

wells, multi-layered production schemes, and thick reservoirs where gravitational forces could be significant. A three-dimensional model makes it possible for us to come up with more realistic representations of drive mechanisms (or any combination thereof), such as gas cap expansion, bottom water drive, and so forth.

In spite of a three-dimensional model’s many advantages, it is less often used in practice than

we might expect. This is because we have to weigh such factors as cost, data availability and marginal utility. In many cases a three-dimensional model may be a luxury that we can ill afford. On the other hand, there are certain problems in which it is a technical necessity. Consider, for instance, a thick reservoir with no significant property variation in the vertical direction; while a two-dimensional model would appear adequate based on this description, it may turn out that the gravitational field contribution may be so significant as to require a third dimension.

Radial-cylindrical flow geometry

The radial-cylindrical coordinate system is particularly appealing for describing single-well problems. Figure 5 shows the principal directions of this flow geometry and its elemental volume.

Figure 5
Figure 5

The three principal flow directions are radial (r), vertical (z) and tangential (θ). To visualize this flow structure, imagine a single well located in the center of a circular reservoir, such that the wellbore and the reservoir boundary are two concentric circles. If we assume a reservoir of uniform thickness, then the system becomes two concentric cylinders of the same height. A particle moving in a three-dimensional radial-cylindrical flow geometry can be illustrated as in Figure 6 .

height. A particle moving in a three-dimensional radial-cyli ndrical flow geometry can be illustrated as in

Figure 6

A typical one-dimensional, radial-cylindrical flow model is the classical representation used in well test analysis. In this case, flow is constrained to the r-direction such that streamlines are rays converging towards the center of the well ( Figure 7 ).

Figure 7
Figure 7

Studying the problem along one trajectory is sufficient because of symmetry. Any particle located on any of the trajectories will experience similar forces. By neglecting the flow in angular (q) and axial (z) directions, we introduce a series of assumptions, such as no permeability gradation along the q-direction and no gravitational effect along the z-direction. As we can imagine from looking at Figure 6 , one-dimensional flow representations in the q- and z-directions have no practical significance in reservoir studies.

The two-dimensional (r-z) representation is appealing for single-well problems where gravity and/or layering effects are significant ( Figure 8 ). This r-z plane can be taken at any q location without changing the problem because of its axi-symmetric nature.

Figure 8
Figure 8

The three-dimensional flow structure in radial-cylindrical coordinate system admits property variation in all three directions. Figure 9 shows this system.

Figure 9
Figure 9

Elliptical-cylindrical flow geometry

We sometimes use elliptical-cylindrical flow geometry in single-well studies when a strong permeability contrast exists in two principal directions on the lateral plane. Another common application of this coordinate system is when a vertical well is intercepted by a vertical, high- conductivity fracture (theoretically presumed to be of infinite conductivity). Under these conditions, the normally concentric equipotential contours degenerate into confocal ellipses. Similarly, the streamlines become distorted into confocal hyperbolas. Figure 10 depicts this flow structure.

Figure 10
Figure 10

Spherical flow geometry

Although not commonly used for general simulation, the spherical coordinate system provides a good representation of some specific reservoir engineering problems. Two examples are partial penetration to a thick formation by a production well, and flow around perforations. The principal flow directions in spherical coordinates are radial (r), tangential (θ) and azimuthal (φ), as shown in Figure 11 .

Figure 11
Figure 11

Curvilinear flow geometry

The most generalized coordinate system is curvilinear. In fact, all of the coordinate systems previously discussed constitute a subset of the curvilinear system. A curvilinear coordinate system allows a better representation of the flow geometry, as well as the boundary geometry where the latter dictates the former. With the flow geometry more accurately represented, the results obtained with a curvilinear coordinate system do not get distorted by grid orientation effects, as often happens with other coordinate systems. Another advantage is that curvilinear systems may help reduce the number of grid blocks needed for the same level of accuracy. Figure 12 shows the areal implementation of curvilinear coordinates to a five-spot injection/production pattern.

Figure 12
Figure 12

Note that the streamlines and equipotential contours define the curvilinear elemental volume. Although curvilinear coordinate systems offer attractive advantages, their use is limited because of the added mathematical and interpretational complexity they introduce.

Choosing the appropriate coordinate system and number of dimensions is not only paramount to a simulation study’s success, but also to its relative simplicity. It is thus essential that we use sound engineering judgment and perform thorough analyses throughout this process. We must answer questions pertaining to the reservoir’s approximate geometry, possible drive mechanisms, well and completion configurations, level of detail required, type and amount of

data available, and so on. As far as reservoir simulation is concerned, bigger is not necessarily better. We must exercise good engineering judgment in establishing the scope of our study. We need to avoid overkill, but at the same time, understand that under- representing the needed details is dangerous. Simply put, we must strike a balance.

Single-Phase Flow Equations

Single-phase flow in petroleum reservoirs is rare in practice. There are only a limited number of cases—dry gas reservoirs, for example—where conditions exist for single-phase flow. But we do apply single-phase flow assumptions (predominantly in well test analysis) as a means of simplifying problems and rendering them analytically tractable.

In numerical reservoir simulation, we may relax these types of simplifying constraints because of the more versatile nature of numerical schemes over analytical methods. Moreover, even for single-phase systems, an appropriate description of real problems usually involves considering non-linear phenomena, which are often ignored or approximated for ease of mathematical handling. Again, numerical schemes are not limited by these constraints. Therefore, this discussion on single-phase flow problems has not only a pedagogical basis, but a practical one as well.

Darcy’s law and the concept of flow potential

Darcy’s law is central to describing fluid flow in petroleum reservoirs. It distinguishes flow in porous media from flow in other domains (such as pipes and conduits), and represents a kind of constitutive relationship between the pressure field and the velocity field. Although Henry D’arcy derived this relationship empirically in 1851, it has since been proven that Darcy’s law is a special form of the Navier Stoke’s equation, which is commonly used in fluid mechanics. Simply put, Darcy’s law expresses a functional relationship between the fluid velocity and the porous media and the potential gradient.

<

and the porous media and the potential gradient. < (3.1) This law appears in different forms.

(3.1)

This law appears in different forms. Table 1 summarizes the forms used in this text, along with their appropriate units.

Table 1
Table 1

Velocity is the flow rate divided by the cross-sectional area perpendicular to flow. Equation 3.1 expresses the direct proportionality between flow rate and potential gradient, with the proportionality constant reflecting properties of both the flowing fluid and the porous medium. Note that as written, Equation 3.1 is for reservoir conditions. To express flow in surface conditions (or standard conditions), we must incorporate a formation volume factor into the proportionality constant.

The flow potential , defined by M. King Hubert and usually referred to as Hubert’s potential, is basically a combination of pressure and gravitational fields, as shown in Table 2 .

Table 2
Table 2

<

(3.1)Table 2 < where q : volumetric pressure A : cross-sectional area perpendicular to flow k

where q : volumetric pressure

A : cross-sectional area perpendicular to flow

k : permeability

µ : viscosity

φ / x : potential gradient in the flow direction x

α : unit conversion factor

<

(3.2)in the flow direction x α : unit conversion factor < where Φ : Hubert’s potential

where Φ : Hubert’s potential

P : pressure

ρ : fluid density

g : local gravitational constant

gc: universal gravitational constant

D : depth with respect to datum, taken as positive downward

In practical application, g/gc is set to 1.0 and hence Equation (3.2) as

<

g/gc is set to 1.0 and hence Equation (3.2) as < (3.3) The negative sign in

(3.3)

The negative sign in Equation 3.1 shows that the potential gradient is negative in the flow direction. In Equation 3.2, the sign convention is such as to give the appropriate addition or subtraction of gravity from pressure.

In this text, we use the positive downward convention for depth, as shown in Figure 1 .

Figure 1
Figure 1

This figure shows a sloping reservoir, where the datum is at sea level (the datum could be any fixed elevation, although sea level is the most widely accepted convention).Using the positive downward convention, the depth to point 1 from the datum is positive; the depth to point 2 is negative. We can calculate the potentials at points 1 and 2 as:

<

<

calculate the potentials at points 1 and 2 as: < < (3.4) (3.5) Assuming uniform pressure
calculate the potentials at points 1 and 2 as: < < (3.4) (3.5) Assuming uniform pressure

(3.4)

(3.5)

Assuming uniform pressure within the reservoir (P1 = P2 ), if we subtract from ,

<

the reservoir (P 1 = P 2 ), if we subtract from , < (3.6) we

(3.6)

we obtain a positive ∆Φ , which reflects the hydrostatic head exerted by the fluid column of density ρ and height D1 + D2.

It is the gradient of potential, rather than the potential itself, which appears in Darcy’s law (Equation 3.1). It is therefore clear that if we take the derivative of Equation 3.3, we obtain

<

< (3.7) In resolving Equation 3.7, we assume that density is constant. Furthermore, note that we

(3.7)

In resolving Equation 3.7, we assume that density is constant. Furthermore, note that we can write Equation 3.7 for the other principal flow directions as well, yielding depth gradients not only along the x-direction but also along the y- and z-directions (i.e., D/y, D/z). If the depth gradient along any of the flow directions does not exist, then the potential gradient becomes equal to the pressure gradient. Equation 3.7 then becomes

<

to the pressure gradient. Equation 3.7 then becomes < (3.8) Figure 2 shows four reservoirs with

(3.8)

Figure 2 shows four reservoirs with varying orientations relative to the datum plane.

Figure 2
Figure 2

Part (a) of Figure 2 shows a reservoir where the x-y plan is parallel tothe datum surface. In this case, there is no depth gradient along the x- and y-directions.

In part (b) of Figure 2, the reservoir is tilted so that the x-y plane is no longer parallel to the datum, but the edges along the y-axis remain parallel. Thus, depth gradient along the y- direction is still non-existent, whereas the depth gradient now exists in the x-direction.

The reservoir in part (c) of Figure 2 is similar to the one in part (b), except now the edges of the reservoir along the x- direction are parallel to the datum surface, yielding a vanishing depth gradient in the x-direction, but not in the y- direction.

Part (d) of Figure 2 represents the most general case, in which neither the x- nor the y-direction edges are parallel to the datum surface. This means that the depth gradient is non-zero in both the x- and y-directions.

In all four of these cases, the reservoir configurations are such that the formation thickness is always measured parallel to the direction that depth is measured. This is why, in each of these cases, the depth gradient along the z-direction is always unity.

We usually formulate the differential equations governing fluid flow in porous media based on the continuum assumption, in which we consider a differential element of the system and take balances over a conserved quantity of interest. When the quantity is mass, the resulting equation is the mass balance equation or the continuity equation. Figure 3 shows a representative element (control volume) of the reservoir in Cartesian coordinates.

Figure 3
Figure 3

Note that while the control volume will differ according to the coordinate system chosen, the basic strategy is the same .

Conservation of mass

The conservation of mass principle simply says that over a fixed time period,

[Mass in] - [Mass out] = [Net change in mass content]

Applying this principle to the system in Figure 3 , we obtain the continuity equation shown in Table 3 .

Table 3
Table 3

The porosity term in the right-hand-side of the Equation (3.9), if treated as a constant, will come out of the differential operator. This is a reasonable assumption for a reservoir with low rock compressibility.

With appropriately defined terms and parameters, Equation 3.9 is general and can be used for any system. To specialize it to porous media, we must invoke Darcy’s law. Substituting Darcy’s law, written in terms of velocity as:

<

Darcy’s law, written in terms of velocity as: < (3.12) we obtain the flow equation for

(3.12)

we obtain the flow equation for porous media. In a rectangular coordinate system, this equation becomes

<

a rectangular coordinate system, this equation becomes < (3.13) In a radial co-ordinate system, it takes

(3.13)

In a radial co-ordinate system, it takes the form

<

coordinate system, this equation becomes < (3.13) In a radial co-ordinate system, it takes the form

(3.14)

Equation (3.13) does not take into account the existence of wells and possible variations in formation thickness along the flow directions. In practice, we must incorporate both of these factors into the equations. In reservoir simulation, we treat the well (which could be a producer or injector) as a source or sink within the system. In this text, we follow the convention of treating injection as positive (source) and production as negative (sink). Therefore, injection or production wells are represented in the same fashion in the flow equation, except for the sign. With this in mind, Equation (3.13) becomes:

<

the sign. With th is in mind, Equation (3.13) becomes: < (3.15) In formulating these equations,

(3.15)

In formulating these equations, we have made no assumption about the nature of the fluid. Of

course, this will come into the picture when we take into account that the reservoir fluid can be treated as incompressible, slightly compressible or compressible. We shall now specialize

the continuity equation for these fluid types.

Incompressible flow equation

For an incompressible fluid, density and viscosity are constant and formation volume factor is equal to unity. In addition if we assume that porosity does not vary with pressure, we obtain:

<

that po rosity does not vary with pressure, we obtain: < (3.16) Equation 3.16 is written

(3.16)

Equation 3.16 is written for heterogeneous and anisotropic formations. For such a formation, and without injection or production (q=0), Equation 3.16 simplifies to:

<

or production (q=0), Equation 3.16 simplifies to: < (3.17) which is the well-known Laplace Equation. The

(3.17)

which is the well-known Laplace Equation. The following field units apply to Equations 3.16 and 3.17:

A [ft 2 ]; k [perms]; Φ [psi]; x, y, z [ft]; qsc [STB/day]; µ [cp].

Slightly compressible flow equation

For a slightly compressible fluid, density, viscosity and formation volume factor exhibit weak dependence on pressure. Furthermore, for a slightly compressible fluid, we usually assume that compressibility does not vary within the pressure range of interest.

<

< (3.18) For slightly compressible fluids the changes in viscosity and formation volume factor with pressure

(3.18)

For slightly compressible fluids the changes in viscosity and formation volume factor with pressure are negligible and they can be treated as constants. Furthermore, if we assume that we are dealing with homogeneous and isotropic porous media with no well, Equation 3.18 reduces to a simpler form, which is known as the diffusivity equation.

<

form, which is known as the diffusivity equation. < (3.19) The group in Equation 3.19 is

(3.19)

The group in Equation 3.19 is the hydraulic diffusivity constant for the reservoir fluid system. Note that the transport phenomenon described by Equation 3.19 is not a diffusion process, but a laminar flow problem. Equation 3.19 is analogous to the diffusivity equation in heat and/or mass transfer.

Note also that in Equations 3.18 and 3.19, we assume that the depth gradients are negligible. Field units for these equations are as follows:

A [ft 2 ]; k [perms]; P [psi]; x, y, z [ft]; qsc [STB/day]; µ [cp]; c [psi -1 ];

B [bbl/STB]; φ [dimensionless]; Vb [ft 3 ]; t [day]; and α=5.615

Compressible flow equation

Compressible fluid flow is the norm for gas reservoirs. While the concepts that apply to incompressible and slightly compressible flow also apply here, compressible fluid flow involves additional considerations. The highly compressible nature of gas makes certain gas properties (i.e., viscosity, density, formation volume factor and compressibility factor) strongly dependent on pressure. Since we cannot assume that these properties are constant, they introduce non-linearities to the flow equations. The numerical handling of the flow equations becomes more challenging as the degree of non-linearity increases. However, one aspect we do not have to worry about is the gravitational component. This is because the low density of gas makes the gravitational contribution negligible in most cases. Therefore, the potential gradients are readily replaceable by the pressure gradients. The governing equations for compressible fluid flow are summarized as follows:

<

gradients. The governing equations for compressible fluid flow are summarized as follows: < where < (3.21)

where

<

gradients. The governing equations for compressible fluid flow are summarized as follows: < where < (3.21)

(3.21)

(3.20)

Substituting Equation 3.21 into Equation 3.20 will accentuate the inherent non-linearity of compressible flow.

<

the inherent non-linearity of compressible flow. < (3.22) In Equation 3.22, the sources of non-linearity are

(3.22)

In Equation 3.22, the sources of non-linearity are the terms P/mZ in the spatial derivatives

and 1/Z in the temporal derivative. Field units for Equations 3.20, 3.21 and 3.22 are as

follows:

A [ft 2 ]; k [perms]; P [psi]; x, y, z [ft]; qsc [STB/day]; m [cp]; c [psi -1 ]; B [bbl/SCF]; φ

[dimensionless]; Vb [ft 3 ]; t [day]; Z [dimensionless]; T [R]; and α=5.615

It is sometimes expedient to linearize the non-linear equations of compressible fluid flow in porous media (Equation 3.22). The two common approaches are called the P2 method and the pseudo-pressure method. In the approach we simply recognize that Pdp = 1/2[d(P2)] and assume that the µgZ product at low pressures is constant. The dependent variable in the resulting equation is now in P2 rather than in P. The pseudo-pressure approach (real gas potential) uses the transformation

<

approach (real gas potential) uses the transformation < (3.23) By implementing this transformation, Equation 3.22 is

(3.23)

By implementing this transformation, Equation 3.22 is linearized and the dependent variable is now P. The assumptions made in formulating the approach are not as drastic as we might think when we observe the plot of µgZ versus P ( Figure 4 ).

Figure 4
Figure 4

At low pressures, the µgZ product is essentially constant; at intermediate pressures (40 to 130 atmospheres), it exhibits some non-linearity, and at high pressures, it becomes linear

with pressure. In fact, at high pressures, if we treat the P/ µgZ group as constant as depicted

in Figure 4 , Equation 3.22 becomes similar to the slightly compressible fluid flow equation.

This is not surprising, because gases do start to behave like liquids at higher pressures. The linearized forms of the compressible fluid flow equation are summarized as follows:

P2 form:

<

flow equation are summarized as follows: P 2 form: < (3.24) where µ gi and Z

(3.24)

where µgi and Z are calculated at some average pressure P.

P* form:

<

Z are calculated at some average pressure P. P* form: < (3.25) where µ gi ,

(3.25)

where µgi , Zi and ci are calculated at the initial pressure. Field units for Equations 3.24 and 3.25 are as follows:

A [ft 2 ]; k [perms]; P [psi]; x, y, z [ft]; qsc [SCF/day]; µ [cp]; c [psi -1 ];

f [dimensionless]; Vb [ft 3 ]; t [day]; Z [dimensionless]; T [R]; α=5.615; P* [psi 2 /cp]

Multiphase Flow Equations

Multi-phase flow equations are based on the same principles that govern single-phase flow, except that they must account for interactions between simultaneously flowing phases in porous media. The main parameters that we use to characterize these interactions are relative permeabilities, saturations and solution gas-liquid ratios.

The reader will recall the process of formulating the single-phase flow equations. Basically, we obtain the flow equation by substituting Darcy’s law into the continuity equation. For multi- phase systems, we write the continuity equation

For multi- phase systems, we write the continuity equation for each of the phases. Then we

for each of the phases. Then we use an appropriate form of Darcy’s law, which accounts for the presence of multiple-fluid flux terms (left-hand side of the equation) to characterize the transport part of Equation 3.9. At the same time, we adjust the phase accumulation term using phase saturations. The number of partial differential equations depends on how many phases are present. This development is summarized in Table 1 .

Table 1
Table 1

Two-phase (oil-water) equations

In reservoirs where two-phase flow of oil and water phases dominates (typically in dead oil reservoirs with no gas), we need to write Equation 3.28 for the oil and water phases separately. We can do this easily by setting the subscript f first to o for oil-phase and then to w for water phase. The complete set of equations for two-phase oil-water transport problems, together with the unknowns to be solved, is summarized below. In these equations, we have used pressure gradients rather than potential gradients; in other words, we have neglected depth gradients.

Oil flow equation (fo):

Oil flow equation (fo): (3.29) Water flow equation (fw): (3.30) In Equations 3.29 and 3.30, there

(3.29)

Water flow equation (fw):

Oil flow equation (fo): (3.29) Water flow equation (fw): (3.30) In Equations 3.29 and 3.30, there

(3.30)

In Equations 3.29 and 3.30, there are four unknowns: oil-phase pressure, P o , water-phase

pressure, P w , oil-phase saturation, S o , and water-phase saturation, S w . To solve the system,

we need two more equations. These equations, called the auxiliary equations, are

Capillary pressure relationship: P cow (S w ) = P o - P w (3.31)

Saturation relationship: S o + S w = 1 (3.32)

With these last two equations, we now have a well-posed problem (four equations in four unknowns). Field units for Equations 3.29 through 3.32 are as follows:

A [ft2]; k [perms]; k ro k rw [fraction]; P [psi]; x, y, z [ft]; µo, µw [cp]; B o , B w [bbl/STB];

q

osc , q wsc [STB/day]; S o , S w [fraction]; φ [dimensionless]; V b [ft3];

t

[day]; α=5.615.

Two-phase (oil-gas) equations

In a volumetric reservoir, there are three phases present (oil, water and gas); at irreducible

water saturation, the dominant flow is oil and gas. In representing flow in this kind of reservoir, we must account for both the free gas and the gas dissolved in the oil phase.

Figure 1 depicts a two-phase (oil-gas) system, considering flow only along the x-direction for illustrative purposes.

Figure 1
Figure 1

Note that while there is only one flow term for the oil phase, the gas phase has two flow terms, which describe free gas flow and dissolved gas flow. The two gas flow models must also be taken into account in the source and accumulation components of the governing flow equation for the gas phase. The final equations for the two-phase flow of oil and gas are shown below.

Oil Flow Equation (fo):

flow of oil and gas are shown below. Oil Flow Equation (fo): Gas Flow Equation (fg)

Gas Flow Equation (fg)

shown below. Oil Flow Equation (fo): Gas Flow Equation (fg) (3.34) (3.33) In the flow terms

(3.34)

(3.33)

In the flow terms of Equation 3.34, the second term in each bracket represents the contribution from the gas dissolved in oil. Similarly, qgsc represents the free gas produced (injected), while the product Rsoqosc represents the dissolved gas produced along with oil. Finally, the second term under the temporal derivative represents the accumulation (depletion) of gas dissolved in oil. Again, the auxiliary equations necessary to complete this formulation are the capillary pressure and saturation relationships.

P cow (S w ) = P o - P w (3.35)

S o + S w = 1 (3.36)

Field units for Equations 3.33 through 3.36 are

A [ft2]; k [perms]; k ro , k rg [fraction]; P [psi]; x, y, z [ft]; µ o, µ w [cp]; Bo [bbl/STB]; Bg [bbl/SCF]; qosc [STB/day]; qgsc [SCF/day]; So, Sg [fraction]; φ [dimensionless]; R so [SCF/STB]; V b [cf]; t [day];

a=5.615.

Two-phase (gas-water) equations

In an aquifer-driven gas reservoir, simultaneous flow of gas and water takes place, requiring us to formulate two-phase gas-water equations. The formulation is very similar to that of the oil-gas flow equation, except that we replace the oil phase with the water phase. In most practical cases, the solubility of natural gas in water is quite small, allowing us to neglect the terms of the flow equation that arise from the dissolved gas. One notable exception is the case of geopressured aquifers, where dissolved gas is significant because of the prevailing high pressures.

Gas flow equation (fg):

is significant because of the prevailing high pressures. Gas flow equation (fg): (3.37) Water flow equation

(3.37)

Water flow equation (fw):

is significant because of the prevailing high pressures. Gas flow equation (fg): (3.37) Water flow equation

(3.38)

Auxiliary equations:

P cgw (S w ) = P g - P w (3.39)

S w + S g = 1 (3.40)

Field units for Equations 3.37 through 3.40 are

A [ft2]; k [perms]; k rw , k rg [fraction]; P [psi]; x, y, z [ft]; µ g, µ w [cp]; Bw [bbl/STB]; Bg [bbl/SCF]; qw

[STB/day]; qg [SCF/day]; Sw, Sg [fraction]; φ [dimensionless]; V b [cf]; t [day]; α=5.615.

Three-phase (oil-water-gas) equations

The widest application of reservoir simulation is for three-phase oil-water-gas systems, in which all three phases are active in the production process. In fact, a large majority of petroleum reservoirs fall into this category. For this class of problems, we need to write Equation 3.28 for each of the three phases.

Oil flow equation (fo):

3.28 for each of the three phases. Oil flow equation (fo): (3.41) Water flow equation (fw):

(3.41)

Water flow equation (fw):

Oil flow equation (fo): (3.41) Water flow equation (fw): (3.42) Gas flow equation (fg) (ignoring the

(3.42)

Gas flow equation (fg) (ignoring the solubility of gas in water):

(3.43) Auxiliary equations: P c o w (S w ) = P o - P

(3.43)

Auxiliary equations:

P cow (S w ) = P o - P w (3.44)

P cgw (S g ) = P g - P o (3.45)

S o + S w + S g = 1 (3.46)

In Equations 3.41 through 3.46, the dependent variables (unknowns) are the phase pressures

(P o , P w and P g ), and phase saturations (S o , S w and S g ). The parameters that appear in the coefficients, and which are functions of these unknowns (m o , k rw , etc.), are not treated as the problem’s principal unknowns, but are specified as part of the data input. However, their dependence on the principal unknowns introduces non-linearities of varying degrees. Field units are

A [ft 2 ]; k [perms]; k ro , k rw , k rg [fraction]; P [psi]; x, y, z [ft]; µ o, µ w, µ g, [cp]; Bo, Bw [bbl/STB]; Bg

[bbl/SCF]; qosc, qwsc [STB/day]; qgsc [SCF/day]; So, Sw, Sg [fraction]; Rso [SCF/STB]; f [dimensionless]; Vb [ft 3]; t

[day]; α=5.615.

In

all of the multi-phase formulations summarized in Equations 3.29 through 3.46, each phase

is

characterized by its own pressure. We achieve closure of a set of equations by using the

capillary pressure and saturation expressions. In the capillary pressure relationships, capillary

pressure is defined as the difference between the pressure of the non-wetting phase and that

of the wetting phase. In some cases, there are incentives for assuming equality between the

phase pressures, thus allowing us to assign a single pressure for all the phases.

The formulation presented in Equations 3.41 through 3.46 allows interphase mass transfer, so that gas can either come out of or go into solution. However, we assume bulk transfer such that there is no compositional difference between the dissolved gas and the free gas. By the same token, the composition of the free gas remains unaltered. Changes in the oil phase density and viscosity are handled using PVT data, which take into consideration the amount of gas dissolved in the oil. This approach is commonly known as black-oil modeling, and it differs significantly from compositional modeling.

Flow Equations Based on Individual Components

Until now, we have emphasized the bulk properties of the mobile phases in the porous media without considering their compositions and compositional changes. While this is adequate for many systems, there are others in which compositional effects are significant and do affect both the transport mechanisms and bulk transport of the phases involved. Examples of such systems include volatile oil reservoirs, gas condensate reservoirs and enhanced oil recovery applications such as chemical flooding, miscible flooding, steam injection and so on. In all these cases, the system’s phase behavior plays a dominant role in the transport and fluid distribution mechanisms. Numerical simulators for handling these specialized problems are usually more complicated and require a higher degree of numerical maturity and sophistication.

Isothermal compositional formulation

The strategy for formulating the governing equations of isothermal compositional systems is the same as for the black-oil model, except the focus is on each component within the control volume rather than the bulk phase. However, we normally assume that there is no self- diffusion of a component within the phase, and hence the component velocity assumes the value of the phasial velocity.

As previously mentioned, since the system’s phase behavior plays a dominant role, procurement of the necessary PVT data is crucial. In modern computations, we often obtain these PVT data by using an appropriate equation of state. The common ones used in the petroleum industry include the Peng-Robinson equation of state (or any of its modifications) and the Soave-Redlich-Kwong equation of state. One of the major considerations in using these equations of state is that by virtue of their cubic form, they generally require much less computational overhead than other, more complex relationships. This is especially significant when we consider the repetitive calculations that are required in reservoir simulation. The calculations involved provide such critical information as distribution of components between the phases, density variation of each of the phases, phase viscosity and other thermo- physical properties.

Isothermal flow is a special case where existing temperature gradients within a given reservoir are negligible. Therefore, in isothermal compositional formulation, temperature distribution does not come into play. Hence, all the phase behavior and transport calculations are performed under isothermal conditions.

For an N-component system, we can write N equations of the form of Equation 3.47. Thus, we will have N equations in (3N+6) unknowns. Table 2 summarizes the auxiliary equations (2N+6) needed for closure.

Table 2
Table 2

Non-isothermal compositional formulation

For systems in which either the intrinsic temperature gradient or the externally imposed ones are significant, the energy balance will play an important role in the flow of fluids and their distribution in the porous media. A highly dipping reservoir may be subjected to a substantial geothermal temperature gradient. Reservoirs where such EOR processes as steam flooding and in situ combustion are taking place will definitely experience severe temperature gradients. These systems call for consideration of the energy balance. Usually, we use additional equations to account for enthalpy balance in the reservoir. In any case, the additional equation is sufficient to achieve closure in view of the additional dependent variables. Needless to say, with the additional equations comes increased computational overhead. The energy equation usually accounts for heat transfer by heat conduction and convection as well as heat storage. The energy and molar balance equations are related by the various coefficients that appear in both of them.

Boundary and Initial Conditions

Mathematically speaking, the differential equations that describe flow in porous media have an infinite number of solutions, only one of which will describe a particular problem. We can obtain this solution by imposing additional constraints known as boundary and initial conditions. In actuality, we impose these conditions as part of the known data about the system under consideration. For instance, for a reservoir with strong edge-water drive, we can set the pressure at the boundary to a constant equaling the initial reservoir pressure, which implies that the reservoir is in direct communication with an infinitely large aquifer.

The system’s physical boundary is divided into two groups: the inner boundary (usually the location where the well is physically coupled to the reservoir) and the outer boundary (usually the limits of the reservoir). The conditions that are specified at these boundaries constitute the boundary conditions. The most often used boundary conditions can be grouped into two main categories, Dirichlet and Neumann type. In a Dirichlet type boundary condition, the values of the dependent variables are specified at the boundaries, whereas it is their gradients that are so specified in the Neumann type.

Depending on what we know at the wellbore (either flow rate or pressure), we can specify the Dirichlet-type boundary condition (i.e., pressure) or Neumann-type (i.e., flow rate). Similarly, at the outer boundary—depending on the physical characteristics—we may be able to specify either Neumann or Dirichlet-type boundary conditions. For instance, if we have a sealed boundary that allows no flow into or out of the reservoir, we specify the vanishing Neumann- type boundary condition (i.e., zero pressure gradient across the boundary). On the other hand, a strong edge water drive enables us to specify the Dirichlet-type boundary condition (i.e., pressure specification). Numerical handling of the inner and outer boundary conditions is a crucial component in conducting reservoir studies.

Similar to the boundary conditions, it is necessary to describe the original state of the system before the process under consideration begins (for instance, before initiating a production or injection process). The conditions that describe the values of the dependent variables at the pre-set time (such time is usually set to zero) are known as the initial conditions for the problem. The existing hydrostatic head distribution determines the initial saturation and pressure distribution.

With the imposition of the boundary and initial conditions, the formulation of the problem is now complete and ready for solution. What we have is a well-posed mathematical problem which guarantees the existence of a unique solution.

Analytical vs. Numerical Solution Methods

There are two techniques for solving mathematical reservoir models: analytical and numerical. Each of these has certain strengths and limitations.

Analytical, or closed-form techniques offer the advantage of providing exact solutions (when they can be found); furthermore, those solutions are continuous throughout the system. The types of problems that are amenable to analytical solution, however, are very limited. Analytical methods fall short when we start dealing with varying formation thickness, non-uniform porosity and permeability, and changing fluid properties, and other such conditions that describe most real reservoirs.

To find analytical solutions for the type of system that "Mother Nature" generally provides, we have to modify the problem—sometimes quite drastically—to make it plausible for handling analytically. What we end up doing is providing an exact solution to an approximate problem (e.g., a classical well test analysis model).

A numerical solution involves discretizing, or approximating the mathematical model—that is, using a numerical tool such that continuous forms of the partial differential equations are written in a discrete form. We perform this discretization process not only on the partial differential equation, but also on the physical systems. This means that we divide the

physical system into a number of sub-domains that are coupled to one another.

The clear advantage of the numerical approach is that it allows us to assign representative properties to as many parts of a system as we have information for. However, we must not forget that we inevitably lose some measure of accuracy in discretizing the partial differential equations. The net result is that in using a numerical approach, we are providing an approximate solution to an exact problem.

Numerical Models: Grid Systems

Numerical models provide approximate solutions to exact problems. The degree of exactness depends largely on the discretization scheme, the heart of which is the type and size of the grid. Therefore, we must pay adequate attention to selecting the appropriate grid system. Although this discussion is limited to rectangular coordinate systems, the same basic principles apply to other coordinate systems.

Body-centered grids

In body-centered (or block-centered) grids, the discrete points are located at the center of each cell ( Figure 1 ).

Figure 1
Figure 1

There are no discrete points at the reservoir’s external boundaries. In setting up the grid system, we must be especially careful in placing the grid with respect to the wells. First, the well should be located at the center of its host grid block. Second, each grid block should have no more than one well within the same grid block. In cases where these conditions are

difficult to meet, there are techniques for handling them. For example, if it is difficult to locate the wells such that they coincide with the grid center, we can shift them slightly to satisfy this condition. Also, if we cannot avoid having more than one well in the same grid block, we can mathematically replace them with one well of equivalent strength.

Figure 2 shows the same multi-well reservoir in which two wells are combined into one equivalent well (wells W1 and W2) located in the center of a new block.

Figure 2
Figure 2

In doing so, the number of blocks along the x- and y-directions is decreased by one, which results in an overall decrease of 6 blocks.

Note that in using a finite number of grids to develop a numerical model, the reservoir’s physical boundary cannot always coincide with a grid-imposed boundary. The finer the grid, the closer the two boundaries will be. It is necessary to compromise between how much boundary information needs to be captured (via finite grids) and the amount of computational overhead involved. Obviously, as the number of grid blocks increases, so do the memory and the CPU time requirements.

Mesh-centered grids

In mesh-centered (or point-distributed) grids, the discrete points are located at the grid line intersections . In contrast to body-centered grids, there are discrete points located on the reservoir boundaries ( Figure 3 ).

Figure 3
Figure 3

As is true for body-centered grids, it is permissible to slightly relocate the wells so that they lie at the intersection of the grid lines. As shown in Figure 3 , the discrete points in a mesh- centered grid are not necessarily located at grid block centers.

In mesh-centered grid systems, the discrete points that are located at the corners and edges

of the grid represent only a certain portion of the block they are associated with. For instance,

a discrete point located on the corner may represent 1/4 or 3/4 of a block, whereas the

discrete points located on the edges of the grid system represent only 1/2 of a full block.

The finite difference approximations of partial differential equations are independent of the grid system used. There are some practical advantages to using a body-centered grid in the case of no-flow boundaries. For systems with constant pressure boundaries, mesh-centered grids offer better accuracy, since the discrete points (at which pressure is specified) exist at the reservoir boundaries.

Numerical Models: Grid Systems

Size and number of grid blocks

Grid size and the number of grid blocks are not independent of each other. In a fixed system (i.e., a defined reservoir), specifying the grid size determines the number of grid blocks. There

is no hard and fast rule for selecting the grid size for a simulation study. This does not mean

that we have unlimited freedom in selecting the grid size. The degree of freedom is often limited by the amount of input data available, the information we want to gain from the study, and the investment we are willing to make in terms of computational overhead. In any case,

there are a number of factors that impose lower and upper bounds on our choice of grid block size. Within these limits, however, we do have some degree of freedom. Table 1 summarizes the most salient factors that we need to consider.

Table 1
Table 1

We must always be aware that the quality of output depends on the quality of input. Each block added to the system demands information in terms of accurate property representation.

A 40-foot blanket sand without significant porosity and permeability variation, or without

property information in the vertical direction, does not require subdivision into several layers.

By a similar token, in terms of areal coverage, it is unnecessary to divide a reservoir into

blocks beyond where information is known, or where there is significant lateral property variation. In these two examples, the only consideration on which we must base our selection

is mathematical requirements, which we will discuss later.

A principal goal of reservoir simulation is to define the level of information or detail desired.

We must define a priori what this goal is and what questions we need to answer at each phase of the study. For instance, if we need to further develop a certain portion of a producing field, we will need to focus on that area, perhaps by imposing a larger number of blocks to better represent saturation and pressure distributions. Similarly, if a production well requires stimulation work that involves perforating and/or fracturing, then we must focus attention in that section by using finer grids.

In some reservoir studies, the quality and detail of the information we need may require us to

use much finer grid blocks. A case in point is the simulation of an EOR process, where we need to track a fluid front in order to better control the outcome. In instances like steamflooding or miscible flooding, where changes are abrupt and the interactions between the phases are strong, a fine grid system will help capture the details of the changes taking place.

Reservoir geology is often structurally and stratigraphically complex. Representing this complexity with a grid system sometimes requires the use of a large number of grid blocks. In other words, it is not possible to construct a grid system for a lenticular sand with several pinch-outs without imposing finer grids that capture peculiar features of this system.

The number of wells in the reservoir plays a dominant role in grid size selection. We have already noted that ideally, each block should host only one well. We also have to consider that the presence of wells in the reservoir further complicates an already complex system,

since most of the significant activities and rapid changes that take place in the reservoir occur

in the near-wellbore region. As a rule, the more wells we have in a reservoir, the more grid

blocks we need.

Approximating a partial differential equation using its finite-difference analogue introduces certain errors. The magnitude of these errors and the stability of the numerical algorithm depend on the grid size. In general, we can say that finer grids produce more accurate results and, in fact, an infinite number of grid blocks enables a discrete numerical model to collapse to a continuum representation of the problem.

On the other hand, one must not lose sight of the fact that more grid blocks means higher computational overhead. As the number of grid blocks increases, so do the memory and CPU time requirements. It is the responsibility of the simulation engineer to strike an acceptable balance between these factors.

Grid orientation

The first step in constructing a numerical model is the placement of the axes. Sometimes, for obvious practical reasons, an inexperienced engineer may be tempted to place the axes parallel to the margins of the paper. But it isn’t that simple. In orienting the grid, we have to consider two factors:

Permeability anisotropy, if any

Coordinate orthogonality

In anisotropic formations, it is imperative to align the coordinate axes with the principal flow directions. In doing so, however, we must ensure that we preserve the coordinate system’s orthogonality. When the two principal flow directions are not orthogonal, the major flow directions should be aligned with one of the axes.

We can most easily illustrate the effect of grid orientation by considering an isotropic reservoir in which there is no principal flow direction. Consider the five-spot pattern in this system as shown in Figure 1 .

Figure 1
Figure 1

In studying this system on a unit basis, we have the option of placing the grid so that production and injection wells are positioned diagonally with respect to each other. The second option is to construct the grid on a larger unit, so that the injection and production wells are on adjacent corners.

Note that although we are solving the same problem, the two different grid alignments result in two different solutions. The difference becomes more significant for cases when the mobility ratio is greater than one. It becomes even further pronounced in the case of unfavorable mobility ratio when finer grid blocks are used. However, for favorable mobility ratio, refining the grid diminishes the disparities between solutions.

One plausible solution to this problem is to use a higher order finite-difference approximation (e.g., a 9-point finite-difference scheme in areal studies) which brings in the diagonal interaction between the discrete points.

Local grid refinement

We have emphasized that while grid refinement does yield greater accuracy in numerical reservoir simulation, a study’s cost tends to increase in direct proportion to the number of grid blocks it uses. A good compromise—and a way to avoid placing blocks where they are not needed—is to refine the grids around the locality where we require more detailed information, and/or where rapid changes occur. This is called local grid refinement. Figure 2 shows several refinement strategies that we can use in conducting reservoir simulation studies.

Figure 2
Figure 2

Part (a) of Figure 2 shows a coarse grid composed of 81mesh-centered grid points. The shaded area around the well is the section from which we need detailed information.

We could get this information by performing a global grid refinement as shown in part (b) of Figure 2, which involves a total of 289 discrete points. Such refinement over the entire reservoir, however, is unnecessary.

Part (c) of Figure 2 depicts the conventional approach for resolving this problem. This approach results in the desired level of refinement not only around the wellbore, but also outside of the area of interest, yielding a total of 169 cells.

Part (d) of Figure 2 illustrates the best solution, which limits refinement to the area of interest. This scheme uses a total of 137 grid points. We should emphasize that the type of local grid refinement shown in (d) requires specialized handling of the non-continuous grid lines at the interface between the refined and the coarse areas.

Figure 3 shows a slightly different refinement strategy.

Figure 3
Figure 3

In this scheme, the level of refinement increases as we move toward the well, where the most rapid changes take place. A total of four levels of refinement are shown in conventional local refinement and true local refinement schemes (Parts (a) and (b), respectively).

The ultimate refinement strategy involves dynamically changing the grid size as needed. For example, in following a flood front movement, the area being refined continually changes as the front propagates. In this type of adaptive grid refinement scheme, we use a certain set of criteria such as pressure and/or saturation gradients to delineate the region that needs the refinement. We use the same set of criteria to remove the previously refined region as the front moves away from that region. Dynamic grid refinement requires a high level of numerical maturity and sophistication, and so is only available in advanced simulators.

Numerical Models: Time step selection

Since forecasting is the major thrust of reservoir simulation studies, time is the "fourth dimension" in mathematical representations of flow dynamics in porous media. A typical simulation study may cover a number of years. The numerical algorithms will require subdividing this period into smaller time segments. In this way, the solution over the entire domain of interest marches from one time period to the next. As in the case of grid block size, we must control the size of the time step. In some cases, this is necessary for numerical stability. But even for schemes that are unconditionally stable, we must still control the time step so that we don’t lose anything from the solution’s physical meaning.

We can use uniform time steps in numerical modeling, but it is neither necessary nor warranted by the nature of the reservoir problem being solved. More often than not, the changes are more rapid initially, thus requiring us to use finer time step sizes in order to capture the essence of these changes. As time progresses, the system tends toward pseudo- steady-state behavior, in which changes are more gradual and often occur in linear fashion. During this period, we can employ larger time steps without sacrificing accuracy.

Although we can change time step sizes manually, most modern simulators implement automatic time control strategies, which are generally known as automatic time step size selectors. These selectors operate based on changes in pressure and saturation over the previous time step. A common rule of thumb is not to allow more than a 5 to 10 percent change in saturation during one time step. The magnitude of acceptable pressure change varies, depending on the nature of the problem, between 10 and 100 psi per time step.

As time step size progressively increases, it is common for material balance errors to appear. This should signal the necessity for placing a cap on the size of the time step. Errors in material balance reflect the loss of accuracy that results from using coarse time step sizes to calculate pressure and saturation distributions. Recall that we use these saturation and pressure distributions to compute flow rates. Existing errors in pressure and saturation values manifest themselves in the flow rate estimations. Thus, material balance checks help the engineer to determine the maximum time step size that is admissable by the particular problem, and that can be tolerated by the model we are using.

Finite-Difference Approximation of Reservoir Flow Equations

In addition to converting the spatial and temporal domains (i.e., the reservoir and time) into a set of coupled discrete sub-domains we need to convert the continuous form of the governing differential equations into a discrete form. To do this, we need to utilize some numerical tools. There are a number of tools that we could employ, including finite-difference, finite-element, collocation techniques and so forth. The most widely used numerical technique in reservoir simulation is the finite-difference approach.

The finite-difference approach gives us a great deal of flexibility in handling the non-linear partial differential equation, in addition to the property distribution in heterogeneous systems for which an analytical solution is not feasible. The governing equations, as well as the boundary conditions used for describing flow in porous media, have only first-order and second-order derivatives, and so we will limit our discussion to these.

First-order derivative

First-order derivatives appear in the governing equations on the right-hand side in the form of the time derivative (the accumulation term). In addition, first-order derivatives appear when the gradient is specified across a given boundary. To approximate the first-order derivatives, we use truncated Taylor series expansion.

Figure 1 introduces the notation we will use throughout this discussion.

Figure 1
Figure 1

In this figure, we show a hypothetical pressure distribution, P, along the x-direction. The derivative is approximated at the point x (also designated as i) at which the value of pressure is P i . The two neighboring points to the central point are x - x (also designated as i -1) and x + x (also designated as i - 1). Accordingly, at these two neighboring points, the pressure values are P i - 1 and P i + 1 , respectively.

In general, a Taylor series expansion for evaluating a function f (x) at x + x can be written

<

a function f (x) at x + ∆ x can be written < (4.1) Using the

(4.1)

Using the notation of Figure 1 , we can write Equation 4.1 as:

<

notation of Figure 1 , we can write Equation 4.1 as: < Forward-Difference Approximation : (4.2)

Forward-Difference Approximation:

(4.2)

The forward-difference approximation to the first-order derivative at point uses the values of the function at points i and i +1. We can obtain this approximation from Equation 4.2 by truncating all terms after the first-order derivative and rearranging the equation to solve for (P/x)i. Note that in forward differencing, only the + sign in Equation 4.2 is relevant. The result is

<

for (P/x)i. Note that in forward differencing, only the + sign in Equation 4.2 is relevant.

(4.3)

The second term on the right-hand side of Equation 4.3 denotes the error in the approximation and is read as "order of ." The magnitude of the error is the same as the magnitude of . In practice, the error term is dropped in writing the finite-difference analogues. Thus, we write:

<

the finite-difference analogues. Thus, we write: < (4.4) which is clearly an approximation. Figure 2 shows

(4.4)

which is clearly an approximation. Figure 2 shows the geometrical interpretation of this approximation.

Figure 2
Figure 2

The exact derivative of P at point is the slope of the tangent AB to the curve at point O. Equation 4.4 uses the slope of the secant OC to approximate this derivative. As we can conclude from the figure, the accuracy of this approximation depends on the shape of the curve, as well as the length of the interval between and . In the limit as point is moved progressively closer to the secant OC tends to obtain the same shape as the tangent AB.

In reservoir simulation, we use the forward difference approximation in conjunction with the temporal derivative. The two neighboring points in this case represent the old time level and the new time level . When this derivative is written at a point i in the spatial domain it represents the rate of change of pressure with time at point i. In other words,

<

i in the spatial domain it represents the rate of change of pressure with time at

(4.5)

In Equation 4.5, is the unknown that we want to determine, and represents the known value of pressure at the old time level. Remember, we are using a marching scheme in time, where we obtain information at the new time level from what is already known at the old time level.

Backward-Difference Approximation:

With the same strategy, but now using the neighboring point , we can obtain the backward- difference approximation to the first-order derivative from Equation 4.2 using the (-) sign:

<

derivative from Equation 4.2 using the (-) sign: < (4.6) Figure 3 shows the geometrical interpretation

(4.6)

Figure 3 shows the geometrical interpretation of Equation 4.6.

Figure 3
Figure 3

Central-Difference Approximation:

The central-difference approximation to the first-order derivative at

point i uses the two adjacent neighboring points and . We can obtain this approximation by adding Equations 4.4 and 4.6:

<

the two adjacent neighboring points and . We can obtain this approximation by adding Equations 4.4

(4.7)

Figure 4 shows the geometrical interpretation of Equation 4.7.

Figure 4
Figure 4

It is apparent from Figure 4 that central-difference provides a more accurate approximation to the first-order derivative than either the forward- or backward-difference approximation does. Note that the secant CE is almost parallel to the desired tangent AB. We can explain this increased accuracy by deriving Equation 4.7 directly from Equation 4.2. In this case, when we write Equation 4.2 two times (once with the (+) sign and once with the (-) sign), and then subtract them from each other, the second-order terms drop out (not truncated) and the truncation starts with the third-order derivative, resulting in

<

starts with the third-order derivative, resulting in < (4.8) Second-order derivative The left-hand-side of the flow

(4.8)

Second-order derivative

The left-hand-side of the flow equation is composed of second-order derivatives representing the flux terms. To approximate these second-order derivatives, we use central-difference approximation. This involves writing Equation 4.2 once with the (+) sign and then with the (-) sign; we then add the two resulting equations together to yield

<

< (4.9) Dropping the error term, Equation 4.9 becomes < (4.10) For heterogeneous systems where properties

(4.9)

Dropping the error term, Equation 4.9 becomes

<

(4.9) Dropping the error term, Equation 4.9 becomes < (4.10) For heterogeneous systems where properties vary

(4.10)

For heterogeneous systems where properties vary spatially, the second-order derivatives

appear in the form <

the second-order derivatives appear in the form < , and the approximation is different from Equation

, and the approximation is different from Equation 4.10:

<

and the approximation is different from Equation 4.10: < (4.11) Note that in Equation 4.11, the

(4.11)

Note that in Equation 4.11, the dependent variable P is expressed at the nodal points, whereas the coefficient a is expressed at the block boundaries between nodes i and i + 1 and i and i - 1. The subscripts i + 1/2 and i - 1/2 simply indicate that a needs to be calculated using some averaging technique boundaries between blocks i and i + 1 and i and i - 1 respectively.

Finite-difference schemes

There are two principal groups of finite-difference schemes: explicit and implicit. We can illustrate the governing concepts for these schemes using the classical diffusivity equation as it is written in one dimension:

<

equation as it is written in one dimension: < (4.12) Equation 4.12 has a second-order spatial

(4.12)

Equation 4.12 has a second-order spatial derivative and a first-order temporal derivative (a is assumed constant). Using the finite-difference approximations for these derivatives we can write the finite difference analogue for Equation 4.12. Before we do that, however, we must answer one question: at what time level do we implement the approximation to the spatial derivative? The two most common approaches are to evaluate them at the old time level (time level n) or the new time level (time level n+1). These lead, respectively, to explicit and implicit schemes.

Accordingly, the explicit finite-difference analogue to Equation 4.12 is

<

finite-difference analogue to Equation 4.12 is < (4.13) Since pressures at the old time level are

(4.13)

Since pressures at the old time level are known at all locations, the only unknown in Equation 4.13 is . In fact, we can rearrange Equation 4.13 to solve for this unknown:

<

< (4.14) When Equation 4.14 is written for every node, we have one unknown in one

(4.14)

When Equation 4.14 is written for every node, we have one unknown in one equation for each node. Thus, we can solve explicitly, one unknown at a time, for the pressures at the new time level.

The implicit finite difference analogue to Equation 4.12 is:

<

finite difference analogue to Equation 4.12 is: < (4.15) It is obvious that Equation 4.15 has

(4.15)

finite difference analogue to Equation 4.12 is: < (4.15) It is obvious that Equation 4.15 has

It is obvious that Equation 4.15 has three unknowns <

all the unknown terms on one side, we obtain the characteristic form of the implicit finite-

difference scheme to Equation 4.12:

. By collecting

<

difference scheme to Equation 4.12: . By collecting < (4.16) When we write Equation 4.16 for

(4.16)

When we write Equation 4.16 for all the nodes where pressure is unknown, we obtain a system of simultaneous equations. The solution to this system of equations provides the pressure distribution at the new time level.

With the explicit scheme (Equation 4.14), we only need to solve one equation at a time for the unknown pressure at a particular node. For the implicit scheme (Equation 4.16), we must solve all the equations simultaneously. But while the explicit scheme looks more attractive in terms of its simplicity, it is less often used because of its restrictive stability constraints.

Flow equations in the finite-difference form

Having studied finite-difference approximations to partial differential equations and the differences between the explicit and the implicit formulations, we can now write a finite- difference analogue for porous media flow equations. For illustrative purposes (and for the sake of brevity), we will develop this analogue for a single-phase flow equation. Let us consider the flow equation for the slightly compressible single-phase flow problem in three dimensions:

<

single-phase flow problem in three dimensions: < (4.17) To approximate the second-order derivatives that

(4.17)

To approximate the second-order derivatives that appear in Equation 4.17, we invoke Equation 4.11, and obtain

<

< (4.18) We write Equation 4.18 in the most explicit form simply because it is conducive

(4.18)

We write Equation 4.18 in the most explicit form simply because it is conducive to recognizing one of the most important groups in reservoir simulation, the transmissibility terms. In Equation 4.18, the pressure coefficients on the left-hand-side are known as the transmissibility. These define the interaction between two neighboring grid blocks. Figure 5 shows two neighboring blocks (i, j, k and i+1, j, k) whose properties are different, and the transmissibility term,

Figure 5
Figure 5

<

<

calculated at the interface.

The term A x k x /x is the constant part of the transmissibility group, while the term µB could depend on the pressure. To calculate these two terms at the interface, we must use averaging procedures. For the constant part of the transmissibility, if we consider the two blocks as being connected in series, it becomes necessary to use harmonic averaging, such as

<

becomes necessary to use harmonic averaging, such as < (4.19) The second term ( µ B)

(4.19)

The second term (µB) is considered a weak function of pressure; that is, it exhibits weak non- linearity. We calculate this term at the arithmetic average of pressures at the two neighboring blocks:

Note that under multiphase flow conditions, a typical transmissibility term will include relative permeability to the fluid for which the flow equation is being written. In that case, the transmissibility group between the blocks i, j, k and i+1, j, k is

<

group between the blocks i, j, k and i+1, j, k is < (4.20) We calculate

(4.20)

We calculate all of the terms in this multiphase transmissibility group as single-phase, except for the new term (k rf ). The relative permeability term is a strong function of saturation and exhibits a high degree of non-linearity. In expressing this term at the interface of two neighboring blocks, we need to establish the flow direction to use the saturation of the upstream block. This procedure is known as single-point upstream weighting, and can be summarized as

<

upstream weighting , and can be summarized as < (4.21) A more accurate representation of the

(4.21)

A more accurate representation of the relative permeability at the interface is known as two- point upstream weighting, and is expressed as

<

the relative permeability at the interface is known as two- point upstream weighting , and is

(4.22)

We obtain Equations 4.21 and 4.22 by using a Taylor series expansion to expand the relative permeability function. While Equation 4.21 yields a first-order approximation. Equation 4.22 is a second-order approximation, and thus more accurate.

Although we have illustrated the transmissibility groups only for the i+1/2, j, k interface, similar analyses apply to the other interfaces. In summary, it is imperative to note that the transmissibility group consists of three components, and that each is calculated differently.

The constant component is calculated using harmonic averaging

The weakly non-linear component is estimated using arithmetic averaging

The strongly non-linear component is obtained using upstream averaging

Incorporation of boundary conditions

To obtain a particular numerical solution to a flow problem, we must impose specific boundary conditions. First, let us consider the outer boundary. Figure 6 shows a pure Dirichlet-type boundary condition with a mesh-centered grid system.

Figure 6
Figure 6

The boundary conditions imposed on the system (as shown in Figure 6 ) translate to the following equations:

<

in Figure 6 ) translate to the following equations: < (4.23) where NX and NY represent

(4.23)

where NX and NY represent the maximum number of blocks along the x- and y-directions, respectively. The implementation of Equation 4.23 will result in pressure discontinuity at the corner points (e.g., P 1 , 1 = P C and P D , P D P C ). Although at first glance, this may seem to pose a problem, it does not. Finite difference equations are only written at the nodes where pressures are not specified. In a conventional 5-point finite-difference scheme, when the equation is written for node (2,2), we do not write the equation for node (1,1) or the other corner points. If we use a

9-point finite-difference scheme, then the corner points come into the picture, and we simply use the arithmetic average assigned along the two conjoining edges. Although we use a mesh-centered grid system in this discussion, the implementation of the Dirichlet-type boundary conditions for a body-centered grid system follows a similar logic. On the other hand, the implementation of the Neumann-type boundary conditions for the body- centered and mesh-centered grid systems differ. This is because different nodes are reflected with respect to the boundary. The reflection nodes (which are actually outside of the domain of interest) constitute a practical means of incorporating Neumann-type boundary conditions. In creating a reflection node, we simply need to treat the boundary as a mirror showing the images of the actual nodes that are adjacent to the boundary. Furthermore, note that these image nodes are assigned the same properties as the actual nodes that they reflect. Figure 7 shows a body-centered grid with Neumann-type boundary conditions.

Figure 7
Figure 7

In this case, finite-difference representation of the boundary conditions is as follows:

<

Figure 7 In this case, finite-difference representation of the boundary conditions is as follows: < (4.24)

(4.24)

<

Figure 7 In this case, finite-difference representation of the boundary conditions is as follows: < (4.24)

The above Equations 4.24 contain the reflection nodes (imaginary nodes), which we can calculate as

<

nodes (imaginary nodes), which we can calculate as < (4.25) < Figure 8 shows a similar

(4.25)

<

nodes), which we can calculate as < (4.25) < Figure 8 shows a similar treatment for

Figure 8 shows a similar treatment for the mesh-centered grid system.

Figure 8
Figure 8

The important difference is the node being reflected. The implementation of the finite- difference approximation in this case will be as follows:

<

reflected. The implementation of the finite- difference approximation in th is case will be as follows:

(4.26)

<

< Again if we solve for the reflection nodes, we obtain the following sets of equations:

Again if we solve for the reflection nodes, we obtain the following sets of equations:

<

nodes, we obtain the following sets of equations: < (4.27) < Note that for Neumann-type boundary

(4.27)

<

obtain the following sets of equations: < (4.27) < Note that for Neumann-type boundary conditions, pressures

Note that for Neumann-type boundary conditions, pressures are still unknown for the boundary nodes, and so must be computed. To write the finite-difference equations for these nodes, we must obtain values of the pressure at the reflection nodes. We achieve this by using Equations 4.25 and 4.27. Although introducing the reflection nodes may appear to be adding more unknowns to the problem, each reflection node brings with it a new equation, through which the boundary condition is incorporated. Finally, for the special case of no-flow boundary conditions, pressures at the reflection nodes are equal to those at the corresponding reflected nodes (simply set the constants C 1 through C 4 equal to zero in Equations 4.25 and 4.27. Having dealt with outer boundary conditions, we now focus on the inner boundary (i.e., the well). Figure 9 shows a typical grid block hosting a vertical well.

Figure 9
Figure 9

We may express the relationship between the block pressure, the sandface pressure and the flow rate as:

qsc = -PI (Pi, j, k - Psf) (4.28) where PI is the productivity index, P i, j, k is the pressure of the block hosting the well and P sf is the sandface pressure. The sign convention is such that a positive q means injection and a negative q indicates production. The PI of a vertical well, as defined by Peaceman (1983), is given in Table 1 .

Table 1
Table 1

As mentioned earlier, we can specify either the flow rate at the wellbore or the flowing sandface pressure. For flow rate, we substitute the specified value into Equation 4.18 (written for the block hosting the well—for blocks with no wells, we set flow rates equal to zero). After solving for the pressure distribution, we come back to Equation 4.28 to solve for sandface pressure. When we specify sandface pressure, we substitute Equation 4.28 into Equation 4.18, replacing the q i, j, k term. After solving for the block pressures, we can then use Equation 4.28 to obtain the resulting flow rate. There have been a number of formulations proposed for implementing horizontal wells in reservoir simulation. One simple approach is to use Equation 4.8 with appropriately defined parameters (e.g., for a horizontal well oriented along the x-direction, we replace all the x- direction related terms in Equation 4.29 with the corresponding terms in the z-direction and vice-versa; thus, k x becomes k z , x becomes z, and h becomes x). With the implementation of the inner and outer boundary conditions, the finite-difference representation is now complete and ready for solution.

Shorthand notation for the finite-difference equations

Because finite-difference analogues are usually cumbersome, even for relatively simple, single-phase flow problems, we commonly employ a shorthand notation such as the Strongly- Implicit-Procedure, or SIP (Stone, 1968). For example, we can write Equation 4.18 in rearranged SIP form as follows:

<

<

(4.33)

Z, B, D, F, H and S are the transmissibility terms representing the interaction of block i, j, k with the neighboring blocks. E represents the summation of transmissibilities and the accumulation term coefficient, while Q includes all the known terms collected on the right- hand side. Figure 10 graphically shows the interaction of block i, j, k with the surrounding blocks.

Figure 10
Figure 10

The principal advantage of the SIP notation is its inherent flexibility. For instance, having written it for three-dimensional flow, for one- and two-dimensional flows some of the SIP coefficients simply drop out. Table 2 summarizes the possible combinations and their corresponding SIP coefficients. Note also that for the blocks located at the boundary, we can easily implement a no-flow boundary by setting the corresponding SIP coefficient equal to zero across that boundary.

Table 2
Table 2

Special considerations

In writing finite-difference analogues for partial differential equations, we must always consider a number of important points, which principally pertain to the accuracy of the resulting solution. The specific points of consideration include solution stability, consistency and truncation error. Rarely does the user of a reservoir simulator need to worry about these problems, but one should be aware of them. Stability analysis is meant to ensure that the round-off error (which arises over time due to the computer’s finite word length as time evolves) does not magnify in such a way as to obscure the solution. Stability analyses focus on defining the stability criterion for a given finite- difference scheme. These types of analyses provide results such as conditional stability and unconditional stability or instability. When we encounter a conditional stability, the criterion will bring in certain limitations on the block dimensions and time step sizes. Although an unconditional stability implies no restriction on the block and time step sizes,we shouldkeep in mind that the physical meaning of the solution can be lost if we assign unrealistically large block and time step sizes. The next important question to answer is whether the proposed scheme is consistent (i.e., compatible) with the original partial differential equation. In other words, does the proposed finite-difference analogue collapse to the original partial differential equation in the limit as the block dimensions and time step size approach zero? The truncation error is the difference between the original partial differential equation and its finite-difference analogue. For a compatible scheme, we should expect that the truncation error will disappear as the block dimensions and the time step size become infinitesimally small. If this does not happen, we have a consistency problem. In other words, the proposed scheme produces a solution to a different problem (partial differential equation). It is worth noting that in general, schemes used in reservoir simulation—at least the ones discussed in this text—meet stability as well as consistency criteria. If these schemes are used, the engineer need not worry about these types of problems.

Single-Phase Flow Equations: Solution Methods

One-dimensional flow system

Figure 1 shows a simple one-dimensional system composed of five blocks.

Figure 1
Figure 1

A no-flow boundary condition is imposed on the left end, while a non-zero pressure gradient is

specified on the right. A well with a flow rate q s is located in block #2. We assume that the

flowing fluid is slightly compressible.

Writing Equation 4.33 with the appropriate coefficients, we have

Equation 4.33 with the appropriate coefficients, we have (5.1) Equation 5.1 represents the characteristic equation

(5.1)

Equation 5.1 represents the characteristic equation for any block in Figure 1 . Pressure is not known in any of these five blocks, and so we must write Equation 5.1 for each of them (i.e., i

= 1,

,

5):

must write Equation 5.1 for each of them (i.e., i = 1, , 5): Notice that

Notice that although subscripts 0 and 6 (denoting "reflection" blocks 0 and 6, respectively)

appear in the first and the last equations, they will be removed by the proper implementation

of the imposed boundary conditions. This is done as follows:

At block #1, a no-flow boundary condition exists, implying that

block #1, a no-flow boundary condition exists, implying that or • Moving to block #5, the

or

#1, a no-flow boundary condition exists, implying that or • Moving to block #5, the imposed

Moving to block #5, the imposed constant pressure gradient implies that

or These manipulations eliminate both unknowns. and , leaving us with five equations in five

or

or These manipulations eliminate both unknowns. and , leaving us with five equations in five In

These manipulations eliminate both unknowns.

and

or These manipulations eliminate both unknowns. and , leaving us with five equations in five In

, leaving us with five equations in five

In implementing the flow rate specified at the well block, we invoke the following definition of

Q 2 :

well block, we invoke the following definition of Q 2 : Table 2a and Table 2b

Table 2a and Table 2b summarize the remaining coefficients and present them in matrix form.

Table 2a
Table 2a
Table 2b
Table 2b

The 5x5 coefficient matrix in Table 2 is a tri-diagonal coefficient matrix, which is normally written in a more compact form as follows:

which is normally written in a more compact form as follows: When we solve this system

When we solve this system of equations, we obtain the pressure distribution in the system. We then calculate the sandface pressure in the wellbore using Equation 4.20. The objective is to determine if the reservoir under study can support the imposed flow rate at the wellbore. Although the calculation of sandface pressure, P sf , may appear to be superfluous, it is actually an important parameter in production planning. For instance, the sandface pressure for the specified flow rate q s can become too low to support the friction losses in the production tubing and the associated peripheral wellbore devices; at this point a pump (e.g., downhole or sucker rod) may be needed to augment the flow energy. In fact, it is not impossible for the calculated sandface pressure to assume a negative value, which, of course, is unrealistic. In essence, what this tells the engineer is that the reservoir can no longer support the desired production rate.

Two-dimensional flow system

Figure 2 is a simple two-dimensional system partitioned into nine blocks.

Figure 2
Figure 2

The reservoir under consideration has three no-flow boundaries and one constant-pressure boundary. A well is located in block (2,2), at which sandface pressure is specified as P sf . Although there are nine blocks in the system, the constant pressure specification on the boundary blocks (1,1), (2,1), and (3,1) means that only six blocks have unknown pressures. Hence, we need to write Equation 4.33 for just these six blocks:

we need to write Equation 4.33 for just these six blocks: To implement the boundary conditions

To implement the boundary conditions (similar to the one-dimensional case), we can write the following:

to the one-dimensional case), we can write the following: In implementing the inner boundary condition at

In implementing the inner boundary condition at the well block (2,2) where sandface pressure is specified, we need to invoke the proper equation for E and Q.

Table 3a
Table 3a

and Table 3b summarize the resulting coefficient matrix, unknown vector and the right-hand side vector for the two-dimensional, slightly compressible fluid flow problem.

Table 3b
Table 3b

The matrix in Table 3 is a penta-diagonal coefficient matrix, and it is normally written in the more compact form shown below:

is normally written in the more compact form shown below: Solving the system of equations will

Solving the system of equations will yield the pressure distribution in the system. The final step to calculate of the resulting flow rate (as determined by the computed pressure distribution surface) using the equation

q sc = -PI (P i, j, k - P sf ) where PI is the productivity index, P i, j, k is the pressure of the block hosting the well and P sf is the sandface pressure. The sign convention is such that a positive q means injection and a negative q indicates production.

Three-dimensional flow system

In this third example, we illustrate logical continuity of this procedure using a three- dimensional system. Figure 3 shows a three-dimensional reservoir with 18 blocks in which slightly compressible fluid is flowing.

Figure 3
Figure 3

The reservoir is volumetric (completely sealed), and there is a well in the center of the field, completed through only the top layer (2,2,2). Assume that a constant flow rate of q s is specified. We start with the flow equation in its finite difference form:

start with the flow equation in its finite difference form: We then write this equation for

We then write this equation for every block at which the pressure is unknown, i.e.,

i=1, j=1, k=1

i=1, j=1, k=2

i=2, j=1, k=1

i=2, j=1, k=2

i=3, j=1, k=1

i=3, j=1, k=2

i=1, j=2, k=1

i=1, j=2, k=2

i=2, j=2, k=1

i=2, j=2, k=2

i=3, j=2, k=1

i=3, j=2, k=2

i=1, j=3, k=1

i=1, j=3, k=2

i=2, j=3, k=1

i=2, j=3, k=2

i=3, j=3, k=1

i=3, j=3, k=2

In this case, there would be a total of 18 equations. The long-hand notation used here is only for illustrative purposes; ordinarily these equations are automatically generated within the computer model. Again, in implementing the no-flow boundary conditions we should simply observe the following:

Z i, j, k

B i, 1 , k

D 1, j, k

F 3, j, k

H i, 3, k

S i, j, 2

i = 1,2,3 and j = 1,2,3

i = 1,2,3 and k = 1,2

j = 1,2,3 and k = 1,2

j = 1,2,3 and k = 1,2

i = 1,2,3 and k = 1,2

i = 1,2,3 and j = 1,2,3

To implement the constant flow rate specification at the well block, we invoke the appropriate equation:

n at the well block, we invoke the appropriate equation: As clearly shown, a three-dimensional single-phase

As clearly shown, a three-dimensional single-phase problem leads to a hepta-diagonal coefficient matrix whose general form is as follows:

coefficient matrix whose general form is as follows: When we solve the system of equations with

When we solve the system of equations with the hepta-diagonal coefficient matrix structure, we obtain the reservoir pressure distribution. We use this pressure distribution, together with the flow rate specification at the wellbore, in calculating the flowing sandface pressure at the well.

Irregularly bounded reservoirs

The tri-, penta-, and hepta-diagonal matrix structures obtained for the three previous examples are quite standard. However, discretization of irregularly-bounded reservoirs may yield other matrix structures. Figure 4 illustrates a simple example.

Figure 4
Figure 4

For the sake of brevity, we will adopt a simple block numbering scheme, as shown in Figure 4 . The ten equations for this reservoir are as follows (cf. Equation 4.33):

E 1 P 1 + F 1 P 2 + H 1 P 5 = Q 1 D 2 P 1 + E 2 P 2 = Q 2

E 3 P 3 + F 3 P 4 + H 3 P 6 = Q3

D 4 P 3 + E 4 P 4 + F 4 P 5 + H 4 P 7 = Q 4

B 5 P 1 + D 5 P 4 + E 5 P 5 + H 5 P 8 = Q 5

B 6 P 3 + E 6 P 6 + F 6 P 7 = Q 6

B 7 P 4 + D 7 P 6 + E 7 P 7 + F 7 P 8 + H 7 P 10 = Q 7

D 9 P 8 + E 9 P 9 = Q 9

B 10 + E 10 P 10 = Q 10

The resulting 10x10 coefficient matrix is

10 P 10 = Q 10 The resulting 10x10 coefficient matrix is Notice that the above

Notice that the above coefficient matrix is hepta-diagonal instead of penta-diagonal, as would be normally expected from two-dimensional flow problems. The purpose of this example is show that some problems do not necessarily fit into the standard mode. However, there are methods for handling such special cases.

Multi-Phase Flow Equations: Solution Methods

Simulating multiphase fluid flow in porous media involves solving a system of coupled non- linear partial differential equations. Similar to the case of single-phase flow models, developing a computer model for these types of systems requires the use of finite-difference approximation to discretize these equations. The various solution techniques differ with respect to how we manipulate the governing partial differential equations. The following material summarizes the most prominent methods used for handling multiphase flow equations.

IMPES method

We can trace the origin of the Implicit Pressure, Explicit Saturation (IMPES) method back to the works of Sheldon, et. al. (1959), and Stone and Gardner (1961). The basic strategy of this method is to obtain a single equation in which the sole unknown is the pressure of one of the phases. We achieve this by combining the partial differential equations for each phase in such a way as to eliminate the saturation derivatives. Furthermore, we assume capillary pressure to be constant during any time step. By so doing, we obtain just one partial differential equation, with a phase pressure as the only unknown (this is usually the water-phase pressure).

After writing the finite-difference approximation to this partial differential equation, we obtain the appropriate characteristic equation. When we apply this characteristic equation at the grid nodes, we generate a system of linear algebraic equations. The coefficients appearing in this system of equations are functions of the pressures and saturations; therefore, they are estimated using the information available at the previous iteration level. At any iteration level, when solution for the phase pressure (e.g., P w ) distribution is obtained, the next step is to solve explicitly for that phase saturation distribution, Sw from the partial differential equation describing the flow of that phase.

At this stage, we know the P w and S w distributions. This enables us to determine the oil phase pressure distribution using the capillary pressure relationship between the oil and water

phases. Similar to the determination of S w , after obtaining the P w distribution, we explicitly solve the oil-phase partial differential equation for the oil-phase saturation, S o .

With the values of S o and S w calculated, we can easily determine S g (S g = 1 - S o - S w ). Finally, using the capillary pressure relationship between the oil and gas phases, we obtain the gas phase pressure (P g ) distribution. This completes one iteration; we then repeat the whole procedure until we achieve convergence. At the beginning of each iteration, all the pressure and saturation dependent terms are updated using the most recent information available. Figure 1 is a flow chart highlighting the major steps involved in the IMPES method.

Figure 1
Figure 1

Simultaneous Solution (SS) method

In the simultaneous solution (SS) method, we convert the saturation derivatives that appear on the right-hand-side of the flow equations to pressure derivatives using the capillary pressure relationships. In this manner, we obtain three partial differential equations, with the principal unknowns being the phase pressures. In other words, at each grid node there are three unknowns. This does not pose any problem, however, because we have three equations to write at each node.

With three equations for each node, the resulting coefficient matrix becomes significantly larger. For example, for a three-dimensional system with 10x15x3 blocks, the size of the coefficient matrix is 1350x1350. The overall structure of the coefficient matrix is similar to the corresponding single-phase structures. However, since more than one partial differential

equation is approximated at each block, the resulting elements of the coefficient matrix are either 2x2 or 3x3 submatrices for two-phase and three-phase flow problems, respectively. Accordingly, for a two-dimensional three-phase flow problem, we often refer to the resulting coefficient matrix as a tri-tri-pentadiagonal matrix typifying the aforementioned structure. Once we have constructed the coefficient matrix and obtained the phase pressures, using the capillary pressure relationship in an inverse manner, we obtain S w and S g . The calculation of S o is straightforward when S w and S g are available. Figure 2 summarizes the basic steps of the simultaneous solution procedure.

Figure 2
Figure 2

Fully Implicit Solution with Newtonian iteration

In the Fully Implicit Solution with Newtonian iteration method, we reduce the six principal unknowns of the three-phase flow equations to three linearly independent principal unknowns (most often one phase pressure and two saturations) by using the capillary pressure and saturation relationships. We then use finite-differences to approximate the three partial differential equations that result.

By treating the coefficients implicitly (at the same level as the principal unknowns) we generate a system of non-linear algebraic equations. We can linearize these equations using the generalized Newton-Raphson procedure, such that we can implement a Newtonian iteration. In the solution process, a residual function is formed and its derivative calculated with respect to each principal unknown to construct the Jacobian. We then use a numerical

differentiation scheme to obtain the elements of the Jacobian matrix. The salient points of the Newton-Raphson method are highlighted below.

Consider a set of non-linear equations in two unknowns, x and y:

f (x, y) = 0

g (x, y) = 0

with (x o ,y o ) as an initial guess to the solution. Suppose that (x o + x, y o + y) is the exact solution. Then, a Taylor series expansion can be written in the neighborhood of (x o ,y o ), i.e.,

be written in the neighborhood of (x o ,y o ), i.e., Truncating the above series
be written in the neighborhood of (x o ,y o ), i.e., Truncating the above series

Truncating the above series after the first-order terms, we obtain a system of linear equations in two unknowns, x and y.

of linear equations in two unknowns, ∆ x and ∆ y. The solution of these two
of linear equations in two unknowns, ∆ x and ∆ y. The solution of these two

The solution of these two equations for x and y leads to better estimates of the solution of the original non-linear equations. We repeat this process in an iterative manner until the improvements in x and y become small enough to satisfy the pre-set convergence criterion. We can express the iterative process in the matrix form as follows:

which is followed by:

x (k+1) = x (k) + x (k+1)

y (k+1) = y (k) + y (k+1)

In the above matrix equation, the coefficient matrix is referred to as the Jacobian (J).

The most stable algorithm is the Fully Implicit procedure. But at the same time, it is also the most computationally intensive and costly method. The IMPES procedure is generally the most cost-effective method (although we must qualify this by noting that its explicit treatment of the mobility and capillary terms causes it to suffer some stability limitations). The Simultaneous Solution method treats all primary variables implicitly; therefore it is

unconditionally stable. However, explicit treatment of the coefficients is similar to the IMPES procedure and this does create some stability problems.

The whole area of solution techniques for partial differential equations is a subject of intensive research in many fields. As a result, there are many techniques that are evolving through rigorous testing and validation processes. For example, adaptive techniques, which utilize different degrees of implicitness at different spatial and temporal locations to maximize the stability while minimizing the computational overhead, have received a great deal of attention.

Solution of Matrix Equations

The following material summarizes some direct and iterative procedures for numerically solving sets of linear algebraic equations. In setting the computer model, we face the problem of solving a set of n equations relating n unknowns, which are expressed in the form of

a 11 x 1 + a 12 x 2 + a 13 x 3 +

a 21 x 1 + a 22 x 2 + a 23 x 3 +

a n1 x 1 + a n2 x 2 + a n3 x 3 +

+a 1n x n = C 1

+a 2n x n = C 1 (5.2)

+a nn x n = C n

We can put the left-hand members of Equation 5.2 into a square array of the coefficients, known as the coefficient matrix,

of the coefficients, known as the coefficient matrix , (5.3) and the unknown vector , (5.4)

(5.3)

and the unknown vector,

(5.4)as the coefficient matrix , (5.3) and the unknown vector , The right-hand members form the

The right-hand members form the right-hand side vector

(5.5)The right-hand members form the right-hand side vector We can express the set of equations summarized

We can express the set of equations summarized by Equation 5.2 in matrix notation as

AX = C (5.6)

In reservoir simulation problems, coefficient matrices are sparsely filled and contain a main diagonal and a number of additional diagonals. This relates to the way in which the grid

blocks are ordered (i.e., the order in which the finite difference equations are written), the irregularity of the external boundaries and the number of dimensions.

Ordering of grid blocks

There is a one-to-one correspondence between the re-ordering of matrix elements and re- numbering of reservoir grid blocks. Therefore, if we know the coefficient matrix structure that results from a certain numbering scheme, we can employ the appropriate direct and/or iterative equation solver.

Standard ordering by rows

Figure 1 shows standard ordering by rows for grid blocks in a 5x2 model, and the resulting coefficient matrix.

Figure 1
Figure 1

The non-zero elements of the coefficient matrix are indicated by x; positions, while zero elements are left blank.

The coefficient matrix has a banded structure, and so is called a band matrix; its non-zero elements lie on parallel diagonals. The band width for the reservoir of Figure 1 is eleven (there are eleven parallel diagonals between the lowermost and uppermost diagonals, including the main diagonal). To calculate the band width, we multiply the maximum number of blocks in the direction they are ordered by two, and then add one; in this case, (5x2)+1=11.) Note that the upper and lower diagonals 3 and 4 have zero elements.

Standard ordering by columns

Figure 2 shows the standard ordering by columns of the reservoir from Figure 1 ,

Figure 2
Figure 2

and the resulting coefficient matrix with its non-zero elements. Here, the band width for the coefficient matrix is five (2x2+1=5). If the solution algorithm operates only with the elements located between the uppermost and lowermost diagonals, this ordering scheme will significantly reduce computational requirements.

Checkerboard (Cyclic-2) Ordering

Consider a reservoir model numbered in a checkerboard fashion, as shown in Figure 3 .

Checkerboard (Cyclic-2) Ordering Consider a reservoir model numbered in a checkerboard fashion, as shown in Figure

Figure 3

In ordering the grid blocks, we number the shaded blocks first and then the unshaded blocks. The resulting coefficient matrix offers the advantage that, during the forward solution stage of Gaussian elimination (a common method for solving systems of linear algebraic equations), only a small portion of the matrix needs to be worked for triangularization

Checkerboard (D-4) Ordering

In checkerboard D-4 ordering, we number grid blocks along alternate diagonals. This alternate diagonal ordering leads to substantial savings in computational overhead (CPU time and storage). Figure 4 shows a typical coefficient matrix generated from D-4 ordering of a 4x5 matrix.

Figure 4
Figure 4

(D-2) Ordering

The D-2 ordering scheme is also known as diagonal ordering. The resulting coefficient matrix has a relatively small bandwidth ( Figure 5 ).

Figure 5
Figure 5

Table 1 provides a summary of the storage and computational work requirements for different ordering schemes.

Table 1
Table 1

A close inspection of Table 1 indicates that the greatest improvement in D-4 ordering is

observed when J=I.

Note: All non-zero elements appearing in the coefficient matrices are single elements for one- phase problems. However, they represent 2x2 and 3x3 sub-matrices for two-phase and three- phase problems, respectively.

Solution methods

One of the more important steps of a numerical simulation study is solving the systems of equations generated by the finite-difference approximation. Our goal is always to end up with

a system of linear equations, regardless of whether the original equations are linear or non-

linear. Hence we need to linearize the non-linear equations before proceeding. In the broadest sense, there are two main categories of solution methods for the resulting system of

linear algebraic equations: direct and iterative.

Direct solution methods

For a direct solution, we assume that the machine performing the computations is capable of carrying an infinite number of digits (i.e., there is no round-off error). In this ideal situation, a direct solution method will yield an exact solution after a finite number of elementary arithmetical operations.

In

reality, every computer carries a finite number of digits; round-off errors do occur, resulting

in

non-exact solutions. As the number of operations increases, so does the cumulative round-

off error. For very large systems of equations, it is possible for the round-off errors to grow

uncontrollably to the point of generating unrealistic results and even instability. Still, there are situations in which a direct solution offers distinct advantages. Furthermore, a well-written direct-solver subroutine subprogram can be used on a variety of problems. This feature is particularly attractive, because it lets us test various parts of the code development without having to worry about the efficacy of the solver.

The Gaussian elimination technique is the fundamental algorithm used by direct solvers. As shown in Table 2a ,

Table 2a
Table 2a

Table 2b ,

Table 2b
Table 2b

and Table 2c his technique involves a systematic set of elementary row operations that essentially transform the coefficient matrix into an upper triangular matrix.

set of elementary row operations that essentially transform the coefficient ma trix into an upper triangular

Table 2c

This step of the solution process is known as the forward solution. Once we obtain the upper triangular matrix, the backward solution comes into effect, whereby the last unknown is directly solved for and the others are obtained by systematic backward substitution.

Matrices associated with the finite difference methods are often sparse; therefore, they lend themselves more easily to iterative solutions. Remember that in computer operations, elementary arithmetic operations involving zeros take the same amount of time. Hence the sparseness of the matrix does not affect the time involved in using direct solvers. However, there are direct solution algorithms which take advantage of the structure of the coefficient matrix involved in finite-difference techniques. One of the most popular techniques is Thomas’ Algorithm, which is designed for tri-diagonal coefficient matrices. With this algorithm, we simply avoid performing any arithmetic operations on the zero elements of the coefficient matrix, thereby saving a significant amount of time. Table 3 summarizes this algorithm.

Table 3
Table 3

Although Thomas’ algorithm is designed for tri-diagonal coefficient matrices, there are other direct solvers which utilize the presence of other band structures. Again, the idea is to exploit the sparse nature of the matrix by not carrying out any operations on the zeros that are outside the band. The band matrix solvers can be effectively employed to coefficient matrices with bandwidths up to 15. As the bandwidth becomes larger than 15, the efficacy of the band

matrix algorithm starts to decrease because this group of algorithms treats all zeros which are located within the band as non-zeros.

Iterative methods

Iterative solution methods involve making an initial guess, or approximation of the solution vector, and then improving on this guess by successfully implementing the algorithm.