Performance of temperature changes and dosage for enhancement of nitrogen and phosphorus removal from wastewater: A comparative study

The development in Iraq, in addition to the increase in the population and the increase in the standard of living, has led to a marked increase in the demand for water, as the shortage of fresh water resources has become a problem that concerns specialists and decision-makers as it affects the water deficit, especially in the provision of drinking water (the basis of life) in addition to other requirements such as agriculture. Which led to the search for other possible solutions available. One of these solutions is the reuse of treated wastewater in agriculture or any other uses to save fresh water and expand agricultural areas after removing high concentrations of nutrients such as nitrogen and phosphorous. The aim of the study is to improve the performance of the treatment method used by the sewage treatment plant to achieve the removal of nutrients from the treated water. The dual use of a biological treatment and chemical precipitation process to remove phosphorous compounds from wastewater was studied. To avoid instability in the biological treatment method due to temperature changes during the year, especially in the summer. The obtained wastewater treatment plant validation was verified by applying the existing plant planning in GPS-X 8.0 modeling and simulation software, by combining biological and chemical removal methods to improve the performance of a wastewater treatment plant in Khairy in Al Diwaniyah, Iraq (KWWTP). The results showed that a series of conditions for anaerobic, oxygen and aerobic reactors help to remove biological nutrients efficiently. The concentration of COD, BOD and TSS were below the permissible environmental parameters. The removal rate of nitrogen as N-NH3 is 92.96; 94.93; 97.60% respectively. The phosphorous removal rate is 80.22, 86.55, 92.30 respectively Except for the release of nitrogen and phosphorous compounds during the summer (July and August) due to the sensitivity of phosphorous-containing organisms to the influence of temperature. The increasing concentrations of phosphorous produced in the summer were treated by adding doses of chemicals (alum) at different stages of the wastewater treatment plant, and the required dose of Alum ranges in the range of 0.5-0.9 kgAl / kg P, according to the dose strategy that achieves the highest efficiency of the KWWTP.


Introduction
Achieving water security and providing its requirements does not mean only planning to invest and develop available water resources, exploiting surface and ground water and determining their sources. Rather, new unconventional water resources should be sought in view of the current scarcity and the possibility of increasing them in the future, especially since most of the sources of the Tigris and Euphrates and their tributaries are outside the control of Iraq, which does not give them. Characteristic of safe national wealth. Iraq's climate is arid or semi-arid. It has implemented from Iraq renewable water sources for many decades, meaning that it may not be able to meet its nutritional requirements from the freshwater sources available within its borders [1]. As a result of the many challenges facing the Iraqi water resources, the top priority should be given to the issue of rationalizing the consumption of local water resources on the one hand, and finding other sources and alternatives and developing them when developing the national security strategy on the other hand. The necessity to treat and recycle sewage and municipal wastewater resulting from various household uses [2]. The presence of the technologies necessary to conduct treatment makes non-conventional water an important source in providing water suitable for multiple uses, including agriculture and irrigation, after conducting treatments in accordance with environmental controls and legal legislation [3]. According to the reports of the Iraqi Ministry of Environment, the number of drainage stations for wastewater for the whole of Iraq reaches 314 pumping stations for drainage only, without treatment of wastewater coming to it [4]. In Al Diwaniyah, there are two sewage treatment plants (the sewage treatment project in Khairy and the expansion of the main sewage treatment plant in the Khairy area, south of Al Diwaniyah governorate). The estimated amount of wastewater generated in Al Diwaniyah alone is 125,000 m 3 /day, part of which is discharged to the sewage networks, and the largest part of it is discharged to water sources such as the Al Diwaniyah River without treatment. In total, the total amount of treated wastewater per month is about 70,000 m 3 /year. The treatment is carried out in different ways (primary, secondary, biological, activated sludge, aerobic and anaerobic oxidation ditch) [5]. In addition, there are many pumping stations to drain rain water directly into the river without any treatments or partial treatment, noting that most of these stations contain wastewater as a result of random connection of sewage water to the rain networks. The average per capita wastewater generation in Al Diwaniyah is 250 liters/person/day [6]. The management of wastewater in Iraq is generally inefficient due to the suffering of the existing stations in Baghdad and the governorates, including the various Al Diwaniyah institutions, the lack of maintenance operations, the inefficiency of the treatment units and their lack of chemical treatment. Part of the wastewater is discharged to water sources directly and without treatment, as the amount of water received by the station is greater than its design capacity. Sewage water is considered one of the most important sources of pollution of water resources in Iraq due to the content of various pollutants of a biological and chemical nature, especially nitrogen and phosphorous contamination [7]. The total capacity for wastewater treatment is very weak in Iraq compared to the amount of drinking water currently produced and required in the future in light of the expected increase in the population and the improvement in the health situation. It is expected that the amount of wastewater generated in the future will be 6.4 billion m 3 , which is a large amount that should be used [8]. One of the objectives of this study is that in the near future, the water of the Tigris and Euphrates rivers and their tributaries will be provided and allocated as much as possible for drinking and agricultural purposes, and treated sewage water will be used instead for industrial purposes, especially oil, as well as in feeding the marshes and municipal purposes (irrigation of gardens, and so on) and irrigation of trees, forests and green belts around the cities [9]. There are many benefits to wastewater reuse. The environmental benefits include reduced pollution of water resources and sensitive receiving bodies, and control of salt water intrusion through groundwater recharge. The reuse of wastewater also provides an economic value by providing additional noticeable amounts of water and contributing to the conservation of freshwater sources. In addition, it provides nutrient-rich water for irrigation and reduces the need for chemical fertilizers [10]. In Iraq, polluted wastewater sources increase in their rates as a result of population increase and agricultural expansion, and these wastes are disposed of without treatment or after primary, secondary or advanced treatment in water bodies, and these pollutants return to the environment in all that is in them. The main factor after that is that fresh water sources affected by pollution are excluded from safe water sources and this means a reduction in fresh water sources due to pollution, and this comes at a time when the problem of water scarcity has begun to impose itself in the cities of Iraq [4]. In this study, the effect of an annual temperature change on the performance of a wastewater treatment plant in the village of Khairy, south of Al Diwaniyah, Iraq (its effect on the efficiency of the plant in removing nitrogen and phosphorus for the purpose of reuse of treated water in irrigation) was studied, as well as improvements in the plant in proportion With the change in temperature [11]. In hot and extremely hot regions such as central and southern Iraq, the effect of temperature on the age of the sludge and the productivity of solids is significant. Water temperature is an important parameter due to its effect on chemical and biological reactions and reaction rates, as well as on aquatic organisms. The solubility of oxygen is less in warm water than in cold water. The increase in the rates of biochemical reactions with the increase in temperature, which accompanies the decrease in the concentration of dissolved oxygen also as the temperature increases, can lead to depletion of dissolved oxygen in surface waters during the summer months, which leads to the death of organisms. The ideal temperature for the activity of living organisms ranges from 25-35 C 0 and air and nitration digestion stops if the temperature reaches C050 and methane production bacteria become inactive if the temperature drops to 15 C 0 and all the functions of self-feeding or nitrifying bacteria stop at 5 C 0 and at 2 C 0 the bacteria become self-feeding that by oxidizing the dormant organic carbon [12]. Wastewater treatment includes a set of natural, chemical and biological processes to remove solids, organic matter and microorganisms or reduce them to an acceptable degree, and these procedures include removing some nutrients with high concentrations such as phosphorous and nitrogen present in those waters. Biological removal of nutrients refers to the biological processes by which the concentration of both nitrogen and phosphorous in treated wastewater can be removed or reduced [13] . Biological treatment processes require the presence of elements such as nitrogen and phosphorous in liquid wastes, and these elements are already present in domestic wastewater in sufficient concentrations. Drainage of sewage into rivers causes increased fertilizers in the water and increases the growth rates of algae and other microorganisms. Here we will detail the foundations upon which this process is built and then apply these foundations in a practical way by modelling the wastewater treatment plant in Khairy (KWWTP) and explaining how this process is actually done. There is NH3 ammonia in the free image in equilibrium with the ammonium ion NH4 + in raw wastewater and the concentrations of ammonia and ammonium vary according to temperature. [14], and [15]. Domestic wastewater contains phosphorous in faeces and in industrial detergents, which have begun to restrict environmental laws to their use. Also, rainwater that falls on agricultural lands and reaches water bodies contains phosphorus from fertilizer residues, including nitrogen and potassium, and these elements help the growth of algae and some Aquatic organisms that cause the taste and smell of water and reduce the dissolved oxygen in water bodies [16] and [17]. As a result of water scarcity in the central and southern regions of Iraq and the increasing consumption of water for drinking, agriculture and public uses. Therefore, since 2009, a trend in Iraq has been to design or develop treatment plants to make the resulting water suitable for agriculture by adding a system for removing nitrogen and phosphorus to all treatment plants. From this standpoint, the KWWTP, south of Al Diwaniyah, Iraq, was designed, implemented and operated with the removal of nitrogen and phosphorous technology. In addition, samples of physical and chemical pollutants of incoming and treated water were taken during a year in 2019. Therefore, this study aims to evaluate and improve the performance of nitrogen and phosphorous removal units and to make the treated water conform to the specifications of the General Directorate of Water and Sewage, as well as the effect of changing temperatures on the efficiency of the system and to determine the optimal concentrations of alum for disposal excess phosphorous in the summer.

Description of KWWTP
The KWWTP works with the extended aeration method of activated sludge and is designed with a carousel system. The design is according to the German Code for Wastewater Treatment Plants for the ATV-DVWK-A 131E-2000 Single Stage Activated Sludge Treatment Process. The KWWTP was commissioned in January 2019, which is located in the south of the city of Al Diwaniyah (Figure 1). This project contributes to a great service to the people of the governorate in general, because it serves about 100,000 inhabitations and treats an amount of 22,000 m 3 /day of wastewater. The Location of KWWTP in South of Al Diwaniyah in Iraq. The Wastewater type is Municipal. The Water line are Screening, Degrit/Desanding, Biological treatment, Secondary Settling, and Disinfection. The Biological process is Enhanced biological nutrients removal, and Sludge line is Sludge holding tanks, and Drying system. The design specifications of the KWWTP can be summarized as shown in Table 1. In this research, the design of the approved process to achieve the removal of phosphorous and nitrogen from treated wastewater and the effect of annual changes in the temperature affecting were described .    The KWWTP was designed with the carousel system, which is the development of oxidation ditches, including the traditional carousel and the carousel 2000, the latter is used in the KWWTP and the extended aeration method of the carousel system. The elongated aeration are oval-shaped basins divided from the inside into channels. The current KWWTP has two basins in each channel, with a total of 4 channels. So that the flow of the liquid mixture around these channels and the basins were provided with air blowers to ensure the process of aeration and mixing so that the available dissolved oxygen is 2-3 mg/l. The components of the KWWTP can be summarized as follows ( Figure 2): • The downstream (collection chamber) is equipped to receive tanks for draining water from homes, and it has its workers trained to measure the pH of the incoming water to the KWWTP as well as the total dissolved salts, so that violating tanks that may pour water with different specifications affecting the treatment process in the plant, such as industrial detergents, oils, grease and blood can be controlled. From slaughterhouses and various industrial wastes, heavy metals and others. Note that this downstream is the same used for the old project that was commissioned in 1984. • Then the wastewater flows from the collection chamber to the lifting pump station by means of a sewer pipe with a diameter of 1000 mm. And at the entrance to the lift pumping station are coarse mechanical screens. The number of pumps in the lifting station is 3 pumps, each capacity is 10,000 m3/day. The wastewater is discharged into a sand removal unit, a grease and oil removal unit, and a grit chamber. Its entrance has been fitted with spacious refineries and narrow or fine strainers (screen) to maintain the mechanical equipment of the project. • Selector basin to control the proportion of filaments and act as an anaerobic basin. anaerobic zone, as there are three types of selection basins aerobic, anoxic anaerobic, and anaerobic. The basin was designed to act as an anaerobic zone, which receives the raw water coming to the KWWTP from the inlet, which is mixed with the waste sludge, and thus the nematodes are exposed to a high percentage of M / F, the size of the basin helps to control the rate of nematode growth. It also increases the area of the anaerobic zone that is used to grow phosphorous bacteria, which improves the phosphorous removal process. • Phosphorous removal basin, anaerobic area to remove phosphorous, and its purpose is to provide the environment for the development of Achinitobacter, which works by collecting phosphorous to remove it. • Carousel system oval aeration basins are equipped with diffusers for compressed air to provide the oxygen needed for the treatment process, and mixers that keep the MLSS fermented mixture suspended from the active sludge. The chance of bacteria coming into contact with organic and inorganic materials to be treated in wastewater increases the chance. Basin No. 3 has also been equipped with recycling pumps for the fermented mixture to the anoxic zone in Basin No. 1, which is in the middle of the second and third basins to complete the nitrogen removal process, in which the second stage, which is called denitrification, is completed, and it consists of four pumps. • In the case of simultaneous denitrification, the basins are to be operated in parallel, with each basin having an aerobic zone and an anoxic zone. In the case of pre-denitrification, the basins are run in series, so that basin No. 1 uses the distribution basin as an anoxic zone, and basins No. 2 and 3 are used as an aerobic zone. Thus, the flow of water is continuous from basin no. 1 to no. 2 to no. 3 respectively . • A dissolved oxygen meter is installed at the end of each basin. An air pressure control valve has also been installed for each basin, to control the air pressure that exudes to the basins, so that the dissolved oxygen meter controls the opening, closing, or reduction of the amount of air that is pushed out of these valves according to the dissolved oxygen concentration on which the dissolved oxygen meter is set. It is 2-3 mg / L. Thus the air blower used in the process will operate so that the air pressure in its airline remains at a constant pressure that achieves this ratio of dissolved oxygen concentration. In the control system, the operation method for the denitrification process can be chosen, whether simultaneous or prior, but it must be taken into account that the dissolved oxygen reading of the three dissolved oxygen measuring devices must all be taken into account in the case of simultaneous denitrification, because the basins work in parallel and each basin is considered As for the pre-denitrification method, it is sufficient to take a reading of the devices on Basins 2 and 3 only because they work as an aerobic zone while basin 1 is an anoxic zone.
• Final sedimentation basins to separate the sludge from the silting water after treatment with aeration ponds. And they are 2 basins, each with a diameter of 20 m, the height of the water in the basin is 4.25 m, and the slope of the bottom is 1/12. • A building of air blowers with 4 air blowers, each of which has a capacity of 11,000 m 3 of air that provides the oxygen needed for bacterial activity to remove organic carbon, ammonia and nitrite oxidation, the nitrification process. • Pressing belts unit to reduce the volume of sludge produced from sedimentation basins. In other words, increasing the percentage of solids in the sludge, or in other words, reducing the percentage of moisture in the produced sludge, and it is fed from the excess sludge collection tank, which is 2 squeeze belts. It also has a polymer solution preparation unit, polymer injection pumps, and pressure pumps feeding the sludge to be dewatering. • The dryer to further reduce the volume of sludge produced after the compressive belt process and reduce the microbial percentage in the sludge to a minimum to preserve the environment in which the sludge will be buried or if it is used as agricultural soil. • UV disinfection unit to eliminate bacteria, parasites and viruses present in the treated water.
And liquid chlorination unit to leave a percentage of free chlorine to secure the water from the rapid growth of injury bacteria and is used in the case of emergency if there is maintenance of the UV units. • The return sludge pump station, which consists of 2 submersible pumps of 416 m 3 /hour, and the excess sludge pumps, which are 3 pumps, each with a capacity of 50 m3/hour. The pumps for pumping the final product into the product tank, which are 6 pumps, are located on the Al Diwaniyah River for the use and purposes of irrigation of trees and farms in the area of the village of Khairy, south of the city of Al Diwaniyah.

Physical and Chemical Sample Collections and Analysis
To study the optimal physical and chemical evaluation of treated wastewater. Wastewater samples were collected from the KWWTP to assess the quality of the wastewater physically and chemically treated. By taking samples during January to December 2019 from the effluent KWWTP, periodically, at the rate of one sample per week and over a whole year. The Iraqi standard criteria for the quality of treated wastewater are adopted in determining the chemical properties of the wastewater. Which included measuring the determination of nitrate, total phosphorous, and physical properties, which included measurement of BOD, COD, and TSS.
The tests were performed in the laboratories of the Al Diwaniyah Environment Directorate, according to the standard examination method [18]. The results indicated an increase in the values of the studied characteristics (nitrogen and phosphorous) in the drainage to the river, which has negative effects on public health, as the study showed that the wastewater contains ions of environmental risk such as nitrate, ammonium and phosphorous ions. Where it was higher than the permissible limits, as the average concentration of nitrate, ammonium and phosphorous ions reached 15.0, 21.2 and 6.2 mg.L -1 , respectively, i.e. higher than the permissible limit ( Table 2) . The results indicated in Table 2 that the average pH values of the treated wastewater samples are 7.51. The reason for this may be attributed to the possibility of the presence and dominance of some acids such as carbonic acid, fulvic acid, humic and citric acids and others dissolved in wastewater as a result of the decomposition of rapidly dissolving organic matter. The results of Table 2 showed that the monthly changes in the characteristics of treated wastewater in the city of Al-Diwaniyah indicated that there were significant differences between the pH values in the in the month of November, while the lowest values of the degree of reaction were 7.13 in the month of July. The reason for this may be attributed to the increase in the amount of water used in homes during hot periods compared to cold climates that lead to a decrease in the pH values of water. The pH values of the water samples are similar at the study sites and in the light alkaline direction. These results agree with the findings of many researchers such as [19] who found that the pH values of wastewater ranges between 7.5-8.3 for the study area and it is within the permissible limits for wastewater ranging between 6-9. The results shown in Table 2 indicated that the nitrate ion concentration during the sampling period from the treated water ranged between 11.7 mg.L -1 in June to 18.5 mg.L -1 in January, with an average of 15.0 mg.L -1 . The ammonium ion concentration in the water samples of the plant's outdoor basin ranged between 14.5 mg.L -1 in April and 30.1 mg.L -1 in February, with an average of 21.2 mg.L -1 , the monthly changes in the concentrations of these ions had a significant difference at the probability level of 5%. This monthly variation in the concentrations of ammonium and nitrate ions in the wastewater under study is due to the high values of these ions above the minimum limits that must be thrown into the river . . The presence of nitrogenous organic and mineral substances in wastewater resulting from social, health and industrial activities, as well as dust and other materials, which may reach the assembly units in the sewage network, is a reason to explain this superiority. Also, the high concentrations of ammonium ions compared to the concentrations of nitrate ions in the waters under study may be related to the abundance of oxygen and its content of organic matter. The results of the statistical analyzes as shown in Table 2 showed that the concentration of the phosphorus ion in the water samples of the plant basin ranged between 4.3 mg.L -1 in February and 8.6 mg.L -1 in April, with an average of 6.4 mg.L -1 . The values of the mineral phosphorus concentrations in the wastewater in the external gate basin were of monthly variables, and there were significant differences at a 5% probability level during the sampling periods, and that all these values have exceeded the lower limits of this element to be thrown into the river. The increase in the phosphorus content in wastewater mainly leads to the growth of algae and the enrichment of the water with plant nutrients. Controlling the release of phosphorus to aquatic plants in the wastewater is the main element in Preventing the phenomenon of water enrichment with plant nutrients for surface waters. The phosphorous in the current study of wastewater is not within the permissible limits in wastewater. It may be due either to the degree of interaction of the pH of the water, which is relatively basic, and this increases the precipitation of phosphorus and its interaction with the dissolved bases in water, especially calcium and magnesium ions, and its deposition in the form of calcium or magnesium phosphate compounds that are less soluble in water, or sometimes in the form of phosphate compounds, a number of heavy elements 2.3. Influent Characteristics of KWWTP GPS-X V8.0 is a multi-purpose modular computer program for modeling and simulating domestic wastewater treatment plants. The improved performance of the treatment plant is not dependent on its increased size and complexity. You can improve capacity, operating efficiency, and effluent quality by properly optimizing your existing facilities. The result is savings in capital and lower operating costs . The KWWTP is designed with the carousel system, so that the organic carbon BOD5 is treated as well as the oxidation of ammonia NH3, the removal of nitrogen and phosphorous in the carousel system and the factors that affect the process and affect and affect each other as well, which are environmental factors such as temperature, dissolved oxygen, pH, etc., and operating parameters such as mixture The mixture of fermented fermentation MLSS, carbon to nitrogen ratio C/N, etc., and operating mode such as HRT hydraulic densification time, SRT residence time, recycling rate, aeration rate and volume ratio. The organic carbon loading is typically in the range of 40-80 gBOD5 /EI/ day in Al Diwaniyah city. Based on the data of inhabitations 100000, flow rate 22000 m 3 .d -1 and 350 mg.L -1 BOD5, a contribution of 76 g.BOD5/EI/day can be estimated. Considering this organic carbon contribution, it is possible to check the average influent characteristics in proportion to this parameter. In this study, SERECO S.r.l. technology was used in the design of nitrogen and phosphorus removal units. Table 3 compares the estimations obtained adopting different sets of load values or using the modelling software GPS-X V8.0. The influent COD should be quite higher than the official data in Iraq (460 mg.L -1 ), therefore a prudential value of 670 mg.L -1 has been assumed for KWWTP design.

Process Design For EBNR and EBPR
The type of biological wastewater treatment process in KWWTP is the activated sludge process . Biological removal of nutrients refers to the biological processes by which the concentration of both nitrogen and phosphorous in treated wastewater can be removed or reduced. The feeding process Eutrophication that occurs after pumping the treated water to the river (without removing the nitrogen and phosphorous) is one of the most important problems as it leads to the growth of algae that consume oxygen, which leads to the death of river life. Phosphorus and nitrogen are among the most important of these nutrients. In this context, phosphorus is considered the most extreme factor to exacerbate this vital phenomenon of nitrogen, as low concentrations of it lead to the occurrence of this vital phenomenon. Activated sludge used was cultivated in a multiple stages enhanced biological nutrient removal (EBNR) process that exhibited high removal efficiency of effective carbon, nitrogen, and phosphorus. Therefore, many techniques are used to remove phosphorous to the lowest possible concentration from wastewater, and one of the most important of these techniques is Enhanced biological phosphorous removal (EBPR), a biological process that relies on the biological activity of 10 bacteria to get rid of phosphorous that has been adopted at a charity plant. Phosphorous can also be removed using chemical precipitants, but in this case the productivity of the sludge is large and the cost is greater. Therefore, it is preferable to use the biological methods and the following forms for some EBPR processes. The nitrogen is present in the form of ammonia and nitrogenous organic compounds and is removed through the nitrification/denitrification process which was applied in the design and implementation of the KWWTP. Ammonia NH3 is present in the free form in equilibrium with ammonium ion NH4 + in raw wastewater, and the concentrations of ammonia and ammonium vary according to temperature. Ammonia is the inorganic form of nitrogen. As for organic nitrogen, it is divided, like organic carbon, into inert compounds and compounds capable of biodegradation. The inert fraction breaks down into soluble compounds, which are few and granular. It binds to non-fracturing organic carbon and is removed with excess sludge. As for the second part, which is bio-cracking, it is divided into fast biocracking compounds, which are soluble and transformed by non-autotrophic bacteria into ammonia and slow biodegradation, and these are slow biodegradable granules that dissolve in conjunction with the organic carbon materials into the dissolved form. And that the active biomass (active sludge) is not autotrophic and the source of organic carbon for the non-self-feeding bacteria in it is dissolved organic carbon and the growth of these bacteria occurs in the aerobic environment or aeration basins where there is molecular oxygen available or in the aerobic area of the anoxic zone or in the anoxic tank. Where the bound oxygen is available in the form of a molecule such as nitrate and its growth is very weak in the anaerobic zone, the non-self-feeding bacteria use nitrogen in the form of ammonia for synthesis (in the aerobic environment (and in the form of nitrates) the anoxic environment. The decomposition of these bacteria produces inert, carbonaceous and nitrogenous organic matter. Also, the active sludge can be self-feeding and it uses carbon dioxide as a source of carbon and ammonia as an energy source, and in aerobic conditions, ammonia is used in the nitrification process. It must be remembered well that we are concerned with denitrification whose concentration is expressed in two ways, either as an ammonia molecule NH4 or as ammonia nitrogen-NH4. The difference between the two is that the molecular weight of the ammonium ion 18 is that of the nitrogen of the ammonium ion 14 and since we are only concerned with nitrogen, the formula of ammonia nitrogen is the most accurate expression of the nitrogen concentration.  In each line at the KWWTP, the presence of a specifically designed anoxic zone will guarantee the presence of sufficient anoxic size and a satisfactory level of denitrification, especially if the aeration intensity can be properly controlled while the horizontal mixers ensure the sludge circulation. For an optimal denitrification process. The presence of readily biodegradable COD is mandatory and can be satisfied by internal or external sources. At KWWTP, the sludge coming from the anaerobic tank (for phosphorus removal) will enter the anoxic zones at the maximum distance from the aerators (Figure 3). In order to favour the utilization of readily biodegradable matter coming with the influent.

Basic KWWTP Design
The biological treatment process is carried out as a result of the vital activity of microorganisms present in wastewater and very simply without details. The bacteria that are present in the activated sludge used in the activated sludge process include autotrophs. They are bacteria that use inorganic carbon as a source of carbon (such as carbon dioxide) in the process of growth and reproduction. An example is the bacteria that oxidizes ammonia to nitrites in the first step of the nitrification process. The growth rate of this bacterium is fast and it uses molecular oxygen as a final or final acquisition of electrons in its reactions, and thus it can also be said that it is an aerobic bacterium that is only activated in the presence of molecular oxygen. An example of it is also (nitrobacter bacteria), which is responsible for the second step in the nitrification process, where nitrite is oxidized to nitrate in the presence of molecular oxygen as well, but it is slow-growing, unlike the previous one and requires a long time for growth and reproduction. The reaction in this case is the reaction of aerobic and bacteria with aerobic bacteria, as well as the environment called aerobic or oxic, meaning that the basin in which this process takes place in its two parts is the aeration basins and the removal of organic carbon from the wastewater carbonaceous biochemical oxygen demand (CBOD) bacteria that perform the process of nitrate reduction and nitrogen removal in the denitrification process . It is the complementary process to nitrification to remove nitrogen from wastewater. The reaction is called an anaerobic reaction if it takes place in the absence of molecular oxygen as this bacteria is used and grown in an anoxic environment. The anaerobic environment is divided into two anaerobic parts that do not have molecular oxygen O2 but have compounds that contain oxygen such as nitrate NO3 and are called the anoxic zone, and the second anaerobic environment does not contain molecular oxygen nor compounds that contain oxygen and is called the anaerobic zone. The anoxic zone is provided, by locking the valves The air in Basin No. 1 in a completely KWWTP and making the basin an anaerobic area in the event of prior nitrification, or operating a channel from each basin as an air area and the second channel as an anaerobic area in the event of simultaneous nitrification. This is to allow the nonautotrophic bacteria to reduce oxygen-containing compounds and in the absence of molecular oxygen such as nitrates, and thus the process of denitrification and denitrification occurs. Where nitrates are reduced to molecular nitrogen that does not dissolve in water and rises as a gas into the atmosphere. While the anaerobic environment is provided for the development of Acinetobacter and other taxa responsible for phosphorous synthesis, disposal, and removal. Examples of phosphorous-accumulating bacteria are also acumulibacter, microlunatus, phosphovorus, lamprophagedia, trilletasphera japonica, aqurobhagobacterium, trilletasphera japonica, agrobacterium. Once the influencing properties and the desired mixed liquid concentration have been fixed, a minimal SRT and sludge production estimate (depending on the kinetics of the activated sludge model) results in an estimate of the size of the aerated and anaerobic tanks. KWWTP performance has been designed and improved through the use of GPS-X 8.0 modeling and simulation software. The GPS-X 8.0 has been used to simulate and verify process performance under conditions of minimum temperature, peak loading and typical fluctuations in these parameters. Table 4 includes a summary of the proposed design results for the processing unit .

Simulations and Validations Using GPS-X 8.0
In the design of KWWTP, sludge digestion was targeted within the aeration basins and dispensed with primary sedimentation ponds and digesters. The design was also designed with the aim of removing nutrients (nitrogen and phosphorous), meaning that the life of the sludge must be sufficient and allow the growth of nitrifying and reverse nitrification bacteria (nitrosomonas and nitrobacter) in addition to antenna fixation of the sludge in the aeration basin. By using GPS-X 8.0 modeling and simulation software, the effect of temperature change on the concentrations of COD, BOD5 and TSS was studied. As well as phosphorus and nitrogen concentrations for 10 days, in addition to laboratory measurements of the KWWTP, to evaluate its performance and improve its performance. Daily flow variations have been simulated according to typical flow rate profiles for domestic sewers [20]. Daily flow rate variations for 10 days of operation have been shown in Figure 4. In Figure 5, the change in the concentration of each of the treated COD, BOD5 and TSS with the change in the daily temperature and the average wastewater temperature of 16 ° C, where all the values were less than the required design limits. In Figure 6, the change in the concentration of phosphorus, ammonium nitrate with the change in daily temperatures and the average wastewater temperature 16 ° C, where all the treated water values were less than the required design limits shown in Table 1.    The metabolism of bacteria is affected to a large degree by temperature, and thus the oxidation rates of carbon and nitrogenous compounds are affected. In general, the speed of biochemical reactions increases with an increase in temperature within certain limits and above these limits, it decreases due to the breakdown of the enzymes responsible for activating these reactions [21].  Temperature not only affects the metabolism activities of living organisms but also has a significant effect on gas transfer rates and sedimentation properties of biosolids. Temperature has a great influence on the reproduction of microorganisms, so it is preferable to start at temperatures not lower than 20 ° C. Since the Governorate of Al Diwaniyah is moderately hot in winter and hot in summer, there will be no problem in starting operation at any time during the year [23], [24], and [25]. The temperature affects all the factors through which the treatment process can be controlled, for example in cold weather or during the winter season if the operator stays at the same rate of sludge graduation that he used to do in the summer, this will lead to a decrease in the amount of living organisms in the system (rate The growth of living organisms decreases as the temperature decreases. Consequently, the amount of living organisms, or in other words, the solid stock of organic materials  16 in aeration basins or activated sludge is insufficient to treat the COD. Nor is the ammonia entering the plant, and thus the sludge discharge rate must be reduced in order to prolong the mean cell residence time (MCRT), forming the amount of organisms or increasing the concentration of MLSS and thus the concentration of MLVSS. The temperature affects the rate of ammonia oxidation. It has been found that the best temperature for ammonia oxidation bacteria is 30 ° C. The temperature also affects the N2O emission enzymes. In activated sludge treatment by the extended aeration method, the life of the sludge is greater than 25 days if the temperatures are below 12 ° C. However, the life of the sludge can be reduced if the temperatures during two consecutive weeks are greater than 12 ° C according to German specifications. Since the lowest temperature prevailing during the year in the city of Al Diwaniyah is 27 ° C and the highest temperature during the summer reaches 32 ° C, the sludge age is designed at a temperature of 27 ° C. In Figure 7, a change in air and wastewater temperatures during a year in Al-Diwaniyah city is depicted. For the purpose of determining average temperatures in the four seasons of the year and their effect on wastewater treatment efficiency. And the effect of changing wastewater temperatures on the efficiency of the treatment plant in removing nitrogen and phosphorus for the purpose of water reuse in agriculture. As shown in the Figure 8, increasing temperature in summer time (July and August) lead to a considerable release of phosphorus in the effluent. That can be ascribed to a certain instability of the biological process for the removal of phosphorus in the water line, as well as to the increased phosphorus release from the thickening. Possible action to reduce the phosphorus content in the effluent are discussed in the next section. The other parameters (effluent contaminants concentrations (BOD5, COD, and TSS)) remain below the required limits all over the year (Figure 9).

Suggested options for controlling phosphorous flow
The rise in summer temperatures in Iraq causes instability of biological P removal also if a dose of chemicals is added to the sludge line. In this case, the added chemical doses before the secondary photographer will allow to control the flow of the P-concentration while keeping the costs of the chemical additions as low as possible (the chemical dose will only run when needed, i.e. if biological removal is not sufficient). To ensure maximum flexibility in operating the KWWTP, direct chemical doses are required on both water and sludge lines. According to results, the required dose of alum ranges in the range of 0.5-0.9 kgAl/kgPinfluent, depending on the dose strategy. This corresponds to about 5-10 kgalum.kg -1 of liquid matter and a molar ratio of 0.6-1. These results are below standardized values from 1.25-1.50 approved to obtain 74.5% of P-removal without biological removal (Metcalf 2003), and this difference can be attributed to the biological removal of phosphorous. The added dose will lead to consumption of 1000-2000 kgalum.day -1 in the summer in Iraq (for 100 days) against a total annual consumption of around 100-200 ton alum/year. Because low doses of alum (less than 1), it can be assumed that most of the narcotic metal will precipitate as aluminum phosphate, resulting in the production of 4.5 kg of calcium.kg -1 /thousand. This leads to increased sludge production estimated at 405-455 kg.day -1 in summer. That is, an increase of approximately 5-12% in relation to the average secondary sludge production. However, this is usually compensated by reducing the production of biological sludge due to the high summer temperatures in Iraq and will not affect the correct processes for treating sludge and the secondary clarifier. When the ratio of the size of the anaerobic zone to the aerobic zone is (0.35: 0.49: 0.64), the removal rate of nitrogen as N-NH3 is 92.96; 94.93%; 97.60% respectively. The P removal rate is 80.22, 86.55, 92.30 respectively. Also, the rate of organic carbon removal, expressed by COD, is more than 90% at the average of the three concentrations, as well as the greater the ratio of the size of the anoxic zone to the volume of the aerobic zone, the recycling must be adjusted, otherwise the nitrate concentration will be insufficient in the anoxic zone. zone, which causes phosphorus to be removed from the bacteria that collected it again. The mixture of raw water with return sludge passes to the second part of anaerobic ponds. It is a basin for the development of phosphate-group bacteria, which are used to remove phosphorous by combining it through a series of biological chemical reactions. Phosphorous represents about 35% of the composition of phosphorous-accumulating bacteria cells. As we said, they are heterotrophic bacteria and have the ability to absorb and store VOCs in an anaerobic environment. Note that most non-autotrophic bacteria cannot absorb and store organic carbon compounds in anaerobic conditions, and therefore when a suitable anaerobic environment is available in which volatile organic acids, acetates and propionates will proliferate and the phosphorous synthesis bacteria prevail over the remaining non-autotrophic bacteria, and then phosphorous removal will be better what can. The phosphate-synthesizing bacteria by feeding on these volatile light compounds and converting them into polymerized compounds such as hydroxybutyrates of greater molecular weight and storing them in their cells, and in order for this storage process to take place, the bacteria need energy. This energy comes from the polyphosphate compounds previously stored in the bacteria cells. While in aeration basins. Where ATP turns into ADP, where you break down these phosphorous compounds and obtain energy, then phosphate is excreted from the cells into the anaerobic environment. Then the bacteria are transferred to the aeration basins with the wastewater mixed with the return sludge, where the bacteria destroy the polymerized compounds, which were previously formed from fatty acids, and break them back into small compounds using the molecular oxygen available in the aeration basins and in this metabolism process. Bacteria need a lot of energy that they take from the phosphorous synthesis from aeration basins and storing phosphorous in the form of compounds called polyphosphates. The formation of high-energy phosphorous bonds by converting Adenosine Diphosphate (ADP) to Adenosine Triphosphate (ATP) in their cells and in much greater quantities than those broken down in the anaerobic basin, then the phosphorous is removed with the excess sludge in the WAS sludge removal process that contains phosphorous-accumulating bacteria that stored phosphorous in their cells and then the phosphate concentration decreases. In highly treated water it may reach less than 1 mg.L -1 dissolved phosphorous or orthophosphate. Table 5 shows the improvement of the performance of the water produced from a KWWTP according to the designs implemented and according to the representation using GPS-X 8.0 modelling and simulation software. The values in the Table 5 indicate that, after the improvements represented by the addition of chemical materials, the water conforms to the specifications and can be used in irrigation and agriculture .

Conclusion
Use of GPS-X 8.0 modelling and simulation software to evaluate and improve the performance of the KWWTP in addition to field measurements. The effect of change in discharge and changes in temperature on the concentration of BOD, COD, and TSS, as well as on the removal of nitrogen and phosphorous from the treated water, was studied for use in irrigation and agriculture. The results  18 showed that all liquid wastes, COD, BOD5, and TSS are among the Iraqi specifications throughout the year, with the exception of increasing the concentration of phosphorus and ammonium nitrate in the summer due to high temperatures. Therefore it is controlled by adding dosing chemicals (iron or aluminum salts) in different sections of the treatment plant. There was a significant release of phosphorous during the summer (July and August) due to sensitivity to the influence of temperature. Combining Polyphosphate-accumulating organisms (PAOs) with EBPR and removing the chemical process was a favorable option in terms of effluent quality and cost (iron or aluminum salts). and the required dosage of Alum is in the range of 0.5-0.9 kgAl / kg influent, depending on the dosage strategy. Therefore, the resulting water can be recycled and used in irrigation, as it falls within the Iraqi borders for the water used in irrigation.