Cape Thermo Material WrapperSet Single Phase Prop Method
Definition
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
public void SetSinglePhaseProp(
string prop,
string phaseLabel,
string basis,
double[] values
)Public Sub SetSinglePhaseProp (
prop As String,
phaseLabel As String,
basis As String,
values As Double()
)Parameters
- prop String
- The identifier of the property for which values are set. This must be one of the single-phase properties or derivatives. The standard identifiers are listed in sections 7.5.5 and 7.6.
- phaseLabel String
- Phase label of the Phase for which the property is set. The phase label must be one of the strings returned by the GetPresentPhases method of this interface.
- 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.
- values Double
- Values to set for the property (CapeArrayDouble) or CapeInterface (see notes).
Remarks
The values argument of SetSinglePhaseProp is either a CapeArrayDouble that contains one or more numerical values to be set for a property, e.g. temperature, or a CapeInterface that may be used to set single-phase properties described by a more complex data structure, e.g. distributed properties.
Although some properties set by calls to SetSinglePhaseProp will have a single numerical value, the type of the values argument for numerical values is CapeArrayDouble and in such a case the method must be called with values containing an array even if it contains only a single element.
The property values set by SetSinglePhaseProp refer to a single Phase. Properties that depend on more than one Phase, for example surface tension or K-values, are set by the SetTwoPhaseProp method of the Material Object.
Before SetSinglePhaseProp can be used, the phase referenced must have been created using the SetPresentPhases method.
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. This method may not be required if the PME does not deal with any single-phase properties. |
| ECapeInvalidArgument | To be used when an invalid argument value was passed, that is a value that does not belong to the valid list described above, for example UNDEFINED for property. |
| ECapeOutOfBounds | One or more of the entries in the values argument is outside of the range of values accepted by the Material Object. |
| ECapeFailedInitialisation | The pre-requisites are not valid. The phase referenced has not been created using SetPresentPhases. |
| ECapeUnknown | The error to be raised when other error(s), specified for the SetSinglePhaseProp operation, are not suitable. |