# User Property Expressions

Navigation: User Guide ➔ Edit ➔ Project Configuration (cfg File) ➔ Calculation Configuration ➔ User Property Expressions

Edit Configuration Step 2 of 2 - Calculation Tab
Calculation Configuration (Summary) User Property Calculations User Property Expressions Species Calculations Species Calculation Expressions

## User Property Expressions Table

 Expression Description Syntax Examples Notes ----- Range Functions ----- If Statement Tests if the expression is true, then returns the true value, if not then returns the false value. If(logical test, value if true, value if false) If(T(K)>373, 100, 0) The result is 100 if stream temperature is greater than 373K, otherwise the result is 0. Minimum Returns the minimum value of the two variables Min(value or expression, value or expression) Min(T(K), 300) The function will return 300 if T(K) is over 300. This is used to set the maximum value. Maximum Returns the maximum value of the two variables Max(value or expression, value or expression) Max(0.01, [C_concentration]) The function will return 0.01 if C_Concentration is less than 0.01. This is used to set the minimum value. Typically used to protect division by zero errors. Range Returns the value between a specified range Range(min, expression, max) Range(0, [Efficiency], 100) The user defined variable Efficiency is ranged between 0 and 100. ----- Maths Functions ----- Exponential e raised to the power of the value of the expression Exp(expression) Exp(2) The result is e^2 = 7.389 Natural Logarithm The natural logarithm of the expression is calculated Ln(expression) Ln(5) The result is Ln 5 = 1.609 Base 10 Logarithm The base 10 logarithm of the expression is calculated Log(expression) Log(10) The result is Log1010 = 1 Squared The result of the expression is squared (raised to power of 2) Sqr(expression) Sqr(3) The result is 3^2 = 3*3 = 9 Square Root The square root of the expression is calculated Sqrt(units) Sqrt(9) The result is 3. Absolute Value The absolute value of the expression is returned Abs(expression) Abs(-5) The result is 5. Sine The sine of the expression is calculated (assumes expression is in radians) Sin(expression) Sin(2) The result is sin 2 = 0.909 Cosine The cosine of the expression is calculated (assumes expression is in radians) Cos(expression) Cos(2) The result is cos 2 = -0.416 Power A term is raised to the specified power. Pow(expression,power factor) Pow(4,3) The result is 4^3 = 4 * 4 * 4 = 64 ----- Stream Functions ----- Stream Temperature The stream temperature T(units) T(K) SI Units (K) is returned. Stream Pressure The stream pressure P(units) P(kPa) SI Units (kPa) is returned. Stream Density Density of the selected phase(s) Density(phase,T,P) Density(l,373.15,101.325) This will return the density value of the selected phase. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. Stream Heat of Formation Total Heat of Formation of the selected phase(s) H(phase,T,P) H(s,l,g,373.15,101.325) This will return the heat of formation value of the entire stream. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. Stream Enthalpy Stream Enthalpy change excluding phase change Hs(phase,T,P) Hs(s,l,373.15,101.325) This will return the enthalpy value of the solid and liquid phases. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. Stream Enthalpy (with Phase Change) Stream Enthalpy change including phase change Hz(phase,T,P) Hz(s,l,g) This will return the enthalpy value of the entire stream. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. ----- Species Functions ----- Species Molecular Weight Molecular weight of species MW(speciename(phase)) or MW(AxBy) MW(H2SO4(aq)) (where H2SO4(aq) IS in the configuration file) MW(Fe1O1) (where FeO is NOT in the configuration file) If the species is NOT in the project, then the user must specify the elemental breakdown of the species. Density of Species Density of the selected Species Density(species(phase),T,P) Density(H2O(l),373.15,101.325) This will return the density value of the selected species. The Temperature(K) and Pressure(kPa) terms are optional. Vapour Pressure of Species Vapour Pressure of the selected Species VapourP(species(phase),T) VapourP(H2O(l),373.15) This will return the saturated Pressure of the selected species at stream Temperature or optional specified Temperature (K). Vapour Temperature of Species Vapour Saturation Temperature of the selected Species VapourT(species(phase),P) VapourT(H2O(l),101.325) This will return the saturated Temperature of the selected species at stream Pressure or optional specified Pressure (kPa). ----- Species Mass Functions ----- Species Mass Flow Flow of individual species m:[speciesname(phase)] m:[H2O(l)] This will return the mass flow of the selected species Heat of Formation Heat of Formation of the selected species per unit mass m:H(species(phase),T,P) m:H(H2O(l),373.15,101.325) This will return the heat of formation value in kJ/kg of the selected species. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. Enthalpy Enthalpy change excluding phase change per unit mass m:Hs(species(phase),T,P) m:Hs(H2O(l),373.15,101.325) This will return the change of enthalpy value in kJ/kg of the selected species. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. Enthalpy (with Phase Change) Enthalpy change including phase change per unit mass m:Hz(species(phase),T,P) m:Hz(H2O(l)) This will return the change of enthalpy value in kJ/kg (including phase change) of selected species. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. ----- Species Molar Functions ----- Species Molar Flow Flow of individual species ml:[speciesname(phase)] ml:[H2O(l)] This will return the mole flow of the selected species Heat of Formation Heat of Formation of the selected species per mole ml:H(species(phase),T,P) ml:H(H2O(l),373.15,101.325) This will return the heat of formation value in kJ/kmol of the selected species. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. Enthalpy Enthalpy change excluding phase change per mole ml:Hs(species(phase),T,P) ml:Hs(H2O(l),373.15,101.325) This will return the change of enthalpy value in kJ/kmol of the selected species. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. Enthalpy (with Phase Change) Enthalpy change including phase change per mole ml:Hz(species(phase),T,P) ml:Hz(H2O(l)) This will return the change of enthalpy value in kJ/kmol (including phase change) of selected species. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. ----- Species Volume Functions ----- Species Volume Flow Volumetric Flow of the selected species v:[speciesname(phase),T,P] v:[H2O(l)] This will return the volumetric flow of the selected species. The Temperature(K) and Pressure(kPa) terms are optional. Stream T & P will be used if they are not specified. Species Normal Volume Flow Volumetric Flow of the selected species at Normal T&P nv:[speciesname(phase)] nv:[H2O(l)] This will return the volumetric flow of the selected species calculated at the Normal Temperature and Pressure. ----- Phase Mass Functions ----- Phase Mass Flows The flow of a single or multiple phases m:SumPhase(s,l,g) m:SumPhase(l) will return the flow of the liquid phase only. Only three phase occurrences are valid: s, l, g. Individual Phase Mass Flows The flow of a single individual phase or multiple individual phases m:SumIPhase(s,l,aq,o,g,...) m:SumIPhase(aq) will return the flow of the aqueous individual phase ----- Phase Molar Functions ----- Phase Molar Flows The flow of a single or multiple phases ml:SumPhase(s,l,g) ml:SumPhase(s,l) will return the flow of the slurry (solid and liquid phases). Only three phase occurrences are valid: s, l, g. Individual Phase Molar Flows The flow of a single individual phase or multiple individual phases ml:SumIPhase(s,l,aq,o,g,...) ml:SumIPhase(sl) will return the flow of the slag individual phase ----- Phase Volume Functions ----- Phase Volume Flows The flow of a single or multiple phases v:SumPhase(s,l,g) v:SumPhase(s,l,g) will return the entire flow. Only three phase occurrences are valid: s, l, g. Phase Normal Volume Flows The flow of a single or multiple phases nv:SumPhase(s,l,g) nv:SumPhase(g) will return the gas phase normal volumetric flow. Only three phase occurrences are valid: s, l, g. ----- Elemental Functions ----- Elemental Molecular Weight Molecular weight of an element MW(Element) MW(Al) The molecular weight of ANY element can be accessed. Elemental Phase Mass Flows The mass flow of a single or multiple phases for a single element m:SumElemPhase(El,s,l,g) m:SumElemPhase(S,l) will return the mass flow of Sulfur in the liquid phase only. Only three phase occurrences are valid: s, l, g. Elemental Individual Phase Mass Flows The mass flow of a single individual phase or multiple individual phases for a single element m:SumElemIPhase(El,s,l,aq,o,g,...) m:SumElemIPhase(H,aq) The user must will return the mass flow of Hydrogen in the aqueous individual phase Elemental Phase Molar Flows The mole flow of a single or multiple phases for a single element ml:SumElemPhase(El,s,l,g) ml:SumElemPhase(Fe,s,l) will return the mole flow of Iron in the slurry (solid and liquid phases). Only three phase occurrences are valid: s, l, g. Elemental Individual Phase Molar Flows The mole flow of a single individual phase or multiple individual phases for a single element ml:SumElemIPhase(El,s,l,aq,o,g,...) ml:SumElemIPhase(Cu,sl) will return the mole flow of the copper in the slag individual phase ----- General Constants ----- Standard Temperature The standard temperature in the project StdT(units) StdT(K) SI Units (K) is returned. Standard Pressure The standard pressure in the project StdP(units) StdP(kPa) SI Units (kPa) is returned. Normal Temperature The normal temperature in the project NormalT(units) NormalT(K) SI Units (K) is returned. Normal Pressure The normal pressure in the project NormalP(units) NormalP(kPa) SI Units (kPa) is returned. Project User Values The User Value entered in the project Val(index) Val(1) User value from the plant model is returned. ----- Environmental Functions ----- These parameters are Defined in View - PlantModels - Envirnment Tab Ambient Temperature The ambient temperature as defined in the project AmbientT(units) AmbientT(K) SI Units (K) is returned. Atmospheric Pressure The atmospheric pressure as defined in the project AtmP(units) AtmP(kPa) SI Units (kPa) is returned. Atmospheric Density The density of the atmospheric air as defined in the project AtmDensity(units) AtmDensity(kg/m^3) SI Units (kg/m^3) is returned. Based on the Air Properties defined. User may need to include the required air components in the configuration file for this to work. Base Elevation The ground elevation as defined in the project BaseElevation(units) BaseElevation(m) SI Units (m) is returned. Used to calculate the atmospheric pressure. Wind Speed The wind speed as defined in the project WindSpeed(units) WindSpeed(m/s) SI Units (m/s) is returned. Used in various evaporation / heat loss calculations. Wind Direction The wind direction as defined in the project WindDirection(units) WindDirection(rad) SI Units (rad) is returned. Used in various evaporation / heat loss calculations. Relative Humidity The relative humidity as defined in the project RelHumidity(units) RelHumidity(Frac) SI Units (Frac) is returned. Used in various evaporation / heat loss calculations. ----- Calculations ----- Only visible if User Property Calculations have been added. User Defined Any previously defined User Property Calculations can be used as part of a new calculation. The user defined calculation tags will be enclosed by square brackets. N/A TotalFe = [Fe2+] + [Fe3+] The user must have defined Fe2+ and Fe3+ for the example to be valid. For example: Fe2+ = [FeSO4(aq)] * MW(Fe)/MW(FeSO4(aq)) and Fe3+ = [Fe2[SO4]3(aq)] * 2 * MW(Fe)/MW(Fe2[SO4]3(aq))

NOTES:

1. Function SumPhase() has only three valid phase occurrences: s, l, g.
2. Function SumIPhase() may contain user defined individual phases. However, the phase description must match what has been defined in the species database. User must check the individual phase name is specified correctly. For example, if the organic species are specified with (o), then user can use SumIPhase(o) to sum up the total organics.