Sewage treatment
Sewage treatment, or domestic wastewater treatment, is the process of removing contaminants from wastewater, both runoff (effluents) and domestic. It includes physical, chemical and biological processes to remove physical, chemical and biological contaminants. Its objective is to produce a waste stream (or treated effluent) and a solid waste or sludge suitable for discharge or reuse back into the environment. This material is often inadvertently contaminated with many toxic organic and inorganic compounds.
Sewage is created by residences, institutions, hospitals and commercial and industrial establishments. 
It can be treated close to where it is created (in septic tanks, biofilters or aerobic treatment systems), or collected and transported via a network of pipes and pump stations to a municipal treatment plant (see sewerage and pipes and infrastructure). Sewage collection and treatment is typically subject to local, state and federal regulations and standards (regulation and controls). Industrial sources of wastewater often require specialized treatment processes (see Industrial wastewater treatment).
Typically, sewage treatment involves three stages, called primary, secondary and tertiary treatment. First, the solids are separated from the wastewater stream. Then dissolved biological matter is progressively converted into a solid mass by using indigenous, water-borne microorganisms. Finally, the biological solids are neutralized then disposed of or re-used, and the treated water may be disinfected chemically or physically (for example by lagoons and micro-filtration). The final effluent can be discharged into a stream, river, bay, lagoon or wetland, or it can be used for the irrigation of a golf course, green way or park. If it is sufficiently clean, it can also be used for groundwater recharge.

# Description
Raw influent (sewage) includes household waste liquid from toilets, baths, showers, kitchens, sinks, and so forth that is disposed of via sewers. In many areas, sewage also includes liquid waste from industry and commerce. 
The draining of household waste into greywater and blackwater is becoming more common in the developed world, with greywater being permitted to be used for watering plants or recycled for flushing toilets. A lot of sewage also includes some surface water from roofs or hard-standing areas. Municipal wastewater therefore includes residential, commercial, and industrial liquid waste discharges, and may include stormwater runoff. Sewage systems capable of handling stormwater are known as combined systems or combined sewers. Such systems are usually avoided since they complicate and thereby reduce the efficiency of sewage treatment plants owing to their seasonality. The variability in flow also leads to often larger than necessary, and subsequently more expensive, treatment facilities. In addition, heavy storms that contribute more flows than the treatment plant can handle may overwhelm the sewage treatment system, causing a spill or overflow (called a combined sewer overflow, or CSO, in the United States). It is preferable to have a separate storm drain system for stormwater in areas that are developed with sewer systems.
As rainfall runs over the surface of roofs and the ground, it may pick up various contaminants including soil particles and other sediment, heavy metals, organic compounds, animal waste, and oil and grease. Some jurisdictions require stormwater to receive some level of treatment before being discharged directly into waterways. Examples of treatment processes used for stormwater include sedimentation basins, wetlands, buried concrete vaults with various kinds of filters, and vortex separators (to remove coarse solids).
The site where the raw wastewater is processed before it is discharged back to the environment is called a wastewater treatment plant (WWTP). The order and types of mechanical, chemical and biological systems that comprise the wastewater treatment plant are typically the same for most developed countries:
- Mechanical treatment
Influx (Influent)
Removal of large objects
Removal of sand and grit
Pre-precipitation
- Influx (Influent)
- Removal of large objects
- Removal of sand and grit
- Pre-precipitation
- Biological treatment
Oxidation bed (oxidizing bed) or aeration system
Post precipitation
- Oxidation bed (oxidizing bed) or aeration system
- Post precipitation
- Chemical treatment (this step is usually combined with settling and other processes to remove solids, such as filtration. The combination is referred to in the U.S. as physical-chemical treatment.).

# Treatment stages

## Primary treatment
Primary treatment removes the materials that can be easily collected from the raw wastewater and disposed of. The typical materials that are removed during primary treatment include fats, oils, and greases (also referred to as FOG), sand, gravels and rocks (also referred to as grit), larger settleable solids including human waste and floating materials. This step is done entirely with machinery, hence the name mechanical treatment.

### Removal of large objects from influent sewage
In the mechanical treatment, the influent sewage water is strained to remove all large objects that are deposited in the sewer system, such as rags, sticks, condoms, sanitary towels (sanitary napkins) or tampons, cans, fruit, etc. This is most commonly done with a manual or automated mechanically raked screen. This type of waste is removed because it can damage or clog the equipment in the sewage treatment plant.

### Sand and grit removal
Primary treatment typically includes a sand or grit channel or chamber where the velocity of the incoming wastewater is carefully controlled to allow sand grit and stones to settle, while keeping the majority of the suspended organic material in the water column. This equipment is called a detritor or sand catcher. Sand grit and stones need to be removed early in the process to avoid damage to pumps and other equipment in the remaining treatment stages. Sometimes there is a sand washer (grit classifier) followed by a conveyor that transports the sand to a container for disposal. The contents from the sand catcher may be fed into the incinerator in a sludge processing plant, but in many cases, the sand and grit is sent to a landfill.

### Sedimentation
Many plants have a sedimentation stage where the sewage is allowed to pass slowly through large tanks, commonly called "primary clarifiers" or "primary sedimentation tanks". The tanks are large enough that fecal solids can settle and floating material such as grease and oils can rise to the surface and be skimmed off. The main purpose of the primary stage is to produce a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed. Primary settlement tanks are usually equipped with mechanically driven scrapers that continually drive the collected sludge towards a hopper in the base of the tank from where it can be pumped to further sludge treatment stages.

## Secondary Treatment
Secondary treatment is designed to substantially degrade the biological content of the sewage such as are derived from human waste, food waste, soaps and detergent. The majority of municipal and industrial plants treat the settled sewage liquor using aerobic biological processes. For this to be effective, the biota require both oxygen and a substrate on which to live. There are number of ways in which this is done. In all these methods, the bacteria and protozoa consume biodegradable soluble organic contaminants (e.g. sugars, fats, organic short-chain carbon molecules, etc.) and bind much of the less soluble fractions into floc. Secondary treatment systems are classified as fixed film or suspended growth. Fixed-film treatment process including trickling filter and rotating biological contactors where the biomass grows on media and the sewage passes over its surface. In suspended growth systemssuch as activated sludgethe biomass is well mixed with the sewage and can be operated in a smaller space than fixed-film systems that treat the same amount of water. However, fixed-film systems are more able to cope with drastic changes in the amount of biological material and can provide higher removal rates for organic material and suspended solids than suspended growth systems.
Roughing filters are intended to treat particularly strong or variable organic loads, typically industrial, to allow them to then be treated by conventional secondary treatment processes. Characteristics include typically tall, circular filters filled with open synthetic filter media to which wastewater is applied at a relatively high rate. They are designed to allow high hydraulic loading and a high flow-through of air. On larger installations, air is forced through the media using blowers. The resultant wastewater is usually within the normal range for conventional treatment processes.

### Activated sludge
Activated sludge is a process dealing with the treatment of sewage and industrial wastewaters. In general, activated sludge plants encompass a variety of mechanisms and processes that use dissolved oxygen to promote the growth of biological floc that substantially removes organic material.
The process traps particulate material and can, under ideal conditions, convert ammonia to nitrite and nitrate and ultimately to nitrogen gas, (see also denitrification).

### Surface-aerated basins
Most biological oxidation processes for treating industrial wastewaters have in common the use of oxygen (or air) and microbial action. Surface-aerated basins achieve 80 to 90% removal of BOD with retention times of 1 to 10 days. The basins may range in depth from 1.5 to 5.0 metres and utilize motor-driven aerators floating on the surface of the wastewater.
In an aerated basin system, the aerators provide two functions: they transfer air into the basins required by the biological oxidation reactions, and they provide the mixing required for dispersing the air and for contacting the reactants (that is, oxygen, wastewater and microbes). Typically, the floating surface aerators are rated to deliver the amount of air equivalent to 1.8 to 2.7 kg O2/kWh. However, they do not provide as good mixing as is normally achieved in activated sludge systems and therefore aerated basins do not achieve the same performance level as activated sludge units.
Biological oxidation processes are sensitive to temperature and, between 0 C and 40 C, the rate of biological reactions increase with temperature. Most surface aerated vessels operate at between 4 C and 32 C.

### Fluidized bed reactors
The carbon adsorption following biological treatment was particularly effective in reducing both the BOD and COD to low levels. A fluidized bed reactor is a combination of the most common stirred tank packed bed, continuous flow reactors. It is very important to chemical engineering because of its excellent heat and mass transfer characteristics. In a fluidized bed reactor, the substrate is passed upward through the immobilized enzyme bed at a high velocity to lift the particles. However the velocity must not be so high that the enzymes are swept away from the reactor entirely. This causes low mixing; these type of reactors are highly suitable for the exothermic reactions. It is most often applied in immobilized enzyme catalysis.

### Filter beds (oxidising beds)
In older plants and plants receiving more variable loads, trickling filter beds are used where the settled sewage liquor is spread onto the surface of a deep bed made up of coke (carbonised coal), limestone chips or specially fabricated plastic media. Such media must have high surface areas to support the biofilms that form. The liquor is distributed through perforated rotating arms radiating from a central pivot. The distributed liquor trickles through this bed and is collected in drains at the base. These drains also provide a source of air which percolates up through the bed, keeping it aerobic. Biological films of bacteria, protozoa and fungi form on the medias surfaces and eat or otherwise reduce the organic content. This biofilm is grazed by insect larvae and worms which help maintain an optimal thickness. Overloading of beds increases the thickness of the film leading to clogging of the filter media and ponding on the surface.

### Biological aerated filters
Biological Aerated (or Anoxic) Filter (BAF) or Biofilters combine filtration with biological carbon reduction, nitrification or denitrification. BAF usually includes a reactor filled with a filter media. The media is either in suspension or supported by a gravel layer at the foot of the filter. The dual purpose of this media is to support highly active biomass that is attached to it and to filter suspended solids. Carbon reduction and ammonia conversion occurs in aerobic mode and sometime achieved in a single reactor while nitrate conversion occurs in anoxic mode. BAF is operated either in upflow or downflow configuration depending on design specified by manufacturer.

### Membrane biological reactors
Membrane biological reactors (MBR) combines activated sludge treatment with a membrane liquid-solid separation process. The membrane component utilizes low pressure microfiltration or ultra filtration membranes and eliminates the need for clarification and tertiary filtration. The membranes are typically immersed in the aeration tank (however, some applications utilize a separate membrane tank). One of the key benefits of a membrane bioreactor system is that it effectively overcomes the limitations associated with poor settling of sludge in conventional activated sludge (CAS) processes. The technology permits bioreactor operation with considerably higher mixed liquor suspended solids (MLSS) concentration than CAS systems, which are limited by sludge settling. The process is typically operated at MLSS in the range of 8,00012,000 mg/L, while CAS are operated in the range of 2,0003,000 mg/L. The elevated biomass concentration in the membrane bioreactor process allows for very effective removal of both soluble and particulate biodegradable materials at higher loading rates. Thus increased Sludge Retention Times (SRTs)usually exceeding 15 daysensure complete nitrification even under extreme cold weather operating conditions.
The cost of building and operating a MBR is usually higher than conventional wastewater treatment, however, as the technology has become increasingly popular and has gained wider acceptance throughout the industry, the life-cycle costs have been steadily decreasing. As well, in developed urban areas where the footprint of the treatment plant is considered a limiting factor MBR facilities can be considered a desirable option.

### Secondary sedimentation
The final step in the secondary treatment stage is to settle out the biological floc or filter material and produce sewage water containing very low levels of organic material and suspended matter.

### Rotating biological contactors
Rotating biological contactors (RBCs) are mechanical secondary treatment systems, which are robust and capable of withstanding surges in organic load. RBCs were first installed in Germany in 1960 and have since been developed and refined into a reliable operating unit. The rotating disks support the growth of bacteria and micro-organisms present in the sewage, which breakdown and stabilise organic pollutants. To be successful, micro-organisms need both oxygen to live and food to grow. Oxygen is obtained from the atmosphere as the disks rotate. As the micro-organisms grow, they build up on the media until they are sloughed off due to shear forces provided by the rotating discs in the sewage. Effluent from the RBC is then passed through final clarifiers where the micro-organisms in suspension settle as a sludge. The sludge is withdrawn from the clarifier for further treatment.

## Tertiary treatment
Tertiary treatment provides a final stage to raise the effluent quality before it is discharged to the receiving environment (sea, river, lake, ground, etc.). More than one tertiary treatment process may be used at any treatment plant. If disinfection is practiced, it is always the final process. It is also called "effluent polishing".

### Filtration
Sand filtration removes much of the residual suspended matter. Filtration over activated carbon removes residual toxins.

### Lagooning
Lagooning provides settlement and further biological improvement through storage in large man-made ponds or lagoons. These lagoons are highly aerobic and colonization by native macrophytes, especially reeds, is often encouraged. Small filter feeding invertebrates such as Daphnia and species of Rotifera greatly assist in treatment by removing fine particulates.

### Constructed wetlands
Constructed wetlands include engineered reedbeds and a range of similar methodologies, all of which provide a high degree of aerobic biological improvement and can often be used instead of secondary treatment for small communities, also see phytoremediation. One example is a small reedbed used to clean the drainage from the elephants' enclosure at Chester Zoo in England.

### Nutrient removal
Wastewater may contain high levels of the nutrients nitrogen and phosphorus. Excessive release to the environment can lead to a build up of nutrients, called eutrophication, which can in turn encourage the overgrowth of weeds, algae, and cyanobacteria (blue-green algae). This may cause an algal bloom, a rapid growth in the population of algae. The algae numbers are unsustainable and eventually most of them die. The decomposition of the algae by bacteria uses up so much of oxygen in the water that most or all of the animals die, which creates more organic matter for the bacteria to decompose. In addition to causing deoxygenation, some algal species produce toxins that contaminate drinking water supplies. Different treatment processes are required to remove nitrogen and phosphorus.
The removal of nitrogen is effected through the biological oxidation of nitrogen from ammonia (nitrification) to nitrate, followed by denitrification, the reduction of nitrate to nitrogen gas. Nitrogen gas is released to the atmosphere and thus removed from the water.
Nitrification itself is a two-step aerobic process, each step facilitated by a different type of bacteria. The oxidation of ammonia (NH3) to nitrite (NO2) is most often facilitated by Nitrosomonas spp. (nitroso=ammonium). Nitrite oxidation to nitrate (NO3), though traditionally believed to be facilitated by Nitrobacter spp. (nitro=nitrite), is now known to be facilitated in the environment almost exclusively by Nitrospira spp.
Denitrification requires anoxic conditions to encourage the appropriate biological communities to form. It is facilitated by a wide diversity of bacteria. Sand filters, lagooning and reed beds can all be used to reduce nitrogen, but the activated sludge process (if designed well) can do the job the most easily. Since denitrification is the reduction of nitrate to dinitrogen gas, an electron donor is needed. This can be, depending on the wastewater, organic matter (from faeces), sulfide, or an added donor like methanol.
Sometimes the conversion of toxic ammonia to nitrate alone is referred to as tertiary treatment.
Phosphorus can be removed biologically in a process called enhanced biological phosphorus removal. In this process, specific bacteria, called polyphosphate accumulating organisms, are selectively enriched and accumulate large quantities of phosphorus within their cells (up to 20% of their mass). When the biomass enriched in these bacteria is separated from the treated water, these biosolids have a high fertilizer value.
Phosphorus removal can also be achieved by chemical precipitation, usually with salts of iron (e.g. ferric chloride) or aluminum (e.g. alum). The resulting chemical sludge is difficult to handle and the added chemicals can be expensive. Despite this, chemical phosphorus removal requires significantly smaller equipment footprint than biological removal, is easier to operate and can be more reliable in areas that have wastewater compositions that make biological phosphorus removal difficult.

### Disinfection
The purpose of disinfection in the treatment of wastewater is to substantially reduce the number of microorganisms in the water to be discharged back into the environment. The effectiveness of disinfection depends on the quality of the water being treated (e.g., cloudiness, pH, etc.), the type of disinfection being used, the disinfectant dosage (concentration and time), and other environmental variables. Cloudy water will be treated less successfully since solid matter can shield organisms, especially from ultraviolet light or if contact times are low. Generally, short contact times, low doses and high flows all militate against effective disinfection. Common methods of disinfection include ozone, chlorine, or ultraviolet light. Chloramine, which is used for drinking water, is not used in wastewater treatment because of its persistence.

# Package plants and batch reactors
In order to use less space, treat difficult waste, deal with intermittent flow or achieve higher environmental standards, a number of designs of hybrid treatment plants have been produced. Such plants often combine all or at least two stages of the three main treatment stages into one combined stage. In the UK, where a large number of sewage treatment plants serve small populations, package plants are a viable alternative to building discrete structures for each process stage.
One type of system that combines secondary treatment and settlement is the sequencing batch reactor (SBR). Typically, activated sludge is mixed with raw incoming sewage and mixed and aerated. The resultant mixture is then allowed to settle producing a high quality effluent. The settled sludge is run off and re-aerated before a proportion is returned to the head of the works. SBR plants are now being deployed in many parts of the world including North Liberty, Iowa, and Llanasa, North Wales.
The disadvantage of such processes is that precise control of timing, mixing and aeration is required. This precision is usually achieved by computer controls linked to many sensors in the plant. Such a complex, fragile system is unsuited to places where such controls may be unreliable, or poorly maintained, or where the power supply may be intermittent.
Package plants may be referred to as high charged or low charged. This refers to the way the biological load is processed. In high charged systems, the biological stage is presented with a high organic load and the combined floc and organic material is then oxygenated for a few hours before being charged again with a new load. In the low charged system the biological stage contains a low organic load and is combined with floculate for a relatively long time.

# Sludge treatment and disposal
The sludges accumulated in a wastewater treatment process must be treated and disposed of in a safe and effective manner. The purpose of digestion is to reduce the amount of organic matter and the number of disease-causing microorganisms present in the solids. The most common treatment options include anaerobic digestion, aerobic digestion, and composting.
The choice of a wastewater solid treatment method depends on the amount of solids generated and other site-specific conditions. However, in general, composting is most often applied to smaller-scale applications followed by aerobic digestion and then lastly anaerobic digestion for the larger-scale municipal applications.

### Anaerobic digestion
Anaerobic digestion is a bacterial process that is carried out in the absence of oxygen. The process can either be thermophilic digestion, in which sludge is fermented in tanks at a temperature of 55C, or mesophilic, at a temperature of around 36C. Though allowing shorter retention time (and thus smaller tanks), thermophilic digestion is more expensive in terms of energy consumption for heating the sludge.
One major feature of anaerobic digestion is the production of biogas, which can be used in generators for electricity production and/or in boilers for heating purposes.

### Aerobic digestion
Aerobic digestion is a bacterial process occurring in the presence of oxygen. Under aerobic conditions, bacteria rapidly consume organic matter and convert it into carbon dioxide. The operating costs are characteristically much greater than for anaerobic digestion because of the energy costs needed to add oxygen to the process.

### Composting
Composting is also an aerobic process that involves mixing the sludge with sources of carbon such as sawdust, straw or wood chips. In the presence of oxygen, bacteria digest both the wastewater solids and the added carbon source and, in doing so, produce a large amount of heat.

### Thermal depolymerization
Thermal depolymerization uses hydrous pyrolysis to convert reduced complex organics to oil.

## Sludge disposal
When a liquid sludge is produced, further treatment may be required to make it suitable for final disposal. Typically, sludges are thickened (dewatered) to reduce the volumes transported off-site for disposal. There is no process which completely eliminates the need to dispose of biosolids. There is, however, an additional step some cities are taking to superheat the wastewater sludge and convert it into small pelletized granules that are high in nitrogen and other organic materials. This product is then sold to local farmers and turf farms as a soil amendment or fertilizer, reducing the amount of space required to dispose of sludge in landfills.

# Treatment in the receiving environment
Many processes in a wastewater treatment plant are designed to mimic the natural treatment processes that occur in the environment, whether that environment is a natural water body or the ground. If not overloaded, bacteria in the environment will consume organic contaminants, although this will reduce the levels of oxygen in the water and may significantly change the overall ecology of the receiving water. Native bacterial populations feed on the organic contaminants, and the numbers of disease-causing microorganisms are reduced by natural environmental conditions such as predation exposure to ultraviolet radiation, for example. Consequently, in cases where the receiving environment provides a high level of dilution, a high degree of wastewater treatment may not be required. However, recent evidence has demonstrated that very low levels of certain contaminants in wastewater, including hormones (from animal husbandry and residue from human hormonal contraception methods) and synthetic materials such as phthalates that mimic hormones in their action, can have an unpredictable adverse impact on the natural biota and potentially on humans if the water is re-used for drinking water. In the US and EU, uncontrolled discharges of wastewater to the environment are not permitted under law, and strict water quality requirements are to be met. A significant threat in the coming decades will be the increasing uncontrolled discharges of wastewater within rapidly developing countries.

# Sewage treatment in developing countries
There are few reliable figures on the share of the wastewater collected in sewers that is being treated in the world. In many developing countries the bulk of domestic and industrial wastewater is discharged without any treatment or after primary treatment only. In Latin America about 15% of collected wastewater passes through treatment plants (with varying levels of actual treatment). In Venezuela, a below average country in South America with respect to wastewater treatment, 97 percent of the countrys sewage is discharged raw into the environment.
In a relatively developed Middle Eastern country such as Iran, Tehran's majority of population has totally untreated sewage injected to the citys groundwater. Most of sub-Saharan Africa is without wastewater treatment.
Water utilities in developing countries are chronically underfunded because of low water tariffs, the inexistence of sanitation tariffs in many cases, low billing efficiency (i.e. many users that are billed do not pay) and poor operational efficiency (i.e. there are overly high levels of staff, there are high physical losses, and many users have illegal connections and are thus not being billed). In addition, wastewater treatment typically is the process within the utility that receives the least attention, partly because enforcement of environmental standards is poor. As a result of all these factors, operation and maintenance of many wastewater treatment plants is poor. This is evidenced by the frequent breakdown of equipment, shutdown of electrically operated equipment due to power outages or to reduce costs, and sedimentation due to lack of sludge removal. Developing countries as diverse as Egypt, Algeria, China or Colombia have invested substantial sums in wastewater treatment without achieving a significant impact in terms of environmental improvement. Even if wastewater treatment plants are properly operating, it can be argued that the environmental impact is limited in cases where the assimilative capacity of the receiving waters (ocean with strong currents or large rivers) is high, as it is often the case.

## Benefits of wastewater treatment compared to benefits of sewage collection in developing countries
Waterborne diseases that are prevalent in developing countries, such as diarrhea, typhus and cholera, are caused primarily by poor hygiene practices and the absence of improved household sanitation facilities. The public health impact of the discharge of untreated wastewater is comparatively much lower. Hygiene promotion, on-site sanitation and low-cost sanitation thus are likely to have a much greater impact on public health than wastewater treatment.