|Excel Thermo Import|
|Excel Unit Operation|
|Matlab Unit Operation|
|Matlab Thermo Import|
|OO Calc Thermo Import|
|SciLab Unit Operation|
|SciLab Thermo Import|
|Python 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, 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".
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) CAPE-OPEN: TEA warning: temperature above TC for determining Yen and Woods liquid density; using TR=1.0 phaseComp = 0.5 0.5 phaseFracs = 1. phases = Vapor -->[phases,phaseFracs,phaseComp,T]=capeOpenEquilibrium(handle,[0.5 0.5],"vaporFraction",0.5,"pressure",1e5) T = 151.25826 phaseComp = 0.9008329 0.0991671 0.0991671 0.9008329 phaseFracs = 0.5 0.5 phases = !Vapor ! ! ! !Liquid ! -->[phases,phaseFracs,phaseComp]=capeOpenEquilibrium(handle,[0.5 0.5],"pressure",1e5,"temperature",151.25826) phaseComp = 0.9008329 0.0991671 0.0991670 0.9008330 phaseFracs = 0.5000000 0.5000000 phases = !Vapor ! ! ! !Liquid !