Click or drag to resize

FlashAlgorithmCalculateEquilibrium Method

Calculates Phase Equilibria for a given mixture at specified conditions.

Namespace: DWSIM.Thermodynamics.PropertyPackages.Auxiliary.FlashAlgorithms
Assembly: DWSIM.Thermodynamics (in DWSIM.Thermodynamics.dll) Version: 8.4.5.0
Syntax
public FlashCalculationResult CalculateEquilibrium(
	FlashSpec spec1,
	FlashSpec spec2,
	double val1,
	double val2,
	PropertyPackage pp,
	double[] mixmolefrac,
	double[] initialKval,
	double initialestimate
)
Request Example View Source

Parameters

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

FlashCalculationResult
A FlashCalculationResult instance with the results of the calculations
Remarks
This 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