PROPERTIES | |||
---|---|---|---|
Property | Set property value | Get property value | |
I | X(I): mole fraction for | ||
0 | Methane | void SetComponentMolarFraction(short I, double X(I) | double GetComponentMolarFraction(short I) |
1 | Nitrogen | ||
2 | Carbon dioxide | ||
3 | Ethane | ||
4 | Propane | ||
5 | i-Butane | ||
6 | n-Butane | ||
7 | i-Pentane | ||
8 | n-Pentane | ||
9 | n-Hexane | ||
10 | n-Heptane | ||
11 | n-Octane | ||
12 | n-Nonane | ||
13 | n-Decane | ||
14 | Hydrogen | ||
15 | Oxygen | ||
16 | Carbon monoxide | ||
17 | Water | ||
18 | Hydrogen sylfide | ||
19 | Helium | ||
20 | Argon | ||
Pressure [MPa] | void SetPressureMPa(double newP) | double GetPressureMPa() | |
Temperature [K] | void SetTemperatureK(double newT) | double GetTemperatureK() | |
Protection key | void SetKeyCode(long newValue) | n/a | |
Molar mass [kg/kmol] | n/a | double GetMolarMass() | |
Molar density [kg⋅mole/m3] | n/a | double GetMolarDensity() | |
Density [kg/m3] | void SetDensity(double newD) | double GetDensity() | |
Compressibility factor | n/a | double GetCompressibilityFactor() | |
Relative density | n/a | double GetRelativeDensity() | |
Reduced density | void SetReducedDensity(double newRD) | double GetReducedDensity() | |
Gross heating value [MJ/m^3] | void SetGrossHeatingValue(double newHV) | double GetGrossHeatingValue() | |
Molar Helmholtz energy [j/mol] | n/a | double GetMolarHelmholtzEnergy() | |
Molar Helmholtz energy of ideal-gas [j/mol] | n/a | double GetMolarIdealGasHelmholtzEnergy() | |
Molar residual Helmholtz energy [j/mol] | n/a | double GetMolarIdealGasHelmholtzEnergy() | |
Molar entropy [J/(mol⋅K)] | n/a | double GetMolarEntropy() | |
Molar energy [J/mol] | n/a | double GetMolarEnergy() | |
Molar enthalpy [J/mol] | n/a | double GetMolarEnthalpy () | |
Molar Gibbs energy [J/mol] | n/a | double GetMolarGibsEnergy() | |
Molar isochoric heat capacity [J/(mol⋅K)] | n/a | double GetMolarIsochoricHC() | |
Molar isobaric heat capacity [J/(mol⋅K)] | n/a | double GetMolarIsobaricHC() | |
Speed of sound [m/s] | n/a | double GetSpeedOfSound() | |
Joule-Thomson coefficient [K/MPa] | n/a | double GetJouleThomsonCoefficient() | |
Isentropic exponent | n/a | double GetIsentropicExponent () | |
Specific entropy [kJ/(kg⋅K)] | n/a | double GetSpecificEntropy() | |
Specific energy [kJ/kg] | n/a | double GetSpecificEnergy() | |
Specific enthalpy [kJ/kg] | n/a | double GetSpecificEnthalpy () | |
Specific isochoric heat capacity [kJ/(kg⋅K)] | n/a | double GetSpecificIsochoricHC­() | |
Specific isobaric heat capacity [kJ/(kg⋅K)] | n/a | double GetSpecificIsobaricHC­() | |
**Error status | n/a | long GetErrorFlag() | |
***Error report | n/a | BSTR GetErrorReport() |
FUNCTION | |
---|---|
long Calculate() | Calculates the properties based on DETAIL EoS and returns long error status |
*Ranges of application | ||||
---|---|---|---|---|
Parameter | Expanded range | Range A | Range B | Range C |
Temperature in K | 143.15 to 453.15 | 269.15 to 453.15 | 269.15 to 453.15 | 265.15 to 453.15 |
Pressure (absolute) in MPa | 10-9 to 280 | 10-9 to 10.3 | 10-9 to 2.1 | 10-9 to 21 |
Gross heating value in MJ/m3 | 0 to 66 | 23.5 to 44.7 | 25.3 to 56 | 35.8 to 40.6 |
Relative density | 0.07 to 1.52 | 0.554 to 0.91 | 0.47 to 0.91 | 0.554 to 0.64 |
Mole fractions ranges | ||||
Methane | 0 to 1.0 | 0.6 to 1.0 | 0.6 to 1.0 | 0.6 to 1.0 | Nitrogen | 0 to 1.0 | 0 to 0.5 | 0 to 0.5 | 0 to 0.03 | Carbon dioxide | 0 to 1.0 | 0 to 0.3 | 0 to 0.8 | 0 to 0.03 | Ethane | 0 to 1.0 | 0 to 0.1 | 0 to 0.25 | 0 to 0.04 | Propane | 0 to 0.12 | 0 to 0.04 | 0 to 0.06 | 0 to 0.02 | i-Butane | - | 0 to 0.004 | 0 to 0.015 | 0 to 0.001 | n-Butane | - | 0 to 0.006 | 0 to 0.06 | 0 to 0.004 | Total butanes | 0 to 0.08 | - | - | - | i-Pentane | - | 0 to 0.003 | 0 to 0.02 | 0 to 0.001 | n-Pentane | - | 0 to 0.003 | 0 to 0.02 | 0 to 0.001 | Total pentanes | 0 to 0.05 | 0 to 0.003 | 0 to 0.02 | - | n-Hexane | - | 0 to 0.0012 | 0 to 0.002 | 0 to 0.0003 | n-Heptane | - | 0 to 0.0004 | 0 to 0.002 | 0 to 0.0001 | n-Octane | - | 0 to 0.0003 | 0 to 0.002 | 0 to 0.00003 | n-Nonane | - | 0 to 0.0003 | 0 to 0.002 | 0 to 0.00003 | n-Decane | - | 0 to 0.0003 | 0 to 0.002 | 0 to 0.00003 | Total hexanes plus | 0 to 0.05 | 0 to 0.0015 | - | - | Total heptanes plus | - | 0 to 0.0004 | - | - | Hydrogen | 0 to 1.0 | 0 to 0.05 | 0 to 1.0 | 0 to 0.01 | Oxygen | 0 to 0.21 | 0 to 0.002 | 0 to 0.01 | 0 to 0.002 | Carbon monoxide | 0 to 0.12 | 0 to 0.01 | 0 to 0.1 | 0 to 0.01 | Water | 0 to 0.02 | 0 to 0.0005 | 0 to 0.014 | 0 to 0.00005 | Hydrogen sulfide | 0 to 1.0 | 0 to 0.001 | 0 to 0.04 | 0 to 0.001 | Helium | 0 to 0.06 | 0 to 0.004 | 0 to 0.05 | 0 to 0.004 |
Argon | 0 to 0.04 | 0 to 0.002 | 0 to 0.03 | 0 to 0.002 |
In each calculation all input parameters and intermediate results are first checked to determine
whether their values are within the limits defined by the expanded range of application or not.
|
***ERROR REPORT |
---|
The property "BSTR GetErrorReport()" is used to get an error report in a textual form.Example 1The Error report is illustrated by a calculation example using gas mixture denoted by "High CO2-N2" in the Table B.1 of APPENDIX B of AGA Report No. 8, Part 1 and by applying the corresponding pressure (6 MPa) and temperature (333.15 K). Upon completion of the method there were no errors and the property "BSTR GetErrorReport()" returns the following error report string:No errors! The following is a user interface to a simple VB program displaying the results and error status obtained upon successful completion of the calculation. Example 2Example 2 is the same as the Example 1, except the given temperature T=140 K is out of expanded range of applications. Upon completion of the calculation method the corresponding error and warning are set and the property "BSTR GetErrorReport()" returns the following error report string:Error13: Temperature <143.15 K or >453.15 K Warning: None of ranges A, B or C (AGA8-Table 1) has been satisfied The following is a user interface to a VB program displaying error status after failing to complete the calculation. |