ICapeThermoCompoundsGetCompoundConstant Method

Returns the values of constant Physical Properties for the specified Compounds.

Definition

Namespace: CapeOpen
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
[DispIdAttribute(1)]
Object GetCompoundConstant(
	Object props,
	Object compIds
)

Parameters

props  Object
The list of Physical Property identifiers. Valid identifiers for constant Physical Properties are listed in section 7.5.2.
compIds  Object
List of Compound identifiers for which constants are to be retrieved. Set compIds = UNDEFINED to denote all Compounds in the component that implements the ICapeThermoCompounds interface.

Return Value

Object
Values of constants for the specified Compounds.

Remarks

The GetConstPropList method can be used in order to check which constant Physical Properties are available.

If the number of requested Physical Properties is P and the number of Compounds is C, the propvals array will contain C*P variants. The first C variants will be the values for the first requested Physical Property (one variant for each Compound) followed by C values of constants for the second Physical Property, and so on. The actual type of values returned (Double, String, etc.) depends on the Physical Property as specified in section 7.5.2.

Physical Properties are returned in a fixed set of units as specified in section 7.5.2.

If the compIds argument is set to UNDEFINED this is a request to return property values for all compounds in the component that implements the ICapeThermoCompounds interface with the compound order the same as that returned by the GetCompoundList method. For example, if the interface is implemented by a Property Package component the property request with compIds set to UNDEFINED means all compounds in the Property Package rather than all compounds in the Material Object passed to the Property package.

If any Physical Property is not available for one or more Compounds, then undefined values must be returned for those combinations and an ECapeThrmPropertyNotAvailable exception must be raised. If the exception is raised, the client should check all the values returned to determine which is undefined.

Exceptions

ECapeNoImplThe operation GetCompoundConstant 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 exception should be raised if no compounds or no properties are supported.
ECapeThrmPropertyNotAvailableAt least one item in the list of Physical Properties is not available for a particular Compound. This exception is meant to be treated as a warning rather than as an error.
ECapeLimitedImplOne or more Physical Properties are not supported by the component that implements this interface. This exception should also be raised if any element of the props argument is not recognised since the list of Physical Properties in section 7.5.2 is not intended to be exhaustive and an unrecognised Physical Property identifier may be valid. If no Physical Properties at all are supported ECapeNoImpl should be raised (see above).
ECapeInvalidArgumentTo be used when an invalid argument value is passed, for example, an unrecognised Compound identifier or UNDEFINED for the props argument.
ECapeUnknownThe error to be raised when other error(s), specified for the operation, are not suitable.
ECapeBadInvOrderThe error to be raised if the Property Package required the SetMaterial method to be called before calling the GetCompoundConstant method. The error would not be raised when the GetCompoundConstant method is implemented by a Material Object.

See Also