August 26, 2025

Clones, Arrays and Indexing for Large Multi-node Models; Solubility calculations and other uses

We are pleased to showcase an interesting presentation by Alex Fitzpatrick, a Senior Modeler at Klohn Crippen Berger Australia. Presented at the 2024 GoldSim User Conference, Alex's work presents a practical and innovative approach to managing the inherent complexity of large-scale water quality models in GoldSim. 

This approach can address the challenge of managing many parameters in models that track water, water quality, and material across numerous locations. By strategically employing GoldSim's cloning, array, and indexing capabilities, Alex demonstrates how modelers can achieve better organization, transparency, and scalability. This technique can be valuable for models with thousands of elements and multiple levels of sub-containment, such as those simulating complex interactions within chemistry control points, reservoirs, and various mine operation and closure plans. 

Read on to see how these advanced GoldSim features transform large datasets into manageable simulations.

The Challenge: Complexity in Large-Scale Water Models

A full mine site water model is inherently complex, requiring the tracking of numerous parameters across a wide range of locations. As these models evolve, the volume of data and the number of interdependent components can become overwhelming.

Alex’s work addresses this challenge by focusing on models that simultaneously track water, water quality, and various materials. To illustrate the scale and intricacy of these systems, consider the following figures from one such model:

  • 54 Chemistry Control Points (acting as water reservoirs)
  • 33 Non-Chemistry Controlled Water Reservoirs
  • Numerous Flow Points
  • Over 10 distinct Mine Operation and Closure Plans
  • A staggering 78,032 individual Model Elements
  • 10 hierarchical Levels of Sub-containment

These numbers highlight the sheer magnitude of data and logic that must be managed. Without a structured approach, such complexity can quickly become unmanageable.

GoldSim's Solution: Cloning, Arrays, and Indexing

GoldSim's cloning and array (matrices) capabilities provide a convenient way to perform calculations, organize inputs, and track results. This approach reduces redundancy and enhances model transparency.

Why Use Cloned Containers?

Clones are useful when you have a set of nodes that share a consistent set of functions. The key is to design the most generalized functions possible. Even properties that require a local definition can be cleverly substituted by a global proxy value, maintaining flexibility without sacrificing consistency. Cloning allows for the use of index functions as a key to read multiple property matrices, streamlining data access.

Figure 1 - Screen Capture of a Cloned Container in GoldSim

Cloning can be helpful for representing a wide range of processes, including:

  • Physical Processes in General
  • Chemistry (e.g., dynamic mineral solubility)
  • Suspended Material Generation
  • Ground Water Flows
  • Natural Surface Water Flows
  • Material Handling

Figure 2 - Screen capture of a Contaminant Transport Model Using Cloned Media Properties

How Cloned Containers Work

In GoldSim, you can clone an entire Container, which means all of its contents (including all elements, their functions, and internal logic) are automatically replicated. An advantage is that any change you make to an element within one cloned Container is propagated to all its clones, providing consistency across repeated model structures. This functionality is particularly useful for complex, multi-node systems where identical processes occur at many locations.

This presentation offers a clear and practical illustration of how to implement this. The schematic below shows how Alex integrates a Cloned Container within a separate Localized Container to manage unique inputs and outputs for each node in his large water quality models. 

Figure 3 - How Localized Containers house Cloned Containers.

To use cloned Containers in this manner, as shown in the above diagram, provide it with unique inputs from elements located outside of the clone. This allows individual nodes to behave distinctively despite sharing identical internal logic. This setup means inputs can be fed into these replicated cloned containers as arrays, and a "Local ID" provides specific context to each localized container to use an item of the array, enabling a "Local Function" to apply adjustments tailored to that particular location. This structured approach facilitates efficient model construction and site-specific simulation, ensuring that results are accurately routed to reporting and final container outputs.

Cloned Containers are a versatile feature in GoldSim with various applications beyond this specific case. Examples of models that employ cloned Containers can be found in the GoldSim libraries, like these.


Figures 4a and 4b - Examples of Uses Cases for Cloned Containers

For more information about how to employ cloned Containers in your model, start here to learn more: 

Indexing Parameters for more Consistent Results

One helpful aspect of this methodology is the intelligent use of indexed parameters, differentiating between global and local values for ultimate control and flexibility. Beyond inputs, indexing is also employed to organize and track results. This means a single point and style of reference can be used for multiple result elements. 

The poster demonstrates this by showing how data from various indexed nodes can be compiled and visualized on a common flow/discharge time series graph, greatly improving data analysis and reporting efficiency for complex multi-node systems.


Figure 5a and 5b - Time History Calibration Plots (SO4 and Cu concentrations) {note sulphate axis hidden by request}

These time history charts, generated directly from the model, show simulated concentrations for water quality parameters. While the charts illustrate typical model outputs, they serve as a practical example of how the organized structure and indexing capabilities facilitate easy access and visualization of results over time.

Chemistry and Solubility Control

The model can dynamically control mineral solubility. This involves simulating how minerals dissolve into or precipitate from water, constantly adjusting based on the water's changing chemical conditions. The model incorporates chemical inputs, including lists of mineral types, dissolved chemical complexes, and other water quality parameters. These are processed using organized calculation structures (like "Solubility Control Matrices" and "Complexation Control Matrices") which apply specific chemical rules. This allows the model to determine chemical limits and binding behaviors (such as mineral solubility product, kSp, and complexation equilibrium, kEq). These calculated values then feed into the chemical reaction processes occurring at each location (node) within the model, providing simulations of water quality.

Figure 6 - Illustration of Chemistry and Solubility Control in the Model

Modeling Complex Mine Water Systems

The model conceptualizes flow for a mine water system, using inputs such as climate data (rainfall, evaporation), external water inflows, and external mass deposition rates. Key processes modeled include dissolution, precipitation, solubility/sorption, and crucial pH calculations. The outputs, including mass and water outflows, ultimately inform downstream receivers, showcasing the model's capacity to simulate the entire interconnected system.

Figure 7 - Conceptual Representation of the System Model

Suspended Material Generation

The model simulates the generation and quality of suspended material eroding from a watershed. This involves integrating various inputs such as ground conditions (erodibility, material composition), meteorological basin erosivity, and node-specific data (like slope length, erosion gradient, and area). Within this module, arrays and cloned containers proved useful in managing the complex calculations and data for multiple locations, enabling a spatially distributed environmental load calculation.

Figure 8 - Model Components for Suspended Material Generation.

While GoldSim offers a Contaminant Transport (CT) module, it was not utilized in this project. This decision was made early by the client, even prior to KCB's involvement, as the model was originally conceived for water balance alone. The client also supplied the initial GoldSim model file (.gsm) and chose not to invest in the CT module. Implementing it would have required a substantial rebuild of reservoirs, and the perceived benefit did not justify the effort required for this specific project's scope.

Limitations and Considerations

The poster also candidly acknowledges some practical limitations and considerations when implementing such a sophisticated modeling approach:

  • GoldSim's primary array handling is restricted to 2D matrices. This requires careful thought on how to best structure and utilize these dimensions for complex data within the model. However, it's important to note that GoldSim does support  loading of 3-dimensional data tables using its Lookup Table elements. GoldSim Lookup Tables can load 3D data, but only 2D slices can be accessed at a time. This means you can’t directly perform operations across all three dimensions simultaneously within standard expressions.
  • The choice to extensively use clones imposes a common structure throughout the model. This means that components must be fully populated, even in cases where certain aspects may not be directly applicable to a particular node or location.
  • Finally, the decision to adopt this structured cloning and indexing approach is most effective when made early in the model construction process, ideally at the conceptual design stage. Retrofitting this methodology into an existing, unstructured model can require substantial effort.

Conclusions

Alex Fitzpatrick’s work is a compelling demonstration of how GoldSim’s advanced features (cloning, arrays, and indexing) can be harnessed to manage the complexity of large-scale environmental models with clarity and efficiency. His approach transforms what could be an overwhelming dataset into a structured, scalable, and transparent simulation framework.

If you're grappling with the challenges of multi-node, multi-parameter modeling, this methodology offers a path forward. By adopting these techniques early in your model design, you can reduce redundancy, improve traceability, and enhance your model’s adaptability to future changes.

We extend our thanks to Alex for sharing this innovative and practical contribution with the GoldSim community. 

About the Author

Alex Fitzpatrick is a Senior Geoscientist and Modeler at Klohn Crippen Berger, a leading engineering and environmental consulting firm. KCB offers a full range of services across Mining and Energy, Transportation and Infrastructure, and Hydropower sectors. They integrate engineering and geo-science with environment, community, and safety-by-design principles, operating globally from over 15 strategically located offices.

KCB Australia extends its gratitude to the anonymous clients who contracted this foundational work. Alex also acknowledges the invaluable contributions of past and present KCB employees to the model concepts, and special thanks go to GoldSim LLC and its staff for their general and specific assistance in developing multiple models using this approach.

No comments:

Post a Comment