Simulation for the Performance and Economic Evaluation of Conventional Activated Sludge Process Replacing by Sequencing Batch Reactor Technology in a Petroleum Refinery Wastewater Treatment Plant

Treatment of the petroleum refinery wastewater containing complex chemicals using biological processes is usually challenging because of the inhibition and/or toxicity of these matters when they serve as microbial substrates. In addition, performance modeling and cost evaluation of processes are essential for designing, construction, and forecasting future economic requirements of the petroleum refinery wastewater treatment plants (PRWWTPs). In this study, the performance and economics of conventional activated sludge (CAS) process replacing by sequencing batch reactor (SBR) technology in a two train PRWWTP were evaluated using simulation. The final treated effluent characteristics for the PRWWTPs containing CAS + CAS and SBR + CAS processes under steady state conditions were studied and evolution of the main parameters of the final effluent during the 30 days of simulation for these plants were investigated. Finally, the total project construction, operation labor, maintenance, material, chemical, energy, and amortization costs of these plants were estimated and compared. Results demonstrated that the project construction cost of PRWWTP containing CAS + CAS processes was lower than that of PRWWTP containing SBR + CAS processes and the energy and amortization costs for both plants were higher in comparison with the operation, maintenance, material, and chemical costs. Note that this study is a computer simulation and drawing general conclusions only on the basis of computer simulation may be insufficient.


Introduction
Large amounts of wastewaters containing different contaminants (e.g., oil, phenols, sulfides, dissolved solids, suspended solids, toxic metals, biological oxygen demand (BOD)-bearing materials) can be generated in the petroleum refinery [1][2][3][4][5][6][7], which poses a problem for managing and treating these complex wastewaters [5,8].Compliance with the regulations set by regulatory agencies, the related harm prevention on the surrounding environment, and water reuse issues can be the driving forces for the petroleum refinery to treat wastewaters with appropriate treatment technologies [5,9].
The CAS process has been the most commonly utilized biological treatment method in the petroleum refinery [3,4,17].In conventional biological processes, both the flow and composition changing of the wastewater can usually impede the treatment system [3,[18][19][20].In some cases, common continuous flow processes such as CAS may encounter serious problems to meet the regulated discharge limits.Treatment of the petroleum refinery wastewater containing complex chemicals using biological processes is usually challenging because of the inhibition and/or toxicity of these matters when they serve as microbial substrates.Use of discontinuous systems such as SBR technology, which promote the mineralization of the petroleum refinery wastewaters containing toxic chemicals can be promising [4,20].At an industrial scale, 88-95% BOD reduction and 98-99% phenol removal from refinery wastewater using the CAS process have been reported [21].Additionally, using a hydraulic retention time (HRT) of 36 h and sludge retention time (SRT) of 40 days, the total COD in the petroleum refinery wastewater by the SBR process has been reported to decrease to 50-150 mg/L [22].Jafarinejad reviewed the application of SBR technology for the petroleum industry wastewater treatment [4].
In the petroleum refinery wastewater treatment plant (PRWWTP) design, in addition to improving effluent quality, it is necessary to optimize energy consumption and decrease the use of chemicals in the treatment system [23,24].Computer simulation is a useful tool in the analysis of the performance, effectiveness, and economics of wastewater treatment plants (WWTPs) [25,26].In reality, technical and economic simulation of processes are necessary for designing PRWWTPs.Cost prediction prepares a powerful tool for design, construction, and forecasting future economic requirements [24].Some researchers have carried out mathematical modeling and simulation of WWTPs [24][25][26][27][28][29][30][31][32][33][34]; but, as far as I know, there is no research on modeling and simulation for the application of SBR technology in the PRWWTP.In this study, the performance and economics of the CAS process replacing by SBR technology in a two train PRWWTP were evaluated using a simulation.The analysis of performance and effectiveness of PRWWTPs was done using the GPS-X software package developed by Hydromantis Inc and cost estimation to build, operate, and maintain the PRWWTPs was performed using CapdetWorks with equipment costing database Sept 2007 (USA, Avg).The final treated effluent characteristics for the PRWWTPs containing CAS + CAS and SBR + CAS processes under steady state conditions were studied, and evolution of the main parameters of the final effluent during the 30 days of simulation for these plants were investigated.In addition, the costs of these plants were estimated and compared.

Case Study and Influent Wastewater
In order to base the study on a real case for simulations, a PRWWTP in Iran was selected.The purpose of this plant is to process the refinery wastewater effluent and make water disposal of proper quality for discharge or use as cooling towers make-up.The plant includes two independent trains suitable for parallel operation, each equipped with a manual inlet sluice gate for possible isolation.This plant consists of two American Petroleum Institute (API) separators, two equalization basins, pH control injection facilities, polyelectrolyte injection, a static mixer, ferric chloride injection, two air flotation units, nutrient injection system, two aeration basins, two clarifiers, an aerobic digester, three sand filter units, and two chlorination units.Continuous on-stream monitoring of the filter effluent is maintained by a total organic carbon (TOC) analyzer with the capability of diverting to the evaporation pond or to the air flotation diversion box if quality does not meet cooling tower makeup specifications.The characteristics of influent wastewater (API effluent) for performance modeling and cost estimation of the PRWWTPs are given in Table 1.It is necessary to note that for performance modeling and cost estimation, values of volatile solids (%), soluble chemical oxygen demand (COD), soluble BOD, Total Kjeldahl Nitrogen (TKN), soluble TKN, total phosphorus, pH, cations, anions, settleable solids, and non-degradable fraction of volatile suspended solids (VSS) were assumed by author.

PRWWTP Containing CAS Process
An aeration tank, a settling tank (clarifier), and a sludge return line to treat wastewater are applied in the CAS process.To provide the necessary oxygen and adequate mixing of the influent wastewater and return activated sludge (RAS), diffused or mechanical aeration is utilized, which allows absorption, flocculation, and synthesis of the organic matter to occur during aeration.A high ratio of organic loading (i.e., feed/microorganism (F/M)) to the mixed liquor at the beginning of the tank is the major characteristic of a plug flow type.As a plug flow tank has little longitudinal mixing except for that which is caused by diffused aeration, substrate can be used up with liquor flowing through its length and the mass of microorganisms can be enhanced due to cell reproduction.Much of the oxygen can be consumed by nitrification and endogenous respiration if the F/M is sufficiently low in the latter stages of the tank.The lack of longitudinal mixing can decrease the ability to handle shock loads; there is little dilution of the inflow so toxic material may affect microorganisms.Discouraging the excessive growth of filamentous organisms that can cause settlement problems in the secondary clarifier is the main advantage of the plug flow activated sludge process [3,15,24].
A process flow diagram (PFD) of the PRWWTP containing CAS process is shown in Figure 1.This plant consists of equalization tanks (A/B), coagulant addition line, dissolved air flotation (DAF) tanks (A/B), aeration tanks or plug flow activated sludge tanks (A/B), secondary clarifiers (A/B), chlorination tanks (A/B), sand filters (A/B/C), oily sludge thickener, biological sludge thickener, aerobic digestion tank, and dewatering equipment or a belt-filter press.Note that API separators are not simulated in this study and API effluent is used as influent wastewater for this simulation.The tank type was a concrete basin and tank volume, tank depth, minimum water level in tank, air flow into aeration tank, pressure correction coefficient, alpha factor for oxygen transfer in wastewater, beta factor for oxygen saturation in wastewater in equalization tanks were 2000 m 3 , 3 m, 2.8 m, 31,200 m 3 /d, 1, 0.9, and 0.95, respectively.Ferric ion was applied as coagulant and its chemical dosage was 16 kgMe/d.The diameter of the DAF tank, maximum water level, air pressure, detention time in floating tank, hydraulic loading rate, air/solids ratio, and polymer dosage were 4.7 m, 2.5 m, 4.8 bar, 0.5 h, 60.337 m 3 /(m 2 •d), 0.15, and 0.001 g/kg, respectively.Details of the CAS process parameters are given in Table 2. Default values in the software were selected for all other parameters that have not been given in Table 2. Type of secondary clarifier was circular and flat bottom and the diameter of clarifier, surface overflow rate, side water depth, specific gravity, underflow concentration, and weir overflow rate maximum were 11 m, 0.69 m 3 /(m 2 •h), 4.5 m, 1.03, 1%, and 186.3 m 3 /(m•d), respectively.Tank volume, contact time at peak flow, chlorine dose, rate of kill, and influent coliform count in chlorination were 30 m 3 , 30 min, 2 mg/L, 0.5 m 3 /(g•min), and 10 7 /100 mL, respectively.The characteristics of sand filtration process parameters for simulation are listed in Table 3.The oily sludge thickener was a gravity type thickener where the surface area, depth, and mass loading in this thickener were 7 m 2 , 4 m, and 68 kg/(m 2 •d), respectively.In addition, the biological sludge thickener was a gravity type thickener where the surface area, depth, and mass loading in the thickener were 12.5 m 2 , 4.5 m, and 19.6 kg/(m 2 •d), respectively.The maximum volume, depth, detention time, volatile solids destroyed, mixed liquor solids, digested sludge concentration, and temperature in aerobic digestion were 234 m 3 , 4.7 m, 15 d, 40%, 12,000 mg/L, 2.5%, and 23 • C, respectively.Aeration type in aerobic digestion was diffusion aeration and air flow into aeration tank was 10,200 m 3 /d, where the alpha factor for oxygen transfer in wastewater, beta factor for oxygen saturation in wastewater, coarse bubble minimum air flow, and standard oxygen transfer efficiency were 0.7, 0.95, 0.33 L/s/m 3 , and 6%, respectively.The filter press surface, cake solids content, density of cake, operating schedule per day, days operating per week, hydraulic loading per meter of belt press width, polymer dose and filtrate solid concentration in belt-filter press or dewatering were 10 m 2 , 25%, 1201.4 kg/m 3 , 8 h/d, 5 d/wk, 381.6 m 3 /d, 0.5% dry wt, and 100 mg/L, respectively.Default values in the software were selected for all other parameters that have not been given here.

PRWWTP Containing SBR Process
The SBR technology is a fill-and-draw activated sludge process for aerobic and anaerobic treatment of both municipal and industrial wastewater where equalization, aeration, and clarification can all be achieved using a single batch reactor.This system does not need a clarifier.Two or more batch reactors can be applied in a predetermined sequence of operations for optimization of the process performance.Fill, react, settle, draw, and idle are five steps of the operation of an SBR.These steps may be changed for different operational uses.SBRs are usually designed in time (i.e., aerobic cycle time); whereas, the CAS process or plug flow tanks are designed in space (i.e., reactors of a certain volume with a certain HRT).SBRs are usually applied at flow rates of 219 L/s (5MGD) or less.Application of these systems is discouraged for large flow rates due to the more sophisticated operation needed at larger SBR plants.This technology is specially suggested for low flow rates (e.g., wastewater flow rates of less than 22 L/s (0.5MGD)) [3,4,15,24,35,36].SBR performance can be affected by organic loading rate, HRT, SRT, dissolved oxygen (DO), and influent characteristics such as COD, solids content, and C/N ratio [3,37,38].A process flow diagram of the PRWWTP containing SBR process is shown in Figure 2.This plant consists of equalization tanks (A1/A2/B), coagulant addition line, DAF (A/B), SBR, aeration tank or plug flow activated sludge tank, secondary clarifier, chlorination tanks (A/B), sand filters (A/B/C), oily sludge thickener, biological sludge thickener, aerobic digestion tank, and dewatering equipment or belt-filter press.An equalization tank is usually needed prior to the chlorination unit in batch SBRs in order to store large volumes of water.When the flow is not equalized, a sizable filter may be necessary to accommodate the large flow of water entering the chlorination system [39].The characteristics and operational conditions of equalization tanks, coagulant addition, DAF, aeration tank, secondary clarifier, chlorination, sand filters, oily sludge thickener, biological sludge thickener, aerobic digestion, and belt-filter press are the same as that of PRWWTP containing CAS process.The details of the SBR process have been given in Table 4. Default values in the software were selected for all other parameters that have not been given in Table 4.
A process flow diagram of the PRWWTP containing SBR process is shown in Figure 2.This plant consists of equalization tanks (A1/A2/B), coagulant addition line, DAF (A/B), SBR, aeration tank or plug flow activated sludge tank, secondary clarifier, chlorination tanks (A/B), sand filters (A/B/C), oily sludge thickener, biological sludge thickener, aerobic digestion tank, and dewatering equipment or belt-filter press.An equalization tank is usually needed prior to the chlorination unit in batch SBRs in order to store large volumes of water.When the flow is not equalized, a sizable filter may be necessary to accommodate the large flow of water entering the chlorination system [39].The characteristics and operational conditions of equalization tanks, coagulant addition, DAF, aeration tank, secondary clarifier, chlorination, sand filters, oily sludge thickener, biological sludge thickener, aerobic digestion, and belt-filter press are the same as that of PRWWTP containing CAS process.The details of the SBR process have been given in Table 4. Default values in the software were selected for all other parameters that have not been given in Table 4.

Simulation Methods
Analysis of the performance and effectiveness of PRWWTPs was done using the GPS-X software package developed by Hydromantis Inc, which is a modular, powerful, multi-purpose modeling environment for the simulation of municipal and industrial WWTPs [26][27][28].
A collection of wastewater process models using a set of basic wastewater components, or state variables in GPS-X is called a library Hydromantis Inc. 2011 [26].In this study, since there was an interest in modeling carbon and nitrogen, the carbon, nitrogen (cnlib) library was selected.Selected models used for different unit operation in PRWWTPs for simulation are given in Table 5.The COD-states influent model was used for influent characterization, and the Mantis model was applied for biological processes.The mantis model is identical to the International Association on Water Pollution Research and Control (IAWPRC) Activated Sludge Model No. 1 (ASM1) with some modifications: (i) Introduction of two additional growth processes, one for the autotrophic organisms and one for the heterotrophic organisms; (ii) Use of the temperature-dependent kinetic parameters by Arrhenius equation [26].(iii) Introduction of aerobic denitrification in the model according to the Münch modification [40].
The final treated effluent characteristics for the PRWWTPs containing CAS + CAS and SBR + CAS processes under steady state conditions were studied and evolution of the main parameters of the final effluent during the 30 days of simulation for these plants were investigated.
The planning level design and costing productivity can be improved by economic modeling and simulation that can lead to better engineering decisions.In this study, CapdetWorks 2.5 with equipment costing database Sept 2007 (USA, Avg) was used for cost estimation to build, operate and maintain the PRWWTPs.CapdetWorks calculates all the costs-total project construction, total operation, maintenance, material, chemical, energy, and amortization for each treatment alternative [24].

Performance Comparison of the PRWWTPs Containing CAS + CAS and SBR + CAS Processes
The PRWWTPs containing CAS + CAS and SBR + CAS processes were simulated through the GPS-X software under steady state conditions for 30 days and the final treated effluent investigated parameters such as TSS, BOD 5 , COD, and ammonia N from both PRWWTPs complied with the regulated treated effluent standards [41,42].In addition, evolution of the main parameters of the final effluent during the 30 days of simulation for PRWWTPs containing CAS + CAS and SBR + CAS are demonstrated in Figures 3 and 4, respectively.As shown, regarding the PRWWTP containing CAS + CAS processes, during the first day of the simulation, a decrease of the total COD and total TKN was noticed, since the system had not yet reached the steady state.For the PRWWTP containing SBR + CAS processes, from day 10 until the last day of the simulation, the parameters were approximately constant.
GPS-X software under steady state conditions for 30 days and the final treated effluent investigated parameters such as TSS, BOD5, COD, and ammonia N from both PRWWTPs complied with the regulated treated effluent standards [41,42].In addition, evolution of the main parameters of the final effluent during the 30 days of simulation for PRWWTPs containing CAS + CAS and SBR + CAS are demonstrated in Figures 3 and 4, respectively.As shown, regarding the PRWWTP containing CAS + CAS processes, during the first day of the simulation, a decrease of the total COD and total TKN was noticed, since the system had not yet reached the steady state.For the PRWWTP containing SBR + CAS processes, from day 10 until the last day of the simulation, the parameters were approximately constant.

Economic Comparison of the PRWWTPs Containing CAS + CAS and SBR + CAS Processes
The total project construction cost ($) and the total operation, maintenance, material, chemical, energy, and amortization costs ($/year) of PRWWTPs containing CAS + CAS and SBR + CAS processes are shown in Figures 5 and 6, respectively.Figure 5 illustrates that project construction cost of PRWWTP containing CAS + CAS processes was 17.08% lower than that of PRWWTP containing SBR + CAS processes.Figure 6 shows that the operation, maintenance, material, chemical, energy, and amortization costs of PRWWTP containing CAS + CAS were lower than those of PRWWTP containing SBR + CAS.Note that the energy cost ($/year) of the CAS unit was higher than that of the SBR unit; but the energy cost of PRWWTP containing CAS + CAS was 29.67% lower than that of PRWWTP containing SBR + CAS due to the presence of an additional equalization tank in the configuration of PRWWTP containing SBR + CAS.These results depicted that the PRWWTP containing CAS + CAS processes was cost effective and the energy and amortization costs for both plants were higher in comparison with the operation, maintenance, material, and chemical costs.20,000,000 25,000,000

Economic Comparison of the PRWWTPs Containing CAS + CAS and SBR + CAS Processes
The total project construction cost ($) and the total operation, maintenance, material, chemical, energy, and amortization costs ($/year) of PRWWTPs containing CAS + CAS and SBR + CAS processes are shown in Figures 5 and 6, respectively.Figure 5 illustrates that project construction cost of PRWWTP containing CAS + CAS processes was 17.08% lower than that of PRWWTP containing SBR + CAS processes.Figure 6 shows that the operation, maintenance, material, chemical, energy, and amortization costs of PRWWTP containing CAS + CAS were lower than those of PRWWTP containing SBR + CAS.Note that the energy cost ($/year) of the CAS unit was higher than that of the SBR unit; but the energy cost of PRWWTP containing CAS + CAS was 29.67% lower than that of PRWWTP containing SBR + CAS due to the presence of an additional equalization tank in the configuration of PRWWTP containing SBR + CAS.These results depicted that the PRWWTP containing CAS + CAS processes was cost effective and the energy and amortization costs for both plants were higher in comparison with the operation, maintenance, material, and chemical costs.
containing SBR + CAS.Note that the energy cost ($/year) of the CAS unit was higher than that of the SBR unit; but the energy cost of PRWWTP containing CAS + CAS was 29.67% lower than that of PRWWTP containing + CAS due to the presence of an additional equalization tank in the configuration of PRWWTP containing SBR + CAS.These results depicted that the PRWWTP containing CAS + CAS processes was cost effective and the energy and amortization costs for both plants were higher in comparison with the operation, maintenance, material, and chemical costs.

Conclusions
The performance and economics of CAS process replacing by SBR technology in a two train PRWWTP were evaluated using a simulation by the GPS-X software and CapdetWorks software with equipment costing database Sept 2007 (USA, Avg), respectively.The treated effluent investigated parameters such as TSS, BOD5, COD, and ammonia N from both PRWWTPs complied with the regulated treated effluent standards.Regarding the PRWWTP containing CAS + CAS processes, during the first day of the simulation, a decrease of the total COD and total TKN was noticed, since the system has not yet reached the steady state.For the PRWWTP containing SBR + CAS processes, from day 10 until the last day of the simulation, the parameters were approximately constant.The project construction cost of PRWWTP containing CAS + CAS processes was lower than that of PRWWTP containing SBR + CAS processes, and the energy and amortization costs for both plants were higher in comparison with the operation, maintenance, material, and chemical costs.Note that this study is a computer simulation and verification of the simulation using real data may be required to draw conclusions.

Conclusions
The performance and economics of CAS process replacing by SBR technology in a two train PRWWTP were evaluated using a simulation by the GPS-X software and CapdetWorks software with equipment costing database Sept 2007 (USA, Avg), respectively.The treated effluent investigated parameters such as TSS, BOD 5 , COD, and ammonia N from both PRWWTPs complied with the regulated treated effluent standards.Regarding the PRWWTP containing CAS + CAS processes, during the first day of the simulation, a decrease of the total COD and total TKN was noticed, since the system has not yet reached the steady state.For the PRWWTP containing SBR + CAS processes, from day 10 until the last day of the simulation, the parameters were approximately constant.The project construction cost of PRWWTP containing CAS + CAS processes was lower than that of PRWWTP containing SBR + CAS processes, and the energy and amortization costs for both plants were higher in comparison with the operation, maintenance, material, and chemical costs.Note that this study is a computer simulation and verification of the simulation using real data may be required to draw conclusions.
ChemEngineering 2019, 3, 45 4 of 12 clarifier, surface overflow rate, side water depth, specific gravity, underflow concentration, and weir overflow rate maximum were 11 m, 0.69 m 3 /(m 2 •h), 4.5 m, 1.03, 1%, and 186.3 m 3 /(m•d), respectively.Tank volume, contact time at peak flow, chlorine dose, rate of kill, and influent coliform count in chlorination were 30 m 3 , 30 min, 2 mg/L, 0.5 m 3 /(g•min), and 10 7 /100 mL, respectively.The characteristics of sand filtration process parameters for simulation are listed in Table 3.The oily sludge thickener was a gravity type thickener where the surface area, depth, and mass loading in this thickener were 7 m 2 , 4 m, and 68 kg/(m 2 •d), respectively.In addition, the biological sludge thickener was a gravity type thickener where the surface area, depth, and mass loading in the thickener were 12.5 m 2 , 4.5 m, and 19.6 kg/(m 2 •d), respectively.The maximum volume, depth, detention time, volatile solids destroyed, mixed liquor solids, digested sludge concentration, and temperature in aerobic digestion were 234 m 3 , 4.7 m, 15 d, 40%, 12,000 mg/L, 2.5%, and 23°C, respectively.Aeration type in aerobic digestion was diffusion aeration and air flow into aeration tank was 10,200 m 3 /d, where the alpha factor for oxygen transfer in wastewater, beta factor for oxygen saturation in wastewater, coarse bubble minimum air flow, and standard oxygen transfer efficiency were 0.7, 0.95, 0.33 L/s/m 3 , and 6%, respectively.The filter press surface, cake solids content, density of cake, operating schedule per day, days operating per week, hydraulic loading per meter of belt press width, polymer dose and filtrate solid concentration in belt-filter press or dewatering were 10 m 2 , 25%, 1201.4 kg/m 3 , 8 h/d, 5 d/wk, 381.6 m 3 /d, 0.5% dry wt, and 100 mg/L, respectively.Default values in the software were selected for all other parameters that have not been given here.

Figure 1 .
Figure 1.Process flow diagram of the petroleum refinery wastewater treatment plant (PRWWTP) containing conventional activated sludge (CAS) + CAS processes.

Figure 1 .
Figure 1.Process flow diagram of the petroleum refinery wastewater treatment plant (PRWWTP) containing conventional activated sludge (CAS) + CAS processes.

Figure 3 .
Figure 3. Evolution of the total COD and total TKN of the final effluent during the 30 days of simulation for the PRWWTPs containing CAS + CAS processes.

Figure 3 .
Figure 3. Evolution of the total COD and total TKN of the final effluent during the 30 days of simulation for the PRWWTPs containing CAS + CAS processes.ChemEngineering 2019, 3, 45 9 of 12

Figure 4 .
Figure 4. Evolution of the total COD and total TKN of the final effluent during the 30 days of simulation for the PRWWTPs containing SBR + CAS processes.

Figure 4 .
Figure 4. Evolution of the total COD and total TKN of the final effluent during the 30 days of simulation for the PRWWTPs containing SBR + CAS processes.

Funding:
This research received no external funding.

Figure 6 .
Figure 6.The total operation, maintenance, material, chemical, energy, and amortization costs ($/year) of the PRWWTPs containing CAS + CAS and SBR + CAS processes.

Table 1 .
The characteristics of influent wastewater (API effluent).

Table 2 .
The characteristics of CAS process parameters.

Table 3 .
The characteristics of sand filtration process parameters.

Table 4 .
The characteristics of SBR process parameters.

Table 5 .
The selected models used for different unit operation in PRWWTPs for simulation.