Click or drag to resize

MaterialStreamSetPresentPhases Method

Allows the PME or the Property Package to specify the list of Phases that are currently present.

Namespace: DWSIM.Thermodynamics.Streams
Assembly: DWSIM.Thermodynamics (in DWSIM.Thermodynamics.dll) Version: 8.8.1.0
Syntax
public void SetPresentPhases(
	Object phaseLabels,
	Object phaseStatus
)
Request Example View Source

Parameters

phaseLabels  Object
The list of Phase labels for the Phases present. The Phase labels in the Material Object must be a subset of the labels returned by the GetPhaseList method of the ICapeThermoPhases interface.
phaseStatus  Object

Implements

ICapeThermoMaterial.SetPresentPhases(Object, Object)
Remarks
SetPresentPhases is intended to be used in the following ways: * To restrict an Equilibrium Calculation (using the CalcEquilibrium method of a component that implements the ICapeThermoEquilibriumRoutine interface) to a subset of the Phases supported by the Property Package component; * When the component that implements the ICapeThermoEquilibriumRoutine interface needs to specify which Phases are present in a Material Object after an Equilibrium Calculation has been performed. * In the context of dynamic simulations to specify the state of a Material Object that is an output of a unit operation. This is the equivalent of calculating equilibrium in steadystate simulations. If a Phase in the list is already present, its Physical Properties are unchanged by the action of this method. Any Phases not in the list when SetPresentPhases is called are removed from the Material Object. This means that any Physical Property values that may have been stored on the removed Phases are no longer available (i.e. a call to GetSinglePhaseProp or GetTwoPhaseProp including this Phase will return an exception). A call to the GetPresentPhases method of the Material Object will return the same list as specified by SetPresentPhases. The phaseStatus argument must contain as many entries as there are Phase labels. The valid settings are listed in the following table: Identifier Meaning Cape_UnknownPhaseStatus This is the normal setting when a Phase is specified as being available for an Equilibrium Calculation. Cape_AtEquilibrium The Phase has been set as present as a result of an Equilibrium Calculation. Cape_Estimates Estimates of the equilibrium state have been set in the Material Object. All the Phases with a status of Cape_AtEquilibrium must have properties that correspond to an equilibrium state, i.e. equal temperature, pressure and fugacities of each Compound (this does not imply that the fugacities are set as a result of the Equilibrium Calculation). The Cape_AtEquilibrium status should be set by the CalcEquilibrium method of a component that implements the ICapeThermoEquilibriumRoutine interface following a successful Equilibrium Calculation. If the temperature, pressure or composition of an equilibrium Phase is changed, the Material Object implementation is responsible for resetting the status of the Phase to Cape_UnknownPhaseStatus. Other property values stored for that Phase should not be affected. Phases with an Estimates status must have values of temperature, pressure, composition and phase fraction set in the Material Object. These values are available for use by an Equilibrium Calculator component to initialise an Equilibrium Calculation. The stored values are available but there is no guarantee that they will be used.
See Also