setProduct is used to specify the product ports. setProduct must be called for each product port.
setProduct(productIndex,totalFlow,moleFraction,propName1,propVal1,propName2,propVal2)
productIndex
Integer; the index of the product to specify. The index must be between one and the number of products - inclusive.
totalFlow
Double; the value of the total flow, mol /s.
moleFraction
Double; the overall composition for the product flow. This must be a vector with the size of the number of compounds
propName1
String; name of the first property for the flash specification of the product. The following properties can be specified:
Property | Description | Unit of measure |
temperature | Temperature | K |
pressure | Pressure | Pa |
vaporFraction | Mole fraction of the vapor phase | - |
enthalpy | Default enthalpy | J / mol |
enthalpyF | Enthalpy - including formation terms | J / mol |
enthalpyNF | Enthalpy - not including formation terms | J / mol |
entropy | Default entropy | J / mol / K |
entropyF | Entropy - including formation terms | J / mol / K |
entropyNF | Entropy - not including formation terms | J / mol / K |
internalEnergy | Energy | J / mol |
volume | Specific volume | m3 / mol |
See getFeedProp for more information on the different enthalpies. Not each of the above properties may be supported by the underlying thermo system. Even if both propName1 and propName2 specify supported properties that are supported, the combination of the two may not be a supported specification for a flash.
propVal1
Double; the value of the property specified by propName1.
propName1
String; name of the second property for the flash specification of the product. See above for supported properties.
propVal1
Double; the value of the property specified by propName2.
-->setProduct(1,f1,x1,"temperature",298.15,"pressure",1e5)
-->setProduct(2,f2,x2,"vaporFraction",0.5,"pressure",1e5)