Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Excel Calc for Linepack Calculation 2

Status
Not open for further replies.

linepacker

Industrial
Nov 3, 2011
10
Hello -

I certainly hope I am in the right place for what I would hope is a simple request...

I have to keep hundreds of records in Excel each day for various linepack segments. I have, in separate cells, the necessary pressures, temperatures, gravities, and pipe diameters and lengths. What I need is a formula in Excel that I can modify to pull the necessary data from these cells. Atmospheric pressures, efficiency, etc. are all fixed data for now. Also, compressibility needs to be factored as well, which may be in a separate formula - ?

I need it in Excel because Excel is going to automate the process of pulling the data needed for the calculations, copying and pasting, self-saving, etc.

I apologize in advance for my ignorance but this seemed like a great place to ask this question. I appreciate any help in advance.
 
Replies continue below

Recommended for you

Sorry, yes it is natural gas. And I thought the AGA-8 was no longer recgnized? We are using the NX-19 for whatever reason... I just need to be able to calculate inventory and include N2 and CO2...
 
Why do you think AGA 8 isn't recognized (and not recognized by whom). I have not heard that, but my business is not measurement, so I could be off in the weeds again. AGA 8 is OK for my purposes. I don't know if the latest version of Stoner gives other options.

AGA 9 for ultrasonic meters (I think) use AGA 8 method.

AGA 10 calculates speed of sound for internal comparison in ultrasonic flowmeters. I also don't know if anyone is reversing the equation and calculating Z from that speed? I'm not.

NX-19, although limited, has an important technological legacy. One of the significant problems with the NX-19
equation was that the formulation contained discontinuities in the derivatives of the compressibility factor at the
boundaries of the auxiliary fitting functions. This limited its engineering utility to supercompressibility factor
calculations. The equation could not be used to meet other gas engineering needs including critical flow nozzles
calculations, sound speed calculations, or compressor calculations. In addition, the NX-19 method was biased
for rich gases and high dilutes content gases. The concern over bias errors caused the industry to initiate the
development of a new equation of state method to replace the NX-19 work. The new work became A.G.A. Report
No.8.

The A.G.A. Report No. 8 expression has embedded in it calculations for mixtures. The details of the mixture
calculations are not shown here. The mixture functions are mathematical relationships that permit predicting
mixture fluid properties by numerically nudging pure fluid correlation parameters. They are further refined through
the use of fluid specific regression interaction parameters. These quantities are known as binary interaction
parameters. Binary interaction parameters are common in virtually all equations of state. They require the
regression of experimental binary mixture data to improve the description of fluids containing the binary
components. A key element in the A.G.A. Report No. 8 equation of state is its ability to accurately compute the
properties for real natural gas mixtures. It accomplishes this through the use of hybrid mixing rules. The mixing
rules provide a practical means to describe fluid mixture behavior. It should be noted that the equation was not
developed for the high density fluid critical region. In most gas measurement applications the operating conditions
are far removed from the critical region.

AGA 8 "normal range" will allow up to 30% mol wt of CO2 and 50 for N2. Even more in the "extended range". Do you have more than 30% CO2 or 50% N2? "Expanded ranges" go to 100%.

Now we have to find a VBA for AGA-8.

Only put off until tomorrow what you are willing to die having left undone. - Pablo Picasso
 
I speak from a place of ignorance of AGA-8 not being accepted anymore - perhaps that is just my company. I do know that we would prefer to use the Gross Characterization Method II if possible. However, as it stands right now, it looks like I will need to use the VBA in order to incorporate CO2 and N2. And no, the levels of those two components are always much lower than the values you were asking about.

And yeah, those two links are way beyond the scope of my project!
 
When I was researching to see what I could find about AGA8 being relegated, I didn't see where anybody is using anything different, including a bunch of meter manufacturers. It would seem that no matter what type of meter you have, including ultrasonic and coriolis meters, they are still using AGA-8 when it comes to calculating Z.

I'm not sure, but if you used AGA-8-Lite with component values less than the lower limits, I wouldn't be surprized if it worked. Anyway, despite my comment about using AGA-8 (I thought you might have a custody transfer issue somewhere) there would be nothing wrong with you continuing to use NX-19, as long as it gives you answers within your scope of required accuracy.

Only put off until tomorrow what you are willing to die having left undone. - Pablo Picasso
 
for calculating fluid properties in Excel as gas densities according AGA 1992, BWRS, SRK, PR, GERG etc. you may use Properties, see

http;//
the advantage is that for many properties you can put macros directly in Excel cells, for example to get a density

=StrGD(1)

you may also calculate a table of values and then interpolate, if that is required in your procedure.

I have found that in most cases with rigorous properties and some little work in Excel I get results directly comparable with those of very expensive tools and that's a great resource for me.
 
linepacker, et. al.

in review of the Z function listing, i observed a possible anomaly. i write this based on the attached document and that i have done many, literally hundreds, of these calcs using my trustworthy excel workbook and compared the results to company/industry results. bear in mind that this document may be outdated, but i know it has been used by many people within the industry and by fellow co-employees.

the: nx19_Ppsia = Ppsig + Patm

according to the attached document, the pressure should be in gage units and not absolute units. i know this does not make sense and it may be a typo (i've not seen any errata). keep in mind that the results using gage units have been compared with executable programs and the results matched identically.

my book was lent to someone else and i just got it back; hence the delay in responding. believe me, i was concerned in that perhaps all my previous calcs were in error. my only confirmation is that the results were compared with executable programs and the results matched.

take a moment and review the attached documentation. perhaps you can investigate if there is an updated document or otherwise. sorry, i cannot attach the entire document.

hope this helps.
-pmover
 
 http://files.engineering.com/getfile.aspx?folder=f07dcb8e-a435-4e29-a286-2c20a189846f&file=NX-19.pdf
It would make some sense, since the CNG method is also based on gauge pressure, there is some precedent for it. Compressibility doesn't really become significant until you reach a couple hundred psi, including atm won't make much difference to the results.

Only put off until tomorrow what you are willing to die having left undone. - Pablo Picasso
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor