Introduction

Various industries currently release a large amount of wastewater into the environment. This leads to the occurrence of major environmental problems, including the presence of many harmful chemicals and toxic materials in biological life (Shahedi et al. 2020). For this reason, environmental pollution caused by industry is a major concern for countries around the world. Due to the significant growth in the pharmaceutical industry, it discharges comparatively high amounts of waste when compared to other industrial sectors. These large amounts of pharmaceutical wastewater (PhWW) require suitable management to reduce the advanced effects they have on both human health and the environment (Gökkuş and Yıldız 2015).

PhWW is unique compared to conventional wastewater due to its high content of large organic contaminants consisting of different drug compounds. The COD and biological oxygen demand (BOD) concentrations in this wastewater can range from 1000 to 10,000 mg/L and 500 to 2500 mg/L, respectively (Guo et al. 2017), although these values may vary across different factories and production processes. For this reason, PhWW has become one of the world's most serious health issues, affecting aquatic life, humans, and the environment (Ponnusami et al. 2023; Khalidi-Iidrissi et al. 2023). It contains a diverse range of toxic substances, non-biodegradable organic contaminants, and pharmaceutical residues that have a significant negative impact on the environment (Verlicchi et al. 2012; Zhao et al. 2019). Accordingly, PhWW consists of a variety of pollutants that are both toxic and non-biodegradable. Therefore, it is imperative to treat PhWW prior to its discharge to avoid various health and environmental risks (Kanakaraju et al. 2018; Al-Zboon et al. 2022; Al-Zghoul et al. 2023).

Treating and reusing wastewater is a global environmental priority, driven by pollution prevention, sustainability, and water scarcity (Chandra et al. 2020). However, treating PhWW is challenging due to its complex and variable nature, which makes it difficult to treat using conventional methods. As a result, some processes include reverse osmosis (Mariam and Nghiem 2010), photocatalysis (Qu et al. 2013), ion exchange (Mousazadeh et al. 2021), biological processes (Al-Qodah et al. 2019), adsorption (Al-Qodah et al. 2020), and electrocoagulation (EC) (Chandra et al. 2020; Faraj et al. 2023). PhWW is characterized by a strong odor, intense color, high COD, and low BOD (Farhadi et al. 2012). The presence of inhibitory substances in PhWW can hinder the activity of microorganisms during biological treatment, necessitating additional advanced chemical and physical processes for successful treatment (Guieysse and Norvill 2014; Al-Qodah et al. 2019; Pilli et al. 2020).

The EC treatment process is considered one of the most effective approaches for treating industrial wastewater (Al-Qodah et al. 2020; Al-Soud et al. 2022; Jiang et al. 2017; Hakizimana et al. 2017; An et al. 2017; Castañeda-Díaz et al. 2017). Numerous studies have highlighted the benefits of EC, such as the removal of colloidal materials, avoiding the use of chemicals, simple operation, and easy sludge collection (Siringi et al. 2012; Khandegar and Saroha 2013; Al-Qodah et al. 2022; Faraj et al. 2023). It has been successfully applied to various wastewater effluents, including those containing organic contaminants. The EC process requires a low-intensity electrical current to work. This technology can therefore be powered by environmentally friendly methods, including fuel cells, solar panels, and wind turbines (Brillas and Martínez-Huitle 2015; Hussin et al. 2019). This study explores solar photovoltaic (PV) as a friendly energy source for EC electrolysis reactions. This source will reduce both CO2 treatment costs and environmental pollution while increasing the process lifespan (Colacicco and Zacchei 2020; Valero et al. 2008).

Anode consumption and electrode passivation are major drawbacks of the EC method, reducing its efficiency. Additionally, the need for an electrically conductive medium may require the addition of salts to nonconductive effluents (Al-Qodah et al. 2020). Combining EC with a pre- or post-treatment process can enhance its removal efficiency (Pizutti et al. 2019; Kadier et al. 2022; Jamrah et al. 2023). Previous studies have shown that combined processes such as the combination of EC and adsorption (ECA) have higher removal efficiency, up to 20% more than EC alone (Al-Qodah et al. 2020; Alfonso-Muniozguren et al. 2021). This approach can result in highly purified, treated wastewater that leads to efficient water reuse (Al-Qodah and Al-Shannag 2017; Swain et al. 2020; Al-Zghoul et al. 2023; Faraj et al. 2023).

Adsorption is a low-energy requirement that can remove soluble and suspended contaminants with a 99.9% removal efficiency and can also reduce organic and inorganic pollutants (Ali et al. 2012; Castañeda-Díaz et al. 2017; Zhou et al. 2018; Rajab et al. 2022; Faraj et al. 2023). The primary objective of this research is to apply a solar-powered combined EC and adsorption, ECA treatment system. This ECA treatment system will be applied for the first time to treat PhWW. The performance of the treatment process will be evaluated by analyzing efficient COD reduction as an indicator of water quality. This solar-powered ECA represents a novel approach as it is applied in the present research for the first time to treat PhWW. This treatment system is expected to achieve superior results compared to single treatment processes. The performance of the treatment process was evaluated by analyzing an efficient COD reduction as an indicator of water quality and is expected to achieve superior results compared to single-treatment processes. The quality of the treated PhWW will be verified for reuse. The system will involve an EC process as the initial step to remove suspended solids and colloidal materials from the raw wastewater. The EC-treated effluents will then enter the adsorption process to eliminate most of the remaining soluble COD.

Experimental

Wastewater characterization

The wastewater used in this research was sourced from the treatment plant of a drug factory located near Amman, Jordan. Samples of the required PhWW were collected from the raw wastewater using clean 20-L plastic containers, resulting in a total volume of approximately 100 L. After collection, the container was promptly transported to the laboratory at the Al Balqa Applied University in Amman. To examine the chemical and physical properties of the PhWW, several preliminary tests were performed, including measurements of BOD5, initial COD, pH, temperature, and electrical conductivity. The remaining sample was stored at 4 °C in a refrigerator for future use, as per the study's objectives. Table 1 presents the initial average properties of the raw PhWW samples used in this research.

Table 1 Some initial parameters of PhWW

Chemicals

All chemicals used in this study were of analytical grade. The chemicals, including sodium chloride (NaCl) and hydrochloric acid (0.1 N of HCl), were bought from Hiba Medical and Lab Supplies, Amman, Jordan. Sodium hydroxide NaOH (0.5 M) (POCH), silver sulfate Ag2SO4, potassium dichromate K2Cr2O7 (0.25 N) (Riedel-deHaen), and sulfuric acid H2SO4 were bought from Alnoorien Company, Amman, Jordan. The carbon dioxide (CO2) gas was also bought from the Jordanian Gas Company (JGC), Amman, Jordan.

The integrated ECA system

As mentioned above, this research employed a combined system consisting of two successive steps: (1) EC and (2) adsorption. The adsorption step used as a polishing step is to obtain very clean, remediated wastewater.

Solar-Powered Electrocoagulation (SPEC)

The experiments were conducted in batch mode using a 3-L rectangular reactor made of plastic with dimensions of 29 cm × 8 cm × 13 cm. A schematic diagram of the experimental SPEC system used in the present research is shown in Fig. 1.

Fig. 1
figure 1

A schematic diagram of the SPEC system 1, a photovoltaic panel; 2, a battery; 3, a DC-DC charge controller; 4, a stirrer; and 5, an electrocoagulation cell

Figure 1 shows the SPEC apparatus. The use of iron electrodes was due to their reactivity, accessibility, and relatively low cost. The electrodes contain 20 holes with a diameter of 0.5 cm. The solution contained six electrodes, which were submerged to a depth of 9 cm with a distance of 4 cm between each electrode. The electrodes were equipped with plastic spacers formed in a way to keep the electrodes in their positions and maintain their vertical parallelism. The EC consisted of six electrodes: three anodes and three cathodes. The perforated iron electrodes used in this study were rectangular, with dimensions of 9 cm × 6 cm and 1 mm in thickness. The overall effective surface area of the anodes equals the area of each anode from both sides × 3 which was 9 × 6 × 2 × 3 = 324 cm2. On the other hands, the area of the holes from both sides in the three electrodes equal [{(0.196 × 20) × 2} × 3] = 23.52 cm2. Accordingly, the effective surface area of the electrodes submerged in the PhWW solution was around 300.48 cm2.

A monocrystalline silicon photovoltaic module that operates using solar energy powered the EC process. A photovoltaic panel with 90 watts of maximum power (PS-M36S-90, manufactured by Philadelphia Solar Co., in Amman, Jordan) was installed on the roof of the chemical engineering department labs in Amman, which are located at (32° 00′ 07'') north latitude and (36° 00′ 44'') east longitude. The connection of the solar photovoltaic to the EC reactor was made using normal electrical wires of 1.5 mm, isolated with PVC, and connected to a sealed acid rechargeable battery (NPP 12–5.0 12V5.0Ah/20HR, manufactured by NPP Power Co. Ltd., in Guangzhou, China) to store energy. A DC-DC charge controller with current and voltage of 0–10 A and 0–12 V, respectively, followed the battery. The current was adjusted using a digital potentiometer voltmeter (Drok YB27VA, manufactured by Robu Co. in China). A further connection was made to the iron electrodes within the reactor. During the experiments, the cell current was kept constant by altering the cell voltage accordingly.

The EC process works on the premise of creating a coagulant in situ by electrically dissolving metal ions from the soluble anodes. These metal ions then combine with the hydrogen gas created at the cathode to create the coagulant (Castañeda-Díaz et al. 2017). Iron (Fe) was selected as the electrode material in this study due to its accessibility and low cost. The following chemical reactions occur on the iron electrodes, resulting in the formation of ferric hydroxide as a coagulant (Ezechi et al. 2012). The following subsequent steps can summarize the mechanism of the EC:

  1. 1-

    Anode oxidation to form positive ions.

  2. 2-

    At the cathode, water molecules reduce to form hydroxyl ions (OH) in addition to hydrogen (H2) bubbles.

  3. 3-

    The formed metal and hydroxide ions move toward the cathode and anodes, respectively. This movement destabilizes and breaks down the pollutant emulsion.

  4. 4-

    Then metallic hydroxide molecules form from the interaction of metal and hydroxide ions. These metal hydroxide molecules have high adsorption properties, which then develop into complex structures that sweep in the destabilized emulsion.

  5. 5-

    The formed hydroxide polymeric structures adsorb the pollutants molecules, forming larger aggregates.

  6. 6-

    Possible redox reactions may convert pollutants into less toxic forms.

  7. 7-

    The formed hydrogen bubbles float the aggregates that rise upward to the surface of the liquid phase, or the aggregates precipitate if their density is higher than the medium.

The main reactions that usually occur with iron anodes are:

Anode:

$$F{e}_{(s)}\leftrightarrow {F{e}^{2+}}_{(aq)}+2{e}^{-}$$
(1)

Cathode:

$$2{H}_{2}{O}_{({\text{I}})}+2{e}^{-}\leftrightarrow {H}_{2(g)}+2O{H}_{(aq)}$$
(2)

Overall:

$$F{e}_{(s)}+2{H}_{2}{O}_{({\text{I}})}\leftrightarrow Fe{(OH)}_{2(s)}+{H}_{2(g)}$$
(3)

In each experiment, a fresh sample of the PhWW was placed in the EC tank. The EC process proceeds under several varied conditions. These include electrode inter-distance, current densities, the number of electrodes, and operation time, which vary from 2 to 4 cm, 3.328 to 9.984 mA/cm2, 1–3 pairs, and 5–60 min, respectively. In addition, the electrode configurations used were MP-P, MP-S, and BP-S. In all experiments, 1000 mg/L NaCl was added to enhance conductivity during the EC process. During the operation, some solids precipitated on the electrodes. For this reason, at the end of each experiment, the reactor and electrode surfaces were thoroughly cleaned with a 0.1 M HCl solution to eliminate any residual solids. The electrodes were then rinsed with distilled water to prevent passivation. Additionally, the utilized electrodes were reclaimed by polishing the oxide layer with abrasive paper, washing them with a 0.1 N HCl solution, rinsing them with distilled water, and drying them with sandpaper. Samples obtained from the reactor bottom using a pipette were filtered before analysis. This process was repeated for all operational parameters. The use of perforated electrodes was noticed to reduce electrode passivation compared to non-perforated electrodes (Ibrahim et al. 2020). The perforation of the electrodes permits the liquid to move between the electrodes instead of being stagnant, especially if the distance between the electrodes is small. In other words, the pores permit some turbulence and movement of the medium through the electrode holes across the container.

Adsorption

The batch experiments in this study were conducted using a cylindrical plastic reactor with a volume of 1 L and dimensions of 18 cm in height and 16 cm in diameter. For further treatment of PhWW and to produce very clean treated wastewater that can be safely reused, the adsorption process was used (as a polishing step) with silica as an adsorbent due to its low cost and its abundance in the local environment. The experimental tests were carried out in two parts: equilibrium isotherms and adsorption kinetics.

Preparation of sand adsorbent

Sand grains were brought from Aqaba Beach; 20 g of sand grains were taken and prepared by adding 50 ml of hydrochloric acid (HCl; 0.5 M) and stirring continuously for 10 min. Then it is washed with distilled water and filtered. Then, 50 ml of NaOH (0.5 M) was added with a constant stirring speed of 100 rpm for 10 min, then washed again with distilled water and filtered. The silica product was dried in an oven (Memmert, Gemini Sustainable Lab Equipment, The Netherlands) at 120 °C for 1 h. The silica product was allowed to cool at room temperature. Then it was stored in a clean and well-closed container, and it was kept in the desiccators.

Adsorption isotherm

In the adsorption isotherm part, beakers containing 100 ml of treated PhWW were used after the EC process with various initial concentrations C0 ranging from 193.9 to 1551.6 mg/l, and a fixed amount of adsorbent (silica; 0.1 g) was added to the beakers. The beakers were shaken for 2 h at different temperatures ranging from 25 to 45 °C until equilibrium was achieved. After settling for 15 min, suitable pipettes were used to collect samples from the bottom of the reactor, which were filtered before the analysis.

Adsorption isotherms are essential for interpreting the adsorption process adequately. Two models, the Freundlich and Langmuir isotherms, were employed to analyze the adsorption data. The following equation is used to calculate the amount of adsorbed at any given time (Santhy and Selvapathy 2004):

$${q}_{t}=\frac{({C}_{0}{\text{-C}}_{\text{t}})V}{{m}_{s}}$$
(4)

where C0 and Ct are the COD concentrations in mg/L at the start and at time t, respectively. V is the volume of the pharmaceutical wastewater sample in L, and ms is the (g) weight of sand.

The Freundlich isotherm equation (Weber 1972):

$${q}_{e}={{K}_{F}{C}_{e}}^\frac{1}{n}$$
(5)

where qe is the amount of adsorbate uptake per unit weight of adsorbent in mg/g, Ce is the concentration of solute remaining in the wastewater sample after adsorption is complete (at equilibrium) in mg/L, and KF, n is the constant to be found for each adsorbent solute, temperature, and type.

The Langmuir isotherm equation (Zeng et al. 2004):

$$\frac{1}{{q}_{e}}=\frac{1}{{q}_{m}}+\frac{1}{{K}_{1}*{q}_{m}*{C}_{e}}$$
(6)

where Ce is the equilibrium concentration (mg/L) of COD, qm is the maximum amount of solute adsorbed per unit weight of dry sludge, qe is the adsorbate uptake per unit weight of the adsorbent (mg/g), and K1 is the maximum amount of sorption (L/mg).

In recent research, (Ho 2004) explained the benefits of utilizing nonlinear chi-square analysis (X) to compare experimental data and fit isotherm models. X is identified using the following equations:

$$X^2=\sum\frac{{(q_e{\text{-q}}_\text{e,m})}^2}{q_{e,m}}$$
(7)

where X2 (mg/g) is the non-linear Chi-square value, qe (mg/g) is the experimental equilibrium capacity, and qe,m (mg/g) is the equilibrium capacity determined by the models.

As suggested by (Ho 2004), the smaller the value of X2, the better the matching of the model.

Adsorption kinetics

In the adsorption kinetics part of the kinetic experiments for pharmaceutical wastewater adsorption, 1 g of the adsorbent (silica) was mixed with 1000 ml of treated pharmaceutical wastewater (after the EC process) with various initial concentrations of C0 ranging from 172.4 to 345 mg/l. At different periods of time ranging from 10 to 60 min under constant stirring at 350 rpm by using a stirrer (Stuart Scientific Stirrer SS3, manufactured by Stuart Scientific Co. Ltd., UK). The adsorption process was followed for up to 60 min for pharmaceutical wastewater concentrations.

In general, pseudo-1st and pseudo-2nd order models are used to analyze the kinetic analysis of adsorbed adsorbents. The pseudo-1st-order adsorption kinetic rate equation is usually expressed as follows (Lagergren 1898):

$$Log\left({q}_{e}{-{\text{q}}}_{\text{t}}\right)=Log\left({q}_{e}\right)-\frac{{\text{K}}_{1}}{2.303}t$$
(8)

where qe and qt are the adsorption capacities (mg/L) at equilibrium and at time t, respectively. K1 is the rate constant of pseudo-1st-order adsorption (min−1).

The pseudo-2nd-order adsorption kinetic equation is usually expressed as follows (Ho et al. 2000):

$$\frac{1}{{q}_{t}}=\frac{1}{{{K}_{2}{q}_{e}}^{2}}+\frac{1}{{q}_{e}}(t)$$
(9)

where K2 is the rate constant of pseudo-2nd-order adsorption (g/mg/min).

Analytical

Various quality parameters were analyzed before and after the EC and adsorption methods to evaluate the efficient COD reduction and any chemical changes in the treated wastewater samples. To measure pH and temperature, a pH meter (WTW ProfiLine pH 3310 Meter, Amazon Co., Washington, USA) was utilized. Additionally, electrical conductivity was measured using the CON 6-LaMotte instrument (LaMotte Co., Washington, USA), with the values reported in mS/cm. An analytical balance (THB-300 Scale, Akyol Sanayi Malzemeleri Co., Istanbul, Turkey) was employed for analytical procedures and to measure changes in electrode mass.

The standard procedure for measuring COD was followed for this particular wastewater. The COD test involved combining sulfuric acid (H2SO4), silver sulfate (Ag2SO) reagent, and potassium dichromate oxidizing agent (K2Cr2O7) with the sample to be analyzed. The mixture was then boiled and refluxed for two hours at a temperature of 150 °C to ensure maximum oxidation. After cooling the sample to room temperature, the remaining amount of potassium dichromate was measured using a spectrophotometer (HACH DRB200, Hach Company, Japan) calibrated with a blank sample at zero reading. The COD of the sample was determined by inserting standard 10 mL ampoules into the spectrophotometer immediately. COD represents the quantity of oxygen consumed in the oxidation reaction and is measured in mg/L according to the standard proposed by (Baird et al. 2017).

To conduct the BOD test, the sample is prepared, and the measurement reagent is determined to establish the appropriate sample size. A suitable volume of the sample is then selected and placed in the BOD container, along with a magnetic stirrer rod. To prevent nitrification, a few drops of a nitrification inhibitor (ATH) are typically added to the sample bottle. Additionally, 3–4 drops of potassium hydroxide solution are added to the sealing gasket to absorb carbon dioxide (CO2). The sealing gasket is then inserted into the neck of the bottle. The BOD sensors are installed in the sample bottle and positioned on the bottle shelf. Following the BOD instructions (HACH DRB200, Hach Company, Japan), the measurement process begins by incubating the sample for 5 days at a temperature of 20 °C according to the standard proposed by (Baird et al. 2017).

The following equation is used to calculate the removal efficiency (R%) (Castañeda-Díaz et al. 2017):

$$R(\%)=\frac{{\text{(C}}_{0}-{C}_{e})}{{\text{C}}_{\text{e}}}*100$$
(10)

where C0 and Ce are the initial and final COD concentrations (mg/L).

Results and discussions

Table 1 displays the characterization of PhWW before it undergoes any treatment. The pharmaceutical wastewater had COD and BOD5 levels of 1327.5 and 358.4 mg/L, respectively. The chemical components in the pharmaceutical wastewater may inhibit the activity of microorganisms; therefore, this effluent is unsuitable for biological aerobic processes due to its low BOD5 and high COD concentration. As a result, prior to its utilization for purposes such as irrigation and agriculture, the pharmaceutical effluent had to undergo treatment.

Performance of the solar-powered EC process

EC is one of the most promising techniques that has gained the greatest interest from academics nowadays because of its high pollutant removal efficiency. When a current is applied, the cathode undergoes a reduction while the anode is oxidized in an aqueous solution. The most popular electrode materials are Fe and Al because of their several advantages, including affordability and availability (Thakur and Mondal 2016; Hakizimana et al. 2017). In order to treat pollutants efficiently and economically, the EC process was utilized. As a result, this research investigates the impact of various operating parameters, including reaction time, current density, electrode number, the distance between electrodes, and electrode arrangement, on the EC method of PhWW.

The impact of current density and reaction time

The performance of EC processes heavily relies on two key parameters: reaction time and current density (Al-Qodah et al. 2022). To understand the effect of reaction time and current density on the reduction in COD efficiencies of the EC process in treating PhWW, three different current densities (3.328, 6.656, and 9.984 mA/cm2) were applied for one hour between the electrodes in the system. The current density was calculated by dividing the applied current by the electrode`s effective surface area of 300.48 cm2. Figure 2 illustrates the impact of current density and operating time on the reduction in COD efficiencies at various reaction times (5–60 min) and various applied currents (1–3 A).

Fig. 2
figure 2

The influence of reaction time and current density on SPEC under various current densities and experimental parameters, including a temperature of 28°C, a pH of 7, six electrodes, and an MP-P electrode arrangement

According to Fig. 2, the reduction in COD efficiency rises quite quickly during the first 20 min of operating time before slowing down and reaching its peak after 60 min. Based on the findings presented in Fig. 2, a reaction time of 20 min is deemed adequate to attain almost complete COD treatment efficiency. Any duration beyond 20 min exhibits only a slight improvement in treatment efficiency. At 20 min, the reduction in COD efficiencies for each current density (3.328, 6.656 and 9.984 mA/cm2) reached approximately 72.5%, 70.5%, and 69.5% ± 2%, respectively, marking the optimal response time. This finding is consistent with the findings of (Janpoor et al. 2011; Nasrullah et al. 2014; Al-Zghoul et al. 2023). Despite increasing the current density, the efficiency of reduction in COD did not show any improvement. However, increasing the current density from 3.328 to 9.984 mA/cm2 within 20 min resulted in a slight decrease in efficiency from 72.5% to 69.5%, possibly due to the formation of a passivation layer on the electrode material.

To ensure the successful implementation of an EC method, optimal operating conditions must be selected to meet all economic aspects. Thus, an investigation was conducted to determine the feasibility of reduction in COD using an EC method powered by solar photovoltaic energy by examining the overall operating costs. The analysis of operational costs for the EC method comprises three primary components: chemical consumption, electrode material consumption, and electrical energy consumption (especially anode).

This section discusses the evaluation of solar and conventional operating costs associated with the EC method and their correlation with reaction time. To treat pharmaceutical wastewater.

The theoretical and actual electrode consumption are calculated using Eqs. (11) and (12), respectively.

$$ELC=\frac{{\text{It}}_{\text{EC}}{M}_{w}}{\text{ZFV}}$$
(11)

where ELC represents the theoretical electrode consumption in kg/m3, I represents the direct current in A, tEC denotes the EC duration in seconds, Z refers to the chemical equivalence of the electrode with a value of 2 for Fe (ZFe = 2), MW represents the molecular weight of the electrode metal, which is 56 g/mol for Fe (MW,Fe = 56 g/mol), and F represents the Faraday's constant, which is equal to 96,500 C/mol. Lastly, V is used to indicate the volume of the treated wastewater in m3.

The actual amount of electrode consumption (ELC) was calculated as follows:

$$EL{C}_{(actual)}=\frac{{\text{(m}}_{\text{i}}-{m}_{f})}{\text{v}}$$
(12)

where ELC(actual) is the consumed number of electrodes per unit volume of pharmaceutical wastewater sample (kg/m3), mi is the initial weight of electrodes (kg), mf is the final weight of electrodes after treatment (kg), and V is the volume of the pharmaceutical wastewater sample (m3).

The energy electrode consumption is calculated using Eqs. (13).

$$ENC=\frac{{\text{(P)(I)(t}}_{\text{EC}})}{\text{V}}$$
(13)

where ENC is the specific electrical energy consumption (kWh/m3), m represents the specific amount of electrode material dissolved in kg/m3, P represents the applied voltage in V, tEC denotes the EC duration in hours, and V indicates the volume of the treated wastewater in L (Martínez-Huitle and Brillas 2009).

Figure 3 shows a graphical representation of energy consumption and actual and theoretical electrode consumption as a function of different CDs.

Fig. 3
figure 3

a Energy Consumption as a Function of CD; b Actual and Theoretical Electrode Consumption

As can be observed in Fig. 3, energy and electrode consumption increase with increasing current density, from 3.328 to 9.984 mA/cm2. This is mainly because of the direct proportion between the applied current and the energy consumption. These results are in agreement with those obtained by (Imam and Jamrah 2012; Al-Shannag et al. 2015) in the treatment of battery factory wastewater using the EC.

The analysis in this study utilized an electricity pricing value of 0.13 $/kWh (0.089 JD/kWh) for medium-sized industrial companies, as provided by the National Electric Power Company. Moreover, the cost of iron was based on the value supplied by Jordan Steel Company (JS), which is approximately 888.34 $/ton (630 JD/ton) for the typical market price of Fe electrodes. To determine the total operating cost (OPC) for SPEC, the following equation was used (Kobya and Delipinar 2008):

$$OPC=aENC+bELC+cCHC+Sludge{\text{Cos}}t$$
(14)

The following equation describes the variables used in the analysis: OPC, representing the total operational cost of EC, is measured in $/m3 or JD/m3, while CHC represents the consumption of chemical material in kg/m3. Additionally, in a cost analysis of the EC method, a represents the price of electrical energy, measured in $/kWh or JD/kWh, while b and c represent the prices of electrodes and NaCl, respectively, measured in $/kg or JD/kg.

After 20 min of EC time, the operating cost of both SPEC and conventional treatments, which varies with current densities, is presented in Table 2.

Table 2 Total operating cost (OPC) analysis for SPEC systems with different current densities

Table 2 demonstrates that the operating cost of SPEC rises substantially with an increase in current density. Moreover, it was found through the analysis that the current density of 3.328 mA/cm2 resulted in the lowest operating cost of 0.103 $/m3, accompanied by a corresponding reduction in COD efficiency of 72.52%. These OPC results for EC treatment align with those reported in previous studies by (Al Qedra 2015; Al-Zghoul et al. 2023).

Furthermore, at various voltages and electrical currents, Fig. 4 illustrates the relationship between reaction time and operating cost.

Fig. 4
figure 4

Operating cost of the EC process with reaction time

In Fig. 4, it is shown that the operating cost of the EC process increases as the reaction time, electrical current, and voltage increase. At a current of 2 A and a voltage of 2.3 V, the total cost required to achieve the maximum COD reduction efficiency (85.4%) was 0.135 $/m3. However, since a solar photovoltaic cell was utilized for the EC process, there was no need to account for the cost of the electrical power consumed, resulting in a 24.3% (0.21 $/m3) decrease in the overall cost.

The impact of electrode distance

The impact of electrode distance on COD reduction efficiency in the SPEC system was evaluated by varying the distance between electrodes, which ranged from 2 to 4 cm. Figure 5 depicts the outcomes of this investigation.

Fig. 5
figure 5

The influence of electrode distance on the SPEC process under the following experimental parameters: temperature of 28 °C, pH of 7, six electrodes, 3 L solution volume, 20 min operating time, and MP-P electrode configuration

When the distance between electrodes increases, the COD reduction efficiency of the EC method decreases slightly because the rate of electron transfer becomes slower. Figure 5 displays a decline in the COD reduction efficiency of the EC method, from 81.6% at 2 cm to 70.5% at a 4 cm distance between electrodes. This reduction occurs as the distance between electrodes increases, resulting in an increase. Lower distances require less energy for ion motion because the travel path is shorter, reducing the ion's resistance. Therefore, the current moved rapidly in the solution, and a large amount of Fe+2 and OH were formed. This process led to the formation of a large amount of coagulant. The increase in potential V due to the distance between electrodes leads to an increase in resistance, which has an adverse effect on the treatment of pharmaceutical wastewater. This finding is consistent with the findings of Nasrullah et al. 2014, Bhagawan et al. 2017, and Zaied et al. 2020.

The impact of the electrode number

The influence of electrode number on the COD reduction efficiency in the EC system was examined as a parameter for PhWW treatment. This research employed various numbers of electrodes (2, 4, and 6 electrodes) under the following operating parameters: a temperature of 20 °C, a pH of 7, a reaction time of 20 min, an electrode distance of 4 cm, a 3 L sample volume, and an MP-P electrode arrangement. Figure 6 shows the COD reduction efficiency with different numbers of electrodes in the EC process.

Fig. 6
figure 6

The influence of electrode number on the SPEC method under the following experimental parameters: Temperature of 28 °C, pH of 7, 20 min reaction time, and an MP-P electrode arrangement

The effect of the number of electrodes on the reduction efficiency of COD using the EC system is shown in Fig. 6. When the number of electrodes increases, the COD reduction efficiency also increases. The treatment with six electrodes resulted in the highest COD reduction efficiency, reaching 85.4%. The treatment with four electrodes achieved a COD reduction efficiency of 77.6%. Meanwhile, the COD reduction efficiency using two electrodes was 70.5%. This can be attributed to the fact that a higher number of electrodes results in a larger area, leading to a greater reduction in electrode weight. Furthermore, as the number of electrodes increased, more Fe+3 and OH ions were formed, which can lead to the formation of Fe(OH)3 as a coagulant. These results are in agreement with those obtained by (Salih Muharam et al. 2017).

After 20 min of EC time, the operating cost of both SPEC and conventional treatments, which varies with number of electrodes, is presented in Table 3.

Table 3 Total operating cost (OPC) analysis for SPEC systems with different number of electrodes

Table 3 demonstrates that the operating cost of SPEC rises substantially with an increase in electrode number. Moreover, it was found through the analysis that the electrode number of 2 resulted in the lowest operating cost of 0.0676 $/m3, accompanied by a corresponding COD removal efficiency of 70.53%. This is because the electrode area is reduced when using two electrodes. These OPC results for EC treatment align with those reported in previous studies by (Al Qedra 2015; Al-Zghoul et al. 2023).

The impact of electrodes arrangement

As a parameter of the PhWW treatment process using the EC system, the impact of electrode arrangement on the reduction efficiency of COD was also examined. This research employed various electrode arrangements (MP-P, MP-S, and BP-S) under the following operating parameters: a temperature of 28 °C, a pH of 7, a 4 cm electrode distance, six electrodes, and an applied current of 2 A. Figure 7 illustrates the COD reduction efficiencies for six electrodes with various electrode arrangements.

Fig. 7
figure 7

The influence of electrode arrangements on COD reduction efficiency in the EC method under the following experimental conditions: six electrodes, a 4 cm electrode distance, a pH of 7, a temperature of 28 °C, and a 20 min reaction time

Figure 7 illustrates the impact of electrode arrangements on COD reduction efficiency using the EC system. The results indicate that the MP-S arrangement resulted in a higher COD reduction efficiency compared to the BP-S and MP-P arrangements, increasing from 70.5% to 77.5%. The maximum COD reduction efficiency of 77.5% was obtained with the MP-S arrangement. In a study conducted by (Kobya et al. 2011), it was found that the highest removal of arsenic by electrocoagulation was obtained in the MP-S electrode connection mode. Furthermore, other researchers have obtained a higher removal efficiency of the MP-S electrode connection mode in the electrocoagulation method than other electrode connection modes (Demirci et al. 2015; Naje et al. 2015).

Performance of the adsorption process

The adsorption process was utilized as a polishing step in this study, with the adsorption method being used after the EC procedure. This is because the EC method lowers the pollutant concentrations to an appropriate level for the adsorption method, which makes the operation more efficient and produces very clean treated wastewater that can be safely reused. The tendency of molecules in the fluid phase to adhere to a solid surface is referred to as "adsorption". The force field creates a low-potential energy region near the solid surface, resulting in a rise in molecule density near the surface (Santhy and Selvapathy 2004; Awad 2008). In the present study, the supernatant (after the EC method at a reaction time of 60 min) left after the sludge separation was subjected to an adsorption process.

Adsorption isotherms

Adsorption isotherms are essential for interpreting the adsorption process adequately. The Langmuir isotherm and the Freundlich isotherm are the two most commonly used isotherms for explaining solid–liquid adsorption, and both models use their own operational assumptions in adsorption.

Effect of temperature

At different temperatures (25, 33, and 45 °C), the effect of temperature on adsorption was investigated. Table 4 shows the best-fit constants and the coefficient of determination (R2) for the Freundlich and Langmuir isotherms. The value of the R2 is found to be greater than 0.98 for both isotherms, as shown in the table.

Table 4 Freundlich and Langmuir constants for adsorption at different temperatures

In Table 4, through the values of KF and KL for the process of PhWW adsorption at different temperatures, we found that increasing the temperature leads to an increase in the values of KF and KL, the highest values of which were 0.407 mg/L and 0.0015 L/mg, respectively, at a temperature of 45 °C. This indicates that the adsorption increases with increasing temperatures, which means that the process is endothermic in nature. We found that the values of n are close to 1, which indicates that the surface of silica is homogeneous and that the active sites have sufficient energy for adsorption. Also, the results of X2 are presented, and it was found that the Freundlich isotherm has lower X2 values for all temperatures than the Langmuir isotherm, indicating that the Freundlich isotherm fits this collection of pharmaceutical wastewater adsorption data better than the Langmuir isotherm. These results are in agreement with those obtained by (Chithra and Balasubramanian 2010).

Adsorption kinetics

As shown in Fig. 8, the relationship between the contact time of pharmaceutical wastewater with SiO2 and the effective reduction in COD from the solution was investigated.

Fig. 8
figure 8

Effect of contact time on COD reduction efficiency by SiO2 at an initial concentration of 345 mg/L

As shown in Fig. 8, an increase in adsorption time leads to an increase in adsorption amount. The results also show that the adsorption process was divided into two parts: the first 40 min represented the time required for the adsorption process to reach equilibrium and return to the speed of pollutant bonding to the SiO2 surface. After that, the adsorption process changes slightly due to the internal diffusion of the particles. This can be interpreted as an equilibrium of adsorption and maximum adsorption capacity because a plateau of adsorption appears at higher time points. In this study, 62.3% reduction of COD was achieved at 40 min. Furthermore, in this study, no significant changes were observed in the adsorption content of the solution after 40 min. In Table 5, the kinetic parameters of COD reduction from pharmaceutical wastewater by SiO2 were calculated. These results are in agreement with those obtained by (Rubi-Juarez et al. 2017).

Table 5 Adsorption kinetic parameters and constants

In Table 5, the correlation coefficients for COD reduction were evaluated in accordance with the pseudo-second order (R2 > 0.99). Furthermore, the calculated adsorption capacity qe (cal.) and the experimental one qe (exp.) were in good agreement at pseudo-second-order kinetics for an initial concentration of 345 mg/L. This means that COD reduction is influenced by the adsorbent dosage and the amount of COD concentration present. The results were discussed according to a pseudo-first-order model and a pseudo-second-order model, as shown in Fig. 9a and b, respectively.

Fig. 9
figure 9

a pseudo-first-order adsorption kinetics of COD; b pseudo-second-order adsorption kinetics of COD

The adsorption process does not fit the pseudo-first-order kinetic model, as shown in Fig. 9a and b. As a result, the pseudo-second-order kinetic model is consistent with the experimental results. These results agree with those obtained by (Rubi-Juarez et al. 2017).

Combined treatment system

The performance of EC, adsorption, and the integrated EC and adsorption (ECA) methods in COD reduction from PhWW were compared under optimum parameters of 6 electrodes, 4 cm electrode distance, MP-P electrode configuration, 20 min operating time with 6.656 mA/cm2, and a temperature of 45 °C. The comparative data are presented in Fig. 10. The COD reduction efficiency for EC and adsorption when using the best conditions and other conditions was 85.4% and 69.1%, respectively, and 70.5% and 64%, respectively.

Fig. 10
figure 10

The overall reduction efficiency of COD utilizing the integrated treatment methods

As observed from the data presented in Fig. 10, the combination of EC and adsorption (ECA) resulted in the highest COD reduction efficiency, with 95.5% at the optimal conditions and 89.4% at other conditions, compared to both the EC and adsorption alone processes. The findings in this study are consistent with previous studies by (Castañeda-Díaz et al. 2017; Jalil et al. 2019; Bani-Melhem et al. 2023) which also reported that the combined processes of EC and adsorption achieve the highest pollutant removal efficiency.

Figure 10 illustrates that the COD reduction efficiency of the EC method is higher than that of the adsorption process. This is because the applied current density of 6.656 mA/cm2 causes a large amount of coagulants to be produced on-site, which provides more active sites so that they can reduce a much larger amount of COD. The COD reduction efficiency was improved when the EC and adsorption were combined. This result can be attributed to the fact that the combined use of EC and adsorption processes resulted in a greater reduction of COD from pharmaceutical wastewater than when either EC or adsorption processes were used alone.

Conclusions

Based on the findings of this study, the following conclusions can be drawn:

  • The optimal removal efficiency of 95.5% ± 2% was achieved at a current density of 6.656 mA/cm2, a reaction time of 20 min, a distance of 4 cm between electrodes, six iron electrodes, an MP-P electrode configuration, and a temperature of 45°C.

  • The COD levels reached up to 59.7 mg/L with the combination treatment of electrocoagulation followed by adsorption on silica.

  • According to the X2 values obtained, the Freundlich isotherm fits the adsorption data better than the Langmuir isotherm. In addition, the adsorption increases with increasing temperatures, which means that the process is endothermic (Al-Qodah et al. 2017).

  • Regarding the adsorption kinetic models, it was found that, based on the COD reduction efficiency, 40 min were needed to reach adsorption equilibrium as the COD reduction efficiency reached 62.3%. Also, the experimental results revealed that the pseudo-second-order model is in good agreement with the data, as evidenced by the high R2 value of 0.9979.

  • All the values obtained for electrocoagulation followed by adsorption treatment were found to comply with the necessary regulations of the Jordanian Standard and Metrology Organization (JSMO).

  • Finally, it was found that the combination processes were superior to the use of these processes in isolation to reduce COD.

Recommendations for future work

Future researchers are recommended to consider the following recommendations based on the findings of this study:

  • This combined method leaves more studies needed in order to optimize the best conditions, and other combined methods not used in this study, such as biological treatment and others, may be applied in the future.

  • The outcomes of the integrated EC and adsorption methods in this study may inspire researchers to consider adopting similar treatment approaches. The results demonstrate that these processes can successfully produce water that meets the necessary standards for reuse in irrigation and agriculture applications.

  • In all electrochemical treatment approaches, electrode passivation is a major issue (Mousazadeh et al. 2021). Because of this issue, the current is reduced, and thus the efficiency of the system in removing pollutants decreases. As a result, the issue should be investigated further in order to determine the optimal conditions and strategies for reducing its impact. This can be corrected by cleaning the electrodes regularly.

  • These results showed that the combined system achieved a 95.5% removal efficiency. Based on the findings of this research, there is encouragement for researchers to apply the combined EC and adsorption system to treat highly polluted industrial wastewater with higher COD loads, such as baker’s yeast and dairy wastewater.