Calculate and get values for two-phase properties.
A list of supported two-phase properties can be obtained using `capeOpen2PhasePropList`.

[values,...]=capeOpen2PhaseProp(handle,propNames,phase1,phase2,T,P,X1,X2)

`handle`: package handle, as obtained from `capeOpenGetPackage`

`propNames`: string. Multiple properties can be specified; separate the properties
by a space.

`phase1`: string. Name of the first phase for the calculation. Valid phase names can be obtained with `capeOpenPhases`.

`phase2`: string. Name of the second phase for the calculation.

`T`: scalar or column vector of temperatures at which to calculate the values.

`P`: scalar or column vector of pressures at which to calculate the values.

`X1`: composition matrix for the first phase. Number of columns must match compound count. Can have a single row,
or multiple rows for multiple compositions. X is in mole fraction or mass fraction, depending on
the current basis.

`X2`: composition matrix for the second phase.

For calculation at multiple conditions, T, P, X1 and X2 must have a consistent number of rows. Any of them can have a single row, meaning constant T, P or composition. The number of evaluations will depend on the maximum number of rows. For all T, P, X1 and X2 that have multiple rows, the number of rows must be equal. Evaluation at multiple conditions is not supported for properties for which the value is a matrix.

`values`: matrix of values. One matrix will be returned for each property. If the
calculated property is a scalar (such as surfaceTension), the returned matrix will be a column vector with the size of
the number of evaluation conditions. If the calculated property is a vector (such as Kvalues), the
number of rows will match the number of conditions, and the number of columns will match the number of compounds.
For properties that are a matrix (such as Kvalues.DmolFraction), evaluation at multiple conditions is not
supported, and the returned matrix will be square, with the number of rows and columns equal to the number
of compounds. For composition derivatives (such as surfaceTension.DmolFraction or Kvalues.Dmolfraction) the
return value will not be a single matrix, but a list of two matrices; the first matrix contains the
composition derivative w.r.t. phase 1, and the second matrix the composition derivative w.r.t. phase 2.

-->handle=capeOpenGetPackage("TEA (CAPE-OPEN 1.1)","C1_C2"); -->capeOpen2PhasePropList(handle) ans = !surfaceTension ! ! ! !surfaceTension.Dmoles ! ! ! !surfaceTension.DmolFraction ! ! ! !surfaceTension.Dtemperature ! -->XL=[0.5 0.5] XL = 0.5 0.5 -->XV=[1 0] XV = 1. 0. -->capeOpen2PhaseProp(handle,"surfaceTension","vapor","liquid",298.15,101325,XL,XV) ans = 1.000D-10 -->//well outside of the two-phase region; let's lower the temperature: -->capeOpen2PhaseProp(handle,"surfaceTension","vapor","liquid",150,101325,XL,XV) ans = 0.0061081 -->[st stdx]=capeOpen2PhaseProp(handle,"surfaceTension surfaceTension.DmolFraction","vapor","liquid",150,101325,XL,XV) stdx = stdx(1) 0. 0. stdx(2) 0.0061081 0.0217845 st = 0.0061081 --> //notice how surface tension for this package does not depend on vapor composition -->[st stdx]=capeOpen2PhaseProp(handle,"surfaceTension surfaceTension.DmolFraction","vapor","liquid",[150:1:170]',101325,XL,XV) stdx = stdx(1) 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. stdx(2) 0.0061081 0.0217845 0.0059438 0.0216213 0.0057804 0.0214581 0.0056180 0.0212950 0.0054565 0.0211320 0.0052958 0.0209690 0.0051361 0.0208060 0.0049774 0.0206431 0.0048195 0.0204803 0.0046625 0.0203175 0.0045065 0.0201548 0.0043513 0.0199921 0.0041971 0.0198295 0.0040437 0.0196669 0.0038912 0.0195044 0.0037397 0.0193419 0.0035890 0.0191795 0.0034392 0.0190172 0.0032903 0.0188550 0.0031422 0.0186928 0.0029951 0.0185307 st = 0.0061081 0.0059438 0.0057804 0.0056180 0.0054565 0.0052958 0.0051361 0.0049774 0.0048195 0.0046625 0.0045065 0.0043513 0.0041971 0.0040437 0.0038912 0.0037397 0.0035890 0.0034392 0.0032903 0.0031422 0.0029951

INDEX

CONTENT