METSIM
METSIM
®
®
For Windows
For Windows
The World’s Premier PC Simulation Package
The World’s Premier PC Simulation Package
for complex Metallurgical & Chemical Engineering Processes.
for complex Metallurgical & Chemical Engineering Processes.
BROCHURE CONTENTS
BROCHURE CONTENTS
-- InIntrtrododucuctitionon ...33
-- ModeModel Planl Planninningg...55
-- Model Model Flowsheet Flowsheet Development Development & & Key Key DefinitionsDefinitions...66
-- Files & DireFiles & Directoriesctories ...77
-- CoCompmpononenentsts...88
-- Drop Drop Down Down MenusMenus...99
-- Unit OperatiUnit Operations Overview ons Overview & Overview o& Overview of Some Generif Some Generic Unit Operac Unit Operationstions...1122
-- Unit OperationUnit Operations - s - GeneralGeneral, Mining, , Mining, MateriMaterials Handling & als Handling & ComminutComminutionion...1313
-- Unit Unit OperationOperations - s - BenefiticiBenefiticiation, ation, HydrometalHydrometallurgy, lurgy, PryometallPryometallurgy & urgy & Gas Gas HandlingHandling...1515
-
- Dynamic Simulation Unit Operations & Dynamic Simulation Unit Operations & Costing ModuleCosting Module...1155
-- OperOperatinating g CosCost t RepReportort...1166
-- StrStreaeam Datm Dataa...1177
-- ReReacactitiononss...2200
-- ProcProcess ess ConControtrolsls ...2211
-- METSMETSIM IM MechMechanianicscs ...2233
-- APAPLL...2244
-- Value Value FuncFunctiontions s OverOverviewview ...2255
-- ValuValue e FunFunctictionsons...2266
-- METMETSIM SIM FloFlowshwsheeteetss...3311
Mr Kevin Charlesworth, Director Mr Kevin Charlesworth, Director Kevin Charlesworth Consulting Kevin Charlesworth Consulting Australian and Asian
Australian and Asian Agent For
Agent For METSIMMETSIM PO Box 2021 PO Box 2021 Port Macquarie, NSW 2444 Port Macquarie, NSW 2444 Australia Australia Tel & Fax:
Tel & Fax: 612) 6583 3274612) 6583 3274 Email:
Email: [email protected]@ozemail.com.au Web Page
Web Page:: http://members.ozemail.com.au/~ozmetsim/http://members.ozemail.com.au/~ozmetsim/ METSIM
METSIM is Developed by:is Developed by:
PROWARE PROWARE Mr. John Bartlett Mr. John Bartlett Tel: Tel: (1-520)-299-7834(1-520)-299-7834 Fax: Fax: (1-520)-299-8009(1-520)-299-8009 E-Mail: E-Mail: jt jtbabarrtltletett@[email protected] Homepage:
I n t r o d u c t i o n
I n t r o d u c t i o n
The basis for analysis
The basis for analysis of all chemical and of all chemical and metallurgical processes is metallurgical processes is the mass and the mass and energy balance. energy balance. PlantPlant design, capital costs, and technical evaluations are all dependent on such calculations.
design, capital costs, and technical evaluations are all dependent on such calculations. METSIMMETSIM is is aa general-purpose process simulation system designed to assist the engineer in performing mass and energy general-purpose process simulation system designed to assist the engineer in performing mass and energy balances of complex processes.
balances of complex processes. METSIMMETSIM uses an assortment of computational methods to effect an optimumuses an assortment of computational methods to effect an optimum combination of complexity, user time, and computer resources usage.
combination of complexity, user time, and computer resources usage. METSIM
METSIM originated as a metallurgical process simulation program, written to perform mass balancesoriginated as a metallurgical process simulation program, written to perform mass balances around the major unit operations of complex proc
around the major unit operations of complex process flowsheets. ess flowsheets. Application of the program proved soApplication of the program proved so successful that it was expanded to include detailed heat balances, chemistry, process controls, equipment successful that it was expanded to include detailed heat balances, chemistry, process controls, equipment sizing, cost estima
sizing, cost estimation, and process ation, and process analysis. nalysis. The unique nature of the The unique nature of the programming languagprogramming language, APL,e, APL, allows modification and expansion of the system with minimum effort and permits the incorporation of allows modification and expansion of the system with minimum effort and permits the incorporation of continuing technological innovations in process simulation.
continuing technological innovations in process simulation.
Many diverse processes, including chloride leaching of molybdenum concentrates, hydrochloric acid leaching Many diverse processes, including chloride leaching of molybdenum concentrates, hydrochloric acid leaching of alumina clays, gold cyanidation / precipitation, roasting and flash smelting of copper concentrates, SAG of alumina clays, gold cyanidation / precipitation, roasting and flash smelting of copper concentrates, SAG milling of various ore types, acid and carbonate leaching of uranium and vanadium ores, heavy media coal milling of various ore types, acid and carbonate leaching of uranium and vanadium ores, heavy media coal preparation plants, base metal smelting, and gold and copper heap leaching, have been modeled with preparation plants, base metal smelting, and gold and copper heap leaching, have been modeled with METSIM
METSIM.. METSIM
METSIM can perform mass and energy balance calculations for:can perform mass and energy balance calculations for: 1 . 1 . P rP ro co ce se ss s f ef eaassi bi bi li li ti ty y s ts tu du di ei ess.. 2 . 2 . A lA lt et er nr na ta ti vi ve f le f lo wo wssh eh ee t ee t ev av al ul ua ta ti oi on sn s.. 3 . 3 . P iP il ol ot t ppl al annt dt daatta a eev av allu au atti oi onn.. 4 . 4 . F uF ul l l l s cs ca la le pe pl al an t n t d ed es is ig n g n c ac al cl cu lu la ta ti oi on sn s.. 5 . 5 . O pO pe re ra ta ti ni ng pg pl al an t n t i mi mp rp ro vo ve me me ne nt st st ut ud id ie se s.. 6 . 6 . AAccttuuaal pl pllaannt ot oppeerraattiioonnss.. Some advantages of using
Some advantages of using METSIMMETSIM are:are:
1.
1. ComComputputer er simsimulaulatiotion in is ls lesess cs cosostly tly thathan on operperatiating ng a pa piloilot pt planlant.t. 2
2.. METSIMMETSIM facilities extrapolation and scale-up of process options.facilities extrapolation and scale-up of process options. 3
3.. METSIMMETSIM requires the engineer to develop a detailed understanding of the process and provides arequires the engineer to develop a detailed understanding of the process and provides a format for evaluating process design criteria.
format for evaluating process design criteria. 4
4.. METSIMMETSIM allows evaluation of operating techniques and anticipation of potential problems.allows evaluation of operating techniques and anticipation of potential problems. The complexity of
The complexity of METSIMMETSIM models created is dependent on the purpose of the computer simulation andmodels created is dependent on the purpose of the computer simulation and the ingenuity of the engineer
the ingenuity of the engineer. . It is suggested that users beIt is suggested that users become familiar with the program through the oncome familiar with the program through the on line-help system b
line-help system before attempting to before attempting to build a model. uild a model. Only in this way caOnly in this way can the user take full an the user take full advantage of dvantage of all the unique attributes of the
all the unique attributes of the METSIMMETSIM program. program. This on-line help is This on-line help is organized such organized such that the user isthat the user is first acquainted with the basic components of the system and the procedures to be followed to get the first acquainted with the basic components of the system and the procedures to be followed to get the program running.
program running. It also provides the detaIt also provides the detailed data requirementiled data requirements of the various compones of the various components and thents and the mechanics of entering process model data in the
mechanics of entering process model data in the METSIMMETSIM program.program. METSIM
METSIM provides the power of the largest computers with the complexity of advanced engineeringprovides the power of the largest computers with the complexity of advanced engineering mathematics.
mathematics. METSIMMETSIM was designed to take full advantage of the work space characteristics, interactivewas designed to take full advantage of the work space characteristics, interactive capabilities and functional power of
capabilities and functional power of APL. APL. The need for The need for complicated job control language, file complicated job control language, file handling,handling, text editing, and debugging programs has been eliminated.
METSIM
METSIM performs mass and energy balances for chemical processes using the sequential modular approach.performs mass and energy balances for chemical processes using the sequential modular approach. This method is used because of its elegance and amenability to simplify divers and complex flowsheets. This method is used because of its elegance and amenability to simplify divers and complex flowsheets. METSIM
METSIM can easily be expanded to encompascan easily be expanded to encompass new processes and techniquess new processes and techniques. . A major advantA major advantage of thisage of this approach is that intermediate results may be obtained from any stage of the process in an intelligible approach is that intermediate results may be obtained from any stage of the process in an intelligible form.
form. This This attribute attribute of of METSIMMETSIM is invaluable when attempting to detect possible modeling or specificationis invaluable when attempting to detect possible modeling or specification errors.
errors.
In conformance with the sequential modular approach,
In conformance with the sequential modular approach, METSIMMETSIM comprises modules containing subsetscomprises modules containing subsets of equations describing the design specifications and performance characteristics for each process step. of equations describing the design specifications and performance characteristics for each process step. The system solves the equation subset for each module, allowing for an individual analysis of each unit The system solves the equation subset for each module, allowing for an individual analysis of each unit operation in the flows
operation in the flowsheet. heet. Given data on deGiven data on design variables and sign variables and input stream composinput stream composition, each moduleition, each module calculates all of the output stream variables, which can then be used as input stream values for the next calculates all of the output stream variables, which can then be used as input stream values for the next process step.
process step. The modules access The modules access data on all independent sdata on all independent stream variables from the datream variables from the data arrays containedta arrays contained within the
within the APL global APL global workspace. workspace. Additional input data required to solve Additional input data required to solve the equations in the equations in each moduleeach module are requested by the
are requested by the program and are stored program and are stored as global variables. as global variables. The user may The user may supply actual data obtainedsupply actual data obtained from operating or pilot plants, from similar processes, or from estimates supplied by the engineer.
from operating or pilot plants, from similar processes, or from estimates supplied by the engineer. Unlike several process simulation programs currently in use within the chemical process industry,
Unlike several process simulation programs currently in use within the chemical process industry, METSIMMETSIM eliminates the need for user involvement in recycle stream tearing.
eliminates the need for user involvement in recycle stream tearing. METSIMMETSIM employs a technique wherebyemploys a technique whereby the user is required only to provide initial estimates of the recycle stream content of critical process the user is required only to provide initial estimates of the recycle stream content of critical process streams.
streams. Multiple stream Multiple stream numbers are numbers are not required not required andand METSIMMETSIM determines which streams are to bedetermines which streams are to be torn.
torn. Rapid recycle Rapid recycle stream convergence stream convergence is assured is assured by using by using the Wthe Wegstein convergence egstein convergence accelerator. accelerator. ThisThis technique almost always results in recycle stream convergence in less iteration than the direct substitution technique almost always results in recycle stream convergence in less iteration than the direct substitution method.
method. METSIM
METSIM’s flexibility is further enhanced by the use of feedforward and feedback controllers for process’s flexibility is further enhanced by the use of feedforward and feedback controllers for process adjustment and
adjustment and control. control. Since the Since the dynamic behavior dynamic behavior of of METSIMMETSIM’s controllers is similar to that of process’s controllers is similar to that of process controls in operating plants, unstable control strategies can often be located during the modeling stage, controls in operating plants, unstable control strategies can often be located during the modeling stage, avoiding costly field modification and retrofit.
avoiding costly field modification and retrofit. The successful application of the
The successful application of the METSIMMETSIM system of programs involves more than simply entering fixedsystem of programs involves more than simply entering fixed data on standardized input sheets
data on standardized input sheets. . Due to the wide variation in chemicDue to the wide variation in chemical and mineral processing techniquesal and mineral processing techniques,, available data, process criteria, and output data requirements, the development of process models is as available data, process criteria, and output data requirements, the development of process models is as much an art as it is a science.
much an art as it is a science. METSIMMETSIM is not a panacea for the engineer; it supplements not replaces,is not a panacea for the engineer; it supplements not replaces, sound engineering practices
sound engineering practices and judgment. and judgment. The user must The user must be familiar with be familiar with process engineering mass process engineering mass andand energy balance
energy balance calculations. calculations. Familiarity with mathematical modeling, Familiarity with mathematical modeling, numerical analysis, and numerical analysis, and processprocess control is most helpful when modeling complex processes.
Model Planning
The old adage ‘No one planned to fail. They failed to plan‘, applies to process modeling as any other complex activity. Modeling is not a trivial task. METSIM is a powerful tool, which can easily be abused by not ‘getting it right’ from the beginning. The following sequence is strongly recommended from experience with many flowsheeting projects. Whilst it is recognized that information, especially about new processes, will be incomplete, this sequence should be followed as closely as possible. Due to the wide variation in metallurgical and chemical processes, purposes of models, and availability of data, individual judgement must be made as to the amount of time and detail given to each step.
1 Assemble all available information before beginning.
2 Sketch a process flowsheet with all unit operations and streams present. 3 Make a list of all phases present and list all components in each phase. 4 Load METSIM, Initialize the model to zero all data.
5 Use the 'Model Parameters' Task Bar Button to set the major switches and select the units of mass and time.
6 Select the components from the database ‘DBAS Component Database‘ and edit component data ‘ICOM Edit Components‘.
7 Select appropriate METSIM unit operation modules listed under the screen object buttons, and compile the data required to execute each.
8 Write out chemical components and reactions in each unit operation.
9 Build the flowsheet using the Screen Interface palette entering all unit operations and streams section by section.
1 0 Add unit operation data, equipment sizes, and separation parameters, and add unit operation chemistry and heat balance data.
1 1 Provide precise flowrates and compositions for all input and estimates for recycle streams. 1 2 Enter stream names and input stream flowrates and composition.
1 3 Calculate flowsheet and check results to verify input and mechanisms, and debug the model. 1 4 Add process controls to adjust parameters to meet design criteria.
1 5 Add detailed algorithms, minor streams, and trace elements to completion. 1 6 Execute main calculation program and debug the model.
1 7 Generate the required output reports.
Model Flowsheet Development
The developed flowsheet should be as complete as available data permit and structured to produce levels of accuracy desired in the final results. Input data can be readily revised as the flowsheet evolves from general to detailed, but it is desirable to make allowances for the addition of flowstreams and unit operations as complexity increases. One should examine the flowsheet carefully for omission of any streams. All mass entering or leaving the process must be associated with a process stream. Typical omissions included pump gland water, evaporative losses, open tank off gases, and infiltration air. These types of flows are often omitted in general process evaluations but should be included in detailed design calculations.
METSIM unit operation modules should be defined at each point where one or more of the following conditions exist.
1 One or more streams join to form a new stream. 2 One or more streams split into two or more streams.
3 One or more streams undergo a chemical reaction, phase change, temperature change, particle size change, or any physical changes resulting in the formation of a new stream of different chemical or physical properties.
The user need not be concerned with the precise nature of the unit operation module at this time. Generally unit operations are numbered sequentially following the path of process flow. METSIM allows addition of unit operations through the screen interface and changes in the sequences of calculations through the routine ‘ IFLS Use "ONLY" to Rearrange Flowsheet “. Unit operations and their data are renumbered automatically.
Unit operations modules forming recycle loops should be listed consecutively. Flowsheets having multiple and / or nested recycle operations complicate application of this guideline; however, experience gained through repeated use of the system will enable the user to assign unit operation numbers to maximize system efficiently.
Key Definitions
To prevent misunderstanding and confusion the following key definition should be noted: COMPONENTS - mass balance entities such as molecular compounds, pure elements, pseudo compounds, ions, etc.
PHASES - groups of components, which do not physically mix. STREAMS - material flows of components between unit operations.
UNIT OPERATIONS - process units where streams merge, interact and separate. MODULES - unit operation programs or groups of programs.
MODELS - process flowsheets composed of unit operations and streams. CONTROLLERS - programs, which adjust variables to meet process criteria. MASS BALANCE - calculated or simulated flows into and out of a process.
Files and Directories
When METSIM is installed, a METSIM directory is created containing the following files and subdirectories.
METSIM DIRECTORY F il e T ype Description
I n st al l L OG File l og of selecti ons and installation M ET SI M Adf APL Definition File
M E T SI M A pp li ca ti on A PL r un ti me ME TS IM pr og ra m M ET SI M Help Fil e All METSIM online HELP
M ET SI M I con METSIM screen icons
M ET SI M W 3 METSIM APL Program files Unit s Application Uninstall program for METSIM U nw is e A pp li ca ti on U ni ns ta ll pr og ra m f or Wi se METSIM DIRECTORY SUBDIRECTORIES
DBF contains about 100 thermodynamic database files as METDBxx.SF, where xx is the element symbol. Components are stored in file with the highest element number first.
F nc User Created APL Calculation Routines I co ns contains all METSIM screen objects Icons M E T contai ns the fol lowing MET SI M operat ing fil es: Metmacw.sfw File containing Licensee configuration Mettab.sf File containing METSIM tabulated data Metwini.sf METSIM windows initiation file
S tem p METSIM Security Device files and programs MEX contains the following examples of flowsheet models: MWXAP Sulphuric Acid Plant
MWXCC SAG Mill/Ball Mill Comminution with Costing MWXUCIP CIP/CIL Unit Operation
MWXCuHL Copper Heap Leach
MWXDPS Dynamic Pierce Smith Converter
M WX DT NK Dy nam ic Tank wi th X CE L DD E E xc ha ng e MWXFC Lead/Zinc Flotation
MWXFF Flash Furnace Smelting
MWXHYL Direct Iron Ore Reduction using HYL Process MWXNG Natural Gas Burner FEM
MWXpHCTL pH Control Demonstration MWXSMLT Smelter with Sections
MWXSXEW So lve nt E xt ract io n and E letr owi nni ng MWXAUT Autoclave
S t e m p Contains APL Windows 95, 98 and NT subdir ect ories, and ap plicatio n S file set up XXX additi onal sub- director ies can be created to st ore model files in. T he poi nter to the
model sub-directory may be changed to any directory on any drive. It should be noted that these sub-directories should not have further sub-directories, or the file handling will indicate an error.
C o m p o n e n t s
METSIM carries out mass balance calculations by tracking material flows, which are made up of a mixture of components. These are the chemical species, such as pure chemicals, minerals or elements, and can exist in one or more of eight phases. The phases are identified by their phase number. Prior to using any of the component input routines, first prepare a comprehensive list of the components, which it is anticipated will appear in the flowsheet. Components are assigned to the phases in which they are present.
The phases are:
C o m p o n e n t P h a s e P h a s e
Groups Variable 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
Components can be entered into a flowsheet model through one of three methods: -1 - METSIM Database stored in the METSIM DBF sub-directory.
Using the routine ‘ DBAS Component Database ‘
2 - User Database, stored in the file METDBUS.SF in the DBF sub-directory. This file is automatically loaded with the METSIM database. The file is created and edited via the routine ‘IUSR Edit User Database ‘.
3 – Created directly through the component input/edit routine ‘ ICOM Edit Components’.
The process model components are saved with the model in the model storage file Filename.sfw, and automatically reloaded when the model file is re-loaded into the workspace. This ensures continuity of d a t a .
Model components can be saved into the User Database file using the routine ‘ IUS2 Add Model Comp to database’.
Drop Down Menus
The following drop down menus are located along the top of the screen and contain programs used to create, build, develop, analyze and save flowsheet models i.e.:
F i l e s Handling files i.e. saving and retrieving Models
S e t u p Flowsheet palette setup parameters for fonts, colors and objects
I n p u t Definition of flowsheet parameters, case, flow matrix, stream qualities and controls C o m p o n e n t s Selection and definition of flowsheet components
Weather Input, calculation plotting and output routines for weather patterns for heap leach and solar evaporation flowsheets data
H e a p All Routines associated with Heap Leach Option -Input, parameter definition, checking, calculation and outputs.
M e r g e Routines for merging models and model sections C a l c Menu for calculating and checking routines D i s p l a y Standard and Custom display routines
C o s t s Input and output operating cost data routines G r a p h i c s Graphics setup and output routines
E q u i p L i s t Design, Editing and Output of Equipment Lists and Equipment Specifications O u t p u t Standard output reports
Tools Miscellaneous programs for developing user objects, flowsheet evaluation, and saving and comparing flowsheet data.
N e w Menu for New Program Features
New Model - used to clear and initialize the METSIM workspace ready to build a model. On activation it requests the user to confirm replacement of the existing model in memory.
Load Model - used to loading an existing flowsheet model file On activation it requests the user to confirm replacement of the existing model in memory.
Save Model – used to save a flowsheet model directly to file. On activation it overwrites the old file data with that in memory.
Print Flowsheet – used to print either the full flowsheet or selected sections.
Model Parameters – used to set flowsheet site, case, calculation setup and calculation limit parameters. Error Checking – used to check out a flowsheet model immediately it has been loaded into the
workspace. The routine checks for: Stream errors.
Enlarge Drawing Size – enlarge the palette area, to expand the flowsheet
Reduce Drawing Size – reduce palette area, to fit the flowsheet into a smaller area. Draw Flowsheet – to redraw or refresh the current flowsheet section.
Box Item To Move – used to box flowsheet areas which can be moved separately Moves flowsheet drawing up the page.
Moves flowsheet drawing down the page.
Moves flowsheet drawing to the right on the page. Moves flowsheet drawing to the left on the page.
Zoom In – used as an editing tool to enlarge the flowsheet. Zoom Out used as an editing tool to reduce the flowsheet. Center Flowsheet – to re-center the flowsheet on the screen. Locate Stream – used to locate model streams.
Renumber a Stream – used to renumber a stream in the flowsheet.
Renumber Controls on this Page – used to renumber controllers in the current section. Delete object – used to delete objects from the palette area.
Reverse Unit Op – used to reverse unit operation icons around the vertical axis Change Object size – used to change the unit operation icon size.
Move object – used to move screen objects i.e. Stream routes, unit operation icons, controllers icons. Move Text – used to move unit operation text descriptions on the screens.
Copy Object Data – used to copy data from one object to another.
Edit Object Data – used to edit data in unit operations, streams and controller data. Weather Data – used to enter daily or monthly weather data
Contours - for use with the Heap Leaching Module. Select Section – used to change between sections.
Follow Connecting Stream – used to check on flowsheet connections. Page Up – used to page up through the sections of the flowsheet. Page Down – used to page down through the sections of the flowsheet.
Calculate one unit operation – on activation any selected unit operation can be calculated.
Calculate Current Section – on activation all unit operations in the current section will be calculated. Stop Execution - On activation will immediately stop flowsheet calculations. Used to abort calculations as determined by the user.
Calculate Unit Operation Range – used to repeat calculations over the range determined by the user through SCAL.
Calculate All Unit Operations – used to calculate the full flowsheet from any section. Useful for situations where the user may wish to observe flowsheet changes during simulation.
Elements - used to display/select elements in the flowsheet.
Components - used to display/select components in the flowsheet. Phases - used to display/select the phases in the current section. Streams - used to display/select the streams in the current section.
Unit Operations - used to display the unit operations in the current section. Instrumentation/Controlls - Used to display the instrumentation/controlls. APL Keyboard - gives access to the APL Keyboard.
Maths Functions - Under development.
Value Functions - used to display/select Value Functions.
User Created Objects - used to display the list of User Created Objects.
Check Elemental Balance – used to calculate and display the section elemental balance.
Display Value Function for Streams - used to create and select value functions to replace stream number on the flowsheet screen.
Display Section Spreadsheet - used to display data for all streams in the current section according to the selections made via the DSDO Spreadsheet Items Standard, and DCSI Spreadsheet Items Custom routines located in the Display drop down menu.
Plot Screen Analysis - used to plot screen analysis data for and selected stream(s). Plot Dynamic Data - used to plot screen analysis data for and selected stream(s).
Display Instrument Spreadsheet - used to display a spreadsheet of Instrumentation Controls on current section.
Lock Model for Security – used to setup model security options
DDE - used to display the list of DDE, Dynamic Data Exchange, links. Tools Help - Under development.
Unit Operations Overview
The basic calculation philosophy used in METSIM is to take the feed streams to a unit operation module and have a mechanism to handle the inputs and to output according to the module.
Most unit operation modules mix the feed streams then the mechanism is applied. That mechanism can be preceded by chemical reactions or a phase change and if the result required is not achieved then the mechanism or chemical reaction can be changed or a control applied as a feed forward or feedback loop. It is possible therefore because of the structure of the program, to add chemistry to any unit operation and then add controls to simulate any type of reactor without having a specific reactor model.
The calculation sequence for a typical unit operation is according to the following procedure: - Retrieve unit operation data
- ad d al l i npu t st re ams com po nen t f lo ws - calculate reactions
- c al cu la te un it op er at io n m ec ha ni sm s/ ro ut in es
- separate the output streams according to the unit operation parameters - save unit operation parameter data
If an output stream parameter is to be controlled, a feedback controller must be added to sample the output and adjust an input stream, a reaction extent or another unit operation parameter to achieve the desired results.
Logic, PID, flowrate, Feedforward and density controllers may be used to adjust streams and parameters prior to calling the unit operation module.
Overview of some Generic Unit Operations
METSIM was originally developed to calculate mass and energy balances around any type of flowsheet in a timely manner. To facilitate this task several generic unit operation modules were used. Chemistry and heat balance data may be added to any of these units. They are:
S E C - Section used to add sections to a flowsheet. S T R - Stream used to add streams to a flowsheet
RC Y - Recycled Stream Links is used to facilitate convergence of multiple recycle streams in flowsheets. MIX - Stream Mixer mixes all of the input streams and has a single output stream. Can be used to simulate tanks, sumps, bins, mills, reactors, pumps and conveyors.
S L S - Solid/Liquid Separator simulates solid/liquid separations classifiers, thickeners, filters, ponds S U B - Stream Distributor allows streams to be closed for water balance, Controlled at different flowrates and totaled as for reagents.
S P C - Component Splitter allows components to be split differently in output streams. Can be used to simulate flotation cells, gravity concentrators and recovery plants.
Phase Splitter allows phases to be split differently in output streams. Can be used to simulate solvent extraction, CIP/CIL and furnaces.
GENERAL Unit Operations Section
S t r e a m
Recycle Stream Links Stream Mixer Sloid/Liquid Separator Stream Distributor Component Splitter Phase Splitter Stream Splitter S u m p L a u n d e r Pump, Centrifugal
Pump, Positive Displacement Pump, Verticle Pump, Metering Pump, Sump Pump, Vacuum Pipe Pipe Connection Pipe Header
Tank - agitated tank with internal coils for heating or cooling Tank - agitated tank with external jackets for heating or cooling Tank - agitated storage tank
Tank - with internal coils for heating or cooling Tank - with external jackets for heating or cooling Tank - simulates a storage tank
Tank - decant tank for separating organic from aqueous Tank - electrolyte or compartmented tank
Tank - process tank with agitation
Tank - storage tank without agitation or heating MINING Unit Operations
ORE from mine ORE Tonnes & Grade Shovel
Front End Loader Haul Truck Truck, Container Truck, Tanker T r a i n Dredge Clam Shell Barge Ship, Container Ship, Tanker
MATERIALS HANDLING Unit Operations Stockpile, Blended
Stockpile, by the LIFO, FIFO or MIXO method Stockpile, Reclaim
Static Screen Bin Screen Grizzly, Static Screen Grizzly, Vibrating Chute/Hopper
Bin Silo Hopper
Chute, Drop Box Splitter, Flop Gate Conveyor, Belt
Conveyor, Chain/Drag
Conveyor, Bucket Elevator Conveyor, Apron Feeder Conveyor, Pneumatic Conveyor, Reclaim Conveyor, Screw Conveyor, Stacker Conveyor, Transfer Agglomerator
Heap Leach Column Heap Leach Test Heap Heap Dump
Heap Leach
Heap Leach Extension Heap Leach Drainage COMMINUTION Unit Operations
Crusher, Cone Crusher, Gyratory Crusher, Impact Crusher, Jaw Crusher, MMD Sizer Crusher, Roll
High Pressure Grinding Screen, DMS/Banana Screen, Derrick Screen, Vibrating Screen, Trommel Mill, SAG Mill, Rod Mill, Ball Mill, Roller Rock Scrubber Hydrocyclone Classifer, Screw Classifer, Hydro Classifer Centrifuge, Decantor Centrifuge, Separator Compactor
BENEFITICATION Unit Operations Flotation, Column
Flotation, Jameson Cell Flotation, Cell
Gravity Separator, Cone Gravity Separator, Jig Gravity Separator, Mosley Gravity Separator, Spiral Gravity Separator, Table Gravity Separator, General Dry Magnetic Separator Wet Magnetic Separator
Coal Spiral
Dense Media, Bath Dense Media, Cyclone Dense Media, Drum Dense Media, Sump Dense Media, General Dense Media, Screen Dense Media, Vessel Screen Desliming Water Only Cyclone
HYDROMETALLURGY Unit Operations CIP/CIL
Column, Acitvated Carbon Column, Ion Exchange Absorption Column
Hydrochloric Acid Stripper/Absorber Equilibrium stage
Solvent Extraction
Solvent Extraction, Reverse Solvent Extraction, Column Eectrolytic Cell
Eectrolytic Cell, Membrane Electro Refining Cell
Electrowinning Cell Filter, Belt, CCW Filter, Belt, Parallel
Filter, Cartridge Filter, Drum Filter, Leaf
Filter, Dual Media Filter, Pressure Filter, Larox Thickener, Rake
Countercurrent Washing Water Spray
Pond, Solar Evaporation Pond, Storage
Pond, Tailings Crystallizer
Crystallizer, Vaporizer
Crystallizer, Draft Tube Baffle PYROMETALLURGY Unit Operations
Autoclave
Flash Separator Heater, Direct
Free Energy Reactor B u r n e r
Fluid Bed Roaster Packed Bed Reactor Rotary Dryer, Direct Rotary Dryer, Indirect Furnace, Kiln
Furnace, Electric Furnace, Inco Flash
Furnace, Top Submerged Lance Furnace, Outokumpu
Furnace, Settler Furnace, Uptake Furnace, Noranda Furnace, El Teniente Furnace, Slag Cleaning Furnace, Reverabatory Furnace, Pierce Smith Furnace, Hood
Furnace, Anode Ladles, Slag Pots Wheel, Casting HYL Bottom HYL Top
GAS HANDLING - STEAM Unit Operations Absorber
Acid Plant Converter Spray Cooler
Baghouse
Dust Cleaning Cyclone Dust Collecting Cyclone Electrostatic Precipitator Dust, Collection Point Venturi Scrubber Wet Scrubber Blower F a n Flue/Stack Gas Compressor Gas Turbine Joule-Thomson Valve Heat Exchanger
Heat Exchanger, Steam Condenser Heat Exchanger, Verticle
Heat Exchanger, Gas Steam Boiler
Waste Heat Boiler Steam Trap Daerator, Degasidier Desuperheater Steam Compressor Steam Turbine Barometric Condenser Steam Ejector Tower, Cooling
Costing Module
Operating costs are generated as a spreadsheet, with the cost items listed in rows and the costs in columns. The spreadsheet is set up by defining the cost areas, then the items in each area with their costs and then their types.
METSIM operating costs module is designed to enable the user to use the data generated by the flowsheet model to generate tables of operating costs. Costs are output in spreadsheet format and can be itemized by flowsheet section, unit operation, and cost types. A series of routines are provided in a menu structure for input, calculation, editing and output. Operating costs can be determined, at any time following the calculation of a model.
Costs can be incurred in different currencies and assembled in a single currency. The menu structure is designed to enable the user to input data by classification, such as labor, materials etc. for each unit operation and plant section as appropriate, and output itemized costs for display, printing and export.
Dynamic Simulation Unit Operations
Dynamic modeling of flowsheets has been possible for many years, but METSIM has not been widely employed in that role. Other dynamic software simulation packages exist, such as speedup, which are targeted more towards the chemicals industry. These packages use systems of differenti al and algebraic equations (DAEs) to describe unit operations, which, when linked together can describe sections of plant or entire flowsheets. Thus a user must have a great deal of knowledge as to what equations and models govern the system they wish to model. METSIM offers a much simpler way to describe the flowsheet, and its solution is similar in nature to the numerical methods used to solve the systems of DAEs, if the chosen time step is short enough. For most flowsheets, the recommended time step is no longer than one-twentieth of the residence time of the material in the principal units.
There are two mechanisms for controlling the dynamic operation of a flowsheet: firstly, by providing a schedule; or secondly, by using logic controllers. Each mechanism has its merits, and we hope that future versions of METSIM will incorporate a combination of the two.
Most straightforwardly, a schedule may be provided for the entire flowsheet, specifying what action is taken for each, fixed period of time. This works best for single batch operations, such as a Pierce-Smith converter, when the charging, blowing, skimming and transfer periods last for a fixed time, and are accompanied by a specific action. The most serious drawback with this mechanism is that it is not possible to specify a logical condition determining the end of the period. For example, if a furnace is to be emptied, it is not possible to specify that its contents should be transferred at a specific rate until the furnace is empty. Instead, the rate must be calculated in order that the transfer takes a specific length of time. A schedule may be constructed most easily from an existing plant: in this case, the actual operating parameters of the plant may be used, and the various unknown reaction rates and extents may be varied to ensure a good match. Having constrained the chemistry in this way, various hypothetical schedules may be tested against the original.
Alternatively, the entire operation of the plant may be dictated solely by logical if…then statements. It is a considerable undertaking to design logic controllers to describe the appropriate action for every state in which the flowsheet may exist. All the logical if conditions, obviously, are queried on every pass through the flowsheet (that is, on every time step), and each must evaluate either true or false, triggering an appropriate action. It is surprising how quickly such a scheme becomes unmanageable. This mechanism has, however, been used successfully in at least one case.
Once the schedule or logic program has been completed, the other details of a dynamic simulation are exactly as for steady-state simulations, with the exception of feedback controllers. In a steady-state simulation, the role played by feedback controllers is not strictly analogous to that played by feedback controllers on a physical plant. These steady-state model feedback controllers are used primarily to automatically calculate parameters (such as the mass of coal that must be burnt to dry a given quantity of wet feed) that the modeler would otherwise have to calculate by repeated trial and error. This makes calculations of the effects of changing, for example, concentrate grade, far simpler and faster. In a dynamic model, however, (as in a real plant) the effects of changing a variable used previously in the flowsheet are not felt until the next time step, and the controller must wait to determine whether the change made was sufficient, or whether further corrections are needed. The algorithms necessary to calculate the change to be made to the controlled variable, from the error in the measured variable, are well established by the manufacturers of control equipment, and METSIM incorporates the two most popular. The tuning parameters (the proportional gain, etc.) needed for the model should therefore be the same as for the PID controller in the real plant.
Operating Costs
CRUSHING SAG MILLING BALL MILLING Total
100 LABOR $0.00 $0.00 $0.00 $0.00 101 Supervision -$98.63 $0.00 $0.00 -$98.63 102 Operator -$1,497.60 $0.00 -$748.80 -$2,246.40 103 Maintenance -$367.51 $0.00 -$367.51 -$735.02 200 MATERIALS $0.00 $0.00 $0.00 $0.00 201 Raw Materials -$144.53 -$5,629.24 -$2,116.15 -$7,889.92 202 Reagents $0.00 $0.00 $0.00 $0.00 203 Electric Power -$461.74 -$12,392.45 -$7,819.85 -$20,674.05 204 Feed Stock -$32,658.65 $0.00 $0.00 -$32,658.65 TOTAL -$35,228.67 -$18,021.69 -$11,052.31 -$64,302.67
Detailed Operating Costs
UNIT OP ITEM UNITS QUANTITY COST CRUSHING
1 Ore Feed Tonnes 13063.46 -$32,658.65
1 Foreman 1 24 -$98.63
1 Operator 4 96 -$1,497.60
1 Maintenance 1 24 -$367.51
1 Electric Power kwh 255 -$391.68
3 Electric Power kwh 45.612497 -$70.06
3 Crusher Liners Set 0.009635645 -$144.53
TOTAL AREA COSTS -$35,228.67
SAG MILLING
9 Electric Power kwh 5600.0034 -$8,601.61
9 5" Balls Tons 21.88991 -$4,377.98
9 Lub Oil Gallons 19 -$19.95
9 SAG Mill Liners Set 0.016417433 -$574.61
10 Electric Power kwh 1234 -$3,790.85
10 Screen Decking Panels 1.6417433 -$656.70
TOTAL AREA COSTS -$18,021.69
BALL MILLING
11 Operator 2 48 -$748.80
11 Maintenance 1 24 -$367.51
13 Electric Power kwh 206.23294 -$316.77
14 Cyclone Fittings Set 0.1306346 -$104.51
15 Electric Power kwh 2288.2964 -$7,029.65
15 Ball Mill Liners Set 0.037955407 -$948.89
15 2" Balls Tons 3.7955407 -$759.11
17 Electric Power kwh 308.22555 -$473.43
18 Cyclone Fittings Set 0.37955806 -$303.65
TOTAL AREA COSTS -$11,052.31
Stream Data
When activated the input data screen is displayed. A series of spreadsheets are displayed to allow stream data to be entered or edited as described below.
On exiting the stream data screen, the program returns to the palette and the edited stream number and route will change to the color of the predominant phase. For phase colors see ‘Select Object Colors‘. The stream data input screen set out as follows.
Stream data is displayed along the top of the screen above a series of data entry spreadsheets. The stream data is as follows:
The top line is used for text entry e.g. stream description. The second and third lines are for stream data variables
Data Field Output Level Input Field Design Factor Input Field Maximum Flow Input Field Box Number Input Field Input Field Input Field Variables 1 2 3
Input Field for Output Level. Stream data is used to switch on/off the stream display. If the stream output level matches the display level as defined in DVAL Display Value Functions for Streams. The stream data is displayed. This can be either the stream number, a stream value function or a stream box as defined in ISBX Design Stream Graphics Boxes.
Input Fields for Design Factor, Maximum Flow and Variables 1 2 and 3 are not used at present.
Input Filed for Box Number is used to replace data as defined in DVAL above by a graphics box as defined in ISBX. Box types are listed in ISBX.
Two direct Data entry fields located below for:
- the upper is for the stream name or description, initially defaults to flowsheet stream number.
- The lower is for the stream label, which is generally an alphanumeric P and I D flowsheet identifiers. Initially it defaults to flowsheet stream number.
Quick Access buttons are displayed to the left of the above. Only the buttons for the phases present in the flowsheet are displayed.
Data Entry Spreadsheets for:
- Mass and volumetric flow rates, temperatures, pressures and operating time - Phase compositions by component
- Phase elemental composition
- Stream particle size distributio n (which is activated through the SSA button) - Stream component size data (which is entered through the SSM button).
- Stream washability or gravity separation data (which is entered through the WAS button).
The suggested method for entering stream data for the first time is to first enter the Mass for each phase, which will be in the units defined in the column header. Exact values are required for input streams estimates for controlled input and recycle streams.
As each phase field is activated, components and elemental composition spreadsheets will appear, with the components and their elements according to and in the order of the component list. If there are no components listed for a phase no spreadsheet will appear. The phase buttons can also be used for data entry. The mass flow of the phase is entered, by moving the mouse pointer to the relevant field PL. A blue border highlights the field. Enter the flow PL. The first component listed for the phase will be allocated all of the material and its assay will change to 1 i.e. the phase is 100% of that component. Individual component assays are entered as weight fractions or mole. fractions. As each assay is entered the phase composition is recalculated and the assay of the first component will be adjusted to ensure the total assay is always equal to 1 (100%).
Aqueous phase components are often referred can be entered as weight fraction or grams per liter (gpl). Similarly as with other phases the assay of the first component is balanced with each entry to maintain the composition to 1.
Hence by choosing the first component in each phase to be either the inert or bulk material, the phase assay is always balanced with a component, which will not cause major errors in chemistry through error in input. In the aqueous water is always the first aqueous component as every other component is dissolved in water.
The elements spreadsheet is designed similarly to that for components, with columns for weight fraction and gpl entries. In cases where elemental data is available, element composition can be entered. In this case METSIM will recalculate the component assay for that element composition. This is achieved by setting up simultaneous equations. However where the chosen element is in several components, there may be several solutions, METSIM will be unable to arrive at a solution. In this case the user will have to make judgment, on which data is the best for the material.
The above procedure is repeated for each phase present in the stream.
For solid flows such as ores, the ore and adhering moisture flow generally relate to a measurement from a weighing device. In this case first enter an estimated flow of solids and aqueous phases to match the total flow. METSIM will calculate the total flow and the percent solids. The percent solids are next adjusted to the required value. METSIM will re-adjust the aqueous flow to match that value. Finally the desired total flow is entered and the program will recalculate both solids and aqueous flows to give the total entered
whilst maintaining the desired percent solids.
If the flow of a stream is normally measured volumetrically e.g. gaseous streams, a mass flow estimate is entered and the composition fixed. Then the required volumetric flow is entered using the flow functions in the spreadsheet. The mass flow will be recalculated to match the volumetric flow.
Stream temperatures are entered if the heat balance switch (in ICAS) is on. Temperatures can be entered in Celsius or Fahrenheit. METSIM uses degrees Celsius in all calculations.
Similarly stream pressures can be entered in Kilo Pascal’s (kPa) or Pounds per square inch (psi) The operating time (Time) or availability of a stream can be entered as a fraction of 1
Note: Exact compositions are required for input streams; estimates may be entered for controlled input and recycle streams.
Quick Access buttons , located at the top center of the screen appear for the phases present in the component list. These can be used for entry of phase assay data:
S I - Solids Inorganic S O - Solids Organic L I - Liquids Inorganic L O - Liquids Organic M 1 - M ol te n M et al
M 2 - Molten Oxides, slag M 3 - Molten Sulfides/Halides G C - Gaseous
The following buttons also appear dependent on options switches:
S S A - Particle size analysis, the sieve analyses are entered at this point. Sieve Size Entry. SSM – Multicompon ent size analysis
WAS – Washability or specific gravity
NOTE 1: If the SCM option has been chosen, solids inorganic component data must be entered using the SSM button. This takes president over SSA screen size analysis. The latter array data is derived from SSM.
The total solids inorganic mass flowrate is calculated on each entry in SSM and the assay of the first solids inorganic component is set to unity. ON entry of other solids component assays the assay of the first solids inorganic component at the top of the component list is recalculated to ensure the total is always 1, as with normal assay entry.
On completion, solids component assays may be adjusted in the normal manner, and the assays will be re-proportioned in SSM to match the total component assay in the stream array STR.
Hence for component N, for input stream IS STR[IS;N] = +/SSM[IS;N;]
The array SSA refers to mass flowrates of solids for each size fraction This array is recalculated on completion of entry via SSM such that: +/SSA[IS;]=+/STR[IS;SI]= +/,SSM[IS;;]
NOTE 2: Do not attempt any data editing or entry via the size analysis screen. This will result in a mismatch of SSA and SSM and give inaccurate simulations.
R e a c t i o n s
This section describes the different ways that chemical reactions may be written in METSIM. Chemical reactions are at the heart of the success or failure of many METSIM models. The way in which they are written, their order, and their extents can be a prime determinant of the quality of results, and the benefit obtained from the model. They dictate the amounts of new compounds, whether valuable or hazardous, formed throughout the process, and the consumption of raw material fed to the process.
Chemical reactions must be specified for a particular unit operation, and will then occur only within that unit operation. If a chemical reaction occurs in many unit operations, it must be specified for each of them individually The unit operation ‘Reactions’ page contains input data screen for entering reactions. When activated a list screen is displayed. Reactions are entered in the order in which they will be performed. Individual reactions are input or edited using the edit button.
The editing screen provides a list of the abbreviated chemical names (CNM) of all components in the model accord-ing to the major phase type they exist in i.e. solids, liquids, melts and gases. The chemical reaction is entered, by selecting the first reacting component from the list by placing the mouse pointer over the chosen reactant and PL. The reactant CNM will appear in the reaction equation display field. Repeat for the remaining reactants. A plus sign will be inserted between each selection. On completion, activate PL the + Prod button and select the first product component. An = sign followed by the CNM of the selected component will appear in the reaction equation display field. As each subsequent component is selected, + sign will appear followed by the component CNM. On completion activate the Balance button and METSIM will balance the equation. METSIM uses simultaneous equations to calculate the reaction balance. If the reactants and products of the chemical reaction balance,
METSIM will rewrite the equation with the number of molecules of each component in the equation. If the equa-tion does do not balance, or there is no single soluequa-tion to the chemical reacequa-tion METSIM will warn, “ REACTION DOES NOT BALANCE “. The unbalance equation must be evaluated to determine whether it is incorrect and corrected. Reactants and products components can be removed or added to the equation by activating the + or – reactants or + or – products buttons, and highlighting the appropriate components in the component list PL. If desired the complete reaction can be cleared and re-input. Upon completion, the new reaction must be re-balanced. If the reaction cannot balance the User button will open an input screen whereby the stochiometry can be input directly. Once input the balance button will confirm the user-input reaction does balance.
Process Controls
Constraints may be applied to the process flowsheet in addition to those parameters specified in the unit operation modules through the use of process controls. These controls function similarly to those in oper-ating plants. During development of METSIM, it was found that numerous alternatives were possible in fixing or setting process parameters. METSIM was developed by choosing the most common set of con-straints and programming them into the calculation code. The process model is developed using these standard constraints, and then the control module is used to release the constraints that are not applica-ble and to impose those that are desired. Thus they can also be used to simulate process control loops and evaluate control strategies.
The following control modules are available F B C F ee db ac k C on tr ol
F F C F ee df or wa rd C on tr ol FRC Flow Rate Control P S C P er ce nt S tr ea m Co nt ro l LOG Logic Control
In addition to controls instruments (INS) and totalizers (TOT) can be included in the flowsheet to measure parameters in streams and unit operations, similar to transducers in real life.
The type of control, which can be applied, will depend on whether the model is used for steady state or dynamic simulation. The distinction between each mode is:
- In steady state simulation the material balance is achieved by ensuring that there is a balance between inputs and outputs for all unit operations i.e. matter is neither created nor destroyed. There are no process inventories
- In dynamic simulation, process inventories are used to balance inputs and outputs. The latter are con-trolled and the balance between inputs and outputs is achieved by varying the unit operation contents or inventory.
In steady state simulation constraints are applied using either feedforward or feedback control. Feedforward type controls apply prior to the calculations for a unit operation and consist of:
FFC – Feedforward to control input stream ratios
FRC – Flowrate to control input stream flowrate parameters
PSC – Percent to control input streams to achieve preset component percentages
FBC – Feedback controls are used to adjust parameters or stream(s) flow(s) to achieve a set point value at the output of a unit operation. Control is applied after a unit operation calculation routine has been completed. The controller calculation routine is iterative and the set point is achieved when it is within a convergence tolerance. The tolerance is set to 10 to ¯10.
Note: Flowsheets converge faster when feed forward controls are used rather than feedback controls. Each feedback control loop adds flowsheet convergence time due to the controller iterations and also does not give an exact value, due to the convergence tolerance. It is good practice to keep feedback controls to a minimum.
In steady-state simulations, process control is used to determine an appropriate value for, e.g. a flow rate of natural gas to a burner, but can also be used to control variables which it may not be possible to control in practice, e.g. the extent of a chemical reaction in a furnace to ensure that a slag has a compatible copper content to the matte. This type of feedback control can best be thought of as simply imposing additional constraints on the process.
In dynamic simulation, the feed forward controllers can used to control - Inputs into the model.
- Outputs from unit operations
Unit operation inventory will vary dependent upon the difference between input and output and existing inventory.
Feedback control cannot be used in dynamic simulation and must be replaced by an appropriate P and I D control (PID ). The same controller module can be used and in this case the controlled variable is modified for the calculation of the next time step on the basis of the effect of the last change. The feedback control-ler in P and ID mode should be used to control the variable, which would actually be controlled in practice. Typically the P and I D controller would use a flowrate controller as the adjusted variable.
METSIM has several alternative P and ID algorithms, which are used in most commercial controllers. INS – Process controls instruments are used on streams and unit operations to measure operating param-eters similar to transducers and instruments on process plants. Instruments are used in steady state calculations to monitor critical parameters during whilst the model calculations are in progress. In dy-namic simulation instruments are used to plot and record data for each time interval during the calcula-tion of the flowsheet.
In addition to the above controllers,
LOG – logic controllers can be used directly by all unit operation modules.
Controls can be accessed either directly from the flowsheet using the ‘Object Editor’ or via the ‘ICTL Process Controls’ in the Input drop down menu.
Controllers loop numbers, location, set point parameters and values, and controlled variable values can be view vie the ‘OCTL - Print Controls' routine located in the Output drop down menu.
METSIM MECHANICS
The Mechanics of entering data into METSIM have certain guidelines which should be followed in order to ease data entry and avoid errors.
BLANK - METSIM was designed to use the blank as a delimiter between numeric data elements of the same type. COMMA - The comma will act as a delimiter in place of a blank, however, its main use is to join variables or vari-ables and numeric data into one vector of data.
DECIMALS - Irrespective of the use of the word percent in the prompts, all data must be entered as decimal fractions. ENTER - Pressing the enter key without any data entry will cause METSIM to continue execution of the program in progess.
Y or N ? - Inputs requiring a yes or no response, will default to no (N or n) for any entry other than a yes (Y or y).“ APL CHARACTERS
METSIM requires some common but special characters in generating APL expressions for process controls and various output forms. For those not familiar with the APL characters set, the following keystrokes are provided.
Fortran APL Keyboard
Negative number sign - negative sign Alt 2
Subtraction sign - -
-Addition sign + + Shift =
Multiplication sign * x Alt
-Division sign / ÷ Alt =
Powersign ** asterisk Shift 8
Assign sign = ← Alt [
Array subscripts X(,) X[;] X[;]
Equation hierarchy () () ()
Plusreduction N.A. + +/
METSIM uses various keystrokes to simplify usage of METSIM. SCREEN TYPE KEYSTROKE FUNCTION
Program Menu Enter Select Item Cursor keys Move Cursor
PgUp/Pgdn Move to Next Menu Page Home/End First/Last Menu Item
Esc Exit to Previous Menu Ctrl - Break Cancel Printer Output Line Item Menu Enter Select Item for Data Input
Ctrl - D Duplicate Line Item Del Delete Line Item Ins Insert New Line Before Ctrl -Ins Insert New Line After PgDn Move Down One Page PgUp Move Up One Page
Home/End First/Last Data Item on Page Ctrl Home/End First/Last Data Item in Total Set Esc Exit to Previous Menu
Data Input Screen Enter Move Cursor To Next Field Cursor (AT) Move Cursor
Ctrl - Keypad Move Cursor Keypad Numeric Data Ctrl - R Repeat Value
Esc Exit Screen with Updating Ctrl - Q Exit Screen without Updating
Note: To move an item, first delete the line with Del, second, move the cursor to a new point, third, insert the old line with Ins.
APL executes an expression from right to left with no symbol hierarchy . Since all symbols are
treated equally, parentheses are used to alter the calculation sequence. The plus reduction adds all
values to the right of the +/ symbols, this is handy for summing multiple stream data in controller
expressions.
APL Arithmetic Order Of Execution
A. You can enter two or more arithmetic functions in the same line. For example:
3 × 4 - 2 6
The order of execution for the above expression is: 3 × 4 - 2
3 × 2 6
The order of execution is always from right to left. Another example with the solution is the following:
12 - 3 + 3 × 8 ÷ 2 + 2 3
The expression above is evaluated in the following manner: 12 - 3 + 3 × 8 ÷ 2 + 2 12 - 3 + 3 × 8 ÷ 4 12 - 3 + 3 × 2 12 - 3 + 6 12 - 9 3
VALUE FUNCTIONS OVERVIEW