{'fraction_non_alphanumeric': 0.02773067331670823, 'fraction_numerical': 0.019825436408977555, 'mean_word_length': 4.949703264094955, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Membrane-Based Processes to Obtain High-Quality Water From Brewery Wastewater

Water reuse is a safe and often the least energy-intensive method of providing water from non-conventional sources in water stressed regions. Although public perception can be a challenge, water reuse is gaining acceptance. Recent advances in membrane technology allow for reclamation of wastewater through the production of high-quality treated water, including potable reuse. This study takes an in-depth evaluation of a combination of membrane-based tertiary processes for its application in reuse of brewery wastewater, and is one of the few studies that evaluates long-term membrane performance at the pilot-scale. Two different advanced tertiary treatment trains were tested with secondary wastewater from a brewery wastewater treatment plant (A) ultrafiltration (UF) and reverse osmosis (RO), and (B) ozonation, coagulation, microfiltration with ceramic membranes (MF) and RO. Three specific criteria were used for membrane comparison: 1) pilot plant optimisation to identify ideal operating conditions, 2) Clean-In-Place (CIP) procedures to restore permeability, and 3) final water quality obtained. Both UF and Micro-Filtration membranes were operated at increasing fluxes, filtration intervals and alternating phases of backwash (BW) and chemically enhanced backwash (CEB) to control fouling. Operation of polymeric UF membranes was optimized at a flux of 25–30 LMH with 15–20 min of filtration time to obtain longer production periods and avoid frequent CIP membrane cleaning procedures. Combination of ozone and coagulation with ceramic MF membranes resulted in high flux values up to 120 LMH with CEB:BW ratios of 1:4 to 1:10. Coagulation doses of 3–6 ppm were required to deal with the high concentrations of polyphenols (coagulation inhibitors) in the feed, but higher concentrations led to increasing fouling resistance of the MF membrane. Varying the ozone concentration stepwise from 0 to 25 mg/L had no noticeable effect on coagulation. The most effective cleaning strategy was found to be a combination of 2000 mg/L NaOCl followed by 5% HCl which enabled to recover permeability up to 400 LMH·bar−1. Both polymeric UF and ceramic MF membranes produced effluents that fulfil the limits of the national regulatory framework for reuse in industrial services (RD 1620/2007). Coupling to the RO units in both tertiary trains led to further water polishing and an improved treated water quality.


INTRODUCTION
In the overall growing context of water scarcity and deterioration in water quality, alternative methods to produce water at the lowest costs from non-conventional water sources are being intensively studied (Angelakis and Durham 2008;Hochstrat et al., 2010;2017;Ansari et al., 2017). In particular, the industrial sector is having to adapt to the increasing pressures on water resources and stricter wastewater discharge regulations by either cutting down on water consumption or by integrating water reuse in the existing wastewater treatment facilities.
The benefits of water reuse are more limited extraction from surface and ground-water sources, reduced impact of treated wastewater discharge into water bodies, and production of highquality treated water for multiple on-site applications. Further economic benefits include lower water intake costs, lower wastewater disposal fees and optimized energy efficiency of water treatment (Pankratz 2004;Vanoppen et al., 2016).
The brewery industry is a large consumer of water, and it is estimated that for every 1 L of beer that is brewed, around 5 L of water are used: mostly for the brewing, rinsing, and cooling processes. Consequently, breweries generate large amounts of wastewater, characterized by significant levels of organic substances (starch, sugars, ethanol and volatile fatty acids), that require adequate treatment before discharge into the environment. Conventional wastewater treatment in breweries consists of various physico-chemical primary treatment steps followed by secondary biological processes, such as aerobic sequencing batch reactors, up-flow anaerobic sludge blanket reactors or anaerobic membrane bioreactors (Simate et al., 2011;Werkneh et al., 2019).
Thereafter, the biologically treated wastewater can be further polished for reuse. According to Verhuelsdonk et al. (2021), reusing brewery wastewater was found to be economically viable in 77.2% of simulated cases, showing the strongest dependency on costs was wastewater disposal. The endpoint application of the reclaimed wastewater, either for irrigation, cooling, packaging or general cleaning water, defines the treatment capacity required. A wide range of technologies have been evaluated as tertiary treatment for brewery wastewater with differing results, including quenched plasma, bioreactors, microbial fuel cells and membrane processes (Meshksar, Roostaee, and Rahimpour 2020).
Membrane-based separation processes have undergone rapid development in recent years as advanced tertiary treatment systems for water reuse due to their robustness, high chemical tolerance and low energy consumption Cath et al., 2010;Attarde et al., 2017). In particular, pressure-driven membrane technologies that are widely adopted in municipal wastewater treatment have been identified for their potential use in brewery wastewater reclamation. These include: stand-alone Ultrafiltration (UF), Nanofiltration (NF) or Reverse Osmosis (RO) polymeric membranes, as well as combinations of these technologies (Van der Bruggen and Braeken 2006;Acero et al., 2010;Villa and Salgado, 2013). In one case, Götz et al. (2014) investigated the filtration performance of a UF membrane treating different brewery process water flows and highlighted the negative impact of specific cleaning agents on the UF membrane. Braeken et al. (2004), tested the efficiency of NF membranes (with pore sizes between 1 and 10 nm) with biologically treated brewery wastewater. A very high removal of Chemical Oxygen Demand (COD) was reported but it was insufficient to obtain the required water quality, mainly due to the high concentration of organics present in the wastewater.
A later study that compared NF and RO processes, found that polymeric RO membranes exceeded the COD removal capacity of NF and retained higher fluxes when treating an ethanol-rich stream (Madaeni and Mansourpanah, 2006). In contrast, Anwar and Rahaman. (2020) concluded that both NF and RO suffered from severe membrane fouling, showing poor water recoveries below 18%. In general, RO is coupled with other physical separation techniques or physico-chemical pre-treatment steps such as coagulation/flocculation or powdered activated carbon to enhance its performance. For example, several integrated UF-RO membrane systems have been successfully installed in different types of industries with a wide range of water sources. Results from these case studies showed improvement in water quality, lower cleaning frequencies and lower operating costs than when using stand-alone RO filtration (Suárez et al., 2013). Although long-term operation of integrated membrane processes can be found in the literature, few are tested with pre-treated brewery wastewater. Therefore, there is a pressing need to explore these technologies at the pilot-scale, especially when coupled together, to evaluate their full potential for water reuse in the brewery industry.
Another membrane-based technology that is yet to be tested in the context of brewery wastewater reuse is Ceramic Micro-Filtration (MF). The cost of these membranes is rapidly decreasing with improved manufacturing and higher demand, and their application in wastewater treatment is growing (Park et al., 2015). New ceramic membranes have been recently introduced with unique advantages and properties over currently available polymeric membranes, including better backwash efficiency as the membrane can withstand high pressures and chemical pretreatment (Xing et al., 2013). Flocculation/Coagulation is effective in removing suspended particles and natural organic matter (NOM) prior to filtration. The dose of the coagulant has been found to influence the membrane filtration performance and an optimum dose exists where membrane fouling is reduced significantly (Meyn and Leiknes 2010).
Ozone also has a high reactivity with NOM and has been shown to reduce membrane fouling under appropriate operating conditions. Lehman and Liu. (2009), tested a hybrid ozonation-ceramic MF membrane system for long-term treatment of secondary wastewater and found that ozone significantly reduces membrane fouling. In addition, the resistance of ceramic MF membranes to mechanical, thermal, and chemical stress allows for more aggressive cleaning and a better recovery of membrane performance. Bhattacharya et al. (2013) investigated the dual-stage treatment of high organic load tannery wastewater with MF followed by RO and demonstrated that the product water was fit for reuse within the facility. Nonetheless, little research has been carried-out with ceramic MF systems with prior ozonation and/or coagulation, generating interest in testing this new technology at the pilotscale and particularly in the brewery industry. This paper provides relevant results from the long-term operation of full-scale innovative membrane-based processes for brewery wastewater recovery. The treatment capacity and water recovery performance by two different advanced tertiary treatment systems is evaluated and compared. These two systems or treatment trains consist in A) UF and RO modules in series and B) ozonation, coagulation, MF with ceramic membranes and RO. Both systems are continuously fed with effluent of a full-scale brewery wastewater treatment plant (WWTP). Commercially available membranes are tested in each unit and monitored with respect to fouling propensity, flux decline and contaminant rejection. Three specific criteria are used for the evaluation: 1) optimisation of the pilot plants to determine the ideal operational conditions, 2) efficacy of Clean-In-Place (CIP) procedures to restore the permeability of the membranes and 3) the water quality produced during continuous operation relative to the wastewater reuse regulations.

MATERIALS AND METHODS
This study was carried out at the Mahou-San Miguel brewing facility located in Alovera (Spain), one of the biggest brewing plants in Europe. The pilot testing site was located in the facility's WWTP with access to secondary wastewater. On average, the brewery WWTP treats up to 250 m 3 /h of wastewater.

Pilot Plants Description
In this study, two different tertiary treatment trains were evaluated and compared, each using a combination of different technologies to treat secondary effluent and obtain high quality product water for reuse purposes. The treatment trains included a combination of membrane-based processes (MF, UF and RO) as well as widely used physico-chemical processes. The schematics of both tertiary treatment trains are illustrated in Figure 2.
The first treatment train consists of an initial 150 µm ring filter, followed by two polymeric PVDF UF membranes in parallel and in a separate pilot plant, two RO modules in series. The UF membrane pilot unit equipped with two top tier commercial pressurized UF membranes, each with 51 m 2 of membrane surface and 0.03 µm nominal pore size, were operated using an out-in filtration configuration and dead-end mode. More detailed membrane characteristics are listed in Figure 1. The pilot plant was designed to reach a treatment capacity (permeate production) between 2 and 6.5 m 3 /h and a feed/permeate conversion of around 95%. Permeate from the UF membrane was also stored in a backwash tank, and this water was used for the chemically enhanced backwash which is described in detail in Membrane Cleaning Protocols. The UF unit was followed by a RO pilot plant equipped with two top tier commercial RO modules each containing 2 RO membranes with 37 m 2 of surface area and able to treat up to 4.5 m 3 /h with a global process recovery rate of over 90%.
The second tertiary treatment train consists of a security screen filter, an ozone pre-oxidation mixing tank, a coagulation tank, a ceramic membrane MF and a final RO unit. Ozone was dosed as pre-oxidation treatment to oxidize and ionize the organic compounds and maximize the coagulation efficiency, as well as minimize membrane fouling. The ozone produced from a corona discharge generator was injected into a static mixer and allowed to dissolve in the feed water in an ozone contact tank. The ozone generator was adjusted to reach ozone concentrations in feed water at the membrane entry of 0-25 mg/L. Coagulation was performed by continuously adding FeCl 3 to a in a coagulation tank with an average retention time of 60 s. Iron chloride was used as coagulant as it destabilizes micro-particles in water and promotes aggregation of NOM's which can easily be removed by high-pressure BW in the MF membrane (Yonekawa, Tomita, and Watanabe 2004). The MF unit consists of a monolithic ceramic membrane made in alumina, with insideout channels, a total surface area of 0.4 m 2 and 0.1 µm nominal pore size, operated in dead-end mode More detailed membrane characteristics are listed in Figure 1. The pilot plant can reach a treatment capacity (permeate production) of 160 L/h and a feed/ permeate conversion of around 99%. The MF membrane has two phases of operation, a filtration stage and backwash. At the completion of each filtration phase either a normal highpressure backwash lasting 20 s is applied, or a CEB lasting 15-30 min is applied. The chosen BW:CEB ratio can be varied according to the severity of membrane fouling. A full description of the membrane cleaning procedure of the MF membrane is described in Membrane Cleaning Protocols. The resulting effluent from the MF unit was used as feed for the RO unit which is equipped with two small scale commercial RO membrane units in series and is able to treat up to 30 L/h, with a recovery rate of over 75%.
Both pilot plants were fully automatized, running without continuous supervision and recording data process such as water flows, pressure, transmembrane pressure (TMP), temperature, membrane permeability, Redox, pH, as well as water quality parameters such as turbidity and conductivity.

Feed Water Composition
The WWTP of the brewery comprises a complete physicochemical and biological treatment including coagulation. The physico-chemical treatment aims to remove TSS and total phosphorus, and includes the following processes: homogenization, pH regulation, chemical coagulation (with aluminium polychloride) and primary settling. The biological treatment is divided into four stages: high-rate anaerobic bioreactor, phosphorus and nitrogen removal, activated sludge reactor and secondary settling.
The resultant secondary treated effluent was used as feed stream for the two tertiary treatment pilot-plants evaluated in this study. The feed water characteristics were obtained from 24 h integrated samples and the results are summarized in Table 1. As can be seen, the brewery secondary effluent contains a high concentration of organic matter and nitrates, 49.2 mg/L and 4 mg/L respectively, higher than municipal secondary treatment effluent due to the presence of ethanol and other chemical additives in the brewing process.

Towards Water Reuse Regulations
All the analysis was performed as per standard methods of water and wastewater analysis (APHA-AWWA-WEF, 2005). pH, turbidity, redox, conductivity, COD, ammonia (NH 4 + ), nitrate (NO 3 − ) and phosphate (PO 4 2-) were analysed using instruments  by HACH, United States. Water samples were also analysed by an external laboratory for the microbiological parameters, heavy metals and complex organic compounds shown in Table 4, to evaluate the product water quality compared to the legal limits indicated by legislation; EU Directive 2020/741 European nonpotable wastewater reuse legislation; R.D.1620/2007 Spanish regenerated wastewater legislation; R.D. 140/2003 Spanish Drinking water standard legislation. The analytical methods used for each parameter are described in the specific legislation.

Membrane Cleaning Protocols
Membrane fouling in MF/UF and RO membranes was evaluated through the increase of transmembrane pressure (TMP). This parameter indicates the membrane fouling propensity when a specific water quality is treated under certain operation parameters (flux, filtration run length, cleaning procedures). TMP data was continuously monitored to determine the fouling kinetics and the extent of membrane fouling. Cleaning strategies were required to restore the membrane permeability. Mechanical backwash cleanings were performed after each filtration cycle. Chemical cleanings can be divided into Chemically Enhanced Backwash (CEB) and Clean-In-Place (CIP) process. CEB protocol includes the addition of the chemical reagent into the backwash, with short contact time whereas the CIP protocol is more intense and includes reagent preparation, recirculation and soaking. CIPs are performed when the membrane is irreversibly fouled and when the permeability cannot be restored with CEBs. In this study, CIPs were employed when the TMP increased over 2 bar for the UF and MF membranes or at the start of a different Experimental stage.
In the UF pilot plant, a combination of mechanical and chemical membrane cleanings were employed based on backwash and assisted by air scouring to remove the foulants adhered to the pores and membrane surface. The cleaning intervals consisted of 60 s of CEB by dosing 1 ppm NaOCl and passing the chlorinated water at 6 m 3 /h through the membrane from the permeate side to the feed side, followed by 60 s backwash with only UF filtrate to remove any residual hypochlorite. The chemical cleanings start when the TMP reach a maximum programmed TMP, by elapsed time or at the end of each filtration stage.
On the other hand, the reagents tested in CIPs for the UF membrane were hypochlorite as oxidant reagent, citric acid and hydrochloric acid as acidic agents and an enzymatic cleaner (Tergazyme ® ). These were used in concentrations ranging 1,000-2000 ppm (NaOCl), 450-750 ppm (citric acid), HCl to reach a pH of 3 and 100 ppm (Tergazyme). Cleaning, soaking and membrane washing times varied from 30 to 120 min, 30-720 min and 30-120 min, respectively.
Ceramic MF membranes present high chemical and mechanical resistance and the cleaning protocols can be more intensive than polymeric UF membranes. Mechanical cleanings were based on high air-water pressure backwash at 5 bar followed by air flushing at 2 bar and rinsing before another filtration cycle. High pressure loosens accumulated solids on the membrane surface which are blown away by the air flushing.
The chemical cleanings or CEBs also comprised of a highpressure backwash and air flushing but included sodium hypochlorite (NaOCl) dosing at 13% and hydrochloric acid (HCl) dosing at 33%, on an alternating basis. These include a soaking step with the chemical added which typically lasts 15-30 min. CEB chemical cleaning is not applied as frequently as normal backwash but can extend the filtration times. CIP procedures with the MF membrane included NaOCl up to 3000 ppm and HCl at 5% with overnight soaking. All these chemical products met the regulatory standards for food grade reagents and can be used in the context of drinking water treatment.

RESULTS AND DISCUSSION
In order to compare the treatment performance of the two tertiary treatment systems studied in this work, the following three criteria were evaluated: operational conditions, cleaning strategies and the quality of the resulting water. The results of these criteria are outlined and discussed in the following sections.

UF + RO
In the UF + RO system, both technologies were operated individually with different operational parameters. The UF pilot plant was operated for 4 months at increasing fluxes and varying filtration times to identify the ideal operational conditions of the UF membranes in dead-end mode. In total, 10 stages were carried-out with fluxes ranging from 20 to 42 L/ m 2 ·h (LMH) and filtration times ranging from 10 to 45 min, as shown in Table 2. During the whole period of operation, a chemically enhanced backwash (CEB) was employed after each filtration cycle by dosing 100 ppm of NaOCl for 60 s and washing the membrane with UF permeate for another 60 s.
To determine the extent of membrane fouling, the reduction in permeability after each stage was calculated (Figure 3). At low fluxes of 20-25 LMH, the initial membrane permeability was relatively low, the membrane could be operated with longer filtration times of up to 45 min without any significant increase in TMP or loss in permeability. However, at increasing fluxes of over 25 LMH, the filtration times had to be reduced to below 30 min as the permeability decreased significantly due to severe fouling.
Furthermore, for every stepped increase in filtration time, the loss of permeability at similar fluxes increased accordingly. Only stages 7 and 8 showed an inconsistent loss in permeability, lower than expected, probably because membrane cleaning prior to filtration was not as effective and both stages began with a lower initial membrane permeability. In a study by Acero et al. (2010) on the treatment of secondary effluent with UF membranes, it was found that UF suffers from rapid flux decline due to the presence of soluble microbial products such as extracellular polymeric substances that form a biofilm on the membrane surface.
An interesting observation is that the fluxes and filtration times obtained with the UF membranes employed in this study were on the lower end of the typical PVDF membrane operating conditions used in wastewater treatment. Usually, the operating conditions are 17-68 LMH and 15-60 min backwash intervals. A possible explanation is that fouling was more severe than expected due to low MW organic foulants depositing on the inner surfaces of the fibres (Zhang et al., 2009), suggesting that a previous coagulation/ flocculation step would be required to enhance the performance of the UF unit (Simate et al., 2011). Finally, a flux range of 25-30 LMH with 15-20 min of filtration time were found to be the ideal operating conditions to obtain longer production periods and avoid frequent CIP membrane cleaning.
The RO unit was designed to treat a feed flow of 4.50 m 3 /h but the UF plant was limited to producing 3 m 3 /h of permeate, hence the RO unit was fed with UF permeate on a semicontinuous basis for a duration of 2 months. In addition, the flux had to be reduced to an average of 21 LMH, lower than the designed capacity of 30 LMH. The two spiral wound membrane modules were operated in series in two steps with recirculation of the concentrate. During the period of operation, the variation in TMP of the two modules was monitored at varying recovery rates (50-90%) and concentrate rejection rates (70-90%).
Higher recovery and rejection rates did not result in a significant increase in TMP, with constant TMP values averaging 0.25 and 0.08 bar for Step 1 and 2, respectively. Although these results demonstrate a low fouling propensity of the RO membranes, it is important to note that the RO unit was designed to treat higher fluxes. In general, RO combined with other physical separation techniques is a preferred conditioning method because of its simple automation, small space requirements and low use of chemicals for regeneration (Meshksar, Roostaee, and Rahimpour 2020).

O 3 + Coagulation + MF + RO
Unlike the UF + RO system, the pilot plant with the advanced combination of ozone, coagulation and membrane filtration processes was operated with the MF and RO units combined in the same treatment train. The MF membrane with enhanced ozonation and coagulation was operated for a duration of 2 months. In total, 8 stages were tested by changing the following parameters systematically: ozone dosing (1-25 ppm), FeCl 3 coagulant dosing (1-12 ppm), filtration times (8-30 min) and MF flux (80-125 LMH), as summarised in Table 3. After each filtration cycle the MF membrane was cleaned with a BW and a CEB by employing first NaOCl to remove organic matter and consequently HCl to remove any inorganic depositions. The ratio of CEB to BW was also changed throughout the stages of operation from 1:2 to 1:10.  In order to determine the ideal operating conditions for the MF membrane, the TMP and resulting permeability of the ceramic membrane were constantly monitored. At the designed ozone dosing levels of 1 ppm of dissolved O 3 at membrane entry and the designed coagulant dosing levels of 1 ppm of FeCl 3 , the filtration times had to be reduced to as low as 8 min with a CEB:BW ratio of 1: 2 to avoid rapid fouling and the TMP reaching 2 bar. However, low filtration times at an average flux of 80 LMH meant that the RO unit could not be operated continuously with MF permeate. On the other hand, at greater coagulant dosing levels of 3-6 ppm, the filtration times could be increased to 30 min, with a greater CEB:BW ratio of 1: 8 and the MF could be coupled with RO.
The maximum permeability obtained with these conditions was 400 LMHbar −1 , as shown in Figure 4. A study using a similar ceramic membrane, with a larger surface area of 25 m 2 and for the treatment of secondary wastewater reported ideal operating fluxes of 170 LMH, corresponding to permeability values ranging from 400 to 600 LMHbar −1 (Lehman and Liu 2009). In this earlier study, the CEB frequency used was once every 2 days, a much lower CEB application than the current study which employed a CEB every 4 h. This can be attributed to a much higher concentration of TSS and COD in the brewery wastewater used in this study.
Excessive coagulation was found to reduce drastically the membrane treatment capacity as coagulant dosing concentration of >10 ppm led to a decrease in permeability by 100 LMHbar −1 . An explanation for the improved performance at higher coagulant concentrations of 3-6 ppm is that the brewery wastewater is rich in soluble organics, such as polyphenols, that complex with the FeCl 3 and inhibit the coagulation of suspended solids (Götz et al., 2014). Thus, higher concentrations of FeCl 3 are needed for an optimal coagulation.
Increasing the ozone concentration to 25 ppm was found to have no significant impact on the extent of membrane fouling. Ozone is expected to decompose and degrade colloidal NOMs, which form organic gels adhered onto membrane surfaces, thus reducing membrane fouling (Oh et al., 2007;Lehman andLiu 2009). However, Schlichter, Mavrov, andChmiel (2003) also reported no influence of ozone on filtration behaviour. Since pre-ozonation has been reported to break down colloidal materials, especially those in the MW range of 1.8-67 kDa, it is possible that the feed water used in this study contained lower MW organics that are not degraded by ozone but require higher FeCl 3 pre-coagulation doses.
In almost every stage, the obstruction of membrane channels with solid particles caused spikes in TMP that  could not be reversed with a higher CEB:BW ratio and required an intensive CIP procedure. These membrane pore obstructions were the main challenge in operating the ceramic MF membrane. Despite of this, the ideal operating conditions were found to be a flux of 125 LMH, a coagulant dosing concentration of 3 ppm and a CEB:BW ratio of 1:8. When compared to the ideal operating conditions of the UF system, the ceramic MF membrane achieves almost 5 times higher flux with a similar extent of fouling. However, when considering the chemical consumption, the ceramic membrane requires three chemicals instead of one (FeCl 3 , NaOCl, HCl), and at higher concentrations. Park et al. (2015) performed a life cycle cost analysis on ceramic and polymeric membranes used in a WWTP and concluded that the greater capital costs of installing ceramic membranes were outweighed by the operation costs. Although ceramic membranes have a greater chemical demand, replacing polymeric membranes when irreversibly fouled raises the operation costs considerably. The RO unit was designed to treat a feed flow of 28 L/h, equivalent to a flux of 11 LMH, and a recovery of 75%. However, due to the fouling challenges of the MF membrane and the consequent lack of MF permeate as feed stream, the RO unit was operated at lower fluxes, progressively increasing from 1.8-4.3 LMH. This resulted in a stable and low TMP that averaged only 0.34 bar.

Clean-In-Place Cleaning
Severe fouling of the UF and MF membranes required Clean-In-Place (CIP) procedures to restore the permeability of the membrane and proceed to the next stages of operation. Several CIPs were tested on both the UF and MF membranes a European non-potable wastewater reuse legislation water quality limits. b Spanish regenerated wastewater for use in industrial services water quality limits. c Spanish potable reuse legislation water quality limits.
Frontiers in Chemical Engineering | www.frontiersin.org September 2021 | Volume 3 | Article 734233 8 and are resumed in the Supplementary Material in Supplementary Figure S1. For the UF membrane, CIPs were performed when the permeability dropped below 25 LMHbar −1 , which generally occurred every 2 weeks. Typical membrane cleaning intervals are between 1 and 6 months, indicating the severe irreversible fouling depositing on the UF membranes (Crittenden et al., 2005).
Sodium hypochlorite was found to be the most effective cleaning agent with concentrations of 1500 ppm, just below the maximum chlorine concentration limit of 2000 ppm recommended by the membrane supplier, effectively restoring permeability between 50-120%. On the other hand, the combination of NaOCl to eliminate organic matter and biofilm, citric acid at pH 3 for the removal of inorganic depositions and Tergazyme was most effective in tackling fouling, albeit its higher chemical cost demand.
An explanation for the extent of irreversible fouling could be a high concentration of low MW NOM fraction in the feed wastewater blocking the membrane pores and reducing the efficiency of CIPs. It has been reported that the use of NaOH at 2% before the application of citric acid, can be very efficient at removing low MW organic foulants (Zhang et al., 2009). In a study that employed UF membranes with a silex filter pretreatment to treat power industry wastewater, the use of continuous inline chlorination lowered the CIP frequency to every 4-6 months (Suárezet al., 2013).
In contrast, the greater chemical resistance of the MF membrane allowed for higher concentrations of cleaning agents. CIP procedures were generally employed after severe obstruction of the ceramic membrane with solid particles, which occurred often. The most effective CIP was found to be the combination of NaOCl at concentrations of 2000-3,000 ppm and an overnight soaking with 5% HCl. Similar concentrations of hypochlorite plus overnight soaking were used to fully restore the permeability and efficiently increase the flux to 255 LMH, as reported by Lehman and Liu. (2009).
The drawback of using stronger cleaning solutions is the need for thorough washing with water and the cost of using higher chemical concentrations. With a similar ceramic membrane, (Dow and Duke, 2013), suggested a minimum of 90 days between CIPs, or when a filtration cycle reaches 1.5 bar, to restore membrane performance when using coagulant and ozone. Although the ceramic MF membrane has a greater chemical cleaning demand, the membrane performance can be recovered regularly, unlike the UF polymeric membranes that have shorter membrane lifetimes.
Since the frequency of CIP routines has a large bearing on the plant's operating costs, solving the problems of feed waters rich in organics and TMP spikes by implementing more effective pre-treatments could increase the competitiveness of both UF and MF treatment systems in brewery wastewater treatment.

Water Quality
One of the main objectives of this study is the comparison of the quality of water resulting from the two treatment systems. The results of water quality analyses from the main streams (feed and product of each process) are summarised in Table 4. Monitoring parameters have been selected to evaluate if the water quality fulfils the standards established by the European and Spanish regulation for water reuse. For this purpose, different final uses such use in industrial services (RD 1620(RD /2007, irrigation (Directive 741/2020) and drinking water (RD 140/2003) have been considered.

UF + RO
The brewery wastewater used as feed for the UF unit showed significant fluctuations in organic matter (19-70 mg/L COD) and nitrate (2.8-6.8 mg/L) which were caused by irregular discharge peaks from the brewing process. Throughout the period of operation, the UF membrane was very effective in reducing suspended solids (99%) and turbidity (87%) due to the sifting effect of the 0.03 µm membrane pore size. This reduction in turbidity, independent of feed turbidity, is one of the biggest advantages of UF over conventional pre-treatment systems (Zhang et al., 2009).
In contrast, a poorer and inconsistent elimination of organic matter (28%), dissolved salts (9%) and nitrates (4%) was observed ( Figure 5), in part due to these irregular discharge periods but also due to the low separation properties of dissolved compounds by UF membranes. Similar results for COD removal rates were obtained by Götz et al. (2014) using UF membranes to filter biologically treated brewery wastewater. On the other hand, a full-scale UF module with a capacity to treat 30 m 3 /h of brewery wastewater was reported to eliminate COD between 54 and 66% (Chaitanyakumar et al., 2011). The limited reduction of nitrates by UF was also reported by Acero et al. (2010).
Although the UF permeate quality meets the requirements for agriculture irrigation (EU Directive 741/2020) in terms of suspended solids, it was found to exceed the 10 CFU/100 ml limit for E. Coli. The presence of this faecal contamination indicator in the UF permeate is not related to influent quality or defective membranes, but as reported in previous studies, is mainly due to contamination of the membrane in the permeate zone (Gómez et al., 2007). UF permeate is an excellent stream to be used in industrial services described in the RD 1620/2007: irrigation of recreational areas, fire extinguisher systems, hosing down, and industrial vehicles washing.
After treatment with the RO unit, the final water produced was of excellent quality, meeting all the limits for drinking water (RD 140/2003). The RO membranes showed a constantly high rejection of salts (95%) and lower but still efficient elimination of organic matter (75%) and nitrate (74%), as shown in Figure 5. On the other hand, the lower removal of turbidity is attributed to the high elimination of suspended solids by UF. Similar rejections of organic matter were observed in an earlier study using NF membranes to treat effluent from biologically treated brewery wastewater, resulting in permeate COD concentrations below 5 mg/L ( Van der Bruggen and Braeken 2006). In addition, two full-scale RO modules in series with a capacity to filter 30 m 3 /h of UF treated wastewater, were reported to reduce COD by 70-90% and total dissolved solids up to 94% (Chaitanyakumar et al., 2011).

O 3 + Coagulation + MF + RO
Even though the combined ozone, coagulation, MF and RO system employed a pre-treatment with a screen filter, the wastewater entering the MF membrane had a very high solids content (averaging 17.6 mg/L compared to the UF feed concentration of 4.5 mg/L). The concentration of organic matter was also higher in the MF feed, whilst the nitrate and conductivity content was similar. Despite this difference in feed water quality, the elimination of suspended solids by the MF unit averaged 98%, and COD removal was superior to the UF membrane with an average elimination of 34% ( Figure 6). The eliminated COD is most likely attributed to particulate organic matter. An explanation for the greater elimination of solids and organic matter compared to UF could be the coagulation of suspended solids by the addition of FeCl 3 and the oxidation of organic compounds by ozone.
In a recent study that coupled MF to RO in treating tannery wastewater, the MF membrane was reported to achieve 91% COD reduction without a previous coagulation step (Bhattacharya et al., 2013). However, another study using a similar ceramic membrane reported very low COD reductions, with preozonation only affecting effluent colour (Dow and Duke, 2013). Besides COD and turbidity, the MF system showed a very poor elimination of dissolved nitrate and salts, lower than the UF membrane.
In contrast, the last RO treatment step showed a very high rejection of salts (90%), organic matter (94%) but a poor rejection of nitrates (38%), as shown in Figure 6. It is interesting to note that the rejection of nitrate is irregular, and this fluctuation probably arises from the discharge of nitrogen-rich waste streams to the brewery WWTP. Likewise to the UF system, the MF permeate quality meets the requirements for agriculture irrigation (EU Directive 741/2020) in terms of suspended solids, however, it does not comply with the 10 CFU/100 ml limit for E. Coli.  This contrasts with the pathogen removal capacity observed by (Dow and Duke, 2013), whereby the presence of E. Coli was not found in the MF membrane product permeate. The authors attributed this to the enhanced backwash pathogen disinfection unique to this process. According to the RD 1620/ 2007, the MF permeate stream can also be used in industrial services. After treatment with the RO unit, the final water produced met all the limits for potable water reuse (RD 140/2003).

CONCLUSION
The main focus of this study was to compare the performance of two different membrane processes, UF + RO and O3+Coagulation + MF + RO, to treat secondary wastewater from the brewery industry. Long-term operation of both systems provided the following conclusions. Polymeric UF membrane filtration was found to suffer from severe membrane fouling which can be mitigated by increasing filtration intervals, limiting the production flux to 25-30 LMH, applying more frequent CIPs and if possible, implementing a coagulation pre-conditioning step.
On the other hand, the ceramic MF system could be operated at higher fluxes (125 LMH) with sufficient coagulant dosing (3-6 ppm) and more frequent chemical backwashes. It was found that ozone had no significant impact on coagulation and ceramic membrane fouling propensity. Although the MF membrane can achieve higher production rates than the polymeric UF membrane, the use of chemicals for coagulation, CEB and CIPs was greater.
A full life cycle cost analysis allows to weigh the capital costs, such as membrane installation, against the operating costs of both systems which include membrane replacement, chemicals and electricity consumption. Both UF and ceramic MF units produced treated water at a quality within the national regulatory framework for reuse in industrial services (RD 1620(RD /2007. However, whilst the MF membrane showed a higher elimination of suspended solids and organic matter, the UF membrane exceeded in terms of nitrate and dissolved salts removal. The RO units, aside from their operational simplicity and reliability, showed a very high capacity to polish the UF and MF effluent streams to water quality standards apt for potable reuse.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

AUTHOR CONTRIBUTIONS
MST carried out the experimental work and wrote the manuscript with technical support from JA and VM. PFL and YA supported with initial start-up and administrative tasks. VM and JFC supervised the project. FR, AR, JFC and VM conceived the original idea.