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 the 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 Felib_dll_VB_demo.zip" (~2.0MB) and unzip the file by expanding the folders. The default folder for extraction is "\Felib_dll_VB_demo". The extraction folder will contain VB demo programs in source code for each Felib class. After extraction run SETUP.EXE program from SETUP subfolder to install felib.dll and VB_Aga8_85.exe.

Note: Before installation remove any instance of previously installed Felib.dll file. Remove it also from 'Recycle Bin'.

You can run the 'VB_Aga8_85' demonstration program and perform the corresponding calculations.

Note that the pressure parameter in the Felib.aga8x85 object is fixed to 1 MPa and can not be changed. All other input parameters can be changed.

You can also open in your Visual Studio any of the VB examples in source code from the extraction folder. Note that all other felib.dll classes except Felib.aga8x85 are locked and you are not allowed to perform any calculations but you will be able to see all the properties and functions and to set and read the input parameters for each class. As can be seen from VB examples, 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 it is necessary to create for example the Felib.iso5167 and the Felib.iso12213x2 objects and add just a few instructions to set the input parameters and to retrieve the results.

Each Felib.dll component can be enabled by the corresponding registration parameters that can be ordered via Kagi E-Commerce.