L.W. 8ouett, * SPE, A.S. Grader, * * SPE, and F.M. Orr Jr., SPE, Stanford U.
Summary. An interactive program (PVTLAB) was written to simulate PVT experiments with a microcomputer. The simulator is a
real-time representation of an actual PVT laboratory. Operations typically performed in the laboratory may also be performed with the
simulator. The Peng-Robinson equation of state (PR-EOS) is used to calculate phase behavior, and the results of the calculations are
displayed in color on the microcomputer monitor. The monitor graphically represents the condition of all the physical components of
the PVT laboratory, including pressures, fluid levels in vessels, and the status of valves and pumps. A printed record of every action
taken during a run is kept if desired. A simulated experimental error results in an appropriate termination of the run. Program structure
and operation are described, and examples of simulated PVT experiments are given.
Introduction
Phase behavior plays a fundamental role in oil recovery processes
ranging from the production of gas-condensate reservoirs to the injection of CO 2 for EOR. Reservoir engineers routinely work with
data obtained from PVTexperiments (e.g., solution GOR, oil FVF,
and gas viscosity) but are sometimes less familiar with the experimental procedures used to obtain the data than with the uses
to which the data may be put. Students learning about the behavior
of reservoir fluids need to understand how experiments are performed. Researchers performing PVT experiments may find it useful
to be able to predict the course of an experiment while it is being
conducted.
This paper describes an interactive PVT simulator that allows
the llser to become familiar with the experimental techniques used
in a PVT laboratory. Simulator experiments can be performed far
more rapidly than actual experiments and, of course, avoid the
potential safety concerns inherent in high-pressure experiments.
Thus, a PVT simulator has considerable value as a teaching tool.
To be useful, whether for training, practice, or prediction, the
simulator should allow the user to perform any operation that would
be performed during PVT experiments in the physical laboratory .
Thus, the simulator must (1) allow an action, such as opening a
valve or turning on a pump, to be taken; (2) predict any resulting
changes in phase behavior; (3) reflect those changes graphically;
and (4) wait for another action to be taken. This process is then
repeated indefinitely until either the simulation is terminated by the
operator or an inappropriate action is taken that results in an unexpected termination of the run.
In this paper, we describe a PVT simulator that meets these operational requirements. We describe the laboratory equipment simulated and outline the structure and operation of the program. In
addition, we illustrate program operation by performing simulated
transfer of fluids between vessels, constant-composition expansion,
and differential-liberation experiments.
Equipment
The components of the PVT system modeled by the simulator are
shown schematically in Fig. 1. This system is similar to an actual
apparatus designed for study of CO 2 /hydrocarbon mixtures. I Fig.
2 shows the simulator screen. Labels in parentheses in the text refer
to both Figs. I and 2. The system is centered around a lOO-cm 3
PVT cell (Visual Cell). In a typical experiment, a single component
or a mixture is transferred from a charging vessel (Charging Vessel
1,2, or 3) to the cell by using the hand pump to remove mercury
from the visual cell and to inject mercury into the charging vessel.
The mass of a component charged to the visual cell is obtained from
the volume of mercury transferred into the charging vessel at a given
pressure and temperature and the density of the fluid transferred
at those conditions.
Once a mixture of known overall composition is within the visual
cell, its volumetric behavior is investigated by injecting or removing
mercury from the cell. After the pressure has changed, the fluid
is circulated with a small circulation pump (LC Pump) to mix the
phases. When equilibrium is reached, the circulation is stopped.
Volumes of phases present in the cell are obtained by measuring
Now at Exxon Co. USA.
"Now at Pennsylvania State U.
Copyright 1989 Society of Petroleum Engineers
the heights of the mercury interface and the interfaces between the
phases. Bubblepoint and dewpoint pressures can be measured by
noting the pressures at which the volume of the vapor or liquid phase
becomes zero. Bubblepoint pressures can also be detected by the
sharp change in compressibility that occurs as the vapor phase
appears or disappears.
A sample of one of the phases can be removed from the system
for compositional analysis by using the motor-driven pump (Servo
Pump) to inject mercury into the cell at a known flow rate. As the
sample leaves the cell through one ofthe sampling loops, it passes
through a high-pressure densitometer (D-l or D-2) and a capillary
tube of known ID and length. The densitometer reports fluid density.
The pressure drop along the capillary tube is used along with
capillary length and diameter to calculate fluid viscosity. Fluid
pressure in the sampling line is maintained constant by a backpressure regulator (BPR). Downstream of the BPR, the fluid sample
is at a pressure close to atmospheric. The sample is allowed to split
into liquid and vapor in a small separator vial (Centrifuge Tube).
The amount of liquid is determined by weight, and the number of
moles of vapor is measured by monitoring the pressure in a gas
vessel that is evacuated initially. Compositions of the liquid and
vapor are determined with the gas chromatograph (GC). The overall
composition of the sample is then calculated from the amount and
compositions of the two phases present at atmospheric pressure.
The apparatus in Fig. 1 is designed to measure equilibrium phase
compositions and fluid properties as well as the volumetric behavior
of mixtures with changes in pressure. The apparatus can be used,
therefore, for standard constant-composition expansions, differential-liberation experiments, or more complex characterizations of
the behavior of EOR fluid systems.
Program Description
The PVT simulator mi~cs operation of the PVT laboratory system
by displaying a schematic of the PVT apparatus on the monitor
screen. Fig. 2 is a typical screen display. The user must open and
close valves and operate pumps to charge fluids into the PVT cell,
to compress or to expand mixtures in the cell, or to take samples
for fluid-property and phase-composition measurements. The operation of the PVT simulator is based on the following assumptions:
(1) thermodynamic equilibrium is instantaneous, (2) louIe-Thomson
effects are neglected and pressure changes take place isothermally,
(3) mercury is incompressible, and (4) tubing in the system has no
volume. The phase behavior of the fluid mixtures is calculated with
the PR-EOS.
Data Input. Data are entered as strings. In this way, it is possible
for the data-entry module to check the validity of each number as
it is entered before adding it to the string. "Validity" means, for
example, that if the required input is numeric, only numbers may
be entered. The 25th line is used for data input. Because data are
checked for validity and type when they are entered, a characteristic "beep" is sounded if there is a data input error. Error checking
does not preclude making a mistake: for example, error checking
will not allow toggling of Valve 50 because there is no Valve 50
in the system; it will, however, allow opening of enough valves
to create a loop that could result in an unrecoverable material-balance
error.
481
12
11
-- ~-
-r-==--~ I
I
I
I
I
I
I
Gas
Chromatograph
Hg Supply
Graphic Screen. The PVTLAB simulator makes extensive interactive use of screen graphic capabilities. The visual cell is drawn
large on the screen with an oversized viewport so that it may be
seen easily. Vapor and liquid volumes in the cell are drawn digitally on the screen in cubic centimeters and visually as proportional
areas within the cell viewport. YeHow mottled with randomly
moving grey dots represents the vapor phase, brown represents the
liquid phase, and grey represents mercury. The interfaces of the
phases in the cell are drawn accurately according to their relative
volumes, although the interfaces are shown straight rather than
curved.
By opening appropriate valves, the pressure in the cell or anywhere in the system may be seen. Valve position is reported either
as green (valve open) or red (valve closed). Pump status is reported
by the color of the pump base either as red (pump on) or green
(pump oft). Pressure gauges are continuously updated, and the BPRset pressure is displayed digitally on the BPR. All vessels and components have descriptive labels and all valves have numbers. Vessel
labels and valve numbers may be displayed independently as desired.
There is a block on the right of the screen that reports the input
temperatures relevant to the experiment. A clock displays real time.
The 25th line reports program status and messages and is used for
data input.
Program Operations. Program functions are implemented by
pressing the appropriate function key (FI through FlO). Table I
482
Typical Experiments
Several types of experiments may be run, such as constantcomposition expansion, depletion, or differential liberation. Recall
that simulator operation is really a sequence of a few basic operations. Therefore, an experiment comprises the logical combination
of a given series of operations.
Transfer of Fluid From a Charging Vessel to the Visual Cell.
The cell initially contains an "oil" of 50 mol % n-butane (nC 4 ) and
50 mol % n-decane (nC 10)' Charging Vessel I contains CO 2 , In
the example, we first move CO 2 to the visual cell from the
charging vessel. Figs. 2 and 3 illustrate the following operations.
Initially, all the valves in the system are closed.
1. Press function key F2. The 25th line prompts' 'Enter valve."
2. Enter "01" and press ENTER. The color of Valve 1 changes
from red (closed) to green (open). The pressure on the gauge near
Valve 8 now reads 1,000.0 psia [6.895 MPaj. This is the pressure
in the charging vessel. We need to know the pressure in the charging
vessel to ensure that it is greater than or equal to the pressure in
the visual cell.
3. Using function key F2, close Valve 1. The charging vessel
is now isolated.
4. Using function key F2, open Valve 8. The pressure on the
gauge near Valve 8 now reads 55.584 psia [383.3 kPaj (Fig. 3a).
This is the pressure in the visual cell. Because the cell pressure
is so low relative to the charging-vessel pressure, we will compress
the cell contents to raise its pressure. Because the hand pump has
no Hg in it, we must first isolate the visual cell and fill the hand
pump with Hg from the Hg supply vessel.
5. Using function key F2, close Valve 8. The visual cell is now
isolated.
6. Using function key F2, open Valves 9 and 10. The tubing from
the hand pump to the Hg supply vessel is now open.
7. Press function key F5. The 25th line prompts "Enter injection
volume (cc):".
8. Enter "-30" and press ENTER. The simulator accepts the
entry as a withdrawal and prompts "Press ENTER to withdraw
fluid. "
9. Press ENTER. The simulator represents the withdrawal of30
cm 3 ofHg digitally on the hand pump. The color of the pump base
changes from green to red to indicate that the pump is on. The 25th
line informs "Withdrawing fluid ... " during withdrawal, which
is scaled to take about 10 seconds. Then there is a "beep" and
the color of the pump base changes from red to green to indicate
483
back down to the original pressure, 1,000.0 psia [6.895 MPa]. This
is done in small steps, being careful not to exceed the working
pressure limits of either the system tubing or any of the vessels.
When enough fluid has been transferred into the visual cell by thIS
method, the charging operation continues.
19. Using function key F2, close Valve 11. This isolates the cell
from the charging vessel. Here the simulator must recombine the
contents of the cell, because additional mass (C0 2 from the
charging vessel) has been added. The 25th line informs "Recombining the VC .... " Following recombination, the state of the new
overall composition of the cell must be checked by the EOS. In
this example, it is still a single-phase liquid. The pressure is reported
as 999.7 psia [6.893 MPa] (Fig. 3c). The phase volume in the visual
cell is 34:853 cm 3 of liquid.
20. Using function key F2, close Valve 4. This isolates the tubing
leg between the charging vessel and the cell.
21. Using function key F2, close Valve 1. Now the charging
vessel is completely isolated.
Constant-Composition Expansion. The visual cell now contains
20 mol % CO 2 and 40 mol % each of n-butane (C 4 ) and n-decane
(C IO ). The volume of CO 2 /hydrocarbon is 34.853 cm 3 The
pressure in the cell is 999.7 psia [6.893 MPa]. The pressure is
measured by opening Valve 8. A constant-composition expansion
may now be performed. Figs. 2 and 4 illustrate the following steps.
1. Using function key F2, open Valve 8. The tubing from the
hand pump to the cell is now open. The pressure on the gauge near
Valve 8 reads 999.7 psia [6.893 MPa].
2. Press function key F5. The 25th line prompts "Enter injection
volume (cc):".
3. Enter "-30" and press ENTER. The 25th line prompts "press
ENTER to withdraw fluid."
4. Press ENTER. The pump runs for 10 seconds then "beeps"
off. The 25th line informs "Coming to equilibrium ... " while the
flash is being calculated. When the flash is complete, there is a
"beep" and the simulator redraws the fluid levels in the cell. Now
there is a total CO 2 /hydrocarbon volume of 64.853 cm 3 in the
visual cell. The liquid volume is shown on the screen as 34.082
cm 3 , and the vapor volume is given as 30.761 cm 3 . The pressure
is now 233.51 psia [1.61 MPa] (Fig. 4).
5. Press function key F6. This operates the LC pump. On the
simulator, this has a graphic effect only. The color of the pump
base changes from green to red to indicate that the pump is on.
The 25th line informs "LC pump circulating .... " The LC pump
runs for about 10 seconds. There is a "beep" and the color of the
pump base changes from red to green to indicate that the pump is off.
This sequence may be repeated as many times as desired. There
are a few variations here: if the hand pump becomes filled (it has
SPE Reservoir Engineering, November 1989
PSlPlJU'
2.888
!lax. deliue!'9
22.888 cc
Total deliuel'!l
8.153 cc
13 is opened, the cell pressure (233.51 psia [1.61 Mpa]) is displayed on both of the pressure gauges on the upper sample leg.
These pressure gauges will be used later to determine the increase
in pressure required in the visual cell to start fluid flowing through
the capillary tube.
8. Using function key F2, open Valves 15 and 17. The sampling
system is now ready for a vapor sample to be taken from the cell.
9. Press function key F3. When the function key is pressed, a
small drop-down frame appears at the lower left comer of the screen.
The 25th line prompts "Enter rate (cc/min):". This is the flow rate
for the motor-driven pump.
10. Enter "2" and press ENTER. The 25th line now prompts
"Enter max. delivery (cc):". This is the maximum delivery
shutdown.
11. Enter "22" and press ENTER. Because the motor-driven
pump flow totalizer is zero, the drop-down frame is erased from
the screen at this time. The values that have been entered have been
saved by the simulator. Had there been flow previously through
the pump, the 25th line would have prompted, "Reset total delivery
(YIN)?" A single keystroke, either a Y or an N, would have performed the requested action and the drop-down frame would have
been erased as before. The system is now ready for a vapor sample
to be taken.
12. Press function key F4. Pressing this function key starts the
motor-driven pump. The pump base changes color from green to
red to indicate that the pump is running. A subsequent F4 function
key request would immediately stop the pump. As the pump runs,
the drop-down frame is redrawn on the screen and the user may
watch as the delivery begins to climb. This is a real-time function;
the flow rate of2.0 cm 3 /min takes exactly 1 minute for each 2.0
cm 3 delivered.
Now the user must watch the pressure gauges on the sample leg.
At first, the pressure at both gauges climbs until it reaches that of
the BPR-set pressure, 235 psia [1.62 MPa]. As the pump continues
to deliver Hg into the cell, the downstream pressure stops climbing.
The upstream pressure, however, continues to climb because of
the higher pressure required in the cell owing to the viscosity of
the fluid flowing through the capillary tube.
The pressure at the upstream gauge in this example finally
stabilizes when it reaches 246.38 psia [1.699 MPa]. The pump
delivery at this point is about 7.823 cm 3 ofHg into the cell (Fig.
6). The pump continues to deliver Hg to the cell until it has delivered 22.000 cm 3 , the maximum delivery shutdown volume. Then
the pump shuts off. This is announced by a "beep," and the color
of the pump base changes from red to green. With the flow of Hg
into the cell stopped, the pressure at the upstream gauge now falls
offuntil it reaches that of the BPR-set pressure, 235 psia [1.62 MPa].
485
iGC analysis:
1COIIIponent
n-Butane
rl"-~4t-.-~.',',/V\/'rI'" \ Decalle
I C02
"Press ESC to continue .... " When the ESC key is pressed, the
sample analysis frame is erased and program operations may
continue.
At this point, in a differential-liberation experiment, the user
would continue by withdrawing Hg from the visual cell to lower
the pressure (constant-composition expansion) and then taking
another sample.
Discussion
While the PVT simulator described here depends on the PR-EOS
to perform all the calculations of equilibrium phase compositions,
the fact that an EOS is being used is transparent to the user (unless
the computation fails to converge, as happens occasionally). Instead, the user sees a PVT cell in which phase volumes and measured
pressures change in response to changes in cell volume. In addition,
phase compositions and properties can be determined by a sampling procedure that closely mimics the procedure used in actual
experiments in our laboratory. Thus, from the user's point of view,
the PVT system responds just as a physical system would, though.
the quantitative responses in this case are calculated.
The PVT simulator has been used in both graduate and undergraduate phase-behavior courses. Students are typically asked to
perform phase-behavior experiments that are then interpreted in
lectures and additional homework problems. Examples of problems
assigned include measurement of the vapor pressure of a pure component (butane or CO 2), determination of phase compositions and
properties for ternary systems, and preparation of p-x phase diagrams for C02/oil systems. Experience indicates that students
learning about phase diagrams absorb that material more quickly
when they know how the measurements themselves are made. Experience also indicates that students learn as much from their
mistakes as they do from successful completion of the experiments.
They learn quickly not to open the wrong valve, to avoid starting
a pump with the wrong valve closed, and to think through what
flow paths are available to the high-pressure fluids present at various
places in the system. One advantage of simulation is that students
can be allowed to make those mistakes without endangering them-selves or the equipment. Just as airlines have learned that simulators have their place, we find that students can acquire useful
experience very quickly with the PVT simulator and enjoy doing so.
There is, of course, no substitute for actual physical experiments.
Given the complexity of the equipment and safety considerations,
students who have used the PVT simulator can make better use of
limited laboratory time available for experiments at high pressure.
Thus, the simulator is useful as one component of learning about
the physical behavior of fluid systems of importance to the oil industry.
References
1. Orr, F .M. Jr. and Sageev, A.: "Reservoir Characterization for the C02
Enhanced Oil Recovery Process," Report No. DOE/MC/22042-5, U.S.
DOE (March 1987).
2. Peng, D.-Y. and Robinson, D.B.: "A New Two-Constant Equation
Of State," Ind. & Eng. Chern. Fund. (1976) 15, 59-64.
3. Lohrenz, J., Bray, B.O., and Clark, C.R.: "Calculating Viscosities
of Reservoir Fluids From Their Compositions," JPT(Oct. 1964) 117176; Trans., AIME, 231.
4. Reid, R.C., Prausnitz, J.M., and Sherwood, T.K.: The Properties of
Gases and Liquids, McGraw-Hill Book Co., New York City (1977)
629-65.
For full-color screen dumps, an IBM color printer Model 38522 is required .. To drive the color printer, the appropriate driver (supplied by ffiM) must be installed when the system is initialized. This
is an optional piece of hardware in terms of program requirements
but is recommended. Any printer will accept the output from the
computer for the log of operations, so that feature may be used
with or without the color printer.
The PVT simulator runs within the MS-DOS operating environment, Version 3. lO or higher. PVTLAB was written in
Microsoft QuickBASIC Version 2.0, a compiled language.
Tc
Pc
Component
Methane
Ethane
Propane
i-Butane
190.7
45.8
305.43 48.2
369.9
42.01
425.2
36.0
408.1
37.47
425.2
32.9
460.4
33.31
469.8
29.92
507.9
27.01
540.16 24.64
568.6
22.5
617.6
20.8
126.2
33.5
304.2
72.9
373.6
88.9
592.0
41.6
647.3 217.6
133.05 34.5
154.75 50.13
n-Butane
i-Pentane
n-Pentane
Hexane
Heptane
Octane
Nonane
Decane
Nitrogen
CO 2
H2S
Toluene
Water
CO
Oxygen
(atm)
Vc
(ft 311bm mol)
0.0991
0.0788
0.0737
0.0724
0.0702
0.0679
0.0675
0.0688
0.0691
0.0690
0.0684
0.0679
0.0514
0.0342
0.0459
0.0549
0.0500
0.0532
0.0382
M
16.043
30.070
44.097
58.124
58.124
72.151
72.151
86.178
100.205
114.232
128.259
142.286
28.013
44.01
34.076
92.141
18.015
28.010
31.999
w
0.007
0.091
0.145
0.193
0.176
0.193
0.227
0.251
0.296
0.351
0.394
0.489
0.040
0.225
0.100
0.257
0.348
0.041
0.0213
---
Pa
m 3 /kmol
K
kPa
SPERE
Original SPE manuscript received for review June 23, 1987. Paper accepted for publication
April 10, 1989. Revised manuscript received March 21. 1989. Paper (SPE 16502) first
presented at the-1987 SPE Petroleum Industry Applications of Microcomputers held in Montgomery, TX, June 23-26.
487