The design challenge for an industrial wastewater treatment system is to create a process which is capable of responding to extreme variations in flow and pollutant concentration, while maintaining the effluent within permit limitations. For example, refinery wastewater is contaminated with oil, aromatics, ammonia, phenols, sulfide, and heavy metals. The degree of contamination is related to the refinery complexity, whereas the wastewater volume is related to refinery throughput as well as complexity. Wastewater generation per barrel of crude feed is 6 to 22 gallons. (Rule of Thumb: gallons of wastewater per barrel of crude feed equals six plus 1.5 times the Nelson complexity factor). Petrochemical processes in the refinery will create additional wastewater. Pollutant concentrations undergo large excursions because of unit upsets, changes in refinery crude feed, and irregular maintenance activities. Rainfall and stormwater runoff are the dominant factors in volumetric flow variation. Figure 1 is a comprehensive flow schematic of a refinery