1. Introduction
Water supply is challenged by limited water resources, increasing water demand, and climate change. The world’s potential renewable water resource accounts is 52,580 km
3/year [
1], which has remained almost constant over time. On the other hand, the water demand has increased significantly over time due to population growth and industrial development [
2,
3]. In addition, climate change has increased the variability of regional precipitation and the availability of water resources, and is expected to exacerbate this situation [
4]. These facts suggest that there is an urgent need for the development of alternative water resources that can bridge the gap between the demand for water and the conventional supply of water. Among the available water resources, water reuse is identified as a primary strategy to ensure sufficient water in regions with water scarcity [
5,
6]. Unlike conventional water sources, water reuse provides a stable water supply that is hydrologically independent of the source [
7]. Water reuse is being increasingly implemented around the world [
8,
9]. There are several different types of water reuse, including non-potable recreational, environmental, and residential uses; de facto water reuse; industrial reuse; indirect potable reuse (IPR); and direct potable reuse (DPR) [
10,
11]. Depending on the purpose of water reuse, different treatment options should be applied [
12]. For example, non-potable recreational uses require relatively simple treatment steps, while either IPR or DPR require multi-barrier approaches to meet stringent requirements [
10,
13].
When treating municipal or industrial wastewater to high quality water, reverse osmosis (RO) plays an important role [
14]. RO is used to remove ions and organic compounds from feed water, which may be secondary or tertiary wastewater, for either industrial or potable reuse [
12,
15]. RO is the most mature and widely implemented membrane technology, typically utilizing spiral wound modules (SWM) with feed spacers, which are important components designed to maintain channel thickness [
16]. The advantages of RO for water reuse applications include: (1) ability to produce high quality product water; (2) small footprint; (3) modularity; (4) operational reliability; and (5) relatively low energy consumption compared to competing technologies such as multi-effect distillation (MED) or mechanical vapor compression (MVC) [
14,
17,
18]. However, one of the critical challenges facing RO is brine management. Since RO brine contains four to seven times the amount of rejected pollutants, this can lead to potential environmental and human health problems [
11,
18]. RO brine from a water reuse facility is typically discharged to surface water, injected into deep wells, or sent to evaporation ponds [
19,
20]. In the first case, the impact on the environment is a major concern, and in the second and third cases, the cost of treatment is very high [
14,
21]. Therefore, it is necessary to find an affordable way to treat RO brine for a sustainable reuse of wastewater.
Considerable research has been devoted to RO brine treatment for water reuse applications [
22,
23,
24]. Much of this work has focused on reducing the organic pollutant load in brine through destructive processes [
25]. For instance, various advanced oxidation processes (AOPs), such as ozonation, Fenton oxidation, photocatalysis, sonolysis, and electrochemical oxidation, have been studied (primarily at laboratory scale) to break down organic contaminants in RO brine [
26,
27,
28]. These AOPs can effectively degrade dissolved organic carbon and certain micropollutants, but they often come with high reagent or energy costs and may produce by-products that require further treatment [
29,
30]. Another approach to manage brine is further concentration using pressure-driven membranes (e.g., secondary RO or nanofiltration) to recover more water and minimize volume [
31,
32,
33]. However, such processes face practical limitations due to the high osmotic pressure of RO brine, which drastically lowers water flux and increases membrane fouling and energy usage at extreme salinities [
34]. Emerging membrane technologies like forward osmosis or membrane distillation have shown promise for high-salinity brine concentration [
35,
36], they must also address scaling and fouling issues at the pilot scale [
37,
38]. To date, no solution has been identified as an effective and comprehensive solution to address all facets of brine treatment. Accordingly, a combination of methods may be required to tackle different components of the RO brine.
Physical-chemical treatment is a conventional method and can be easily combined with other technologies for RO brine treatment [
18]. In particular, coagulation can be applied to RO brine to target colloidal particles, organic matters, and phosphate ions that contribute to problems of treated water quality [
39]. Recent studies suggest that coagulation can substantially reduce pollutants in RO brine under certain conditions [
38]. The type of coagulant is a critical factor influencing treatment efficiency, not only for RO brine but also for other challenging wastewater streams. For instance, a study on coal mine wastewater demonstrated that treatment efficiency in an ultrafiltration–reverse osmosis process varied significantly with different coagulant types [
40]. Similarly, ferric chloride (FeCl
3) was found to remove a broad range of dissolved organic fractions from a RO brine, achieving roughly double the TOC and UV-254 removal efficiency of an aluminum-based coagulant at equal molar doses [
41]. Similarly, a study on inline coagulation–ultrafiltration pretreatment for RO brine recovery found that FeCl
3 outperformed polyaluminum chloride (PACl) and other aluminum coagulants in removing dissolved organic carbon (DOC) and mitigating fouling potential [
39]. By lowering organic content, turbidity, and even nutrients (via co-precipitation of phosphorus, for instance), coagulation could make the concentrate less hazardous for discharge or more amenable to high-recovery processes [
42,
43]. However, the efficiency of coagulation can depend on multiple operational factors, including coagulant dose, solution pH, temperature, and the characteristics of the brine, which need to be carefully optimized for each situation.
To systematically evaluate and optimize coagulation conditions for RO brine treatment, it is important to apply robust experimental design and modeling techniques. Response Surface Methodology (RSM) is one such statistical approach that has been widely used in environmental engineering to model and optimize treatment processes involving several variables [
44,
45]. RSM employs designed experiments and quadratic polynomial modeling to explore the relationships between factors and performance outcomes [
46]. This methodology can efficiently identify interaction effects and optimal operating conditions with relatively few experiments [
47]. In coagulation processes, RSM has been successfully applied to determine optimal coagulant dosages, pH, and other conditions to maximize removal of turbidity and organic matter. For instance, a drinking water coagulation process was optimized using RSM, revealing the combined influence of coagulant dose, water temperature, and pH on removal of turbidity, TOC, and total nitrogen [
48].
In recent years, data-driven modeling and machine learning (ML) techniques have also been introduced in water treatment optimization, offering powerful predictive capabilities beyond traditional empirical models [
49]. Algorithms such as support vector machines (SVM) and random forest (RF) have been employed to model complex nonlinear relationships in treatment processes, including coagulation, often with high accuracy [
50,
51]. Researchers have reported successful applications of SVMs and RFs in predicting various water treatment outcomes, especially when provided with sufficient training data [
49,
52]. Integrating such computational tools with conventional brine treatment technologies offers promising pathways to enhance the efficiency, reliability and sustainability of RO concentrate management.
One challenge, however, is that single machine learning models can be prone to issues like overfitting or limited performance, particularly when the available dataset is relatively small, as is often the case with lab or pilot-scale water treatment studies [
53]. In the context of coagulation studies on RO brine, data may indeed be limited to tens of experimental runs, making it difficult for ML models to analyze the outcomes reliably. To address the limitations of individual models, an ensemble modeling approach can be adopted. Ensemble modeling involves combining the predictions of multiple models to produce a more robust overall prediction [
54]. This strategy uses the strengths of different modeling techniques while reducing their weaknesses [
55]. Research has shown that ensemble models can achieve higher prediction accuracy and better generalization than any single model alone [
56]. By combining multiple models, ensemble models can reduce the impact of noise and overfitting, leading to more stable and reliable performance even with smaller datasets [
57]. In water treatment applications, ensemble methods (e.g., bagging, boosting, or stacking of models) have been used to improve the prediction of key parameters like effluent organic levels and to enhance control strategies [
58,
59]. The ensemble concept is particularly attractive for multi-objective optimization.
In this study, coagulation was investigated as a treatment strategy for brackish water RO (BWRO) brine in a wastewater reuse plant. Unlike many RO studies that emphasize fouling, scaling, or energy demand at the membrane stage, this work focuses on RO brine treatment, highlighting that optimizing coagulation efficiency offers a practical means to reduce organics, nutrients, and turbidity in the concentrate, thereby mitigating environmental impacts and supporting integration with other treatment processes. Jar-test experiments with aluminum- and iron-based coagulants were conducted to evaluate removal of dissolved organic carbon, UV-absorbing substances, turbidity, and phosphate from RO brine. Coagulation performance was analyzed using response surface methodology (RSM) and machine learning models (SVM, RF), which were then integrated into an ensemble framework. This approach harnesses the complementary strengths of statistical and ML models to identify optimal conditions more reliably and offers a practical decision-support tool for tuning coagulation in brine treatment, thereby improving the design and control of wastewater reuse processes
4. Conclusions
This study systematically evaluated the coagulation of BWRO brine using PACl and FeCl3 across a wide range of dose, pH, and temperature conditions, and demonstrated the power of combining traditional statistical modeling (RSM) with machine learning techniques (SVM and RF) in an ensemble framework. Jar-test experiments showed that both coagulants can achieve substantial removal of TOC, turbidity, phosphate, and UV254, with FeCl3 generally outperforming PACl under comparable conditions. RSM provided highly accurate, smooth response surfaces that captured linear, quadratic, and interaction effects, while SVM highlighted sharp threshold behaviors and RF showed robust “all-or-nothing” operating zones.
By overlaying the individual model predictions, the ensemble approach utilized each model’s strengths into consensus region of dose–pH–temperature combinations that minimize prediction uncertainty. At 25 °C, the optimal conditions for PACl occurred on 0.52–0.60 mg/L PACl at acidic and alkaline pH conditions, whereas the optimum conditions for FeCl3 shifted to 0.58–0.60 mM at pH 5.0–8.7. Increasing the temperature to 32.5 °C broadened the consensus region due to improved coagulation efficiency. These ensemble-derived guidelines provide a practical, data-driven foundation for designing and operating coagulation processes in BWRO brine treatment. More broadly, the results underscore the value of integrating complementary modeling techniques to enhance predictive reliability and support multiobjective optimization in water-treatment applications.
Considering both the accuracy of predictions and the practical requirements for wider application, response surface methodology (RSM) is recommended as a robust first choice. RSM demonstrated consistently high predictive power and produces smooth, interpretable response surfaces that can be easily adopted by practitioners in both academic and industrial settings. While support vector machines (SVM) and random forest (RF) provided additional insights, they may require more computational resources, expertise, and larger datasets for stable performance. Therefore, for a broader audience seeking a balance between reliability, simplicity, and accessibility, RSM represents the most practical modeling approach, with ensemble strategies offering added value where sufficient expertise and data are available.