CapeThermoMaterialWrapperCopyFromMaterial 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.

Definition

Namespace: CapeOpen
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
public void CopyFromMaterial(
	ICapeThermoMaterial source
)

Parameters

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

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.

Exceptions

ECapeNoImplThe 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.
ECapeFailedInitialisationThe pre-requisites for copying the non-constant Physical Properties of the Material Object are not valid. The necessary initialisation, such as configuring the current Material with the same Compounds and Phases as the source, has not been performed or has failed.
ECapeOutOfResourcesThe physical resources necessary to copy the non-constant Physical Properties are out of limits.
ECapeNoMemoryThe physical memory necessary to copy the non-constant Physical Properties is out of limit.
ECapeUnknownThe error to be raised when other error(s), specified for this operation, are not suitable.

See Also