FlashAlgorithmCalculateEquilibrium Method |
Calculates Phase Equilibria for a given mixture at specified conditions.
Namespace: DWSIM.Thermodynamics.PropertyPackages.Auxiliary.FlashAlgorithmsAssembly: DWSIM.Thermodynamics (in DWSIM.Thermodynamics.dll) Version: 8.4.5.0
Syntaxpublic FlashCalculationResult CalculateEquilibrium(
FlashSpec spec1,
FlashSpec spec2,
double val1,
double val2,
PropertyPackage pp,
double[] mixmolefrac,
double[] initialKval,
double initialestimate
)
Public Function CalculateEquilibrium (
spec1 As FlashSpec,
spec2 As FlashSpec,
val1 As Double,
val2 As Double,
pp As PropertyPackage,
mixmolefrac As Double(),
initialKval As Double(),
initialestimate As Double
) As FlashCalculationResult
Request Example
View SourceParameters
- spec1 FlashSpec
- Flash state specification 1
- spec2 FlashSpec
- Flash state specification 2
- val1 Double
- Value of the first flash state specification (P in Pa, T in K, H in kJ/kg, S in kJ/[kg.K], VAP/SF in mole fraction from 0 to 1)
- val2 Double
- Value of the second flash state specification (P in Pa, T in K, H in kJ/kg, S in kJ/[kg.K], VAP/SF in mole fraction from 0 to 1)
- pp PropertyPackage
- Property Package instance
- mixmolefrac Double
- Vector of mixture mole fractions
- initialKval Double
- Vector containing initial estimates for the K-values (set to 'Nothing' (VB) or 'null' (C#) if none).
- initialestimate Double
- Initial estimate for Temperature (K) or Pressure (Pa), whichever will be calculated
Return Value
FlashCalculationResultA FlashCalculationResult instance with the results of the calculations
RemarksThis function must be used instead of the older type-specific flash functions.
Check if the 'ResultException' property of the result object is nothing/null before proceeding.
See Also