The term “wastewater treatment facility” (or “sewage treatment business” in some countries) is nowadays replaced by the term wastewater treatment facility or wastewater treatment plant. 
Wastewater can be treated close to where it is formed, which may be called a “decentralized” system or even a “on-site” system (in septic tanks, biological filters or aerobic treatment systems). Alternatively, wastewater can be collected and transported by a network of pipes and pumping stations to the municipal treatment plant. This is called a “central” system.
Sources of waste water
Sewage water is emitted from residential, institutional, commercial and industrial establishments. Sewage water includes household waste water from toilets, bathrooms, showers, kitchens and drains that flow into the sewer. Sanitation also includes, in many areas, liquid wastes from industry and commerce. Separation and disposal of household waste into gray and black water is becoming more and more common in the developed world, as it is allowed to use treated gray water in irrigation plants or to recycle it for flushing toilets.
Mixing sewage water with rain water
Sewage may include run-off rainwater or run-down surface water in urban areas. Sewer systems capable of treating rainstorm water are known as compact sewage systems. This design was popular when urban sewer systems were first developed in the late nineteenth and early twentieth centuries. Compact sewage systems require much larger treatment facilities and are more expensive than separate sewage systems. Large quantities of storm water run-off may flow into the wastewater treatment system, causing a spill or flood. Sewers are usually much smaller than built-in sewers, and they are not designed to carry rainwater. A reserve of raw wastewater may be available if infiltration / overflow (dilution by rainwater and / or groundwater) into the sewage system is permitted.Societies urbanizing in the mid-twentieth century or later in general built separate systems for wastewater (sanitation) and rainwater, because rainfall causes widely varying flows, which reduces the efficiency of the wastewater treatment plant.  (3)
When rainwater runs over surfaces and the ground, it picks up many pollutants including soil particles, other sediments, heavy metals, organic compounds, animal waste, oils and grease. Some jurisdictions require that rainwater receive a treatment stage before it is discharged directly into watercourses. Retention ponds, wet areas, and buried tanks with different types of media filters and vortex separators (to remove coarse solids) are examples of treatment processes used in rainwater. 
waste In developed countries with high regulation, industrial waste usually receives at least pretreatment if not fully treated in the factories themselves to reduce the pollutant load, before it is discharged into the sewer. This process is called industrial wastewater treatment or pretreatment. The same does not apply to many developing countries, as industrial waste is more likely to enter sewage if it is present, or even to receive water from a water body, without prior treatment. Industrial wastewater may contain pollutants that cannot be removed by conventional wastewater treatment. Also, the variable flow of industrial waste associated with production cycles may impede the dynamics of biological treatment units of population drainage, such as the activated sludge process.
Sewage collection and treatment in the United States is subject to local, state, and federal regulations and standards. Wastewater treatment aims to produce wastewater that will cause the least possible damage when discharged into the surrounding environment, thus preventing pollution compared to the release of untreated wastewater into the environment. Wastewater treatment generally includes three stages called primary, secondary and tertiary treatment. 
- The primary treatment consists of a stage of temporarily holding wastewater in a laying basin where the heavy solid can settle to the bottom, while the oil, grease and lighter solids float to the surface. The settling and floating materials are removed and the remaining liquid can be emptied or subjected to secondary treatment. Some sewage treatment plants connected to a common sewage system have a lateral arrangement after the primary treatment unit. This means that during heavy rains, secondary and tertiary treatment systems can be bypassed to protect them from hydraulic overload, and the wastewater and rainwater mixture receives only the primary treatment.
- Secondary treatment removes dissolved and suspended biological materials. Secondary treatment is usually done by native waterborne microorganisms in managed habitats. Secondary treatment may require a separation process to remove microorganisms from the treated water prior to draining or advanced treatment.
- Tertiary treatment is sometimes known as any treatment over primary and secondary treatment, performed in order to allow water to drain into a very sensitive or fragile ecosystem (estuaries, low flow rivers, coral reefs …). Sometimes chemically or physically treated water (for example, by lakes and microfiltration) is purified before being discharged into a stream, river, bay, lagoon, or wet area, or it can be used to irrigate a golf course, green path, or garden. It can also be used for groundwater recharge or for agricultural purposes if disinfected enough.
Pre-treatment removes all materials that can be easily collected from raw sewage before they damage or clog the pumps and sewage lines of the pretreatment purifiers. Items commonly removed during processing include waste, tree branches, leaves, branches, and other large items. (6)
Sewage passes through barricades that have been implemented into the sewer streams to remove all large objects such as cans, rags, sticks, plastic parts, etc. This is more commonly done with automated automatic bar barriers in modern stations serving large numbers of residents, while in smaller or less modern stations, manually cleaned bulkheads can be used. The frequency of the mechanical barrier cleaning process is usually measured according to the buildup to the barricade and / or the flow rate. Solids are collected and later disposed of in landfills or incinerated. Bar barriers or gratings of different sizes can be used to improve the removal of solids. If the aggregate solids are not removed, they get stuck in the pipes and moving parts of the treatment plant, and can cause significant damage and inefficiency in the treatment process. 
Removing coarse grit
Coarse grains consist of sand, gravel, ash, and other heavy materials. It also includes organic materials such as eggshell, bone chips, seeds and ground coffee seeds. Pre-treatment may include a conduit for coarse-grained, sand, or gravel, wherein the velocity of incoming wastewater is adjusted to allow settlement of sand and gravel. Gravel removal is necessary (1) to reduce the formation of heavy deposits in aeration tanks, aerobic digester basins, drain lines, ducts and ducts; (2) reduce the frequency of sludge cleaning caused by excessive accumulation of coarse particles, (3) and protect the moving mechanical equipment from abrasion and corrosion associated with the abnormal process. Coarse grit removal is essential to the safety of equipment with finely crafted metal surfaces, such as small plants, fine baffles, centrifuges, heat exchangers, and high pressure diaphragm pumps. Gravel chambers are created in three types:Horizontal gravel chambers, pneumatic gravel chambers, and rotating gravel chambers. Rotary-type gravel chambers include mechanically induced vortex, hydraulically induced vortex, and multi-layer vortex separators. Given the conventional type, grit removal systems are designed to remove clean inorganic particles larger than 0.210 millimeters (0.0083 inch). Most of the gravel passes through flow devices designed to remove gravel under normal conditions. During periods of high flow of suspended gravel, the gravel that reaches the treatment plant is severely suspended. Therefore, it is important for the gravel removal system to operate efficiently not only during normal flow conditions but also under sustainable peak flows when the largest amount of gravel has reached the plant. Given the conventional type, grit removal systems are designed to remove clean inorganic particles larger than 0.210 millimeters (0.0083 inch). Most of the gravel passes through flow devices designed to remove gravel under normal conditions. During periods of high flow of suspended gravel, the gravel that reaches the treatment plant is severely suspended. Therefore, it is important for the gravel removal system to operate efficiently not only during normal flow conditions but also under sustainable peak flows when the largest amount of gravel has reached the plant. Given the conventional type, grit removal systems are designed to remove clean inorganic particles larger than 0.210 millimeters (0.0083 inch). Most of the gravel passes through flow devices designed to remove gravel under normal conditions. During periods of high flow of suspended gravel, the gravel that reaches the treatment plant is severely suspended. Therefore, it is important for the gravel removal system to operate efficiently not only during normal flow conditions but also under sustainable peak flows when the largest amount of gravel has reached the plant. Therefore, it is important for the gravel removal system to operate efficiently not only during normal flow conditions but also under sustainable peak flows when the largest amount of gravel has reached the plant. Therefore, it is important for the gravel removal system to operate efficiently not only during normal flow conditions but also under sustainable peak flows when the largest amount of gravel has reached the plant. 
Sources of waste water
There are many sources of sanitation, there are household drainage, industrial drainage, commercial drainage, rainwater drainage, and leachate water (for lowering the groundwater level) etc. Drainage is mainly composed of liquid organic matter from bathrooms, kitchens, and sinks, which is disposed of via pipelines. Also, in many areas, wastewater also includes liquid wastes from factories, hospitals and restaurants, and these wastes have a negative impact on the treatment process.
The treatment has three main stages, called the primary stage, the secondary stage and the triple stage. First the suspended solids (TSS) are separated from the liquid wastewater, then the dissolved organic materials in the water are transformed into suspended solids gradually by microorganisms that are generated in the water. In the last stage, biological solids (sludge) are disposed of or reused as fertilizers, and the water can then be chemically or physically disinfected. The treated water is then pumped into any stream or river. It can also be used for planting wood forests, golf courses, and parks, and it can also be pumped underground to re-fill the aquifer.
The initial stage
is the removal of materials that hinder operation and maintenance work and that may cause corrosion or blockage of mechanical equipment, as well as disposal of grease, oils and fats by flotation.
The initial treatment stages are
the entrance room (calming down): the main purpose of it is to calm the speed and pressure of the water so that the flow system is changed from closed sewers to open sewers so that the water surface is exposed to atmospheric pressure and air, where the water stays in it for a period of 0.5 to 1 minute, and the speed The water in it is from 0.6 to 1.2 m / s.
takes place in refineries, which are iron networks to trap large-sized suspended materials from paper, pieces of cloth, wood, or pieces of tin glass, and they are disposed of by filling, drying or burning.
The waste water passes through filters before being treated to remove all the solid and floating materials that have entered the wastewater, such as wooden pieces, towels, metal cans, etc. .. The water is filtered from these impurities through automatic or manual filters. Bar filters are used with small spacing, preventing the passage of any large solids that may damage or cause failure of the water treatment equipment afterwards.
Removal of sand and rocks The
process of removing sand and rocks from the initial treatment stages, which is in fact the sedimentation process, whereby wastewater passes through primary sedimentation basins at a relatively slow speed of 30 cm / min. This is for the sedimentation of suspended materials such as dirt, sand and metal pieces. What is known as primary sludge collects at the bottom of the basin. Chemicals may be added to contribute to the sedimentation process, such as alum or iron salts, which are somewhat expensive. The froth, which is scraped off from time to time, floats on the surface.
The treatment also includes the pre-treatment stage to purify and clean the water from rocks and sand by controlling the speed of the wastewater until it reaches a speed that allows the sedimentation of small rocks and sand at the bottom while keeping most of the suspended organic materials in the water course. It is important to remove sand, gravel and small rocks early to avoid damage to the plant equipment, such as pumps, etc. Sometimes there is a so-called “sand washer”, which is followed by a conveyor that transports sand to a place where it can be reused, but often sand and rocks are disposed of by throwing them in a landfill.
In the first sedimentation stage, the drainage is pumped into huge tanks called primary sedimentation tanks. These tanks are large enough that mud and dirty materials settle to the bottom and float materials, grease and oils rise to the surface to be scraped off. The aim of the primary sedimentation process is to produce a generally homogeneous liquid that can then be treated biologically, as well as to extract the waste so that it can then be disposed of or reused. Pre-settling tanks often include a mechanical scraper that continuously expels the dirty material into an opening at the bottom of the tank, where it is pumped to be treated at other stages.