metsim value functions
DESCRIPTION
Functional Description for most of the APL expressions of Metsim softwareTRANSCRIPT
Density and Specific Gravity Value Functions
METSIM Value Functions&
Other Information
Density and Specific Gravity Value Functions
P VKM3 S ;Density of phase P in stream S, kilograms per cubic meter.
P VPF3 S ;Density of phase P in stream S, pounds per cubic foot.
P VPGL S ;Density of phase P in stream S, pounds per gallon.
P VPSG S ;Specific gravity of phases P in stream S.
VSGC S ;Specific gravity of coal in stream S.
VSGM S ;Specific gravity of media in coal stream S.
VSPG S ;Specific gravity of all phases plus total of stream S.
Pressure Value Functions
VATMa S ;Pressure in stream S in atmospheres, actual
VATMg S ;Pressure in stream S in atmospheres, gauge
VBARa S ;Pressure in stream S in bars, actual
VBARg S ;Pressure in stream S in bars, gauge
VKPAa S ;Pressure in stream S in kiloPascals, actual
VKPAg S ;Pressure in stream S in kiloPascals, gauge
VINWa S ;Pressure in stream S in inches of water 60F, actual
VINWg S ;Pressure in stream S in inches of water 60F, gauge
VMHGa S ;Pressure in stream S in millimeters of mercury 0C, actual
VMHGg S ;Pressure in stream S in millimeters of mercury 0C, gauge
VMMWa S ;Pressure in stream S in millimeters of water 4C, actual
VMMWg S ;Pressure in stream S in millimeters of water 4C, gauge
VPSIa S ;Pressure in stream S in pounds per square inch, actual
VPSIg S ;Pressure in stream S in pounds per square inch, gauge
Temperature Value Functions
VTEC S ;Temperature of stream S in degrees C
VTEF S ;Temperature of stream S in degrees F
VTEK S ;Temperature of stream S in degrees K
VTEM S ;Temperature of stream S in degrees C
VTER S ;Temperature of stream S in degrees R
Volume Value Functions
C VSPV S ;Specific volume of component C in stream S
VLTR S ;Volume of stream S in liters
P VICF S ;Volume of phases P in stream S in cubic feet
P VICI S ;Volume of phases P in stream S in cubic inches
P VICM S ;Volume of phases P in stream S in cubic meters
Mass Flowrate Value Functions Adjusted for Operating TimeC VGMD S ;Flowrate of components C in stream S in grams per day
C VGMH S ;Flowrate of components C in stream S in grams per hour
C VGMM S ;Flowrate of components C in stream S in grams per minute
C VGMS S ;Flowrate of components C in stream S in grams per second
C VKGD S ;Flowrate of components C in stream S in kilograms per day
C VKGH S ;Flowrate of components C in stream S in kilograms per hour
C VKGM S ;Flowrate of components C in stream S in kilograms per minute
C VKGS S ;Flowrate of components C in stream S in kilograms per second
C VLBD S ;Flowrate of components C in stream S in pounds per day
C VLBH S ;Flowrate of components C in stream S in pounds per hour
C VLBM S ;Flowrate of components C in stream S in pounds per minute
C VMTD S ;Flowrate of components C in stream S in metric tons per day
C VMTH S ;Flowrate of components C in stream S in metric tons per hour.
C VMTM S ;Flowrate of components C in stream S in metric tons per minute
C VMTS S ;Flowrate of components C in stream S in metric tons per second
C VSTD S ;Flowrate of components C in stream S in short tons per day
C VSTH S ;Flowrate of components C in stream S in short tons per hour
Mass/Molar Flowrate Value Functions, Not Adjusted for Operating Time, Units specified in ICAS E VEFR S ;Mass flowrate of element E in stream S
E VEWL S ;Mass flowrate of element E in liquid components in stream S
E VEWS S ;Mass flowrate of element E in solid components in stream S
E VEWT S ;Mass flowrate of element E in total stream S
C VCWT S ;Mass flowrate of components C in stream S
P VPWT S ;Mass flowrate of phases P in stream S
C VSTR S ;Mass flowrate of components C in stream S
C VCMT S ;Molar flowrate of components C in stream S
E VEMT S ;Molar flowrate of element E in stream S
C VMFR S ;Molar flowrate of comp components C in stream S
P VPMT S ;Molar flowrate of phases P in stream S
E VME1 S ;Molar flowrate of element E in phase 1 SI of stream S
E VME2 S ;Molar flowrate of element E in phase 2 SO of stream S
E VME3 S ;Molar flowrate of element E in phase 3 LI of stream S
E VME4 S ;Molar flowrate of element E in phase 4 LO of stream S
E VME5 S ;Molar flowrate of element E in phase 5 M1 of stream S
E VME6 S ;Molar flowrate of element E in phase 6 M2 of stream S
E VME7 S ;Molar flowrate of element E in phase 7 M3 of stream S
E VME8 S ;Molar flowrate of element E in phase 8 GC of stream S
E VWE1 S ;Mass flowrate of element E in phase 1 SI of stream S
E VWE2 S ;Mass flowrate of element E in phase 2 SO of stream S
E VWE3 S ;Mass flowrate of element E in phase 3 LI of stream S
E VWE4 S ;Mass flowrate of element E in phase 4 LO of stream S
E VWE5 S ;Mass flowrate of element E in phase 5 M1 of stream S
E VWE6 S ;Mass flowrate of element E in phase 6 M2 of stream S
E VWE7 S ;Mass flowrate of element E in phase 7 M3 of stream S
E VWE8 S ;Mass flowrate of element E in phase 8 GC of stream S
Volumetric Flowrate Value Functions Adjusted for Operating TimeP VCFD S ;Flowrate of phase(s) P in stream S in cubic feet per day.
P VCFM S ;Flowrate of phase(s) P in stream S in cubic feet per minute.
P VSCF S ;Flowrate of phase(s) P in stream S in standard cubic feet per min.
VCMC S ;Flowrate of coal in stream S in cubic meters per hour.
P VCMD S ;Flowrate of phases P in stream S in cubic meters per day.
P VCMH S ;Flowrate of phases P in stream S in cubic meters per hour.
P VCMM S ;Flowrate of phases P in stream S in cubic meters per minute.
P VCMY S ;Flowrate of phases P in stream S in cubic meters per year.
P VNM3 S ;Flowrate of phases P in stream S in normal cubic meters per hour.
VDM3 S ;Flowrate of dry gas in stream S in normal cubic meters per hour.
P VGPD S ;Flowrate of phases P in stream S in U.S. gallons per day.
P VGPM S ;Flowrate of phases P in stream S in U.S. gallons per minute.
P VIGH S ;Flowrate of phases P in stream S in Imperial gallons per hour.
P VIGM S ;Flowrate of phases P in stream S in Imperial gallons per minute.
P VLPD S ;Flowrate of phases P in stream S in liters per day.
P VLPH S ;Flowrate of phases P in stream S in liters per hour.
P VLPM S ;Flowrate of phases P in stream S in liters per minute.
P VLPS S ;Flowrate of phases P in stream S in liters per second.
Elemental Assay Value FunctionsE VESI S ;Weight fraction of element E in solid inorganic phase of stream S.
E VESO S ;Weight fraction of element E in solid organic phase of stream S.
E VESA S ;Weight fraction of element E in solid phases of stream S.
E VELI S ;Weight fraction of element E in liquid inorganic phase of stream S.
E VELO S ;Weight fraction of element E in liquid organic phase of stream S.
E VELA S ;Weight fraction of element E in liquid phases of stream S.
E VEM1 S ;Weight fraction of element E in molten metal phase of stream S.
E VEM2 S ;Weight fraction of element E in matte phase of stream S.
E VMAT S ;Weight fraction of element E in matte phase of stream S.
E VEM3 S ;Weight fraction of element E in slag phase of stream S.
E VEGC S ;Weight fraction of element E in gaseous phase of stream S.
E VEWD S ;Weight fraction of element E in dried stream S.
E VEWF S ;Weight fraction of element E in total stream S.
E VOZT S ;Assay of element E in all phases of stream S in troy ounces/ton.
Component Assay Value FunctionsC VCWF S ;Weight fraction of components C in stream S.
C VCPA S ;Weight fraction of component C in component C's phase in stream S.
C VCMF S ;Mole fraction of components C in stream S.
C VGPC S ;Volume fraction of component C in gas phase of stream S.
C VDGV S ;Dry gas volume fraction of component C in stream S.
C VISR S ;Iron silica ratio in components C in stream S, default C is SC,M3.
VM3B S ;Basic/acid ratio of slag in stream S.
VSIO S ;Weight fraction of SiO2 in solids and slag in stream S.
VSO2 S ;Weight fraction of SO2 in the gas phase of stream S.
C VGHW S ;Concentration of components C in stream S in grams per 100 grams of water.
C VGTW S ;Concentration of components C in stream S in grams per 1000 grams of water.
C VMKW S ;Concentration of components C in stream S in moles per 1000 moles of water.
Gram Per Liter Value Functions
E VGLE S ;Grams per liter of element E in stream S in total liquor.E VGLEa S ;Grams per liter of element E in stream S in aqueous only.E VGLEo S ;Grams per liter of element E in stream S in organic only.
E Vgle S ;Grams per liter of element E in stream S in total liquor (at 25C).
E Vglea S ;Grams per liter of element E in stream S in aqueous only (at 25C).
E Vgleo S ;Grams per liter of element E in stream S in organic only (at 25C).
C VGPL S ;Grams per liter of components C in stream S in total liquor.
C VGPLa S ;Grams per liter of components C in stream S in aqueous only.
C VGPLo S ;Grams per liter of components C in stream S in organic only.
C Vgpl S ;Grams per liter of components C in stream S in total liquor (at 25C).
C Vgpla S ;Grams per liter of components C in stream S in aqueous only (at 25C).
C Vgplo S ;Grams per liter of components C in stream S in organic only (at 25C).
VGLS S ;Grams per liter of solids in stream S.
C VFE2 S ;Grams per liter of Fe+2 in components C in stream S.
C Vfe2 S ;Grams per liter of Fe+2 in components C in stream S (at 25C).
C VFE3 S ;Grams per liter of Fe+3 in components C in stream S.
C Vfe3 S ;Grams per liter of Fe+3 in components C in stream S (at 25C).
E VMLE S ;Moles per liter of element E in stream S.
E Vmle S ;Moles per liter of element E in stream S (at 25C).
C VMPL S ;Moles per liter of components C in stream S.
C Vmpl S ;Moles per liter of components C in stream S (at 25C).
Solid Phase Value Functions
Vgf3 S ;Particulates in gas stream S in grains per standard cubic foot.
VGF3 S ;Particulates in gas stream S in grains per actual cubic foot.
Vgm3 S ;Particulates in gas stream S in grams per normal cubic meter.
VGM3 S ;Particulates in gas stream S in grams per actual cubic meter.
VPCS S ;Weight fraction of solids in stream S.
VVPS S ;Volume fraction of solids in stream S
P VPWF S ;Weight fraction of phases P in stream S.
P VPMF S ;Mole fraction of phases P in stream S.
P VPVF S ;Volume fraction of phases P in stream S.
Particle Size Value Functions VCPS S ;Average coal particle size in millimeters or inches.
F VMIC S ;Micron size of fraction F passing in stream S.
VP80 S ;Mesh size in microns which passes 80% of the solids in stream S.
M VPAS S ;Weight of solids in stream S passing M microns.
M VPPM S ;Weight fraction of solids in stream S passing M microns.
M VCPR S ;Weight fraction of solids in stream S retained on micron size M.
VPCP S ;Weight fraction of solids in stream S retained on each mesh size.
VPCR S ;Weight fraction of solids in stream S passing all mesh sizes.
M VSIZ S ;Weight fraction of solids in stream S passing M microns.
Steam and Air Value Functions
VDEW S ;Dew point of gas phase in stream S in degrees C
VGAH S ;Absolute humidity of stream S
VGRH S ;Relative humidity of stream S
VARH D W ;Relative humidity from dry bulb (D) and wet bulb (W) temperatures in degrees C
VGDB S ;Dry bulb temperature of stream S in degrees C
VGWB S ;Wet bulb temperature of stream S in degrees C
VSTP T ;Saturated steam pressure in kPa at temperature T in C
VSTT P ;Saturated steam temperature in C at pressure P in kPa
VHCT T ;Saturated steam condensate enthalpy at temperature T
VHCP P ;Saturated steam condensate enthalpy at pressure P
VHST T ;Saturated steam enthalpy in Btu/lb, kcal/kg, kJ/kg as function of temperature T
VHSP P ;Saturated steam enthalpy in Btu/lb, kcal/kg, kJ/kg as function of pressure P
VDSS S ;Degrees of superheat of steam in stream S in degrees C
P VESS T ;Enthalpy in BTU/lb and Kcal/kg mole of superheated steam at pressure P in psi and temperature T in F relative to 25C.
P VMSS T ;Enthalpy in BTU/lb and Kcal/kg mole of superheated steam at pressure P in kPa and temperature T in C relative to 25C
P Vesse T ;Enthalpy in BTU/lb of superheated steam at pressure P in psi and temperature T in F relative to 25C
P VESSE T ;Enthalpy in BTU/lb of superheated steam at pressure P in PSI and temperature T in F relative to 0C.
P Vessm T ;Enthalpy in Kcal/kg of superheated steam at pressure P in kPa and temperature T in C relative to 25C P VESSM T ;Enthalpy in Kcal/kg of superheated steam at pressure P in kPa and temperature T in C relative to 0C.
Miscellaneous Value Functions VEPH S ;Estimated pH of stream S. Requires EPH factors in ICOM.
E VEXT S2 ;Extraction of element E from solids between streams S[1] and S[2].
VVIL S ;Estimated viscosity of liquid in stream S, no solids correction.
VVIS S ;Estimated viscosity of a slurry streams S.
W VWAS S ;Wash ratio of liquor in stream W to solids in stream S.
VAHP H ;Available motor horsepower equal to or larger than H.
VTHP ;Calculates the total installed horsepower for the entire flowsheet.
VTKW ;Calculates the total kilowatt power draw for the entire flowsheet.
Heat Content Value Functions (experimental) VBTU S ;Estimated BTU value for coal stream S.
VBPP S ;Value of heat content of stream S in Btu/pound.
C VCHC S ;Heat content of components C in stream S in kilocalories/hour.
T VSCP S ;Heat capacity Cp of stream S at temperature T, in kilocalories/kilogram/C
C VCCP S ;Cp of components C in stream S at current stream temperature kcal/kg/C
Chemical Reaction Value FunctionsU VHTR R ;Heat of reaction in kcal/hr for reaction R in unit operation U. Note: U and R references are 'not' updated with changes.
Special Value Functions
E VEQN X ;Value of equation number E solved with parameters X. (experimental)
VSET X ;Execute expression X to set flowrate. Format: VSET 'VLPS s10=123'
VCTL N ;Value of output variable from Controller N
V VFLS U ;Returns value of variable V from unit operation U. Format: 'RM' VFLS
VHRD S ;Value of water hardness of stream S in ppm calcium carbonate
VLAB S ;Returns the short label for stream S.
VSNM S ;Returns the long label for stream S.
Heap Leach Value Functions
1 VHLG ib ;Returns list of blocks with same block identification as block ib
2 VHLG ib ;Returns list of blocks in column containing block ib
3 VHLG ib ;Returns list of blocks in cell containing block ib
4 VHLG ib ;Returns list of blocks in column of cell containing block ib
5 VHLG ib ;Returns list of blocks in level containing block ib
6 VHLG ib ;Returns list of blocks in column of level containing block ib
7 VHLG ib ;Returns list of blocks in heap containing block ib
VHEP B ;Places data from HEP into STR in an unused stream number and returns the stream number, used in conjunction with other value functions. e.g. C VGPL VHEP 3 VHLG ib Returns the grams per liter of component C in all of the blocks in the cell containing block ib
VHEP0 B ;Places data from HEP0 into STR in an unused stream number and returns the stream number, used in conjunction with other value functions.
METSIM Function Subroutines
The following subroutines perform certain mathematical, editing and process functions on data scalars, vectors, and matrices. They are programming tools used to assist in the rapid development of other subroutines.
They are used in one of the following forms, depending on the arguments needed and the results returned, if any.
FXXX
FXXX
Rarg
Result =
FXXX
Rarg
LargFXXX
Rarg
Result =LargFXX
Rarg
These programs may be chained together to form complex expressions. For example, to calculate the average of the positive values of X,
AverageFAVEFPOSX
Note:In APL coding the = is replaced by the APL left arrow
FASTAlphabetic sort
LargNone
RargCharacter matrix
ResultSorted character matrix
FAVENumeric average
LargNone
RargNumeric vector
ResultNumerical average
FCENTemperature conversion to degrees Celsius
LargNone
RargTemperatures in degrees Fahrenheit
ResultTemperature in degrees Celsius
FCHCComponent heat content
LargStream number
RargComponent numbers
ResultHeat content of components in kcal/hour
FCOLCreate column matrix
LargNone
Rargnumeric of character vector of length n
ResultNumeric of character matrix of dimensions n x 1
FDEFDefault values
LargNumeric vector A
RargNumeric vector B
ResultNumeric vector A with zero plus values replaced by corresponding values of B
FDIFDifference between elements of vector or matrix
LargNone
RargNumeric vector or matrix of dimensions n or (m x n)
ResultNumeric vector or matrix of dimensions (n-1) or (m x (n-1)) containing the difference between adjacent values
FELEElement weight fraction of specified elements E in components C in streams S, (a vector of stream numbers defined before calling FELE)
LargVector of element numbers
RargVector of component numbers
ResultMatrix of elemental weight fractions
FEPMCalculate EP separation factors
LargEP value for gravity separation efficiency
RargSG, specific gravity of separation
ResultSeparation factors for each specific gravity fraction
FEWTElemental flowrate of specified elements E in components C in stream S, (S is a scalar or vector of stream numbers defined before calling FEWT)
LargVector of element numbers
RargVector of component numbers
ResultMatrix of elemental mass flowrates in user units
FFARTemperature conversion to degrees Fahrenheit
LargNone
RargTemperature in degrees Celsius
ResultTemperature in degrees Fahrenheit
FFLAAdiabatic flash of water in stream S1
LargNone
RargNone
ResultSix-element vector containing the temperature, pressure, liquid fraction, vapor pressure, vapor fraction, and partial pressure of water in stream S1
FGWAGet washability data
LargNone
RargVector of stream numbers
ResultMatrix containing the washability data for the specified streams
FHTGFree energy of formation components
LargVector of component numbers
RargTemperature in degrees Kelvin
ResultFree energy of formation of specified components at specified temperature in kcal/kg-mole
FINTInterpolation of data array
LargScalar or vector of independent values
RargMatrix M with independent variable in first column
ResultDependent values, scalar if Larg is scalar and matrix M is (n x 2) vector if Larg is a vector and matrix M is (n x m) matrix if Larg is a vector and matrix M is (n x m)
FMCLMultiply matrix by columns
LargNumeric matrix M of dimensions (n x m)
RargNumeric matrix M of dimensions (n x m)
ResultNumeric matrix where each column of matrix M is multiplied by the corresponding element of vector V
FMRWMultiply matrix by rows
LargNumeric vector V of length n
RargNumeric matrix M of dimensions (n x m)
ResultNumeric matrix where each row of matrix M is multiplied by the corresponding element of vector V
FMULMultiply stream data by a constant factor. Used to adjust stream flowrates
LargVector of stream numbers
RargScalar factor for scaling selected streams
ResultNone
FNEGNegative numbers from a numeric vector
LargNone
RargNumeric vector V
ResultNumeric vector containing only the negative values of V
FNSTNumeric sort into ascending order
LargNone
RargNumeric vector
ResultNumeric vector sorted in ascending order
FNZRNone zero values
LargNone
RargNumeric vector V
ResultNumeric vector containing only the non-zero values of V
FPCPScreen analysis percent (weight fraction) passing
LargNone
RargVector of mass flowrates for all mesh sizes
ResultVector of weight fraction passing each mesh size
FPCRScreen analysis percent (weight fraction) retained
LargNone
RargVector of cumulative fraction passing each mesh size
ResultVector of with fraction retained on each mesh size
FPOSPositive values
LargNone
RargNumeric vector V
ResultNumeric vector containing only the positive values of V
FPWAStore washability data, used to pack data
LargStream number of washability data
RargWashability of data of single stream
ResultNone
FRNDRound off data to nearest integer
LargNone
RargScalar, vector or matrix of numeric values
ResultScalar, vector or matrix of nearest integers
FSHCCalculate stream heat content from stream temperature
LargNone
RargVector of stream numbers
ResultNone
FSRTSort numeric matrix, preserve rows
LargColumn for sorting
RargMatrix to be sorted
ResultSorted matrix
FSSACalculates, for selected streams, the screen size analysis in SSA from the inorganic solids S1 in STR and the weighted screen size analysis in SSA, used to guarantee consistency between arrays in STR and SSA
LargNone
RargVector of stream numbers
ResultNone
FSSESet streams in equal composition and size analysis, used to define one stream in terms of another
LargNone
RargDestination stream number, factor, source stream number
ResultNone
FSTMConverts character string to character matrix
LargNone
RargBreak character, character string
ResultCharacter matrix
FSUBSubtract one string from another, A = A B
LargStream number A
RargStream number B
ResultNone
FTDAconvert to two-dimensional array, converts a scalar or vector into a matrix
LargNone
RargScalar, vector or matrix of dimension n, or (m x n)
ResultTwo-dimensional matrix of dimension (1 x n) or (m x n)
FTEMCalculate stream temperature from stream heat content
LargNone
RargVector of streams
ResultNone
FVPRVapor pressure of water at specified temperature
LargNone
RargTemperature in degrees Celsius
ResultVapor pressure of water in mm Hg at given temperature
FWPAWeight percent (fraction) of an array. Calculates weight fraction of each row in a matrix
LargNone
RargNumeric matrix
ResultNumeric matrix of weight fractions
FWPCWeight percent (fraction) of a vector
LargNone
RargNumeric vector
ResultNumeric vector of weight fractions
FZDVZero divide trap, replaces zeroes, 0 with ones, 1. Used on divisor to prevent domain error in division operations. Programmers must verify that operation gives valid results
LargNone
RargNumeric scalar, vector or matrix
ResultNumeric scalar, vector or matrix with 1s replacing 0s
FZERSet stream data to zero
LargNone
RargVector of streams numbers to be zeroed
ResultNone
Component GroupsPhase VariablePhase NumberTypes of components
Solid Components SCIncludes SI & SO
Solid Inorganic SI1Minerals, Salts
Solid Organic SO2Coal, Resin, Carbon
Fluid Components FCIncludes LC & GC
Liquid ComponentsLCIncludes LI, LO, M1, M2 & M3
Liquids InorganicLI3Water, Acids, Dissolved Salts
Liquid OrganicLO4Fuel, Kerosene, Organics
Molten 1M15Molten Metals, Speiss
Molten 2M26Molten Sulfides, Halides
Molten 3 M37Molten Oxides, Slags
Gaseous components GC8Air, Gaseous, Metal Vapors
Ratio Control Using FRC
Stream 2 is defined already in the model and we want to determine the flowrate of stream 1 as a percentage of the total output stream 3. For the following example stream 1 is 15% of stream 3, base on the normal volumetric flow rate.
The left hand side of the expression will constitute the value function in the flow rate controller (FRC), while the right hand side will be the set point.
_1277532553.unknown
_1277532612.unknown