# Dynamic Simulation & Heap Leaching Module

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, which are targeted more towards the chemicals industry. These packages use systems of differential 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. Simulations are most effective when a combination of the two methods are incorporated, allowing the user complete flexibility in simulated operating conditions.

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. Schedules may be written to include logical statements for the termination of each time step, allowing the user to either specify a set period of time per step/action or to specify a specific condition that must be met to terminate the event. 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.

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.

In addition to dynamic scheduling and logic statements METSIM^{®} may also include an Ore Tons and Grade (OTG) schedule that feeds the process plant each time step (minutes, hours, days, etc). This OTG includes all mining data including: tons, assays, moistures, mining dates, etc. With the Mining and Contouring Modules used together, a complete Mine Block Model may be included, ensuring that the best possible mine plan for plant productivity is determined.

METSIM^{®} can model nearly any process dynamically. The graph above shows the results of a Pierce Smith Convertor simulation. Furthermore, many processes are not accurately simulated in steady-state conditions, including heap leaching.

## Heap Leaching

The heap leach module performs mass balances around the heap leach process including chemical reactions, precipitation and evaporation, solids and water inventories, heap drainage and control logic. With the incorporation of the Contouring Module, any heap type/geometry may be accurately constructed, including: on/off pads, dump leaches, valley-fill leaches, etc. Tracking not only ore to the heap but also all solution flows to, through, and out of the heap will optimize the process performance and allow metallurgists to accurately predict future performance and production.

METSIM^{®} allows input of several ore types with separate recovery curves for each ore type. Detailed data on the day to day operation of the heap are provided. Comparisons of control strategies, the effects of changing key parameters and the effect of seasonal variations can be evaluated.