Cape Thermo Material WrapperSet Two Phase Prop Method
Definition
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
public void SetTwoPhaseProp(
string property,
string[] phaseLabels,
string basis,
double[] values
)Public Sub SetTwoPhaseProp (
property As String,
phaseLabels As String(),
basis As String,
values As Double()
)Parameters
- property String
- The property for which values are set in the Material Object. This must be one of the two-phase properties or derivatives included in sections 7.5.6 and 7.6.
- phaseLabels String
- Phase labels of the Phases for which the property is set. The Phase labels must be two of the identifiers returned by the GetPhaseList method of the ICapeThermoPhases 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
- Value(s) to set for the property (CapeArrayDouble) or CapeInterface (see notes).
Remarks
The values argument of SetTwoPhaseProp is either a CapeArrayDouble that contains one or more numerical values to be set for a property, e.g. kvalues, or a CapeInterface that may be used to set two-phase properties described by a more complex data structure, e.g. distributed properties.
Although some properties set by calls to SetTwoPhaseProp 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 the values argument containing an array even if it contains only a single element.
The Physical Property values set by SetTwoPhaseProp depend on two Phases, for example surface tension or K-values. Properties that depend on a single Phase are set by the SetSinglePhaseProp method.
If a Physical Property with composition derivative is specified, the derivative values will be set 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 property. For example, if there are N Compounds then the values 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-values 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.
Before SetTwoPhaseProp can be used, all the Phases 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. |