ICapeThermoPropertyRoutineCheckTwoPhasePropSpec Method

Checks whether it is possible to calculate a property with the CalcTwoPhaseProp method for a given set of Phases.

Definition

Namespace: CapeOpen
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
[DispIdAttribute(5)]
bool CheckTwoPhasePropSpec(
	string property,
	Object phaseLabels
)

Parameters

property  String
The identifier of the property to check. To be valid this must be one of the supported two-phase properties (including derivatives), as given by the GetTwoPhasePropList method.
phaseLabels  Object
Phase labels of the Phases for which the properties are to be calculated. The Phase labels must be two of the identifiers returned by the GetPhaseList method on the ICapeThermoPhases interface.

Return Value

Boolean
A boolean Set to True if the combination of property and phaseLabels is supported, or False if not supported.

Remarks

The result of the check should only depend on the capabilities and configuration (Compounds and Phases present) of the component that implements the ICapeThermoPropertyRoutine interface (eg. a Property Package). It should not depend on whether a Material Object has been set nor on the state (temperature, pressure, composition etc.), or configuration of a Material Object that might be set.

It is expected that the PME, or other client, will use this method to check whether the properties it requires are supported by the Property Package when the Property Package is imported. If any essential properties are not available, the import process should be aborted.

If either the property argument or the values in the phaseLabels arguments are not recognised by the component that implements the ICapeThermoPropertyRoutine interface this method should return False.

Exceptions

ECapeNoImplThe operation CheckTwoPhasePropSpec 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 may be the case if no two-phase property is supported.
ECapeBadInvOrderThe necessary pre-requisite operation has not been called prior to the operation request. The ICapeThermoMaterial interface has not been passed via a SetMaterial call prior to calling this method.
ECapeFailedInitialisationThe pre-requisites for the property calculation are not valid. For example, if a prior call to the SetMaterial method of the ICapeThermoMaterialContext interface has failed to provide a valid Material Object.
ECapeInvalidArgumentOne or more of the input arguments is not valid. For example, UNDEFINED value for the property argument or the phaseLabels argument or number of elements in phaseLabels array not equal to two.
ECapeUnknownThe error to be raised when other error(s), specified for the CheckTwoPhasePropSpec operation, are not suitable.

See Also