Compositional multiphase fluid model
Overview
This model represents a full composition description of a multiphase multicomponent fluid. Phase behavior is modeled by an equation of state (EOS) and partitioning of components into phases is computed based on instantaneous chemical equilibrium via a two-phase flash. Each component (species) is characterized by molar weight and critical properties that serve as input parameters for the EOS. See Petrowiki for more information.
In this model the fluid is described by components with being the total mole fraction of component . The fluid can partition into a liquid phase, denoted , and a vapor phase denoted by . Therefore, by taking into account the molar phase component fractions, (which is the fraction of the molar mass of phase represented by component ), the following partition matrix establishes the component distribution within the two phases:
where is the mole fraction of component in the liquid phase and is the mole fraction of component in the vapor phase.
The fluid properties are updated through the following steps:
1) The phase fractions () and phase component fractions ( and ) are computed as a function of pressure (), temperature () and total component fractions ().
2) The phase densities () and phase viscosities () are computed as a function of pressure, temperature and the updated phase component fractions.
After calculating the phase fractions, phase component fractions, phase densities, phase viscosities, and their derivatives with respect to pressure, temperature, and component fractions, the Compositional Multiphase Flow Solver then moves on to assembling the accumulation and flux terms.
Step 1: Computation of the phase fractions and phase component fractions (flash)
Stability test
The first step is to determine if the provided mixture with total molar fractions is stable as a single phase at the current pressure and temperature . However, this can only be confirmed through stability testing.
The stability of a mixture is traditionally assessed using the Tangent Plane Distance (TPD) criterion developed by Michelsen (1982a). This criterion states that a phase with composition is stable at a specified pressure and temperature if and only if
for any permissible trial composition , where denotes the fugacity coefficient of component .
To determine stability of the mixture this testing in initiated from a basic starting point, based on Wilson K-values, to get both a lighter and a heavier trial mixture. The two trial mixtures are calculated as and where are defined by
where and are respectively, the critical pressure and temperature of component and is the accentric factor of component .
The stability problem is solved by observing that a necessary condition is that must be non-negative at all its stationary points. The stationarity criterion can be expressed as
where is a constant parameter dependent on the feed composition and is an undetermined constant. This constant can be further incorporated into the equation by defining the unnormalized trial phase moles as
which reduces the stationarity criterion to
with the mole fractions related to the trial phase moles by
With the two starting mixtures, the stationarity condition is solved using successive substitution to determine the stationary points. If both initial states converge to a solution which has then the mixture is deemed to be stable, otherwise it is deemed unstable.
Phase labeling
Once it is confirmed that the fluid with composition is stable as a single phase at the current pressure and temperature, it must be labeled as either ‘liquid’ or ‘vapor’. This is necessary only to apply the correct relative permeability function for calculating the phase’s flow properties. The properties of the fluid (density, viscosity) are unchanged by the assignment of the label.
Determining the mixture’s true critical point is the most rigorous method for labeling. It is however expensive and may not always be necessary. As such, a simple correlation for pseudo-critical temperature is used and this is expected to be sufficiently accurate for correct phase labeling, except under some specific conditions.
The Li-correlation is a weighted average of the component critical temperatures and is used to determine the label applied to the mixture. The Li pseudo-critical temperature is calcaulated as
where and are respectively the critical volume and temperature of component . This is compared to the current temperature such that if then the mixture is labeled as vapor and as liquid otherwise.
Negative two-phase flash
When a cell is identified as having an unstable mixture, it is necessary to determine the amounts in the liquid and vapor phases through phase splitting. This phase split is calculated by ensuring that the two phases are in thermodynamic equilibrium. For a system to be in thermodynamic equilibrium, the fugacities of each component in both the liquid and vapor phases must be equal:
where is the fugacity of component in the liquid phase and is the fugacity of component in the vapor phase.
Fugacities are functions of temperature, pressure, and composition:
and
and are calculated directly from an equation of state.
Equilibrium constants, also known as K-values, are defined for each component as:
where is the mole fraction of component in the liquid phase and is the mole fraction of component in the vapor phase. If we denote as the mole fraction of the vapor phase, the material balance indicates that the mole fractions of each component in the liquid and vapor phases are given by:
and
The value of corresponding to a given set of K-values is determined by solving the so called Rachford and-Rice equation:
The flash calculation process is as follows:
Once the mixture is confirmed to be stable, an initial set of K-values is chosen, typically using Wilson’s formula.
Given and , the Rachford-Rice equation is solved to determine the molar fraction of vapor, . This is initially solved using successive substitution, followed by Newton iterations once the residual is sufficiently reduced.
After is calculated, the corresponding liquid and vapor mole fractions, and , are computed.
These phase compositions are then used to calculate the component fugacities and in the liquid and vapor phases using the equation of state.
Convergence is reached when the fugacities are equal for all components. The convergence criterion is defined as:
where is the convergence tolerance.
If convergence is not achieved, successive substitution is used to update the set of K-values for the next iteration. The new K-values at iteration are given by:
Parameters
The model represented by <CompositionalMultiphaseFluid>
node in the input.
Under the hood this is a wrapper around PVTPackage
library, which is included as a submodule.
In order to use the model, GEOS must be built with -DENABLE_PVTPACKAGE=ON
(default).
The following attributes are supported:
XML Element: CompositionalMultiphaseFluid
Name |
Type |
Default |
Description |
---|---|---|---|
checkPVTTablesRanges |
integer |
1 |
Enable (1) or disable (0) an error when the input pressure or temperature of the PVT tables is out of range. |
componentAcentricFactor |
real64_array |
required |
Component acentric factors |
componentBinaryCoeff |
real64_array2d |
{{0}} |
Table of binary interaction coefficients |
componentCriticalPressure |
real64_array |
required |
Component critical pressures |
componentCriticalTemperature |
real64_array |
required |
Component critical temperatures |
componentMolarWeight |
real64_array |
required |
Component molar weights |
componentNames |
string_array |
required |
List of component names |
componentVolumeShift |
real64_array |
{0} |
Component volume shifts |
constantPhaseViscosity |
real64_array |
{0} |
Viscosity for each phase |
equationsOfState |
string_array |
required |
List of equation of state types for each phase |
name |
groupName |
required |
A name is required for any non-unique nodes |
phaseNames |
groupNameRef_array |
required |
List of fluid phases |
Supported phase names are:
Value |
Comment |
---|---|
oil |
Oil phase |
gas |
Gas phase |
water |
Water phase |
Supported Equation of State types:
Value |
Comment |
---|---|
PR |
Peng-Robinson EOS |
SRK |
Soave-Redlich-Kwong EOS |
Example
<Constitutive>
<CompositionalMultiphaseFluid name="fluid1"
phaseNames="{ oil, gas }"
equationsOfState="{ PR, PR }"
componentNames="{ N2, C10, C20, H2O }"
componentCriticalPressure="{ 34e5, 25.3e5, 14.6e5, 220.5e5 }"
componentCriticalTemperature="{ 126.2, 622.0, 782.0, 647.0 }"
componentAcentricFactor="{ 0.04, 0.443, 0.816, 0.344 }"
componentMolarWeight="{ 28e-3, 134e-3, 275e-3, 18e-3 }"
componentVolumeShift="{ 0, 0, 0, 0 }"
componentBinaryCoeff="{ { 0, 0, 0, 0 },
{ 0, 0, 0, 0 },
{ 0, 0, 0, 0 },
{ 0, 0, 0, 0 } }"/>
</Constitutive>
References
M. L. Michelsen, The Isothermal Flash Problem. Part I. Stability., Fluid Phase Equilibria, vol. 9.1, pp. 1-19, 1982a.
M. L. Michelsen, The Isothermal Flash Problem. Part II. Phase-Split Calculation., Fluid Phase Equilibria, vol. 9.1, pp. 21-40, 1982b.