Content of PetroWiki is intended for personal use only and to supplement, not replace, engineering judgment. SPE disclaims any and all liability for your use of such content. More information

Thermodynamics and phase behavior

(Redirected from Phase behavior)

Phase behavior describes the complex interaction between physically distinct, separable portions of matter called phases that are in contact with each other. Typical phases are solids, liquids and vapors. Phase behavior plays a vital role in many petroleum applications, such as:

• Enhanced oil recovery
• Compositional simulation
• Geochemical behavior
• Wellbore stability
• Geothermal energy
• Environmental cleanup
• Multiphase flow in wellbores and pipes
• Surface facilities

Thermodynamics, which is central to understanding phase behavior, is the study of energy and its transformations. Using thermodynamics, we can follow the energy changes that occur during phase changes and predict the outcome of a process. Thermodynamics began as the study of heat applied to steam power but was substantially broadened by Gibbs in the middle to late 1800s. Gibbs’ most significant contribution was the development of phase-equilibrium thermodynamics applied to multicomponent mixtures, particularly the concept of chemical potential.[1] The concept of chemical potential leads to the result that, at equilibrium, the chemical potential of each component must be the same in all phases (μiL = μiV).

Phase-equilibrium thermodynamics seeks to determine properties such as temperature, pressure, and phase compositions that establish themselves once all tendencies for further change have disappeared. This article reviews the fundamentals of phase-equilibrium thermodynamics used in petroleum applications, especially those that require liquid-vapor phase behavior.[2][3][4][5][6][7]

Fundamental concept of phases

Fig. 1 is a schematic showing a closed container of liquid and vapor. Given constant and known temperature, pressure, and overall compositions (zi where i = 1, … , nc) at equilibrium, the fundamental task is to quantify the molar fractions of the phases (L, V) and compositions of the vapor (yi where i = 1, … , nc) and liquid phases (xi where i = 1, … , nc) that form at equilibrium. The phases are assumed to be homogeneous, in which intensive parameters such as pressure, temperature, density, viscosity, and phase compositions are uniform throughout the phase. (Thus, gravity effects are not typically considered.) Intensive properties are those that are independent of the amount of the phases, e.g.:

• Phase density
• Pressure
• Temperature

Alternatively, extensive properties depend on the amount of the phases (e.g., total volume and moles of liquid). Intensive properties can be determined as the ratio of two extensive properties; for example, molar density is the number of moles divided by the total volume.

The overall compositions and phase compositions in Fig. 1 are written as mole fractions, which are defined by

and

where for the container, for liquid, and for vapor. The relative amounts of the phases are defined by the phase mole fractions,

and

where L + V = 1. The phase molar fractions are not saturations, although they could be converted to saturations from the phase densities. The molar fractions of the phases are related to the overall and phase compositions by

....................(1)

Thus, once the overall compositions and phase compositions are known, the phase molar fractions, L and V, are also known.

Identifying molar fractions and composition of phases

The Gibbs phase rule and Duhem’s theorem assure us that the problem illustrated in Fig. 1 can be solved.

Gibbs phase rule

Ideas and theories from thermodynamics are based on observations. Gibbs, for example, observed that the equilibrium intensive state of the system is fully known once the pressure, temperature, and phase compositions are specified. The number of intensive properties that we would like to know is, therefore, 2 + ncnp, where np is the number of phases (for vapor/liquid equilibrium, np is two). These intensive properties can only be determined if a sufficient number of equations are available or if some of them are explicitly specified. An inventory of equations shows that there are np summation equations (i.e., the phase mole fractions for each phase sum to 1.0) and nc(np - 1) equilibrium relations, for a total of np + nc(np - 1) equations. The equilibrium relations could be given as K-values , which relate the component liquid and vapor mole fractions or, as described later, chemical potential criteria for equilibrium (i.e., μiL = μiV).

The Gibbs phase rule says that the degrees of freedom are 2 + nc - np, which is the difference between the number of required intensive properties (unknowns) and the number of relations (equations). The Gibbs phase rule is only practically useful for a small number of components but does offer significant insight into the maximum number of phases that can form as well as how many intensive properties can be independently specified.

For example, suppose that only one phase (np = 1) is present at equilibrium in a system containing a pure fluid (nc = 1). The Gibbs phase rule says that only two intensive properties can be specified (degrees of freedom are two). We cannot specify three or more intensive properties for this case, but we are free to choose which intensive properties are set. Typically, we would choose temperature and pressure. The choice of intensive properties is not completely arbitrary, for only properties related to an individual phase can be selected. Thus, properties such as the overall density of the two-phase system or the phase molar fractions, L and V, cannot be used to reduce the degrees of freedom.

Suppose next that three equilibrium phases exist in the pure fluid (i.e., the triple point). For this case, the degrees of freedom are zero, and no intensive properties can be specified. That is, the intensive properties, such as temperature and pressure, are determined and are not arbitrary at the triple point. Four phases in equilibrium with each other are not allowed by the Gibbs phase rule (neither are they observed experimentally).

Duhem's theorem

Duhem’s theorem is another rule, similar to the phase rule, but it specifies when both the extensive and intensive states of the system are determined. The theorem states that for any closed system containing specified moles of nc components (from which the overall compositions can be calculated), the equilibrium state is completely determined when any two independent properties are fixed. The two independent properties may be either intensive or extensive; however, the maximum number of independent intensive properties that can be specified is given by the Gibbs phase rule. For example, when the degrees of freedom are one, at least one of the two variables must be extensive. When the degrees of freedom are zero, both must be extensive. Thus, the combination of the Gibbs phase rule and Duhem’s theorem shows that the extensive and intensive state of the two-phase problem in Fig. 1 can be determined when the temperature, pressure, and moles of all the components are specified. For a pure component system, the intensive and extensive state of the system is determined when the following are given:

• Temperature
• Pressure
• Total number of moles

Equilibrium, stability, and reversible thermodynamic systems

Thermodynamics is a macroscopic viewpoint in that it concerns itself with the properties of a system, such as temperature and density. Thermodynamics predicts the nature of a new equilibrium state—not the rate at which that state is reached. One of the characteristics of equilibrium is that the thermodynamic properties are time invariant. Furthermore, once equilibrium is reached, the process or pathway that led to equilibrium cannot be determined.

The equilibrium state is always time invariant, whether it is dynamic or static. A dynamic equilibrium process is a steady-state process, in which the properties change spatially but not temporally. A static process, while having the appearance of reaching a static state on a macroscopic scale (such as that shown in Fig. 1), is anything but static on a microscopic scale. Molecules from the liquid phase continue to move into the vapor phase and vice versa, but the rates of energy and mass transfer are equal, giving the appearance of equilibrium on a macroscopic scale. Indeed, this is exactly the definition for equilibrium embodied by the chemical potential criterion μiL = μiV.

The criterion of time invariance is a necessary, but not sufficient, condition for equilibrium. Some systems can exist in metastable states that are time invariant. For example, at the Earth’s surface, diamonds are in a metastable state of pure carbon, whereas graphite is the equilibrium state. Fig. 2 illustrates the concept of equilibrium vs. metastable or unstable (nonequilibrium) states by considering a ball rolling down a hill into a valley. When the ball is on the side of the hill, it is unstable and will roll down the slope because of gravitational forces; this is an unstable process. The ball, however, if initially trapped in a small depression on the side of the hill, will not roll down the hill; this is a metastable state. Lacking any additional energy, the ball will stay in the metastable position. If the depression is removed, or the ball is slightly moved, the ball will roll down the hill until it reaches the lowest position, which corresponds to the lowest gravitational potential energy or equilibrium position.

Later on, we will find that a definition for equilibrium is when the Gibbs free energy of the system is the lowest value possible, and this is how one can recognize unstable or metastable states from the true equilibrium. Generally, equilibrium states that arise naturally are stable to small disturbances. On the flip side, metastable equilibrium states, which are not stable to small disturbances, do not occur often in nature. Our mathematical description of equilibrium, however, will exhibit these unstable and metastable states, so we must be able to recognize them.

Processes of interest to us are often not time invariant, and it would appear that equilibrium thermodynamics is not very useful. For example, we typically run transient simulations to estimate the recovery of reservoir oil by injection of a gas. The concept of local equilibrium and reversibility are used to overcome this apparent limitation of thermodynamics. Equilibrium at a point in a reservoir, termed local equilibrium, often applies when internal relaxation processes are rapid with respect to the rate at which changes are imposed on the system. That is, equilibrium thermodynamics can be applied over small volumes of the reservoir, even though pressure and other gradients remain in the reservoir. In reservoir simulation, the small volumes are gridblocks, although the size of the gridblocks must be sufficiently small so that good accuracy is obtained.

The concept of reversibility of a process is also important. A reversible process proceeds in sufficiently small steps so that it is essentially in equilibrium at any given time (i.e., the process at a point in the reservoir proceeds in a succession of local equilibrium steps). A process is reversible when its direction can be reversed at any point by an infinitesimal change in external conditions.

The concept of reversibility is, in a sense, the temporal equivalent to the spatial concept of local equilibrium. Thus, the concepts of local equilibrium and reversibility allow the application of equilibrium thermodynamics to real systems, which are invariably nonequilibrium at large scales. For most cases, very little accuracy is lost in making such assumptions.

Fundamental equations

Relatively few ideas and equations are used to solve the phase behavior problem illustrated in Fig. 1.

• The most fundamental idea in thermodynamics is the conservation of total energy, which is termed "the first law of thermodynamics." The first law is based on our every day observation that for any change of thermodynamic properties, total energy, which includes internal, potential, kinetic, heat, and work, is conserved.
• The second fundamental idea in thermodynamics is the total entropy balance or "the second law of thermodynamics." Entropy is a thermodynamic property that expresses the unidirectional nature of a process and, in some sense, is "nature’s clock." For example, a cup of hot coffee at room temperature cools down instead of heating up.
• The conservation of total mass is also used to constrain thermodynamic processes.

These equations are applied to a thermodynamic system. A thermodynamic system is defined as that part of the universe we are considering—for example, the inside of the container in Fig. 1. Everything else is called the surroundings. A system may be related to its surroundings in a variety of ways, depending on whether mass or energy (in the form of heat or work) is exchanged (see Fig. 3).

• When no heat or mass is transferred, and no work is done on or by the surroundings, the system is referred to as an "isolated" system.
• When only energy is exchanged between the system and surroundings, the system is "closed."
• The system is "open" when both mass and energy are exchanged between the system and its surroundings. No work is allowed on or by an isolated system, and its boundaries are therefore rigid.

A thermodynamic state is given by its thermodynamic properties, e.g.:

• Pressure
• Density
• Enthalpy
• Temperature
• Internal energy
• Entropy
• Other properties

All of these are state functions that depend only on the present state reached (point conditions)—not the path that the system took to reach that state. For example, if methane is heated, compressed, and then returned to its initial volume and temperature, the methane will have exactly the same pressure as before, independent of how it was heated or compressed. The usefulness of state functions is the simplest possible path can be selected for the calculation of the change in a state function; that is, we would likely choose a reversible path that consists of isothermal or isobaric steps.

In contrast to state functions such as entropy or pressure, heat and work are not thermodynamic properties but depend on the nature or path of the process that the system undergoes. A different path will give a different amount of work and heat.

Nomenclature

 Ki = K-value of ith component, yi/xi, dimensionless L = liquid mole fraction, moles liquid/total moles, dimensionless V = vapor mole fraction, moles vapor/total moles, dimensionless or molar volume of fluid, volume/mole, m3/mole yi = mole fraction of ith component in vapor, moles ith component in vapor/total moles vapor, dimensionless zi = overall mole fraction of ith component, moles ith component/total moles, dimensionless

References

1. Gibbs, J.W. 1961. The Scientific Papers of J. Willard Gibbs. H.A. Bumstead and R.G. Van Name, eds. New York City: Dover.
2. Firoozabadi, A. 1999. Thermodynamics of Hydrocarbon Reservoirs. 355. New York City: McGraw-Hill Book Co. Inc.
3. Prausnitz, J.M., Lichtenthaler, R.N., and de Azevedo, E.G. 1999. Molecular Thermodynamics of Fluid-Phase Equilibria, third edition. New Jersey: Prentice Hall.
4. Sandler, S.I. 2000. Chemical and Engineering Thermodynamics, third edition. New York City: John Wiley & Sons.
5. Smith, J.M., Van Ness, H.C., and Abbott, M.M. 2001. Chemical Engineering Thermodynamics, sixth edition. 787. New York City: McGraw-Hill Book Co. Inc.
6. Walas, S.M. 1985. Phase Equilibria in Chemical Engineering. 671. Boston, Massachusetts: Butterworth Publishings
7. Whitson, C.H., and Brule, M.R. 2000. Phase Behavior, Vol. 20. Richardson, Texas: Monograph Series, SPE.