|Excel Unit Operation|
|Matlab Unit Operation|
|Matlab Thermo Import|
|OO Calc Thermo Import|
|SciLab Unit Operation|
|SciLab Thermo Import|
Calculate a thermodynamic phase equilibrium and return full info on phases, phase fractions, compositions, pressure and temperature.
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, dependening 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 contraint property. The unit of measure of the value may depend on the basis.
prop2: string, second constraint property.
val2: value for the second flash contraint 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".
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
» 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