Click or drag to resize

PropertyPackageSetMaterial Method

Allows the client of a component that implements this interface to pass an ICapeThermoMaterial interface to the component, so that it can access the properties of a Material.

Namespace: DWSIM.Thermodynamics.PropertyPackages
Assembly: DWSIM.Thermodynamics (in DWSIM.Thermodynamics.dll) Version: 8.8.1.0
Syntax
public virtual void SetMaterial(
	Object material
)
Request Example View Source

Parameters

material  Object
The Material interface.

Implements

ICapeThermoMaterialContext.SetMaterial(Object)
Remarks
The SetMaterial method allows a Thermodynamic and Physical Properties component, such as a Property Package, to be given the ICapeThermoMaterial interface of a Material Object. This interface gives the component access to the description of the Material for which Property Calculations or Equilibrium Calculations are required. The component can access property values directly using this interface. A client can also use the ICapeThermoMaterial interface to query a Material Object for its ICapeThermoCompounds and ICapeThermo- Phases interfaces, which provide access to Compound and Phase information, respectively. It is envisaged that the SetMaterial method will be used to check that the Material Interface supplied is valid and useable. For example, a Property Package may check that there are some Compounds in a Material Object and that those Compounds can be identified by the Property Package. In addition a Property Package may perform any initialisation that depends on the configuration of a Material Object. A Property Calculator component might typically use this method to query the Material Object for any required information concerning the Compounds. Calling the UnsetMaterial method of the ICapeThermoMaterialContext interface has the effect of removing the interface set by the SetMaterial method. After a call to SetMaterial() has been received, the object implementing the ICapeThermo- MaterialContext interface can assume that the number, name and order of compounds for that Material Object will remain fixed until the next call to SetMaterial() or UnsetMaterial().
See Also