Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

AGA 8 (DC92) code

Status
Not open for further replies.

Marcsart

Petroleum
Nov 7, 2009
5
I am not sure it is the correct forum for this question but I haven't found similar threads...
For a Microsoft NET (VBA) application I need the isothermal compressibility (of natural gas) according AGA 8 (DC92), suggestions and comments (about source code or libraries available) are appreciated,
Marc
 
Replies continue below

Recommended for you

thanks,
NIST is FORTRAN, Prode is C++, do you know a Visual Basic code ?
 
NIST and PRODE are libraries which you can link with your software, there are application examples in VB NET, C NET, VBA etc. really you should't have problems.
I am not a programmer (my VBA applications are limited to Excel) so I do not know if there are commercial products for calculating AGA 8 isothermal compressibility available in form of VBA code, may be others can help.
 
really I do not need the source code, a library is Ok,
thanks for help.
 
You can buy the 2 different ways to get the values you need from API. There is no library. The AGA 8 compressibility allows for rigorous EOS (detailed composition required) or some simplified calculations with limited input for calculating the compressibility (n2, CO2 and spgr.)

API MPMS Chapter 14.2 is the official reference

here a sight to buy the equations.


 
I have the VBA code for AGA 8 gas compressibility, does the standard include also the formulation for isothermal compressibility ?
Thanks.
 
my old copy of the standard doesn't include the formulation for isothermal compressibility, may be the most recent versions include that (you can check the link suggested by dcasto).
Perhaps when working at low pressure you can estimate the isothermal compressibility coefficient * pressure product as complement to 1 of compressibility factor, note that for a ideal gas the isothermal compressibility becomes

(1 / P) - dZ / dP


but with this method you may get large errors...
To give you a idea about this method I calculated with Prode Properties (see the above post for the link) the isothermal compressibility coefficient and gas compressibility according AGA 8 (DC92) for the mixture

CH4 0.8 C2H6 0.13 C5H12 0.04 CO2 0.03

at different operating pressures

T = 300 K
P = 100000 Pa (1 Bar.a)
IC 1.00291E-05
IC*P 1.00291
Zv 0.997101026

T = 300 K
P = 1000000 Pa (10 Bar.a)
IC 1.03017E-06
IC*P 1.0317
Zv 0.970843174

T = 300 K
P = 10000000 Pa (100 Bar.a)
IC 1.24652E-07
IC*P 1.24652
Zv 0.730700172

note that I set my copy of Prode Properties to return the isothermal compressibility coefficient

-(1 / V) * dV / dP

with units of 1/Pa (different settings are possible)
 
I examined our copy of the standard and it seems that AGA 8 doesn\'t include the formulations for isothermal compressibility, I will consider the libraries mentioned by paolopemi, thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor