Potential Recovery Assessment of the Embodied Resources in Qatar’s Wastewater

: Due to the ever-growing demand for natural resources, wastewater is being considered an alternative source of water and potentially other resources. Using Qatar as an example, this study assesses the resources embodied in wastewater and paves the way to combine wastewater treatment with advanced resource recovery (water, energy, nitrogen, phosphorous, added value products) which can turn wastewater management from a major cost into a source of proﬁt. In this sense, wastewater is no longer seen as a problem in need of a solution, rather it is part of the solution to challenges that societies are facing today. Based on estimated quantities of generated urban wastewater and its average composition, mass ﬂow analysis is implemented to explore the maximum availability of major wastewater constituents (solids, organic compounds, nutrients, chloride, alkalinity, sulﬁde). An assessment analysis reveals that, in Qatar, more than 290,000 metric tons total solids, 77,000 metric tons organic compounds, 6000 metric tons nitrogen, 81,000 metric tons chloride, 2800 metric tons sulﬁde, and 880 metric tons of phosphorus are embedded in about 176 million m 3 of urban wastewater annually. One promising valorization strategy is the implementation of anaerobic digestion with biogas production, and the organic materials contained in Qatar’s wastewater corresponds to more than 27 million m 3 of methane (equivalent to an energy content of more than 270 GWh) per year. The results further suggest that the recovery of nitrogen, phosphorus, and sulﬁde should be given priority.


Introduction
Production of waste by human activities is unavoidable and a significant part of it ends up as wastewater. Wastewater (WW) is a mixture of consumed water and pollutant loads and it can be defined as the combination of all or some of the domestic effluent consisting of both blackwater and graywater, commercial effluents from establishments, institutions and hospitals, industrial effluents and effluents of stormwater and urban runoffs, where the proportion of each effluent is a function of time, location, and human behavior [1]. The quantity and quality of wastewater depend on many factors such as human behavior, lifestyle, standards of living, juridical framework, and the design of sewer systems [2]. Therefore, wastewater reflects a society's characteristics, including food choices and material used, illnesses, personal hygiene, and environmental and social behavior [3,4].
The ever-increasing water scarcity over the last three decades [5] has diverted attention to alternative or secondary water resources, where wastewater comes at the top of these secondary resources [6,7]. Water scarcity can be physical or economic [5]; while physical water scarcity occurs when available water resources are insufficient to meet all human demands and is measured by water per capita, economic water scarcity occurs when there is a lack of infrastructure and proper management to provide a reliable supply. Symptoms of physical water scarcity include

Research Objectives and Overview
This paper aims to perform a more holistic assessment of wastewater components that could be recovered. By performing a quantitative analysis of wastewater constituents in Qatar, this paper provides a platform for innovation into wastewater resource recovery as it identifies the amounts of potentially recoverable resources and paves the way to investigate how such resources can be recovered, whether by developing new technologies or by adapting and perfecting the existing technologies for the case of Qatar. In an initial step, an overview is elaborated on the composition of wastewater generated in Qatar. Using mass flow analysis, this paper then assesses the potential of recovery of constituents by providing a quantitative analysis of the following components in the Qatari wastewater: 1.
Mass flows of COD (Chemical Oxygen Demand), BOD (Biochemical Oxygen Demand), and Oil and Grease; 3.
Mass flows of alkalinity, chloride, and sulfide.
To put this approach into the study context and explore the relevance of each studied component, the following subsection provides background information on each component. An overview of typical wastewater composition is also included.

Background Information
Knowledge about the quantities and specific compositions of wastewater flows is essential to assess the possible wastewater management options and potential recovery of valuable constituents. In general, the typical composition of raw municipal wastewater found in locations with a minor contribution of industrial wastewater (which is similar to the situation in Qatar) is as seen in Table 1.

Solids in Wastewater
Solids in wastewater provide indicators on the pollutant load and on the sediment load in the receiving body [3]. Solids are divided into two main categories, namely, suspended solids (a portion that is filtered out by a 0.45-1.2 µm filter) and dissolved solids (a portion that passes through the filter) [32]. Both the dissolved and suspended solids consist of volatile solids and fixed solids, and these are determined by combustion at 550 • C (volatile solids, which represent the organic portion, are combusted at this temperature and fixed solids are not). Table 2 shows the relationship between different categories of solids: rows can be added from the bottom to get the constituents on the top (e.g., FSS + VSS = TSS) and columns can be added from the right to get the constituents on the left (e.g., TDS + TSS = TS). Wastewater treatment plants are designed to function as bacteria farms, where microorganisms are fed by organic waste and oxygen. COD measures the total quantity of oxygen needed to oxidize all components in an organic material, regardless of whether these are biodegradable or non-biodegradable, mainly into carbon dioxide and water [3]. BOD measures the amount of oxygen that bacteria will consume while decomposing organic matter, which means that it quantifies the biodegradable portion of the organic compounds [33]. As a standard, BOD is determined as BOD 5 , representing the oxygen consumption of the microbiological population during 5 days at a temperature of 20 • C. BOD indicates BOD 5 in the following.
The COD is fractioned to two main streams, the biodegradable COD (equivalent to BOD) and the inert COD, representing the non-biodegradable part. While the inert COD consists of particulate inert and soluble inert, the biodegradable COD consists of three categories of organic compounds, the readily biodegradable, the rapidly biodegradable and the slowly biodegradable, where the latter in the context of wastewater can be assumed to primarily represent the oil and grease portion [34]. The readily and rapidly biodegradable components will degrade quickly in the given environment, while the slowly biodegradable part can persist longer.
The importance of COD and BOD tests comes from the fact that they both reflect the presence of oxygen-consuming organic matter contained in wastewater which causes oxygen depletion in the receiving body. This latter is used as an indicator of the impact of effluent wastewater on the receiving body, therefore, in the case of a river, the oxygen depletion as a result of oxygen-consuming organics will affect the water quality and among others, the diversity of the fish species, and in a severe oxygen depletion, this will cause fish killing [3].

Nutrients in Wastewater (Phosphorous, Nitrogen)
Aquatic life is dependent upon photosynthesis, which usually occurs in low levels in surface water. Excessive concentrations of nutrients (phosphorus, nitrogen), however, can overstimulate aquatic plant and algae growth, and bacterial respiration and organic decomposition can, in consequence, deplete dissolved oxygen, thus depriving fish and invertebrates of oxygen in the water (eutrophication) [2,3]. At the same time, the recovery of nutrients (phosphorus, nitrogen) contained in wastewater can substitute commercial fertilizer applications in agriculture. Agricultural activities, and, in particular, the increased fertilizer use, represents a major driver for surface water eutrophication [35]. Nutrient recycling practices reduce the total usage of fertilizers and, therefore, the overall loads of nutrients entering ecosystems.

Other Constituents (Alkalinity, Chloride, Sulfide)
Alkalinity is the capacity to neutralize acids and it is a result of the presence of hydroxides, carbonates, and bicarbonates of elements such as calcium, magnesium, sodium, potassium, or ammonia [2,30]. These come from the water supply, groundwater, and materials added for domestic use. Alkalinity reflects the ability of a liquid to buffer against a pH change or to neutralize acids. It affects different wastewater treatment operations, and also impacts receiving water bodies [3].
With focus on chloride, wastewater is considered a rich source mainly due to its content of human excreta, particularly human urine, but chloride is ubiquitous to all types of wastewater streams including those from industrial operations, food processing, agricultural operations. Chloride also occurs in natural waters and is generally considered a minor pollution threat, but at elevated concentrations, it is deleterious to some plants and to aquatic biota [36]. Chloride is a concern of irrigation as it disturbs the osmotic balance between plants and soil and consequently affects plant growth [2]. Chloride removal, therefore, is part of wastewater treatment schemes. For Qatar, elevated chloride concentrations were identified as one key factor that limits the reuse of wastewater [37], therefore chloride requires specific attention in the context of wastewater management in Qatar.
Sulfide is produced as a result of the biological reduction of sulfate, which occurs naturally in most water supplies and is present in wastewater, by anaerobic microorganisms. Sulfide can combine with hydrogen to form hydrogen sulfide (H 2 S) which can be oxidized to sulfuric acid which is corrosive to the pipes of the sewer system [2]. Furthermore, sulfide is one of the components to which the odor problems of wastewater are attributed.

Materials and Methods
The quantitative assessment of the constituents of wastewater in Qatar is used as the methodology in this paper by performing a mass flow analysis.

Study Area and Data Sources
Wastewater generated in the country of Qatar is assessed based on data provided by Ashghal [38] as the Qatari National Authority responsible for governing the design, construction, delivery and maintenance of all major infrastructural projects including storm-and rainwater, wastewater and sewerage drainage and treatment across Qatar. Ashghal's mandate also includes the complex IDRIS project (Inner Doha Re-sewerage Implementation Strategy), which has improved data availability.
In Qatar, the quantities of wastewater generated have been increasing over years (Table 3), which is due to the growth of population and activities. Generated urban wastewater is collected either by the sewer system or by tankers. Table 3 also shows the portions of treated liquids and liquids discharged without treatment. Wastewater collected by sewers is treated by wastewater treatment plants, while wastewater collected by tankers is discharged in an open lagoon without treatment [12,38]. All wastewater treatment plants in Qatar are equipped with at least a secondary treatment level to reduce organic pollution. Where tertiary treatment is implemented, around 70% of wastewater is subject to the removal of nitrogen and phosphorous, and around 30% passes through disinfection. A total of 23 wastewater treatment plants were in operation across Qatar in 2015 [12]. Table 3. Urban wastewater generated, treated, and discharged without treatment in Qatar; in million m 3 per year, from 2010 to 2013 [38].  In this study, for the quantity of wastewater, the amount of wastewater from 2013 is used, where 176.19 million m 3 wastewater was generated. For the purpose of calculation, in agreement with wastewater management standards [1], it is assumed that the density of wastewater remains 1 kg/L and therefore, the total urban wastewater generated in Qatar amounts to 176.19 million metric tons per year.
The composition of wastewater in Qatar is presented in the first subsection of the results (Section 4.1). Where concentrations are required to implement the further study, the data presented in the aforementioned section are used.

Type of Information
The research paper analyzes four different resource types embodied in the wastewater generated in Qatar. By considering the composition and quantity of wastewater, the mass flows of (1) solids (dissolved, suspended and volatile), (2) BOD, COD, oil and grease, (3) nutrients (P, N), and (4) alkalinity, chloride, and sulfide are determined.
In this study, the material flow analysis is implemented based on considering the mass of flows and their constituents. Therefore, in the following, the term mass flow analysis is used. Mass flows of wastewater constituents are evaluated under the assumption of the full removability and recoverability to estimate the maximum resource recovery potentials. It is assumed that no mass is stored in the system (no stock term in the mass flow analysis).

Information Processing
The mass flow analysis is performed using the program STAN (short for subSTance flow ANalysis; Vienna University of Technology, Institute for Water Quality, Resource and Waste Management, Austria) [39]. STAN is a software program (freeware) designed to perform material flow analyses (MFA) under consideration of data uncertainties [40]. It was elaborated to support MFA in waste management according to the Austrian standard ÖNORM S 2096 (MFA-application in waste management). STAN has been widely implemented to study material flows in waste management, but it has also been used in other areas of environmental sciences, for example, to study nutrients such as nitrogen and phosphorous in agriculture, urban systems, or wastewater [41][42][43] or to explore sulfur flows and biosolids [44].
An MFA quantifies the flows and stocks of materials (usually containing different substances) or single substances in a system defined in space and time. MFA is based on the principle of mass balance: in a valid MFA the mass balance needs to close for the whole system but also for each process (unit within the system), meaning that the mass that enters the system (or a process) will either leave the system (or process) or be stored (stock). STAN consists of building a graphical model based on predefined components (flows, processes, subsystems, system boundaries, text fields), as described by Cencic and Rechbeger [39]. The known data (mass flows, stocks, concentrations, and transfer coefficients describing the partitioning of single materials into different flows) with corresponding physical units are supplied by the user; this can refer either to the level of materials or the level of single substances. For the analysis to be valid, enough data needs to be provided to ensure that the mass balance principle is respected. Statistical tests are used to detect gross errors in a given data set. The graph of the model with flows is displayed as Sankey diagrams, with arrows proportional to the individual value (quantity of material shown).

Wastewater Characterization in Qatar
For wastewater composition in Qatar, Table 4 shows the average values as compiled by Ashghal, the Public Works Authority of Qatar, based on raw (untreated) wastewater occurring in the Greater Doha area (Doha is the capital city of Qatar). Comparing the values to the typical levels reported in the literature, the table includes an assessment of whether the reported concentrations indicate that the wastewater is significantly charged with individual constituents. Some observations to highlight the characteristics are the following: 1.
The ratio of Volatile Suspended Solids (VSS) to the Total Suspended Solids (TSS) is lower than the typical value, around 80%.

2.
The ratio of Biochemical Oxygen Demand (BOD) to the Total Suspended Solids (TSS) is 1.33, which is higher than the typical range between 0.75 and 0.85.

3.
The phosphorus content is 5 mg/L, which is at the lowest end of the typical value ranges.  Table 4 (TSS: 150 mg/L = 1.5 × 10 −4 t/m 3 ; TDS: 1500 mg/L = 1.5 × 10 −3 t/m 3 ; TVS: 110 mg/L = 1.1 × 10 −4 t/m 3 ), in combination with the total amount of 176,190,000 t/a wastewater, we get the estimate amounts of total solids (TS) and its fractions into the total suspended solids (TSS), total dissolved solids (TDS), total volatile solids (TVS), and total fixed solids (TFS) (Figure 1). While the amounts of TSS and TDS can be directly calculated from their concentrations in wastewater, TS is obtained as their sum (TS = TSS + TDS). The concentration of TFS is not known; however, the concentration of TVS is known and the amount of TVS can, therefore, be directly calculated, and the amount of TFS is obtained through the closure of the mass balance (TFS = TS − TVS). Figure 1 reveals that the TS generated in WW in Qatar could reach more than 290,700 t/a; 91% out of these solids are dissolved solids (TDS) totaling > 264,200 t/a and 9% is suspended solids (TSS) totaling around 26,500 t/a. In terms or organic content, the total volatile solids quantity (TVS) is below 50 t/a (32 t) and the TFS (total fixed solids) is about 290,700 t/a.
Assuming a 100% removal efficiency, more than 290,700 t/a solids could be removed from Qatari wastewater. With ca. 0.01%, the volatile fraction of solids (TVS) is very low in the wastewater (TVS represents the total of volatile fractions in both suspended and dissolved solids: VSS + VDS, data not individually available), while the largest share of solids, amounting to nearly 100%, is in the form of fixed fractions (TFS represents the total of fixed fractions in both suspended and dissolved solids: FSS + FDS; data not individually available). This high share of fixed fractions illustrates a relative stability of the existing solids, and in conclusion, it can be expected that the solids will be available for advanced recovery schemes. below 50 t/a (32 t) and the TFS (total fixed solids) is about 290,700 t/a. Assuming a 100% removal efficiency, more than 290,700 t/a solids could be removed from Qatari wastewater. With ca. 0.01%, the volatile fraction of solids (TVS) is very low in the wastewater (TVS represents the total of volatile fractions in both suspended and dissolved solids: VSS + VDS, data not individually available), while the largest share of solids, amounting to nearly 100%, is in the form of fixed fractions (TFS represents the total of fixed fractions in both suspended and dissolved solids: FSS + FDS; data not individually available). This high share of fixed fractions illustrates a relative stability of the existing solids, and in conclusion, it can be expected that the solids will be available for advanced recovery schemes.

Mass Flow Analysis of COD and BOD in Qatar's Wastewater
Performing the mass flow analysis of COD and BOD based on the characterization of wastewater in Qatar (Table 4: COD: 441 mg/L = 4.41 × 10 −4 t/m 3 ; BOD: 200 mg/L = 2 × 10 −4 t/m 3 ) reveals that the total amount of organic compounds generated in Qatar per year is about 77,700 metric tons (Figure 2), of which around 45% are biodegradable (ca. 35,250 t/a BOD) and around 55% are non-biodegradable (ca. 42,500 t/a). Out of the biodegradable amount, around 92.5% (ca. 32,600 t/a) are readily and rapidly biodegradable compounds. The mass flow analysis further shows that the estimated amount of oil and grease is more than 2600 t/a, representing around 7.5% of the biodegradable organic compounds.

Mass Flow Analysis of COD and BOD in Qatar's Wastewater
Performing the mass flow analysis of COD and BOD based on the characterization of wastewater in Qatar (Table 4: COD: 441 mg/L = 4.41 × 10 −4 t/m 3 ; BOD: 200 mg/L = 2 × 10 −4 t/m³) reveals that the total amount of organic compounds generated in Qatar per year is about 77,700 metric tons (Figure 2), of which around 45% are biodegradable (ca. 35,250 t/a BOD) and around 55% are non-biodegradable (ca. 42,500 t/a). Out of the biodegradable amount, around 92.5% (ca. 32,600 t/a) are readily and rapidly biodegradable compounds. The mass flow analysis further shows that the estimated amount of oil and grease is more than 2600 t/a, representing around 7.5% of the biodegradable organic compounds. One potential valorization for organic material is its conversion into methane-rich biogas through anaerobic digestion, where methane (CH4) represents an energy carrier. COD is commonly used to predict the potential for biogas production from wastewater [45]. The theoretical methane yield can be calculated from the COD, taking into consideration that 1 mol CH4 (equivalent to 22.4 L) requires 2 moles of O2 for the conversion of CH4 + 2O2 → CO2 + 2H2O at STP (standard temperature One potential valorization for organic material is its conversion into methane-rich biogas through anaerobic digestion, where methane (CH 4 ) represents an energy carrier. COD is commonly used to predict the potential for biogas production from wastewater [45]. The theoretical methane yield can be calculated from the COD, taking into consideration that 1 mol CH 4 (equivalent to 22.4 L) requires 2 moles of O 2 for the conversion of CH 4 + 2O 2 → CO 2 + 2H 2 O at STP (standard temperature and pressure), reflecting that 22.4 L CH 4 is produced by 64 g O 2 or 64 g COD removed, which means that each 1 g COD removed is equivalent to approximately 0.35 L CH 4 [46,47]. Therefore, the theoretical annual methane potential based on the 77,700 t/a COD in Qatar is estimated to be more than 27 million m 3 of methane. At a calorific value of 10 kWh per normal m 3 methane (methane at STP), this corresponds to an energy content of around 270 GWh per year. This theoretical value does not take into account the needs for bacteria for cell growth and the non-methanised biodegradable or non-biodegradable intermediates that may occur [48].

Mass Flow Analysis of Nutrients in Qatar's Wastewater
The mass flow analysis based on the nutrients' concentration in wastewater (P: 5 mg/L = 5 × 10 −6 t/m 3 ; N: 35 mg/L = 35 × 10 −6 t/m 3 ) shows that about 881 t/a phosphorous are generated in the wastewater of Qatar and about 6167 t/a nitrogen (Figure 3). For nitrogen, the fraction present in the form of NH 3 -N was calculated based on the concentration of 21 mg/L NH 3 -N (Table 4), giving 3700 t/a and the rest of the total amount of nitrogen (2467 t/a (40% of the total nitrogen)), representing the non-NH 3 sources.  Nitrogen and phosphorous in conventional fertilizer have a monetary value of at least 0.6 US dollar per kg N and 1.5 US dollar per kg P, based on very conservative assumptions [49] at the low end of the price information for fertilizer constituents. Therefore, the monetary fertilizer replacement value of nitrogen contained in Qatar's wastewater amounts to at least US$3.7 million, and the monetary value of the contained phosphorous amounts to at least US$1.3 million. Nitrogen and phosphorous quantities together amount to a monetary fertilizer replacement value of more than 5 million US dollar per year.
Among wastewater recycling schemes, the recovery of phosphorus and nitrogen from wastewater represent the two areas that have attracted most research interest and have achieved the most progress in recent years (Section 1), and different technologies are ready for implementation [27][28][29]. The recovery of the estimated amounts can be divided into three steps: (1) Accumulation which can be achieved by precipitation, membrane separation, sorption, magnetic particles or via plants and microorganisms, (2) Release which can be achieved via biochemical and thermochemical Nitrogen and phosphorous in conventional fertilizer have a monetary value of at least 0.6 US dollar per kg N and 1.5 US dollar per kg P, based on very conservative assumptions [49] at the low end of the price information for fertilizer constituents. Therefore, the monetary fertilizer replacement value of nitrogen contained in Qatar's wastewater amounts to at least US$3.7 million, and the monetary value of the contained phosphorous amounts to at least US$1.3 million. Nitrogen and phosphorous quantities together amount to a monetary fertilizer replacement value of more than 5 million US dollar per year.
Among wastewater recycling schemes, the recovery of phosphorus and nitrogen from wastewater represent the two areas that have attracted most research interest and have achieved the most progress in recent years (Section 1), and different technologies are ready for implementation [27][28][29]. The recovery of the estimated amounts can be divided into three steps: (1) Accumulation which can be achieved by precipitation, membrane separation, sorption, magnetic particles or via plants and microorganisms, (2) Release which can be achieved via biochemical and thermochemical treatment processes and (3) Extraction which can be achieved via crystallization, the gas-permeable membrane, liquid-gas stripping, and electrodialysis [50].
Where recovery of nutrients cannot yet be implemented, the application of wastewater for irrigation in agriculture might provide a good resource of nutrients that could not only offset the use of commercial fertilizers but also enhance the opportunity of multiple planting seasons [51]. Field experiments ( Table 5) conducted by the National Environmental Research Institute (NEERI) in India showed that the crop yield is well enhanced when wastewater irrigation is used and managed properly as a result of the potential content of nutrients [52,53].
Qatar imports about 95% of its food need. Although the quality of treated wastewater meets the standards of irrigating water and studies suggested its suitability for crop irrigation with minimum risk to the soil, groundwater, and crops, it is still not accepted socially [54]. Whether wastewater irrigation might indeed be a viable option in the case of Qatar requires a more detailed assessment, under specific consideration of wastewater constituents such as heavy metals with potentially adverse impacts on agricultural production or on ecosystems. Among others, chloride in Qatari wastewater limits its applicability as irrigation water in the situation of Qatar [37]. In line with efforts worldwide, the selective recovery of nutrients, which converts nitrogen and phosphorus into forms that can be stored and transported, should be prioritized as a future-oriented pathway.    Based on the current state of knowledge, sulfide, in particular, can be targeted for recovery. While sulfide is usually considered a challenge in wastewaters, at the same time it represents a potential source for the recuperation of sulfur as a component with a potentially significant market value [55,56]. Using state-of-the-art technology, sulfide can be recovered by mixing it with air which converts it to elemental sulfur that can be separated from the liquid [56]. A number of process alternatives or alternative solutions exist [57]. Based on the current state of knowledge, sulfide, in particular, can be targeted for recovery. While sulfide is usually considered a challenge in wastewaters, at the same time it represents a potential source for the recuperation of sulfur as a component with a potentially significant market value [55,56]. Using state-of-the-art technology, sulfide can be recovered by mixing it with air which converts it to elemental sulfur that can be separated from the liquid [56]. A number of process alternatives or alternative solutions exist [57].

Removed Alkalinity (t/a)
The quantities of chloride present in Qatari wastewater are high, and higher by a factor of nearly 30 compared to sulfide. Chloride, therefore, warrants more efforts to understand its potential recovery. Instead of focusing on its removal as an unwanted constituent with a subsequent discharge, chloride could be recycled as a resource for different industrial and non-industrial applications [58]. Chloride removal strategies might not only focus on recovery of chloride, but also on the better reusability of treated wastewater. Currently, the high chloride quantities in wastewater are one factor that limits potential use of wastewater for irrigation purposes in Qatar, resulting in an additional stress on groundwater and other water resources in the country [37].
Technically, the removal of dissolved components like chloride is considered challenging due to the high solubility and pronounced adverse impacts causing corrosion in pipes, damage to the crops if discharged to agricultural land and problems in the treating system, particularly in the biological units [59]. This becomes a more serious issue in a country like Qatar with limited water resources where seawater is one of the major causes of the infiltration of chloride salts in water [60]. Applied removal technologies such as reverse osmosis and electrolytes are expensive and nonselective. Therefore, chemical treatment technologies are becoming an attractive option such as electrocoagulation processes [61].
The relatively high alkalinity in Qatari wastewater suggests a considerable presence of constituents not studied individually in this work, which might include potentially valuable components such as hydroxides, carbonates, and bicarbonates of calcium, magnesium, sodium or potassium. An improved availability of data for wastewater composition in Qatar is essential to better assess such components with a focus on their potential recovery.

Relevance and Limitations of the Study
Consideration of wastewater as a resource is well aligned with national priorities specified in the Qatar National Development Strategy (QNDS) [14]. The reuse of water is seen as a pathway to relieve the water stress in the country.
Combining wastewater treatment with advanced resource recovery is a step forward to introduce the concept of wastewater refinery, where wastewater management is not primarily focused on the delivery of environmentally clean or "fit for purpose" treated wastewater, but instead aims to also generate value-added products based on the embodied organics, nutrients, chemicals, and other components. Such a factory for resource recovery and recycling contributes to the implementation of a circular economy and, in addition, can turn the treatment of wastewater from a major cost into a source of profit. In the case of Qatar's wastewater, the contained nitrogen and phosphorous alone have a market value of more than US$5 million per year.
This work provides evidence that Qatari wastewater contains significant quantities of constituents that could be recovered. Considering state of the art of recovery technologies and the specific results for the potentially valuable components contained in Qatari wastewater, the results suggest that recovery of nitrogen, phosphorus, and sulfide should be given priority. Anaerobic digestion with biogas production also looks promising as a valorization strategy. Therefore, as one element within advanced resource recovery schemes, a biorefinery component with anaerobic digestion as one key technology that could be an attractive choice.
Taking into consideration the analysis of alkalinity, considerable quantities of potentially valuable additional components can be assumed, which requires more detailed data about wastewater composition in Qatar. Calcium, magnesium, sodium, and potassium are examples of such constituents. Other valuable components that are embodied in wastewater and were not analyzed in this work include metals, biodegradable plastic and industrial chemicals such as hydrogen, hydrogen peroxide, and caustic solution.
Some uncertainty concerning the precision of the mass flow balances might result from the standard assumption of 1 kg/L for wastewater in Qatar. The results derived from the mass flow analysis of solids (Section 4.2) reveal that the average content of total solids in wastewater in Qatar is around 0.16%, indicating that the level of error resulting from the assumed wastewater density is very low.
Some uncertainty exists with a view of quantities of wastewater generated in Qatar since the loss of wastewater in the sewerage system is not fully quantified [37].
A systematic review of technologies suitable for application in Qatar is not within the scope of this work where the amounts of constituents in wastewater are in focus.
Future research should investigate the resource recovery methods, their integration and the economic viability of solutions under the situation in Qatar.

Conclusions
The new paradigm of combining wastewater treatment with advanced resource recovery introduces the concept of wastewater refinery and provides many added values over the conventional wastewater treatment. The results of this study show that considerable amounts of different constituents can be extracted from Qatar's wastewater in addition to the treated wastewater at the end of the pipe. These valuable resources can be used for different purposes depending on each country's priorities.
The purified water component itself represents a valuable final product, and it amounts to more than 99% of the total mass flow. Such treated wastewater can be a good source for agriculture, industry, toilet flushing, or groundwater replenishment.
The amount of COD embodied in Qatar's urban wastewater is estimated to be around 77,000 t/a which can produce about 27 million m 3 /a of methane in anaerobic digestion.
The considerable amounts of nutrients that can be extracted from Qatar's wastewater could provide an attractive option for the production of fertilizers to be used in the agriculture sector. Annually, about 6166 metric tons nitrogen and 881 metric tons phosphorous could be extracted from wastewater consecutively (economic value US$5 million). For this purpose, more research is needed to develop cheap and efficient technologies.
Other valuable materials can be extracted from wastewater such as oil and grease (32,595 t/a), alkalinity (41,229 t/a), chloride (81,000 t/a), and sulfide (2819 t/a).
For resource recovery applications, Qatar should develop a more resource-oriented regulatory system, identify cost-effective techniques and promote awareness campaigns on the valuable constituents of wastewater for its social acceptance.