Physics-Guided Machine Learning Enables Precise Heap Leaching Saturation Control

A parameter-conditioned physics-guided ML surrogate model speeds up heap leaching saturation prediction 70x, matches PI control accuracy, saves 4% water, and avoids overshoot.
This study addresses the highly heterogeneous hydraulic properties of ore beds in heap leaching and the extremely high computational cost of traditional Richards equation solvers by proposing a parameter-conditioned physics-guided machine learning (PGML) surrogate model. Using the current saturation profile, irrigation rate, and hydraulic parameters as inputs, it predicts the next saturation distribution from 4096 numerical trajectories with an approximate Gardner mass balance soft constraint. In simulated saturation control, PGML matches a tuned PI controller with 4.9% median tracking deviation, while avoiding overshoot and saving about 4% irrigation water. It is about 70x faster than numerical solvers, with batch evaluation under 2 ms per column for 5000 columns. The study also reveals a trade-off: moderate physics guidance reduces long-term prediction error by about 30% but slightly worsens closed-loop tracking.
Title
Physics-Guided Machine Learning Enables Precise Heap Leaching Saturation Control
Meta Description
A study proposes a physics-guided machine learning surrogate model for heap leaching saturation control. The model is 70 times faster than numerical solvers, achieves control accuracy comparable to a PI controller, saves about 4% of irrigation water, and reveals the trade-off effects of physical constraints on prediction and control.
Article Content
In heap leaching mining, the hydraulic properties of different regions within the ore bed vary greatly. Although traditional numerical simulation is accurate, it is slow as a snail. A recent study proposes a parameter-conditioned physics-guided machine learning (PGML) surrogate model that not only speeds up prediction by about 70 times, but also achieves overshoot-free saturation control in a simulated environment, while saving about 4% of irrigation water compared with a traditional PI controller.

Why Heap Leaching Needs Faster Predictive Models
Heap leaching is a common method for extracting metals from low-grade ores. By irrigating leach solution onto ore heaps, the target metals are dissolved and recovered. However, the hydraulic conditions inside the ore bed are highly uneven—porosity, permeability, capillary pressure, and other parameters differ significantly across regions, causing the saturation distribution to change dramatically over time.
Traditional numerical solvers for the Richards equation can accurately simulate these processes, but the computational cost is extremely high. To achieve large-scale real-time control, such as dynamically adjusting the irrigation rate based on the current saturation, numerical solvers would find it nearly impossible to complete thousands or tens of thousands of simulations within a reasonable time. This has driven the need for fast, reusable surrogate models.
The Richards equation is the core partial differential equation describing water movement in unsaturated porous media, proposed by Lorenzo A. Richards in 1931. It is essentially a combination of Darcy's law and the mass conservation equation: water flux is driven by gradients in capillary pressure and gravity, while the time rate of change of water content equals the spatial divergence of flux. The nonlinearity of this equation comes from two key constitutive relationships—the hydraulic conductivity function and the water retention curve—both of which strongly depend on local saturation. In heap leaching scenarios, the pore structure of the ore bed is highly heterogeneous, and these constitutive relationships vary sharply in space, so the Richards equation must be solved iteratively step by step on a fine grid using numerical methods such as finite difference or finite element. Each simulation may take hours to days, which is precisely the core bottleneck faced by real-time control.
Design and Training of the PGML Surrogate Model
The research team constructed a parameter-conditioned physics-guided machine learning surrogate model. The core idea is to have a neural network learn the mapping from the current saturation profile, irrigation rate, and four hydraulic parameters to the saturation profile at the next time step.
The training dataset contains 4096 numerical trajectories of the Richards equation, divided into training, validation, and evaluation sets in a 2867/614/615 split. During training, the network incorporates an approximate Gardner mass balance penalty term—a kind of "soft constraint" that guides the model to obey physical conservation laws rather than relying purely on data fitting.
The degree of this physics guidance was deliberately kept at a "moderate" level. The researchers found that moderate physical constraints can significantly improve long-term prediction accuracy, but excessive constraints may instead harm closed-loop control performance.
Parametric conditioning is an important strategy in surrogate model design: rather than training a separate model for each set of hydraulic parameters, the parameters themselves are included as additional input dimensions to the network, allowing a single model to cover the entire parameter space. In this study, the network receives four hydraulic parameters as inputs, which characterize the water retention and water conduction properties of different ore materials. In this way, when the particle size distribution or compaction degree of the ore in the field changes, new parameter values can simply be input into the network to obtain predictions without retraining. This design is the key reason the model has the potential for reuse across materials. By contrast, non-conditioned models can only handle fixed parameter combinations seen during training, have very limited generalization ability, and are almost unusable in real industrial scenarios.
Control Performance: A Head-to-Head Comparison with a PI Controller
In the simulated saturation control task, the surrogate model was combined with a daily predictive controller to compare 200 constant irrigation rates over a 24-hour prediction horizon. The evaluation results showed:
- The median full-cycle tracking deviation was 4.9% (relative to a saturation target of 0.70), on par with a carefully tuned proportional-integral (PI) controller.
- The PGML controller reached the target without overshoot in the median sense, whereas the PI controller exhibited overshoot.
- The PGML controller used about 4% less irrigation than the PI controller.
This means that with comparable control accuracy, the PGML approach is more water-saving and has smoother dynamic response.
The Double-Edged Sword Effect of Physics Guidance
The study revealed an interesting trade-off: moderate physics guidance reduced long-term prediction error by about 30% (relative to purely data-driven training) and also reduced irrigation boundary activity, but closed-loop tracking performance slightly deteriorated.
This seems contradictory—better prediction, yet slightly worse control? The authors explain that physical constraints may make the model more conservative in response to certain extreme control actions, thereby sacrificing a bit of tracking accuracy in the closed loop. This reminds us that the design objective of a surrogate model should align with the final control task, rather than simply pursuing the minimization of prediction error.
The Gardner model is one of the classic parameterization schemes for describing the hydraulic properties of unsaturated soil, proposed by W.R. Gardner in 1958. It uses exponential or power-law forms to characterize the relationship between hydraulic conductivity and matric suction (or capillary pressure). It is concise in form and has few parameters, making it convenient to embed in physics-guided terms. In this study, the mass balance penalty term was constructed based on the Gardner relationship, and its role is to constrain the saturation profile predicted by the network to approximately satisfy water conservation during time advancement—that is, the difference between inflow and outflow should equal the change in storage. Because the true Richards equation involves complex nonlinear constitutive relationships, directly embedding it into a neural network as a hard constraint is extremely costly, so the researchers adopted a soft constraint approach, imposing physical laws in the loss function in the form of a penalty term. The advantage of this approach is flexible training and easy weighted balancing with the data-fitting term, but the penalty weight needs careful tuning: if the weight is too small, the physical constraint becomes virtually ineffective; if too large, it may suppress the network's ability to fit real data.
Computational Efficiency: 70x Speedup and Millisecond-Level Batch Evaluation
For the same prediction workload, the PGML surrogate model is about 70 times faster than numerical solvers. Even more striking, for a large-scale scenario with 5000 columns, batch evaluation costs less than 2 milliseconds per column.
This speed makes large-scale, real-time saturation control possible in a simulated environment. The researchers believe that this surrogate model can be reused for heap leaching scenarios with different material properties, laying the foundation for industrial-grade applications.
A surrogate model refers to a class of methods that replace high-fidelity numerical simulators with low-cost approximate models. It is widely used in engineering optimization, real-time control, and uncertainty quantification. Common surrogate models include response surface methods, Kriging interpolation, radial basis functions, and, more recently, neural network surrogates. Unlike traditional surrogate models, physics-guided machine learning (PGML) incorporates physical equation constraints during training, enabling it to produce physically consistent predictions even in data-sparse regions. In heap leaching control scenarios, the value of a surrogate model is not only to accelerate a single prediction, but also to support the rolling optimization required by model predictive control (MPC)—MPC needs to evaluate hundreds or even thousands of candidate control schemes in each control cycle. If a numerical solver were called for every evaluation, the computational burden would be unbearable. A 70x speedup and millisecond-level batch evaluation make this kind of large-scale online optimization feasible instead of impossible.
Limitations and Outlook
The current results are entirely based on a simulated environment and have not yet been validated at a real heap leaching site. The strength of physics guidance needs to be tuned for specific control objectives, and the model's generalization ability to extreme hydraulic parameters still needs to be tested. In addition, combining the surrogate model with a distributed sensor network to achieve truly closed-loop field control is a key challenge for the next step.
Nevertheless, this work demonstrates the enormous potential of physics-guided machine learning in complex industrial processes—it not only accelerates simulation, but also reshapes the design paradigm of control strategies.
One-line Summary
A parameter-conditioned physics-guided machine learning surrogate model speeds up heap leaching saturation prediction by 70 times, matches PI controller accuracy while saving 4% water and avoiding overshoot.
Paragraph Summary
To address the highly heterogeneous hydraulic properties of ore beds in heap leaching mining and the extremely high computational cost of traditional Richards equation numerical solving, this study proposes a parameter-conditioned physics-guided machine learning (PGML) surrogate model. The model takes the current saturation profile, irrigation rate, and hydraulic parameters as inputs to predict the saturation distribution at the next time step. Training data come from 4096 numerical trajectories, and an approximate Gardner mass balance soft constraint is introduced. In a simulated saturation control task, the PGML controller achieved a median tracking deviation of 4.9%, on par with a tuned PI controller, while achieving overshoot-free control and saving about 4% of irrigation water. The model is about 70 times faster than numerical solvers, and in a 5000-column scenario, batch evaluation takes less than 2 milliseconds per column. The study also reveals the trade-off that moderate physics guidance reduces long-term prediction error by about 30% but slightly degrades closed-loop tracking performance. At present, the results are still limited to a simulated environment.
Related articles

RAG Getting Started in Practice: From Principles to Building an Enterprise Knowledge Base
Bilibili RAG course highlights: from retrieval-augmented generation principles, document chunking and vectorization, to five accuracy factors and enterprise knowledge base boundaries, with fine-tuning vs RAG selection advice.

AI Model Selection Guide: DeepSeek vs. Qwen3 in Practice
How should AI developers choose models? Based on a Bilibili tutorial, this article breaks down the Function Calling differences between DeepSeek V3 and R1, Qwen3's programmatic thinking mode switching and agent capabilities, and outlines a multi-model learning path and practical selection logic.

Anchoring, Loss Aversion, and Nudges: 5 Psychological Tactics Retailers Use to Make You Spend
Behavioral economics reveals how retailers use anchoring, framing, loss aversion, and nudge theory to manipulate your spending decisions. This article breaks down 5 common psychological tactics and offers counterstrategies like slowing down decisions and setting your own anchors to see through the pricing design behind discounts.