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.
[phases,phasefractions,compositions,T,P]=getEquilibrium(moleFraction,propName1,propVal1,propName2,propVal2)
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:
Property | Description | Unit of measure |
temperature | Temperature | K |
pressure | Pressure | Pa |
vaporFraction | Mole fraction of the vapor phase | - |
enthalpy | Default enthalpy | J / mol |
enthalpyF | Enthalpy - including formation terms | J / mol |
enthalpyNF | Enthalpy - not including formation terms | J / mol |
entropy | Default entropy | J / mol / K |
entropyF | Entropy - including formation terms | J / mol / K |
entropyNF | Entropy - not including formation terms | J / mol / K |
internalEnergy | Energy | J / mol |
volume | Specific volume | m3 / 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.
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)
» X=[0.1 0.2 0.5 0.2]
X =
0.1000 0.2000 0.5000 0.2000
» [phases,phaseFractions,composition]=getEquilibrium(X,'temperature',300,'pressure',101325)
phases =
'Vapor'
phaseFractions =
1
composition =
0.1000 0.2000 0.5000 0.2000
» [phases,phaseFractions,composition]=getEquilibrium(X,'temperature',150,'pressure',101325)
phases =
'Vapor'
'Liquid'
phaseFractions =
0.4602
0.5398
composition =
0.0475 0.4342 0.0866 0.4316
0.1447 0.0003 0.8525 0.0025
» numPhases=size(phases,1)
numPhases =
2
» [phases,phaseFractions,composition,T,P]=getEquilibrium(X,'vaporFraction',1.0,'pressure',101325)
phases =
'Vapor'
'Liquid'
phaseFractions =
1
0
composition =
0.1000 0.2000 0.5000 0.2000
0.0697 0.0002 0.9293 0.0009
T =
173.3629
P =
101325