Click or drag to resize

CalculatorCalcEquilibrium Method

Calculates Phase Equilibria for a given mixture at specified conditions.

Namespace: DWSIM.Thermodynamics.CalculatorInterface
Assembly: DWSIM.Thermodynamics (in DWSIM.Thermodynamics.dll) Version: 8.8.1.0
Syntax
[DispIdAttribute(39)]
public FlashCalculationResult CalcEquilibrium(
	CalculatorFlashCalculationType flashtype,
	int flashalg,
	double val1,
	double val2,
	PropertyPackage pp,
	string[] compounds,
	double[] molefractions,
	double[] initialKval,
	double initialestimate,
	Object ip1 = null,
	Object ip2 = null,
	Object ip3 = null,
	Object ip4 = null
)
Request Example View Source

Parameters

flashtype  CalculatorFlashCalculationType
The type of the flash algorithm to calculate
flashalg  Int32
[DEPRECATED] The flash algorithm to use (set to -1 to use the current instance)
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
compounds  String
Compound names
molefractions  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
ip1  Object  (Optional)
Interaction Parameters Set #1.
ip2  Object  (Optional)
Interaction Parameters Set #2.
ip3  Object  (Optional)
Interaction Parameters Set #3.
ip4  Object  (Optional)
Interaction Parameters Set #4.

Return Value

FlashCalculationResult
A FlashCalculationResult instance with the results of the calculations

Implements

Calculator_CalculatorCalcEquilibrium(CalculatorFlashCalculationType, Int32, Double, Double, PropertyPackage, String, Double, Double, Double, Object, Object, Object, Object)
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