Introduction

Water pollution from pharmaceutical enterprises has been a worry since the 1990s owing to an environmental problem caused by its mixing wastewater with water bodies, which leads to the risk of this polluted water. This kind of wastewater often contains significant levels of organic chemicals, antibiotics, detergents, surfactants, and chlorinated compounds, all of which are classified as hazardous pollutants (Papadimitrioua et al. 2007).

Therefore, the development of effective techniques for the removal of pharmaceutical compounds from wastewater is important (Gernjak et al. 2003). Biological treatment is a practical and not expensive solution to treat this kind of effluent compared to chemical methods (Marrot et al. 2006). One of the most economic methods for wastewater treatment is activated sludge (AS) due to the various populations of microorganisms in the  AS that can degrade a wide range of organic compounds (Baptiste et al. 2019). The limits of the biological process are related to the acclimatization of the biomass to degrade the variability of the wastewater composition. During this acclimatization, there is a selection and a multiplication of specialized microorganisms (Kumar et al. 2005). The acclimatization of microorganisms to the drug compound increases biodegradability, in which the acclimatization process makes the desired bacteria predominant (Asante-Sackey et al. 2022). Numerous studies have been conducted utilizing unconventional approaches based on putative microbial abilities to degrade these medications employing bacterial strains, certain yeast strains, and immobilization of microorganisms (Martins et al. 2004).

Membrane bioreactor's (MBR's) role is based on the combination of the biological stage and filtration stage by membrane without any need for secondary clarification and sand filtration (Shariati et al. 2010). The most kind of membranes which are used in MBR are microfiltration or ultrafiltration. MBR is divided into two types according to their configuration; a submerged/immersed membrane bioreactor and an outdoor MBR is the combination of a traditional bioreactor with a membrane filtration device into a single unit process (Gao et al. 2022). The advantages of the external MBR are easy in maintain, flexible and provides high flux in the range of 40 to 100 L/m2.h, also has low membrane packing density, so it can be easily cleaned. The disadvantage of external MBR is using high energy consumption of 2 to 10 kWh/m3 compared with the range of internal MBR energy consumption 0.2 to 0.4 kWh/m3 (Visvanathan et al. 2000).

According to many researchs, hybrid technology and integrated MBR offer promising possibilities for removing specific medicinal products from pharmaceutical wastewater. Mirzaei et al. (2019) showed that traditional wastewater treatment facilities (A2O configuration: Anaerobic, Anoxic, and Oxic tanks) are incapable of completely removing routinely prescribed antibiotics from municipal wastewater streams. As a result, there is a significant need for the development of new and cost-effective wastewater treatment methods capable of treating industrial wastewater streams efficiently and removing developing pollutants. Soorena and Hossein (2022) describe how they improved the treatment of pharmaceutical wastewater by combining electrooxidation (EO) with a membrane bioreactor.

In this work, the economic evaluation of the biological system composed of an anoxic zone and AS zone integrated with an external ultrafiltration membrane was studied according to the merits of this system including easy maintenance, easy membrane handling and cleaning, and  saving in energy by combination of  anoxic zone and aerobic zone.

The novelty of the study  is the analysis and development of an integrated system between a biological process (anoxic/aerobic activated sludge) and an ultrafiltration membrane. Due to the restriction on biofouling which results from the opportunity that an anoxic unit offers for the generation of floc of microorganism that demonstrates good settling, the need for membrane maintenance has been decreased.

Materials and methods

Industrial wastewater was collected from different places from CID company for the pharmaceutical industry, El-Haram, Giza, Egypt. Table 1 represents the chemical and physical characteristics of samples of wastewater from this company. The samples source from the factory are identified as:

  1. 1.

    Total final wastewater collection stream for the factory

  2. 2.

    Drainage of vitamin C effervescent tablet solutions

  3. 3.

    Compilation of drainage ointments and cough syrup

  4. 4.

    Drainage of the water ampoule unit and water treatment plant.

  5. 5.

    Drainage of the administration building

Table 1 Characteristics of industrial wastewater

For the biological process, sludge was obtained from a domestic sewage secondary treatment plant at Zenin-Giza and pre-acclimatized for 10 weeks using real pharmaceutical wastewater as a sole carbon source.

For spiral wound membrane module preparation, the UF membrane was prepared using polyvinylidene difluoride (PVDF) and polyacrylonitrile (PAN), which were obtained from Sigma-Aldrich. N-Methyl pyrrolidone (NMP) and polyethylene glycol were purchased from Roth specialties India.

Membrane fabrication

Ultrafiltration membrane was fabricated using 13 wt% PVDF, 2wt% PAN, 3wt% PEG, and 82% NMP on the large scale using the continuous casting machine and then was washed in the washing machine, which is designed specially to avoid harming the membrane and remove excess chemicals. The continuous casting machine and washing machine were located in the scientific building of excellence in the National Research Center, Egypt. The prepared membranes were rolled and formed as spiral wound modules for the pilot test. National Research Centre (NRC), Egypt, has spiral wound module fabrication machines, where the prepared membranes were cut and adjusted to be 100 cm in width and 180 cm long. Six folded membranes were used to prepare spiral wound module 4040. Feed spacer was used between folded membranes and permeate carrier was used to collect the permeate water to the perforated tube. Finally, a fiberglass winding machine was used to enhance the module with fiberglass to protect and make the module able to carry the pressure.

A JEOL 5410 scanning electron microscope (SEM) characterized the manufactured UF membrane. Membrane porosity and contact angle were monitored, with the densometer equipment determining membrane porosity and recording average results. A compact video microscope (CVM) was used to evaluate the contact angle of produced membranes using the ASTM D724-99 standard test technique for the surface wet ability of paper and the ASTM D5946-96 standard procedures for corona-treated polymer films utilizing water contact angle measurements. The produced UF membrane has a contact angle of 80.6, whereas the pure PVDF polymeric membranes have a contact angle of 150. This suggests that employing PAN 2 wt% improves membrane hydrophilicity. The created membrane had a porosity of 58.3%, which might be attributed to the use of PEG at a concentration of 3 wt% as a pore forming during membrane synthesis.

Pilot experimental setup

Figure 1 depicts a schematic representation of the experimental biological/UF pilot set-up comprising the anoxic tank of 25 L, a rectangular aeration basin (50L), and a collecting vessel (3L). The aeration was provided by a diffused air system by the compressor and a perforated PVC tubular diffuser was kept at the bottom to give satisfactory biological floc. mixing. After the collecting tank was filled, the water was drawn using a feeding pump to the ultrafiltration membrane for the final water treatment step. The anoxic/aerobic activated sludge process was carried out at the initial COD concentration (Ci) of 2340 mg/l and by adjusting the F/M ratio to 1.46 h−1 in the anoxic zone. The effluent from the anoxic zone was considered as a feed to the aerobic AS zone at HRT of 10 h, and F/M of 0.2 d−1, where the feed COD concentration reduced to 1095 mg/l after the anoxic treatment zone. Two stages anoxic and aeration were carried out under pH 6–7 (Ali et al. 2023). The pilot ultrafiltration unit as shown in Fig. 2, consists of a feeding tank of 90L connected to a spiral wound membrane module directly by a feeding pump, and the permeate was collected in permeate tank. UV–vis spectrophotometer (Carry 100) was used to measure the concentration of the wastewater. All parameters including COD, MLSS, MLVSS, and SVI were measured (Asante-Sackey et al. 2022).

Fig. 1
figure 1

Schematic drawing for experimental biological pilot set-up and UF

Fig. 2
figure 2

UF pilot system

Feasibility study of the integrated system of anoxic /activated sludge and ultrafiltration

For the purpose of calculating the operating cost, the following terms were considered: operation and maintenance of membrane system, mixing, pumping, permeate pumping, chemical reagent consumption for membrane cleaning, replacing membranes at the end of membrane lifespan, and any equipment replacement. The cost of the UF module was calculated using WTCost II software, while the biological reactor cost was estimated to be the MBR system.

Results and discussion

Industrial wastewater treatment pilot experiments

The physical and chemical characteristics of the studied industrial wastewater are presented in Table 1. The final mixed stream (sample 1) of the factory analysis results indicate that the COD concentration of 2433 mg/l and TSS concentration of 612 mg/l from CID company, AL- harm, Giza, Egypt. This sample was tested using biological treatment because it was considered the highest organic load sample according to the analysis. In other samples, the UF membrane can be used directly to separate all wasting materials from the wastewater samples because these samples contain a low concentration of COD and BOD compared with the sample [1] (Yang et al. 2020; Kulikowska et al. 2019). Accordingly, our study was built on the high-concentration stream from the factory. The treatment of real industrial wastewater using an anoxic/aeration-activated sludge biological treatment process was carried out at the initial COD concentration (Ci) of 2340 mg/l and F/M ratio of 1.46 h−1 at an anoxic zone, the treated water after this zone exhibits a reduction of COD about 55% of this real wastewater at RT of 0.75 h. The effluent from this zone was fed to the second stage aerobic AS treatment, which exhibits removal of COD about 86.9% at HRT of 10 h in the aerobic zone. Table 2 indicates a comparison between different biological treatment steps, which were used in the treatment of real pharmaceutical industrial wastewater. Table. 2 indicates that in the BASP process (conventional process) adjusting the F/M ratio to 0.85 d−1, indicates that the COD removal reaches 85% at 10 h at the investigated parameters. Furthermore, it was clear that adopting an anoxic stage prior to aerobic treatment improves process efficiency, lowering COD from 2433 to 316 mg/l (86.9%) following a 10-h HRT. Also, the applied dissolved oxygen (DO mg/l) in the aeration tank was reduced from 3–4 mg/l to 2mg/l, and the sludge settle ability enhances from 75 to 65 ml/g as referred that the enhancement of membrane lifetime and limited membrane fouling. These results were confirmed by (Hasan et al. 2021) who reported that biological nutrient removal (BNR) was enhanced by a combination of the aerobic step with the anoxic step in the process tank. After the biological treatment process, the collected biologically treated water was fed to the ultrafiltration pilot unit. Using multistage anoxic, aerobic activated sludge then followed by an ultrafiltration membrane represents an external MBR and can provide high efficiency, good permeate quality, and easy operation. The biologically treated water and treated water after UF results are illustrated in Table 3, where the results indicate that the COD removal reached 99% and the removal of oil and grease reached 99.9%. So, the treated water can be recycled back to the factory and can be used in equipment washing. The results indicate that high separation percentage with good productivity. Where the productivity reached 10 m3/day for one module 4040. The experiments were carried out for 30 days and the backwash of the membrane was carried out after 3 days. Figure 3 indicates the experiments of the UF pilot unit for water purification. The figure indicates that a reduction in flux and rising in COD requires backwash for the UF membrane. Figure 4 indicates the removal percentage of all pharmaceutical drugs during operation time, where it reduced slightly during and after backwash, the removal rises again to 99%. The backwash duration is between 30 and 90 min. The reduction of flux may be related to the fouling of the membrane. The fouling of the membrane may be attributed to the adsorption or desorption of bacteria or any organic traces that escaped from the biological treatment and sucked on the membrane surface. So, the pores on the membrane surface are clogged, which leads to flux decline. However, the backwash of the membrane at a certain time can eliminate the fouling on the membrane surface (Kose et al.2012).

Table 2 Comparison between different batch AS systems used for the treatment of real pharmaceutical industrial wastewater
Table 3 Analysis of treated and untreated water
Fig. 3
figure 3

UF membrane pilot performance results

Fig. 4
figure 4

UF membrane pilot removal test of pharmaceutical drugs

Feasibility study of the optimum integrated treatment system

Conceptual design

According to the results of the pilot system, the conceptual design of the industrial unit for the treatment of pharmaceutical wastewater with a productivity of 1000 m3/day was designed to be composed of an anoxic tank combined with an aeration tank, then the treated water flows to the settling tank, in the middle of the collecting tank, the submerged pump will be located to draw the clarified water to booster pump to push the water to the UF unit the capacity of the biological treatment is 1500 m3/day. Biological process operation time is 22 h. and 2h for the settling process. The UF unit consists of 10 modules spiral wounds in commercial size of 8040, where the one module productivity is 100 m3/day. Figure 5 illustrates the conceptual design for the integrated unit. Table 4 indicates the design of the integrated units of the biological and membrane system.

Fig. 5
figure 5

Conceptual design for the integrated unit

Table 4 Design of the integrated units of biological and membrane system

Design parameters and technical considerations

The design parameters of biological reactor followed by UF membrane system for one stream of the factory are presented in Table 5. The designed productivity was 1000 m3/d, the UF membrane properties are mentioned in Table 6. The configuration was designed for ambient (25 °C) environments. Because they are often used for wastewater treatment, bioreactor and membranes were chosen as the configuration. A bioreactor and spiral wound UF modules system was used because membrane maintenance is easier in a two-stage design than in a single-stage technique. The plant was made up of an anoxic and aeration concrete volume with a total capacity of 93 m3 and UF unit with 50 nm pore size, 32.4 m2 total filtering area. The plant was designed to run at regulated hydraulic retention time in the aeration tank for 10 h and solids retention time varying from 7 to 8 days. The amount of energy required for stirring was calculated to be 0.1–0.3 kWh/m3. The membrane cleaning regimen consisted of a weekly clean-in-place (CIP) using sodium hypochlorite and citric acid in a concentration of 500 mg/l (Samuel et al. 2005). The wastewater initially flows to the anoxic zone, then is followed by an aeration zone. The wastewater is situated where microorganisms provide biological cleansing in the wastewater aeration tank (Li et al. 2019). In a regulated cleaning operation, short aeration and rest periods alternate (Brepols et al. 2008). The aeration type used is diffused aeration system with a fine bubble size. Different types of pumps are used along the process; a submerged pump (Stainless Steel AISI 304) will be fixed in the middle of the collecting tank high over the slurry to push the light water to the feeding pump, and the feed pumps to the UF unit (material of construction is stainless steel 314).

Table 5 Design parameters of the designed system
Table 6 UF membrane characteristics

Cost of treatment and power consumption analysis

According to Guo et al. (2014) and Jalab et al. (2019), the investment cost for a 1 MLD flow-capacity facility ranges from USD 2.9 million to USD 6.9 million. MBR technology for industrial wastewater treatment often has greater capital expenditures and a larger land footprint than municipal treatment because to the higher concentration of feed and longer treatment period.

The cost of the UF module is calculated using WTCOST software, while the biological reactor cost is estimated to be as the MBR system. According to the EPA as the unit capital cost of an MBR system is between $1715 and $4900 per m3/d, which is a broad range including membrane cost. Other estimates place the overall cost of a 3,785 m3/d MBR plant between $7,710,000 and $9,280,000 (Verrecht et al 2010). The estimated cost of MBR unit was according to various capacities reported by DeCarolis et al. (2007). All bioreactor and UF system costs are updated using the current Engineering News-Record 2021 (ENR.com). Table 7 illustrates biological /UF system costs.

Table 7 Biological Reactor/UF system cost

The unit capital cost of the estimated system per cubic meter is 1.27 $, which is lower than the estimated published cost, as the membrane cost internationally is higher than the locally manufactured membrane by 40% (Qin et al.2007). Indirect capital cost includes interest during construction (6%), contingency, insurance, and taxes. Membrane systems, reactor construction, and energy needs continued to be the most significant factors in total cost (representing around 32, 45, and 20%, respectively). The O&M cost is lower by about 50% due to the design consideration and the lower maintenance cost of the locally manufactured membrane (Singh et al. 2016). The unit cost for the designed system is 0.2 $/m3. By comparing the results with other MBR costs, the estimated unit cost is lower by 28.3%. Table 8 indicates a simple comparison between different kinds of MBR and membranes, while Table 9 compares between different technologies for treating pharmaceutical wastewater with the proposed system.

Table 8 Comparison between different MBRs with different membranes type
Table 9 Comparison between different technologies for treating pharmaceutical wastewater

Conclusion

In this work, an integrated biological/membrane system for pharmaceutical company wastewater treatment is developed. The system will be utilized to recycle treated water back into industrial operations, particularly for equipment washing. The system was made up of an ultrafiltration membrane to imitate the outdoor MBR and a biological treatment procedure after that. The outcomes show a high degree of separation of organic components; for example, the COD was decreased from 2433 mg/L to 4.4 mg/L or 99% elimination. The pilot system for module 4040 had a productivity of 10 m3/day. However, the contamination of all drug compounds in the wastewater may be removed with great efficiency by employing the biological treatment phase as a pretreatment before the membrane. Accordingly, the economic study for design and building the integrated system of biological treatment of anoxic and aeration with UF spiral wound membranes unit was studied and indicates that the unit capital cost of the estimated system per cubic meter was 1.27 $/m3, which was lower than the estimated published cost and lower than the commercial MBR system.