PROPERTIES | |||
---|---|---|---|
Description | Set property value | Get property value | |
Pressure [bar] | void SetPressureBar(double newValue) | double GetPressureBar() | |
Temperature [°C] | void SetTemperatureDegC(double newValue) | double GetTemperatureDegC() | |
Mole fraction of carbon dioxide | void SetMoleFractionCO2(double newValue) | double GetMoleFractionCO2() | |
Mole fraction of hydrogen | void SetMoleFractionH2(double newValue) | double GetMoleFractionH2() | |
Relative density at T2=273.15[K], p2=1.01325[bar] | void SetRelativeDensity(double newValue) | double GetRelativeDensity() | |
Superior calorific value at T1=298.15[K], T2=273.15[K], p1=p2=1.01325[bar] | void SetSuperiorCalorificValue(double newValue) | double GetSuperiorCalorificValue() | |
Protection key | void SetKeyCode(long nNewValue) | n/a | |
Error status | n/a | long GetErrorStatus() | |
Error report | n/a | BSTR GetErrorReport() | |
Compression factor | n/a | double GetCompression() | |
Density [kg/m3] | n/a | double GetDensity() | |
Molar density [kmol/m3] | n/a | double GetMolarDensity() | |
Molar mass [kg/kmol] | n/a | double GetMolarMass() |
FUNCTION | |
---|---|
Function prototype | long int CalculateIso12213x3(); calculates compression, density, molar density and molar mass and returns long int representing error status |
ERROR STATUS | |
long GetErrorStatus() | Description of Error flags. |
Bit 0 =1 (000001H) | Pressure <0.000001 or >120.0 bar. |
Bit 1 =1 (000002H) | Temperature <-23.0 or >65.0 °C. |
Bit 2 =1 (000004H) | d>(0.55+0.97⋅mfrCO2-0.45⋅mfrH2) d - density mfrCO2 - mole fraction of carbon dioxide mfrH2 - mole fraction of hydrogen |
Bit 3 =1 (000008H) | No convergence in iteration with molar heating value |
Bit 4 =1 (000010H) | No convergence in iteration with the second virial coefficient |
Bit 5 =1 (000020H) | Calculated mole fraction of N2 (mfrN2) out of range, i.e. -0.01>mfrN2>0.5 |
Bit 6 =1 (000040H) | Sum of mole fractions of N2 (mfrN2) and CO2 (mfrCO2) out of range: (mfrN2+mfrCO2)<0.5 |
Bit 7 =1 (000080H) | The internal consistency of the input data for the third iteration loop does not satisfy the condition relating relative density and mole fractions: d>(0.55+0.4⋅mfrN2+0.97⋅mfrCO2-0.45⋅mfrH2) mfrN2 - mole fraction for nitrogen mfrCO2 - mole fraction for carbon dioxide mfrH2 - mole fraction of hydrogen |
Bit 8 =1 (000100H) | No solution - square root of negative value (B11⋅B33<0) |
Bit 9 =1 (000200H) | No solution - exponentiation of negative value |
Bit 10 =1 (000400H) | No convergence |
Bit 11 =1 (000800H) | Mole fraction of Carbon dioxide <0 or >0.3 |
Bit 12 =1 (001000H) | Mole fraction of Nitrogen <0 or >0.1 |
Bit 13=1 (002000H) | Superior calorific value <20 or >48 MJ/m3 |
Bit 14 =1 (004000H) | Relative density <0.55 or >0.9. |
Bit 15,...,Bit 23 | Unused. |
Bit 24 =1 (1000000H) | Incorrect key code. |
Bit 25,... | Bit 25 and all higher bits are unused. |