Functions for Stream Variables

The following functions can be used for setting or retrieving variables that refer to a specific stream (input /output /intermediate) that is included in the process file:

         GetStreamVarVal(streamName As String, VarID As VarID, val, compLocalName As String) can be used to retrieve the value of input/output variables related to the specific stream

         SetStreamVarVal(streamName As String, VarID As VarID, val, compLocalName As String) can be used for setting input variables related to the specific stream

      AddIngredientToInputStream(streamName As String, ingredientName As String, VarID As VarID, val) can be used to add pure components and/or stock mixtures as well as the ingredient’s mass/mole flow or mass fraction to an input stream. The variable IDs that can be used with this function are: componentMassFlow_VID, componentMoleFlow_VID or compMassFrac_VID.

      RemoveIngredientFromInputStream(streamName As String, ingredientName As String) can be used to remove an ingredient from an input stream.

      IsInputStreamCompositionValid(streamName As String) can be used to validate the composition of an input stream. The sum of all ingredient mass fractions should add-up to 1.0.

The first argument is the stream name, the second argument (varID) is the variable identifier that specifies the variable we want to access and the third argument (val) is the variables value. The fourth argument is the component’s name, in the case we want to access a stream variable for a specific component (i.e. weight fraction of water in a stream). The Variable ID that needs to be used for each variable is listed in Stream Variables. Please see Accessing Pro-Designer Variables with COM for general information on accessing the Pro-Designer variables with the COM Server.

For a sample script that illustrates the use of these functions, see Scripts For Stream Variables.