mission

CAPE-OPEN
COCO
Excel Thermo Import
Excel Unit Operation
Matlab Unit Operation
Matlab Thermo Import
» 
Help
OO Calc Thermo Import
REFPROP PPM
SciLab Unit Operation
SciLab Thermo Import
Python Thermo Import
FlowExchange
ThermoSystemAdapter

ScanIt

downloads

services

links

about us

contact us

capeOpenEquilibrium

Calculate a thermodynamic phase equilibrium and return full info on phases, phase fractions, compositions, pressure and temperature.

Syntax

[phases,phaseFractions,phaseCompositions,T,P]=capeOpenEquilibrium(handle,X,prop1,val1,prop2,val2,type)

Arguments

handle: package handle, as obtained from capeOpenGetPackage

X: overall composition. Must be a row vector with the number of elements equal to the number of compounds. X is in mole fraction or mass fraction, depending on the current basis.

prop1: string, first constraint property. A list of valid flash constraint properties can be obtained using capeOpenFlashPropList.

val1: value for the first flash constraint property. The unit of measure of the value may depend on the basis.

prop2: string, second constraint property.

val2: value for the second flash constraint property. The unit of measure of the value may depend on the basis.

type: string value indicating the desired solution type. Optional. Valid values are "Unspecified" (default), and if vapor fraction is part of the flash constraints, additional valid values are "Normal" or "Retrograde".

Returns

phases: column vector with names of the phases present at equilibrium. The state of aggregation for each phase can be obtained with capeOpenAggregationState.

phaseFractions: column vector with the phase fractions of the phases present at equilibrium. The phase fractions are mole or mass fractions, depending on the current basis.

phaseCompositions: Equilibrium composition of the present phases. Number of rows matches the number of present phases, and number of columns matches the compound count. Composition is in mole or mass fractions, depending on the current basis.

T: the temperature at the calculated equilibrium

P: the pressure at the calculated equilibrium

Example


» handle=capeOpenGetPackage('TEA (CAPE-OPEN 1.1)','C1_C2');
» [phases,phaseFracs,phaseComp]=capeOpenEquilibrium(handle,[0.5 0.5],'pressure',1e5,'temperature',300)
Warning: CAPE-OPEN: TEA warning: temperature above TC for determining Yen and
Woods liquid density; using TR=1.0 

phases = 

    'Vapor'


phaseFracs =

     1


phaseComp =

    0.5000
    0.5000

» [phases,phaseFracs,phaseComp,T]=capeOpenEquilibrium(handle,[0.5 0.5],'vaporFraction',0.5,'pressure',1e5)

phases = 

    'Vapor'
    'Liquid'


phaseFracs =

    0.5000    0.5000


phaseComp =

    0.9008    0.0992
    0.0992    0.9008


T =

  151.2583

» [phases,phaseFracs,phaseComp]=capeOpenEquilibrium(handle,[0.5 0.5],'pressure',1e5,'temperature',151.25826)

phases = 

    'Vapor'
    'Liquid'


phaseFracs =

    0.5000    0.5000


phaseComp =

    0.9008    0.0992
    0.0992    0.9008 
INDEX
CONTENT