CalculatorCalcEquilibrium Method |
Calculates Phase Equilibria for a given mixture at specified conditions.
Namespace: DWSIM.Thermodynamics.CalculatorInterfaceAssembly: 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
)
<DispIdAttribute(39)>
Public Function CalcEquilibrium (
flashtype As CalculatorFlashCalculationType,
flashalg As Integer,
val1 As Double,
val2 As Double,
pp As PropertyPackage,
compounds As String(),
molefractions As Double(),
initialKval As Double(),
initialestimate As Double,
Optional ip1 As Object = Nothing,
Optional ip2 As Object = Nothing,
Optional ip3 As Object = Nothing,
Optional ip4 As Object = Nothing
) As FlashCalculationResult
Request Example
View SourceParameters
- 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
FlashCalculationResultA 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