CapeThermoMaterialWrapperGetTwoPhaseProp Method

Retrieves two-phase non-constant Physical Property values for a mixture.

Definition

Namespace: CapeOpen
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
public void GetTwoPhaseProp(
	string property,
	string[] phaseLabels,
	string basis,
	ref double[] results
)

Parameters

property  String
The identifier of the property for which values are requested. This must be one of the two-phase Physical Properties or Physical Property derivatives listed in sections 7.5.6 and 7.6.
phaseLabels  String
List of Phase labels of the Phases for which the property is required. The Phase labels must be two of the identifiers returned by the GetPhaseList method of the Material Object.
basis  String
Basis of the results. Valid settings are: “Mass” for Physical Properties per unit mass or “Mole” for molar properties. Use UNDEFINED as a place holder for a Physical Property for which basis does not apply. See section 7.5.5 for details.
results  Double
Results vector (CapeArrayDouble) containing property value(s) in SI units or CapeInterface (see notes).

Remarks

The results argument returned by GetTwoPhaseProp is either a CapeArrayDouble that contains one or more numerical values, e.g. kvalues, or a CapeInterface that may be used to retrieve 2-phase Physical Properties described by a more complex data structure, e.g.distributed Physical Properties.

Although the result of some calls to GetTwoPhaseProp may be a single numerical value, the return type for numerical values is CapeArrayDouble and in such a case the method must return an array even if it contains only a single element.

A Phase is ‘present’ in a Material if its identifier is returned by the GetPresentPhases method. An exception is raised by the GetTwoPhaseProp method if any of the Phases specified is not present. Even if all Phases are present, this does not mean that any Physical Properties are available.

The Physical Property values returned by GetTwoPhaseProp depend on two Phases, for example surface tension or K-values. These values may be set by the SetTwoPhaseProp method that may be called directly, or by other methods such as the CalcTwoPhaseProp method of the ICapeThermoPropertyRoutine interface, or the CalcEquilibrium method of the ICapeThermoEquilibriumRoutine interface. Note: Physical Properties that depend on a single Phase are returned by the GetSinglePhaseProp method.

It is expected that this method will normally be able to provide Physical Property values on any basis, i.e. it should be able to convert values from the basis on which they are stored to the basis requested. This operation will not always be possible. For example, if the molecular weight is not known for one or more Compounds, it is not possible to convert between a mass basis and a molar basis.

If a composition derivative is requested this means that the derivatives are returned for both Phases in the order in which the Phase labels are specified. The number of values returned for a composition derivative will depend on the dimensionality of the property. For example, if there are N Compounds then the results vector for the surface tension derivative will contain N composition derivative values for the first Phase, followed by N composition derivative values for the second Phase. For K-value derivative there will be N2 derivative values for the first phase followed by N2 values for the second phase in the order defined in 7.6.2.

Exceptions

ECapeNoImplThe operation is “not” implemented even if this method can be called for reasons of compatibility with the CAPE-OPEN standards. That is to say that the operation exists, but it is not supported by the current implementation. This could be the case if two-phase non-constant Physical Properties are not required by the PME and so there is no particular need to implement this method.
ECapeThrmPropertyNotAvailableThe property required is not available from the Material Object possibly for the Phases or basis requested.
ECapeFailedInitialisationThe pre-requisites are not valid. This exception is raised when a call to the SetTwoPhaseProp method has not been performed, or has failed, or when one or more of the Phases referenced does not exist.
ECapeInvalidArgumentTo be used when an invalid argument value was passed: for example, UNDEFINED for property, or an unrecognised identifier in phaseLabels.
ECapeUnknownThe error to be raised when other error(s), specified for this operation, are not suitable.

See Also