An optimal water regeneration, reuse and resource recovery network integrating domestic and industrial sources

Implementation of reduce, reuse, recycle strategies are pertinent to ensure sustainability. There are studies to minimize freshwater reduction via mathematical modelling method. However, study to explore possibilities of combining both domestic and industrial wastewater regeneration, reuse, and resource recovery in a centralised facility is yet to be made. This study develops a mathematical model that could provide optimal water regeneration and reuse network that also be capable to produce biogas from the selected wastewater streams. The main objective is to maximize profit from the network established. A superstructure that consists of sources, outsource, freshwater, mixers-demands, and biogas systems is developed. A combination of the sources, regenerated sources, outsource water, and freshwater is performed in the mixers. The multi integer non-linear programming (MINLP) model is optimized by BARON solver in General Algebraic Modelling System (GAMS) software. The case study result shows that freshwater water saving is 42% and 377 kW of electricity can be generated from the biogas produced. This offers possibilities to consider the idea of the centralised wastewater facility that considers water regeneration, reuse, and resource recovery for both domestic and industrials sources, as the Eco-Industrial Park (EIP) may serve as the suitable platform.


Introduction
The circular economy concept emphasizes the need to minimize usage of fresh resources via the 3R strategies namely reduce, reuse, and recycle. Usage of water in domestic and industrial activities contributes to more than 50% total consumption in Malaysia [1]. Hence, there is a need to reduce water consumption in the areas as the wastewater can be regenerated, reused, and/or treated in order to reduce the freshwater consumption. The strategies to manage water include elimination, reduction, outsource, regeneration, and recycling [2].
There are many researches that have been conducted to obtain optimal water network. Ahmad Fadzil et al. [3] has proposed the concept of one-way centralised water reuse header (CWRH) for application at Total Site. However, the usage is limited to a single contaminant only. Li et al. [4] developed a method that is based on heuristic considering multiple contaminants for usage of batch networks. Fan et al. [5] presented an iterative method which considers simultaneous reuse, regeneration reuse/recycling and treatment of the wastewater as the result is comparable with the mathematical method.
A multi-objective optimization model regarding optimal water-energy-nexus for a residential complex has been studied by Núñez-López et al. [6]. The model incorporates water network synthesis At the mixer, the streams from outsource, freshwater, the regenerated streams, and the treated streams via ultrafiltration (UF) and reverse osmosis (RO) will be combined, subject to the demands' flow rate and minimum contaminant content properties. The list of the demands' properties will be provided in the Section 3. The regeneration units and the combined UF and RO systems (later written as UF+RO) have fixed contaminant removal percentage respectively.
The sources that are sent to the biogas digester will be used to produce biogas for subsequent electricity generation. There is a certain minimal COD content level that the stream needs to have, which in this case is 7,000 mg/L. The purified biogas will used in the gas engine to generate renewable electricity, which it acts a source of revenue. The remaining stream, namely digestate in the digester will be sent to the decanter centrifuge for a solid-liquid separation process. The solid portion of the digestate will be used as an additional fuel for the boilers, while the digestate's liquid portion will be sent to the UF and RO systems. The recovery of struvite or nitrogen from the liquid digestate is not considered in this study. The purified water from the UF+RO will be sent to the mixers, thus the amount of freshwater can be minimized. The UF+RO will be disposed accordingly; however, it is not in the study's scope. The model is developed on the centralized facility service provider's point of view, which it obtains revenue from processing fee of industrial wastewaters and selling of treated water, based on type of the demand and its respective contaminant content. The detailed mathematical equations used in this study are provided in section 2.2.

Mathematical formulation
Main objective of the model is to obtain maximum profit ( ) from selling of the renewable electricity, selling of regenerated water to the demand(s), processing fee of industrial wastewaters, and selling the solid digestate as the solid fuel. The list of equations for the model are listed as follows: Objective function: where Rev is revenue generated as per described above. stands for total annualized capital cost of the whole systems combined.
is the associated total operation and maintenance cost.
Constraints: Source-to-demand flow rate constraint: ℎ is the flow rate of the sources. ℎ, , ℎ, , ℎ, , and ℎ are the flow rate from the sources to the regeneration units, mixers, biogas digester, and the conventional wastewater treatment plant respectively. ℎ, is the contaminant content of the sources. ℎ, is a binary parameter to assign the sources h to the regeneration units, where K is a large integer value to limit the flow rate from the sources of the r.
is the flowrate at the regeneration unit. , is the respective contaminant content.
is filtration yield of the regeneration units as is the flow rate of the regenerated water.
, is contaminant removal yield of the regeneration unit and the resulting reduced /contaminant content of the regenerated stream is , . , is the flow rate of the regenerated water to the mixers.
is the flow rate of the demand and , is the contaminant limit of it. is a binary variable regarding existence of connection regarding water supply to the demand. , , , and , are the flow rate of freshwater, outsourced water, and the treated water (via UF+RO) from the biogas set, respectively. is contaminant content of the freshwater. , is the contaminant content of the permeate.
Source-to-biogas flow rate constraint: Flow rate of the biogas digester is a summation of flowrate of the sources to the biogas digester ℎ, . , is the contaminant content of the stream prior to the anaerobic digestion process. A multiplication of and , (p = 'COD') will result in the total COD available for the biogas production process . is the amount of raw biogas produced. The equation to produce biogas is based on the study by Misrol et al. [12]. and is the COD removal and the COD conversion to methane constant respectively.
4 is the percentage of methane content in the raw biogas and 4 is the density of the methane gas. 4 is the calorific value of the methane and is the efficiency of the gas engine to generate electricity.
is the electricity power generated from the biogas burning.
is the contaminant reduction factor during the anerobic digestion process. is the remaining solid content in the stream after the anaerobic digestion step. Solid digestate recovered is obtained via multiplication of with solid fraction factor during the centrifugation process . The centrifugation step will generate two streams i.e the solid digestate and the liquid digestate .
is obtained via multiplication of with liquid fraction factor during the separation process . , is the contaminant content of the liquid digestate. and is the filtration efficiency of the UF and the RO respectively.
is the permeate generated after the UF+RO. and are the contaminant removal constant of the UF and the RO respectively. , is the resulting contaminant content of the permeate after the UF+RO. , is the flow rate of the permeate to the demand.
Revenue generation: There are four sources of revenue in the model i.e via selling electricity from burning the biogas , usage of the solid digestate as the solid fuel , selling of treated water to the applicable industries or consumers , and annual processing fee of industrial wastewaters . is amount of electricity power generated from the biogas engine and is the annual working hour. is the selling price of the electricity.
is the price of the digestate as solid fuel. and is the revenue from selling the treated water and selling price of the treated water respectively. Selling price for boiler feed water is different from cooling water, for example.
is the cost of freshwater. is processing fee of treating wastewater that the sources need to pay to the centralized facility. ℎ is amount of processing fee based in USD/m 3 Investment, Operating and Maintenance (O&M) Cost estimations: The annualized total investment cost is summation of investment cost of the digester , scrubber , gas engine , decanter , and piping connection , and outsource . Investment cost of the NF, UF and UF+RO are covered in the O&M equations later.
consists of piping elements (i) from the sources to the centralized facility, and (ii) from the centralized facility to the demands combined.
is the annualization factor. Cost equations for and are based from  [12].
is derived from IEA [13] is based from cost estimation formula by Seider et al. [14]. . The pipeline cost of the sources ℎ and the demand(s) are mainly based from Marchionni et al. [18]. Incorporation of binary variable specifically for the demand is required in order to ensure that only the applicable demand is considered, thus avoiding costing consideration of non-existing supply to the demand.
is a binary variable regarding existence of connection regarding supply to the demand. ℎ is the distance of the sources to the centralized facility in km, and is distance between the centralized facility to the demands. ℎ and is the power required to 'bring' the sources to the centralized facility and from it to the demand(s) respectively.
Costing regarding the is based from Towler and Sinnott [15] and the water tank volume required is referred from MEWA [11].
is the volume factor of the water tank. ) (47) Total operation and maintenance cost is a summation of operation and maintenance cost of the biogas digester , scrubber , gas engine , the decanter , and the regeneration units, which is as the NF systems or UF systems , the UF+RO filtration , the connection item , and the outsource . The formulations for and are based from Misrol et al. [12].
is a constant regarding the O&M cost of the gas engine. is the percentage of typical maintenance cost (usually 5%). , , and is the treatment unit cost (USD/m 3 ) of the UF, RO, and NF respectively as per referred from Tran et al. [16].
is the cost of electricity.
Since the model involves the binary variables and the usage of non-linear equations, it is formulated as the mixed-integer non-linear program (MINLP).

Case study
A case study is based on parameters and information tabulated in Tables 1, 2, and 3. The distance of the ablution water from mosque and household's greywater from the centralized facility is set at 15 km. The low and high strength wastewaters are located 1 km from the centralized facility. Properties of the sources, freshwater, outsourced water, and demands are shown in Table 1. There is not fixed value regarding of the demands' flow rate as the upper bound is set at 1,000 m 3 /h. In this study, density of the wastewaters is assumed at 1 metric ton/m 3 : The filtration yield and the contaminant removal yield of the UF, NF, and RO is provided as per Table 2. Other parameters used in the model is shown via Table 3.

Result and discussion
The mixed-integer non-linear program (MINLP) model is run via GAMS version 24.7.4 in a computer with processor capacity of IntelCore i3-8130U 2.2GHz. It was solved using BARON solver. Execution time takes less than 1 second. The optimal network selected is shown in Figure 2. The result's validity is done via cross checking and calculation of the same result input in MS Excel. In order to ease understanding, the optimal network is translated into table form as per Table 4.   The optimization result suggests that all the sources are used either as direct reuse, regeneration, or for biogas production. All of ablution water from mosque and most of the households' greywater are sent for subsequent reuse for irrigation applications. 3.6 m 3 /h of household greywater is sent to the NF regeneration, generating 2.8 m 3 /h of NF permeate. All of the dairy industry wastewater is sent to the UF regeneration; 13.5 m 3 /h of the UF permeate is generated as both permeates are used for the boiler feed water supply. All of the outsourced water, 12.6 m 3 /h of freshwater and 9.1 m 3 /h of the UF+RO permeate are also used for the same purpose; this corresponds to total amount of 39.1 m 3 /h of water is able to be supplied for the boiler feed water usage. Total water supply for the irrigation application is 241.4 m 3 /h as most of the supply is from the freshwater with amount of 150 m 3 /h.
By default, the freshwater and the outsourced water properties cannot meet both demands' properties as the formers require additional treatment e.g NF or RO in order meet the specifications. This is applicable in real world situation which the tap water requires 'softening' step prior to be used as boiler feed water, for example. Overall, the proposed solution is able to minimize freshwater usage by 42% (based on direct usage of the freshwater. If the incurred water loss from the filtration of freshwater, which may be in range of 10% -30% of the input is considered, the value of freshwater minimization is even relatively higher).
All the high strength wastewater is used for biogas production. An estimated amount of 107.2 nm 3 /hour raw biogas will be produced which will generate 377 kW of electricity. After the solid-liquid separation via the screw press, 5.8 dry kg/hour of digestate is generated. 13.5 m 3 /hour of liquid digestate will be treated via the UF+RO systems prior to reuse.
The selling price of the supplied water is set at 10% lower from the typical cost. The processing fee of the industrial wastewater is also set at 50% lower [15]. The pricing mechanism may be pertinent as it provides the economic benefits to the involving parties i.e the sources providers and the demands, while at the same time the centralized wastewater utility service provider could also obtain profit. Total annualized capital cost for the whole proposed systems is calculated at USD 114,189 while the annual O&M cost is estimated at USD 641,173. Revenue generated is calculated at USD 1,210,856 per year while profit obtained is USD 455,494. Revenue of supplying water provides more than half of the revenue. Translated into local currency, it is equal to MYR 1,821,976 of yearly profit. The proposed systems may remove the conventional wastewater treatment necessities as a closed water circulation system can be achieved. That said, the filtrate from the UF and RO membrane still needs to be disposed as per procedure. In future, more extensive resource recovery options e.g phosphorus, nitrogen, and/or heavy metal recovery is foreseen to be considered for the next study.

Conclusion
In this study, a mathematical model to provide optimal water network while performing resource recovery works that is applicable for domestic and industrial sources is proposed. Optimization of the input streams considering the COD and TSS has been performed together with consideration of the regeneration unit(s). Piping elements are also included based on certain distance between the sources and the centralized facility. The case study conducted shows that most of the regenerated or treated water can be reused except the membrane retentate. The possible water integration and the resource recovery works can be symbiotically applied while at the same time providing beneficial economic outcomes that are applicable for all the parties involved. In this case, the sources providers can minimize their cost of wastewater treatment, while the demands are able to minimize their supply water purchase cost. The centralized wastewater utility service provider can also obtain profit from the buying and selling service. The freshwater amount can be reduced by 42% and 377 kW of renewable electricity can be generated. For implementation in real world application, a further study is suggested, which may focus on the basic and detailed engineering aspects. Percentage of methane content in the raw biogas (%) 4

Nomenclature
Density of the methane gas (kg/m 3 ) 4 Calorific value of the methane gas (MJ/m 3 ) Efficiency of the gas engine to generate electricity (%) Contaminant reduction factor during the anerobic digestion process Solid fraction factor during the centrifugation process (%) Liquid fraction factor during the separation process (%) Percentage water recovery of UF (%)

Binary Variables
Existence of connection between the centralized facility to the demand i