Recovery of Water from Textile Dyeing Using Membrane Filtration Processes

: The aim of the work was to purify model textile wastewater (MTW) using a two-stage membrane ﬁltration process comprising nanoﬁltration (NF) and reverse osmosis (RO). For this purpose, a nanoﬁltration membrane TFC-SR3 (KOCH) and reverse osmosis membrane AG (GE Osmonics) were used. Each model wastewater contained a selected surfactant. The greatest decrease in ﬂux in the initial phase of the process occurred for the detergents based on fatty-acid condensation products. An evident decrease in performance was observed with polysiloxane-based surfactants. No fouling effect and high ﬂux values were observed for the wastewater containing a nonionic surfactant based on fatty alcohol ethoxylates. During RO, a signiﬁcantly higher ﬂux and lower resistance were observed for the feed that originally contained the anionic agent. For the MTW containing the nonionic surfactant, the conductivity reduction ranged from 84% to 92% depending on the concentrate ratio at the consecutive stages of RO. After treatment, the puriﬁed wastewater was reused in the process of dyeing cellulose ﬁbers with reactive dyes. The research conﬁrmed that textiles dyed with the use of RO ﬁltrates did not differ in quality of dyeing from those dyed in pure deionized water.


Introduction
The textile industry is one of the most demanding in terms of water consumption [1,2]. Despite the fact that it uses less and less water, the problem of wastewater is still a matter of concern. The demand for water depends on several factors such as the product range, the bath ratio (the mass of fiber related to the bath volume), the number of unit operations in the technological process, and the type of finishing machine. Hence, the volume of water consumed by a textile plant may vary from 100,000 to 300,000 m 3 per year. Clothing production has almost doubled in the last 15 years. As textiles satisfy a significant part of human needs, it is estimated that, in 2050, the total supply of clothing will reach 160 million metric tons, which is three times more than today. This will significantly the increase the negative environmental impact of the textile industry. The consumption of water and energy, as well as the amount of pollutants discharged with wastewater, will grow.
The development of the modern textile industry is accompanied by the growth of low-waste and waste-free technologies, such as coating or spraying. Such methods prevent highly toxic intermediates from entering the wastewater (e.g., during flame-retardant finishing of textiles). However, the so-called "waste-free" technologies still require water as a medium that must be treated afterward.
Textile wastewater contains a great variety of pollutants. The finishing processes involve a series of unit operations that use large amounts of various inorganic compounds, such as alkalis and acids, as well as a number of organic compounds, including dyes [3].
demonstrated. The research also included, rarely found in the literature, measurements of the dyeing quality of dyed textiles in comparison to samples dyed in pure water. The tests were carried out for model wastewater after the dyeing process containing various types of detergents. The series of experiments presented in this paper was not found in the available literature.

Materials and Methods
The model textile wastewater (MTW) was prepared on the basis of numerous analyses of actual textile wastewater generated during the industrial dyeing process. The MTW contained two types of dyes, i.e., a reactive dye (Helactin Red DEBN, BORUTA-ZACHEM) and a direct dye (Direct Scarlet4BS, BORUTA-ZACHEM), each at a concentration of 0.05 g/dm 3 , NaCl and Na 2 CO 3 at concentrations of 4 g/dm 3 and 1 g/dm 3 respectively, and one of the selected surfactants at a concentration of 0.2 g/dm 3 (Table 1). The chemical structures of the tested dyes are presented in Figure 1. wastewater treatment (good water parameters). The tests were performed using the same reverse osmosis membrane (AG Osmonics). This allowed for the evaluation of the membrane service life. The real possibilities of using purified water in dyeing processes have been demonstrated. The research also included, rarely found in the literature, measurements of the dyeing quality of dyed textiles in comparison to samples dyed in pure water.
The tests were carried out for model wastewater after the dyeing process containing various types of detergents. The series of experiments presented in this paper was not found in the available literature.

Materials and Methods
The model textile wastewater (MTW) was prepared on the basis of numerous analyses of actual textile wastewater generated during the industrial dyeing process. The MTW contained two types of dyes, i.e., a reactive dye (Helactin Red DEBN, BORUTA-ZACHEM) and a direct dye (Direct Scarlet4BS, BORUTA-ZACHEM), each at a concentration of 0.05 g/dm 3 , NaCl and Na2CO3 at concentrations of 4 g/dm 3 and 1 g/dm 3 respectively, and one of the selected surfactants at a concentration of 0.2 g/dm 3 ( Table 1). The chemical structures of the tested dyes are presented in Figure 1.    To confirm the usefulness of the AG membrane for multistage treatment, additional RO experiments were carried out using the model feed containing a nonionic surfactant and imitating the actual permeate from the nanofiltration process (PNF).

Nanofiltration
The process of nanofiltration was carried out in a cross-flow manner at a constant flow rate of up to 2 dm 3 /min, measured with a rotameter (6), at a pressure of 1.5 MPa, measured with a manometer (5), and a temperature of 30 • C. The thermostated model feed with a volume of 5 dm 3 was pumped through the pressure chamber (4). The filtrate (permeate) was collected in a separate vessel (7), which caused a gradual concentration of the feed stream, i.e., concentrate. The process was carried out until the concentration of the concentrate, determined by Equation (3), reached 50%. To purify the model feed, flat nanofiltration and reverse osmosis membranes were selected, whose properties are summarized in Table 2. The nanofiltration system is shown schematically in Figure 2. To confirm the usefulness of the AG membrane for multistage treatment, additional RO experiments were carried out using the model feed containing a nonionic surfactant and imitating the actual permeate from the nanofiltration process (PNF).

Nanofiltration
The process of nanofiltration was carried out in a cross-flow manner at a constant flow rate of up to 2 dm 3 /min, measured with a rotameter (6), at a pressure of 1.5 MPa, measured with a manometer (5), and a temperature of 30 °C. The thermostated model feed with a volume of 5 dm 3 was pumped through the pressure chamber (4). The filtrate (permeate) was collected in a separate vessel (7), which caused a gradual concentration of the feed stream, i.e., concentrate. The process was carried out until the concentration of the concentrate, determined by Equation (3), reached 50%. To purify the model feed, flat nanofiltration and reverse osmosis membranes were selected, whose properties are summarized in Table 2. The nanofiltration system is shown schematically in Figure 2.   The filtrate (permeate) flux (J v ) was calculated using the following equation: where V is the volume of the filtrate (dm 3 ), A is the surface area of the membrane (m 2 ) (A NF = 0.009 m 2 for NF, A RO = 0.014 m 2 for RO), and t is the time (h). The total flow resistance to the fluid flowing through the membrane (R m ) is the sum of the resistance of the clean membrane and the resistance of sediment developed on the membrane during the process. The reason for the latter is the phenomenon of concentration polarization, the formation of a gel layer, adsorption on the membrane surface, clogging of the membrane pores under the influence of pressure, or solid impurities of micro dimension [22,23]. The resistance of a clean membrane depends on the material from which it was made. In the article, it was determined on the basis of testing the averaged pure water flux during the process for 30 • C, 1.0 MPa for NF and 40 • C, 3.0 MPa for RO. The total flow resistance through the membrane (R m ) was calculated using the following equation: where ∆P is the total flow resistance through the membrane (R m ) (Pa), and η is the viscosity of water or test solution at temperature 30 (NF) or 40 • C (RO) (Pa·s).

Reverse Osmosis
The model textile wastewater containing either an anionic (A-S9) or a nonionic (N-S8) surfactant was purified using the OSMONICS unit at a transmembrane pressure of 3 MPa and a temperature of 40 • C. Figure 3 shows a diagram of the RO apparatus. The stream of the filtrate collected in the NF process was directed to the RO membrane module, where it was separated into the purified permeate and the concentrate (retentate). Each RO run was continued until a final concentrate ratio (CR) of 50% was reached, according to Equation (3). During the process, samples of the permeate and the concentrate were taken at CR ranging from 0% to 50%.
concentrate ratio (CR) = permeate mass initial mass of feed solution 100%.
Processes 2021, 9, x FOR PEER REVIEW 6 of 16 The experimental performance was evaluated on the basis of filtration efficiency and the parameters of the treated wastewater such as chemical oxygen demand COD (mg/dm 3 ), total organic carbon TOC (mg C/dm 3 ), absorbance measured at the wavelength at which the mixture showed maximum absorption, and electrolytic conductivity as a measure of salt content (μS/cm).
The chemical oxygen demand and the total organic carbon were measured using HACH LANGE cuvette tests. The measurements were made with a DR 2800 spectrophotometer (HACH LANGE). The method consists of using ready-made HACH LANGE glass cuvette tests that contain ready-made reagents. After adding an appropriate amount of wastewater, a chemical reaction takes place that causes coloration of the liquid present in the glass vial. According to the intensity of the color, using bar codes identifying the samples, the spectrophotometer shows the corresponding COD and TOC values.
The absorbance of the wastewater samples was measured using a UV/Vis JASCO V-630 spectrophotometer.
The conductivity and the pH of the wastewater were examined using a S47-K Sev-enMulti pH/conductometer (Mettler Toledo) equipped with an InLab ® RoutinePro electrode for measuring pH and an InLab ® 731 electrode for measuring electrolytic conductivity. The multistage RO treatment was carried out using the AG membrane and the model feed containing a nonionic surfactant (N-S4). The whole process consisted of four stages, between which the AG membrane was washed (regenerated) with a 10% aqueous solution of citric acid. After each step, the salt concentration and the absorbance of the filtrate and the concentrate were examined. The salt concentration was measured using a CPC-501 Elmetron conductometer, while the color was measured using a UV/Vis Evolution 300 spectrophotometer.
The experimental performance was evaluated on the basis of filtration efficiency and the parameters of the treated wastewater such as chemical oxygen demand COD (mg/dm 3 ), total organic carbon TOC (mg C/dm 3 ), absorbance measured at the wavelength at which the mixture showed maximum absorption, and electrolytic conductivity as a measure of salt content (µS/cm).
The chemical oxygen demand and the total organic carbon were measured using HACH LANGE cuvette tests. The measurements were made with a DR 2800 spectropho-tometer (HACH LANGE). The method consists of using ready-made HACH LANGE glass cuvette tests that contain ready-made reagents. After adding an appropriate amount of wastewater, a chemical reaction takes place that causes coloration of the liquid present in the glass vial. According to the intensity of the color, using bar codes identifying the samples, the spectrophotometer shows the corresponding COD and TOC values.
The absorbance of the wastewater samples was measured using a UV/Vis JASCO V-630 spectrophotometer.
The conductivity and the pH of the wastewater were examined using a S47-K Seven-Multi pH/conductometer (Mettler Toledo) equipped with an InLab ® RoutinePro electrode for measuring pH and an InLab ® 731 electrode for measuring electrolytic conductivity.
The quality of dyeing and the properties of the textile products were estimated on the basis of the relative coloration intensity, determined with a Datacolor 650 spectrophotometer (Datacolor Int., Lawrenceville, NJ, USA), using color-determining Datacolor Tools software.

Dyeing Fibers Using Purified Wastewater
In the final stage of the study, cotton fibers were dyed in a laboratory UGOLINI dyeing machine (Italy) using the purified filtrates. The dyeing process comprised seven unit operations: (1) dyeing; (2) first rinsing after dyeing (for 10 min at 80 • C); (3) second rinsing after dyeing (for 10 min at 40 • C); (4) washing for 15 min at 98 • C in a bath containing 2 g/dm 3 of a nonionic surfactant; (5) rinsing after washing (for 10 min at 80 • C); (6) rinsing and acidification for 10 min at 40 • C with acetic acid; (7) rinsing after acidification (performed in distilled water for 10 min at 40 • C).
The reverse osmosis filtrates were used in all the operations, except for the final rinsing after acidification, in which deionized water was used. The concentrated dye solutions were prepared in deionized water, whereby 1-10 cm 3 of the solution was added to the dyeing bath and filled up to 100 cm 3 with distilled water.
The following reactive dyes were used: SYNOSOL Red K-HL, SYNOSOL Blue K-HL, and SYNOSOL Yellow K-HL. Furthermore, NaCl was added in the amount of either 40 g/dm 3 (1% color intensity) or 30 g/dm 3 (0.1% color intensity). In each case, 15 g/dm 3 of sodium carbonate was also added to the solution.

Nanofiltration
In the first stage of the research, the filtration efficiency was compared with regard to the type of added detergent. Figure 4 shows the permeate flux for various wastewater matrices (J v ). No clear relationships were observed between J v and the type of detergent. When A-S1 was used, a very significant decrease in J v (by approximately 60%) was noted. Additionally, the initial J v was also relatively low (approximately 50 dm 3 /m 2 ·h). It is known that, in the case of charged organic compounds, the degree of fouling is affected by the electrostatic attraction or repulsive forces between the molecule and the membrane [18]. It has been reported that anionic surfactants cause the least problems related to membrane fouling [18]. While fouling caused by charged surfactants is mainly related to electrostatic interactions, for nonionic surfactants, it appears to be related to the hydrophilicity of the membrane and the pore size [24][25][26].
The greatest decrease in flux in the initial phase of the process (50 min) occurred for the detergents based on fatty-acid condensation products (Rudolf GmbH&Co., Berlin, Germany). For cationic C-S4, the flux decreased by approximately 50%, while, for nonionic N-S3, it decreased by 30%. An evident decrease in performance was observed when polysiloxane-based surfactants N-S3 and N-S5 were used. However, the fouling progressed much more slowly. Further investigations would be appropriate with longer experimental Processes 2021, 9, 1833 7 of 15 times and higher concentration ratios. Cationic surfactants tend to adsorb to the membrane surface, which is usually negatively charged [26].
The greatest decrease in flux in the initial phase of the process (50 min) occurred for the detergents based on fatty-acid condensation products (Rudolf GmbH&Co). For cationic C-S4, the flux decreased by approximately 50%, while, for nonionic N-S3, it decreased by 30%. An evident decrease in performance was observed when polysiloxane-based surfactants N-S3 and N-S5 were used. However, the fouling progressed much more slowly. Further investigations would be appropriate with longer experimental times and higher concentration ratios. Cationic surfactants tend to adsorb to the membrane surface, which is usually negatively charged [26].
No fouling effect and high Jv values were observed for the MTW containing nonionic N-S8 based on fatty alcohol ethoxylates (Rudolf GmbH&Co).  No fouling effect and high J v values were observed for the MTW containing nonionic N-S8 based on fatty alcohol ethoxylates (Rudolf GmbH&Co). Figure 5 shows the calculated values of hydraulic resistance of the membranes during the nanofiltration of selected MTWs. The highest resistance occurred for the wastewater containing the cationic C-S6 agent. No significant differences were observed between the resistance values measured for the MTW containing anionic A-S8 and the MTW containing nonionic N-S7. The fouling mechanisms, including concentration polarization, gel layer formation, and pore blocking, introduce additional resistance during the transport through the membrane due to increased osmotic pressure on the feed side [13,26]. between the resistance values measured for the MTW containing anionic A-S8 and the MTW containing nonionic N-S7. The fouling mechanisms, including concentration polarization, gel layer formation, and pore blocking, introduce additional resistance during the transport through the membrane due to increased osmotic pressure on the feed side [13,26]. Kowalska and Klimonda [19] showed that the surfactant concentration in the solution is the key parameter that has a significant influence on the separation performance. Increasing the dose of surfactant in the feed results in deterioration of the membrane permeability and strongly affects its separation properties [19]. At higher concentrations, the surfactants show the ability to form large aggregates (micelles) that can considerably affect the separation mechanism and cause fouling [18]. In this study, the detergent concentrations were selected according to the manufacturer's recommendations. The ultimate goal of the work was to reuse the treated wastewater; however, more research is required on the mechanism of separation of various surfactants.
The experimental results demonstrated that the concentration of the surfactant in the solution was the key parameter that significantly affected the process performance. Increasing the amount of surfactant in the feed impaired the permeability of the membranes and strongly affected their separation properties, which differed significantly at different concentrations [19]. Figure 6 shows the conductivity and the TOC reduction values calculated for selected MTWs, which turned out to be relatively high. According to other researchers, the reten- Kowalska and Klimonda [19] showed that the surfactant concentration in the solution is the key parameter that has a significant influence on the separation performance. Increasing the dose of surfactant in the feed results in deterioration of the membrane permeability and strongly affects its separation properties [19]. At higher concentrations, the surfactants show the ability to form large aggregates (micelles) that can considerably affect the separation mechanism and cause fouling [18].
In this study, the detergent concentrations were selected according to the manufacturer's recommendations. The ultimate goal of the work was to reuse the treated wastewater; however, more research is required on the mechanism of separation of various surfactants.
The experimental results demonstrated that the concentration of the surfactant in the solution was the key parameter that significantly affected the process performance. Increasing the amount of surfactant in the feed impaired the permeability of the membranes and strongly affected their separation properties, which differed significantly at different concentrations [19]. Figure 6 shows the conductivity and the TOC reduction values calculated for selected MTWs, which turned out to be relatively high. According to other researchers, the retention of NaCl on nanofiltration membranes usually ranges from 20% to 40% [18,27]. During the concentration of the MTW containing N-S7 or A-S8, the reduction in conductivity was smaller. Therefore, the results are consistent with the literature data. During the transport of solutes from the feed solution onto the membrane surface, the concentration of the solute on the surface is higher than in the feed, leading to concentration polarization. This causes a gradual increase of salt concentration in the permeate [13]. For MTWs containing a cationic surfactant, the effect was opposite, i.e., the rejection of salt increased. This may have implied strong adsorption of organic compounds onto the membrane surface. A heavily fouled membrane often shows better separation properties because of the reduction in pore size.
Processes 2021, 9, x FOR PEER REVIEW 9 of 16 a nonionic surfactant can be considered independent of the membrane surface charge, but depends primarily on the membrane pore size [15,24].  Table 3 shows the contact angle values measured for the selected MTWs. In the NF process conducted using the TFC-SR3 membrane, the contact angle for the MTW containing C-S6 increased by approximately 60%. A similar behavior of membranes caused by  The reduction in TOC ( Figure 6B) ranged between 78% and 89%. The best results were achieved with the MTW containing anionic A-S8. Other researchers usually noted a high rejection of surfactants (from 90% to 99%) in nanofiltration [15,[18][19][20]. It has been reported that anionic surfactants are best removed by nanofiltration [24]. The rejection of a nonionic surfactant can be considered independent of the membrane surface charge, but depends primarily on the membrane pore size [15,24]. Table 3 shows the contact angle values measured for the selected MTWs. In the NF process conducted using the TFC-SR3 membrane, the contact angle for the MTW containing C-S6 increased by approximately 60%. A similar behavior of membranes caused by their contact with the detergent has also been reported elsewhere [18,28]. Zhu et al. [28] used ultrafiltration to separate oil emulsions using various surfactants. They proved that the detergent load influenced the contact angle of the tested matrix. The highest increase in the contact angle was observed for a cationic detergent, while the lowest was observed for an anionic detergent [28]. The increase in contact angle may have been caused by the adsorption of dye molecules on the surface and in the pores of the membrane. Such a phenomenon was also noted by Korzenowski et al. [18]. According to the authors, the deposition of surfactant aggregates on the membrane surface caused a large increase in its hydrophobicity.

Reverse Osmosis
Reverse osmosis membranes have a retention rate higher than 90% for most types of ionic compounds. They also ensure high quality of the permeate [29]. The decolorization and removal of chemical aids in textile wastewater can be carried out in one-step RO. The problem is the high salt concentration. A higher salt concentration leads to greater osmotic pressure and greater energy required.
The hydrodynamics of the RO process carried out at transmembrane pressures from 0 to 5 MPa using the AG Osmonics membrane and pure water is shown in Figure 7. The permeate flux (J v ) calculated using Equation (1) ranged from 0 to 58.5 dm 3 /(m 2 ·h), while the total flow resistance to the fluid flowing through the membrane (R m ) calculated using Equation (2) ranged from 2.76 to 3.83 × 10 14 1/m.
The second stage of the integrated treatment process, i.e., the reverse osmosis of the model wastewater containing either an anionic (A-S8) or a nonionic (N-S7) surfactant, was carried out at a pressure of 3 MPa. The observed changes in flux with time are shown in Figure 8.
The membrane resistance was stable with time. The resistance was about 4 × 10 14 m −1 for the wastewater with a nonionic agent (N-S7) and about 2 × 10 14 m −1 for the wastewater with an anionic agent (A-S8). A significantly higher flux and lower resistance were observed for the feed that originally contained the anionic agent.
Subtracting the base resistance of the pure membrane from the total resistance (R m ) in the RO process, estimated using distilled water, yielded negative resistance values for the MTW (R MTW ) containing the anionic agent (A-S8) (Figure 9), which indicated an improvement in the hydrodynamic properties of the membrane in the course of the process. This suggested that the negatively charged anionic agent reduced the flow resistance, making the RO process shorter and more efficient.
problem is the high salt concentration. A higher salt concentration leads to greater osmotic pressure and greater energy required.
The hydrodynamics of the RO process carried out at transmembrane pressures from 0 to 5 MPa using the AG Osmonics membrane and pure water is shown in Figure 7. The permeate flux (Jv) calculated using Equation (1) ranged from 0 to 58.5 dm 3 /(m 2· h), while the total flow resistance to the fluid flowing through the membrane (Rm) calculated using Equation (2) ranged from 2.76 to 3.83 × 10 14 1/m.  permeate flux (Jv) calculated using Equation (1) ranged from 0 to 58.5 dm 3 /(m 2· h), while the total flow resistance to the fluid flowing through the membrane (Rm) calculated using Equation (2) ranged from 2.76 to 3.83 × 10 14 1/m.  The membrane resistance was stable with time. The resistance was about 4 × 10 14 m −1 for the wastewater with a nonionic agent (N-S7) and about 2 × 10 14 m −1 for the wastewater with an anionic agent (A-S8). A significantly higher flux and lower resistance were observed for the feed that originally contained the anionic agent.
Subtracting the base resistance of the pure membrane from the total resistance (Rm) in the RO process, estimated using distilled water, yielded negative resistance values for the MTW (RMTW) containing the anionic agent (A-S8) (Figure 9), which indicated an improvement in the hydrodynamic properties of the membrane in the course of the process. This suggested that the negatively charged anionic agent reduced the flow resistance, making the RO process shorter and more efficient. The experimental values of conductivity, pH, chemical oxygen demand, and total organic carbon for the filtrate samples taken after the RO process are presented in Table  4. The addition of the anionic agent improved the filtration process. It can be assumed that the concentration polarization occurred at the membrane surface, i.e., a layer with a higher concentration of the retained substance was formed. The experimental values of conductivity, pH, chemical oxygen demand, and total organic carbon for the filtrate samples taken after the RO process are presented in Table 4. The addition of the anionic agent improved the filtration process. It can be assumed that the concentration polarization occurred at the membrane surface, i.e., a layer with a higher concentration of the retained substance was formed. Table 4. Average measured values of conductivity (σ), pH, chemical oxygen demand (COD), and total organic carbon (TOC) for the filtrate samples. Contact angle and surface energy (SEP) of the membrane after the RO process. W-water; D-diiodomethane; F-formamide. In addition, Table 4 shows the contact angle values measured for the AG membrane using distilled water (W), diiodomethane (D), and formamide (F). The greatest contact angle and, therefore, the highest hydrophobicity was observed upon contact with the anionic agent. When an anionic agent is used, the droplets retain their shape and size and do not spread across the membrane surface.

RO
As a function of the measurements of the contact angle, the surface free energy (SEP) of the membrane was determined using the Owens-Wendt method for the two reference liquids: water and diiodomethane [17,30]. The calculated SEP value was greater (5.28 mN/m) for the membrane that was in contact with the anionic agent compared with the membrane in contact with the nonionic agent (4.71 mN/m).
In order to confirm that the AG membrane was useful for multistage treatment, additional RO experiments were carried out using the model feed. The entire process was divided into four stages. After each stage, the membrane was regenerated by washing in citric acid. Figure 10 shows the observed changes in the permeate flux with time. The flux decreased with time in each individual treatment stage. The highest flux occurred at the beginning of the first stage, when the membrane was fresh and the treatment time was the shortest. Simultaneously, the drop in flux during the first stage was the largest. Each subsequent stage took longer than the previous one, with a smaller drop in flux. Washing the membrane after each stage was not effective enough as it regenerated the membrane only to a certain extent. With each successive stage, the regeneration became less effective due to the phenomenon of irreversible fouling, i.e., the deposition of components of the feed on the surface and in the pores of the membrane. Therefore, washing with the citric acid solution regenerated the membrane only to a relatively small degree.
Conductometric measurements of salt concentration before and after the purification process allowed the reduction in conductivity (R σ ) to be calculated. When the MTW containing the nonionic surfactant (N-S3) was used, the R σ ranged from 84% to 92% depending on the concentrate ratio (CR) at the consecutive stages of RO (see Figure 11, stages 1-4). With time, the R σ decreased (Figure 11), which was particularly evident for the initial zero CR. This may have resulted from the negative influence of concentration polarization at the membrane surface. At the same time, the R σ of a single process stage was the highest when the CR was 12.5% and decreased with increasing concentration and time. The concentration (i.e., conductivity) increased slightly in the filtrate and very strongly in the concentrate as a function of time. A similar tendency was observed by Allegre [4]. However, the retention rate slightly decreased (90-85%) with time and with the concentration of the concentrate (see Figure 11) in subsequent stages of the process. This tendency is shown in Figure 11. the shortest. Simultaneously, the drop in flux during the first stage was the largest. Each subsequent stage took longer than the previous one, with a smaller drop in flux. Washing the membrane after each stage was not effective enough as it regenerated the membrane only to a certain extent. With each successive stage, the regeneration became less effective due to the phenomenon of irreversible fouling, i.e., the deposition of components of the feed on the surface and in the pores of the membrane. Therefore, washing with the citric acid solution regenerated the membrane only to a relatively small degree. Conductometric measurements of salt concentration before and after the purification process allowed the reduction in conductivity (Rσ) to be calculated. When the MTW containing the nonionic surfactant (N-S3) was used, the Rσ ranged from 84% to 92% depending on the concentrate ratio (CR) at the consecutive stages of RO (see Figure 11, stages 1-4). With time, the Rσ decreased (Figure 11), which was particularly evident for the initial zero CR. This may have resulted from the negative influence of concentration polarization at the membrane surface. At the same time, the Rσ of a single process stage was the highest when the CR was 12.5% and decreased with increasing concentration and time. The concentration (i.e., conductivity) increased slightly in the filtrate and very strongly in the concentrate as a function of time. A similar tendency was observed by Allegre [4]. However, the retention rate slightly decreased (90-85%) with time and with the concentration of the concentrate (see Figure 11) in subsequent stages of the process. This tendency is shown in Figure 11. Spectroscopic measurements of the absorbance of permeate and retentate samples taken during the RO process allowed the degree of color reduction to be determined. For all examined filtrate samples, complete separation of dyes from the model textile wastewater was achieved. Good permeate parameters were also obtained in other studies [2]. It should be emphasized that our research on desalination with RO lasted 15 times longer than that presented in the literature [4] and covered subsequent stages of operation of the same membrane, including three rinses.

Dyeing Experiments Using Treated Wastewater
The MTW subjected to nanofiltration and reverse osmosis was used for dyeing cellulose fiber materials (knitted fabric/fabric 100% CO) with reactive dyes. The quality of dyeing was examined instrumentally (Tables 5 and 6).  Figure 11. Reduction in conductivity (R σ ) at different concentrate ratio (CR) vs. time during multistage reverse osmosis of the MTW containing a nonionic surfactant (N-S3) (AG Osmonics membrane).
Spectroscopic measurements of the absorbance of permeate and retentate samples taken during the RO process allowed the degree of color reduction to be determined. For all examined filtrate samples, complete separation of dyes from the model textile wastewater was achieved. Good permeate parameters were also obtained in other studies [2]. It should be emphasized that our research on desalination with RO lasted 15 times longer than that presented in the literature [4] and covered subsequent stages of operation of the same membrane, including three rinses.

Dyeing Experiments Using Treated Wastewater
The MTW subjected to nanofiltration and reverse osmosis was used for dyeing cellulose fiber materials (knitted fabric/fabric 100% CO) with reactive dyes. The quality of dyeing was examined instrumentally (Tables 5 and 6). The nonwoven/knitted fabric dyed in pure deionized water was used as a reference sample. From the technological point of view, it is accepted that the maximum permissible value of parameter ∆E ab is 1. Products with ∆E ab < 1 are considered to be the same in shade and color intensity; in other words, the differences are indistinguishable to the human eye. Values of ∆E ab above 1 indicate differences noticeable to the eye, and, from a technological point of view, such a product is unacceptable.
All samples dyed in treated wastewater, with the exception of the permeate containing N-S8, met the required standards of dyeing quality accepted in the textile industry. The higher ∆E ab value noted for the sample dyed in the permeate containing N-S8 was probably due to irregular dyeing, i.e., poor wetting of the cotton sample.
Tables 6 and 7 summarize the dyeing experiments conducted using the MTW previously subjected to multiple treatment processes, as described above. Experiments confirmed that the repeated recycling of wastewater for the dyeing process of cellulose textiles did not affect the quality of dyeing.

Conclusions
Model textile wastewater (MTW) was purified using two membrane filtration processes arranged in series, i.e., nanofiltration (NF) and reverse osmosis (RO). In the first stage, the possibility of treating textile wastewater containing various types of detergents in the nanofiltration process was investigated. The greatest decrease in flux in the initial phase of the process occurred for the detergents based on fatty-acid condensation products. An evident decrease in performance was observed with polysiloxane-based surfactants. For cationic surfactant the flux decreased by approx. 50%, while for non-ionic surfactant by 30%. No fouling effect and high flux values were observed for the wastewater containing a nonionic surfactant based on fatty alcohol ethoxylates.
The RO process consisted of four stages. During the experiments, irreversible fouling of the membranes was observed, but washing the membranes did not regenerate them efficiently. During RO, a significantly higher flux and lower resistance were observed for the feed that originally contained the anionic agent. For the MTW containing the nonionic surfactant, the conductivity reduction ranged from 84% to 92% depending on the concentrate ratio at the consecutive stages of RO. The membrane resistance was stable with time. The resistance was about 4 × 10 14 m −1 for the wastewater with a nonionic surfactant (based on fatty alcohol ethoxylates) and about 2 × 10 14 m −1 for the wastewater with an anionic surfactant (ethylene oxide condensation product on an aliphatic basis).
The two-stage filtration process of the model textile wastewater resulted in a significant reduction in salt concentration and complete removal of the dye from the filtrate. Moreover, it was proven that the collected filtrate could be reused for dyeing new textile materials. Almost all samples dyed in the treated wastewater met the required standards of dyeing quality accepted in the textile industry.