Electrolytic Treatment of Wastewater in the Oil Industry

Due to the negative environmental impacts of exploration and production of oil, new more restrictive environmental laws and regulations have been issued. It is estimated that in the United States alone, the oil industry will need to invest about 160 billion dollars in actions to protect the environment over the next 20 years to meet environmental legislation more demanding than currently adopted in Brazil [4].


Introduction
Industrial development in recent decades has been a major contributor to the degradation of water quality, both through negligence in treatment of wastewater before discharge into receiving bodies and accidental pollutant spills in aquatic environments [1].
The importance of oil to society is unquestioned. It is not only a major source of energy used by mankind, but its refined products are the raw material for the manufacture of many consumer goods [2].
A world without the amenities and benefits offered by oil would require a total change of mindset and habits among the population, a total overhaul of the way our society works. At the same time, the oil industry is a major source of pollutants that degrade the environment, with the potential to affect it at all levels: air, water, soil, and consequently, all living beings on the planet [2].
Oil and its derivatives are the most important pollutants, due to, among other factors, the increasing amounts that have been extracted and processed. Also, carelessness and neglect of safety standards and routine maintenance of equipment (pipelines, terminals, platforms) aggravate the water pollution problems caused by the oil industry [3].
Due to the negative environmental impacts of exploration and production of oil, new more restrictive environmental laws and regulations have been issued. It is estimated that in the United States alone, the oil industry will need to invest about 160 billion dollars in actions to protect the environment over the next 20 years to meet environmental legislation more demanding than currently adopted in Brazil [4].
One of the crucial points to be attacked is the issue of water production, which is generated in this activity, which is increasing in volume as they get older wells and new wells are drilled [5]. On average for each m³/day of oil produced, 3-4 m³/day of water is produced, although this figure can reach up to 7 m³/day or even more in exploration, drilling and production. The water produced along with oil corresponds to 98% of the effluents. It contains salts, oils and other toxic chemicals in addition to having high temperature and no oxygen [6].
According to [7], treatment of produced water is an urgent matter in view of the high daily volume. Different processes have been described for the treatment of such effluent, but the most frequently used are chemical destabilization [8,9] and electrochemical destabilization [10,11]. Biological processes are rarely used since these effluents usually contain biocides [12].
The use of EF can enable the release into receiving bodies or reinjection in wells of the treated effluent by reducing the organic load and removing oily and solid particles in suspension [13].
According to [14], the current EF technology inherently involves the formation of an impermeable oxide layer on the cathode and deterioration of the anode due to oxidation. This leads to loss of efficiency of the electroflocculation unit. These limitations of the process have been decreased to some extent by the addition of parallel plate electrodes in the cell configuration. However, the use of alternating current in EF retards the normal mechanisms of electrode deterioration that are inherent in DC system due to cyclical energization, thus increasing the electrode life.
In the present text, we evaluate the efficiency of electroflocculation with direct current and variable frequency alternating current with the use of aluminum electrodes for the treatment of oily wastewater from actual production.

Petroleum exploration and production
Petroleum is the name given to natural mixtures of hydrocarbons, which can be found in the solid, liquid or gaseous state depending on the conditions of temperature and pressure [15].
Oil is a combination of carbon and hydrogen molecules and is less dense than water, with a characteristic odor and color varying from black to brown. Although the subject of much discussion in the past, today oil's organic origin is accepted. Oil exploration and production is one of the most important industrial activities of modern society and its derivatives have many industrial applications. Because of the need to meet the growing demand for the product, the extraction of oil has increased greatly in recent decades. However, this extraction to meet world oil demand causes damage to the environment, with the main culprit being produced water [16,17].

Oily water
Oily water is a generic term used to describe all water which contains varying amounts of oils and greases in addition to a variety of other materials in suspension. These can include sand, clay and other materials, along with a range of dissolved colloidal substances, such as detergents, salts, metal ions, etc. To meet environmental standards for disposal and/or the characteristics necessary for reuse, the treatment of oily water can be complex, dependent on highly efficient processes.
In the petroleum industry, oily water occurs in the stages of production, transportation and refining, as well as during the use of derivatives. However, the production phase is the largest source of this pollution. During the production process, oil is commonly extracted along with water and gas. The associated water can reach 50% of the volume produced, or even approaching 100% at the end of the productive life of wells. The discharge or reinjection of this co-produced water is only permitted after removal of oil and suspended solids to acceptable levels [18].
The terms "produced water," "petroleum water", "formation water" and "oily water" are used to refer to the water extracted along with oil [17,19].
The composition of this produced water is very complex. Depending on its origin it can contain a wide variety of chemicals such as organic salts, aliphatic and aromatic hydrocarbons, oils and greases, metals, and occasionally radioactive materials. A striking feature of the water coming from offshore oil is its high salinity [17,20,21], which expressed as chloride ions (Cl -) can reach 120 g/L [22].
In oil wells under the seabed, the amount of this wastewater can reach 90% of all effluent during the production of oil and can be 7-10 times higher than the oil extracted from a given well [17,21].
A new oil field produces little oily water (about 5-15% of the total oil produced). However, as the well becomes exhausted, the water volume can increase significantly, to the range 75-90%. This excessive production of water has become a major concern in the oil and gas industry [23]. Before disposal into receiving bodies or use for re-injection into wells, it is necessary to treat this water because the large amounts of pollutants cannot be discharged into the marine environment [24].

Electrocoagulation
EC is a process that involves the generation of coagulants "in situ" from an electrode by the action of electric current applied to these electrodes. This generation of ions is followed by electrophoretic concentration of particles around the anode. The ions are attracted by the colloidal particles, neutralizing their charge and allowing their coagulation. The hydrogen gas released from the cathode interacts with the particles causing flocculation, allowing the unwanted material to rise and be removed ( Figure 1). Various metals have been tested as electrodes, such as aluminum, iron, stainless steel and platinum [25].
The theory of EC has been discussed by several authors, and depending on the complexity of the phenomena involved can be summarized in three successive stages of operation: a. Formation of a coagulating agent through the electrolytic oxidation of the sacrificial electrode, which neutralizes the surface charge, destabilizes the colloidal particles and breaks down emulsions (coagulation -EC step); b. the particle agglutination promoted by the coagulating agent facilitates the formation and growth of flakes (flocculation -EF step) and, c. generation of micro-bubbles of oxygen (O2) at the anode and hydrogen (H2) at the cathode, which rise to the surface and are adsorbed when colliding with the flakes, carrying the particles and impurities in suspension to the top and thereby promoting the clarification of the effluent (flotation -electroflotation step). Processes for electrochemical treatment of effluents have been described in the literature since 1903. In recent years interest has been growing, especially because of its simplicity of operation and application to treat various types of effluents from various sectors, such as domestic sewage [27], laundries [29], restaurants [30] steel mills [31], textile mills [32], and tanneries [33], facilitating the removal of metal ions [28], fluoride ion [34], boron [35] and oils [7,[36][37][38][39][40][41].
Several types of reactors have been proposed in the literature: monopolar, bipolar etc. But the most widely used is the monopolar reactor [14]. In its simplest form, a monopolar EF reactor is composed of an electrolytic cell with an anode and a cathode. In this case, largearea electrodes must be used, or electrodes connected in parallel. In the parallel arrangement, the electric current is divided among all the electrodes in relation to the resistance of individual cells. Thus, a lower potential difference is required in connection of this type when compared to a series arrangement.
For electrodes in series, a higher potential difference is required for a given current flow, because the electrodes are connected in series and have a higher resistance. The same current, however, runs through all the electrodes, and the current is divided among all the individual electrodes of the cells [14].
In the case of the bipolar reactor, the sacrifice electrodes are placed between the two electrodes in parallel (called conductive plates), without any electrical connection. Only two monopolar electrodes are connected to the power source, with no interconnection between the sacrifice electrodes. When the current passes through the two parallel electrodes, the neutral sides of the plate acquire an opposite charge than monopolar electrode. The external electrodes are monopolar and the internal ones are bipolar.
According to [42], most of the setups for treatment of effluents, the electrodes are made of identical material, mainly due to the following reasons:  equal electrodes, made of the same material, have the same electrode potential;  electrodes of different materials imply the use of materials other than iron or aluminum, which increases the cost;  electrodes of the same material suffer the same wear, which simplifies their replacement.
In any electrochemical process, the electrode material has a significant effect on the effluent treatment. For the treatment of drinking water, it should be nontoxic, have low cost and be readily available [31].
Generally, however, iron electrodes have the disadvantage that the effluent has a pronounced green or yellow color during and after treatment. This coloration comes from the Fe 2+ (green) and Fe 3+ (yellow) generated in the electrolytic treatment. In contrast, with aluminum electrodes the final effluent is clear and stable, with no residual coloring.
In the work presented by [43], when aluminum and iron electrodes were tested under the same conditions, using direct current, the results for COD, turbidity and suspended solids were better for the aluminum than the iron electrodes. This advantage was also observed by [30]. However, when comparing the removal of arsenic by iron and aluminum electrodes, [31] found that the iron electrode was better because it showed 99% removal to 37% for aluminum. This difference was explained because the adsorption capacity of the Al(OH)3 + by As 3 is much smaller than that of Fe(OH)3.
Tests carried out by [44] of COD, phenols and turbidity of hydrocarbons from a petrochemical plant, using iron and aluminum electrodes, showed better performance by aluminum electrodes.
According to [45], just as in electrocoagulation, the removal of pollutants closely depends on the size of the bubbles generated, while energy consumption is related to the electrolytic cell design, electrode materials, arrangement of electrodes and operating conditions, such as current density, conductivity of the effluent and electrolysis time, among others. The difference in size of the bubbles in the effluent depends on the pH, current density, electrode material and surface condition of the electrodes.
The mechanism of EC is highly dependent on the chemistry of the aqueous medium, especially conductivity. Moreover, other characteristics such as pH, particle size and concentration of the constituents will influence the electrocoagulation process [14].
In an EC reactor, the rate of coagulant addition is determined by the kinetics of the electrodes. The reactions at the electrodes are heterogeneous and take place in the interfacial region between the electrodes and the solution. Since the reaction consists of electron transfer via an interface, this reaction will be influenced by the characteristics of this interface, such as the potential difference that is established in equilibrium and changes in potential across the interface in function of distance.
The potential of the electrolysis is strongly dependent on current density, effluent conductivity, distance between the electrodes and the surface condition of the electrodes.

Parameters influencing electrolytic processes
The EC process performance is greatly influenced by the pH of the solution [46]. Considering only mononuclear speciation, the total aluminum present in solution (α) at a given pH value can be calculated ( Figure 2). This distribution diagram shows the extent of hydrolysis, which depends on the total metal concentration and pH. As the pH increases, the dominant species changes, in this case from the Al 3 + cation to the Al(OH)4 -ion not participate in the coagulation reactions and tend to remain in solution [47]. The solubility diagram for aluminum hydroxide, Al(OH)3, is shown in Figure 3. The solubility boundary denotes the thermodynamic equilibrium that exists between the dominant aluminum species in solution at a given pH and the solid aluminum hydroxide. The minimum solubility (0.03 mg Al/L) occurs at a pH of 6.3 and increases as the solution becomes more alkaline or acid [48].
Thus, the active metal cations produced in the anode react with the OHions produced at the cathode to form a metal hydroxide, which then acts as a coagulant with the polluting particles and the metal hydroxides, forming larger aggregates, which can both undergo sedimentation and be carried to the surface of the hydrogen bubbles generated at the cathode. The distribution and solubility diagrams presented above consider only mononuclear aluminum species, whereas in reality this system is considerably more complex. As the aluminum concentration increases, polynuclear complexes of aluminum can be formed and the aluminum hydroxide is precipitated, as illustrated by equation (1): By studying a continuous electrocoagulation process using aluminum electrodes and varying the pH, [7] observed that in acidic (pH <4) or alkaline (pH> 9) media, in which cationic or anionic monomeric species of aluminum are predominant, the emulsion remained stable and there was no decrease in COD. Moreover, at pH 5 to 9, the removal was 80%. Under these conditions (pH 5 to 9), the predominant species are polymeric complexes of aluminum and amorphous precipitate of aluminum hydroxide. The surface of the latter can be positively or negatively charged by adsorption of ions from the solution.

Distance between electrodes
The distance between the electrodes is an important variable to optimize operating costs. According to [49], when the effluent conductivity is relatively high, a bigger space between the electrodes should be used. In contrast, in situations of moderate value, it is recommended to use a smaller distance, as this will reduce power consumption without changing the degree of separation, because in this case the current would not be altered.
When testing a treatment system under the same electric current, [50] observed there was no difference in removal efficiency for different spacings between the electrodes. Therefore, the distance between them is considered to be only a factor for cost optimization.
In turn, [51] reported in their paper that with increasing distance between the electrodes, fewer interactions of ions of the solution with the coagulant will occur. The difference in conclusions between the two research teams can be attributed to a possible divergence in the conductivity value of each effluent, since if it was high in the first study (range between 100 and 140 mS cm -1 ), there would not have been any change in removal efficiency, because even with a greater distance between the electrodes, there would be a minimum conductivity of the solution that would carry the current.
In the second study, the authors did not mention the effluent's conductivity value. However, it can be assumed it was lower than in the first study, because increasing the distance between the electrodes caused the interactions to decrease and there would need to be a minimum conductivity to ensure the transmission of electric current. Therefore, for there to be no difference in removal with changes in the spacing between electrodes, the treated solution must have a minimum electrical conductivity value.
The greater the distance between the electrodes, the greater must be the voltage applied, because the solution has resistance to the passage of electric current. Thus, according to the characteristics of the effluent, the distance between electrodes can be varied to maximize the efficiency of the process. For example, longer distances can be used when the effluent conductivity is relatively high, while the distance should be as small as possible when conductivity is low so that does not overly increase the need for power.

Electrical conductivity of the effluent
The increase in conductivity by addition of sodium chloride is known to reduce the cell voltage due to the reduction of the ohmic resistance of the effluent [43,52]. Chloride ions can significantly reduce the adverse effects of other anions such as HCO3 -and SO4 2-. .
The electrical conductivity of the effluent is a variable that affects the current efficiency, the cell voltage and power consumption. It is also important when optimizing the parameters of the system, since high conductivity associated with a small distance between electrodes minimizes the consumption of energy, but does not affect the efficiency of removing contaminants, as shown in [53].
When the electric conductivity of an effluent is too low, sodium chloride (NaCl) can be added to increase in the number of ions in solution. But this leads to oxidation of chloride ions to chlorine gas and OCl ions, which are strong oxidants capable of oxidizing organic molecules present in the effluent [54].
The conductivity of the effluent, namely the capacity to conduct electrical current, should be directly proportional to the amount of ions present in the conductive liquid. These ions are responsible for conducting the electrical current. It is evident, then, that the higher the concentration of these ions in the effluent, the greater its ability to conduct electrical current and the greater the possibility of reactions between the substances present in the effluent, a positive factor which enables reduction of energy consumption.

Temperature
According to [56], the effect of temperature has as yet been little investigated in the electrocoagulation process. Some studies have shown that the efficiency achieved with aluminum electrodes increases with temperature up to the 60 °C, above which the efficiency decreases. However, the conductivity increases with increasing temperature, decreasing the resistivity and electric power consumption. Increasing the temperature of the solution contributes to increase the efficiency of removal, caused by the increase of the movement of the ions produced, facilitating their collision with the coagulant formed [57,58].

Electrolytic processes applied to the treatment of oily wastewater
According to [36] in the 1980s, Zhdanov used iron and aluminum electrodes to break down emulsions and promote flocculation of wastewater impurities from drilling platforms, aiming at its reuse.
The EPA (1993) conducted studies on the use of innovative technologies for treating hazardous waste, using the technique of electrocoagulation with alternating current. The resulting apparatus was called the ACE Separator TM . This technology introduces low concentrations of nontoxic aluminum hydroxide in the medium.
The effluents were prepared in order to reproduce the natural leakage to the underground reservoirs in soil washing operations. The main objective of these tests was to obtain optimal conditions for breaking oil-in-water emulsions and achieve reductions of soluble solids and loads of metal pollutants.
Experiments were carried out using a monopolar electrode of aluminum and the effluent used was prepared with 1.5% of diesel oil, 0.1% surfactant, 10 to 100 mg L of metals (Cu, Cd and Cr) and 3% soil containing 50% clay. Assays were performed at pH 5, 7 and 9. NaCl was added in the range from 1200 to 1500 mg/L to simulate salinity values found in contaminated media. The optimum operational conditions were: 4 A (ampere); space between the electrodes of 0.5 cm, duration of 3 to 5 minutes and frequency of 10 Hz. The pollutant removal efficiencies were 98% of TSS, 95% for TOC, 72% for Cu, 92% for Cr and 70% for Cd. However, fouling was observed on the plates of the electrodes.
Another research team [36] used the electrolytic process with titanium electrodes to promote the oxidation of pollutants in the oil industry. The process was tested with effluents of low and high salinity containing sulfides, ammonia and phenol, besides organic matter. Studies were also performed simulating the generation of chlorine by electrolysis with salinity levels similar to those found in the effluent.
The results demonstrated the possibility of using the electrolyte process in both situations, but that it was particularly advantageous when used in high salinity effluent due to the high conductivity, which allows oxidation with lower energy consumption.
[39] conducted experiments with electrolysis to remove the COD, O&G and turbidity from olive oil residues in the presence of H2O2 and a flocculating agent generated "in situ" via iron and aluminum electrodes. The iron electrode was more effective than aluminum. The COD removal efficiency was around 62-86%, whereas the removal of O&G, and turbidity was 100%. The current density ranged from 20-75 mA cm 2 , depending on the concentration of H2O2 and coagulating agents. Using petrochemical industry effluents, [59] conducted tests of chemical coagulation (jar test) and electrocoagulation on a laboratory scale. The tests allowed comparing the removal efficiencies of organic matter by electrocoagulation and chemical coagulation, and comparing the efficiencies of these treatments in laboratory scale with those obtained in the stage of physical-chemical treatment (chemical coagulation and flocculation). In all cases the efficiency of removal of organic matter were evaluated according to reduction of COD.
In the chemical coagulation assays, the authors used aluminum sulfate. The parameters evaluated were the optimum pH for coagulation and optimum coagulant dosage. Tests were carried out of the electrolytic process in batch with aluminum electrodes. The parameters analyzed were: temperature, applied potential, initial pH, distance between electrodes, number of electrodes and electrode wear. The efficiency of the electrocoagulation process showed values up to three times higher than the monthly average obtained by the petrochemical industry using chemical coagulation and flocculation.
Another research team [13] studied the possibility of applying electrocoagulation to treat synthetic wastewater in the oil industry. This effluent was prepared in the proportion of 33 L of water to 50 ml of crude oil in a vessel with mechanical stirring for 30 minutes. A single-compartment electrochemical cell was used to generate bubbles, operating in continuous system with power feed at the top and treated effluent outlet at the bottom. The anode was made from titanium, called a DSA ® and the cathode material was grade 316 stainless steel.
Electrolysis was carried out using current density of 20 mA/cm 2 , flow rates of 800 and 1200 mL/h -1 and electrolysis times 150 and 180 minutes, respectively. The results showed that it was possible to obtain removal of COD and O&G greater than 90%.
Other tests have been performed to investigate the treatment of oily wastewater from washing the holds of ships, using the technique of electrocoagulation. The process was evaluated in laboratory scale and involved the use of two types of electrodes (iron and aluminum). The results showed that the best performance was obtained using the iron electrode [60].
The system operated with current of up to 1.5 A, for 60 and 90 minutes. The removal rates of BOD and O&G were 93 and 96%, respectively, while the COD removal rates were 61 and 78%, depending on the treatment time. Finally, 99% of the hydrocarbons were removed. Electrocoagulation was also effective for clarification of the effluent. Removal rates of 99 and 98% were measured for TSS and turbidity, respectively.
To verify the efficiency of treatment by synthetic cutting fluid, electroflotation was performed to characterize the fluid before and after treatment. The parameters analyzed were: pH, turbidity, metals, total phosphorus, COD, BOD and O&G. The results were quite satisfactory. The EF efficiency showed partial removal of contaminants in the cutting fluid, but the concentration of O&G exceeded the maximum limit for disposal according to relevant legislation [61].
Using the EC technique with a perforated aluminum electrode to separate oil emulsified in water, [62] found that the perforated electrode facilitates the passage and upward movement of the oil droplets to the surface. The authors observed that at 5 V and 0.4 A, the oil removal efficiency was 90% at pH 4.7 during 30 min of electrolysis, and the optimal salt concentration was 4 mg / L. The oil removal rate from the effluent increased with decreasing pH and lower salinity.
With the goal of removing Cu +2 , Zn +2 , phenol and BTEX from the produced water, [63] studied two types of electrochemical reactors: one using electroflocculation and the other electroflotation. In the former, an electric potential was applied to a solution containing NaCl, through electrodes of Fe, which with the dissolution of the metal ions generated Fe +2 and gases. An appropriate pH, these gases caused coagulation/flocculation reactions, removing Cu +2 and Zn +2 . In the second setup, a carbon steel cathode and DSA ® . of DSA ® Ti/TiO2-RuO2-SnO2 were used, in a solution containing NaCl, which produced strong oxidizers such as HOCl and Cl2. These promoted degradation of BTEX and phenol at different flow rates. The Zn +2 was removed by electrodeposition or by the formation of Zn(OH)2 due to the increased pH.
Assessing the removal of oil from a synthetic emulsion by the electrocoagulation-flotation process, [45] observed the influence of operating parameters on the rate of reduction of COD, initial oil concentration, current density, electrode separation, pH and electrolyte concentration. NaCl was added to increase the solution's conductivity. The initial pH of the emulsion was 8.7. The Zeta potential had an average value of -75 mV, indicating emulsion stability. The author found that the best conditions for removal were current density of 4.44 mA/cm 2 , treatment time of 75 min, distance between electrodes of 10 mm and concentration of the electrolyte (NaCl) of 3 g/L.
Studying the treatment of a synthetic effluent and a real produced water sample for removal of oil by the Fenton process, electroflotation and a combination these two, [64] first evaluated the Fenton and electroflotation processes individually and optimized the parameters for evaluating the combined process. The Fenton process, using Fe +2 and H2O2, obtained a peak oil removal of around 95% after 150 minutes and 50% removal after 57 minutes. The EC with the optimized volt (V) value managed to remove 98% of the oil after 40 minutes. The combined process using the optimized parameters for each process achieved removal of 98% after 10 minutes and 50% after 1 to 3 minutes. The combined process proved to be much more efficient than the procedures alone.
[65] evaluated the removal of sulfate and COD from oil refinery wastewater through three types of electrodes: aluminum, stainless steel and iron. They investigated the effects of current density, electrode array, electrolysis time, initial pH and temperature for two samples of wastewater with different concentrations of COD and sulfate. The experimental results showed that the aluminum anode and cathode was more efficient in the reduction of both contaminants. The results demonstrated the technical feasibility of electrocoagulation as a reliable method for pre-treatment of contaminated wastewater from refineries. [66] in their experiments showed that treatment of synthetic wastewater emulsified water produced by EF, produced better results when used at a frequency of 60 Hz alternating current, initial pH 9, electrolysis time of 3 minutes and application of intensity current of 3 A. The results of tests on simulated wastewater produced water resulted in high removal efficiencies of organic load reaching 99% removal of oil and grease, color and turbidity. Compared to the flocculation trials using Jar-Test, the EF demonstrated highly efficient for the treatment of effluent water production in order to remove oil and grease emulsions, color and turbidity with no addition of chemical reagents or pH adjustment. Jar-Test trials were not effective consume high amounts of aluminum sulfate and low efficiency of removal of parameters. The main advantage of alternating current electrolysis in comparison with the direct current is less wear of the electrode mass. By using the same assay conditions for both technologies in 60 minutes oxidized alternating current of 1.6 g Al electrode while the oxidized direct current electrode of 3.4 g Al.

Variable frequency AC electroflocculation
In this work, we used variable frequency electroflocculation, which consists of using alternating current from the power grid at 60 Hertz and varying the voltage and frequency between 1 Hz to 120 Hz. This alternating current was generated by reconstituting the sinusoidal form of the input current in a conversion system with vector control, which generates a pulse-controlled formation time (period) adjusted by a programmable base time through a system of microprocessors.
This system triggers an oscillator to form a new waveform that has a peak residence time large enough to have conduction at a given polarity. The evaluation of EF with alternating current for the treatment of effluents from oil platforms can be of great importance to develop treatment processes that are fast, efficient and cost-effective. The aim of this experiment was to develop and evaluate in laboratory scale a variable frequency electroflocculation (EF) system for the treatment of oily water generated in offshore oil production and to compare the results against those produced using direct current.

Electroflocculation units
AC and DC electroflocculation units consisted of a glass electrolytic cell with capacity of 1 liter under magnetic stirring, in which an electrode was inserted vertically (monopolar in parallel) in a honeycomb arrangement, made of seven interspersed aluminum plates. These plates measured 10 cm long, 5 cm wide and 3 mm thick and were separated by spacers of 1 cm each. After a predetermined electrolysis period, we waited for 30 minutes for complete flotation of the emulsion to occur. Through a tap at the bottom of the beaker, the treated effluent was removed to assess the efficiency of electroflocculation (EF), which was done by monitoring, in triplicate, the following parameters: pH, conductivity, turbidity and color.

DC unit
The DC electroflocculation unit used a voltage of up to 15 V. First AC power (110/220 V) was applied to a potentiometer connected to a step-down transformer, feeding the secondary stage rectifier bridge responsible for providing DC power to the electrodes by a polarity reversing switch, connected to a meter showing voltage (V) and current (A). These readings guide the operator regarding the parameters of honeycomb electrode array. Figure  4 shows the diagram of the experimental DC setup.

Variable frequency AC unit
The alternating current at a voltage of up to 15 V and variable frequency between 1 Hz and 120 Hz was obtained from a Weg CFW0800 AC/AC converter and a step-down transformer Power 127 V

Voltage inverter
Step-down transformer Bridge rectifier Voltmeter Ammeter Reversings witch Electrode (Tecnopeltron PLTN model 100/15). In this setup, the input power at 60 Hz from the grid is converted to variable frequency output of 1 to120 Hz in order to obtain AC power at the desired level. As with the DC setup, there is a meter to indicate the voltage (V) and current (a), to guide the operator. Figure 5 shows a block diagram where the 60 Hz current from the grid feeds a frequency converter with variable output from 1 Hz to 120 Hz, connected to a variable voltage stepdown transformer, thereby providing appropriate frequency and voltage to the electrode.
In the rectification step that occurs in the variable frequency converter, the power is transformed into DC. Then the new direct current is treated in the oscillator module which converts it into pulses with controlled width, forming a new AC waveform, with a frequency that can vary between 1 Hz and 120 Hz depending on the level of feedback (reference) from the load controller. Thus, it has a sinusoidal waveform where the period varies with the load, to obtain the best performance at active power levels. The electrode is the central element for treatment. Thus, the proper selection of its materials is very important. The most common electrode materials for electroflocculation are aluminum and iron, since they are inexpensive, readily available and highly effective. In this experiment we used a hive array of seven interspersed aluminum plates measuring 10 cm long, 5 cm wide and 3 mm thick. The plates were separated by spacers (1 cm thick each), allowing varying the distance between the electrodes.
The electrodes were connected to specific instruments to control and monitor the current and voltage applied to the system, namely a frequency converter/regulator, potentiometer, step-down transformer, voltmeter, ammeter, bridge rectifier and polarity reversing switch. Figure 6 shows an example of hive aluminum electrodes.

Power 127 V
Step-down transformer Frequency Converter inverter Voltage inverter Voltmeter Ammeter Electrode Figure 6. Hive aluminum electrodes containing eigth plates.

Tests with real effluent using oily water from the oil industry
Through laboratory tests we noted that the real effluent yielded obtained from an oil company did not have high salinity and had high oil and grease content (60 g / L), so it was not characterized as produced water but rather as oily effluent.
We conducted there tests: 1. the first using the effluent as received; 2. the second adding 60g / L of natural salt; and 3. the third adding salt 60g / L of salt plus emulsifiers. Table 1 shows the values obtained with the AC and DC electroflocculation processes with the original effluent as received. The results of the AC setup were obtained with the maximum current of the unit (i = 2.5 A), due to the low salinity. The voltage was 11 V. In the case of direct current, the unit only reached a maximum of 1.6 A, so we added 1 g of salt to obtain the same current intensity as the AC unit. By adding salt to the effluent in the DC system, there is an improvement in removal efficiency.
The analysis of the oil and grease parameter (supernatant) was carried out separately, while the remaining parameters were analyzed with the subnatant phase of the effluent. The AC and DC electroflocculation tests were performed with the effluent containing an oil and grease content of 60g/L.
There was an increase in pH during the final AC and DC tests, attributed to the generation of OH-ions during the water reduction step.
2H2O(l) + 2e - H2(g) + 2OH -(aq) Although these ions are also used to form the coagulating agent, the remaining quantity results in an increase of the pH value. This was also observed by [43,67,68]. Despite the low conductivity of the effluent, there was high removal of pollutants and complete clarification after treatment for 15 minutes. The removal of ammonia, phenols and sulfides may have been obtained by drag of the gas phase (electroflotation).  The test results using the effluent plus NaCl to bring the salinity to 60 g / L, to simulate produced water, are shown in Table 2.  Since the electrolytic process involves corrosion of the electrode, according to Faraday's laws, there is mass loss of the electrodes. We measured this electrode mass loss by the weight difference before and after each test. High removal efficiencies were observed in tests with the high-salinity effluent. Electrode mass consumption with alternating current was 33% lower than with direct current, with all other conditions the same. Low voltage was applied during electrolysis in the tests to achieve high pollutant removal efficiency. In previous tests, the low conductivity greatly increased the voltage required by the system, leading to high energy consumption. This indicates that high conductivity greatly favors the electrolytic process. Figure 8 shows the evolution of the tests with high-salinity effluent using the EF technology with alternating current and direct current. Note the total clarification after the tests without filtration. Table 3 shows the results of the high-salinity effluent treated with the AC and DC processes.

Parâmeters
As can be seen from the above table, the high turbidity, color and O&G were almost completely removed (above 99%). The voltage applied to the electrodes was very low, resulting in high efficiency of the technique. The electrode mass consumed with DC was 31% higher than with AC.
A hypothesis for the lower electrode consumption with alternating current is that since DC only flows in one direction, there may be irregular wear on the plates due to the onslaught of the current and subsequent oxidation occurring in the same preferential points of the electrode. In the case of AC, the cyclical energization retards the normal mechanisms of attack on an electrode and makes this attack more uniform, thus ensures longer electrode life.   a c b Figure 9 shows the evolution of EF treatment of high salinity effluent during the stages of development using AC and DC.

Conclusions
In the present study, we could confirm that the EF process produces satisfactory results for treatment of oily wastewater, allowing its discharge into water bodies or reinjection in oil formations. The AC technology was highly effective, both with the original oily water as received and with the simulated produced water after addition of salt.
Overall, the results confirm the potential of the technique, which through simple and compact equipment, can be employed for the decontamination of organic compounds. The results of tests on oily water resulted in high organic load removal efficiencies, reaching 99% removal of oil and grease, color and turbidity, along with high removal of phenols, ammonia and sulfides. The biggest advantage of AC versus DC electroflocculation is the lower electrode wear with the former technique. When using the same testing conditions and time of 6 minutes for both technologies, the efficiency was above 30%. The AC electroflocculation technique seems to be a promising alternative in the treatment of oily wastewater from the oil industry. Frequency converters, also known as frequency inverters, are electronic devices that convert alternating voltage into direct current and then back into alternating current at variable voltage and frequency. In our setup, we used this device to convert the current from the grid frequency of 60 Hz into the frequency applied to the electrode, of 1 to 120 Hz.

b. Potentiometer
A potentiometer is an electronic component that has adjustable resistance, providing variable the output voltage to the electrode. c.
Step-down transformer A step-down transformer is used to lower single-phase, two-phase or three-phase voltage, to adapt the grid voltage to the needs the equipment to be used. Its primary winding is electrically isolated from the secondary winding. A mesh (electrostatic shield) can be placed between the windings, which once grounded helps eliminate noise from the power grid. In the case of electrolytic treatment here, the input voltage of 110/220 V was transformed to output voltage according to the operational need, e.g., 15 V.

d. Voltmeter
This is a device that measures voltage in a circuit. The voltage is generally shown by a movable pointer or a digital display. They are designed so that the high internal resistance introduces minimal changes to the circuit being monitored. To measure the voltage difference between two points in a circuit, the voltmeter is placed in parallel with the section of the circuit between these two points. Therefore, to obtain precise measurements, the meter should have a very large resistance compared to the circuit. Voltmeters can measure DC and AC voltages, depending on the quality of the device.

e. Ammeter
An ammeter is an instrument used to measure the intensity of electrical current flow passing through the cross section of a conductor. Since the current flows through the conductor and the devices attached to it, to measure the current passing through a region of a circuit, the meter must be placed in series with the circuit section. Therefore, to obtain precise measurements, the ammeter should have a resistance that is very small compared to the circuit. Ammeters can measure continuous or alternating current.

f. Bridge rectifier
This is a device that converts alternating current (AC) (usually sinusoidal) into direct current.

g. Polarity reversal switch
This is an important element of treatment systems, by increasing the lifetime of the electrode and reducing the resistance of the system. It changes the anode to the cathode and back again at regular intervals, to reduce erosion and scaling.