Towards the Implementation of Circular Economy in the Wastewater Sector: Challenges and Opportunities

The advancement of science has facilitated increase in the human lifespan, reflected in economic and population growth, which unfortunately leads to increased exploitation of resources. This situation entails not only depletion of resources, but also increases environmental pollution, mainly due to atmospheric emissions, wastewater effluents, and solid wastes. In this scenario, it is compulsory to adopt a paradigm change, as far as the consumption of resources by the population is concerned, to achieve a circular economy. The recovery and reuse of resources are key points, leading to a decrease in the consumption of raw materials, waste reduction, and improvement of energy efficiency. This is the reason why the concept of the circular economy can be applied in any industrial activity, including the wastewater treatment sector. With this in view, this review manuscript focuses on demonstrating the challenges and opportunities in applying a circular economy in the water sector. For example, reclamation and reuse of wastewater to increase water resources, by paying particular attention to the risks for human health, recovery of nutrients, or highly added-value products (e.g., metals and biomolecules among others), valorisation of sewage sludge, and/or recovery of energy. Being aware of this situation, in the European, Union 18 out of 27 countries are already reusing reclaimed wastewater at some level. Moreover, many wastewater treatment plants have reached energy self-sufficiency, producing up to 150% of their energy requirements. Unfortunately, many of the opportunities presented in this work are far from becoming a reality. Still, the first step is always to become aware of the problem and work on optimizing the solution to make it possible.


Introduction
It is evident that without water, there is no life. Water is not only essential for human survival, but also for all living organisms. On 28 July, 2010, water and sanitation were recognised as human rights by the United Nations General Assembly [1]. Moreover, water is essential for human activities in many sectors of the economy-and not only from a biological point of view. In the previous century, the increase of human activities in all economic sectors has favoured the development of society (e.g., increasing life expectancy). However, this was at the expense of the over-exploitation of planet resources, accompanied by the emission of greenhouse gases into the atmosphere, organic and

Legislation and Guidelines Around the World
It is quite difficult to compile all the legislation and guidelines around the world about water reclamation and reuse, for this reason, this section tries to summarize the most important guidelines, as well as the legislation of some leading and emerging countries in this field.
In 2004, the Environmental Protection Agency of the United States of America (US EPA) published "Guidelines for water reuse". This guideline was revised later, in 2012. In this document, different physico-chemical and biological parameters are established regarding the final use of the reclaimed water. In this way, for instance, reuse of reclaimed water is recommended for agricultural purposes only when the concentration of Escherichia coli is below 1 CFU/100 mL. This recommendation contrasts with the ones given by the World Health Organization (WHO) in 2006. Thus, the WHO published the "Guidelines for the safe use of wastewater, excreta and greywater". This document tried to establish the maximum admissible values for different physico-chemical and biological parameters posing a threat to human health, considering the reuse of reclaimed wastewater in agriculture and aquaculture. In this case, the WHO considered that reclaimed water can be reused as long as the concentration of E. coli is below 1000 CFU/100 mL. This difference between both guidelines is evidently the reason why WHO guidelines are applied in developing countries. Usually, the populations in these countries have limitations (economical, lack of government support, lack of qualified personnel, etc.) in terms of access to technologies for water treatment.
In the European Union, the reclamation and reuse of water encounter numerous barriers in most of the member countries, for example, a supportive and coherent framework in terms of legislation. This is the reason why the Commission is working on common legislation for all of the members in the frame of the Circular Economy Plan. Nowadays, some European countries have the legislation to regenerate and reuse wastewater (e.g., Spain, Portugal, France, etc.); others are preparing legislation, while others have none at all. Table 1 summarizes the sectors in which reclaimed water is currently

Legislation and Guidelines Around the World
It is quite difficult to compile all the legislation and guidelines around the world about water reclamation and reuse, for this reason, this section tries to summarize the most important guidelines, as well as the legislation of some leading and emerging countries in this field.
In 2004, the Environmental Protection Agency of the United States of America (US EPA) published "Guidelines for water reuse". This guideline was revised later, in 2012. In this document, different physico-chemical and biological parameters are established regarding the final use of the reclaimed water. In this way, for instance, reuse of reclaimed water is recommended for agricultural purposes only when the concentration of Escherichia coli is below 1 CFU/100 mL. This recommendation contrasts with the ones given by the World Health Organization (WHO) in 2006. Thus, the WHO published the "Guidelines for the safe use of wastewater, excreta and greywater". This document tried to establish the maximum admissible values for different physico-chemical and biological parameters posing a threat to human health, considering the reuse of reclaimed wastewater in agriculture and aquaculture. In this case, the WHO considered that reclaimed water can be reused as long as the concentration of E. coli is below 1000 CFU/100 mL. This difference between both guidelines is evidently the reason why WHO guidelines are applied in developing countries. Usually, the populations in these countries have limitations (economical, lack of government support, lack of qualified personnel, etc.) in terms of access to technologies for water treatment.
In the European Union, the reclamation and reuse of water encounter numerous barriers in most of the member countries, for example, a supportive and coherent framework in terms of legislation. This is the reason why the Commission is working on common legislation for all of the members in the frame of the Circular Economy Plan. Nowadays, some European countries have the legislation to regenerate and reuse wastewater (e.g., Spain, Portugal, France, etc.); others are preparing legislation, while others have none at all. Table 1 summarizes the sectors in which reclaimed water is currently Water 2020, 12, 1431 5 of 52 applied on by country, and the regulations or guidelines of each country (European Union countries and outside EU countries).
Spain was ranked as the country in Europe with the highest rate of wastewater reuse, and, as can be observed in Figure 1, is in the top ten worldwide [46]. The Royal Decree 1620/2007 (RD 1620/2007) establishes the legal regime for the reuse of reclaimed water in Spain, thereby setting up different maximum admissible values for different physico-chemical and microbiological parameters, depending on the final use for the reclaimed water. In relation to the microbiological parameters, Escherichia coli and intestinal Nematodes (Ancylostoma, Trichuris, and Ascaris genera) must be controlled for all established uses. Legionella analysis is also mandatory for all of the established water uses, except for environmental use, which does not contemplate its control. Salmonella spp. should be controlled when the uses are agricultural and industrial. Finally, the control of the parasitic plathyhelminthes Taenia saginata and Taenia solium is mandatory if the water is used to irrigate pastures for consumption by meat-producing animals, since they are intermediate hosts of these parasites.
In addition to the existing quality criteria in RD 1620/2007, depending on the use to which the reclaimed water is going to be destined, others included in specific matters should be considered. For example, it needs to be in commensuration with the parameters established in Directive 2006/118/CEE, regarding the protection of groundwater against pollution and deterioration, when the reclaimed water is used for environmental purposes. This standard includes Environmental Quality Standards (NCAs) related to nitrates, salinity, pesticides, metals or metalloids, trichloroethylene, tetrachloroethylene, and other hazardous substances. Likewise, Directive 80/68/CEE establishes that, to guarantee effective protection of groundwater, it is necessary to prevent the discharge of List I Hazardous substances and limit the discharge of List II Hazardous substances. Along the same lines, RD 60/2011 on environmental quality standards in the field of water policy establishes NCAs for the so-called preferred, priority, and other pollutants [47].
Regarding outside European Union countries, Table 1 summarizes some information related to the reuse of treated wastewater in India, Mexico, Australia, Jordan, Singapore, South Africa, China, and Namibia. Some of them allow the reuse of treated wastewater as drinking water, as is the case of Singapore or Namibia. However, there are important differences between both countries in terms of legislation and technological infrastructure. In both cases, water is a national priority and both governments have solid strategies to promote water reuse [48,49]. Other countries are promoting water reuse in many purposes except for drinking water; this is the case of Mexico, China, Jordan, Australia, India, and South Africa. Almost all of them have solid legislation or guidelines with limits or restrictions in the use, according to quality water parameters. Table 1. Legislation regarding the reuse of reclaimed water for various purposes in the different countries of the European Union (EU) (Adaptation from [50]) and outside of the European Union. X: destination for reclaimed wastewater regulated in the legislation.

Risks of Reclaimed Wastewater
Wastewater discharges, even after treatment, contains a large number of pollutants potentially dangerous to human health and ecosystems. Some of these pollutants, which are being increasingly analysed and found in reclaimed wastewater [51,52], are pathogens [53], micropollutants [54], antibiotic resistant genes [55], nanomaterials, by-products of disinfection, personal care products, and pharmaceuticals.
In terms of reuse of water, the presence of pathogen germs, such as bacteria, virus, or protozoa, represents the most severe threat for human health [56], as they are responsible for hydric waterborne diseases. However, chemical pollutants, such as medicines, heavy metals, hydrocarbons, etc. could also pose a risk to human health. The population could be exposed to these pollutants directly by consumption of polluted water, inhalation, or by skin contact, or indirectly by the consumption of food dropped or produced with polluted water effluents.
Studies are reporting the emission of different pathogens after the discharge of treated effluents. López et al. [57] and Mosteo et al. [58] reported the discharge of different pathogen bacteria, such as E. coli, Enterococcus sp., Pseudomonas sp., Clostridium perfringens, or Staphylococcus aureus in different wastewater treatment plants (WWTPs) located in Spain, with different secondary treatments, and even with, for some of them, tertiary treatment based on ponds. In the research by Mosteo et al. [58] pathogen parasites, such as Giardia and Cryptosporidium were not detected, but free-living amoebae, which are potentially pathogenic, were observed. However, other authors, such as Ajonina et al. [59], have reported the presence of Cryptosporidium parvum in the effluent of WWTP. As the presence of any of these pathogens would be responsible for possible waterborne diseases, the total or partial disinfection of wastewater becomes mandatory in order to be reused. Chlorination is the most common disinfectant agent because it satisfies most requirements as an ideal disinfectant. However, its use as a disinfectant to treat wastewater has the main disadvantage of generating disinfection by-products, such as trihalomethanes (THMs), among others, a consequence of the reaction between organic matter and chlorine [60]. THMs are carcinogenic, and their presence in water bodies represent a new threat for humans and ecosystems. For this reason, in the previous decade, new disinfection treatments have been developed in order to prevent the generation of these disinfection by-products, as well as to increase disinfection efficiency compared with chlorination or traditional technologies. Table 2 shows a summary of the recent studies related to the removal of pathogens in water reclamation. As can be observed in Table 2, the application of AOPs based on the generation of free radicals with a high oxidation potential has increased the efficiency of disinfection of wastewater and, hence, it has become a credible alternative to chlorination. Technologies, such as heterogeneous photocatalysis, Fenton, and photo-Fenton reaction, oxidation by persulfate salts, combination of ozone with UV-C radiation, or H 2 O 2 , etc., have been widely studied and reported as efficient in the removal of different microorganisms. Besides AOPs, there are other efficient technologies to treat wastewater, such as nanofiltration, reverse osmosis, electrochemical technologies, and coupling between different systems. The increase of human activities poses a growth in the synthesis and consumption of new chemical substances [76]. These substances are released into the municipal sewer system via human excretion and direct/indirect disposal of medicine and chemical, and without the appropriate treatment, they reach the water bodies at trace level (ppb or ppt). In most cases, the lack of specific regulations and methodologies to detect them at trace level, as well as the largely unknown long-term effects on aquatic ecosystems and human health, making them the contaminants of emerging concern [77]. As previously mentioned, though there are various sources of contaminants of emerging concern, most of them belong to hospitals and veterinary, industrial, and domestic activities. They can be classified in different groups [78]: brominated flame retardants, chlorinated paraffins, pesticides, organofluorine compounds, personal hygiene products, pharmaceuticals, antibiotics, and drugs. These substances are characterized by high chemical stability and a low biodegradability. For this reason, conventional WWTP are not designed to remove them, the occurrence of these substances in the treated effluents being an usual affair [79]. Gros et al. [80] and Ibáñez et al. [81] reported the occurrence of medicines/antibiotics and other micropollutants in wastewater effluents in Greece and Sweden, respectively. However, further research is being done to know if the presence of these substances pose a risk if the reclaimed water is used. Some authors have reported the effects of micropollutants on aquatic ecosystems [82,83], and the World Health Organization (WHO) reported the possible impacts from the consumption of low concentrations of pharmaceuticals present in drinking-water [84,85]. Some authors have verified the WHO conclusions with further research [86,87]. Table 3 shows recent literature references about the occurrence and reduction of micropollutants in wastewater. Between the degradation strategies, AOPs are feasible treatments, because of their capacity to degrade any kind of chemical, without forgetting their combination with other remediation treatments. Table 3 also summarizes other techniques, such as adsorption, biological treatments, filtration technologies, etc. Their inclusion, as a tertiary treatment in WWTP, will solve the threat.

Tertiary Treatment in WWTP: Technologies for Wastewater Reclamation
As reported in Section 2.3, the removal of the main risk associated with the reuse of reclaimed wastewater is well known, it is important to understand that there is not just a single technology to regenerate wastewater, and depending on the final quality required for the reuse, different possible configurations of treatment can be adopted. If the reclamation is considered as a tertiary stage in a WWTP, omitting the explanation of primary and secondary treatment, the regeneration line can be divided into four kinds of treatments with different efficiency in terms of microbiological pollution removal. Figure 2 shows the different configuration of tertiary treatments [107]. The most demanding treatment (treatment 1), can be composed of a coagulation-flocculation treatment followed by filtration or decantation; the whole stage has the aim of removing colloidal material and, for that, reducing organic matter concentration and turbidity. Then, it can be incorporated-a separation process based on the use of membranes (i.e., ultrafiltration (UF) or reverse osmosis (RO)). It is important to note that reverse osmosis can separate dissolved solids/salts. In this way, this treatment allows obtaining almost ultrapure water free of organic/inorganic and biological substances. Finally, although reverse osmosis can remove biological pollution, a disinfection step is required to introduce a residual amount of disinfectant to guarantee the quality of water until the point of use. Logically, the application of this treatment will have a higher investment, maintenance, and operating cost. When water with ultrapure quality is not required, the configuration of the line can be slightly modified, substituting, in this case, the UF/RO stage for a simple pre-disinfection based on UV-C radiation (treatment 2). Treatment 2 allows to obtain a high quality effluent, with very low content of organic matter, suspended solids, and turbidity thanks to the coagulation-flocculation stage, and with very high quality in terms of biological pollution, but without guaranteeing the absence of microbiological pollution. Finally, when the required quality for reuse is not high, the treatment can be simplified, up to a point, to a simple filtration and disinfection (treatment 3), or even only a filtration (treatment 4). As mentioned earlier, the reuse could be directed from the secondary effluent of the WWTP in the case where the quality of this effluent is within the permissible limits of the physico-chemical and biological parameters established in the legislation.
configurations of treatment can be adopted. If the reclamation is considered as a tertiary stage in a WWTP, omitting the explanation of primary and secondary treatment, the regeneration line can be divided into four kinds of treatments with different efficiency in terms of microbiological pollution removal. Figure 2 shows the different configuration of tertiary treatments [107]. The most demanding treatment (treatment 1), can be composed of a coagulation-flocculation treatment followed by filtration or decantation; the whole stage has the aim of removing colloidal material and, for that, reducing organic matter concentration and turbidity. Then, it can be incorporated-a separation process based on the use of membranes (i.e., ultrafiltration (UF) or reverse osmosis (RO)). It is important to note that reverse osmosis can separate dissolved solids/salts. In this way, this treatment allows obtaining almost ultrapure water free of organic/inorganic and biological substances. Finally, although reverse osmosis can remove biological pollution, a disinfection step is required to introduce a residual amount of disinfectant to guarantee the quality of water until the point of use. Logically, the application of this treatment will have a higher investment, maintenance, and operating cost. When water with ultrapure quality is not required, the configuration of the line can be slightly modified, substituting, in this case, the UF/RO stage for a simple pre-disinfection based on UV-C radiation (treatment 2). Treatment 2 allows to obtain a high quality effluent, with very low content of organic matter, suspended solids, and turbidity thanks to the coagulation-flocculation stage, and with very high quality in terms of biological pollution, but without guaranteeing the absence of microbiological pollution. Finally, when the required quality for reuse is not high, the treatment can be simplified, up to a point, to a simple filtration and disinfection (treatment 3), or even only a filtration (treatment 4). As mentioned earlier, the reuse could be directed from the secondary effluent of the WWTP in the case where the quality of this effluent is within the permissible limits of the physico-chemical and biological parameters established in the legislation.

Nutrients
Nutrient recovery can be seen as a loop or cycle comprising the following stages: (i) agricultural production; (ii) processing; (iii) consumption; (iv) collection; and (v) treatment of waste and wastewater.
Thus, the return of the nutrients reclaimed from wastewater as mineral and organic substances to agriculture closes the cycle. It is for this reason that municipal wastewater is an essential alternative source of nutrients [108].
The development of recovery processes for nutrient recycling is gaining increasing attention due to both economic and environmental reasons, such as improved cost-effectiveness of water treatment plants and reduced drinking water consumption [109].
The modern sanitation approach is focused on the recovery of valuable resources from wastewater by implementing energy recovery processes, maximizing water reuse, and prioritizing the recycling of nitrogen, phosphorus, and organic matter present in sewage [110]. By doing so, wastewater treatment facilities will be converted into resource recovery centres.
Different techniques can be employed for nutrient recovery, including chemical, physical, and biological processes. However, the most widely used method for the simultaneous recovery of nitrogen and phosphorus is the formation of struvite (magnesium ammonium phosphate), through crystallization/precipitation. Struvite is an excellent fertilizer due to its low solubility in water and slow rate of release. Besides, it can be applied directly to soil [111].
Struvite formation requires the presence of ammoniacal nitrogen (NH 4 + ) and phosphate (PO 4 3− ), which reacts according to reaction 1 [112]: It should be noted that its formation could be accelerated by the addition of magnesium (Mg 2+ ) in excess [113].
Besides struvite, other products that can be recovered from secondary streams (generated in primary sludge thickening or after dewatering digested sludge) are ammonium sulphate or nitrate and calcium phosphate (see Table 4). To that extent, different technologies, such as Pearl ® , PhosNix ® , AirPrex ® , PHOSPAQ ® and Crystalactor ® can be used [113,114]. Slow crystallization, which can be found in Ostara ® DHV, Crystalactor ® , and P-RoC ® technologies, and instant precipitation (PRISA) are always required in liquid effluents. This allows recovery efficiencies around 85%-90% of the phosphorus contained in the supernatant [115]. Considering that heavy metals are present in low concentrations in the supernatant of the digester, it is unlikely that they produce soil contamination if the product is applied in agriculture.
The main challenge related to struvite precipitation is the recovery of phosphorus from wastewaters with low content of this element (<50 mg/L) and a high concentration of suspended solids (<2000 mg/L) [116]. For this reason, chemical precipitation of phosphorus with calcium (Ca 2+ ) is also very common. Other reagents, such as aluminium (Al 3+ ) and iron (Fe 3+ ) can also be employed, although its use is not generalised because Al is toxic to most plants and Fe is strongly bound to phosphorus, making it less available [112].
There are also physical processes that can be used for nutrient recovery, such as ion exchange, adsorption, or membrane processes. Thus, Johir et al. [117] coupled a membrane bioreactor (MBR) to an ion-exchange unit, recovering the nutrients contained in the effluent of the MBR effectively. However, the operating cost of this technology is high because chemicals are needed for the regeneration of the spent material.
Membrane processes are adequate to produce a concentrate (including phosphorus, nitrogen, and potassium) that can be used in irrigation or as a raw aqueous stream for nutrient recovery by crystallization or precipitation [112]. The disadvantages associated with these processes are high-energy consumption and membrane fouling due to the accumulation of pollutants or salts, thus, being necessary to be cleaned regularly [116].
Zeolites can also be used as an adsorbent for the treatment of digestate due to their high cation-exchange capability, mainly for potassium and ammonium [118]. Natural zeolites, such as clinoptilolite, can also be employed. In this case, ammonium is adsorbed onto the mineral and when the material is spent, it can be used as a slow-release fertiliser or soil conditioner.

High Added-Value Products
The food-manufacturing sector produces significant amounts of nutrient-rich effluents, which can be used as a resource to recover high added-value products, thus, developing more environmentally friendly processes. In this sense, during the extraction of olive oil, polyphenols are partitioned between water and oil phases, the main fraction being present in wastewater due to their high polarity and water solubility. The typical concentrations of polyphenols in olive oil wastewaters varied from 5 g/L to 25 g/L [122]. Thus, their recovery is promising since they are natural antioxidants of great interest, for food, pharmaceutical, and cosmetic industries [123]. Different technologies have been proposed for the recovery of olive polyphenols. Yangui and Abderraba [124] evaluated the use of activated carbon coated with a natural agent (milk proteins) for their recovery. An extraction yield of 80% and overall efficiencies for total phenols of 75.4% were obtained. Besides, the recovery of the most valuable compound, hydroxytyrosol, achieved a value of 90.6%. Kiai et al. [125] studied the Cloud Point Extraction (CPE) methodology to pre-concentrate phenolic compounds from olive processing wastewaters. The CPE process is a separation technique with low energy requirement, which is based on the ability of non-ionic surfactants to form micelles in aqueous solutions. Three non-ionic surfactants were analysed: (i) Triton X-100, (ii) Tween 80, and (iii) Genapol X-080. The optimum conditions were found to be a temperature of 70 • C, acidic pH (2.0), 30 min of equilibrium time and 10% (w/v) of surfactant. The phenolic compound recoveries achieved under these conditions were 65%, 62%, and 68% for Triton X-100, Tween 80, and Genapol X-080, respectively. Kalogerakis et al. [126] assessed the recovery of total phenols, hydroxytyrosol, and tyrosol by means of liquid-liquid solvent extraction. The effect of different organic solvents, such as diethyl ether, ethyl acetate, and a mixture of isopropyl alcohol and chloroform on efficiency recovery, was studied. The performance of the extraction agents followed this order: ethyl acetate >isopropanol/chloroform/> diethyl ether. It was calculated that around 0.25 kg of hydroxytyrosol, 0.062 kg of tyrosol, and 3.44 kg of total phenols could be attained after treating 1 m 3 of olive wastewater with ethylacetate.
Wastewaters from dairy industries are also characterised by a high content in macronutrients with nutritional value, such as proteins and lipids, which can be employed as animal feedstock. For example, the Gopinatha et al. [127] study focused on the use of a low-cost polymer (lignosulphonate) to recover proteins and lipids from dairy effluent. Under optimum conditions (pH = 3.5, concentration of lignosulphonate = 0.016% (w/v), and temperature = 22 • C, a lipid recovery of 96% and a protein recovery (mostly caseins) of 46% was obtained.
Soybean wastewaters contain proteins and anti-nutritional factors (ANF), including the Bowman-Birk protease inhibitor, which showed anti-cancer or cancer-preventive activity [128], Kunitz trypsin inhibitor, and soybean agglutinin. Therefore, the recovery of both proteins and ANF can become an interesting alternative with potential therapeutic value. Li et al. [129] analysed the use of a quick-shearing system to obtain homogeneous electrostatic complexes between soybean whey protein and a high concentration of polysaccharide (4%, w/v). Two types of complexing agents, sulphated polysaccharides and carboxylated, were evaluated for protein recovery and trypsin inhibitor activity, paying special attention to the effect of pH. Sulphated polysaccharides were found to be the most suitable complexing agents, achieving a recovery of proteins of 90% and removal of ANF of 80% at pH 2.5.
Coal gasification wastewater is polluted with phenols, including monohydric phenols and dihydric ones, their concentrations ranging from 2900 to 3900 mg/L and 1600 to 3600 mg/L, respectively [130]. Different solvents (diisopropyl ether (DIPE) and methyl isobutyl ketone (MIBK)) can be used for phenol removal, depending on the type of phenols contained in the coal wastewater. Guo et al. [131] assessed the removal of total phenols and hydroquinone (dihydric phenol) using three different solvents: (i) methyl propyl ketone (MPK), (ii) DIPE, and (iii) MIBK. Besides, one-stage, two-stages, and three-stages of countercurrent extraction were also performed. The efficiency of removal using MPK was greater than those achieved using DIPE or MIBK. Besides, the use of three-stage extraction with MPK allows a total phenol recovery of 99.6%, thus, obtaining a final concentration of phenols lower than 100 mg/L. A comparison between MIBK and MPK showed that the decrease in phenol emissions was as high as 52.5% by using MPK. Gui et al. [132] have developed a novel method for phenol and ammonia recovery based on an extraction process using a self-developed reagent, named as IPE. This methodology implies the following stages: (i) pre-extraction with IPE, (ii) stripping out of sour gas and ammonia, and (iii) deep extraction with IPE. Besides, the use of MIBK as an extracting agent was also evaluated for comparison purpose. The removal of total phenols and ammonia was similar with both extraction agents, the values being 90% and 97%, respectively, for IPE and 90.6% and 98%, respectively, for MIBK.
Wastewaters produced from pharmaceutical industries present a variable composition depending on the raw materials, the processes employed in the manufacturing, the season, and the location of the facility, which mainly affects the water quality. Therefore, it is complicated to define a treatment system for such a diverse industry [133]. However, pre-treatment and recovery of various valuable by-products, such as acids, heavy metals, solvents, and active pharmaceutical ingredients (APIs), which are contained in waste streams, is a control strategy of the waste, thus, making the pharmaceutical industry more sustainable. It is worth noting that the recovered waste stream can be used elsewhere in the process and the water can be employed in cooling towers or boiler feed, reducing the consumption of freshwater and, consequently, the operating costs. Taking into account that pharmaceutical wastewaters are composed of substances with molecular weights higher than 250 Da, membrane technologies can be effectively used to recover the product, provided that these are the only substances present in the effluent. In this sense, the application of nanofiltration has rapidly increased in the past decade. It has been commonly employed in aqueous solution with antibiotics [134]. For example, amoxicillin (MW = 365.4 Da), a widely used antibiotic in human and veterinary medicine to prevent respiratory, gastrointestinal, and urinary bacterial infections, can be separated and recovered by nanofiltration. This will mitigate the harm of amoxicillin to the environment as well as enhance the economy of the process.
Shahtalebi et al. [135] observed recoveries of amoxicillin as high as 97% and permeate flux of 1.5 L/min·m 2 , using a spiral nanofiltration membrane composed of polypiperazine amide.
Heavy metals, such as Cd and Ni, were also found to be present in pharmaceutical wastewaters, the concentration being around 35 mg/L [136]. Studies at the University of Alicante developed an electrochemical treatment for recycling and recovery metals (Ni, Zn, Pb, among others). This technique allows obtaining metals with high purity, while being less polluting than the classic pyrometallurgy, because it avoids gas emission, sulphur, and metal particles. Table 5 summarises the high added-value product recovered, the technology employed, and the main results achieved.

Sewage Sludge Valorisation
The treatment and disposal of sewage sludge is an environmental subject of prime concern due to its high organic load and low dewaterability, which implies great operational costs. Besides, it is a growing problem worldwide since the number of wastewater treatment plants (WWTPs) is rising all over the world, thus, causing a rise in sludge production. For instance, in the EU, more than 10 million tons of dry solids of sewage sludge were produced in 2015 [137]. This fact, together with the tightening of environmental quality standards, makes correct management of this waste essential. Therefore, its comprehensive management is a key point to reduce the operating costs and make wastewater treatment a more environmentally friendly process. Most countries are focused on the recycling of the sludge, for example, using it to produce energy by incineration or anaerobic digestion [138].
The traditional uses of sewage sludge include land application (with or without previous composting), landfilling or energy recovery [31]. Nevertheless, it should be noted that: (i) land application has to compete with other waste streams, the demand is variable and the legislation about this topic is becoming increasingly strict, (ii) landfilling is an unsustainable alternative due to concerns over pollution, loss of recyclable materials and loss of void for waste that cannot be recycled, and (iii) incineration is a high cost/technological option, and is currently only likely to be cost-effective for large cities. Besides, it lacks a high level of public acceptability due to concerns over gas emissions.
In light of the above, the need to develop new sludge management strategies becomes clear [139]. Nowadays, new perspectives in this topic are being opened, especially those focused on recovering valuable compounds, such as nutrients (mainly phosphorus and nitrogen), heavy metals, bioplastics, materials (adsorbents), proteins, and enzymes. In fact, sludge is now recognized as one of the future key raw materials, as stated in the Spanish Bioeconomy Strategy and in the Bio-Based Industries (BBI) European Strategy. Obviously, these new sewage sludge strategies should be designed coherently with the waste hierarchy introduced by the Waste Framework Directive (EU Directive, 2008), which proposes an order of preference for action to reduce and manage waste, i.e., prevention, minimisation, reuse, recycling, energy recovery and, as a final and undesired option, landfilling.

Nutrients
Sewage sludge is composed of significant amounts of nutrients, such as phosphorus (0.5%-0.7% of total solids) and nitrogen (2.4%-5% of total solids), in the form of protein compounds, which can be employed to produce fertilisers [140][141][142]. Taking into account that phosphorus is a finite resource extracted mainly from rocks located in a few regions of the world, and the high cost of commercial fertilizers, the recovery of nutrients from sewage systems is gaining attention to improve sustainability in agricultural production [112].
Chemical, physical, and biological processes can also be used to recover nutrients from sewage sludge in the same way as with aqueous effluents (see Table 6). Again, the simultaneous recovery of nitrogen and phosphorus as struvite by means of crystallization/precipitation is the main alternative [111]. Thus, it can be precipitated in the sewage sludge through acidic leaching followed by the chemical precipitation of phosphorus [143]. However, heavy metals can be present in the sludge, thus, requiring a pre-treatment to avoid its presence in the fertilizer. Chemical extraction processes, such as Gifhorn and Stuttgart, in combination with sulphidic precipitation or complexation of interfering ions and precipitation, can also be used to recover phosphorus as struvite and other phosphorus-based compounds (calcium phosphate and iron phosphide) from thickened, dewatered, or digested sludge. A high percentage of recovery from 35% to 60% can be achieved with these processes [11,115,119]. Another chemical process, named ExtraPhos, from the company Budenheim, allows the recovery of phosphorus as dicalcium phosphate, the yielding ranging from 40% to 60%. This is a four-stage technology, which implies: (i) wet chemical leaching, (ii) extraction of CO 2 , (iii) solid/liquid separation, and (iv) precipitation of phosphate [115,119,144]. High consumption of coke, dolomite and oxygen.
High operating costs. [11,115,143] Oxidative processes, including Aqua Reci and LOPROX/PHOXNAM, can also be employed to recover phosphorus. In the first one, supercritical water oxidation followed by acid/alkaline leaching and precipitation were used, thus, recovering phosphorus as calcium phosphate, iron phosphide, and aluminium phosphide from thickened, dewatered, or digested sludge. In the second technology, a combination of low-pressure wet oxidation, nanofiltration, acid, and hydrothermal digestion for heavy metal separation was employed to obtain struvite and phosphoric acid from thickened sludge [11,115,121]. The percentage of recovery of these techniques varied from 40% to 60% for Aqua Reci and between 40% and 50% for LOPROX/PHOXNAM.
Another technology used for the recovery of phosphorus as P-rich slag is MEPHREC. This technique is based on a metallurgic melt-gassing, and utilizes dewatered sludge briquettes, the yield being around 65%-70% [11,115,144].
Sewage sludge after incineration (sewage sludge ash) can also be employed as a raw material for phosphorus recovery. Two methodologies are mainly employed: (i) wet chemical, and (ii) dry thermal. In the first one, an organic acid or solvent is added in order to extract phosphorus, thus, being recovered from this organic solution. In the second one, phosphorus is recovered by dissolving the ashes [120,145]. The recovery percentages are higher (from 65% to 99%) than those obtained with sewage sludge [11,115].

Heavy Metals
Various heavy metals, including Cu, Ni, Zn, Cd, Pb, Cr, and Hg are contained in activated sludge, thus, limiting its use for land application due to possible soil and groundwater contamination, which can also have a detrimental effect on human and animal health [140]. It should be noted that the concentration of these elements varies greatly depending on the origin of sewage sludge, the highest values being found for Cu (468 mg/kg) and Zn (803 mg/kg) in biosolids from WWTP of USA [146]. Thus, sludge must be treated for recovering heavy metals prior to its valorisation.
The extraction of heavy metals was analysed by different authors using various extracting agents, such as chelants: EDDS (Ethylenediamine-N,N'-disuccinic acid; biodegradable) and EDTA (Ethylenediaminetetraacetic acid; non-biodegradable), and organic acid (citric acid). It was found that Cu recoveries were approximately 70% at pH values higher than 4.5 with a molar ratio of EDDS to the total heavy metals in sewage sludge of 10:1. Similar Cu recoveries (72%) were obtained with EDTA when the same conditions were used [147]. When citric acid (0.1 M) was used at pH 3-4, Cu and Zn recoveries of 60%-70% and 90%-100% were achieved [148].
The removal of heavy metals from leaching effluents of sewage sludge using supported liquid membranes was studied by Yesil and Tugtas [149]. The highest removal efficiencies were obtained through 20% Aliquat 336-filled PVDF membrane at 35 • C when 1.0 M HNO 3 was used as the permeate solution, the values being 27%, 22%, 30%, and 32% for Cr, Cu, Ni and Zn, respectively.
Medium volatile heavy metals, i.e., Cu and Zn, were removed from sewage sludge by means of calcination in an inert (N 2 ) or oxidising atmosphere (air) in presence of Cl-donor (MgCl 2 ) as an additive [150]. Thus, a Cl/sewage sludge ratio of 5% was enough to obtain a Cu removal of 80% in air and 88% in N 2 . For significant Zn removal (90% in both atmospheres), a higher Cl/sewage sludge ratio (15%) was needed.
Electrokinetic treatment was also studied as a potential technique for heavy metal removal [151]. It was found that the combination of this treatment with the addition of a chelating agent (tetrasodium of N, N-bis (carboxymethyl) glutamic acid), and a biodegradable biosurfactant (rhamnolipid) as electrolyte, results in a high removal efficiencies for Cu, Zn, Cr, Pb, Ni, and Mn, the values being 70.6 ± 3.41%, 82.2 ± 5.21%, 89.0 ± 3.34%, 60.0 ± 4.67%, 88.4 ± 4.43% and 70.0 ± 3.51%, respectively. Table 7 summarises the recovered heavy metals, the technology employed, and the main results achieved.

Adsorbents
Adsorption processes are extensively studied due to its flexibility and ease of operation. Moreover, increasing attention is being given to the use of adsorbents from waste in order to develop low-cost strategies for water treatment [152,153]. In this sense, sewage sludge can be an interesting precursor for the synthesis of adsorbents due to its high content in carbonaceous matter. It should be noted that anaerobically digested sewage sludge, dewatered sewage sludge, and that from municipal/urban or WWTPs, can be used as precursors (Smith et al., 2009). Different methodologies have been proposed for adsorbent preparation, the most widely employed being: (i) carbonisation, (ii) physical activation, (iii) chemical activation, and (iv) combination of physical and chemical activation [154] (see Table 8).
Regarding carbonisation, various conditions were employed (temperatures varying from 650 • C to 1000 • C, heating rates between 5 • C/min and 20 • C/min, and time ranging from 0.5 h to 2 h), with the aim of preparing adsorbents with high BET (Brunauer-Emmett-Teller) surface areas, since this parameter significantly influences the adsorption process. Several authors reported that the increase in the aromatization, which occurred at high temperatures, is responsible for the increase in the BET area [155,156]. Nevertheless, the optimum conditions differed among the authors. In this sense, Zhai et al. [155] reported 850 • C as the most suitable temperature, whereas Bagreev et al. [156] and Inguanzo et al. [157] reported 950 • C and 650 • C, respectively, as the optimum temperatures. This is due to the great variability in the composition of sewage sludge. Another parameter of interest is macroporosity and mesoporosity, which can also be enhanced by raising the carbonisation temperature [158]. Moreover, the use of citric acid for sludge demineralisation also improved the BET area due to the removal of the inorganic content. In this sense, Kong et al. [159] increased the BET area from 6.8 m 2 /g to 385.8 m 2 /g when citric acid washing was applied.
Regarding physical activation, it implies the gradual burn-off of the carbonaceous matter, thus, leading to a significant increase of the inorganic content, which is mainly non-porous. Therefore, the adsorbents obtained by physical activation generally exhibit low BET surface areas. In order to improve their properties, different activation conditions were used. Various authors reported the use of steam, air, CO 2 , O 2 /N 2 and air/N 2 as gasifying agents, employing temperatures between 275 • C and 800 • C and times between 0.5 h and 4 h [154]. Among them, the best results in terms of BET area (226 m 2 /g) were obtained by Rio et al. [160], who employed a two-stage process, based on a carbonisation at 600 • C for 1 h, followed by activation with steam at 760 • C for 0.5 h.
Concerning chemical activation, several dehydrating compounds can be used, such as KOH, NaOH, ZnCl 2 , H 2 SO 4 , K 2 S, and H 3 PO 4 , alone, or in a combination (of two of them) in order to obtain high values of BET surfaces areas. On some occasions, carbonation, followed by chemical activation with KOH or ZnCl 2 , was employed [154]. Several studies reported the great effectivity of KOH as dehydrating agents in combination with carbonisation. In this sense, BET areas from 1058 to 1882 m 2 /g were obtained when different types of sewage sludge were carbonised at 700 • C for 0.5 h and, subsequently, treated with KOH in a ratio of 1:1 at 700 • C for 1 h [161][162][163][164].

Bioplastics
Polyhydroxyalkanoates (PHAs) are biodegradable polymers with similar characteristics to those of petroleum-based polyolefins and can be considered a sustainable alternative to petroleum plastics. These biopolymers are naturally synthesised by bacterial fermentation of sugar or lipids. Besides, several microorganisms can accumulate PHA; however, its application is limited due to high production costs. In that sense, around 50% of the cost of microbial PHA is related to the cost of substrate or carbon source. This is why the growth of the PHA industry is low [165]. Therefore, it is necessary to find sustainable feedstock. Hence, microorganisms in activated sludge are able to accumulate PHA in the range of 0.3 to 22.7 mg biopolymer/g activated sludge [140]. It should be noted that PHA recovery using sewage sludge depends on various operating parameters. According to Takabatake et al. [166], the capability of sewage sludge to accumulate PHA was higher in the conventional process than in the aerobic-anaerobic ones, achieving an average content of PHA around 19% after the aerobic process. Thus, the addition of small amounts of oxygen in the anaerobic zone can improve the accumulation of PHA. Temperature is another factor that significantly affects the PHA production, which is favoured at low temperatures [167]. Besides, the type of reactor used for its production is also essential. It has been reported that the sequencing batch reactor (SBR) is the most adequate to obtain high production thanks to its flexible operation and simple control [168].
PHA production can be integrated during the treatment of urban water and sludge management in WWTPs [169]. This implies a process with four stages: (i) removal of readily biodegradable carbon from wastewater coupled to the selective biomass growth with capacity for PHA storage, (ii) acidogenic fermentation of sludge in order to produce a liquid stream with high content of volatile fatty acids (VFA), (iii) accumulation of PHA from the liquid stream with high VFA concentration using enriched biomass from stage 1 and, (v) recovery and characterization of PHA (Figure 3).

Bioplastics
Polyhydroxyalkanoates (PHAs) are biodegradable polymers with similar characteristics to those of petroleum-based polyolefins and can be considered a sustainable alternative to petroleum plastics. These biopolymers are naturally synthesised by bacterial fermentation of sugar or lipids. Besides, several microorganisms can accumulate PHA; however, its application is limited due to high production costs. In that sense, around 50% of the cost of microbial PHA is related to the cost of substrate or carbon source. This is why the growth of the PHA industry is low [165]. Therefore, it is necessary to find sustainable feedstock. Hence, microorganisms in activated sludge are able to accumulate PHA in the range of 0.3 to 22.7 mg biopolymer/g activated sludge [140]. It should be noted that PHA recovery using sewage sludge depends on various operating parameters. According to Takabatake et al. [166], the capability of sewage sludge to accumulate PHA was higher in the conventional process than in the aerobic-anaerobic ones, achieving an average content of PHA around 19% after the aerobic process. Thus, the addition of small amounts of oxygen in the anaerobic zone can improve the accumulation of PHA. Temperature is another factor that significantly affects the PHA production, which is favoured at low temperatures [167]. Besides, the type of reactor used for its production is also essential. It has been reported that the sequencing batch reactor (SBR) is the most adequate to obtain high production thanks to its flexible operation and simple control [168].
PHA production can be integrated during the treatment of urban water and sludge management in WWTPs [169]. This implies a process with four stages: (i) removal of readily biodegradable carbon from wastewater coupled to the selective biomass growth with capacity for PHA storage, (ii) acidogenic fermentation of sludge in order to produce a liquid stream with high content of volatile fatty acids (VFA), (iii) accumulation of PHA from the liquid stream with high VFA concentration using enriched biomass from stage 1 and, (v) recovery and characterization of PHA (Figure 3). Since PHAs are biodegradable compounds, it is crucial to generalize their use as packaging films or disposable products, such as bottles, cups, cutlery, and diapers, among others, in order to reduce the detrimental effect of petroleum-based plastics in the aquatic environment [170].

Construction Materials
Taking into account that the content of oxides of sewage sludge (Al2O3, CaO, SiO2, and Fe2O3) is similar to that of Portland cement or clay, it has been proposed that it can be used for the production Since PHAs are biodegradable compounds, it is crucial to generalize their use as packaging films or disposable products, such as bottles, cups, cutlery, and diapers, among others, in order to reduce the detrimental effect of petroleum-based plastics in the aquatic environment [170].

Construction Materials
Taking into account that the content of oxides of sewage sludge (Al 2 O 3 , CaO, SiO 2 , and Fe 2 O 3 ) is similar to that of Portland cement or clay, it has been proposed that it can be used for the production of building or construction materials, including eco-cement, bricks, ceramic materials, supplementary cementitious materials (SCMs), or lightweight aggregates (LWAs) [171]. Nevertheless, a high amount of organic matter is also present in sewage sludge, which can affect the cementitious properties, causing low bonding strength. Therefore, pre-treatment of sewage sludge before being employed in the preparation of cement or concrete is a must.
Considering the studies of various authors [172], the valorisation of sewage sludge as raw material for the preparation of cement-like materials is viable. However, depending on the characteristics and origin of the sludge, different conditioning steps may be needed. In that sense, Xu et al. [172] and Lin et al. [173] reported the use of lime-dried sludge as a substitute of limestone in the production of cement at 1400 • C, the optimum amount of limestone being below 18 wt% in order to facilitate the formation of crystalline phase in the cement clinker. Tay and Show [174] found that a cement-like material, which satisfies the American Society for Testing and Materials (ASTM) requirements for mortars, could be synthesised by incineration at 1000 • C for 4 h using dewatered sewage sludge mixed with lime at a ratio of 1:1. Rezaee et al. [175] reported that dry sewage sludge could be used to partially replace (from 5% to 15%) the traditional raw materials in order to obtain an eco-cement with properties similar to that of Portland cement.
Besides, sewage sludge can also be used to partially replace clinker in cement due to its properties as a self-cementing agent. Thus, Valls and Vazquez [176] partially substitute Portland cement with sewage sludge in a range of 25% to 50%, obtaining different pastes with hydration products, such as those of Portland cement. However, the organic matter contained in the sludge is degraded due to the alkalinity of the cement. Thus, in order to accelerate this process, CaCl 2 and Ca(OH) 2 can be added as additives. According to Hamood et al. [177], sewage sludge with high moisture content can provide the required water for the preparation of mortars through its conditioning with unprocessed fly ash, thus, avoiding both dewatering and drying processes.
The partial replacement of Portland cement by raw sewage sludge in cement is not a feasible option due to the low pozzolanic activity of the sludge, which needs pre-treatment to improve its activity. Thermal treatments (incineration) have been widely used since the organic matter is decomposed, and high temperature favours the activation of inert minerals, such as kaolin, which is transformed into metakaolin [171].
For the preparation of LWAs, it is necessary to pelletize and thermally treat the raw sewage sludge. Depending on the proportion of sewage sludge, different materials can be obtained. Thus, a mixture of 10% sewage sludge and 90% clay after sintering at 1150 • C for 0.5 h, resulted in an LWA with lower density, higher porosity and reduced compressive strength, in comparison to the traditional one [178]. Blends of waste glass and sewage sludge can also be employed to produce LWA, obtaining higher compressive strength in LWA as the amount of glass increased [179].

Proteins
Proteins can be considered high-added-value products due to their use as liquid fertilizers, protein foaming agents, or adhesives or animal feed [180]. Based on the high proportion of proteins (up to 61%) in the activated sludge and considering that around 50% of the dry weight of bacteria cells are due to protein content, their recovery is an issue of great interest [181,182]. In this sense, different methodologies have been proposed for protein recovery, the first stage always being the solubilisation of the intracellular material in the sludge [179]. Various treatments, such as physical [183], chemical [184,185], physico-chemical [180,186,187], biochemical [184], and hydrothermal ones [188] have been reported to effectively break the floc structure of the sludge; thus, releasing the intracellular content into the aqueous phase. The physical methods rely on centrifugal, ultrasonic, and membrane processes. The chemical or physico-chemical ones include acid or alkaline treatment alone, or in combination with hydrolysis [184,189]. The biochemical methods consist of enzymatic or enzymatic assisted treatment [184,190]. The hydrothermal methods are based on solubilization using oxidizing (air or oxygen) or inert (nitrogen) atmospheres. It should be noted that after solubilisation, it is necessary to precipitate proteins from the aqueous solution, dried and, on some occasions, purify them, before obtaining the protein product. Table 9 summarises the technology employed, main results achieved, and advantages and disadvantages inherent to the methodology used. It is common that the recovery process causes the solubilisation of heavy metals contained in the sludge, together with the release of intracellular compounds (mainly proteins, carbohydrates, and humic acids). Therefore, it is needed to detoxify the sludge by means of sterilization and remove heavy metals or toxins before its valorisation to obtain proteinaceous products for animal feed to avoid compromise of animal health [191].  High operating cost due to energy consumption and/or the use of additives. [187]

Hydrolytic Enzymes
Hydrolytic enzymes, such as amylase, phosphatase, lipase, protease glucosidase, and aminopeptidase, among others, have been found to be present in activated sludge and are responsible for the biodegradation of organic matter during the aerobic digestion [192]. Besides, enzymes are widely used in different fields, including agriculture, detergents, pulp and paper, cosmetics, dairy, etc. For example, lipases hydrolyse lipids in order to obtain glycerol and fatty acids, which can be used in the production of soap [193]. Protease can be employed as a target for therapeutic agents against important diseases, such as malaria or cancer, and amylase can be employed in starch saccharification, because it can hydrolyse starch into glucose [194]. Therefore, the valorisation of sludge to produce enzymes is a promising strategy to alleviate the environmental impact of its generation. There is no standardised methodology to extract valuable enzymes from activated sludge. In that sense, different chemical and physical methods have been proposed, depending on their nature (see Table 10).
Regarding lipase, Nabarlatz et al. [195] carried out its extraction from activated sludge using stirring or ultrasonication in combination with additives: non-ionic detergent (Triton X-100), cation exchange resins (CER), or buffer. It was found that the use of additives improved enzyme recovery when stirring was used. When ultrasonication was employed, extraction time and operating conditions were key factors, whereas the addition of a detergent was less influential.
Considering protease, Frolund et al. [196] were able to extract exopeptidase using CER and Triton X-100. CER was highly effective in the extraction of the enzyme in the floc matrix. Jung et al. [197] studied the use of a disrupting chamber (Dyno mill) for the extraction of two differently activated sludge: (i) cultivated in laboratory, and (ii) from WWTP, giving special attention to the effect of temperature on the extraction. The enzyme was recovered by means of precipitation with ammonium sulphate. Proteases activity varied from 75.8 ± 10.2 U/mg to 116.1 ± 4.2 U/mg at 75 • C as a function of the origin of the sludge. Gessesse et al. [198] analysed different methodologies: (i) Triton X-100, (ii) CER, (iii) ultrasonication in buffer, and (iv) ultrasonication with Triton X-100, obtaining the highest activity in this case. Therefore, it seemed that the combination of ultrasounds with additives is the ideal methodology for protease extraction.
In the case of amylases, it was recovered by ultrasonic CER and an additive. If CER is employed, around 2000 U/g VSS (volatile suspended solids) can be recovered, whereas, with Triton X-100, its concentration is a crucial factor, since 1600 U/g VSS were obtained with 0.1% Triton X-100 and 1300 with 2%Triton X-100 [199]. High efficacy of ultrasonication in absence of additives.
High operating cost due to energy consumption and/or the use of additives. [195] Stirring or ultrasonication with additives (CER, Triton X-100 or buffer) Activated sludge after gravity thickening Enzymes: protease 335 lipase units/g VSS (ultrasonication using 0.1% Triton X-100 (v/v)).
Great quality of the final product.
High operating cost due to energy consumption and/or the use of additives. [198] Disrupting chamber (Dyno mill) High operating cost due to energy consumption. [197] Extraction with additives (CER and Triton X-100) Activated sludge after gravity thickening Enzymes: protease High activity was observed for leucine aminopeptidase (0.015 µmol/mg VS/h) No physical treatment was required for cell disruption.
High operating cost due to the use of additives. [196] Extraction with additives (CER and/or Triton X-100) Activated sludge before gravity thickening Enzymes: amylase Triton X-100 concentration key factor: lower recoveries increasing detergent concentration Great quality of the final product.
High operating cost due to the use of additives. [199] Water 2020, 12, 1431 31 of 52

Towards Energy Self-Sufficiency
A wastewater treatment plant (WWTP) consumes from 0.45 to 1.25 kWh/m 3 , depending on its size and the treatments taking place in it. This energy is usually supplied to the plant externally, from conventional energy supply stations [200,201]. However, according to Gude [202], municipal wastewater (WW) has a total amount of energy of up to 9.7 kWh/m 3 . Assuming that the average energy consumption in WWTPs is 0.85 kWh/m 3 , the water can contain up to 12 times more energy than what is needed for its treatment [202]. This energy contained in wastewater can be divided into chemical (from the organic load present in the water), thermal, and potential energy, and it can be recovered from the water through different technologies (Table 11).
In addition, energy can be recovered from the sewage sludge. The sludge generated during the treatment processes contains about 60% of the energy initially present in WW, so it is frequently used for energy recovery [203].
Currently, energy recovery technologies are used, primarily, in large-scale treatment plants, biogas recovery being the most widely used one [204].

Biogas Recovery
Anaerobic digestion is one of the most widespread sludge stabilization processes in the current market. This process is capable of transforming the organic load present in the sewage sludge into biogas, which is a mixture of methane (50%-70%), carbon dioxide (30%-50%), and traces of other gases, such as nitrogen or hydrogen [210]. This process is usually carried out in an anaerobic environment, although aerobic digestion is also possible.
Methane, which is the significant component of biogas, is considered a greenhouse gas. Sending the sludge produced in a WWTP directly to a landfill would result in the release of this gas into the atmosphere by natural routes [140]. Moreover, thanks to its calorific value, biogas can be used for electricity generation, heat production, and as a fuel for vehicles among other uses. Due to that, it seems logical to implement anaerobic digesters that facilitate its collection which is highly beneficial [211].
The cost of electricity in a treatment plant is about 80% of the total operating cost. Even if the biogas can be sold, it is interesting to use the methane produced in the digesters in the treatment plant itself, to feed the gas engines and produce both electrical and thermal energy. In some cases, it can become one of the primary sources of energy in the WWTP [140].
The conversion of organic matter into biogas is a complex process that involves four different phases of biochemical reactions: hydrolysis, acidogenesis, acetogenesis, and methanogenesis. In case of the latter, the products of all the previous phases are transformed into the final products: methane and carbon dioxide [212].
Currently, anaerobic digestion is combined with other techniques to promote the generation of biogas and/or increasing the percentage of methane in it [203]. Within this framework, the co-digestion of food waste and wastewater sludge has been proposed. Some studies on this technique carried out through the concept of circular energy indicate that this technique is a right solution, generating significant energy savings in the overall operating cost of the plant [213].
However, the use of pre-treatments that increase methane production is most common. In fact, the objective of such pre-treatments could be described as: (1) to increase the digestibility of organic matter; (2) increase the rate of hydrolysis; (3) increase the percentage of methane in the mixture; (4) reduce sludge viscosity and reduce pumping costs [212].
A large variety of pre-treatments that can be applied, but all of them can be encompassed in one of the following categories: Among these, the most commonly applied are physical and thermal pre-treatments. [219] found out that methane production was increased by 21%-31% when using a heat pre-treatment. Moreover, by means of thermal pre-treatment, Liu et al. [220] achieved an increase in methane production of 51%. Moreover, by combining the use of microwaves (600 W) and hydrogen peroxide (0.2 g/g total solids), methane production increased by 20%, while reducing fluid viscosity [220].

Biodiesel Production
The growing scarcity of fossil fuel reserves, together with the environmental benefits of biodiesel (such as the decrease in SO x and CO 2 emissions), is the reason why the interest in this biofuel has grown significantly in recent years [140].
Commonly, vegetable oils are used for biodiesel (BD) production. However, the cultivation of plant species with the only purpose of producing BD has raised awareness about the competition of these crops with the food industry [205]. In addition, the cost of BD production is high (mainly due to the cost of raw materials), which does not make it competitive with petroleum-derived diesel. Therefore, finding a non-edible and low-cost raw material is necessary to increase biodiesel competitiveness. Among the available options, sewage sludge, which might seem as industrial waste, increasingly receives more attention. Its high lipid content, the large quantities generated in water treatment plants, and its low cost, make it an ideal raw material for this purpose [221]. This biofuel is produced by transesterification of refined triglycerides and methanol (MeOH). This reaction usually takes place in the presence of a homogeneous catalyst, either acidic or basic (e.g., H 2 SO 4 , KOH or NaOH) [222]. The higher the oil content of the sewage sludge, the more BD it can produce; hence, it is recommended to select microorganisms for the treatments in the WWTP based on their ability to produce oil [211].
Depending on the origin of the wastewater, the sludge will have a different lipidic composition. Therefore, to know the specific treatments that will work best in each case, it is necessary to analyse the lipid content every time [223]. Finally, a high proportion of free fatty acids (FFAs) (which can account for up to 70% of the lipid content) causes problems during transesterification due to soap formation when conventional basic catalysts, such as NaOH, are used. Thus, acid catalysts are normally preferred in these cases [224]. However, by using these catalysts, the reactions slow down considerably. Although some studies that focus on the synthesis of biodiesel through non-catalytic transesterification [222], the vast majority of researchers strive to find new catalysts that allow for high efficiency in the production of biodiesel in a short time [225].

Hydrogen and Syngas Production
Along with biogas, biohydrogen is one of the biofuels that can be recovered from wastewater, being a great alternative to conventional fuels, as its energy content is 2.75 times higher than that of hydrocarbon fuel [140].
Hydrogen can be considered the most environmentally friendly fuel since its combustion only generates water. Although it is the most abundant element in nature, it cannot be found in molecular form (H 2 ) due to its high reactivity, so it must be generated industrially [226].
Despite its great properties, very few processes can produce only the hydrogen. On the contrary, most recovery techniques produce syngas, which is a gaseous blend in which H 2 and CO are the major constituents [206]. There are currently various techniques for obtaining syngas, gasification and pyrolysis being the most widely used ones [227]. In general, due to the high water content in the sludge (80%), drying pre-treatments are required before these treatments, which considerably increases the cost of this process and involves an energy input that is counterproductive, given the objective of energy recovery [228]. To avoid this previous step, many investigations are currently focused on using the supercritical water gasification (SCWG) process. Water, when in extreme conditions beyond the critical point (Tc ≥ 374 • C, Pc ≥ 22.1 MPa), has unique properties, which makes it an excellent non-polar solvent that can dissolve various organic substances present in the sludge, thus, increasing the effectiveness of hydrogen production. Achieving optimal operating conditions may be quite costly, so the use of catalysts is a key factor in reducing the activation energy of the reactions. The catalysts could also increase the effectiveness of gasification by being H 2 selective [226].
Other processes that can be used to generate H 2 from wastewater, although not so widespread, are electrohydrolysis [229] and biological treatments, such as microbial fermentation under dark or photo fermentation [230].
As previously discussed, the most common way to obtain biohydrogen is through the production of syngas, which implies that, nowadays, most of the efforts in this field are concentrated in obtaining a gaseous mixture with the highest proportion of hydrogen possible. Sludge pre-treatment has been one of the most commonly used methods for this purpose. Wang et al. [231] employed ultraviolet radiation as pre-treatment, and an 80.6% increase in the amount of hydrogen as compared to the untreated sludge has been observed. Ultrasound and heat have also been tested for this purpose, obtaining excellent results. Elbeshbishy et al. [232] applied an ultrasonic pre-treatment, achieving a 120% increase in hydrogen production.
To enhance the efficiency of gasification, it has been proven that including an oxidizing agent, such as a vapour stream, increases hydrogen production [233]. In addition, using catalysts has also shown high efficiency in syngas production. Zhang et al. [234] tested the impacts of Fe/Ca-based conditioners on syngas generation and have found that the final H 2 yield was improved by 51.2% when iron was used, and 76.5% for CaO, catalysed process at 1273 K, compared to catalyst-free treatment.
Catalysts can also be used in combination with the SCWG process. Hantoko et al. [235] showed that activated carbon significantly improves syngas production. Additionally, Yan et al. (2019) studied the effect of the addition of Ni/Al 2 O 3 catalysts. In this case, both the overall efficiency of the reactions and the proportion of H 2 in the final mixture improved substantially, as the later increased by 146% compared to the experiment without catalyst [236].
Other processes, such as the use of adsorbents to retain CO 2 and promote hydrogen generation, are also being investigated with considerable success. [233]. Although appreciable advances have been noticed in the recent years, it is still necessary to work hard to obtain a high-quality biohydrogen that can be used as fuel, which indeed would be a great alternative to currently used fossil fuels.

Microbial Fuel Cell
In addition to the production of biofuels and biogas, it is possible to recover wastewater energy from organic matter directly as electricity thanks to bioelectrochemical systems [202,237]. These processes, directly applicable both on water and sewage sludge, lead not only to electricity generation, but also to the removal of contaminants [238][239][240][241][242]. Among these processes, several authors have highlighted Microbial fuel Cell (MCF) as a potential solution for problems related to water and energy [243].
MFCs are composed of an anaerobic chamber (known as anode) and an aerobic chamber or cathode. Both chambers have an electrode and are separated by a membrane known as the cation exchange membrane (CEM). CEM has the function of regulating the passage of protons from one chamber to the other. The substrate, rich in organic components, is introduced into the anode and oxidized by microorganisms, leading to the generation of electrons and protons. The electrons generated in the process are transferred to the anode and, subsequently, travel to the cathode through an external circuit generating bioelectricity. Simultaneously the protons move from one chamber to the other through a polymer electrolyte membrane. Finally, electrons and protons combine with oxygen in the cationic chamber to produce a water molecule [244]. The voltage generated in an MFC is of the order of several hundred of millivolts. When the fraction of electron charge that contributes to electricity generation is 40% and the hydraulic retention times is 20 h, the potential of energy that can be recovered from wastewater by MFC can reach 0.65 kWh/m 3 [211].
The efficiency of this process depends on many different parameters, such as pH, temperature, the type of substrate that is degraded, and its quantity, salinity, type of microorganisms, electrode material, etc. [140]. Among these factors, the selection of microorganisms is a fundamental design factor in CFM. More than 35 different species have been reported as exoelectrogen in MFCs, including Escherichia, Pseudomonas, Geobacter, Clostridum, Shewanela, and Lactococcus lactis [245]. Nowadays, many efforts are focused on obtaining a biofilm with the optimal conditions of conductivity and penetrability through the genetic alteration of microorganisms.
Despite having many strengths, this technology has some important disadvantages that must be addressed to generalize its adoption in the real life. The main drawback of the MFCs is their investment cost, about 30 times higher than that of other sludge treatments, as well as the internal resistance that restricts power generation [207]. This high cost is mainly due to the high price of the materials used to manufacture the electrodes and membranes. Another drawback is that, although it can operate in a wide range of temperatures, very low temperatures imply a significant decrease in its efficiency since the metabolic rate of the microorganisms decreases [213,246]. Finally, the electricity generated by this system is not capable of supplying enough energy to guarantee the continuous operation of an electrical instrument. This issue, however, can be solved by linking MFCs to increase voltage or current generation [247].
To overcome the disadvantages, research in this field is focused on genetic modifications of microorganisms and development of electrodes and membranes, by aiming at better and cheaper materials. As an example, Zhang et al. [18] have demonstrated the efficiency of the cylindrical cell, instead of cubic ones, with a larger cathode area, increasing power density by 52% while reducing internal resistance by 60.9%.

Heat Pumps: Thermal Energy Recovery
The energy extracted by a heat pump can come from different sources, such as air, water, or earth. In recent decades, wastewater has been positioned as a strong candidate for the source of thermal energy in heat pumps, although the available heat is described as low-quality heat. In this case, the system is called wastewater source heat pump (WWSHP) [248]. Currently, more than 500 WWSHP are used around the world. The amount of energy that can be obtained in this way is much greater than that obtained from chemical energy [249].
A WWSHP is composed of a heat/cold distribution system, the main heat pump cycle and a heat exchanger. A basic scheme of the heat pump cycle, which consists of a compressor, a condenser, an expansion device, an evaporator, and auxiliary equipment. The heat is extracted from the wastewater through the evaporator and transferred to the medium, which is heated through the condenser [249].
The place where the recovered heat is used must not be more than 3-5 km away [248]. Thus, the best option is onsite consumption of the recovered energy. It can be used to heat digesters or even for sludge drying. Moreover, it can be used outside to heat nearby buildings or greenhouses [250]. Another factor that significantly affects the efficiency of the process is the variation in the flow and temperature of the effluent since, currently, the most widespread heat pumps have a single operating speed. To overcome this problem, Chae and Ren have created a fixed inverter hybrid heat pump that has managed to increase energy efficiency by more than 15% by adjusting the operating speed to match the flow rate [251].
Finally, the most important problem while applying this technology is the fouling of the surface of the exchanger due to the composition of the wastewater, which is primarily responsible for lowering the efficiency of the equipment considerably. Therefore, the outlet water is the most viable option for energy recovery, since it is relatively clean. Despite working only with treated water, fouling is still significant, so most of the efforts are focused on developing materials and configurations that prevent or delay the fouling of heat exchangers [252,253].

Hydropower
The kinetic energy contained in the wastewater can also be recovered in its path along with a WWTP. This is possible thanks to the installation of hydropower stations in the system. Their main elements are a turbine placed perpendicular to the water flow and an associated energy generator, to transform mechanical energy into electrical power. Due to the lower water flow available in a WWTP compared to rivers or waterfalls, the most appropriate systems would be mini and micro-hydropower (MHP) [254].
The generation of hydraulic energy has several advantages that must be considered. First, it is an environmentally friendly option, since it is a renewable energy source that has no associated greenhouse effect emissions of any kind. Additionally, compared to other renewable energies, such as solar or wind, it stands out because it can generate non-stop energy throughout the year, regardless of weather conditions. On the other hand, it is considered a cost-effective option since it allows to take advantage of the existing infrastructure for its installation, which reduces the dimensions of the necessary civil works [255]. Finally, the generation of hydraulic energy can be adjusted to the WWTP demand curve since consumption peaks correspond to the times when the highest water flow is collected and vice versa [209].
Despite the good prospects, the number of WWTP plants that have hydraulic power generators is quite small, due to the number of suspended solids contained in WW, which can damage the mechanism [209]. This problem can be minimized by locating the power generation system at the exit of the plant, where the water is cleaner [254].
However, the main issue faced by this technology is that most of the already installed MHP have very little flexibility to face significant flow drops, thus, hampering operation under the severe diurnal and seasonal flow variations typical of many WWTPs. To deal with this problem, new turbine models have been developed, as reported by [256], who have studied the behaviour of a variable flow turbine throughout a year. This system is capable of working in a flow range that goes from 53% to 123% of the design one, which allowed to take advantage of almost 96% of the effluent generated in 1 year, which yielded more than 68.1 MWh.
A study conducted on 100 plants in Ireland and the United Kingdom concluded that only larger and high-flow plants are viable for the installation of a hydraulic energy recovery system [257].

Real Examples of Self-Sufficient WWTP
All of the processes described so far can help to achieve energy self-sufficiency in a water treatment plant. Although most plants that apply these technologies do so only to provide a percentage of the total energy needed to carry out the treatments, it is possible to achieve energy self-sufficiency and even positive energy balance (especially in medium/large-sized plants). Table 12 shows some WWTP examples with these characteristics.
Nowadays, plants that have reached (or are close to achieving) energy self-sufficiency mainly rely on the production of biogas from anaerobic digestion [258].
Shen et al. [210], have performed an analysis of the current landscape by detecting 12 treatment plants in Europe and the United States that have achieved energy self-sufficiency. Among those, two plants located in Austria stand out as they exhibit a positive energy balance, which allows them to sell part of the energy produced. The WWTPs of Strass TP and Wolfgangsee-Ischl, respectively, generate 6.3% and 7% more energy than they use [259].
East Bay Municipal Utility District (EBMUD) wastewater facility (located in Oakland, CA) became the first energy-neutral WWTP in North America in 2012. Nowadays, EBMUD is producing electricity to meet 126% of the WWTP's electric power demand and the surplus electricity is supplied to the grid. Moreover, in the USA, the Sheboygan Wastewater Treatment Plant is nearly 100% energy self-sufficient thanks to its co-digestion program and cogeneration capacity [258]. More surprising is the case of the Marselisborg WWTP in Denmark, since it generates more than 150% of its energy requirements, so it can also be considered as a power plant. This plant, with a treatment capacity of 12 million cubic meters per year, invested € 3M to optimize its treatment process and improve biogas production [204].

Outlook and Concluding Remarks
The main purpose of this review is to discuss the different opportunities and challenges that are prevalent to apply circular economy in the water sector. The consumption model of modern society is the first step towards avoiding the exertion of pressure over natural resources, and this change can be applied in all of the industrial activities. A circular economy has been applied to water, for some decades, when wastewater has been reclaimed and reused. However, this is always done by countries with hydric stress in order to increase the water resources. In this regard, the application of reclamation wastewater facilities, even in regions or countries without water scarcity, is recommended. This is mainly due to the positive environmental impacts of reclamation, which also minimizes the capture of water from natural sources. Despite the benefits of reclamation, possible associated risks might appear as a consequence of the presence of pathogen germs, emerging micropollutants, and antibiotic resistance genes. The control of these risks will ensure the increased use of reclaimed water. There are some other consolidated applications of a circular economy in the water sector, such as nutrients and energy recovery. Both strategies are widely implemented in new generation treatment plants, although research is mainly focused on the complete recovery of nutrients and the accomplishment of energy self-sufficiency. Despite the fact that the above-mentioned aspects are not only opportunities, but also realities in the water sector, future wastewater treatment plants should be designed as biorefineries, which do not only reclaim water as the product, but also facilitate valorisation and recovery of high-added value substances. Hence, society must change its view on wastewater, from being a waste effluent to a "stream rich of different valuable substances" with a tremendous economic impact and value. Moreover, sewage sludge is also potentially recoverable, by the extraction/recovery of substances or the generation of new products, such as adsorbents, bioplastics, or construction materials. In all of the cases, the recovery of substances or valorisation of the effluents help to decrease the pressure over natural resources. Nevertheless, efforts should be made to evolve technologies that would be able to bring down the high costs linked with these processes. However, a change of mindset, together with appropriate policies, should help achieve a fully circular economy in the water sector.
Finally, to conclude, Table 13 sums up the current situation of the wastewater sector regarding the implementation of a circular economy. With the help of an analysis of strengths, weaknesses, opportunities and threats (SWOT analysis), some challenges and opportunities have been identified. The strengths of each available technology, which have been discussed in the review, consist mainly in the possibility of obtaining benefits from something that has always been considered a waste, while decreasing pressure over natural resources. Even so, some weaknesses must be addressed, such as the considerable initial financial investment and operational costs, or the lack of adaptability of some treatments to different working conditions. However, the constant and quick development of new technologies driven by the global trend to promote greener processes is expected to help to overcome these deficiencies. Finally, it must not be forgotten that, for a circular economy to become a reality, a change of mindset is needed, together with the commitment of governments and private companies.