×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

NX-19 Calculations for Compressibility

NX-19 Calculations for Compressibility

NX-19 Calculations for Compressibility

(OP)
thread1036-309842: Need Excel Calc for Linepack Calculation

Thanks to linepacker for the VBA for calculating the supercompressibility factor. There are some minor errors in the VBA code & points for those wishing to use it.

1) You need to replace
nx19_Padj = (156.47 * nx19_Ppsia) / (160.8 - (7.22 * SG) + moleCO2 - (0.392 * moleN2))
with
nx19_Padj = (156.47 * Ppsig) / (160.8 - (7.22 * SG) + moleCO2 - (0.392 * moleN2))

This is because nx19_Padj is supposed to be in psig. Also, not doing it would result in double counting of the atmospheric pressure (14.7 psia) when computing the variable nx19_Pii

2) You need to replace
nx19_fpv = ((1 + (0.00132 / nx19_Tao ^ 3.25)) ^ -2) / (((1 / ((nx19_B / nx19_Dp) - nx19_Dp + (nx19_N / (3 * nx19_Pii))))) ^ 0.5)
with
nx19_fpv = ((1 + (0.00132 / nx19_Tao ^ 3.25)) ^ -2) / (((1 / ((nx19_B / nx19_Dp) - nx19_Dp + (nx19_N / (3 * nx19_Pii))))) ^ 0.5)

3) The VBA code provided is only valid for a certain range of temperature & pressure when the E equals E2 (and not when E equals E1, E3, E4, E5a, E5b, E5c, or E6). You will need to refer to the NX-19 document to incorporate these into the code.

Thanks again to Linepacker (errors notiwthstanding)

Enjoy!

RE: NX-19 Calculations for Compressibility

(OP)
CORRECTION in above:

2) You need to replace
nx19_fpv = ((1 + (0.00132 / nx19_Tao ^ 3.25)) ^ -2) / (((1 / ((nx19_B / nx19_Dp) - nx19_Dp + (nx19_N / (3 * nx19_Pii))))) ^ 0.5)
with
nx19_fpv = ((1 + (0.00132 / nx19_Tao ^ 3.25)) ^ -1) / (((1 / ((nx19_B / nx19_Dp) - nx19_Dp + (nx19_N / (3 * nx19_Pii))))) ^ 0.5)

RE: NX-19 Calculations for Compressibility

here is a simpliar method for compressibility of natural gases with under 4% inerts

Tc (critical temperature) =169.01+314.001*Spgr where spgr is specific gravity
Pc (critical Pressure) = 708.75-57.5*Spgr

Pr = PSIA at conditions / Pc
Tr = T (rankin) at conditions / Tc
z = 1 + (0.0703 *Pr / Tr) * (1 - 6 / Tr ^ 2)

At 60F and 1000 psia on a .6 spgr gas, z = .8682

RE: NX-19 Calculations for Compressibility

If NX-19 is the subject, simpler methods are of no interest.

If it ain't broke, don't fix it. If it's not safe ... make it that way.

RE: NX-19 Calculations for Compressibility

No offense meant.

If it ain't broke, don't fix it. If it's not safe ... make it that way.

RE: NX-19 Calculations for Compressibility

the question was calculating zfactor to find LINE PACK. He found NX-19 and was having problems. Here is a simple way to get the same answer. Now, if the OP was trying to replicate API measurement, yeah the choice of z factor subroutines is limited.

RE: NX-19 Calculations for Compressibility

No, "linepacker" was the user name of the guy that asked the original question about NX-19 a long time ago. This post is a correction to the code that was posted in the referenced thread.

If it ain't broke, don't fix it. If it's not safe ... make it that way.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources