Introduction

Industrial growth has significantly boosted economies and living standards, but it has also come at an environmental cost, particularly impacting freshwater resources through contamination with hazardous substances in processes such as manufacturing and cleaning. This issue has led to the implementation of stringent regulations on effluent discharge. The textile sector, which is a major consumer of dyes, accounts for approximately 90% of global organic dye production, resulting in the emission of 140,000 tons of wastewater annually [24, 51]. The textile industry, which plays a vital role in global fashion and economies, faces environmental challenges due to its growth and complex processes, especially the significant pollution caused by untreated wastewater. This issue, increasingly recognized for its ecological and health impacts, highlights the urgent need for sustainable treatment solutions [12, 19, 48, 57]. To elaborate, fabric manufacturing worldwide requires over three trillion gallons of fresh water each year, involving the use of various chemicals, dyes, and additives throughout the dyeing and finishing processes. This industry alone is responsible for one-third of all chemical emissions into the environment and makes significant contributions of toxic waste to soil, air, and water [14, 44, 55]. As a result, the wastewater generated is characterized by high levels of chemical oxygen demand (COD), suspended solids, and numerous synthetic dyes [55]. These contaminants critically deplete oxygen levels in water bodies have the potential to cause ecotoxic, mutagenic, and carcinogenic effects, and hinder light penetration, thereby jeopardizing aquatic ecosystems [13]. Additionally, it poses a threat to human health, as approximately 40% of colorants contain carcinogenic chlorine. Exposure to these chemicals can lead to a range of health issues, from allergies to more serious effects on children and the unborn [20, 36].

To mitigate environmental and health risks, it is crucial to treat industrial wastewater, particularly from the textile sector known for high levels of COD, color, pH, and contaminants. Various treatment methods, such as physical, chemical, and biological approaches, are utilized to meet discharge standards, integrating techniques like coagulation, oxidation, and membrane separation to effectively remove contaminants [16, 25, 32, 42, 47]. Conventional wastewater treatment methods have been extensively studied, but many of them fail to meet the stringent requirements for comprehensive contaminant removal [33, 40]. As the global landscape grapples with depleting freshwater resources and increasing wastewater pollution, the integration of sustainable wastewater treatment solutions has become a necessity rather than an aspiration. Within this framework, electrocoagulation (EC) stands out as a promising technique due to its effectiveness in removing diverse pollutants, ease of use, cost-effectiveness, and adaptability [29, 33].

The EC process is used to purify water and remove contaminants in aqueous environments. It serves as an alternative to chemical coagulation (CC), where metallic coagulants are introduced to water through the electro-dissolution of electrodes [30]. EC has gained increasing attention and is particularly effective for treating industrial effluents, such as textile and food processing wastewaters, which traditional methods struggle to address [18, 33]. EC combines the benefits of coagulation, flotation, and electrochemistry are into one system [4, 23]. It stands out for its use of simple equipment and operational ease, offering significant flexibility. One of its key advantages is the minimal usage of chemicals and reduced sludge production [15, 29]. The methodology involves applying an electrical current to electrodes submerged in wastewater, which releases metal cations that facilitate coagulation agents, enabling the removal of contaminants [1, 21]. This process integrates multiple mechanisms, including electrolytic reactions at electrode surfaces, coagulant formation in the aqueous phase, and pollutant adsorption on coagulants. As a result, contaminants are removed through sedimentation or flotation [22, 28, 37]. EC’s adaptability allows it to treat various compositions of wastewater. By adjusting parameters such as current density, electrode material, and pH, its efficiency can be enhanced [29, 58]. It has proven effective against pollutants such as COD, color, and turbidity. The removal efficiencies, especially for COD and turbidity, are influenced by factors like wastewater characteristics and operational variables [5, 28].

The efficiency of the EC process can be improved by adjusting key operational parameters. This process is highly adaptable and effective for treating different wastewater compositions. The parameters to consider include the electrode material, current density, retention time, chemicals used in the EC reactor, and the pH of the wastewater. Adjusting the current density and retention time affects the rate of electrochemical reactions and the formation of coagulants crucial for pollutant removal. The choice of electrode material and chemicals in the EC reactor is important because different materials and chemicals have unique electrochemical properties that impact the effectiveness of the EC process (Khandegar and Saroha, 2013; [56]).

In EC, sodium chloride (NaCl) is typically added to wastewater to regulate pH and conductivity. To achieve optimal efficiency, it is important to introduce chlorine ions until anions make up at least 20% of the total [3, 52]. Adding seawater, which has high conductivity and diverse ion composition, can enhance the efficiency of the EC process. Seawater has an average salt concentration of 3.5%, with sodium ions (11 g kg–1) and chlorine ions (19 g kg–1 accounting for about 3% [6, 38]. The presence of cations and anions, like Mg2+ and Ca2+, in seawater promotes the formation of hydroxide flocks, improving coagulation and pollutant elimination. Increasing the inclusion of seawater improves removal efficiency for parameters such as suspended solids, phosphate, color, and turbidity, although sulfate ion removal may not be greatly enhanced. Factors like ion concentration and conductivity, which are influenced by seawater, have a significant impact on the EC process [38]. Therefore, leveraging seawater can optimize the EC method and enhance wastewater treatment efficiency. Surprisingly, no other global studies have explored the role of seawater in textile wastewater treatment using the EC process.

This study aims to assess the effectiveness of incorporating different percentages of seawater in the EC process at various retention times, with a focus on analyzing essential physicochemical parameters. Wastewater samples were obtained from a textile industry, and their treatment was evaluated by adding varying proportions of seawater to the EC reactor. Both the wastewater and seawater were characterized. This study investigated the impact of wastewater quality parameters, such as pH, total suspended solids (TSS), total solids (TS), electrical conductivity, dissolved oxygen (DO), turbidity, chemical oxygen demand (COD), and color, on treatment efficiency. Furthermore, the ANOVA test, using Design-Expert 11 software was used to evaluate the influence of the independent variables, retention times, and seawater percentages, on the removal of pollutants from textile wastewater. An efficiency model was developed to enable the adoption of the EC process for treating textile wastewater in industries of different sizes. Additionally, the cost, efficiency, and sustainability of this innovative approach were compared with other conventional EC methods. This approach, which is being explored for the first time, is well suited to improving the treatment of textile wastewater and effectively mitigating its pollutants. Finally, the integration of EC with seawater shows promise as a potential treatment method for textile industries located near coastal areas, reducing the need for expensive chemical treatments.

Materials and methods

Sample collection

The wastewater for this study was obtained from an influent drain that is primarily fed by industrial effluents from textile factories associated with Apex Holdings Ltd. This location is approximately 300 m away from the Central Effluent Treatment Plant (CETP), which is illustrated in Fig. 1. The particular region where both the textile division and the CETP are operational is located in the Shafipur area of Kaliakoir upazila in the Gazipur District. Notably, an effluent treatment facility was incorporated by Apex Holdings Ltd. early on, marking them as one of the first textile composite establishments to take such an initiative for environmental considerations. The central biological ETP at Chandra, Kaliakoir, Gazipur, was designed with the capacity to process up to 8 million liters of wastewater daily, and a total Hydraulic Retention Time (HRT) of 100 h is recorded. A treatment capacity of 350 m3 per hour is set for the CETP.

Fig. 1
figure 1

Wastewater sample collection area

All samples were manually taken from the influent drain, where the textile effluent was directed using a lab bucket. The samples were collected at a volume of 2 L each and then thoroughly mixed. Once collected, the samples were transferred to the laboratory and stored to minimize decomposition or alteration of the effluent properties for further analysis. The seawater used in this study was obtained from the bank of Saint Martin Island (Latitude: 20°37′22.86″ N and Longitude: 92°19′12.76″ E) and transported to the lab. The characteristics of both the raw textile wastewater and seawater samples are presented in Table 1.

Table 1 Characterization of raw wastewater, seawater, and wastewater parameters after electrocoagulation with varying seawater percentages at different retention times of 45 and 90 min

Experimental setup

The experimental setup is shown in Fig. 2, where glass beaker was used as an EC reactor with the dimensions of 14.5 cm (height) and 10.5 cm (diameter). Two electrodes were used for simplicity and cost-effectiveness of the EC process, where carbon was used as the anode and mild steel was used as the cathode with an identical dimension of 16 cm (height) and 0.95 cm (diameter). The total effective electrode area was 38 cm2, the spacing between the electrodes was 9 cm, and spacing in between bottom of the EC reactor and electrodes was 2 cm, maintained throughout the experiment. The electrodes were connected to a digital DC power supply machine (Lodestar LP3005D; 0–30 V, 0–5 A). All the experiments were performed maintaining an initial room temperature of 25 ℃. Prior to each experiment, wastewater was filtered using a screen filter (1.18 mm) to remove large, suspended solids. Before starting the EC process physicochemical parameters, such as pH, TSS (mg/L), electrical conductivity (μS/cm), DO (mg/L), turbidity (NTU), COD (mg/L), and color (Pt–Co), of the raw textile wastewater were measured according to Standard Methods for the Examination of Water and Wastewater [43]. This was done to compare with the physicochemical parameters after the EC process incorporating different proportion of seawater. In each experiment, 600 cm3 of textile wastewater, collected from an influent drain primarily fed by industrial effluents from textile factories, was poured into the glass beaker used as an EC reactor. Seawater, at concentration of 0%, 5%, 10%, and 15% of the 600 cm3 of textile wastewater, was added to the EC reactor along with the raw textile wastewater. These specific concentrations were chosen to examine the incremental impact of seawater integration on the efficiency of the EC process in treating textile wastewater, specifically on key wastewater parameters such as pH, electrical conductivity, dissolved oxygen, and pollutant removal. This methodical approach aimed to evaluate the baseline efficiency of the EC process, the incremental impact on quality parameters, operational feasibility, and optimization of treatment efficiency, thereby providing a comprehensive insight into the efficacy of seawater in enhancing treatment outcomes. Throughout the experimentation, the current density was maintained at a predefined value with the voltage set at 20 V. After each 90 min of electrocoagulation, the total electrode current consumption was 0.82 A. Two separate retention timeframes of 45 and 90 min were set to conduct the EC processes to see how well different retention times of EC treatment could remove pollutants from textile wastewater mixed with seawater. These durations were chosen to compare the effects of shorter and longer treatment times on water quality and identify the optimal conditions for effective wastewater treatment of pollutant removal and the practical considerations of applying EC in real-world scenarios, optimizing the process for maximum efficiency and practicality. After each EC process of 45 and 90 min intervals, both the electrodes underwent a thorough cleansing procedure using mechanical brushing and distilled water to complete the removal of any potential residual solid deposits and impurities from the surfaces of both mild steel and carbon electrodes. Stojek [50] followed a similar approach in EC process. Furthermore, the electrodes were dried at room temperature and reweighted in order to be reused for the following EC process. At the beginning of the experiment, the weight of the carbon anode was 15.47 g, and the mild steel cathode was 51.58 g. After the EC process, the carbon anode loses its weight between 0.031 and 0.047 g, and the mild steel cathode gains weight between 0.024 and 0.032 g. The electrodes may be replaced by the new ones after 10 runs of 90 min. Then the scum was removed very carefully from the top of the EC reactor with the help of a laboratory spatula. The sludge removal in EC involves allowing the coagulated particles to settle after the treatment, followed by decanting the clear water from the top, which will go for further physicochemical analysis. To prevent increases in turbidity and TSS, careful handling of decanting clear water was applied to ensure the settled sludge does not resuspend into the treated water. Following the EC procedure, physicochemical parameters assessments were conducted after 45 and 90 min of retention time, with varying percentages of seawater, as was done before the EC process. The compositions of the wastewater and seawater are shown in Table 1. The turbidity (NTU) was analyzed using Hach (U.S.A) 2100Q Portable Turbidimeter, total suspended solids (mg/L), color (Pt–Co), and COD of samples were analyzed using a Hach (U.S.A) DR3900 benchtop visible spectrum (320—1100 nm), split beam spectrophotometer. The pH was measured by Hach (U.S.A.) Sension + PH31 Advanced GLP laboratory pH & ORP Meter. Other parameters, electrical conductivity (μS/cm) and dissolved oxygen (mg/L), were measured by Hach (U.S.A.) HQ40D Portable Dual Input Multi-Parameter Meter.

Fig. 2
figure 2

Schematic of experimental setup

Economic analysis

Table 2 illustrates the total estimated operating cost of the EC process based on the Bangladesh’s local market price of 2023. This approach can be tailored to achieve desired treatment levels, also flexible to make the process applicable for textile factories of different sizes and operational scales.

Table 2 Total estimated operating cost of the EC process

Removal efficiency

In this study, removal efficiency is considered one of the critical determinants influencing the EC process by assessing different physiochemical parameters. It was used as an indicator of the performance of the electrochemical cell and provided insights into the arrangement of the electrodes. The removal efficiency of contaminants and the rate at which the coagulation process was achieved were both found to be dependent on this parameter. To determine the removal efficacy, represented as Y (%), Eq. 1 was utilized.

$${\text{Y}}=\frac{{{\text{C}}}_{{\text{o}}}-{{\text{C}}}_{{\text{t}}}}{{{\text{C}}}_{{\text{o}}}} \times 100 \%,$$
(1)

where Y is the removal efficacy response; Co and Ct are the initial and final amount of pollutant (ppm) [8].

Statistical analysis

Descriptive statistics were applied to all data sets to calculate the mean and standard deviation. The fitness of the model with the experimental data was evaluated using statistical parameters such as mean, R2, R2-(adj), and Std. Dev. The ANOVA test was performed to determine the F-value, p-value, and significance of these models. All these statistical analyses were performed using Microsoft Excel® Version 16.1. software (Microsoft Corporation, Redmond, WA, USA) and Design-Expert® Version 11 (Stat-Ease, Inc., Minneapolis, USA). All tests were considered significant if the p-value < 0.05.

Results and discussion

Physicochemical analysis

The experiment aimed to utilize the EC process for wastewater treatment employing mild steel and carbon electrodes. Different percentages of seawater were introduced into the wastewater, and the process was tested over two retention times, 45 and 90 min, for different percentages of seawater intake, pH, TSS, electrical conductivity, DO, turbidity, COD, and color were subsequently measured to ensure the quality of the treated water to understand the impact of seawater on the treatment process. The measured values of these parameters at both the 45 and 90 min retention times are shown in Additional file 1: Table A1. The results indicate the effectiveness of this method in wastewater purification and whether the presence of seawater facilitates or hampers the process.

Effect on parameters

Effect on pH

The initial pH of the untreated wastewater was 8.16, indicating a slight alkalinity. Figure 3 shows a trend in which the pH increases as the seawater percentage and retention time increase. The underlying principle of these pH shifts is the balance between hydrogen and hydroxyl ions in the solution. During electrolysis, a significant number of hydrogen ions were expelled in the form of H2 gas. Simultaneously, there was an increase in OH ion production at the electrodes, potentially explaining the prevalent alkalinity across the samples [45]. At a retention time of 45 min, a positive correlation between the increase in seawater percentage and the addition of pH (9.85–11.04) value was observed. However, at a retention time of 90 min, there was an interesting observation: the pH (10.64–11.60) values initially increased with the introduction of up to 10% seawater but then underwent a decline when 15% seawater was added. A noteworthy aspect to consider is the high initial pH value for this experiment. Kobya et al. [28] determined optimal removal efficiencies when the initiation pH was under 8. Therefore, it might be recommended that refining the initial pH to values below 8 could enhance the electrolysis procedure [2]. Moreover, the initial pH of the sample wastewater was high and not regulated in this study. The removal efficiency can be expected to be more optimal if pH levels are controlled with buffer solutions.

Fig. 3
figure 3

Variation of pH for textile wastewater with varying seawater percentage at retention times of 45 and 90 min during electrocoagulation

Effect on DO

Figure 4 shows the impact of seawater addition on the DO levels is clearly depicted for two retention times: 45 and 90 min. For a retention time of 45 min, an initial increase in DO levels was observed when the seawater concentration increased from 0 to 5%. This was followed by a decrease from 5 to 15%. Interestingly, a higher DO concentration was recorded with a 10% seawater addition than a 15% addition. However, for the 90 min retention, a consistent increase in DO levels was noted from 0 to 10% seawater addition. Beyond the 10% mark, a slight drop in DO concentration was observed, up to 15% seawater addition. For a retention time of 45 min, the DO concentration increased from 0.3 mg/L with 0% seawater addition to 7.24 mg/L with 5% seawater addition. This increase is attributed to the addition of seawater, which has a high DO level of 7.91 mg/L, to the textile wastewater that initially had a low DO value of 0.14 mg/L, thereby significantly enhancing the DO concentration in the mixture. The lowest addition of DO was found at 4.77 mg/L for the retention time of 90 min at 0% seawater addition, which is far better than the addition at 45 min retention time, and the highest was 6.69 mg/L at 10% addition of seawater. A peak DO level of 7.24 mg/L was achieved when 5% seawater was added during a 45 min retention time. The oxygen generation at the anode might have contributed to the DO elevation in the treated wastewater. Based on these trends, it can be inferred that the seawater concentration and retention time are the dominant factors influencing DO addition in the EC process. The effect of DO in electrocoagulation is studied for the removal of selenium and cadmium [9, 54]. However, no study has been conducted combining seawater with electrocoagulation.

Fig. 4
figure 4

Variation of DO for textile wastewater with varying seawater percentages at retention times of 45 and 90 min during electrocoagulation

Effect on electrical conductivity

In Fig. 5, the effects of varying seawater concentrations on the electrical conductivity were determined for two retention times: 45 and 90 min. A steady increase in electrical conductivity was observed as the seawater percentage increased across both retention times with no seawater addition, and a minimal level of electrical conductivity addition was detected. The data points for the 45 and 90 min retention times closely follow parallel trajectories, suggesting that while retention time has an influence, it operates in cycles with seawater percentages to affect electrical conductivity levels. As the seawater concentration progressively increased, a consistent upward trend in electrical conductivity was observed, indicative of the enhanced presence of electrical conductivity with increasing seawater percentages. For the retention time of 45 min, the lowest electrical conductivity addition was 2380 μS/cm at 0% seawater addition, and the highest was 9080 μS/cm at 15% seawater addition. The lowest addition of electrical conductivity was found to be 2440 μS/cm for the retention time of 90 min at 0% seawater addition, and the highest was 9690 μS/cm at 15% addition of seawater. Seawater is rich in various salts and minerals that can significantly increase its electrical conductivity. Based on these trends, it can be inferred that seawater concentration is a dominant factor influencing the addition of electrical conductivity, with retention time playing a significant role in modulating this relationship. Also, when the seawater concentration and retention time increase, the electrical conductivity also increases. In a study by Nguyen et al. [34], it was found that increasing the NaCl solution concentration leads to higher electrical conductivity. This, in turn, improves the removal efficiency of phosphate in a shorter electrolysis time and minimizes the environmental impact. A similar phenomenon was observed in the present study when seawater was added to the electrocoagulation process.

Fig. 5
figure 5

Variation of electrical conductivity (μS/cm) for textile wastewater with varying seawater percentages at retention times of 45 and 90 min during electrocoagulation

Effect on TSS

Figure 6 illustrates the impact of varying seawater percentages on the removal efficiency of TSS at two distinct retention times: 45 and 90 min. At a retention time of 45 min, with no seawater addition, the base removal efficiency of the TSS was observed. A pronounced removal efficiency transition was evident with the introduction of seawater, particularly within the 0 to 5% seawater addition range. This transition manifests as a linear increase, suggesting enhanced removal of TSS with increasing seawater percentage. Beyond 5% seawater addition, the removal efficiency plateaued, maintaining consistent levels of up to 15% seawater concentration. The results indicated that a 10% addition of seawater demonstrated the highest (99.04%) removal efficiency within the range of 5 to 15% seawater addition in terms of 45 min retention time. In contrast, the 90 min retention time showed a distinct behavior at 0% seawater addition, where appreciable removal of TSS (39.52%) was achieved in the absence of seawater, and the highest removal of TSS (99.52%) was observed with the addition of 15% seawater for 90 min retention time. The removal efficiency of the 5 to 15% seawater addition range mirrors the trend observed at 45 min, indicating comparable removal capacities at both retention times within this concentration window. Previous studies by Bener et al. [10] found that the removal efficiency of TSS was 64.7%, with optimum conditions at a current density of 25 mA/cm2, an optimum pH of 5, and 120 min of retention time. In another study, Paramita et al. [39] found 71.9% removal of TSS using aluminum electrodes (Al6061-T6) under the optimum condition was selected at a time of 15 min, 5.5 mA/cm2 of current density, and 2 cm of electrode distances. In recent studies, Zafar et al. [56] found a TSS removal efficiency of 75% under optimum conditions having pH of 7–8, 15 V voltage, 60 min contact time, 2 cm aluminum interelectrode distance, and 20 min settling time. In this study, the highest TSS removal percentage (99.52%) was observed at a retention time of 90 min with the addition of 15% seawater. Therefore, it can be stated that the addition of seawater and a longer retention time resulted in a higher removal of TSS in textile wastewater.

Fig. 6
figure 6

Removal efficiency of TSS (%) for textile wastewater with varying seawater percentages at retention times of 45 and 90 min during electrocoagulation

Effect on turbidity

The analysis of Fig. 7 suggests that, at a retention time of 45 min, an increase of 0 to 5% in seawater (%) can result in significant differences in turbidity removal efficiency (%). The data indicate a consistent trend within the 5 to 15% range for both retention times. The impact of varying seawater concentrations on the turbidity removal efficiency was examined. The results indicated that a 0% addition of seawater resulted in the lowest (28.67%) removal efficiency, while a 5% addition of seawater demonstrated the highest (99.30%) removal efficiency within the range of 5 to 15% seawater addition in terms of 45 min retention time. In the context of retention time, the trend observed for a retention time of 90 min closely resembled that observed for a retention time of 45 min. However, a 0% addition of seawater with 90 min retention time showed the lowest (38.81%) turbidity removal efficiency (%), which is higher than the 0% addition of seawater at a retention time of 45 min, while a 10% addition of seawater demonstrated the highest (99.03%) removal efficiency within the range of 5 to 15% seawater addition for 90 min retention time. Bener et al. [10] found the removal efficiency of 83.5% turbidity, selecting an optimum condition at a current density of 25 mA/cm2, an optimum pH of 5, and 120 min of retention time, using Al electrodes. In another study, Núñez et al. [35] found that 82% turbidity removal was achieved at a retention time of 10 min when the current density was 8 mA/cm2 and the controlled pH was 7.1. In another study, Martins et al. [31] found turbidity removal ranging from 74 to 85% using 304 stainless steel electrodes in batch mode. In recent studies, Sqalli Houssini et al. [49] found 98.5% turbidity removal efficiency using bipolar connections of Fe-Al electrodes. In this study, the highest turbidity removal percentage (99.30%) was found at a retention time of 45 min, with the addition of 5% seawater. Therefore, it can be stated that the addition of seawater results in a higher turbidity removal in textile wastewater.

Fig. 7
figure 7

Removal efficiency of turbidity (%) for textile wastewater with varying seawater percentages at retention times of 45 and 90 min during electrocoagulation

Effect on COD

Figure 8 illustrates the impact of varying percentages of seawater concentration on COD removal efficiency (%) for textile wastewater at two distinct retention times: 45 and 90 min. Now, at a retention time of 90 min, there was a noticeable upward linear trend in COD removal efficiency (%) from textile wastewater as seawater concentration rose from 0 to 10%. However, for seawater with a 10 to 15% increase, there was a downward linear trend or decrease in the removal efficiency of COD. Moreover, the highest removal efficiency was achieved at a 5% seawater concentration of 40.41% at 45 min retention time, and the lowest was achieved at a 0% seawater concentration of 6.5%. In contrast, at a retention time of 90 min, there was an increase in the COD removal efficiency with the addition of seawater, ranging from 0 to 5%. However, a sudden decrease in the removal efficiency was observed when seawater addition was increased from 5 to 15%. Increasing the seawater concentration from 5 to 15% in the EC process has resulted in a decrease in COD removal. This could be attributed to several factors, including pollutant dilution, increased electrical conductivity leading to inefficiencies, ion competition affecting coagulation, and pH changes impacting the effectiveness of the treatment. In order to achieve optimal COD reduction, it is crucial to carefully balance the seawater levels. Furthermore, the highest removal efficiency of 47.26% was observed at 10% seawater concentration, and the lowest was observed at 0% seawater concentration of 9.58% at a 90 min retention time. Previous studies conducted in EC process textile wastewater by Khorram and Fallah [27] found a 40% removal of COD under optimum conditions of 60 min retention time and current density of (15–35 mA/cm2). Núñez et al. [35] found that 59% of COD removal was achieved at 10 min retention time when the current density is 8 mA/cm2 and the controlled pH was 7.1. Furthermore, Bener et al. [10] found 18.6% COD removal at a current density of 25 mA/cm2, an optimum pH of 5, and a retention time of 120 min. In recent studies, Zafar et al. [56] found COD removal efficiency of 79% under optimum conditions having pH of 7–8, 15 V voltage, 60 min contact time, 2 cm aluminum interelectrode distance, and 20 min settling time. Thus, at a 90 min retention time with 10% seawater addition, 47.26% COD removal was observed in this study without controlling the pH at 20 V.

Fig. 8
figure 8

Removal efficiency of COD (%) for textile wastewater with varying seawater percentages at retention times of 45 and 90 min during electrocoagulation

Effect on color

The analysis of Fig. 9 suggests that at a retention time of 90 min, an increase of 0 to 5% in seawater (%) can result in significant differences in the removal efficiency of color (%). The data indicate a consistent trend within the 5 to 15% range. The results indicated that a 0% addition of seawater resulted in the lowest removal efficiency of 1.35%, whereas a 5% addition of seawater demonstrated the highest removal efficiency of 98.19% at 45 min. Moreover, at 90 min retention time, the highest removal efficiency was achieved at a 10% seawater concentration of 96.19%, and the lowest was 3.67%, achieved at 0% seawater concentration. In terms of retention time, the observed trend for a retention time of 45 min closely resembles that for a retention time of 90 min. For both retention times, the 10% addition of seawater showed the highest color removal. Previous studies on the textile wastewater EC process by Bener et al. [10] reported 90.3 to 94.9% color removal using an Al electrode current density of 25 mA/cm2, an optimum pH of 5, and a retention time of 120 min. Chackrabartty et al. [11] found color removal of 93.4% by assessing textile wastewater at an initial pH of 5 with 24 V. Núñez et al. [35] study in textile wastewater found 86% of color removal at a controlled pH of 7.1 with 10 min retention time and 8 mA/cm2. Furthermore, Khorram and Fallah [27] found 97% color removal at an initial pH of 5.5 with a retention time of 23 and a current density of 15 mA/cm2. In recent studies, Kalia et al. [26] found the best removal of color (90%) from raw textile effluent using a zinc-coated iron electrode at a current density of 25 mA/cm2 by employing EC followed by partially purified laccase treatment (LT) and activated carbon (AC) polishing at ambient conditions. In another study, Zafar et al. [56] found a discoloration removal efficiency of 86% under optimum conditions having pH of 7–8, 15 V, 60 min contact time, 2 cm aluminum interelectrode distance, and 20 min settling time. The increase in color removal efficiency from textile wastewater using EC with added seawater is due to enhanced electrical conductivity, improved coagulation dynamics from ionic strength, and effective floc formation. The dilution effect of seawater, with a color value of 13 (Pt–Co), is crucial in the treatment process. As more seawater is added, it dilutes the mixture being treated and lowers the overall color value of the wastewater. These factors work together to improve the removal of color-causing compounds. Seawater's unique composition also promotes the generation of effective coagulants. This highlights the potential of incorporating seawater into EC processes for more efficient color removal. Thus, the results illustrate that color can be removed efficiently at 5% seawater concentration with a 45 min retention time without changing the pH at 20 V in the EC process of textile wastewater.

Fig. 9
figure 9

Removal efficiency of color (%) for textile wastewater with varying seawater percentages at retention times of 45 and 90 min during electrocoagulation

Statistical analysis using design-expert® (Version 11)

Table 3 shows the ANOVA test results for the impact of retention time and seawater percentage on the various water quality parameters. The pH model resulted in an average value of 10.89 with a standard deviation of 0.1456. The coefficient of determination (R2) is 0.954, and an adjusted R2 value of 0.921 is noted. A high F-value of 29.16 and a statistically significant p-value of 0.0002 were recorded. The electrical conductivity model exhibited an average of 6059.23 µS/cm with a standard deviation of 201.30. An exceptionally high F-value of 388.81 indicates a very significant model term, corroborated by a p-value of less than 0.0001. The DO model showed a mean value of 5.59 mg/L and a standard deviation of 1.02. The R2 value was 0.844, with an adjusted R2 of 0.733. The F-value and p-value are recorded as 7.61 and 0.0095, respectively. The mean value for the TSS removal efficiency model was 80.55%, with a standard deviation of 11.10. The R2 and adjusted R2 values are 0.943 and 0.902, respectively. The F-value was 23.29, and the corresponding p-value was 0.0003. The mean removal efficiency of the turbidity model was 83.98%, with a standard deviation of 8.19. The R2 and adjusted R2 values are 0.9526 and 0.9186, respectively. An F-value of 28.07 and a significant p-value of 0.0002 were observed. The mean removal efficiency of the COD model was 30.11%, with a standard deviation of 5.33. Its R2 value was 0.9121, with an adjusted value of 0.8493. An F-value of 14.52 is observed, with a p-value of 0.0014. Finally, the removal efficiency of the color model showed a mean of 74.62% with a standard deviation of 11.61. The observed R2 was 0.9535, and the adjusted R2 was 0.9203. The F-value was 28.72, with a significant p-value of 0.0002. High F-values illustrate the significance of each parameter in the model. Moreover, p-values less than 0.05 generally denote statistical significance, and in this study, all parameters showed p-values below this threshold, confirming the reliability and significance of the findings. Furthermore, the expected and predicted values of the physicochemical parameters of ANOVA test is shown in Additional file 1: Table S1. Similar observations are reported by other researchers, e.g., [7, 41].

Table 3 ANOVA test results for the impact of retention time and seawater percentage on various water quality parameters

3D plots, as illustrated in Figs. 10 and 11, were assessed to analyze the interaction between the input factors (retention times of 45, and 90 min. and seawater percentages of 0, 5, 10, and 15%) on the pH, electrical conductivity, DO, and the removal of TSS, turbidity, COD, and color of textile wastewater in the EC process, respectively. In this study, an ANOVA test using Design-Expert® (Version 11) was performed. It used 13 runs to assess various water quality parameters, with the aim of understanding their relationships and significance with respect to retention time and seawater increase. Based on the ANOVA test, the following observations were made.

Fig. 10
figure 10

3D plots of the selected parameters with respect to seawater percentage and retention time increase: a pH; b electrical conductivity; and c DO

Fig. 11
figure 11

3D plots of removal efficiency of the selected parameters with respect to seawater percentage and retention time increase: a TSS; b turbidity; c COD; and d color

Application of the process

In this study, the integration of seawater into the electrocoagulation (EC) process for textile wastewater treatment is compared with conventional EC process for the treatment of textile wastewater. The process is characterized by its versatility, allowing for adjustments in seawater percentages and retention times, making it suitable for the treatment of various types of textile wastewater with different contaminant profiles. This adaptability is crucial for the textile industry, which often deals with a wide range of dyes and chemicals. It is indicated by the research that higher seawater percentages and extended retention times can significantly enhance pollutant removal for key pollutants such as COD, TSS, turbidity, and color, suggesting that this approach can be tailored to achieve desired treatment levels. It is observed that the integration of seawater in the EC process results in lower electricity consumption, recorded at 15.769 Am-2, as seawater is rich in ionic content seawater is shown to improve the conductivity of wastewater, potentially leading to more efficient coagulation and lower energy requirements. This leads to a low-cost approach for the textile wastewater treatment industry, as the EC process typically requires electricity, which discourages the textile industry from using this system. The incorporation of seawater is found to reduce electricity costs to 0.29 USD/m3. In previous studies, when aluminum and iron electrodes were used, the operating cost was recorded at 1.5 USD/m3 [10]. Similarly, when aluminum was used as an anode and cathode, the operating cost analysis was reported as 0.70 USD/m3 [53]. When using copper sheets as electrodes, the cost was reported between 0.803 and 3.03 USD/m3 [46]. The data indicate that the cost of using seawater in the EC process is much lower than other conventional EC processes. Furthermore, the requirement for additional chemicals in the EC process is eliminated, which reduces the overall cost of the EC process, and allows the treated effluent for reuse applications. This method capitalizes on the natural ionic properties of seawater to significantly enhance the removal efficiencies of pollutants, offering a sustainable and cost-effective solution for textile wastewater management.

The application of the findings from this study in the textile industry offers a promising way for managing wastewater sustainably. Implementing EC technology with seawater integration requires minimal adjustments to existing treatment infrastructures, making it a feasible and cost-effective solution. By utilizing the natural ionic properties of seawater, this approach not only takes advantage of the abundance of seawater but also improves treatment efficiency and reduces reliance on chemical coagulants and operational costs. The potential of this technique goes beyond the textile industry, making it applicable in coastal regions and highlighting a proactive approach to using natural resources for pollution control. This development signifies a significant shift toward more sustainable industrial processes, demonstrating the practical applicability and potential impact of incorporating seawater into wastewater management strategies.

The variable composition of seawater presents an opportunity for optimizing the treatment process through adaptive monitoring and control systems. The composition of seawater can vary depending on location, season, and environmental factors, which can affect the treatment process. Changes in ionic strength and conductivity may influence the efficiency of the electrocoagulation process. To address this, treatment facilities need to implement monitoring systems to regularly assess seawater composition and adjust treatment parameters accordingly to maintain consistent removal efficiencies. For facilities located in coastal areas, seawater is readily available, making it a viable option for integration into wastewater treatment processes. However, the feasibility of this approach diminishes for inland facilities due to the cost and logistics of transporting seawater. Therefore, the geographical location plays a crucial role in the practical application of this treatment method. Developing adaptive control systems that can adjust operational parameters, such as seawater percentage and retention time, in response to real-time data on wastewater and seawater characteristics could enhance the efficiency and consistency of the process. Continuous research and development efforts are also crucial to optimize the process for different wastewater compositions and mitigate adverse effects of seawater variability. The scalability of this innovative process is facilitated by the development of dedicated infrastructure, such as enhanced EC cells and seawater storage solutions, which are investments that pay off through improved treatment efficiencies and reduced reliance on chemical coagulants. The process's flexibility makes it applicable to textile factories of different sizes and operational scales.

Given the inherent variability of effluent characteristics and seawater quality, operators in industrial applications may face significant challenges in maintaining the effectiveness of the EC process for textile wastewater treatment. To address these challenges, it is crucial to implement a dynamic control strategy that can adapt to changing input qualities. This strategy involves continuously monitoring key wastewater quality parameters to enable real-time adjustments to the EC process. By varying the proportion of seawater and adjusting retention times based on real-time data, operators can optimize the removal efficiencies for pollutants despite the variability in effluent and seawater. Furthermore, leveraging advanced predictive models and machine learning algorithms can enhance the adaptability of the EC process, allowing for predictive adjustments and ensuring consistent treatment outcomes. This approach ensures the robustness and resilience of the wastewater treatment process and aligns with sustainable water management practices by optimizing the use of natural resources and minimizing chemical usage.

Using seawater in the EC process for wastewater treatment offers significant environmental and sustainability benefits, especially in coastal regions. This approach optimizes the use of seawater, a naturally abundant resource, to reduce reliance on freshwater resources, which is crucial in areas with water scarcity. By incorporating seawater, this process reduces the need for chemical coagulants, resulting in lower operational costs and a smaller chemical footprint. Additionally, it enhances energy efficiency by taking advantage of the improved electrical conductivity from seawater. This aligns with sustainability goals by making better use of renewable resources. Moreover, this method emphasizes environmental stewardship by carefully considering the materials used in the treatment process to resist corrosion and scaling caused by seawater's ionic content. Continuous innovation and research focus on optimizing the seawater EC process, including managing increased salinity and exploring durable materials, to enhance sustainability and efficiency in wastewater treatment.

In essence, the use of seawater in the EC process represents a sustainable, innovative solution for wastewater management that conserves freshwater, reduces chemical usage, and potentially lowers energy requirements, all while maintaining adherence to environmental regulations and standards. This approach not only mitigates the environmental impact of traditional wastewater treatment methods but also offers a practical, cost-effective solution for enhancing water resource management in coastal and water-scarce regions, which is beneficial for the environment and aids in meeting Sustainable Development Goals (SDG).

Conclusions

The influence of seawater addition and retention time on water quality parameters such as pH, TSS, electrical conductivity, DO, turbidity, COD, and color was significant in the context of textile wastewater treatment by the EC process. The highest removal efficiencies were 47.26% for COD, 99.52% for TSS, 99.30% for turbidity, and 98.19% for color. However, the addition of seawater led to a significant increase in pH, electrical conductivity, and DO. An ANOVA was conducted to assess the effects of retention time and seawater percentage on pollutant removal and water quality parameters. These results showed p-values less than 0.05 for pH (0.002), electrical conductivity (< 0.0001), DO (0.0095), TSS (0.0003), turbidity (0.0002), COD (0.0014), and color (0.0002), confirming the reliability and significance of the findings. These findings can be used to optimize textile wastewater treatment procedures and determine the appropriate retention times and seawater percentages to achieve the desired water quality parameters. The results indicated that longer retention times and higher seawater percentages were effective in increasing DO and removing COD, turbidity, TSS, and color in the EC process. Overall, higher seawater percentages and longer retention times were found to be effectively remove textile wastewater contaminants, such as TSS, turbidity, COD, and color, while balancing electrolysis efficiency. These findings provide valuable insights for optimizing treatment processes.

Future research should expand the assessment of wastewater quality parameters, such as BOD, TOC, and key microbiological indicators like total coliforms, fecal coliforms, and E. coli, due to their health implications. Investigating seasonal and temporal changes in seawater characteristics and their impact on treatment outcomes is recommended due to variability. Including various industries beyond textiles will provide a clearer understanding of wastewater treatment in different contexts. Furthermore, it is crucial to assess the environmental impact of treated wastewater with diverse seawater compositions to evaluate its potential for discharge or reuse.