Cape Thermo Material WrapperGet Single Phase Prop Method
Definition
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
public void GetSinglePhaseProp(
string property,
string phaseLabel,
string basis,
ref double[] results
)Public Sub GetSinglePhaseProp (
property As String,
phaseLabel As String,
basis As String,
ByRef results As Double()
)Parameters
- property String
- CapeString The identifier of the Physical Property for which values are requested. This must be one of the single-phase Physical Properties or derivatives. The standard identifiers are listed in sections 7.5.5 and 7.6.
- phaseLabel String
- CapeString Phase label of the Phase for which the Physical Property is required. The Phase label must be one of the identifiers returned by the GetPresentPhases method of this interface.
- basis String
- CapeString 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
- CapeVariant Results vector (CapeArrayDouble) containing Physical Property value(s) in SI units or CapeInterface (see notes).
Remarks
The results argument returned by GetSinglePhaseProp is either a CapeArrayDouble that contains one or more numerical values, e.g. temperature, or a CapeInterface that may be used to retrieve single-phase Physical Properties described by a more complex data structure, e.g. distributed properties.
Although the result of some calls to GetSinglePhaseProp 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 GetSinglePhaseProp method if the Phase specified is not present. Even if a Phase is present, this does not mean that any Physical Properties are available.
The Physical Property values returned by GetSinglePhaseProp refer to a single Phase. These values may be set by the SetSinglePhaseProp method, which may be called directly, or by other methods such as the CalcSinglePhaseProp method of the ICapeThermoPropertyRoutine interface or the CalcEquilibrium method of the ICapeThermoEquilibriumRoutine interface. Note: Physical Properties that depend on more than one Phase, for example surface tension or K-values, are returned by the GetTwoPhaseProp 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 from mass fractions or mass flows to mole fractions or molar flows.
Exceptions
| ECapeNoImpl | The 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 |
| ECapeThrmPropertyNotAvailable | The property required is not available from the Material Object possibly for the Phase label or basis requested. This exception is raised when a property value has not been set following a call to the CreateMaterial or the value has been erased by a call to the ClearAllProps methods. |
| ECapeInvalidArgument | To be used when an invalid argument value was passed: for example UNDEFINED for property, or an unrecognised identifier for phaseLabel. |
| ECapeFailedInitialisation | The pre-requisites are not valid. The necessary initialisation has not been performed, or has failed. This exception is returned if the Phase specified does not exist. |
| ECapeUnknown | The error to be raised when other error(s), specified for this operation, are not suitable. |