You must log in to edit PetroWiki. Help with editing

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: Difference between revisions

PetroWiki
Jump to navigation Jump to search
 
No edit summary
 
Line 1: Line 1:
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:
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
*Enhanced oil recovery
*Compositional simulation
*Compositional simulation
Line 9: Line 10:
*Surface facilities
*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.<ref name="r1" /> 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 (''μ''<sub>''iL''</sub> = ''μ''<sub>''iV''</sub>).  
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.<ref name="r1">Gibbs, J.W. 1961. The Scientific Papers of J. Willard Gibbs. H.A. Bumstead and R.G. Van Name, eds. New York City: Dover.</ref> 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 (''μ''<sub>''iL''</sub> = ''μ''<sub>''iV''</sub>).


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.<ref name="r2" /><ref name="r3" /><ref name="r4" /><ref name="r5" /><ref name="r6" /><ref name="r7" />  
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.<ref name="r2">Firoozabadi, A. 1999. Thermodynamics of Hydrocarbon Reservoirs. 355. New York City: McGraw-Hill Book Co. Inc.</ref><ref name="r3">Prausnitz, J.M., Lichtenthaler, R.N., and de Azevedo, E.G. 1999. Molecular Thermodynamics of Fluid-Phase Equilibria, third edition. New Jersey: Prentice Hall.</ref><ref name="r4">Sandler, S.I. 2000. Chemical and Engineering Thermodynamics, third edition. New York City: John Wiley & Sons.</ref><ref name="r5">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.</ref><ref name="r6">Walas, S.M. 1985. Phase Equilibria in Chemical Engineering. 671. Boston, Massachusetts: Butterworth Publishings</ref><ref name="r7">Whitson, C.H., and Brule, M.R. 2000. Phase Behavior, Vol. 20. Richardson, Texas: Monograph Series, SPE.</ref>
 
== Fundamental concept of phases ==


==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 (''z''<sub>''i''</sub> where ''i'' = 1, … , ''n''<sub>''c''</sub>) at equilibrium, the fundamental task is to quantify the molar fractions of the phases (''L'', ''V'') and compositions of the vapor (''y''<sub>''i''</sub> where ''i'' = 1, … , ''n''<sub>''c''</sub>) and liquid phases (''x''<sub>''i''</sub> where ''i'' = 1, … , ''n''<sub>''c''</sub>) 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.:
'''Fig. 1''' is a schematic showing a closed container of liquid and vapor. Given constant and known temperature, pressure, and overall compositions (''z''<sub>''i''</sub> where ''i'' = 1, … , ''n''<sub>''c''</sub>) at equilibrium, the fundamental task is to quantify the molar fractions of the phases (''L'', ''V'') and compositions of the vapor (''y''<sub>''i''</sub> where ''i'' = 1, … , ''n''<sub>''c''</sub>) and liquid phases (''x''<sub>''i''</sub> where ''i'' = 1, … , ''n''<sub>''c''</sub>) 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
*Phase density
*Pressure
*Pressure
*Temperature
*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.  
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.


<gallery widths="300px" heights="200px">
<gallery widths="300px" heights="200px">
Line 27: Line 30:
The overall compositions and phase compositions in '''Fig. 1''' are written as mole fractions, which are defined by
The overall compositions and phase compositions in '''Fig. 1''' are written as mole fractions, which are defined by


[[File:Vol1 page 0334 eq 001.png]]
[[File:Vol1 page 0334 eq 001.png|RTENOTITLE]]


and
and


[[File:Vol1 page 0334 eq 002.png]]
[[File:Vol1 page 0334 eq 002.png|RTENOTITLE]]


where [[File:Vol1 page 0334 inline 001.png]] for the container, [[File:Vol1 page 0334 inline 002.png]] for liquid, and [[File:Vol1 page 0334 inline 003.png]] for vapor. The relative amounts of the phases are defined by the phase mole fractions,
where [[File:Vol1 page 0334 inline 001.png|RTENOTITLE]] for the container, [[File:Vol1 page 0334 inline 002.png|RTENOTITLE]] for liquid, and [[File:Vol1 page 0334 inline 003.png|RTENOTITLE]] for vapor. The relative amounts of the phases are defined by the phase mole fractions,


[[File:Vol1 page 0334 eq 003.png]]
[[File:Vol1 page 0334 eq 003.png|RTENOTITLE]]


and
and


[[File:Vol1 page 0334 eq 004.png]]
[[File:Vol1 page 0334 eq 004.png|RTENOTITLE]]


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


[[File:Vol1 page 0335 eq 001.png]]....................(1)
[[File:Vol1 page 0335 eq 001.png|RTENOTITLE]]....................(1)


Thus, once the overall compositions and phase compositions are known, the phase molar fractions, ''L'' and ''V'', are also known.  
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 ==
== 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===
The Gibbs phase rule and Duhem’s theorem assure us that the problem illustrated in '''Fig. 1''' can be solved.
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 + ''n''<sub>''c''</sub>''n''<sub>''p''</sub>, where ''n''<sub>''p''</sub> is the number of phases (for vapor/liquid equilibrium, ''n''<sub>''p''</sub> 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 ''n''<sub>''p''</sub> summation equations (i.e., the phase mole fractions for each phase sum to 1.0) and ''n''<sub>''c''</sub>(''n''<sub>''p''</sub> - 1) equilibrium relations, for a total of ''n''<sub>''p''</sub> + ''n''<sub>''c''</sub>(''n''<sub>''p''</sub> - 1) equations. The equilibrium relations could be given as ''K''-values [[File:Vol1 page 0335 inline 001.png]], which relate the component liquid and vapor mole fractions or, as described later, chemical potential criteria for equilibrium (i.e., ''μ''<sub>''iL''</sub> = ''μ''<sub>''iV''</sub>).  
 
=== 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 + ''n''<sub>''c''</sub>''n''<sub>''p''</sub>, where ''n''<sub>''p''</sub> is the number of phases (for vapor/liquid equilibrium, ''n''<sub>''p''</sub> 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 ''n''<sub>''p''</sub> summation equations (i.e., the phase mole fractions for each phase sum to 1.0) and ''n''<sub>''c''</sub>(''n''<sub>''p''</sub> - 1) equilibrium relations, for a total of ''n''<sub>''p''</sub> + ''n''<sub>''c''</sub>(''n''<sub>''p''</sub> - 1) equations. The equilibrium relations could be given as ''K''-values [[File:Vol1 page 0335 inline 001.png|RTENOTITLE]], which relate the component liquid and vapor mole fractions or, as described later, chemical potential criteria for equilibrium (i.e., ''μ''<sub>''iL''</sub> = ''μ''<sub>''iV''</sub>).
 
The Gibbs phase rule says that the degrees of freedom are 2 + ''n''<sub>''c''</sub> - ''n''<sub>''p''</sub>, 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.


The Gibbs phase rule says that the degrees of freedom are 2 + ''n''<sub>''c''</sub> - ''n''<sub>''p''</sub>, 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 (''n''<sub>''p''</sub> = 1) is present at equilibrium in a system containing a pure fluid (''n''<sub>''c''</sub> = 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.


For example, suppose that only one phase (''n''<sub>''p''</sub> = 1) is present at equilibrium in a system containing a pure fluid (''n''<sub>''c''</sub> = 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).


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===
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 ''n''<sub>''c''</sub> 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:
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 ''n''<sub>''c''</sub> 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
*Temperature
*Pressure
*Pressure
Line 66: Line 73:


== Equilibrium, stability, and reversible thermodynamic systems ==
== 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 ''μ''<sub>''iL''</sub> = ''μ''<sub>''iV''</sub>.  
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 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.  
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 ''μ''<sub>''iL''</sub> = ''μ''<sub>''iV''</sub>.
 
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.


<gallery widths="300px" heights="200px">
<gallery widths="300px" heights="200px">
Line 76: Line 84:
</gallery>
</gallery>


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.  
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.  
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 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.  
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 ==


==Fundamental equations==
Relatively few ideas and equations are used to solve the phase behavior problem illustrated in '''Fig. 1'''.
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 "[[First law of thermodynamics|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''').  
*The most fundamental idea in thermodynamics is the conservation of total energy, which is termed "[[First_law_of_thermodynamics|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.
*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.  
*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.
*When only energy is exchanged between the system and surroundings, the system is "closed."  
*The conservation of total mass is also used to constrain thermodynamic processes.
*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.  
 
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.


<gallery widths="300px" heights="200px">
<gallery widths="300px" heights="200px">
Line 100: Line 111:


A thermodynamic state is given by its thermodynamic properties, e.g.:
A thermodynamic state is given by its thermodynamic properties, e.g.:
*Pressure
*Pressure
*Density
*Density
Line 108: Line 120:
*Other properties
*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.  
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.
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==
== Nomenclature ==
 
{|
{|
|''K''<sub>''i''</sub>
|=
|''K''-value of ''i''th component, ''y''<sub>''i''</sub>/''x''<sub>''i''</sub>, dimensionless
|-
|-
|''L''  
| ''K''<sub>''i''</sub>
|=  
| =
|liquid mole fraction, moles liquid/total moles, dimensionless  
| ''K''-value of ''i''th component, ''y''<sub>''i''</sub>/''x''<sub>''i''</sub>, dimensionless
|-
|-
|''V''  
| ''L''
|=  
| =
|vapor mole fraction, moles vapor/total moles, dimensionless or molar volume of fluid, volume/mole, m<sup>3</sup>/mole
| liquid mole fraction, moles liquid/total moles, dimensionless
|-
|-
|''y''<sub>''i''</sub>
| ''V''
|=  
| =
|mole fraction of ''i''th component in vapor, moles ''i''th component in vapor/total moles vapor, dimensionless  
| vapor mole fraction, moles vapor/total moles, dimensionless or molar volume of fluid, volume/mole, m<sup>3</sup>/mole
|-
|-
|''z''<sub>''i''</sub>  
| ''y''<sub>''i''</sub>
|=  
| =
|overall mole fraction of ''i''th component, moles ''i''th component/total moles, dimensionless  
| mole fraction of ''i''th component in vapor, moles ''i''th component in vapor/total moles vapor, dimensionless
|-
|-
| ''z''<sub>''i''</sub>
| =
| overall mole fraction of ''i''th component, moles ''i''th component/total moles, dimensionless
|}
|}


==References==
== References ==
<references>
<ref name="r1">Gibbs, J.W. 1961. ''The Scientific Papers of J. Willard Gibbs''. H.A. Bumstead and R.G. Van Name, eds. New York City: Dover. </ref>


<ref name="r2">Firoozabadi, A. 1999. ''Thermodynamics of Hydrocarbon Reservoirs''. 355. New York City: McGraw-Hill Book Co. Inc.</ref>
<references />


<ref name="r3">Prausnitz, J.M., Lichtenthaler, R.N., and de Azevedo, E.G. 1999. ''Molecular Thermodynamics of Fluid-Phase Equilibria'', third edition. New Jersey: Prentice Hall. </ref>
== Noteworthy papers in OnePetro ==


<ref name="r4">Sandler, S.I. 2000. ''Chemical and Engineering Thermodynamics'', third edition. New York City: John Wiley & Sons. </ref>
Use this section to list papers in OnePetro that a reader who wants to learn more should definitely read


<ref name="r5">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. </ref>
== External links ==


<ref name="r6">Walas, S.M. 1985. ''Phase Equilibria in Chemical Engineering''. 671. Boston, Massachusetts: Butterworth Publishings. </ref>
Use this section to provide links to relevant material on websites other than PetroWiki and OnePetro


<ref name="r7">Whitson, C.H., and Brule, M.R. 2000. ''Phase Behavior'', Vol. 20. Richardson, Texas: Monograph Series, SPE.</ref>
== See also ==


</references>
[[First_law_of_thermodynamics|First law of thermodynamics]]
 
==Noteworthy papers in OnePetro==
Use this section to list papers in OnePetro that a reader who wants to learn more should definitely read
 
==External links==
Use this section to provide links to relevant material on websites other than PetroWiki and OnePetro


==See also==
[[Second_law_of_thermodynamics|Second law of thermodynamics]]
[[First law of thermodynamics]]


[[Second law of thermodynamics]]
[[Equations_of_state|Equations of state]]


[[Equations of state]]
[[Phase_behavior_of_pure_fluids|Phase behavior of pure fluids]]


[[Phase behavior of pure fluids]]
[[Phase_behavior_of_mixtures|Phase behavior of mixtures]]


[[Phase behavior of mixtures]]
[[Phase_characterization_of_in-situ_fluids|Phase characterization of in-situ fluids]]


[[Phase characterization of in-situ fluids]]
[[Phase_diagrams|Phase diagrams]]


[[Phase diagrams]]
[[PEH:Thermodynamics_and_Phase_Behavior]]


[[PEH:Thermodynamics and Phase Behavior]]
[[Category:5.2.1 Phase behavior and PVT measurements]]

Latest revision as of 16:35, 4 June 2015

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

RTENOTITLE

and

RTENOTITLE

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

RTENOTITLE

and

RTENOTITLE

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

RTENOTITLE....................(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 RTENOTITLE, 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.

Noteworthy papers in OnePetro

Use this section to list papers in OnePetro that a reader who wants to learn more should definitely read

External links

Use this section to provide links to relevant material on websites other than PetroWiki and OnePetro

See also

First law of thermodynamics

Second law of thermodynamics

Equations of state

Phase behavior of pure fluids

Phase behavior of mixtures

Phase characterization of in-situ fluids

Phase diagrams

PEH:Thermodynamics_and_Phase_Behavior