METSIM Value Functions

METSIM Value Functions & Other Information Density and Specific Gravity Value Functions P VKM3 S ;Density of phase P i

Views 130 Downloads 3 File size 1MB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

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 Time C 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 Time P 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 Functions E 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 Functions C 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 and

;Enthalpy in BTU/lb and Kcal/kg mole of superheated steam at pressure P in psi temperature T in °F relative to 25°C.

P VMSS T and

;Enthalpy in BTU/lb and Kcal/kg mole of superheated steam at pressure P in kPa temperature T in °C relative to 25°C

P Vesse T ;Enthalpy in BTU/lb of superheated steam at pressure P in psi and temperature T in °F relative to 25°C P VESSE T ;Enthalpy in BTU/lb of superheated steam at pressure P in PSI and temperature T in °F relative to 0°C. P Vessm T ;Enthalpy in Kcal/kg of superheated steam at pressure P in kPa and temperature T in °C relative to 25°C P VESSM T ;Enthalpy in Kcal/kg of superheated steam at pressure P in kPa and temperature T in °C relative to 0°C.

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 Functions U VHTR R references

;Heat of reaction in kcal/hr for reaction R in unit operation U. Note: U and R 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 stream

;Places data from HEP into STR in an unused stream number and returns the 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

FXXX

Rarg

Larg

FXXX

Rarg

Larg

FXX

Rarg

Result =

Result =

These programs may be chained together to form complex expressions. calculate the average of the positive values of X, Average

FAVE FPOS X

Note: In APL coding the ‘=’ is replaced by the APL left arrow ¬

For example, to

FAST Alphabetic sort Larg

None

Rarg

Character matrix

Result Sorted character matrix FAVE Numeric average Larg

None

Rarg

Numeric vector

Result Numerical average FCEN Temperature conversion to degrees Celsius Larg

None

Rarg

Temperatures in degrees Fahrenheit

Result Temperature in degrees Celsius FCHC Component heat content Larg

Stream number

Rarg

Component numbers

Result Heat content of components in kcal/hour FCOL Create column matrix Larg

None

Rarg

numeric of character vector of length n

Result Numeric of character matrix of dimensions n x 1 FDEF Default values Larg

Numeric vector A

Rarg

Numeric vector B

Result Numeric vector A with zero plus values replaced by corresponding values of B FDIF

Difference between elements of vector or matrix Larg

None

Rarg

Numeric vector or matrix of dimensions n or (m x n)

Result Numeric vector or matrix of dimensions (n-1) or (m x (n-1)) containing the difference between adjacent values

FELE Element weight fraction of specified elements E in components C in streams S, (a vector of stream numbers defined before calling FELE) Larg

Vector of element numbers

Rarg

Vector of component numbers

Result Matrix of elemental weight fractions FEPM Calculate EP separation factors Larg

EP value for gravity separation efficiency

Rarg

SG, specific gravity of separation

Result Separation factors for each specific gravity fraction FEWT Elemental flowrate of specified elements E in components C in stream S, (S is a scalar or vector of stream numbers defined before calling FEWT) Larg

Vector of element numbers

Rarg

Vector of component numbers

Result Matrix of elemental mass flowrates in user units FFAR Temperature conversion to degrees Fahrenheit Larg

None

Rarg

Temperature in degrees Celsius

Result Temperature in degrees Fahrenheit FFLA Adiabatic flash of water in stream S1 Larg

None

Rarg

None

Result Six-element vector containing the temperature, pressure, liquid fraction, vapor pressure, vapor fraction, and partial pressure of water in stream S1 FGWA Get washability data Larg

None

Rarg

Vector of stream numbers

Result Matrix containing the washability data for the specified streams FHTG Free energy of formation components Larg

Vector of component numbers

Rarg

Temperature in degrees Kelvin

Result Free energy of formation of specified components at specified temperature in kcal/kg-mole

FINT

Interpolation of data array Larg

Scalar or vector of independent values

Rarg

Matrix M with independent variable in first column

Result Dependent 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) FMCL Multiply matrix by columns Larg

Numeric matrix M of dimensions (n x m)

Rarg

Numeric matrix M of dimensions (n x m)

Result Numeric matrix where each column of matrix M is multiplied by the corresponding element of vector V FMRW Multiply matrix by rows Larg

Numeric vector V of length n

Rarg

Numeric matrix M of dimensions (n x m)

Result Numeric matrix where each row of matrix M is multiplied by the corresponding element of vector V FMUL Multiply stream data by a constant factor. Used to adjust stream flowrates Larg

Vector of stream numbers

Rarg

Scalar factor for scaling selected streams

Result None FNEG Negative numbers from a numeric vector Larg

None

Rarg

Numeric vector V

Result Numeric vector containing only the negative values of V FNST Numeric sort into ascending order Larg

None

Rarg

Numeric vector

Result Numeric vector sorted in ascending order FNZR None zero values Larg

None

Rarg

Numeric vector V

Result Numeric vector containing only the non-zero values of V

FPCP Screen analysis percent (weight fraction) passing Larg

None

Rarg

Vector of mass flowrates for all mesh sizes

Result Vector of weight fraction passing each mesh size FPCR Screen analysis percent (weight fraction) retained Larg

None

Rarg

Vector of cumulative fraction passing each mesh size

Result Vector of with fraction retained on each mesh size FPOS Positive values Larg

None

Rarg

Numeric vector V

Result Numeric vector containing only the positive values of V FPWA Store washability data, used to pack data Larg

Stream number of washability data

Rarg

Washability of data of single stream

Result None FRND Round off data to nearest integer Larg

None

Rarg

Scalar, vector or matrix of numeric values

Result Scalar, vector or matrix of nearest integers FSHC Calculate stream heat content from stream temperature Larg

None

Rarg

Vector of stream numbers

Result None FSRT Sort numeric matrix, preserve rows Larg

Column for sorting

Rarg

Matrix to be sorted

Result Sorted matrix

FSSA Calculates, 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 Larg

None

Rarg

Vector of stream numbers

Result None FSSE Set streams in equal composition and size analysis, used to define one stream in terms of another Larg

None

Rarg

Destination stream number, factor, source stream number

Result None FSTM Converts character string to character matrix Larg

None

Rarg

Break character, character string

Result Character matrix FSUB Subtract one string from another, A = A – B Larg

Stream number A

Rarg

Stream number B

Result None FTDA convert to two-dimensional array, converts a scalar or vector into a matrix Larg

None

Rarg

Scalar, vector or matrix of dimension n, or (m x n)

Result Two-dimensional matrix of dimension (1 x n) or (m x n) FTEM Calculate stream temperature from stream heat content Larg

None

Rarg

Vector of streams

Result None FVPR Vapor pressure of water at specified temperature Larg

None

Rarg

Temperature in degrees Celsius

Result Vapor pressure of water in mm Hg at given temperature

FWPA Weight percent (fraction) of an array. Calculates weight fraction of each row in a matrix Larg

None

Rarg

Numeric matrix

Result Numeric matrix of weight fractions FWPC Weight percent (fraction) of a vector Larg

None

Rarg

Numeric vector

Result Numeric vector of weight fractions FZDV Zero 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 Larg

None

Rarg

Numeric scalar, vector or matrix

Result Numeric scalar, vector or matrix with 1’s replacing 0’s FZER Set stream data to zero Larg

None

Rarg

Vector of streams numbers to be zeroed

Result None

Component Groups

Phase Variable

Phase Number

Types of components

Solid Components

SC

Includes SI & SO

Solid Inorganic

SI

1

Minerals, Salts

Solid Organic

SO

2

Coal, Resin, Carbon

Fluid Components

FC

Includes LC & GC

Liquid Components

LC

Includes LI, LO, M1, M2 & M3

Liquids Inorganic

LI

3

Water, Acids, Dissolved Salts

Liquid Organic

LO

4

Fuel, Kerosene, Organics

Molten 1

M1

5

Molten Metals, Speiss

Molten 2

M2

6

Molten Sulfides, Halides

Molten 3

M3

7

Molten Oxides, Slags

Gaseous components

GC

8

Air, 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.

x → Nm 3 / h of stream 1 y → Nm 3 / h of stream 2 z → Nm 3 / h of stream 3

x = 0.15 z x = 0.15( x + y ) x − 0.15 x = 0.15 y x(1 − 0.15) = 0.15 y x 0.15 = y 1 − 0.15

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.