Blog | Tools | Glossary | Search Share:   |  feedback   |  Join us

# PVT and Flow course - Flash Calculations

### More By Petro Engineer

PVT and Flow course - Rate Equation (Darcy) Intro
Gaslift in simple words
1

## Flash Calculations (Part 1 of 2)

A lecture over Flash Calculations and their applications to equations of state. Information from chapter 4 of "Phase Behavior" SPE Monograph (Whitson and Brule)
PDF of notes available here: http://www.ipt.ntnu.no/~curtis/courses/YouTube/Video-Notes/Whitson-PVT-Flow-20120921-Flash-Calc.pdf

We are going to talk about a phase equilibrium calculation. It's usually referred to as the isothermal flash calculation.
The problem statement is that we have a system at fixed (or known or specified) pressure and temperature, and you have the the known composition inside. This might be a some little place inside the reservoir, the production tubing or a production separator, at the surface, it can be really anywhere in the production system.
What we're interested in is finding out:

1. how many phases exist (1 or 2).
2. how much of each phase. And that will be done in terms of moles or, more typically mole fraction.
3. the molar composition of each phase (yi for gas and xi for liquid).
```Note:
* if it is two phases - they are gas ang liquid (or gas and oil)
* if it is one phase, it can either be:
** saturated (in a sense it's two phases but you've got one is one minus epsilon and the other is epsilon, so it's like single phase but there's this like little bubble trying to appear or a little drop trying to appear. So it's a single phase but epsilon  you don't see, in a sense the second phase is just it's kind of there)
** undersaturated - where there is just one phase but we can't formally say whether it's gas or liquid. We can only say it behaves like a gas or behaves like liquid.
```

The solution requires in addition to the pressure, temperature and composition Zi, it requires an estimate of the ratio which we call the equilibrium ratio component Ki.

```Ki = yi / xi - equilibrium ratio
```

Component material balance says that total moles is equal to the moles of component i in the liquid plus the number of moles of component i in the vapor. we don't let in those component i disappear:

```ni = nLI + nVi
```

We have a total material balance that we don't lose any moles altogether. So the total moles is equal to total moles in the liquid plus the total moles in the vapor:

```n = nL + nV
```
```n = Σni;
nL = ΣnLI;
nV = ΣnVi
```

Define:

```zi = ni/n
yi = nVi/nV
xi = xLi/nL
fv = nv/n -  mole fraction of vapor is the moles of vapor over the total moles
fL = nL/n - mole fraction of the phase liquid
fL = 1 - fv
```

And also:

```Σzi = 1 =  Σyi =  Σxi
```

Let's rewrite the equations:

```zi = fv*yi  + (1 - fv)*xi
zi = fv*(Ki*xi)  + (1 - fv)*xi
```

Let's solve this for xi and yi:

```xi = zi / [fv*(Ki-1) + 1]
yi = Ki*xi = [zi*Ki] / [fv*(Ki-1) + 1]
```

In 1949 Muscat and his colleague McDowell published the first paper in the Society of petroleum engineers about using a computer and they had to solve this problem in connection with that and so they did. But later, Rachford and Rice published a 3 or 4 page paper in the Society of petroleum engineers, they gave this whole development we've done and they came up with this final equation, a little bit further than that. And they became famous. But in fact Muscat and McDowell in 1949 paper in a small footnote and the text of the paper gave exactly the equation. And Rachford and Rice did not refer to what was Morris Muskets last publication.

```Σ(yi - xi) = 0
Σ {[zi*Ki - 1] / [fv*(Ki-1) + 1]} = 0  - that is so called Rachford-Rice equation.
```

The only thing in that equation we don't know is fV. You define this function:

```h(fV) = Σ {[zi*Ki - 1] / [fv*(Ki-1) + 1]} = 0
```

The only thing you have to do to solve this problem to solve this equation. You have to find which fV drives this summation to 0.

## Flash Calculations (Part 2 of 2)

Let's look at the equation and see what are the characteristics of this of this function"

```h(fV) = Σ {[zi*Ki - 1] / [fv*(Ki-1) + 1]} = 0
```
1. h(fV) is a monotonic function, that should mean that a Newton Rapson type solution should work efficiently, we can take the analytical derivative and use that in a Newton Rapson solution.
2. (N-1) solutions for N components. But luckily only one of these yields physical solution. And by physical solution what we mean is that both the calculated xi are positive for all components and the calculated yi for all components are positive.
```0 > 1/(1-Kmax) = fVmin < fV < fVmax = 1 / (1-Kmin) > 1
```

You just have to search all the K values and you find the minimum and you find the maximum and that will immediately tell you what is fVmin and fVmax. And in between those two numbers there's only one solution and only that solution will guarantee this: xi>0 and yi>0. So, even though there are n minus 1 solutions we can immediately identify the bounds of the one we want.

```0 ≤ fV ≤ 1 - two phase solution, liquid + vapor
fV = 0  - saturated single phase solution, liquid
fV = 1  - saturated single phase solution, vapor
fV < 0  - undersaturated single phase, liquid-like solution
fV > 1  - undersaturated single phase, vapor-like solution
```

The general setup for solution is that you know basically pressure, temperature and composition:

1. Estimate Ki(P,T,pk)
2. Setup a table:

Guess: fV
Calc: fVmin
and fVmax

 i zi Ki ci Termi yi xi 1 2 3 ... N h

Changing fV
try to achieve h = 0.

There are special cases of the flash calculation. To learn more, watch the full video.

## Flash Calculation Example (Part 1 of 3)

An example using Flash Calculations. Information from chapter 4 of "Phase Behavior" SPE Monograph (Whitson and Brule)ю
PDF of notes available here: http://www.ipt.ntnu.no/~curtis/courses/YouTube/Video-Notes/Whitson-PVT-Flow-20120925-Flash-Example.pdf

## Other lectures from the PVT and Flow course

Class notes developed during lectures are available as PDF files, named with the format yyyymmdd.pdf located on: http://www.ipt.ntnu.no/~curtis/courses/PVT-Flow/2016-TPG4145/ClassNotes/