You are on page 1of 7

Simulation of PVT Experiments

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

SPE Reservoir Engineering, November 1989

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


-- ~-

-r-==--~ I



Hg Supply

Fig. 1-Experimental apparatus for PVT measurement.

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

briefly summarizes the function of each of these special-purpose

keys. As Table 1 shows, some function keys require data input,
while others do not.
There are two basic operations: valves may be opened or closed
and fluid may be injected or withdrawn by either the hand pump
or the motor-driven pump. In addition to these two basic operations, the following ancillary operations may be performed: the LC
pump may be cycled (graphic effect only), the BPR pressure may
be set, the sample collection system may be evacuated, the GC may
be charged with the fluids in the sampling system (this also resets
the sample collection system), the GC analysis may be displayed
(if no sample has been taken, the analysis displayed is that of the
visual cell), and vessel labels and valve numbers may be toggled
on and off. Everything that may be done in the laboratory (and
therefore in the simulator) is a combination of these operator actions.
Because data are entered as strings, it is possible to use the BACKSPACE key to return to the previous level of program operation
or to cancel a function key request altogether. This is convenient
if one decides not to perform a particular action.
Computation of Phase Behavior. At the heart of the computation
module of the simulator is the PR-EOS.2 Because compositions,
volumes, and temperatures are known by the simulator at all times,
in single-phase liquid or vapor regions, the resulting pressure is
calculated directly by the EOS. In two-phase regions, a flash calculation is required. In a typical EOS flash calculation, pressure
is known and the EOS calculates phase volumes. Here, the overall
system volume is fixed, whether in a charging vessel, the visual
cell, or either leg of the sampling system. Because the system
volume is fixed, the flash algorithm must iterate on pressure. It
does so by setting a guess of the system pressure and performing

Fig. 2-Simulator representation of PVT apparatus.


Toggle vessel labels and valve numbers on/off

Open/close a valve; requires data input
Set motordriven pump rate and maximum delivery;
reset delivery totalizer; requires data input
Start/stop the motordriven pump
Set hand pump injection/withdrawal volume; requires
data input
Start the LC pump sequence
Set BPR-set pressure; requires data input
Evacuate the sampling system to 0 psi a
Charge the GC with fluid from the sampling system
Display GC analysis; if no sample has been taken,
display visual cell analysis
SPE Reservoir Engineering, November 1989

Fig. 3-Transfer of fluids from a charging vessel to the PVT cell.

a standard iteration to adjust by phase compositions until vapor and

liquid fugacities are equal. Then the sum of the phase volumes predicted by the EOS is compared with the fixed overall volume of
the system, and the pressure is adjusted until that sum matches the
overall volume of the fixed system within some error criterion.
Thus, the simulator mimics in its iteration scheme what happens
in the laboratory; we change the overall system volume and circulate the fluids until equilibrium is achieved. The result is an equilibrium pressure.
The equilibrium-pressure algorithm described above is used
repeatedly by the simulator. If the volume of a charging vessel is
changed by injecting or withdrawing Hg, a new equilibrium pressure
must be calculated. If a sample is taken through either of the sampling lines, it is likely that the sample fluid will form two phases
in the low-pressure portion of the sampling system. In that case,
the pressure calculated is reported as the pressure in the gas collection vessel.
Computation of Viscosity and Density. In the PVT laboratory,
fluid viscosity is calculated by observing the pressure drop of fluid
flowing through a capillary tube of known diameter and length.
Poiseuille's law is used to calculate viscosity, given the pressure
drop and volumetric flow rate. The simulator uses the correlation
of Lohrenz et at. 3 to calculate viscosity. Pressure drop is calculated on the basis of the set flow rate of the motor-driven pump.
If the motor-driven pump is started and allowed to run sufficiently
long, a stabilized pressure drop is achieved and no further pressure
change is displayed on the screen. A finite time is required for the
pressure drop to stabilize because the contents of the cell must be
compressed to a pressure higher than that set for the BPR. The
change in cell volume required is calculated on the basis of the
overall compressibility of the cell contents at the start of the compression step. Because the change in pressure is usually small in
such steps, changes in phase composition are ignored. Then, from
the same data as those available in the laboratory-flow rate,
pressure drop, and the physical dimensions of the capillary tubeviscosity may be calculated.
Molar and mass densities may be calculated directly at any time
because the simulator continuously tracks the molar compositions
and volumes of all phases in all vessels.
Error Conditions. Error conditions in the simulator generally are
of two types: those that may actually happen in the laboratory from
which it is difficult or impossible to recover and those from which
recovery offers little or no teaching value on the simulator. Some
errors in the laboratory are nondestructive, such as venting a sample
to atmosphere or introducing two phases into the sampling system.
When a nondestructive error occurs in the simulator, the error is
printed on the 25th line and program execution is terminated. Other
errors in the laboratory are more serious, such as exceeding the
working pressure of the system tubing or a vessel. The simulator
handles such errors by presenting a graphic consequence of the
action: the screen "blows up" to accompanying sound effects.
SPE Reservoir Engineering, November 1989

Following a terminating error condition on the simulator, the

graphic screen is restored and the 25th line prints a closing message.
At this time, if the appropriate printer is attached to the system (see
Appendix A for hardware and software requirements), the fullresolution color screen may be dumped to that printer. Otherwise,
pressing any key terminates the program. All terminating error conditions are reported in the printed log of the session if that option
has been selected.

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

Fig. 5-Differentlal-liberatlon experiment: opening the sampling leg.

Fig. 4-Constant-compositlon expansion.

that the pump is off. The volume of Hg in the hand pump is 30

cm 3 and is displayed digitally on the body of the pump.
10. Using function key F2, close Valve 10. The Hg supply vessel
is now isolated.
11. Using function key F2, open Valve 8. The tubing from the
hand pump to the visual cell is now open.
12. Press function key F5. The 25th line prompts "Enter injection
volume (cc):".
13. Enter "5.147" and press ENTER. The 25th line prompts
"Press ENTER to inject fluid."
14. Press ENTER. This discharges the specified volume of Hg
(5.147 cm 3 ) into the visual cell. After the scaled 1O-second delay,
there is a "beep" as the pump shuts off. Because the fluid in the
visual cell is now a single-phase liquid, no flash is required and
the simulator redraws the fluid levels in the cell. Now there is a
total CO 2 /hydrocarbon volume of 31.839 cm 3 in the visual cell.
The liquid volume is shown on the screen as 31.839 cm 3 , and the
vapor volume is given as 0.000 cm 3 . The pressure is now 999.5
psia [6.892 MPa] (Fig. 3b).
15. Using function key F2, close Valve 8. The visual cell is now
16. Using function key F2, open Valve 1. The tubing between
the hand pump and the charging vessel is now open.
17. Using function key F2, open Valve 4. The valve at the top
of the charging vessel is now open.
18. Using function key F2, open Valve 11. The tubing from the
top of the charging vessel to the visual cell is now open. Because
the pressures in both the charging vessel and the cell are no longer
isolated, an equilibrium pressure must be achieved. The simulator
finds the eqUilibrium pressure by calculating the compressibilities
of the fluids in each vessel. It is known that the change in volume
in one vessel is equal to the negative change in volume in the other
vessel. The equilibrium pressure is the same for both vessels and
is equal to the original pressure plus the compressibility times the
volume change in that vessel. Thus the equilibrium pressure is easily
calculated. The new pressure, 999.9 psia [6.894 MPa], is reported
on the gauge near Valve 8.
The procedure now is to inject a small volume of Hg into the
charging vessel using the hand pump. The pressure in the system
will rise slightly. Next, a small volume of Hg is withdrawn from
the visual cell with the hand pump to bring the system pressure

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


Rate (eel. in)

!lax. deliue!'9

22.888 cc
Total deliuel'!l
8.153 cc

Fig. 6-Differential-liberation experiment: capillary-tube pressure drop.

Fig. 7-Differentlal-liberatlon experiment: postsampllng equilibrium.

a 30-cm 3 capacity), it must be discharged into the Hg supply vessel

using the following sequence:
1. Using function key F2, close Valve 8. This isolates the visual
2. Using function key F2, open Valve 10. The tubing is now open
between the hand pump and the Hg supply vessel.
3. Press function key F5. The 25th line prompts "Enter injection
volume (cc):".
4. Enter "30" and press ENTER. The 25th line prompts "Press
ENTER to inject fluid-."
5. Press ENTER. This discharges the Hg in the hand pump into
the Hg supply vessel.
6. Using function key F2, close Valve 10. The Hg supply vessel
is now isolated.
7. Using function key F2, open Valve 8. The tubing is now open
between the hand pump and the visual cell.

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

Taking a Fluid Sample From the Cell: Differential-Liberation

Experiment. At this point, it is possible to perform a differentialliberation experiment. The starting condition is the same as that
at which the constant-composition expansion ended. Figs. 2 and
5 illustrate the following steps.
1. Using function key F2, close Valve 9. The hand pump is now
2. Using function key F2, open Valve 7. The tubing is now open
between the visual cell and the motor-driven pump. These two operations were necessary to set up the system to begin the differentialliberation experiment. All the operations that follow are part
of that experiment.
3. Press function key F7. The 25th line prompts "Enter set
pressure:". The BPR set pressure must be greater than or equal
to the pressure of the fluids to which it will be exposed when the
sampling line is opened to preclude fluid from flashing across the
BPR. Under these conditions, the flash would not be at constant
composition. A reasonable set pressure is 235 psia [1.62 MPa].
4. Enter the number "235" and press ENTER. The new BPRset pressure, 235 psia [1.62 MPa], is displayed on the BPR.
5. Using function key F2, open Valve 19. The centrifuge tube
and the gas vessel are now ready to receive a sample.
6. Press function key F8. Pressing this function key resets the
sample collection system pressure to 0 psia [0 MPa]. This operation is scaled to take about 10 seconds. To simulate the action of
a vacuum pump, the pressure in the sampling system, shown on
the gauge at the gas vessel, may be seen falling to 0 psia [0 MPa].
7. Using function key F2, open Valve 13. Fig. 5 indicates that
the upper sample leg is in the vapor region of the cell. To sample
the upper phase, Valves 13, 15, and 17 must be opened. When Valve
SPE Reservoir Engineering, November 1989


iGC analysis:

rl"-~4t-.-~.',',/V\/'rI'" \ Decalle
I C02

Fig. 8-GC sample analysis.

The viscosity of the fluid can then be calculated with Poiseuille' s

law from the measured value of the pressure drop, the flow rate,
and the capillary-tube diameter and length (OJ)o6 in. [0.015 cm]
and 6.6 ft [2.0 m], respectively).
At this point, the simulator must do some internal bookkeeping
and check the contents and condition of the fluids in both the cell
and the sampling system. In this example, the vapor from the cell
is a single-phase vapor in the sampling system. Its pressure is calculated by the EOS and displayed on the pressure gauge at the gas
vessel. In this example it is 4.666 psia [32.2 kPa] (Fig. 7).
Next, the fluid levels in the visual cell are changed to reflect the
volume of Hg that has been injected. The system is now static. At
this point it is possible to reset the motor-driven-pump flow totalizer
and inject more Hg. In this example, we now isolate the sampling
system and determine the composition of the sample taken. At this
point, the user must note the pressure of the gas in the gas sample
vessel and the weight ofliquid in the centrifuge tube. The number
of moles of gas sampled can be determined from the pressure, temperature, and sample-vessel volume (2000 cm 3 ) and the ideal gas
law. The number of moles of liquid can be determined after the
liquid composition is measured. Then, the overall mixture composition can be calculated from the moles of liquid and vapor and the
composition of each phase. To measure the phase compositions,
the following steps are performed.
l. Using function key F2, close Valve 13. Now that the cell has
been isolated, the simulator must recombine the contents of the cell.
The 25th line informs "Recombining the VC ... " and there is a
"beep" when the calculation is complete.
2. Using function key F2, close Valves 15 and 17. This isolates
the cell and the sample leg up to the BPR.
3. Using function key F2, close Valve 19. The separator vial has
now been isolated from the gas vessel.
4. Using function key F2, open Valves 20 and 21. The sample
in the gas vessel is now ready to be charged to the gas chromatograph, using helium from the helium supply cylinder.
5. Press function key F9. This function key provides a graphic
effect. There is about a IO-second delay while the 25th line informs
"Charging the GC .... " After the delay there is a "beep" and
the sampling system is reset to its original condition: the centrifuge
tube is changed out and the gas vessel is purged with helium at atmospheric pressure. At this time, another sample may be taken.
6. Using function key F2, close Valves 20 and 21. The system
is now completely isolated.
7. Press function key FlO. When this function key is pressed,
a drop-down frame appears at the upper right corner of the screen.
The frame displays the analysis from the GC. The analysis of the
sample taken in our example is shown in Fig. 8. The sample is all
vapor, containing more than 75% CO 2 , The 25th line prompts

"Press ESC to continue .... " When the ESC key is pressed, the
sample analysis frame is erased and program operations may
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.

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

Appendix A-Summary of Hardware and

Software Requirements
The PVT simulator was written to run on an 8-MHz IBM PC/AT
with an enhanced-graphic-adaptor (EGA) card installed. The
graphics portion of the program requires that the EGA card have
installed 256 kilobytes of memory. An enhanced color monitor is
also required and allows use of the full 350 x 640-pixel, 16-color
palette resolution offered by the hardware.
Because the program is modular, use of another graphic system
would require modification of only the graphic module and not the
entire program. Use of a computer with a different clock speed
would affect only the time required for calculations.
SPE Reservoir Engineering, November 1989

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.

Appendix B-Setup Program

An independent setup program allows the user to select components for one or more of the charging vessels and/or the visual cell
from a menu of standard components. The program keeps internal
tables of standard component properties. These properties are critical
pressure, Po temperature, Te, and volume, Ve; molecular weight
M; and acentric factor, w. The program also prompts for all the
system parameters necessary to operate the simulator. These parameters are pressures for each charging vessel, ambient temperature, charging-vessel temperature, oven temperature, visual-cell
volume, and either the number of moles in the visual cell or the
visual-cell pressure.
Pseudocomponents may be entered instead of, or along with,
standard components. When pseudocomponents are used, all the
required component properties must be entered along with a name
for the pseudocomponent.
Finally, a parameter file is written by the setup program that is
used by the simulator driver. It is also possible to create the parameter file with any editor.

Appendix C-Summary of Standard

Component Properties
Table C-l summarizes the properties of the standard components
available in the PVTLAB simulator's setup program. 4 These properties are contained as internal tables within the setup program.
Properties of the components selected as input are written by the
setup program to the parameter file used by the simulator driver.

SPE Reservoir Engineering, November 1989






305.43 48.2
540.16 24.64
647.3 217.6
133.05 34.5
154.75 50.13



CO 2


(ft 311bm mol)





The components in boldface type in Table C-l are those of the

ternary system used as an example in the text.

SI Metric Conversion Factors

atm x 1.013 250*
ft 3 /lbm mol x 6.242796
OF CF +459.67)/1.8
psi x 6.894757
'Conversion factor is exact.

m 3 /kmol


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.