EOS Example, How To Read Tables, and Basic Numerical Analysis

From WikiEducator
Jump to: navigation, search






Icon objectives.jpg
Objectives
  • Solve an example of a equation of state using both a generalized correlation and an analytical equation
  • Learn how to interpolate a table
  • Use iteration to solve a nonlinear equation


Example

Calculate the compressibility factor and the specific volume of formaldehyde at 100 °C and 15.0 bar using (a) the ideal gas equation, (b) the three parameter correlation, and (c) the Soave equation.

Solution

(a) The ideal gas equation is [math]P\hat{V}=RT[/math]. By inspection we can see that Z = 1. To calculate the specific volume we will use R = 83.14 cm3/mol K. These units are the most useful in EOS calculations.

Then

[math]\hat{V}=\frac{RT}{P}=\frac{83.14\frac{cm^{3}bar}{mol\,K}373\,K}{15\,bar}=2067\frac{cm^{3}}{mol}[/math]

(b) From the data we get TC = 408 K, PC = 65.90 bar, ω = 0.282

With these values we get [math]T_{R}=\frac{373K}{408K}=0.914, P_{R}=\frac{15bar}{65.90bar}=0.228[/math]

We now need to read the values of Z0 and Z1 from the Z tables. But there is no listed values for TR = 0.914 or PR = 0.228.

Well, to determine the value from the table we use interpolation. This is based on the assumption that the function varies linearly between the values given in the table.

Say we have the following table:

(table1)

If we now wish to know the value of y' at x' we can use the following interpolation formula:

[math]\frac{y'-y_{1}}{x'-x_{1}}=\frac{y_{2}-y_{1}}{x_{2}-x_{2}}[/math]

In the case of our example we need to interpolate twice -- once in T and once in P. The relevant part of the Z0 table is:

(table2)

Interpolating over T using PR = 0.2000 gives for TR = 0.914,

[math]\frac{Z^{0}-0.9015}{0.914-0.90}=\frac{0.9115-0.9015}{0.93-0.90}[/math]

or Z0 = .9062

Interpolating over T using PR = 0.4000 gives for TR = 0.914,

[math]\frac{Z^{0}-0.7800}{0.914-0.90}=\frac{0.8059-0.7800}{0.93-0.90}[/math]

or Z0 = .7921

Modifying our table:

(table3)

Interpolating over P using TR = 0.914 gives for PR = 0.228,

[math]\frac{Z^{0}-0.9062}{0.228-0.2000}=\frac{0.7921-0.9062}{0.4000-0.2000}[/math]

or Z0 = 0.8902

Doing the same process gives for Z1 = -0.0467

Then from Pitzer's relation,

[math]Z=Z^{0}+\omega Z^{1}=0.8902+0.282(-0.0467)=0.8770[/math]

finally

[math]\hat{V}=\frac{ZRT}{P}=1813\frac{cm^{3}}{mol}[/math]

(c) Using the data we get f = 0.48 + 1.574(0.282) - 0.176(0.282)^2 = 0.9099

[math]a=\frac{0.42748\left(83.14\frac{cm^{3}bar}{molK}\right)^{2}\left(408K\right)^{2}}{65.9bar}\left[1+0.9099\left(1-0.914^{0.5}\right)\right]^{2}=8.073x10^{6}cm^{6}bar/mol^{2}[/math]

[math]b=\frac{0.08664\left(83.14\frac{cm^{3}bar}{molK}\right)\left(408K\right)}{15bar}=44.60cm^{3}/mol[/math]

Note the odd units on a.

• The Soave equation is:

[math]P=\frac{RT}{\hat{V}-b}-\frac{a}{\hat{V}(\hat{V}+b)}[/math]

There are two ways to solve this:

1. Use a computer or calculator to solve the equation.

2. Solve the equation iteratively.

Let us use the iterative method to solve our example[1]

The only unknown is [math]\hat{V}[/math]. Let us now rearrange the Soave equation by multiplying both sides by [math]\frac{\hat{V}-b}{P}[/math]:

[math]\hat{V}-b=\frac{RT}{P}-\frac{a\left(\hat{V}-b\right)}{P\hat{V}\left(\hat{V}+b\right)}[/math]

[math]\hat{V}=\frac{RT}{P}-\frac{a\left(\hat{V}-b\right)}{P\hat{V}\left(\hat{V}+b\right)}+b[/math]

Slightly rewrite it as:

[math]\hat{V}_{i+1}=\frac{RT}{P}-\frac{a\left(\hat{V}_{i}-b\right)}{P\hat{V}_{i}\left(\hat{V}_{i}+b\right)}+b[/math]

Where i is an iteration index.

The basic concept is that we guess a value for [math]\hat{V}_{i}[/math], put it into the right side of the equation, and then calculate [math]\hat{V}_{i+1}[/math]. If [math]\hat{V}_{i+1}[/math] and [math]\hat{V}_{i}[/math] are approximately equal then we are finished. If not, then we use [math]\hat{V}_{i+1}[/math] as the new guess. This is continued until we get convergence. The iteration index i is 1 for the first guess, etc.

As an initial guess it is usually best to use the ideal gas value. From above that gives [math]\hat{V}_{1}=2067[/math]. Now the iterative equation gives [math]\hat{V}_{2}=1863[/math]. We can then use the following table:

(table4)

Since [math]\hat{V}_{i+1}[/math] and [math]\hat{V}_{i}[/math] are now the same we will say the solution is [math]\hat{V}=1832cm^{3}/mol[/math]. Then [math]Z=\frac{P\hat{V}}{RT}=0.8861[/math].

Some observations on the above exercise. The difference between using the tables and using the equation is only about 1 percent, which is quite good. However, the difference between these and the ideal gas equation is around 15%, which can be significant. For someone designing equipment that can be very important, too big of a tank may cost a lot of extra money[2]



Notes

  1. Yes, we could just plug the numbers in a computer, but it is instructive for students to know how the calculation is made (a computer also uses the iterative method)
  2. Note that you may still want a bigger tank for safety considerations. However, that safety factor added is after the calculation.