Click or drag to resize

MaterialStreamSetTwoPhaseProp Method

Sets two-phase non-constant property values for a mixture.

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

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.7 and 7.6.
phaseLabels  Object
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  Object
Value(s) to set for the property (CapeArrayDouble) or CapeInterface (see notes).

Implements

ICapeThermoMaterial.SetTwoPhaseProp(String, Object, String, Object)
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. To set a property using SetTwoPhaseProp, phaseLabels identifiers should be passed that are supported by the Property Package or Material Object, i.e. one that appears in the list returned by the GetPhaseList method of the ICapeThermoPhases interface. Setting such a property should cause the phases to be present on the Material Object, as if it were present in a call to SetPresentPhases with status Cape_UnknownPhaseStatus. The SetPresentPhases method of this interface does not need to be called before calling SetTwoPhaseProp.
See Also