Professional Documents
Culture Documents
01Dec
The algorithm for the calculation involves two iterative routines and works as
follows:
Paramdl:
Arrange calculation parameters to match entered species. Calculation allows for 21 standard
components. Paramdl packs the ones that are used into sets of working arrays.
NOTE: The order of the components appears to be important, as it affects the results returned. Each
gas species has an integer ID. These IDs must be processed in ascending numerical order for the
result to be correct.
Chardl:
Characterises the gas by calculating parameters b1..b18, and various other parameters, in a pair of
for loops.
Normalise component mole fractions (ensure the total = 1.0000)
for i=1 to (number of entered components)
Calculate gas mix mole weight = running total of mole fraction[i]*mole weight[i]
Calculate running total of mole fraction[i]*rki[i]2.5
Calculate running total of mole fraction[i]*ei[i]2.5
Calculate running total of mole fraction[i]*wi[i]
Calculate running total of mole fraction[i]*qi[i]
Calculate running total of hi[i]*(mole fraction[i])
2
The AGA8 Detail algorithm is data intensive and defines approximately 2000
values held in 13 arrays.
AGA8 Detail: Enter a flowing temperature and pressure, and a gas analysis, then
press Calculate. The calculation may take a few seconds to complete.
AGA 3 1990 Algorithm
The algorithm for the calculation is as follows. There is one iterative loop to solve
for Reynolds number and coefficient of discharge. The standard defines many
constants.
Constants of the form A and S are simply fixed numbers and do not change based
on the system of units used.
Constants of the form Nx are unit conversion constants and are determined based
on the system of units in use for the calculation.
For further details on the calculation, refer to part 4 of the specification AGA3
1990 / GPA 8185-92.