WATER QUALITY MATHEMATICAL MODELLING FOR DRAINAGE WATER IN RURAL COMMUNITIES

The research's main objective is to study water quality management techniques using different scenarios by applying three mathematical models. The study focuses on the Rosetta Branch-River Nile, which is considered the supreme contaminated Branch of river Nile. The study is composed of three main parts. First: Water quality modeling using WASP 6 was adopted to simulate the water quality status. This model was calibrated and used to simulate different scenarios presenting an alternative solution for the water quality problem in Rosetta Branch. They also optimized water quality indicators using the genetic algorithm to determine the optimum techniques essential to eliminating the Rosetta branch's water quality problem. Second: Mathematical Modeling Using the SOBEK model, measure the environmental effect of wastewater discharges on the water quality of the Rosetta branch, taking into account seasonal variations. Third: statistical analyses to research the association between discharge and concentration of ammonia using simple regression equations. The study is focused on theoretical and applied scientific Methodology. It concluded that increased discharge in the Branch does not significantly affect water quality in the Branch. However, the treatment processes appear to have a large and significant impact on the water quality instead of increasing discharge solution. There is an inverse relationship between the discharge in Rosetta Branch and ammonia concentrations. All relationships have a correlation coefficient of, on average of about 0.7. The paramount water quality challenging in the Branch is cumulative of ammonia and Biological Oxygen Demand (BOD) overhead guidelines. Moreover, improving water quality for point source effluents, particularly at El Rahawy drain, improves the Rosetta branch's water quality.


INTRODUCTION
Water quality in the Nile deteriorates along its trip from south to north. Lake Nasser has good water quality with only small organic substances, making its water a reference point for water quality along the river and its branches [1]. Rosetta Branch receives relatively high concentrations of organic compounds, nutrients, oil, and grease. The primary source of pollution is the El Rahawy drain (which receives part of Greater Cairo wastewater), Sabal drain, El-Tahrrer drain, Zawiet El-Bahr drain, and Tala drain. The river flow volume is a critical factor in understanding the river system since the water drop's most dissolved constituents drop during periods of high flow and increase during low discharge. The classification of seasonal concentration patterns of water quality variables during the annual cycle is essential [2]. In the Southern Nile Delta, the salinity of the water is (750 -1000 mg/l), and the salinity in the Center Delta is (2000 mg/l-3500 mg/l) to 6000 mg/l in the northern territories. According to the National Water Resources Plan for Egypt, the River Nile from Aswan to Delta Barrage receives drainage from 124 point sources, 67 are domestic, and the others are industrial sources. The documents show that only ten of the 43 drains meet the requirements set out in Law 48/1982 (Article 65) on the runoff water's consistency that can mix with fresh water. Researchers researched water quality management at the Rosetta Branch and suggested solutions to its serious quality problems, especially in rural communities. [3] used Geographic Information Systems (GIS) to measure water quality and used WASP to simulate water quality. Also, various simulation scenarios provided an alternative approach to the water quality issue in the Rosetta Branch. [4] analyzed the impact of increasing discharge on water quality and proposed an appropriate method for treating wastewater discharge from five drains to suggest various scenarios and monitor contamination along the Rosetta branch. [5] showed that the Nile water quality deteriorated and extended from poor to marginal while the drinking water index varied from marginal to good. [6] studied the effect of predicted global warming in terms of expected temperature rise on DO status for the Rosetta branch in Egypt's Nile Delta. Also used is a simplified conceptual model calibrated to a detailed physic-chemical water quality model (MIKE11) for the Rosetta Branch in the Nile Delta. [7] Showed the Negative impact of fish cages on the environment and hydraulic efficiency were the main reason for monitoring fish farms in the River Nile. [8] managed water quality at the Rosetta branch by improving effluent water quality at the Abu-Rawash WWTP. [9] studied different scenarios and simulated using QUAL2K water quality model. T avoid water quality deterioration in the Rosetta branch during the low demand period. [10] applied Water Quality Index (WQI) along Rosetta Branch and concluded that the worth case found along with El-Rahawy drain at the area between Abu Rawash City and Nekla Village. [11] used a Modelling Approach to manage water quality at Gharbia Drain. Also, A tailored water quality modeling created using MATLAB to simulate pollutant transport in the Gharbia drain. [12] showed that the Rosetta branch receives different pollutants from different sources; sewage and domestic effluents from El-Rahaway drains.
[13] Using QUAL2K Model and river pollution index for water quality management in Mahmoudia Canal. [14] researched a comprehensive assessment of water quality at the Rosetta Branch. [15] applied with WASP Water Quality Model through Rosetta Branch. El-Rahway, Tala, and Sabal drains are the primary water quality degradation sources along the Rosetta branch. The El-Tahrir and the Zawyet El-Baher drain on the water quality is not significant. [16] presented integrating GIS and Mathematical Modelling in Irrigated Watersheds to develop an integrated water quality management system that applies to irrigated watersheds in Egypt. [17] identified the primary pollution source's environmental and health consequences. It concluded that the available data revealed that the river receives a large quantity of industrial, agriculture, and domestic wastewater. It is worth mentioning that the river can still recover in virtually all the locations, with tiny exceptions. [18] studied the El Rahawy Drain's impact on the water quality of Rosetta Branch and solved the equations of conservation of mass, momentum, and constituent concentration by using the Duflow model.

Problem definition
The importance of the Rosetta Branch as it is the primary source of drinking water and fishing. Its usage for agricultural and industrial purposes in a way that requires at-tention to the quality of water. Increase the risks to which Rosetta Branch exposed due to the pollution it is chasing. There is evidence indicating that the Rosetta Branch has become a warehouse that receives a lot of domestic, industrial, and agricultural waste. The quality of its water has deteriorated, requiring eliminating the sources of this pollution or limiting it. Water quality management is one of the sustainable development elements, aiming to achieve sustainable water resource use by protecting and enhancing their quality while maintaining economic and social development. Water quality management involves identifying and assessing point and non-point source pollutants and their sources and determining the best management practices to control those pollutants to meet water quality standards. The Methodology consists of three parts as follows:

Mathematical modeling using WASP 6, EUTRO7, and optimization model
Water Quality Analysis Simulation Program (WASP 6), a development of the original WASP. This model aids handlers in reducing and forecast water quality responses to natural phenomena and artificial affluence for numerous effluence management decisions [19].WASP6 is provided with two kinetic sub-models to simulate two of the main water quality problems: conventional pollution and toxic pollution. The linkage of either sub-model with the WASP6 program gives the models EUTRO and TOXI, respectively [20]. Table 1. summarizes the physical properties of the primary fragmentation of the Rosetta Branch. Figure 1. shows the segmentation scheme used in the Rosetta branch model, point sources of pollution (drains, industrial factories), and the water treatment plant beside the Branch.

Model calibration
Earlier running WASP in amended Streeter-Phelps in EUTRO sub-models, the system must be calibrated. is used for calibration to model a conservative substance in the system. Salinity was selected to calibrate WASP since it is reflected as a conventional material and is a brilliant water mass tracer. Initial concentrations in boundary segments 1 and 10 were set to their average values of 375 and 520.3 mg/l, respectively [21], while all other critical segments were set to 0 mg/l and boundary segments to 200 mg/l. Figure 2. represents the simulated salinity measured at Segment 4 (A) and Segment 8 (B).

Model run
After calibrating WASP 6 model, the model effectively applied through the segmentations, currents, and parameters. The simulation is completed in an improved The results of the simulation of BOD were relatively consistent with the measured values. It observed that the concentrations of biological oxygen demand (BOD) surpass the permissible limits, particularly in segment two afterward El Rahawy drain, which reach more than 30 mg /l. The NH3 simulation results were relatively consistent with the measured values and records that the ammonia concentrations surpass the permissible limits, particularly in segment two afterward El Rahawy drain, which is more than 5 mg/l.

Figure 3: Measured BOD (A) and NH3 (B) versus simulated and Egyptian law in Rosetta Branch
Mathematical modelling using SOBEK model

Aim of the mathematical modelling
The purpose of this analysis is to achieve the following objectives: • Measure the physiochemical parameters of the various sources of contamination via the Rosetta Branch. • Estimate the environmental impact of drainage discharges on the Rosetta branch's water quality, taking into account seasonal variations. • Simulate the SOBEK water quality model to provide an effective way for wastewater treatment, add var-ious scenarios for pollution control through the Rosetta branch. Figure 4 shows the locations studied.

SOBEK mathematical model
The Rosetta branch's mathematical model simulated using the field parameters application (SOBEK-1D) mathematical model developed by Delft Hydraulics [23]. The Model input data is: [cross section areas through the Rosetta branch beginning from Km 0.00 to Km 207.00].

Calibration of mode
Discharges and water levels were added for hydrodynamic calibration [24]. The Rosetta Branch's roughness coefficient guarantees that the water levels obtained from the model are the same as those observed. Figure  5 indicates the water levels through the Rosetta branch at a discharge of 70 m 3 /day. Preliminary water quality calibration can use concentrations of all measured water quality parameters along the Rosetta branch and its drains. The concentrations of the parameters along each drain were similar to those predicted by SOBEK, Figure   6. Assessment of the demonstrations between the measured Dissolved Oxygen & Temperature and the estimated concentration of the model. After initialization, the model can correctly use various simulations to simulate any scenario. The calibrated model can be used to predict the system's response to possible circumstances. Sensitivity analysis also measures the model's ability to duplicate the non-linearity of the physical network [25].

Concentration by simple regression method
A theoretical and applied methodology was applied as follows: • Collect field data, • Carry out physiochemical analyzes to determine the extent of chemical contamination of samples represented over four years along Rosetta Branch,

El Rahawy Drain (Km 74.00)
The study included the El Rahawy drain, located between Al-Ayat in the south and Rosetta Branch in the north with 74km. It discharged an amount of 2.5 M m 3 /day at the kilo 9.60. It receives primary treatment from Zenain -Abu Rawash stations, with total disposal of 1.9 M m 3 /day, in addition to the output of five water treatment plants: Qanater -Tohormos -Hawamdiya -Al Badrashin -Shabramant. Figure 7 shows the study area.

El Moheet Drain
The beginning of the ammonia concentration in the drain is (0.3 mg/l) before the Saqqara drain's mouth. It rises to reach (7.3 mg/l) after the Saqqara drain's mouth, in which the Hawamdiyah drainage station dumped. High concentrations of ammonia in El Moheet drain after the following banks: Janabiya drain, Teresa tribal. In Nahia drain, ammonia concentrations reach (40 mg/l). The concentration reaches 12 mg/l at Al-Rimali drain at Barakat Al-Mostakbal drain for the Sewage Abu Rawash sewage station. Figure 8 Shows the El Moheet drain schematic Diagram and Photos. Tala drain total length is 39.50 km, serves 137000 acres, and its discharge is 2.950 Mm 3 /day and its Outfall in the Rosetta branch at km 119.30. It receives the waters of the main Rosetta Danshway -Nasr El-Din Palace -Shouni -Abu El-Ez, drains used to dispose of the sewage wastes station. In addition to the output of the sewage stations, which includes four stations, which are the stations of Tala -Al Batnan -Shouni -Al Shuhada. The concentration of ammonia at the beginning of the drain after a sewage station reaches 2.1 mg/l (4 times the permissible). Then the ammonia values fluctuated along the drain between high and low. The concentration of ammonia at the mouth of the drain in the Rosetta branch is 1.5 mg/l less than its start, 2.1 mg/l. This decrease is attributed to the Danshway drain. Figure 9 represents the Tala drain schematic diagram and its photos.

Sabal Drain
It reaches a length of about 47.5 k and serves the areas of 140000 acres, and flows at the kilo 72.00 of Rosetta Branch. The drain disposal runs 2.4 Mm3/day bearing the waste of sewage stations for Menouf and Shebin El-Koum.In addition to the output of 6 water treatment stations. The ammonia concentration reaches 13 mg/l about six times what is allowed after the Ashmoun sanitary drainage station. They discharged on the El Rahawy drain, the Menouf and Shebin Al-Koum stations, which discharged on the Sabil drain. Figure 10 shows Sabal Drain Schematic Diagram and Photos [26].

Methodology
Simple Regression method analysis the relationship between discharge and ammonia concentration. Simulation

RESULTS AND DISCUSSION
Mathematical modeling using WASP 6, EUTRO7, and optimization model

Water quality management scenarios
Water quality management scenarios simulated using a pre-calibrated model. This simulation's main objective is to run an alternative resolution improving water quality in the Rosetta branch. Four scenarios were implemented to accomplish the permissible concentration of ammonia and BOD in the Branch, rendering the Egyptian guidelines.

First: Increasing the branch flow in low demand period
Scenario (1) Wetland technology is recommended in the three drains.

Third: Increasing the branch flow and treatment of contaminated drains using wetland technology
Scenario (5): In this Scenario, merging Scenario (2) and Scenario (4): Increasing the flow reaches 4Q, reducing BOD by 60% and ammonia by 50% in El Rahway, Sable, and Tala drains.

Fourth: Treatment of contaminated drains to reach permissible limits in Egyptian Law 48
Scenario (6): Reduction of BOD and ammonia concentrations in all contaminated drains to reach permissible limits according to Egyptian Law 48 year 84: The output of Scenario (1) specified a decrease of 6.5% in BOD concentrations, as shown in Figure 13, and showed a 16% reduction in NH3 concentrations. These consequences are due to an increase in discharge by 2Q in four months.
The output of Scenario (2) specified a decrease of 13% in BOD concentrations as display in Figure 13. and show a reduction of 21% in NH3 concentrations. These outcomes are due to an increase in discharge by 4Q in four months.
The output of Scenario (3) specified a decrease of 22% in BOD concentrations. Figure 14 showed a 33% reduction in NH3 concentrations. These outcomes are due to the treatment procedure for El Rahawy drain by Wetland practice. Scenario (4) output showed decreased of 34% in BOD concentrations and indicated a decrease of 46% in NH3 concentrations. These outcomes are due to treatment procedures for El Rahway, Saba, Tala drains by the Wetland method. Figure 15. shows the outcomes for studied five scenarios matched to Egyptian guidance (Law 48). Scenario 5 shows a 43% reduction in BOD concentrations. These results meet the allowable value of 6 mg/l in every segment, excluding segment 2. Scenario 5 indicated a 59% reduction in NH3 concentrations, but the ammonia values were four times overhead the standards. The allowable limits for ammonia are 0.5 mg/l concentration in freshwater bodies. The primary outcomes that increased discharge in the Branch do not significantly affect water quality in the Branch. We find that the treatment proce-dures seem to have a great and significant impact on the Branch's water quality. The last Scenario demonstrates the beneficial effect of the treatment methods. All BOD and NH3 in drains were set to allowable values Law 48 displays this on the water quality in the Branch.

Preparation of the optimization model
The optimization model is a development feature that is hugely dependent on the application's problem descrip-

Scenario Cost value (C k )
Scenario (1) 5 Scenario (2)  8 Scenario (3)  20 Scenario (4) 100  (2) The Second Step in the model formulation is mapping the decision variables (S) in numeric values (binary numbers with 32 bits). This mapping provides (2 32 ) possibilities that exceed the number of permutations as the cardinality (the number of elements) of S=15. The Third Step in the model formulation is building the fitness function. This optimization problem's main idea is to minimize the selected solution's cost to eliminate the water contamination in selected regions. The chosen solution can consist of a single Scenario or composed scenarios if the fitness function is built as a linear function. The result will straightforward; the selected answer is the least-cost Scenario. Consequently, the developed fitness function is non-linear, as shown: The suggested G.A. algorithm is applied to the input space to improve the developed fitness function. After 50 generations, the AVERAGE fitness value reaches a steady stage, as presented in Figure 16 [29].

Minimize f = ag +bg+c
As possession the best individuals in each processed generation as individuals in the next generation (elitism), the best result member is presented in Table 5.
The presented result emphasizes that the maximum appropriate solution with min-cost for the water quality problem in the intended region is to increase twice the discharge of flow in the Rosetta Branch. Varying parameters, a, b, and c, do not significantly affect the achieved results. The analysis of input data is accepted by con-  Figure 16: The output of the optimization model [29]  sidering the average value of water quality parameters over the year. The intensive research strongly suggested considering the outcome of the daily matter from the WASP model.

SOBEK model scenario
Three situations were recommended for the modeling phase to reflect the actual state of play. Scenario (1): rise in discharges through the Rosetta branch from (20 Mm 3 / day to 50 Mm 3 /day) to 25% of treatment. Scenario (2): raise the discharges through the Rosetta branch from (20 Mm 3 /day to 50 Mm 3 /day) and the treatment of drains by various percentages between (25%-50%). Scenario (3): raise discharge through the Rosetta branch from (20 Mm 3 /day to 50 Mm 3 /day) and the treatment of drains by various percentages between (50%-75%).

SOBEK mathematical model results
Figures [17][18][19][20][21] represented the estimated BOD mg/l and Do mg/l post-treatment enhancement scenarios for SOBEK Model compared to Egyptian Law 48/1982 limits for El Rahawy Drain, Sabal Drain, El Tahrir Drain, Zawya El Bahr Drain, and Tala Drain, respectively. In Scenario No.1, the increase in discharges influencing water quality parameters by various rations varies from 10% to 50%, and the statistics indicate each parameter for each drain. In Scenario No.2, the increase in discharges and the water's treatment at the drains improves the water's efficiency by varying percentages between 35% and 50%.

Statistical analyzes to study the relationship between discharges and ammonia concentration by simple regression calculations results
It found that the ammonia concentration values exceeded the limits allowed in Law No. 48 the year 1982. Figure 22 shows Ammonia Concentration (mg/l) along Rosetta Branch at 16-02-2008, Figure 23 shows Ammonia Concentration

treatment plant intake, (B) Salt and Soda Outfall, and (C) El Malaya El Senayea Outfall
period of the Rosetta Branch has a significant impact on increasing the concentration of ammonia. It is clear that the ammonia concentrations differ from one location to another, and they gradually decrease with the increased discarding of water on Rosetta Branch. The quantities of water start to increase during the period from February 13, 2004, to February 20, 2004, then the amounts of water returned along with the Branch fix during the period from February 20, 2004, to February 28, 2004, which is the period of measurements but Ammonia concentrations exceed the permissible limits as well.

Simulate ammonia after all sources of pollution on Rosetta Branch
Nitrogen compounds are considered one of the most challenging organic compounds in the simulation due to the easy conversion of nitrogen images from one image to another according to the prevailing chemical, natural conditions. The simulation method helps collect the total loads of ammonia from the various sources along the Branch and the loads added by river water from the Rosetta Branch.

Ammonia concentration*Discharge = Ammonia Load
The ammonia concentration simulated after all pollution sources through two core scenarios. The worst scenario In this Scenario, ammonia is simulated according to the highest concentrations of ammonia from various pollution sources along the Rosetta Branch, and the minor discharge reaches Rosetta Branch ( Table 6).

The best Scenario
In this Scenario, ammonia is simulated after all sources of pollution on the Rosetta Branch with the lowest concentrations of ammonia from various pollution sources with the highest behavior of those sources with the most significant discharge reaches Rosetta Branch ( Table 6).
The simulation results showed the following values. Figure 26

CONCLUSIONS
• From evaluating water quality in the Branch, it concluded that the main water quality problem in the Branch is cumulative of ammonia and Biological Ox-  , the increase in discharges, and the water recovery at the drains improve Rosetta Branch's water quality from (35-50) %. In Scenario No. 3 increase the discharges through the Rosetta branch from (20-50 Mm 3 /day) and the treatment of the drains by various ratios from (50-75 %) of treatment, the increase in the discharges and the recovery of the water at the drains improves water quality of Rosetta Branch from (50-85 %). • Treatment of the Rosetta Branch is essential to improve all its drains' condition instead of treating each drain individually and considering the cost of treatment and considering when applying each of the above scenarios. • There is an inverse relationship between discharge on Rosetta Branch and ammonia concentrations. All relationships have a correlation coefficient of, on average, of about 0.7.

RECOMMENDATIONS
• In this study, the cost values are considered similar for all sites. It is suggested to re-estimate these values amongst locations that contain the space dimension in the optimization problem. Also, time should be considered as we used the average value for each year. • Periodical inspection must carry out to discover any discharge of wastes above the law's limits. • Health education programs should be implemented with the farmers. Rigid rules and guidelines should be followed if there is a breach of the legislation.

ACKNOWLEDGMENTS
The corresponding author expresses her appreciation to Prof. Tarik Tawfic, former director of the Central Environmental Quality Monitoring Laboratory, Ministry of Water Resources and Irrigation, Cairo, who moderated this paper and significantly strengthened the manuscript. She is also extremely appreciative of professors at the National Water Research Center in Cairo to clarify the manuscript's earlier edition. However, all mistakes are her own and do not tarnish the credibility of these respected experts. The corresponding author submits that there is no conflict of interest. This study did not obtain any significant grants from public, private, or non-profit funding organizations.

FUNDING INFORMATION
The corresponding author states that there is no conflict of interest. This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.