VB example: Calculation of natural gas properties

An example of simple VB 5.0 program, which uses the aga8x85 class from felib.dll file to calculate the properties of a natural gas in accordance with an older AGA-8/1985 report is available to download. The program creates the felib.aga8x85 object, transfers to it the corresponding values for pressure in Pa, temperature in °C, and molar fractions from the corresponding text boxes, initiates the corresponding calculation and reads error status and the results for compressibility factor, density in kg/m^3, molar density in kg-mol/m3, density in kg/m3 and mole average into the corresponding text boxes. The felib.aga8x85 returns the error status and the VB program interprets it and returns the corresponding error status message describing any range violation that was encountered during the calculation. If there were no range violations the error status will be equal to zero and the error status message "No errors!" will be displayed.
Download a self-extracting and self-installing program "VB_felib_example.exe" (~1.7MB). The default folder for extraction is "C:\temp\VB_felib_example" and for installation "C:\Program Files\VB_Aga8_85". The installation folder will also contain the VB project in source code.

Note: Before installation remove any instance of previously installed felib.dll file. Remove it also from 'Recycle Bin'. Note also that the value for pressure is fixed to 1 MPa in the felib.aga8x85 object and can not be changed. Any felib.dll component can be enabled by the corresponding registration parameters that can be ordered via Kagi E-Commerce.

As can be seen from the VB example, it is fairly simple to incorporate the FELIB components into the new projects. It is also easy to generate more powerful applications using the combination of FELIB components. For example to write an application, which performs the calculation of natural gas flow-rate through differential devices just create iso5167 and iso12213x2 FELIB objects and add few instructions to set the input parameters and to retrieve the results.