Click or drag to resize

MaterialStreamGetTwoPhaseProp Method

Retrieves two-phase non-constant Physical Property values for a mixture.

Namespace: DWSIM.Thermodynamics.Streams
Assembly: DWSIM.Thermodynamics (in DWSIM.Thermodynamics.dll) Version: 8.8.1.0
Syntax
public void GetTwoPhaseProp(
	string property,
	Object phaseLabels,
	string basis,
	ref Object results
)
Request Example View Source

Parameters

property  String
The identifier of the property for which values are requested. This must be one of the two-phase Physical Properties or Physical Property derivatives listed in sections 7.5.7 and 7.6.
phaseLabels  Object
List of Phase labels of the Phases for which the property is required. The Phase labels must be two of the identifiers returned by the GetPhaseList method of the Material Object.
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.
results  Object
Results vector (CapeArrayDouble) containing property value(s) in SI units or CapeInterface (see notes).

Implements

ICapeThermoMaterial.GetTwoPhaseProp(String, Object, String, Object)
Remarks
The results argument returned by GetTwoPhaseProp is either a CapeArrayDouble that contains one or more numerical values, e.g. kvalues, or a CapeInterface that may be used to retrieve 2-phase Physical Properties described by a more complex data structure, e.g. distributed Physical Properties. Although the result of some calls to GetTwoPhaseProp 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 GetTwoPhaseProp method if any of the Phases specified is not present. Even if all Phases are present, this does not necessarily mean that any Physical Properties are available. The Physical Property values returned by GetTwoPhaseProp depend on two Phases, for example surface tension or K-values. These values may be set by the SetTwoPhaseProp method that may be called directly, or by other methods such as the CalcTwoPhaseProp method of the ICapeThermoPropertyRoutine interface, or the CalcEquilibrium method of the ICapeThermoEquilibriumRoutine interface. Note: Physical Properties that depend on a single Phase are returned by the GetSinglePhaseProp 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 between a mass basis and a molar basis. If a composition derivative is requested this means that the derivatives are returned 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 dimensionality of the property. For example, if there are N Compounds then the results 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-value derivative 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.
See Also