© 2024 Jasper van Baten, AmsterCHEM

getEquilibrium

getEquilibrium returns the result of a thermodynamic equilibrium calculation. Feeds are already in equilibrium when the unit operation is calculated, see getFeedEquilibrium. If you are just interested in an overall property - such as enthalpy - at phase equilibrium, use getEquilibriumProperty.

Syntax

[phases,phasefractions,compositions,T,P]=getEquilibrium(moleFraction,propName1,propVal1,propName2,propVal2)

Arguments:

moleFraction
Double; the overall composition for the equilibrium calculation. Must be a vector with one value for each compound.

propName1
String; name of the first property for the equilibrium specification of the product. The following properties can be specified:

PropertyDescriptionUnit of measure
temperatureTemperatureK
pressurePressurePa
vaporFractionMole fraction of the vapor phase-
enthalpyDefault enthalpyJ / mol
enthalpyFEnthalpy - including formation termsJ / mol
enthalpyNFEnthalpy - not including formation termsJ / mol
entropyDefault entropyJ / mol / K
entropyFEntropy - including formation termsJ / mol / K
entropyNFEntropy - not including formation termsJ / mol / K
internalEnergyEnergyJ / mol
volumeSpecific volumem3 / mol

See getFeedProp for more information on the different enthalpies. Not each of the above properties may be supported by the underlying thermo system. Even if both propName1 and propName2 specify supported properties that are supported, the combination of the two may not be a supported specification for an equilibrium calculation.

propVal1
Double; the value of the property specified by propName1.

propName1
String; name of the second property for the flash specification of the product. See above for supported properties.

propVal1
Double; the value of the property specified by propName2.

Returns:

phases
String; name of each phase present at equilibrium

phasefractions
Double; phase fraction for each phase present at equilibrium. Column vector with one value for each phase.

compositions
Double; composition (mole fractions) for each phase present at equilibrium. Matrix with 1 column for each compound, and one row for each phase present at equilibrium.

T
Double; equilibrium temperature (K)

P
Double; equilibrium pressure (Pa)

Example

-->X=[0.1 0.2 0.5 0.2]
 X  =
 
    0.1    0.2    0.5    0.2  

-->[phases,phaseFractions,composition]=getEquilibrium(X,"temperature",300,"pressure",101325)
 composition  =
 
    0.1    0.2    0.5    0.2  

 phaseFractions  =
 
    1.  

 phases  =
 
 Vapor   

-->[phases,phaseFractions,composition]=getEquilibrium(X,"temperature",150,"pressure",101325)
 composition  =
 
    0.0475363    0.4342404    0.0865873    0.4316360  
    0.1447324    0.0002783    0.8524903    0.0024989  

 phaseFractions  =
 
    0.4602284  
    0.5397716  

 phases  =
 
!Vapor   !
!        !
!Liquid  !

-->[phases,phaseFractions,composition,T,P]=getEquilibrium(X,"vaporFraction",1.0,"pressure",101325)
 P  =
 
    101325.  

 T  =
 
    173.36291  

 composition  =
 
    0.1          0.2          0.5          0.2        
    0.0696637    0.0001661    0.9292986    0.0008716  

 phaseFractions  =
 
    1.  
    0.  

 phases  =
 
!Vapor   !
!        !
!Liquid  !
INDEX
Acknowledgements
Additional files
Boolean parameters
Calculation
compNames
Dimensionality
Disclaimer
DOs and DONTs
Error trapping
Examples
Feeds
Files
Formulas
Function reference
getAggregationState
getAggregationStateName
getCompoundConstant
getEquilibrium
getEquilibriumProperty
getFeedEquilibrium
getFeedProp
getNumberOfFeeds
getNumberOfProducts
getParameter
getPDependentProperty
getPropertyUnitOfMeasure
getSinglePhaseProperty
getTDependentProperty
getTwoPhaseProperty
getUnitOperationName
Global variables
Integer parameters
License
Loading models
logMessage
Model files
nComp
nPhase
Parameters
phaseAggregationStates
phaseNames
Products
Real parameters
Reports
Requirements
Saving models
SCI files
setParameter
setProduct
setReport
String parameters
SUM files
Welcome
CONTENT
 Welcome
 Feed and product ports
 Parameters
 Reports
 SciLab Calculation Script
 Additional files
 Global variables
 Function reference
 getAggregationState
 getAggregationStateName
 getCompoundConstant
 getEquilibrium
 getEquilibriumProperty
 getFeedEquilibrium
 getFeedProp
 getNumberOfFeeds
 getNumberOfProducts
 getParameter
 getPDependentProperty
 getPropertyUnitOfMeasure
 getSinglePhaseProperty
 getTDependentProperty
 getTwoPhaseProperty
 getUnitOperationName
 logMessage
 setParameter
 setProduct
 setReport
 Saving and loading models
 License and disclaimer