© 2024 Jasper van Baten, AmsterCHEM

getTwoPhaseProperty

getTwoPhaseProperty is used to retrieve two-phase mixture properties.

Syntax

[value1,value2]=getTwoPhaseProperty(propName,phaseName1,phaseName2,T,P,moleFraction1,moleFraction2)

Arguments

propName
String; name of the property. The following two phase properties may be supported, depending on the underlying thermo system. Please note that in case the material objects that represent the material streams only implement support for CAPE-OPEN version 1.0, and not for version 1.1, the support for two-phase properties will be limited. In particular, composition derivatives will not be available.

property namedescriptionunit of measure
kvalueRatio of fugacity coefficients for a pair of phases defined as follows: kvaluei=phii,phase 2/phii,phase 1; where phi is the fugacity coefficient
kvaluesRatio of fugacity coefficients for a pair of phases defined as follows: kvaluei=phii,phase 2/phii,phase 1; where phi is the fugacity coefficient
logKvalueNatural logarithm of K-value
logKvaluesNatural logarithm of K-value
surfaceTensionInterfacial tension for a pair of phasesN m
The temperature derivatives of the above properties may be obtained by adding .Dtemperature to the property name, e.g. enthalpy.Dtemperature. Pressure derivatives may be obtained by adding .Dpressure. Mole fraction derivatives may be obtained by adding .DmolFraction. Mole number derivatives - for a total of 1 mole of mixture - may be obtained by by adding .Dmoles.
Mole number and mole fraction derivatives will return two sets of data: composition derivatives w.r.t. phase 1 followed by composition derivatives w.r.t. phase 2. See getFeedProperty for comments on various kinds of enthalpy.

phaseName1
String; name of the first phase for which to retrieve the property. The defined phase names depend on the underlying thermo system.

phaseName2
String; name of the second phase for which to retrieve the property

T
Double; temperature (K) at which to retrieve the property values

P
Double; pressure (Pa) at which to retrieve the property values

moleFraction1
Double; composition of the first phase at which to retrieve the property values. This must be a vector, with the number of elements equal to the number of compounds.

moleFraction2
Double; composition of the second phase at which to retrieve the property values

Returns:

value1
Double; values for the properties. Depending on the property, this may be a scalar value (e.g. surfaceTension), a vector value (one value for each compound, e.g. kvalue), or a matrix (number of compounds squared, e.g. kvalue.Dmolfraction).
For composition derivatives, this is the derivative w.r.t. to the composition of the first phase.

value2
For composition derivatives, this is the derivative w.r.t. to the composition of the second phase. For other properties this value will be empty.

Examples

» xVap=[0.3 0.7]

xVap =

    0.3000    0.7000

» xLiq=[0.8 0.2]

xLiq =

    0.8000    0.2000

» sigma=getTwoPhaseProperty('surfaceTension','vapor','liquid',298.15,101325,xVap,xLiq)

sigma =

  9.9376e-005

» sigmadP=getTwoPhaseProperty('surfaceTension.Dpressure','vapor','liquid',298.15,101325,xVap,xLiq)

sigmadP =

     0

» [sigmadx1,sigmadx2]=getTwoPhaseProperty('surfaceTension.DmolFraction','vapor','liquid',298.15,101325,xVap,xLiq)

sigmadx1 =

     0     0


sigmadx2 =

  1.0e-003 *

    0.0000    0.4969

» %surface tension for this system does not depend on vapor composition or pressure
INDEX
Acknowledgements
Additional files
Boolean parameters
Calculation
compNames
Dimensionality
Disclaimer
DOs and DONTs
Error trapping
Example
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
M files
Model files
nComp
nPhase
Parameters
phaseAggregationStates
phaseNames
Products
Real parameters
Reports
Requirements
Saving models
setParameter
setProduct
setReport
String parameters
SUM files
Welcome
CONTENT
 Welcome
 Feed and product ports
 Parameters
 Reports
 Matlab 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
 Persistence in AspenPlus
 License and disclaimer