Click or drag to resize

MaterialStreamCopyFromMaterial Method

Copies all the stored non-constant Physical Properties (which have been set using the SetSinglePhaseProp, SetTwoPhaseProp or SetOverallProp) from the source Material Object to the current instance of the Material Object.

Namespace: DWSIM.Thermodynamics.Streams
Assembly: DWSIM.Thermodynamics (in DWSIM.Thermodynamics.dll) Version: 8.8.1.0
Syntax
public void CopyFromMaterial(
	ref Object source
)
Request Example View Source

Parameters

source  Object
Source Material Object from which stored properties will be copied.

Implements

ICapeThermoMaterial.CopyFromMaterial(Object)
Remarks
Before using this method, the Material Object must have been configured with the same exact list of Compounds and Phases as the source one. Otherwise, calling the method will raise an exception. There are two ways to perform the configuration: through the PME proprietary mechanisms and with CreateMaterial. Calling CreateMaterial on a Material Object S and subsequently calling CopyFromMaterial(S) on the newly created Material Object N is equivalent to the deprecated method ICapeMaterialObject.Duplicate. The method is intended to be used by a client, for example a Unit Operation that needs a Material Object to have the same state as one of the Material Objects it has been connected to. One example is the representation of an internal stream in a distillation column. If the Material Object supports the Petroleum Fractions Interface [7] the petroleum fraction properties are also copied from the source Material Object to the current instance of the Material Object.
See Also