The exploration and production of oil and gas has both positive and negative outcome. Oil and gas have been a major source of economic boost to its producing countries; it has equally caused environmental concerns and other challenges. However, in spite of the challenges associated with oil and gas production, many countries are continuing in their efforts to expanding exploration and development of oil and gas activities   . As these activities continue to increase and new formations become economically viable, water demands for well development as well as the volume of produced water generated will increase considerably  . Produced water is wastewater from underground formations that is brought to the surface during oil and gas production and it is an undesirable product in the hydrocarbon reservoirs   . It contributes the largest volume of waste stream associated with oil and gas production   . According to Coday et al. about 14 billion barrel of produced water are produced annually  while Duraisamy et al. (2013) posited that 77 billion barrel of water are produced per annum globally  . Usually, produced water is always in contact with hydrocarbons in reservoir or surface pipelines thereby making it a complex mixture comprising of polar and non-polar organic components, cations (e.g. magnesium, calcium and iron), anions (e.g. carbonate and bromide sulphate) and other substances such as heavy metals (e.g. barium, uranium, cadmium, chromium and lead)   . Produced water physicochemical properties vary with respect to reservoir type (e.g. oil, gas or coal), geographic location of the field, the geologic formation and the type of produced hydrocarbon but the characteristics and volume of produced water varies throughout the lifetime of the proposed reservoir   . The need to treat produced water was to meet discharge regulations set by Local, State and Federal Authorities, reuse of treated produced water in oil and gas operations, agricultural purposes, animal/human consumption and meeting water quality requirements for miscellaneous uses. The advantages of using membrane processes include the ease of operation and the use of little or no chemicals  . The membrane technology used in produced water and waste water treatments are classified according to pore size and they include: Microfiltration, Ultrafiltration, Nanofiltration, Electrodialysis and Reverse Osmosis. Microfiltration, ultrafiltration and nanofiltration are membrane technologies that differs from each other mainly in pore size of the membrane used. Igunnu and Chen (2014) hinged on the advantages of MBR as possessing highly-improved effluent quality, higher biomass concentration and less sludge production  . The application of Membrane Bioreactor for treatment of produced water experimentally is currently on  , but work on design, modeling and simulation is lacking. In the present work, MBR design model that predicts the removal of contaminants entrained in produced water is presented. The design models were integrated numerically to compute the reactor dimension, percentage removal of contaminants and functional parameters. Model predictions were compared with industrial and literature data with reasonable agreement. Sensitivity analysis was carried out on functional parameters to see its effects on percentage contaminants removal in order to ascertain optimality.
2. Development of MBR Design Equations
Figure 1 shows a hypothetical schematic diagram of a Continuous Stirred-Tank Reactor imbedded with membrane submerged in the bioreactor for treatment of produced water. The oilfield produced water entered into the reactor through the reactor inlet designated as “In” and passes through the immersed membrane embedded with nutrient supplying material. Oxygen in the form of air is introduced into the reactor through another channel to provide life for micro-organisms growing in the membrane which in turn consume the available contaminants. After the treatment process, the treated water flows out from the membrane reactor at high percentage conversion of the contaminants, while the sludge effluent is discharged from the bottom of the bioreactor.
The following assumptions were made in the development of the design equations:
1) The flow rate of the produced water in the MBR is constant throughout.
2) There is no concentration gradient of contaminant in the MBR.
3) The MBR is operated at isothermal, isobaric and steady state condition.
4) There is no diffusion/dispersion of contaminants in the MBR.
Figure 1. Immersed bioreactor configurations.
These assumptions are made to simplify the model and avoid complexity arising from flow rate fluctuation, concentration gradients, density gradients, and diffusivity.
2.2. Material Balance on MBR
Applying the mass conservative principle to the bioreactor in Figure 1 based on the above assumptions gives the overall component balance as:
where: VM = MBR volume (m3), = influent and effluent oxygen concentration (kg/m3), t = Time (hr), = influent and effluent flow rate of oxygen (m3/hr), Ri = Rate of transfer or uptake (kg/m3hr), i = oxygen, contaminants.
In aerobic process, an uptake of oxygen is necessary for the survival of the biomass and products uniformity, thus the rate of oxygen transfer  can be evaluated using the mass transfer equation expressed as:
From Equation (1) with respect to oxygen transfer rate in MBR is expressed as:
Combining Equations (3) and (4) gives
For constant flow rate, Equation (5) reduces to
At steady state operation, rearranging Equation (6) reduces to
where: KL = Oxygen mass transfer coefficient (m/hr), a = Interfacial area of mass transfer (m2/m3), = Saturated oxygen concentration (kg/m3), Jo and J = inflow and outflow flux in the permeate zone (kg/m2 hr).
2.3. Height of MBR
The height of cylindrical shaped reactor is given as:
substituting Equations (7) in (8), we have
The saturated oxygen concentration can be evaluated using equation:
where: = Partial pressure of oxygen (bar), H = Henry’s law constant (bar∙m3/kg)
can be evaluated for non-coalescing fluid  as:
where: vg = superficial gas velocity (m/hr), po = Reference pressure of 1 bar, p = Pressure in the system (bar), = Input power per unit Volume (kW/m3) and it ranges from (0.5 to 10).
2.4. MBR Sizing Base on Contaminants Conversion
The substrate consumption rate is expressed as  :
Substituting Equation (12) into (1), the MBR volume base on substrate consumption at steady state and constant flow rate, after simplification gives:
The substrate rate constant is expressed as:
Combining Equations (13) and (14) gives:
where: S = Substrate concentration (kg/m3), Fc = Flow rate of contaminant (m3/hr), C(o) = Initial concentration of contaminant (kg/m3), xc = Contaminant conversion, Y = Biomass yield, Km = Monod constant.
2.5. Production of Biomass
The evaluation of biomass production in this study was done in terms of mixed liquor suspended solid (MLSS). The performance equations of MBR depend on the production yield of biomass in the process capable of treating the produced water. According to (zaerpour, 2014) biomass production given by 
2.6. Hydraulic Retention Time
The hydraulic retention time (HRT) was calculated according to:
where: HRT = Hydraulic retention time (hours), VM = Volume of MBR, F = Flow rate.
2.7. Solid Retention Time
Solids retention time (SRT) was calculated according to:
The kinetic of biological activities in the MBR was expressed with respect to the substrate consumption and endogenous decay of the produced organism according to (Zaerpour 2014)  as:
where: μ = Specific growth rate of nitrifying bacteria (kg new cells/kg cells day), μm = Maximum specific growth rate of nitrifying bacteria (kg new cells/kg cells day) S = Nitrogen (substrate) concentration (g/m3), Km = Monod constant (kg/m3), kd = Endogenous decay coefficient for nitrifying organisms (kg MLSS/ kg MLSS day).
Combining Equations (18) and (19) gives an expression for SRT as
In terms of substrate conversion, Equation (20) can be further expressed as
2.8. Concentration of Oxygen at Saturation
The concentration of oxygen at saturation point was calculated using the expression:
where C* in the case of oxygen transfer, is measured in terms of solubility of O2.
The Henry’s law constant at 1 atm pressure of oxygen and ambient temperature of 25˚C is 24.2 atm∙m3/kg while the solubility is 8.69 × 10−3 kg/m3.
2.9. Kinetic Parameters
The Monod constant, maximum specific growth rate constant, substrate utilization rate constant and endogenous decay coefficient for nitrifying organisms were obtained from (zaerpour, 2014 and Kwon et al., 2008)   as presented in Table 1.
2.10. Initial Concentration of Contaminants in Oil Field Produced Water
Table 2 shows the initial concentration of contaminants (COD, oil/grease, TSS, TOC and TDS) between 95% to 99% conversion) in Nigerian Agip Oil Company produced water, Port Harcourt.
3. Results and Discussion
Table 3 shows the dimensions of the membrane bioreactor at a capacity of 54.1778 kg/hr for 95% and 99% conversion of contaminants. The volume, height
Table 1. Bio-kinetic parameters of MBR.
Table 2. Initial concentration of contaminants in oil field produced water (NAOC, 2017)  .
Table 3. Summary of design parameters at S = 1.0 kg/m3, diameter of 1.5 m and substrate rate constant of 6 h∙r−1.
and the hydraulic retention time of the bioreactor at 95% conversion were 1.10 m3, 0.98 m and 1.38 hours respectively as compared with 5.29 m3, 4.68 m and 6.62 hours at 99% conversion. This indicates that at 95% conversion with smaller dimensions, the cost implication will be of advantage and the bioreactor will occupy less space.
Table 4 depicts the comparison between Design Model Predictions (Equations (7)-(21)) and Department of Petroleum Resources  (DPR, 1999) standard for produced water effluent concentrations indicating that the predicted data at 95% - 99% conversion agree reasonably well with the DPR standard. The concentrations of oil/grease, TSS, TDS, TOC and COD at 99% conversion were 0.0045, 0.008, 0.065, 0.01 and 0.012 kg/m3 respectively and 0.0225, 0.04, 0.325, 0.05 and 0.06 kg/m3 at 95% conversion as compared with DPR standard of 0.04, 0.05, 2.0, 0.04, and “no limit” respectively. Although the degree of conversion at 99% is higher than that of 95%, the cost implication would be enormous to operate at 99% since 95% meets the regulatory standard of DPR.
3.1. Effect of Substrate Specific Rate Constant on the Retention of Oil/Grease by MBR
The substrate specific rate is an important parameter in the design of MBR. Increasing or decreasing of substrate rate can affect the production of nitrogenous organisms that utilizes the produced water contaminant and thereby affecting its concentration in the produced water at the exit stream. Figures 2-4 show the profile of MBR volume, length and hydraulic retention time (HRT) versus conversion of produced water oil/grease contaminant at varying rate constants.
The effect of rate constant on the volume of MBR is shown in Figure 2. As the conversion increased, the volume also increased at various specific rate constant. At the rate constants investigated (2 to 8 h−1), the MBR volume required for the conversion of oil contaminant in produced water varied. Thus, at 95% to 99%
Figure 2. Volume of MBR versus oil/grease conversion.
Figure 3. MBR height versus oil/grease conversion.
Figure 4. Effect of specific rate constant on HRT.
Table 4. Comparison of DPR standard for effluent concentrations and model predictions of contaminant after treatment.
oil reduction, the volume of MBR increased from 1.45 to 6.95 m3 at rate constant of 2 h−1, 0.73 to 3.48 m3 at 4 h−1, 0.48 to 2.32 m3 at 6 h−1 and 0.36 to 1.74 m3 at 8 h−1. However, the volume decreased with increase in specific rate constant. Indicating that, substrate rate constant influenced MBR performance and the optimum operational volume should be tailored to achieve high percentage removal of oil contaminants in produced water.
The effect of rate constant on the height of MBR is shown in Figure 3. In similar profile like the volume, the conversion of oil contaminated produced water increased with increase in height, while increasing the specific rate constant for substrate utilization resulted in decrease in the height. Thus, at 95% to 99% oil reduction, the height of MBR increased from 1.28 to 6.15 m at rate constant of 2 h−1, 0.64 to 3.67 m at 4 h−1, 0.43 to 2.05 m at 6 h−1 and 0.32 to 1.54 m at 8 h−1. This implies that, higher percentage removal of oil contaminant could be obtained when the substrate rate constant is controlled.
The variation of rate constant with HRT was also investigated as shown in Figure 4. Similarly, the conversion of oil contaminated produced water increased with increase in HRT, while the HRT decreased with increase in the specific rate constant. At 95% to 99% oil reduction, the HRT increased from 2.91 to 13.96 hr at rate constant of 2 h−1, 1.45 to 6.95 hr at 4 h−1, 0.97 to 4.63 hr at 6 h−1 and 0.73 to 3.48 hr at 8 h−1. However, hydraulic retention time as an important parameter in the design of MBR for the treatment of produced water needs to be sufficient for high removal contaminants. (Zaerpour 2014) reported a range of HRT obtained from 13 MBRs in the United States to be from 2 to 8.1 hr  , while Naghizadeh et al. (2013) obtained a range of HRT from 4 to 12.8 hr at different runs and conditions  .
3.2. Effect of Rate Energy Supplied per Volume (P/V) on Conversion of COD
Figures 5-7 show the effect of P/V on the conversion of Chemical Oxygen Demand (COD) relative to MBR size and Hydraulic Retention Time (HRT). The rate of energy supplied per reactor volume was investigated following range of values recommended by (Badrnezhad and Beni, 2013)  . Figure 5 shows the conversion of COD at varying P/V. COD conversion increased with increase in the volume but decreases with increase in the ratio of energy supplied per volume. Thus, at 95% to 99% COD conversion, the corresponding volume of MBR were 0.34 to 5.91 m3 at 4 kW/m3, 0.25 to 4.44 m3 at 6 kW/m3, 0.21 to 3.64 m3 at 8 kW/m3 and 0.18 to 3.11 m3 at 10 kW/m3. These values were in agreement with values obtained by (Janus 2013)  with optimum energy/volume of 9.5 kW/m3.
These showed that energy supply per volume of reactor was essential for the determination of the overall performance of MBR operations. However, the removal of COD using MBR has been reported with high percentage conversion    .
The effects of energy supplied per reactor volume on conversion of COD with respect to height is shown in Figure 6. The conversion of COD increased with
Figure 5. Effect of rate energy supplied per volume on MBR Volume.
Figure 6. Effect of rate of energy supply per volume on MBR Height.
Figure 7. Effect of rate of energy supply per volume on HRT.
increase in height at a fixed rate of energy supply per volume, while the increase in the rate of energy supply per volume resulted in the decrease of height at a fixed COD percentage removal. Thus at 95% to 99% COD conversion, the height increased from 0.30 to 5.22 m at 4 kW/m3, 0.22 to 3.93 m at 6 kW/m3, 0.18 to 3.21 m at 8 kW/m3 and 0.16 to 2.75 m at 10 kW/m3. The results showed that the operation of MBR with moderate height capable of removing high percentage of COD required high rate of energy supply per volume.
The effect of rate energy supply per volume on HRT is depicted as shown in Figure 7. The conversion of COD in produced water increased with increase in HRT at fixed energy per volume, while HRT decreased with increase in the rate of energy per volume at fixed COD conversion. At 95% to 99% conversion of COD, the HRT increased from 0.42 to 7.38 hr at 4 kW/m3, 0.32 to 5.56 hr at 6 kW/m3, 0.26 to 4.54 hr at 8 kW/m3 and 0.22 to 3.89 hr at 10 kW/m3. These again, showed that hydraulic retention time influenced the rate of energy supply per volume of MBR produced water treatment process.
3.3. Variation of Contaminant Conversion with Volume of MBR
Figure 8 shows the MBR volume required for the conversion of contaminants in produced water. At every fixed percentage removal, the MBR volume required to treat the investigated contaminant increased in the following order: oil/grease < TSS < TOC < TDS. However, the contaminants’ conversion increased exponentially as volume increased. For the four contaminants studied, the corresponding volume required to remove 95% to 99% of the contaminants were: 0.36 to 1.74 m3 for oil/grease, 0.60 to 2.94 m3 for TSS, 0.66 to 3.25 m3 for TOC and 1.10 to 5.29 m3 for TDS.
Although, the concentration of contaminants in oil field produced water may not be the same, it is reasonable that when designing a MBR for multicomponent treatment, the size should be considered based on the contaminants
Figure 8. Variation of contaminant conversion with mbr volume.
with highest concentrations. However, various works on treatment of produced water contaminants have been studied with various percentage conversions (removal) as recommended by (Kwong et al., 2008; Sharrer et al., 2010 Badrnezhad and Beni, 2013; Naghizadeh et al., 2013 and Mousa and Arafat, 2015)      .
The variation of conversion of contaminants with height is shown in Figure 9. Thus, at every fixed percentage removal, the MBR height required to treat the produced water contaminants increased in the following order: oil/grease < TSS < TOC < TDS. The corresponding height required to remove 95% to 99% of the contaminants were: 0.32 to 1.54 m for oil/grease, 0.53 to 2.60 m for TSS, and 0.58 to 2.87 m for TOC and 0.98 to 4.68 m for TDS. Likewise, the design of MBR for treatment multi-component contaminants should be considered with reference to the contaminants with highest concentration.
The variation of the HRT with conversion is shown in Figure 10. In a similar manner, the conversion of contaminants increased with increased in HRT. The
Figure 9. Comparison of contaminant conversion versus height conversion.
Figure 10. Variation of Contaminant Conversion versus HRT.
highest HRT was observed in TDS while the lowest was in oil/grease. This was because of the variation in the composition of contaminants in the produced water. At 95% to 99% conversion, the HRT increased from 0.45 to 2.17 hr for oil/grease, 0.75 to 3.68 hr for TSS, 0.82 to 4.06 hr for TOC and 1.38 to 6.62 hr for TDS.
3.4. Effect of Substrate Loading on Solid Retention Time (SRT)
The capacity of the membrane to trap and keep hold of the solid contaminant at a substantial period depends on the substrate loading and the pore size of the membrane.
The effects of initial loading of substrate on SRT is shown in Figure 11. Increased in substrate loading resulted in the increase in retention time of the solid at a fixed substrate conversion. Also, the conversion of substrate by micro-organisms increased as the solid retention time increased. However, excess loading of the substrates could promote the fouling of the membrane thereby reducing the performance of the treatment process. At substrate conversion between 0% and 50%, the SRT obtained were 58.86, 82.67 and 138.22 days at initial loading of 0.8, 1.0 and 1.2 kg/m3 respectively. However, different SRT values had been obtained using MBR: 100 days by kwong et al. (2008)  and 24.7 days by Sharrer et al. (2010)  .
The effect substrate loading on mixed liquor suspended solids (MLSS) production is depicted in Figure 12. The concentration of substrate in the membrane affects the growth of micro-organisms and hence, their activities in decomposing contaminants. Thus, increase in the initial loading of substrate concentration increased the population of the organisms. Though, between zero and about 1 hour, there was a lag in biomass growth, which could be attributed to process of microbes’ adaptation. MLSS concentration changed the kinetics of the treatment process and it was influenced by the concentration and type of nutrient’s source  . However, the biomass concentration at the initial substrate loading of 0.8, 1.0 and 1.2 kg/m3 are 0.37, 0.46 and 0.55 at HRT of 4.35 hr.
Figure 11. Effect of initial loading of nitrate compound on SRT.
The volume of MBR required for the removal of produced water contaminants between 95% to 99% at 1.0 kg/m3 initial substrate loading is shown in Figure 13. The MRB size required to remove the contaminants from produced water increased as the MLSS concentration was increased. However, with the produced MLSS concentration, oil/grease required smaller volume of MBR as compared with TDS.
Computer-aided design and simulation of a membrane bioreactor for treatment of produced water has been presented. The design equations were obtained from the law of conservation of mass on a submerged membrane in a bioreactor supplied with oxygen and adopting Monod equation at a capacity of 54.18 kg/hr for 95% to 99% removal of the contaminants (COD, TTS, TOC, TDS and oil/ grease). Results obtained from the models indicate that the volume, height
Figure 12. Biomass (MLSS) production against HRT.
Figure 13. Volume versus MLSS.
and hydraulic retention time were 1.10 and 5.29 m3; 0.98 and 4.68 m; and 1.38 and 6.62 at 95% and 99% conversion respectively, while the SRT was 82.7 days. Simulation of functional parameters indicate that the substrate specific rate constant, hydraulic retention time, substrate loading, solid retention time, biomass production, oxygen utilization, substrate consumption, rate of energy supplied per volume are functional parameters that affect the rate of contaminants conversion in the following trend: oil/grease < TSS
 Coday, B.D., Xu, P., Beaudry, E.G., Herron, J., Lampi, K., Hancock, N.T. and Cath, T.Y. (2014) The Sweet Spot of forward Osmosis: Treatment of Produced Water, Drilling Wastewater, and other Complex and Difficult Liquid Streams. Desalination, 333, 23-35. https://doi.org/10.1016/j.desal.2013.11.014
 Clark, C.E. and Veil, J.A. (2009) Produced Water Volumes and Management Practices in the United State. Department of Energy, United State of America, 11-13. http://www.osti.gov/bridge
 Ahmadun, F.R., Pendashteh, A., Abdullah, L.C., Awang Biak, D.R., Madaeni, S.S. and Abidin, Z.Z. (2009) Review of Technologies for Oil and Gas Produced Water Treatment. Journal of Hazardous Materials, 170, 530-551. https://doi.org/10.1016/j.jhazmat.2009.05.044
 Shubo, D., Gang, Y., Zhongxi, C., Di, W., Fujun, X. and Neng, J. (2009) Characterization of Suspended Solids in Produced Water in Daqing Oilfield. Colloids and Surfaces, 332, 63-69. https://doi.org/10.1016/j.colsurfa.2008.09.004
 Badrnezhad, R. and Beni, A.H. (2013) Ultrafiltration Membrane Process for Produced Water Treatment: Experimental and Modeling. Journal of Water Reuse and Desa-lination, 3, 249-259. https://doi.org/10.2166/wrd.2013.092
 Zaerpour, M. (2014) Design, Cost and Benefit Analysis of a Membrane Bioreactor. Master Thesis, Department of Environmental and Geomatic Engineering, Politecnico diMilano, 710. www.google.com/masoud_zaerpour/membrane_bioreactor/html
 Kwon, S., Sullivan, E.J., Katz, L., Kinney, K., Chen, C., Bowman, R. and Simpson, J. (2008) Pilot Scale Test of a Produced Water-Treatment System for Initial Removal of Organic Compounds. SPE Annual Technical Conference and Exhibition (ATCE).
 Janus, T. (2013) Integrated Mathematical Model of a MBR Reactor Including Biopolymer Kinetics and Membrane Fouling. 12th International Conference on Computing and Control for the Water Industry. www.elsevier.com/locate/procedia
 Sharrer, M.J., Rishel, K. and Summerfelt, S.T. (2010) Evaluation of a Membrane Biological Reactor for Reclaiming Water, Alkalinity, Salts, Phosphorus, and Protein Contained in a High-Strength Aquacultural Wastewater. Bioresource Technology, 101, 4322-4330. https://doi.org/10.1016/j.biortech.2010.01.067
 Mousa, K.M. and Arafat, S.A. (2015) Experimental Study on Treatment of Produced Water. Journal of Chemical Engineering and Process Technology, 6, 257-261. https://doi.org/10.4172/2157-7048.1000261
 Shirazi, M.J.A., Bazgir, S. and Shirazi, M.M.A. (2014) Edible Oil Mill Effluent; a Low-Cost Source for Economizing Biodiesel Production: Electrospun Nanofibrous Coalescing Filtration Approach. Biofuel Research Journal, 1, 39-42. https://doi.org/10.18331/BRJ2015.1.1.9