## 2 Microalgae-Based Wastewater Treatment
### Large-Scale Wastewater Treatment  
The creative idea of building the first large-scale plant, where wastewater is treated with microalgae and simultaneously produces bioplastics, biomethane, biofertilizers, and clean water for irrigation, was developed within the framework of the EU (funding from the EU program INCOVER). The research and larger-scale activities took place in Germany and Spain over a three-year period. The _Agropolis_ plant, situated in the Barcelona metropolitan area, mainly used a mixed microalgae and cyanobacteria culture that developed in three horizontal hybrid tubular photobioreactors to treat a mixture of agricultural waste and urban wastewater. Heterotrophic bacteria grow in culture at the same time as other bacteria, but at slower rates because the inputs contain less organic matter. Following the biomass separation process, the treated water is put through three adsorption columns for nutrient recovery, ultrafiltration, and disinfection before feeding energy crops (rapeseed) with a smart irrigation system. Anaerobic co-treatment (AcoD) of the generated biomass with secondary sludge for biogas production is carried out concurrently. The biomass is subsequently enriched in an absorption column using mixed liquid from the photobioreactors. To create biofertilizers, the digestate from the anaerobic reactor is additionally processed in wetlands for sludge treatment. Utilizing microalgae and bacteria mixed cultures grown in municipal wastewater, the three photobioreactors, each with a useful volume of 11.7 m\({}^{3}\), were vaccinated. An inclined plate separator was placed after the photobioreactors to split up the biomass and clean the treated water. The water kept in the three storage tanks is pumped through the separator, which has two chambers. In the first chamber, the water is mixed with a coagulation liquid (polyamide chloride, with 9% aluminum). The water travels through a second chamber after passing through the mixing chamber, where the solids sink to the bottom and the water remains in the upper section of the separator. The homogenization tank receives 6.4 m\({}^{3}\) of agricultural waste and 0.5 m\({}^{3}\) of urban wastewater (which was previously treated in a ventilated septic tank) every night. These materials are mixed there to provide the photobioreactors with an input that has the right amount of nutrients for cyanobacteria growth. This operation is performed early in the morning so that nutrients are ready for use for biomass growth in the daytime. Biomass is produced during the microalgae treatment process of wastewater, primarily due to the nutrients available (primarily nitrogen and phosphorus) in the inputs and solar radiation. Microalgae simultaneously produce the oxygen required for bacteria to aerobically break down organic materials in wastewater through photosynthesis. Thus, among the basic benefits of photobioreactors are microalgae biomass production and wastewater treatment without the need of exterior ventilation. The concentrations of nutrients in the effluents used in the photobioreactor input and completely removed were phosphates <2 mg/L, ammonia <10 mg/L, and nitrites and nitrates <15 mg/L. The microalgae species that developed in the photobioreactors were observed under a microscope and were the diatom Cyclotella sp., the green algae _Oocysts_ sp., and the cyanobacteria _Synechocystis_ sp. To attain a nutrient concentration that is appropriate for cyanobacteria, a blend of agricultural and municipal effluents is fed into each of the three photobioreactors. Because cyanobacteria are prokaryotic photosynthetic microorganisms that can digest and store glycogen, polyphosphate, and polyhydroxyalkanoates (PHAs), with polyhydroxybutyric acid (PHB) predominant there is interest in their growth. The use of wastewater in order to gather cyanobacteria from a cultured mixed with various microalgae is an innovation, rather than using only genetically modified crops that require costly processes.