Three-Stage Membrane Treatment of Wastewater from Biodiesel Production-Preliminary Research

As biodiesel production as renewable fuel increases, so does the amount of wastewater resulting from this technology. Wastewater is generated during the so-called biodiesel washing, i.e., washing out glycerol and methanol with water. The purified biodiesel must meet international standards, such as EN 14214 or the American ASTM D6751 standard. To fully say that biodiesel technology is environmentally friendly, the amount of wastewater should be minimized. It is also desirable that the purified water can be recycled to the technology. For this purpose, wastewater pre-treated by flotation, during which mainly oils are removed, was subjected to three-stage membrane separation. For each of the stages, the membrane was selected and characterized in terms of its separation capacity and stream stability. Starting with microfiltration, which was mainly aimed at reducing turbidity, affects the permeate flux in the following steps. Then, ultrafiltration and nanofiltration membranes were selected. These membranes were aimed at reducing the concentration of inorganic and organic substances. Consequently the cascade was composed of: MF-0.45 µm, UF-150 kDa, and NF-characterized by an 80% degree of desalination. The final permeate has a salt concentration of less than 0.15 g/L and can be reused in biodiesel technology.


Introduction
As renewable energy sources are a valued product nowadays, biodiesel as a biofuel derived from chemically processed vegetable oils is gaining value.
An inevitable consequence of expanding the production of biodiesel is the growing amount of generated wastewater. Water is also a very desired product, so deep wastewater treatment to obtain water to recirculate is the aim of modern (clean) technology. The obtained water for reuse must then meet specific requirements depending on the application [1,2].
The first step in biodiesel production is the reaction of the alcohol with the crude oil in the presence of a catalyst to form glycerol and methyl esters. An operation to separate biodiesel and glycerol is then performed, followed by the recovery of alcohol. Recovered alcohol is returned to the reaction, and the methyl ester is directed to the "washing process", during which a large amount of wastewater is generated [3].
The biodiesel washing operation removes all contaminants and unwanted substances such as unreacted oils, catalysts, excess alcohol, and glycerol. The purified biodiesel must meet international standards such as EN 14214 or the American ASTM D6751 standard. The wet washing of biodiesel has long been the most successful method for removing glycerol and methanol as both are well soluble in water [4].
The amount and properties of biodiesel wastewaters depend on the production system, feedstock, and catalyst. In general, they are highly viscous liquids with an opaque color. The pH range is very high, between 3.3 to 11.2. Its discharging to the public sewerage system would clog the pipes by a significant concentration of oils. It could also adversely affect the activated sludge in biological wastewater treatment plants by inhibiting the growth of microorganisms [3,[5][6][7].
Membrane filtration has been used in the industry for many years to treat wastewater [8][9][10]. Membrane filtration, including microfiltration (MF), ultrafiltration (UF), and nanofiltration (NF) is a process group based on a sieving mechanism. The particles retained by them are bigger than 0.1 µm, 5 nm, and 1 nm, respectively, for MF, UF, and NF [11]. After treatment with membrane filtration, wastewater meets the standards that allow discharge into surface waters or return to production. In comparison to conventional approaches, the usage of membranes offers clean, ecological, and energy-efficient solutions. Despite numerous advantages, two phenomena can significantly reduce the permeate flux and thus increase the energy consumption of the process and the operating costs of membrane systems. These phenomena are concentration polarization and membrane fouling, which are closely related, among other things, to the material of the membrane [12,13]. Therefore, membrane choice and process parameters are the first steps in the design of membrane processes.
As wastewater obtained after biodiesel production contains impurities and residues of the oil, it cannot be directly fed to membrane installation. A pre-purification process is needed. Flotation was proposed in the literature, which allows the removal of some major impurities, i.e., large particles and oil [14]. A similar effect was achieved by coagulation, e.g., using the popular salt Fe 2 (SO 4 ) 3 [15].
Despite numerous applications of membrane processes in wastewater treatment, they have not been investigated to treat biodiesel washing wastewater. However, studies can be found in the literature indicating that the planned research can give satisfactory results. Koltuniewicz et al. [16] studied the influence of various factors on decreasing permeate flux during the microfiltration of oily wastewater using a 0.45 µm membrane. Sutrisana et al. [17] also dealt with microfiltration as a technic in oil-wastewater purification. Both of the researcher's groups proposed microfiltration as a potential method for treating oily wastewater.
Undoubtedly, the nanofiltration process offers the best possibilities for obtaining the process water from biodiesel washing wastewater. However, this is a type of separation in which dense membranes and very high transmembrane pressures are applied. It is reasonable to pre-treat wastewater as much as possible to reduce the scaling and fouling of these sensitive membranes. The application of MF and UF should allow the process water to be obtained at reasonable costs.
The idea of an integrated membrane separation was proposed with success for another kind of wastewater [23][24][25]. Thus, an attempt for biodiesel wastewater treatment by this method has been made. The paper proposes a three-stage cascade of membranes to purify wastewater after washing with biodiesel. The research aimed to configure the membranes for the micro, ultra, and nanofiltration process to obtain water in the permeate of technological water purity. The preliminary studies presented in this paper focused on selecting suitable membranes and their initial characterization in terms of separation capacity for chosen groups of compounds and performance in terms of permeate flux.

Wastewater after Biodiesel Production
Wastewater obtained from the company "Wratislavia Biodiesel SA" was pre-treated by flotation (proprietary method). Waste had come from equipment washing after biodiesel production with base catalyst, thus was slightly alkaline. The main wastewater parameters are presented in Table 1.

Membrane Modules and Installations
The characteristics of the membranes and modules used in this study are presented in Table 2. In different membrane processes, the selectivity of the membrane is defined differently. For MF by the pore diameter size, for UF by the cut-off factor, and for NF, it is expressed by the degree of NaCl removal.

Membrane Installations
A PolyMemTech unit (Warsaw, Poland) and the installation of Millipore (Burlington, VT, USA), were used for the low (MF, UF) and high-pressure (NF) membrane filtration, respectively.
The feed solution was dosed using a pressure pump (Zuwa Combistar, 2000-A Hennlich Group, Schärding, Austria). The pressure was kept constant at the values presented in Table 2. The temperature was kept constant (20 • C) by means of an ultrathermostat MA-4 (Julabo, Uster, Switzerland). All separation processes were carried out in one hour. The scheme of installation is presented in Figure 1. The membranes were regenerated using a protocol: (1) 2% NaOH heated to 40 °C with NaClO addiction (200 ppm free Cl) for 30 min in close circuit (2) Distilled water in open circuit The membranes were regenerated using a protocol: (1) 2% NaOH heated to 40 • C with NaClO addiction (200 ppm free Cl) for 30 min in close circuit (2) Distilled water in open circuit (3) Distilled water in closed circuit for 30 min (pH = 7 of the retentate and permeate) Then a permeate flux on distilled water was checked. If its value was not as before separation, the protocol was repeated.

Membrane Separations
MF process was carried out under different conditions for two different membranes. During the first separation, the waste was used without any modifications. The second separation utilized the wastewater adjusted to pH = 7. In case of their returning to the production process, it must be neutralized. The last step was to check the effect of the addition of coagulating salt Fe 2 (SO 4 ) 3 at a concentration of 0.5% w/v [14]. The solution was left for 24 h. After this time, it was separated from the residue by decantation. The clarified solution was subjected to separation.
The degree of membrane retention of the individual components is expressed as commonly expressed in the literature [29][30][31] by the membrane retention (R) calculated as: The feed stream for the ultrafiltration was the permeate obtained from microfiltration on a TAMI membrane with a pore diameter of 0.45 µm without modification of the feed. The aim of this step was the organic (quantified by COD measurement) and inorganic (expressed by conductivity) compounds content partially reduction.
The last stage in the membrane cascade was nanofiltration. The feed of the separation was a permeate obtained from UF separation.
During all separations, the change of the permeate flux was calculated as the ratio of the flux measured at a given time (I(t)) to the initial flux (for a clean membrane-I(0)):

Analytical Methods
The permeate flux was measured every 5 min during the process run. Conductivity and pH were measured with electrodes using the multimeter (Crison 5070, Barcelone, Spain). Optical density was measured spectrophotometrically (UV-1800, Shimadzu, Kyoto, Japan) at a wavelength of 550 nm.
The chemical oxygen demand (COD) was determined using ready-made tests by Hanna Instruments HI83224 (Koper, Slovenia). A total of 2 mL of the tested sample was added to 4.25 mL of the ready reagent intended to determine the COD. After thorough mixing, it was incubated for 2 h at 150 • C. Absorbance was measured at 610 nm. The standard curve was prepared with potassium hydrogen phthalate: All reagents were of analytical grade. They were purchased from Pol-Aura (Roznowo, Poland).

Microfiltration
This stage of membrane separation aimed to reduce turbidity and clarify the water as effectively as possible. A speedy decrease in the permeate flux was observed for each tested membrane and condition ( Figure 2). In Table 3, the values of permeate flux in the phase of quasi-static were obtained in each case no later than 5 min after the process. nowo, Poland).

Microfiltration
This stage of membrane separation aimed to reduce turbidity and clarify the water as effectively as possible.
A speedy decrease in the permeate flux was observed for each tested membrane and condition ( Figure 2). In Table 3, the values of permeate flux in the phase of quasi-static were obtained in each case no later than 5 min after the process.   As presented in Figure 3, both tested membranes have proven themselves well at each tested condition. All of them reject particles responsible for turbidity almost totally. Figure 4 shows the wastewater before and after the microfiltration process.  As presented in Figure 3, both tested membranes have proven themselves well at each tested condition. All of them reject particles responsible for turbidity almost totally. Figure 4 shows the wastewater before and after the microfiltration process.

Ultrafiltration
As nearly 100% of suspended compounds were removed in the microfiltration cess, the purpose of the subsequent separation steps was to remove organic compou quantified by COD measurement and inorganic compounds expressed by conductivi The membranes were tested at pore size 1-150 kDa. They were prepared with PE kDa) as flat sheets and ceramic tubes (50 and 150 kDa). The retention coefficients for b organic and inorganic matter did not differ significantly despite large differences in membranes used- Figure 5a.

Ultrafiltration
As nearly 100% of suspended compounds were removed in the microfiltration process, the purpose of the subsequent separation steps was to remove organic compounds quantified by COD measurement and inorganic compounds expressed by conductivity.
The membranes were tested at pore size 1-150 kDa. They were prepared with PES (1 kDa) as flat sheets and ceramic tubes (50 and 150 kDa). The retention coefficients for both organic and inorganic matter did not differ significantly despite large differences in the membranes used- Figure 5a.

Ultrafiltration
As nearly 100% of suspended compounds were removed in the microfiltration pro cess, the purpose of the subsequent separation steps was to remove organic compound quantified by COD measurement and inorganic compounds expressed by conductivity.
The membranes were tested at pore size 1-150 kDa. They were prepared with PES ( kDa) as flat sheets and ceramic tubes (50 and 150 kDa). The retention coefficients for bot organic and inorganic matter did not differ significantly despite large differences in th membranes used- Figure 5a. Despite the most significant permeate flux decrease for a 150 kDa membrane (Figure 5b), in the quasi-static phase, permeate flux density for this membrane was significantly higher compared to the other two membranes (Table 4).

Nanofiltration
The last stage of purification was the use of nanofiltration of water pre-purified by micro-and ultrafiltration. For this type of process, where dense membranes are used, the flux drop is the lowest during the separation, although its value is low app. 0.72 L/(bar·h·m 2 ) (Figure 6a). Table 4. Permeate flux in the phase of quasi-static during the ultrafiltration process. The process was carried out at pressure 2.2, 2.0, 10 bar for 150, 50, 1 kDa membrane.

Nanofiltration
The last stage of purification was the use of nanofiltration of water pre-purified by micro-and ultrafiltration. For this type of process, where dense membranes are used, the flux drop is the lowest during the separation, although its value is low app. 0.72 L//(bar·h·m 2 ) (Figure 6a). The qualitative results obtained from the separation showed that the applied membrane is effective to some extent only (Figure 6b). The chemical oxygen demand (COD) reduction was 32%. The high value of this index is due to the high concentration of glycerol. The PCI membrane worked more effectively in the case of salt content reduction. The conductivity was reduced by 63%, and the final salt concentration according to the standard curve made for NaCl was 0.15 g/L.

Discussion
Wastewater from biodiesel technology is challenging to treat due to the complexity of the matter it contains. It contains both the oily phase and organic and inorganic matter. Just as oils can be fully removed by flotation and microfiltration, the removal of organic matter expressed in the manuscript by COD and inorganic matter defined in conductivity has been brought to the required standards.
The final COD value met Polish environmental protection (Dz. U. z 2015 r. poz.139) standards, as it was lower than 1000 mgO2/L. The salt concentration in the final permeate was 0.15 g/L. Based on the Polish regulations (collective sewage disposal rules Dz. U. z 2015 r. poz.139), the salt content should be lower than 1 g/L to meet the standards for wastewater directed to the urban rivers. However, since the obtained permeate also meets process water requirements, it should be recycled to the technology, which will allow for a significant reduction in water consumption. The qualitative results obtained from the separation showed that the applied membrane is effective to some extent only (Figure 6b). The chemical oxygen demand (COD) reduction was 32%. The high value of this index is due to the high concentration of glycerol. The PCI membrane worked more effectively in the case of salt content reduction. The conductivity was reduced by 63%, and the final salt concentration according to the standard curve made for NaCl was 0.15 g/L.

Discussion
Wastewater from biodiesel technology is challenging to treat due to the complexity of the matter it contains. It contains both the oily phase and organic and inorganic matter. Just as oils can be fully removed by flotation and microfiltration, the removal of organic matter expressed in the manuscript by COD and inorganic matter defined in conductivity has been brought to the required standards.
The final COD value met Polish environmental protection (Dz. U. z 2015 r. poz.139) standards, as it was lower than 1000 mgO 2 /L. The salt concentration in the final permeate was 0.15 g/L. Based on the Polish regulations (collective sewage disposal rules Dz. U. z 2015 r. poz.139), the salt content should be lower than 1 g/L to meet the standards for wastewater directed to the urban rivers. However, since the obtained permeate also meets process water requirements, it should be recycled to the technology, which will allow for a significant reduction in water consumption.
Comparing the obtained results with those available in the literature is quite difficult. The tested wastewater is quite specific. After the oil phase separation process (by flotation), it already contains a small amount of oil. On the other hand, it contains quite large amounts of salt and glycerin. The first mainly comes from saponification reactions and feedstock, which are usually used in cooking oils. The second component, glycerin, is the second product of transesterification, i.e., biodiesel production.
In the literature on the subject, single-stage membrane separation processes were used. Firmam et al. [20] tested an ultrafiltration membrane made of polyvinylidene polyfluoride/polyvinylpyrrolidone with a mean pore diameter value of~19 nm. It was concluded that the studied membrane retains between 83-100% of oils and fats, and between 20-40% of COD, whereas salts are not rejected. Better results, especially with regard to the retention of inorganic substances were obtained by Mozaffarikhaha & Kargari [21] using the NE-90 nanofiltration membrane.
In one of the most recent studies (April 2021), J. Torres et al. [18] tested the treatment of (simulated) wastewater from biodiesel using nanofiltration membranes. A polymer membrane (selective layer-polyamide) with a cut-off point of 200 Da and a ceramic membrane of 450 Da, respectively, were tested. COD and conductivity were measured. In both cases, the permeate meeting the required standards were not obtained. The paper ends with the conclusion that the nanofiltration process should be coupled with some other method. Our research confirmed this, where success was achieved in the cascade of membrane processes.
Despite the multistage treatment process, a significant decrease in permeation fluxes was observed at each membrane separation process. However, these streams stabilized quickly, and hence, the stable operation of the installation can be assumed. Figure 7 shows a preliminary design for a three-stage membrane installation. It was assumed that at each stage, the permeate flux (controlled by the size of the area and the degree of retentate recirculation) is four times higher than the retentate flux. The pump must be selected for each process in terms of the required pressure (MF-UF-NF increasing in series) and flux (NF-UF-MF increasing). Hence, the NF process pump is the most expensive investment and operation. Still, thanks to the cascade of preceding processes (MF-UF), the nanofiltration process is carried out on a smaller stream (reduced by MF and UF retentate compared to the original one). The proposed values of parameters should be verified on an industrial installation.
In the literature on the subject, single-stage membrane separation processes used. Firmam et al. [20] tested an ultrafiltration membrane made of polyvinyl polyfluoride/polyvinylpyrrolidone with a mean pore diameter value of ~19 nm. I concluded that the studied membrane retains between 83-100% of oils and fats, an tween 20-40% of COD, whereas salts are not rejected. Better results, especially with r to the retention of inorganic substances were obtained by Mozaffarikhaha & Karga using the NE-90 nanofiltration membrane.
In one of the most recent studies (April 2021), J. Torres et al. [18] tested the trea of (simulated) wastewater from biodiesel using nanofiltration membranes. A po membrane (selective layer-polyamide) with a cut-off point of 200 Da and a ceramic brane of 450 Da, respectively, were tested. COD and conductivity were measured. In cases, the permeate meeting the required standards were not obtained. The paper with the conclusion that the nanofiltration process should be coupled with some method. Our research confirmed this, where success was achieved in the cascade of brane processes.
Despite the multistage treatment process, a significant decrease in permeation was observed at each membrane separation process. However, these streams stab quickly, and hence, the stable operation of the installation can be assumed. Figure 7 s a preliminary design for a three-stage membrane installation. It was assumed that a stage, the permeate flux (controlled by the size of the area and the degree of rete recirculation) is four times higher than the retentate flux. The pump must be selecte each process in terms of the required pressure (MF-UF-NF increasing in series) and (NF-UF-MF increasing). Hence, the NF process pump is the most expensive inves and operation. Still, thanks to the cascade of preceding processes (MF-UF), the nano tion process is carried out on a smaller stream (reduced by MF and UF retentate com to the original one). The proposed values of parameters should be verified on an indu installation. From the above analysis, it can also be seen that the first stage is primarily respo for clarifying the wastewater. As a result of the MF separation, mainly solid particles the raw material used for the production of biodiesel) and oil residues unseparated From the above analysis, it can also be seen that the first stage is primarily responsible for clarifying the wastewater. As a result of the MF separation, mainly solid particles (from the raw material used for the production of biodiesel) and oil residues unseparated in the flotation step are retained. The second stage already partially retains organic compounds (mainly oil microdroplets not retained by MF), reducing the COD value slightly. We observe an unexpectedly high degree of conductivity decrease. The probable reason is removing ions existing in a complex with organic/colloidal materials [32]. The last step-nanofiltration decreases COD and conductivity, which is predictable due to partially dense membranes with possibly very small pores. It is suspected that without the presence of glycerin (which improves the dense membrane permeability [33]), the retention of compounds responsible for both parameters would be improved.
Retentates from each separation stage (also matter collected as the so-called filter cake) can undergo biodegradation. Strains capable of having been described in the literature are described [34][35][36]. A membrane bioreactor is particularly recommended for this purpose [37,38].

Conclusions
The paper describes the attempt to purify the wastewater generated after the biodiesel washing process was made. The wastewater used for the tests was initially purified from the oils by flotation.
The first membrane separation was microfiltration, where membranes with two different pore diameters-0.14 and 0.45 µm-were tested. At this stage, it was additionally investigated how the waste modification by adjusting the pH to 7, and the additional step of pretreatment by coagulation and later sedimentation, influence efficiency. The most satisfactory results (full retention of solids) were obtained by using a 0.45 µm membrane and separating the wastewater immediately after flotation. The permeate stream from microfiltration was directed on the ultrafiltration module.
During ultrafiltration, the stream has been partially purified of both dissolved organic and inorganic matter. Due to the very high dependence of permeate flux on pore size, the membrane with the highest tested cut-off of 150 kDa was chosen. The permeate stream from ultrafiltration was directed on the nanofiltration module.
Using nanofiltration, it was possible to obtain water with the parameters of the process water (salt content in the final permeate was below 0.15 g/L. The proposed configuration (MF-UF-NF) makes it possible to obtain water that can be returned to biodiesel purification. At the same time, it provides the most significant fluxes of permeates. However, the conducted research is only a guideline for the design of an industrial installation. The selection of membrane surfaces, appropriate pressures, and the development of a self-cleaning membrane procedure during separation must be performed under real (industrial) conditions. The paper proposes that the obtained by-products of treatment-retentates-may be biodegraded. They contain relatively little oil (most of which has been removed in the flotation process). Still, they already contain a lot of organics (including organic carbon sources such as glycerin) and inorganic, so they should be readily biodegradable. However, it should be more deeply studied to call the process entirely environmentally friendly.