Deep Study on Fouling Modelling of Ultrafiltration Membranes Used for OMW Treatment: Comparison Between Semi-empirical Models, Response Surface, and Artificial Neural Networks

Olive oil production generates a large amount of wastewater called olive mill wastewater. This paper presents the study of the effect of transmembrane pressure and cross flow velocity on the decrease in permeate flux of different ultrafiltration membranes (material and pore size) when treating a two-phase olive mill wastewater (olive oil washing wastewater). Both semi-empirical models (Hermia models adapted to tangential filtration, combined model, and series resistance model), as well as statistical and machine learning methods (response surface methodology and artificial neural networks), were studied. Regarding the Hermia model, despite the good fit, the main drawback is that it does not consider the possibility that these mechanisms occur simultaneously in the same process. According to the accuracy of the fit of the models, in terms of R2 and SD, both the series resistance model and the combined model were able to represent the experimental data well. This indicates that both cake layer formation and pore blockage contributed to membrane fouling. The inorganic membranes showed a greater tendency to irreversible fouling, with higher values of the Ra/RT (adsorption/total resistance) ratio. Response surface methodology ANOVA showed that both cross flow velocity and transmembrane pressure are significant variables with respect to permeate flux for all membranes studied. Regarding artificial neural networks, the tansig function presented better results than the selu function, all presenting high R2, ranging from 0.96 to 0.99. However, the comparison of all the analyzed models showed that depending on the membrane, one model fits better than the others. Finally, through this work, it was possible to provide a better understanding of the data modelling of different ultrafiltration membranes used for the treatment of olive mill wastewater.


Introduction
Olive oil is one of the fundamental pillars on which the Mediterranean diet is built. The relevance of this product is based, among other reasons, on the versatility of olive oil. The antioxidant nature, derived from the presence of phenolic compounds, and the prevention of diseases such as diabetes, obesity, and cancer make olive oil an essential product in people's diet. Currently, there are three different methods for the production of olive oil, traditional or pressed process, three-phase continuous centrifugation, and two-phase continuous centrifugation. The latter is the most widely used in Spain, and due to its lower water consumption, more countries are expected to adopt this production methodology (Maaitah et al., 2020). Olive oil washing wastewater (OOWW) is, together with two-phase olive pomace (alperujo in Spanish), the characteristic residue of the two-phase centrifugation process (Borja et al., 2006).
Membrane processes have become a widely used technique in the food industry, either for the treatment of food products or by-products. Membrane processes provide gentle treatment of product at low (to moderate) temperature, they produce no chemical damage, can be highly automated and easy operated, and they have low energy consumption compared to other processes and achieve high separation and selectivity. Although there are many experimental studies with pressuredriven membranes for olive mill wastewater (OMW) treatment, few are focused on analysis modelling studies of fouling membranes (Ochando-Pulido & Martínez-Ferez, 2017;Poerio et al., 2022;Stoller & Bravi, 2010;Stoller et al., 2017), and few refer to ultrafiltration (UF) (Saf et al., 2022;Turano et al., 2002). Specifically regarding OOWW, there are few experimental studies with UF membranes (Cifuentes-Cabezas et al., 2021Ochando-Pulido et al., 2015a, b) and narrowing down even more when it comes to UF modelling (Ochando-Pulido et al., 2015a, b). On the other hand, to the best of our knowledge, there is no study that compares theoretical models with statistical and machine learning methods to predict the permeate flux of the OMW ultrafiltration. The importance of the study through mathematical models of the behavior of the membranes in a specific process not only allows to identify the predominant type of fouling, but also to know what the optimal conditions are to carry out the separation process in the most efficient way. As Rajendran et al. (2021) point out, a better understanding of the molecular dynamics within membrane filtration systems will facilitate the fabrication and design of improved systems.
UF, either as a previous or final stage (pretreatment to post-treatment), has been studied experimentally, analyzing different membranes and operational conditions; as well as through mathematical models (Ochando-Pulido, 2016). Membrane modelling helps to understand and mitigate the main bottleneck of membrane processes and membrane fouling (Niu et al., 2022). The constant interaction between the feed particles and the membrane surface leads to fouling, which causes a partial or severe restriction of permeate passage. Fouling is caused by several complex kinetic processes that result in the continuous deposition of molecules on the membrane surface, leading to eventual substance adsorption and/or blockage of the membrane pores. This fouling depends on multiple factors such as the characteristics of the stream to be treated, type of membrane (material, configuration, and pore size), and operating conditions. Fouling is the main cause for the lack of large-scale implementation of these membrane separation processes. Severe membrane fouling not only increases operating time and cost (energy, cleaning, and maintenance), it also reduces membrane life and deteriorates permeate quality. Therefore, understanding the mechanisms of membrane fouling and providing effective fouling control are crucial in membrane filtration research (Ahmed et al., 2022;Corbatón-Báguena et al., 2018;Ochando-Pulido, 2016). There are various fouling mechanisms, which depend directly on the process (Ghernaout et al., 2018;Jradi et al., 2022a). Fouling of UF membranes generally arises through mechanisms of adsorption, pore blockage, and cake or gel formation (Shi et al., 2014). This fouling is mainly organic fouling, due to the composition of OMW (Ulbricht et al., 2009). Particulate/colloidal fouling could also occur, as some high molecular weight organic substances possess similar characteristics (to a certain extent) with inorganic colloidal particles (Guo et al., 2012).
To this end, wide varieties of models have been developed to study fouling, which can be classified into empirical, theoretical, or semi-empirical models. Among all the existing models in the literature, the semi-empirical ones proposed by Hermia (1982) are the most used to fit experimental data in UF processes. These models were developed for conventional filtration processes, but their adaptation to tangential flow is, at the same time, widely used in the scientific community. The main drawback of the models proposed by Hermia lies in the fact that they do not take into account the possibility that these mechanisms occur simultaneously in the same process (Mondal & De, 2009). Various authors point out that the decrease in permeate flux is not only explained by one of these mechanisms but may be due to the action of various types of fouling. This is the case of Bowen et al. (1995) and Jonsson et al. (1996), who studied the fouling of microfiltration membranes during protein filtration (BSA). They concluded that membrane fouling consists of (complete or intermediate) pore blockage is followed by cake formation. Finally, hence, the need to propose a new mathematical model combines the phenomena of complete pore obstruction and cake formation, in an attempt to adjust more closely to reality (Corbatón-Báguena et al., 2015;de la Casa et al., 2008;Ho & Zydney, 2000). On the other hand, the most widely used empirical model is based on Darcy's law and considers that the permeate flux decline is due to different hydraulic resistances (Choi et al., 2000).
In recent years, statistical and machine learning methods have been used in various areas (Ibrahim et al., 2022;Ly et al., 2022;Okolie et al., 2022;Sibiya & Amo-duodu, 2022), as well as for the modelling of membrane processes (Kamali et al., 2021;Kovacs et al., 2022). One of the widely used statistical approaches is the response surface methodology (RSM) which can analyze complex multi-component processes by approximating the relationship between the independent variables and response variables in terms of a polynomial regression equation. RSM is a statistical method of data analysis that allows a better understanding of a process than conventional experimental methods (Khan et al., 2022). Machine learning relates to intelligent systems that can adapt their behavior during the system training stage to newly provided information. Modelling through intelligent methods such as artificial neural networks (ANN) has proven to be a predominant option that is made up of a generic structure that has the ability to learn and memorize data trends and accurately predict response variables (Lowe et al., 2022). ANN has proven to be an effective predictive tool for modelling the behavior of nonlinear dynamic 1 3 systems in engineering applications. They have been used successfully to model the permeate flux decline of ultrafiltration and other membrane processes as a function of process operating variables (Curcio et al., 2006).
The aim of this work is to study the effect of transmembrane pressure (TMP) and cross flow velocity (CFV) on the decrease in permeate flux of different ultrafiltration membranes when treating OOWW. For this purpose, the Hermia adapted to cross flow filtration models, combined model, and series resistance model were studied to identify the main fouling mechanism. Then, RSM and ANN were used to obtain the best operational conditions for each membrane. Finally, the models were compared with each other. There are interesting modelling works about UF membranes fouling in the treatment of OMW, such as the one carried out by Tsagaraki and Lazarides (2012). However, they are only focused on a particular membrane material/configuration (in this case, on polysulfone membranes in tubular configuration). As far as we are concerned, there are no works on mathematical models implemented to understand the fouling of ultrafiltration membranes of different pore sizes, both inorganic and organic, when treating OOWW. On the other hand, no studies were found on the use of non-phenomenological models for the study of OMW (including OOWW).

Theory: Modelling of Ultrafiltration Membranes
The models used in this study are presented in this section.

Hermia Model Adapted to Cross Flow Filtration
The model is based on the one formulated by Hermia for dead-end filtration at constant pressure. The model adapted to cross flow ultrafiltration incorporates the flow associated with mass transfer by reverse transport. Equation 1 presents the general equation for the Hermia model adapted to crossflow filtration (Hermia, 1982): where K is the constant of the Hermia model, J is the permeate flux, J ss is the steady-state permeate flux, and n is the parameter indicating the type of fouling. Four different types of membrane fouling mechanisms are considered in this model. Each fouling mechanism has a mathematical equation to predict the permeate flux as a function of time, which will depend on the value of n: complete pore blocking (n = 2), intermediate blocking (n = 1), standard blocking (n = 1.5), and cake layer formation (n = 0) (Lipnizki et al., 2021).

Combined Model
This model arises from the impossibility of explaining the typical evolution of permeate flux with a single fouling mechanism. It was developed by Ho and Zydney (2000) and then simplified and modified by different authors (de la Casa et al., 2008;Taniguchi et al., 2003;Yuan et al., 2002). This model combines two stages, a first abrupt decline in the first minutes, due to pore blocking phenomena, followed by a slow decrease in permeate flow caused mainly by the accumulation of molecules on the membrane surface resulting in a cake layer. The model shows a smooth transition between the two fouling mechanisms proposed by Hermia, the complete blocking model and the cake layer formation model. The combined model represents a more realistic model to explain membrane fouling than models considering only one fouling mechanism (de la Casa et al., 2008).
Each model has a constant; K cb is for the complete pore blocking model, and K cf is for the cake formation model. In this model, only a fraction of the membrane pores is completely blocked, represented by the parameter α. Finally, the equation for the combined model is the one presented in Eq. 2.

Resistance in Series Model
This model considers that decline in permeate flux is caused by different hydraulic resistances. These are the resistance of the membrane itself (R m ), the resistance due to adsorption and concentration polarization (R a ), and resistance due to cake layer formation (R cf ). The parameter called total hydraulic resistance (R) is the sum of individual resistances. The general equation follows the Darcy's law and is presented in Eq. 3 (Fane et al., 2006): where ΔP is the transmembrane pressure and μ is the feed solution viscosity. Furthermore, R a can be adjusted using an exponential equation. Finally, the general equation for the resistance in series model is the following: With R a ′ representing the steady-state adsorption and concentration polarization resistance and b, the fouling rate, due to adsorption (Corbatón-Báguena et al., 2018). (2)

Response Surface Methodology
Response surface methodology (RSM) predicts the relation between input and output variables by means of a complex process where the interaction of different variables with each other is considered and thus be able to determine the optimal operating conditions (Martí-Calatayud et al., 2010).
To obtain a reliable analysis, a multivariate statistical analysis of the experimental data was performed. In multifactorial statistical analysis of experimental data, all factors vary simultaneously. The influence of TMP and CFV on the average permeate flux (J a ) and cumulative flux decline (SFD) was studied, using Eqs. 5 and 6 (Martí-Calatayud et al., 2010): where J(t) is the evolution of the permeate flux over time obtained from experimental data, t is time, and t N is the time corresponding to the last permeate flux value considered. The technique to achieve the desired models was backward elimination, and it starts with all the variables in the model and eliminates them one at a time until only the significant variables are left in the model. Once the regression coefficients are obtained, the equation that defines the model is also obtained as a result of analysis of the significance of each of the variables considered and obtained after the analysis of variance (ANOVA).

Artificial Neural Networks
Artificial neural networks (ANN) use a black box model. Therefore, ANN predictions are completely empirical and can be considered not phenomenological. ANN predict output values from input data but do not provide information about the process. A neural network has two components: the node, which consists of a neuron with positioning information, and a connection, which consists of a weight with node addressing information. Neurons (single processing elements) are interconnected through a set of synapses or connecting links, each of which is characterized by a scalar weight (w). For each neuron receiving n inputs from various sources, the input signals are weighted according to the neuron's respective synaptic weights, then added to another externally applied scalar, called bias (b), according to the following equation (Bui et al., 2021;Thompson & Kramer, 1994): With x i representing the ith input variable. In this work, a type of non-recurrent feed-forward ANN with corrective supervised learning is used, in which the inputs and targets are known (Dasgupta et al., 2017). The type of network is known as a multilayer perceptron (MLP). MLP ANNs ( Fig. 1) are known as universal function approximators and with a single hidden layer and an output layer; they predict nearly any relationship between input and output variables. As Bui et al. (2021) correctly pointed out, to design an ANN, different steps must be followed. In our case, a pre-processing of the raw data was first performed to ensure the viability of the network. Then, the architecture of the network was analyzed by varying the number of hidden layers and neurons. With the different structures of the ANN network, the network is trained and then validated (with cross validation). Finally, the relationship between inputs (factors) and outputs (target) is tested with new data. The process carried out for the selection of the ANN is described in greater detail below.
The feed-forward neural network usually has one or more hidden layers, which allow the network to model complex and non-linear functions (Rahmanian et al., 2011). There are studies that indicate that working with two or more hidden layers is better than working with one (Gökmen et al., 2009), and others comment that more hidden layers generate an excessive focus of the network on the idiosyncrasies of the individual samples, making it difficult for the model to adapt to the new inputs (Torrecilla et al., 2004). Regarding the number of neurons, as Sarkar et al. (2009) well explained, there is no concrete rule for the selection of the number of hidden neurons, rather than it is mainly determined by experience and trial and error. However, it is important to note that the number of neurons is a critical point for network performance. In this way, too few neurons can waste a large amount of training time to find the optimal representation, while too many neurons can lead the system to memorize the pattern in the data or to overtraining (Nourbakhsh et al., 2014). Finally, each neural network will be specific to a given system, always keeping in mind that the neural network must be as simple as possible to make good predictions; otherwise, overfitting problems may occur (Razavi et al., 2003). Therefore, it was decided to evaluate working with one or two hidden layers, increasing the number of neurons until verifying that the improvement in the measure of fit with one more neuron was not significant. The selection of the data partition for network training and validation is another important factor to consider. Generally, the training group is the one with the higher amount of data, with around 70% or 80% of all the data used in this group, whereas the remaining data are used for validation and prediction (Jawad et al., 2021). Therefore, the experimental data were randomly divided into three groups, but with the higher weight of number for the training group (70% data for training group, 15% data for validation group, and 15% for test group). A cross validation was performed with the first two groups of data, repeating the training and validation steps 3 times before being tested with the test group. Once the neural network is trained, the analysis of the regression results for the 3 groups of data mentioned above is of special importance because it provides information about the accuracy of the ANN. It is important to highlight that the R 2 obtained in the training, validation, and test sets is a reflection of the total R 2 , and this was also used to assess the prediction quality of the network. The R 2 was calculated using Eq. 8 . It is also important to check whether the error histogram fits a narrow normal distribution around zero error. Apart from R 2 , to evaluate the best combination, it was decided to maximize the RMSE statistical precision index, since it has been shown that it can help to determine the optimal number of neurons in the hidden layer (Jradi et al., 2020). For this purpose, the root mean square error (RMSE) was calculated from the experimental flux data (Y), predicted flux data (y), and dataset size (N). Its mathematical expression is presented in Eq. 10 (Jradi et al., 2022b).

Experimental Methodology
Seven membranes were tested for the OOWW treatment. The feed samples were obtained at the outlet of the vertical centrifuge after washing the olive oil, where the two-phase continuous centrifuge process is used. Prior to the ultrafiltration stage, the samples were pretreated by sedimentation, flotation, and cartridge filtration (60 microns). The experimental data, as well as the analysis of the results, were presented in previous studies (Cifuentes-Cabezas et al., 2021. OOWW is characterized by its acid profile, high organic load (COD around 24 g•L −1 ), high suspended solid content, and high turbidity values. On the other hand, it has fats and oils, sugars (around 1.6 g•L −1 ), and a significant concentration of phenolic compounds (more than 1 g•L −1 ). The operational conditions were CFVs between 1.5 and 3.4 m•s −1 and TMPs between 1 and 3 bar for the organic membranes and CFVs between 2 and 4 m•s −1 and TMPs between 1 and 3 bar for inorganic membranes. Table 1 shows the characteristics of the membranes used. It can be seen that they differ in their molecular weight cut-off (MWCO) as well as in material and configuration.

Software
Hermia models and the combined model were fitted to the experimental data using MathCad®15 software (PTC Needham, EE.UU), for fouling mechanism analysis. The fitting was carried out with the Genfit algorithm, which uses an optimized version of the Levenberg-Marquardt curve-fitting method. The fitting accuracy for each operating condition tested was evaluated in terms of the regression coefficient (R 2 ) and the standard deviation (SD). Statgraphics Centurion 18 software was used for RSM analysis. For ANN, MATLAB® R2021b (MathWorks, USA) was used. The transfer functions used for both the hidden layers and the output layer were the sigmoidal function (tansig), the scaled exponential linear unit (selu), and the linear function (purelin). The training algorithm used is trainlm, which uses the Levenberg-Marquardt algorithm, which offers the fastest convergence capacity among the available training methods. The statistical study (ANOVA) was carried out with the Statgraphics Centurion 18 software. The validity of the model was determined from the significance of the model and the lack of fit, where R 2 , F-ratio, T-statistic, and p-value were used for the evaluation of the model. Regarding the measure of correlation between observed and predicted responses (R 2 coefficient of determination), the higher its value, the better the model fitting accuracy. The F-ratio indicates how much variability there is between groups compared to the variability within groups. Higher values of F-value over 0.05 for the independent process variable mean that the effect of that variable is greater. The T-statistic is obtained by dividing the coefficient by its standard error. High values of T indicate that this factor is statistically significant. Finally, regarding p-value, the model must have a p-value of less than 0.05 (confidence level of 95%) to significantly show the relationship between the response and the factors (Jradi et al., 2022c;Martí-Calatayud et al., 2010;Ochando-Pulido et al., 2020).

Analysis of Membrane Fouling Mechanisms by Means of Hermia Model
When analyzing the results obtained with the Hermia model (Supplementary Material Tables S1-S2), it was observed that in most of the cases studied, the models fit the experimental data with almost the same precision (acceptable values of R 2 and SD). However, the standard pore blockage model (n = 1.5) did not accurately fit the experimental data and was therefore not considered in this analysis. Figure 2 shows the fit obtained using the Hermia model for organic membranes at fixed conditions (TMP of 2 bar and CFV of 2 m·s −1 ). It can be seen how the difference between the Hermia models for organic membranes was minimal; this was observed in most of the operating conditions tested (Table S1-S4). This was also reflected in the values of R 2 , obtaining very similar mean values for the different models. The mean R 2 values from complete pore blocking, intermediate pore blocking, and cake formation were between 0.87 and 0.95, 0.89 and 0.94, 0.82 and 0.95, and 0.81 and 0.91 from UH004, UP005, RC70PP, and UH050, respectively. Considering all the experiments, for the UP005, UH004, and RC70PP membranes, the model that best fits the experimental results was complete pore blocking (n = 2), followed by intermediate pore blockage (n = 1), and cake formation (n = 0). Similar results were obtained by Luján-Facundo et al. (2017) in their study on ultrafiltration membrane fouling in whey processing. They observed similar R 2 values for the UP005. The models that fitted the best in their case were the intermediate blocking model and the complete blocking model. They related it to the fact that both fouling mechanisms occurred simultaneously since both models consider external fouling to occur on the membrane surface. This could also be explained by the MWCO, since external membrane fouling is directly related to the size difference between the solute molecule and the membrane pores (Brião & Tavares, 2012). The complete pore blockage model assumes that the molecules in the feed are much larger than the pore size of the membranes (Amosa et al., 2019). Therefore, larger particles can be deposited on the surface of membranes with low MWCO. Regarding the RC70PP membrane, Wang et al. (2012) also obtained similar results when studying the mechanism of membrane fouling in broth succinic acid fermentation ultrafiltration. They found that the full pore-blocking model fitted the best; however, they also obtained high fitting accuracy using standard and intermediate blocking models.
Comparing the results obtained for intermediate pore blockage and cake formation from the RC70PP with those of the UP005 and UH004 membranes, a slight increase in the value of R 2 is observed for both fouling mechanisms. This may be due to the type of material (regenerated cellulose acetate) and the specific characteristics of the RC70PP membrane surface, which give them different properties from PES membranes (UP005 and UH004) (Evans et al., 2008). Also, the fact that the RC70PP membrane has a higher MWCO (10 kDa) than the UP005 (5 kDa) and UH004 (4 KDa) membranes favors the passage of larger particles, and it also influences the fouling mechanism. This can also be related with the result obtained with the UH050 membrane; although, once again, the three models delivered acceptable values of accuracy (mean R 2 value of 0.88), the cake layer formation fouling mechanism was the predominant one (mean R 2 above 0.91). High MWCOs reduce the prevalence of fouling due to pore obstruction, giving greater weight to the formation of a cake layer. This was also observed by Yang et al. (2021) in his study of tanning wastewater treatment by ultrafiltration. When analyzing two membranes of the same MWCO (50 kDa) but different material (PES and PVDF), they observed that the cake filtration was the main fouling mechanism (R 2 over 0.92) in the process and was independent of membrane material. This fact can be explained by Fick's law and the boundary layer theory, since the higher the permeate flux is, the greater the backflow, and therefore, there will be a higher concentration of particles near the membrane surface, causing cake formation (Peppin, 2019).
On the other hand, if the results are analyzed based on the operating conditions of the experiment, an increase in TMP resulted in a better accuracy for the cake layer formation model. This was more significant for the membrane with higher MWCO. This is because higher TMPs lead to a higher concentration of substances on the membrane surface for a specific filtration time, which leads to a higher cake layer build up and thus an increase in the membrane resistance (Sari Erkan et al., 2018). Only the UH050 membrane showed a significant influence of CFV in the accuracy of the model, presenting the worst fits for complete pore blockage at higher CFVs. This was also noted by Alborzi et al. (2022) in their analysis of fouling in ultrafiltration of produced water (the largest waste byproduct of oil and gas production), noting that more studies also reported this trend. Although the operating conditions influence the accuracy of each model, they do not change the predominant fouling mechanism for each membrane. For low MWCO membranes (UH004, UP005, and RC70PP), the fouling mechanisms are complete pore blockage, whereas for high MWCO membranes such as the UH050 membrane, the cake layer formation model fitted the best.
The inorganic membranes presented a very different behavior from the organic ones. The difference in the fitting accuracy between models was significantly larger than that observed for organic membranes, with the cake formation model having the highest R 2 (Table S3). These results are similar to those observed by Corbatón-Báguena et al. (2015). In their study of the fouling mechanism of ultrafiltration membranes fouled with whey model solution, they also observed better results with the cake layer formation model for the 15 kDa inorganic membrane than in the case of two organic membranes (5 and 30 kDa).
As can be seen in Fig. 3, the sharp flux decline obtained in the first few minutes is responsible for the low accuracy of the other models to predict the experimental data. Both R 2 and standard deviation values worsened as TMP increased at a fixed CFV or vice versa. The complete pore blocking model showed at the extreme operating conditions (TMP 3 bar and CFV 4 m·s −1 ) fit values well below those for cake layer formation. On the other hand, at a fixed TMP and intermediate values of CFV, the models fit better than in the case of high or low values of CFV. Likewise, if the variable that changes is the TMP, it can be observed that for the same CFV, the values of R 2 are higher at low TMP. In the ultrafiltration, fouling studies with Huanggi (Radix astragalus, root of Astragalus) extracts carried out by Cai et al. (2013) also observed a strong influence of TMP on cake formation in a hollow fiber membrane of 10 kDa (Microza, USA), indicating that TMP is an important driving force for cake formation and the most important factor in UF membrane fouling. As with the other inorganic membranes, the cake layer formation model fits the experimental data of the Inside Céram 50 membrane better than the other models. In this case, as with the UH050 membrane, the high permeate flux due to its high MWCO causes an increase in solute concentration at the membrane surface due to convective transport. The boundary layer will continue to grow until the permeate flux and the back-diffusion flux away from the membrane surface reach equilibrium. Therefore, the higher the permeate flux density is, the higher the concentration at the membrane surface, which favors the cake layer formation fouling mechanism.
Finally, the Hermia model was not able to accurately predict membrane fouling exclusively with one of the proposed mechanisms for the most extreme operating conditions tested. Very low R 2 values of the three fouling models (sometimes 0.4) were obtained, especially for the higher MWCO membranes tested. The fact that the model cannot differentiate one mechanism from another may be because all the fouling mechanisms occur at the same time.

Analysis of Membrane Fouling Mechanisms by Means of the Resistance in Series and Combined Model
Continuing with the resistance in series and combined model (Tables S4-S7), both models achieved a higher R 2 (over 0.9) than Hermia models. Similar results were observed by Carbonell-Alcaina et al. (2016) in the study of the UP005 membrane for the treatment of brine from the table olive production process. The combined model, which considers the intermediate pore blocking and the cake formation mechanisms proposed by Hermia, presented a better fit than the Hermia models separately. On the other hand, as in this study, they observed that the higher the CFV, the better the fit of both models. They also observed a direct relationship of model accuracy with the TMP. Higher accuracy was achieved as TMP increased. A high fitting accuracy of the combined and resistance in series models was observed (Fig. S1), which implies that the predominant fouling mechanisms for this case are the combination of different types of fouling. Therefore, both models are capable of predicting the behavior of the flux both in the first minutes of the experiment, where the permeate flux falls sharply, and in the remaining minutes when the permeate flux becomes practically constant. However, taking into account the R 2 values, the combined model presented a better fit than the resistances in series model for all organic membranes. Similar results were obtained by Corbatón-Báguena et al. (2015). They observed that the combined model had the highest fitting accuracy for the polymeric membranes (UP005 and UH030) when treating a whey model solution. This is due to the fact that the two fouling mechanisms that this model takes into account manage to represent the real scenario. In this case, the fouling mechanism that represents the total obstruction of the pores is responsible for the pronounced decrease in permeate flux in the first minutes, giving way to a cake formation that induces stabilization and reaches a steady state.
Again, due to the good fits presented by both models (Fig. S2), it was difficult to select one, but again, it is the combined model that presents the best fitting accuracy. As for the organic membrane, it could be inferred that both fouling mechanisms, cake filtration, and pore blocking contribute to the fouling of the membrane. Huang et al. (2022) presented similar conclusions on 20 kDa ceramic membranes used for cold rolling emulsion wastewater treatment. They observed that for a CFV between 4 and 4.3 m•s −1 , both models offered similar precision. It is important to highlight that they worked with a plant made up of 6 modules, each of which contains 36 tubular ceramic membranes with a filtration area of 0.47 m 2 each, which allows them to work with a capacity of 24 m 3 •h −1 of wastewater. Therefore, the fouling mechanism observed in this study with a laboratory scale plant can be extrapolated to industrial size plants. Table 2 shows the parameters referring to the combined model and resistance in series model, for the boundary conditions (lowest and highest CFV and TMP tested) of the organic membranes (full table in supplementary material). Although the Hermia model predicted that complete pore blockage was the most appropriate fouling mechanism, the cake formation mechanism is also an important part of fouling of low MWCO membranes. In the same way, when using the Hermia model, it was difficult to select the model that reflected the experimental data well. This can be explained with the combined model or the resistance in series model. As it was mentioned before, more than one process is responsible for fouling. It can be seen how, as the CFV increases the parameters α and Kcb increase, while Kcf decreases.
On the other hand, at a fixed CFV, the increase in TMP generates an increase in the K cf values (only for low CFV values). The parameter K cb is related to complete pore blocking while K cf is related to cake formation. On the other hand, the higher the value of α is, the greater the relevance of pore blockage in membrane fouling. Similar results were observed for the RC70PP membrane, and this observed trend could be explained by the accumulation of molecules on the membrane surface. The higher the pressure at low CFV, the higher the concentration of molecules on the membrane surface, which will tend to form cake layer. Whereas an increase in CFV will generate greater turbulence at the membrane surface, thus minimizing the concentration polarization at the membrane surface, which significantly inhibits the formation of a cake layer. Regarding UH050, the values of α confirm that for low TMP, the predominant fouling mechanism is the complete blockage of the pores. On the other hand, observing the constants K cb and K cf , it can be concluded that at the same TMP, an increase in CFV generates less cake formation and greater pore obstruction.
The highest value of K cb in UH050 membrane was expected since the blocking resistance increases with membrane pore size (Mondal & De, 2010).
The great influence of cake layer formation in low MWCO membranes could also be observed when analyzing the parameters of the resistance in series model, where the R cf /R t ratio was greater than the R a /R t . Elevated R cf values, linked mainly to reversible fouling, were also observed in the study of the fractionation of the by-product of lignin processing by membrane processes to obtain phenolic compounds performed by Knapp (2020). They observed that cake layer formation was responsible for almost 90% of the fouling of UH004 and UH030 membranes. It is important to note that for membranes with a lower MWCO, the influence of R m is higher. This is due to the fact that the lower the pore size of the membrane is, the higher the value of R m (Gökmen & Çetinkaya, 2007). In addition, the highest percentage of R m /R t presented by the UP005 could be related with the characteristics of the membrane. Gulec et al. (2017) observed that the R m of the UC030 represented the 61% of the total resistance. They attributed it to the greater the hydrophobicity of the membrane. Although the influence of R m is low in the total membrane resistance, the R m /R t ratio slightly increases when the CFV increases at a fixed TMP. This could be due to the fact that a higher CFV reduces membrane fouling, improving the permeation flux through the membrane, which leads to a reduction of the retention coefficients that are external to the membrane ( Barredo-Damas et al., 2010).
Although all the membranes show a greater influence of R cf than R a in membrane performance, the UH050 membrane was the one that showed the greatest influence of R a , presenting values close to 90% of the total resistance. This, together with the high influence of R cf on the total resistance of the UP005 and RC70PP membranes, makes sense when analyzing the flux recovery percentages obtained after the experimental tests. As discussed in the methodology section, the data analyzed in this work were analyzed in another study (Cifuentes-Cabezas et al., 2021), where different cleaning protocols were also analyzed to recover the membranes. These two membranes were found to achieve a higher recovery (over 90%) of the initial hydraulic permeability after rinsing with osmosis water at 25 °C. Since fouling due to cake layer formation is reversible (Amosa et al., 2019;Knapp, 2020), these values correspond to the high recovery observed. The low irreversible resistance exhibited by 5 kDa PES membranes was also observed in studies with sequential application of ultrafiltration. Yilmaz and Bagci (2019) reported the results of the sequential UF of broccoli juice with PES membranes of 50 kDa, 10 kDa, and 5 kDa of MWCO (the feed of the membrane with the lowest MWCO was the permeate obtained with the 10 kDa membrane. These results are in accordance with those obtained in this work for the 5 kDa membrane in spite of the higher concentration of the wastewater used. On the other hand, the UH050 membrane was the one that presented the highest irreversible fouling, especially at the boundary operating conditions tested, which also agrees with the highest percentages of R a . Table 3 presents information similar to the previous table but for inorganic membranes. For the Inside Céram 5 membrane, the values of α for low TMPs indicate that there is no clear predominance of a fouling mechanism for that operating pressure, regardless of CFV, that is, that the complete pore blockage mechanism would have, approximately the same weight in membrane fouling as the cake layer formation mechanism. It is necessary to increase TMP above 2.5 bar to observe a predominant fouling mechanism, and that in this case, it is cake formation. These results are consistent with those obtained for the Hermia model. Similar results were obtained for the 15 kDa membrane, and the predominant fouling mechanism for high TMP was cake formation. For the membrane Inside Céram 50, the low values of α present in all the conditions analyzed affirm that the predominant fouling mechanism in this membrane is the formation of cake layer. Several previous studies concluded that high MWCOs are more susceptible to irreversible fouling (due to blockage and clogging of the pores) (Mondal et al., 2013). This justifies the higher percentage of R a over R t . It is important to highlight that the R a parameter refers to both adsorption and concentration polarization resistance. The latter being an immovable resistance, that is, it can be removed by chemical cleaning, while that related to adsorption and pore blockage is an irreversible resistance, which is a permanent fouling that cannot be removed by any method (Saf et al., 2022). On the other hand, the high R cf values presented by low MWCO organic membranes are linked to removable fouling, which can be removed with water rinsing. These results agree with what was observed after the cleaning protocol implemented for both organic and inorganic membranes (presented in previous studies (Cifuentes-Cabezas et al., 2021). In general, low MWCO membranes presented the greatest recovery of the hydraulic permeability after rinsing with water, according to the following classification: UP005 > RC70PP > UH004 > Inside Céram 15 > Inside Céram 5 > UH050 > Inside Céram 50. The same trend was observed for the parameters R cf and K cf , while the parameter related to pore blocking and adsorption (K cb , α, and R a ) showed an inverse trend.
Within the medium-low MWCO range, the greater irreversible fouling that inorganic membranes present respect to organic membranes could be explained by the characteristics of the membrane itself and of the feed solution. Membranes with a more hydrophobic character are less resistant to fouling (van der Marel et al., 2010). On the other hand, the roughness of the membrane contributes to the potential for irreversible fouling (Galiano et al., 2018). Inorganic membranes are characterized by greater roughness. In the case of the ceramic membranes, the roughness parameters were 20 and 50 nm for the Inside Céram 5 and 15 membranes, respectively. For the organic membranes UP005, UH004, and RC70PP, the roughness parameters were 30, 40, and 60 nm, respectively.

Statistical Analysis ANOVA
To analyze which operating conditions and interactions between variables are more significant with respect to the response variable, an analysis of variance, ANOVA, was carried out. Two independent variables were chosen to perform the statistical analysis, TMP and CFV, while average permeate flux (Ja) and cumulative flux decline (SFD) were chosen as the response variable. All the statistical estimators (R 2 , F-ratio, T-statistic, and p-value) revealed that the response model was reliable from the statistical point of view for the prediction of the response variable in the range of values considered for the dependent variables. The graphs of the contour surface of the parameter J a (Figs. S3 and S4) showed that for the case of organic membranes, the highest values of permeate flux were achieved for the maximum values of CFV and TMP tested, this was not observed for inorganic membranes. However, it should be noted that higher values of those parameters represent higher costs and may result in a greater decrease in permeate flux. It can be seen in Table 4 that J a for most membranes seemed to be influenced by at least two independent variables or factors. All the membranes showed influence of both the CFV and TMP parameters, either by one of them alone or by their coupled influence. For organic membranes, it was observed that as the MWCO increased, more factors were significant in the prediction of with J a . The J a for membranes UH004 and UP005 was influenced by two factors: TMP and CFV·(TMP in the case of the UH004 membrane and CFV and TMP 2 in the case of the UP005) membrane, whereas the J a for the RC70PP and UH050 membranes was influenced by three factors. The R 2 value for the average permeate flux was between 90.78 and 97.28%, which is desirable. For the UH004 and UP005 membranes, the effects of CFV and TMP as standardized for both factors are positive, which implies that the average flux rate increases as CFV and TMP increase. The influence of the interaction between both factors was the most significant due to its higher T-statistical value. Regarding RC70PP and UH050, the influence of TMP alone and CFV 2 presents a positive influence, while the influence of TMP 2 is negative on J a . On the other hand, the J a for the inorganic membranes was influenced by CFV and TMP 2 , with the J a for the Inside Céram 50 also influenced by TMP. The variable TMP 2 was the most significant one due to its lower p-value (between 0 and 0.007) and its higher value of the parameter T-statistic. The 50 kDa membranes both organic and inorganic and the RC70PP membrane responded to negative influences for the J a parameter. The membranes were constrained by the effect of TMP 2 , which is related to pore blockage and gel layer formation (Martí-Calatayud et al., 2010). This is in agreement with the results obtained when modelling fouling with theoretical models in the previous section ("Analysis of Membrane Fouling Mechanisms by Means of Hermia Model" section). A different behavior was observed for SFD. All the membranes presented at least one factor that negatively affects the SFD. In organic membranes, MWCOs have no influence on the number of factors that have an influence on SFD. In terms of SFD, the membrane UH050 was only affected by TMP (alone and squared value), while UP005 was only affected by the coupled effect of TMP·CFV (p-value 0.0021). Regarding the low MWCO membranes (UP005, UH004, and Inside Céram, 5), it should be noted that the regression coefficient of the model predicted by ANOVA was the lowest, indicating that only 53.7% (mean value) of the variability in SFD is explained by the analysis (with the UP005 presenting the lowest percentage, 40.3%). Similar results were observed by Martí-Calatayud et al. (2010) in the study of the ultrafiltration of macromolecules. Obtaining low precision for SFD with the Inside Céram 5 kDa membrane, attributing it to the fact that the permeate flux decline was more noticeable in the other membrane tested (Carbosep M2 membrane). Therefore, it is possible that the use of the SDF parameter is more representative in the case of the other membranes (higher MWCO) than in the case of these ones (UP005, UH004, and Inside Céram, 5). The UH050 membrane (R 2 of 77.84%) also presented an R 2 outside the average (R 2 average 94.33%), but it was higher than that of the UP005.
Again, the Inside Céram membranes of 5 and 15 MWCO presented a similar behavior between them for SFD, being more influenced by TMP (positively). For Inside Céram 50, the combined effect of CFV·TMP had the most significant (positive) influence on SFD. The high CFV creates a turbulence that breaks up larger molecules allowing smaller particles to come closer to the membrane surface. This phenomenon favors both the blocking of some pores and the formation of a more compact cake layer, which translates into a greater resistance to filtration and, therefore, in a decrease in the permeate flow rate. The counterproductive effect of CFV occurs at a high TMP when the tangential forces caused by CFV are lower than the driving force of TMP bringing solute molecules closer to the membrane surface (Alventosa-deLara et al., 2012). This agrees with the experimental data obtained for the Inside Céram 50 membrane  -Cabezas et al., 2022), and it is reflected in the contour surface of the parameter (Figs. S5 and S6).
Once the most suitable equations for each membrane have been obtained through multifactorial statistical analysis, the process is optimized using RSM. Second order models were applied to select the optimal operating conditions.

Response Surface Methodology (RSM)
The RSM was carried out in order to obtain the optimal operating conditions, with the idea of achieving the highest average permeate flow and the minimum SFD. It is important not to forget that the permeate flux decline with time is included in the SFD parameter, and the largest values of SFD indicate that a greater permeate flux decline has been obtained, so the smallest possible SFD value is of interest. Since for a CFV 4 m·s −1 it is considered that the membrane has reached the critical point, the data corresponding to these values will not be modelled. On the other hand, as a good fit for the model of the SFD response variable for the UP005 membrane was not achieved, the representation of the contour surface plot was not carried out. The model fails to explain the behavior of the UP005 membrane for the SFD variable. For this reason, the graph of two superimposed response variables was not obtained for this membrane. For all membranes, an increase in the CFV produces an increase in the average permeate flux and a decrease in SFD (Fig. S7). The influence variable studied with respect to the response variable is also observed in the main effects of each of the variables obtained in the ANOVA analysis (see "Statistical Analysis ANOVA" section), and when the effect is positive, it means that by increasing the study variable (TMP, CFV), the response variable increases (J a , SFD). All organic membranes showed an increase in J a when increasing CFV, due to the greater turbulence within the membrane module, which contributes to the back diffusion of the solute from the membrane surface, reducing the phenomenon of concentration polarization (Sánchez-Arévalo et al., 2021). Table 5 shows the minimum (min.) (experimental conditions that achieve the lowest value of SFD), maximum (max.) (experimental conditions that achieve the highest value of J a ), and optimal conditions of each membrane to obtain simultaneously the highest values of J a and lowest values of SFD.
It can be seen in Table 5 how all the membranes, regardless of MWCO and material, presented the highest CFV as the optimum. Within organic membranes, it can be observed that the larger the pore size, the lower the optimal transmembrane pressure. The opposite occurs in the case of inorganic membranes, where the larger the pore size, the higher transmembrane pressure is needed to achieve an optimal performance of the membrane process. This may be due to the fact that inorganic membranes present greater fouling compared to organic ones, which is why they need higher TMPs. This is observed with the highest values of SFD, which indicates a decrease in cumulative permeate flux decline throughout the process. Therefore, higher TMP are needed for a better permeate flux. It has also been observed that organic membranes need higher transmembrane pressures than inorganic membranes, with the inorganic membranes presenting an optimal TMP between 1 and 1.57 bar. This may be because the latter membranes have higher permeabilities.
The UP005 membrane achieved a higher J a value compared to the RC70PP membrane despite having a smaller pore size. This can be explained considering that the RC70PP membrane is made of RCA, with a spongy pore morphology of the active layer that causes a higher resistance to water penetration (Damar et al., 2020). UH004 showed the least cumulative flux decline for optimal conditions. Higher values of SFD correspond to a faster and more evident decrease in permeate flux, so that the fouling of the membrane will be more severe. Although the range of SFD values corresponding to the UH050 membrane is higher than those of RC70PP membrane, the optimal values for the RC70PP membrane present the highest fouling within the organic membranes, followed by the UH050 membrane and the UH004 membrane. This means that, although the UH050 membrane achieves the highest level of fouling under the operating conditions tested, it is reduced when selecting the optimal conditions by reducing it below the values for the RC70PP membrane. As in the case of inorganic membranes, Inside Céram 15, despite having a higher MWCO, reached average permeate flux values practically equal to Inside Céram 5. These values were of the same order of magnitude as the values obtained for the smaller MWCO organic membranes. This could explain why pore size is not always a key factor; sometimes, other membrane factors such as porosity and membrane material also affect it. The membrane that shows the greatest fouling is the Inside Céram 50 membrane (higher MWCO), followed by the organic membrane with the smallest pore size, the RC70PP membrane. In the same way, membranes with higher MWCO reach higher permeate flux values with low transmembrane pressures. Comparing membranes of the same MWCO (UP005 and Inside Céram 5), it can be seen how both achieve similar values of J a , with the highest optimal value corresponding to the organic membrane. It is important to highlight that the regression coefficient of the model goes from the minimum of 0.9 to the maximum reached in the UP005 membrane with a value of 0.97.

Artificial Neural Network (ANN)
As commented in "Artificial Neural Networks" section, several network architectures were considered, varying both the transfer functions and the number of neurons and hidden layers. Tables S8, S9 and S10 show the total regression coefficients and the RMSE statistical parameter for the best conditions (1, 2, 3 hidden layers, with 5 and/or 6 neurons).
The analysis of the transfer functions used showed that the linear function (purelin) in the output layer turned out to be the best option for the prediction of the permeate flux. The combination using tansig or selu as output function resulted in lower fit values, even with a higher number of hidden layers and neurons. Therefore, it was decided to select the purelin function as the best output function. This function has also been selected for the output layer by several authors for the prediction of permeate flux in membrane processes (Al-Abri & Hilal, 2008;Mahadeva et al., 2022;Soleimani et al., 2013). Regarding the difference between using tansig or selu as activation functions, it can be observed that in general, the results obtained present a similar trend and R 2 values. For organic membranes, the highest R 2 values were obtained in the case of the training and test sets, which were similar for each membrane. While in the case of the three ceramic membranes, the values of the R 2 presented the following trend: R 2 validation > R 2 test > R 2 training. It was observed that when working with a hidden layer with 5 to 6 neurons, in general, the ANN R 2 (complete data) does not present great changes. The UH050 membrane and Inside Céram 15 are the ones that are the most positively influenced. However, working with two hidden layers improves R 2 for all membranes compared to working with one hidden layer with either 5 or 6 neurons; although in most cases, this improvement is not significant, and a simplest network architecture with one layer is preferred. Inside Céram 15 membrane was the one with the lowest R 2 (1 hidden layer, 5 neurons). The ANN model was the only one that showed differences in the measure of fit between the Inside Céram 5 membrane and the Inside Céram 15 membrane, adjusting better to the membrane with lower MWCO. Regardless of the neurons or hidden layers used, the trend in the fitting accuracy of the different network architectures for the membranes did not change, with Inside Céram 5, UP005, and Inside Céram 50 membranes always obtaining the best fits. It can be seen that, for ceramic membranes, using selu with 2 hidden layers sometimes presents better results than when working with the tansig function. However, the increase in R 2 is so slight that it is not competitive with working with a simpler architecture (1 hidden layer).
All error histograms (tansig and selu function) showed low error when comparing experimental target values and neural network output values, while the number of times large errors occur is low (narrow zero-centered normal distribution with small amplitude). Despite the differences between neurons and hidden layers, the regression percentages are acceptable (R 2 > 0.9). As it was mentioned before in "Artificial Neural Networks" section, several authors (Nandi et al., 2010;Purkait et al., 2009) reported that MLP with two hidden layers can often produce a better approximation with fewer weights than an MLP with one hidden layer. However, it has also been reported that a hidden layer is sufficient to approximate any continuous nonlinear function (Rai et al., 2005). In this case, it was found that either one or two hidden layers provided good fits (Fig. 4), and that the number of neurons has a greater impact in R 2 than the number of hidden layers. However, a larger difference in ANN fitting accuracy was expected when changing the number of neurons. Ghandehari et al. (2011) observed something similar when they studied cross-flow microfiltration using ANN, where no significant improvement occurred with an additional increase from 7 to 10 neurons. Finally, the optimal neuronal architecture for the membranes was not the same for all of them. Considering a good adjustment without overly complicating the neural network, the following neuronal architectures were selected. For the UH004, UP005, RC70PP, Inside Céram 5, and Inside Céram 50 membranes, it was selected to work with 1 hidden layer and 5 neurons, whereas in the case of the Inside Céram 15 and UH0050 membranes, a network architecture with 1 hidden layer and 6 neurons was selected. Regarding the RMSE statistical parameter used for the optimization of the ANN architecture, it can be observed that the lowest value corresponds to the highest value of R 2 obtained in the validation of the ANN architecture. This reaffirms the selected number of neurons and the hidden layers for each membrane.
Regarding the results presented in Fig. 4, the ANN model was able to accurately predict the non-linear evolution of the permeate flux at any time during ultrafiltration. However, in some cases, there were some deviations. It can be observed that these deviations were independent of the ANN architecture. For the UH004 membrane at a CFV 2 m•s −1 at low TMPs, the values of experimental data and ANN predictions for short time scales present a slight deviation. A similar trend was observed with the UP005 membrane at CFVs of 1.5 and 2 m•s −1 and low TMPs, but the difference was small. At the same CFV conditions but at higher TMP for the RC70PP membrane, the ANN predictions vary slightly with respect to the experimental data except near steady-state conditions. Regarding the UH050 membrane, it is observed that in the first minutes, the ANN predictions vary slightly with respect to the experimental data for all the experimental conditions tested. This is observed to a greater extent for a CFV 2.5 m•s −1 and high TMPs. For inorganic membranes at low time scales, the model predictions and experimental values do not show exactly the same trend. This was observed at CFV of 2 m•s −1 for all inorganic membranes.
The validity of ANN models has been tested with good results, since they offer a fairly accurate description of the evolution of the experimental flux, achieving a better approach to process optimization. In addition to a precise description of the global process, the models manage to adapt to very different operating conditions. Therefore, the number of experimental tests was sufficient for the training procedure. An advantage of these models is that since flux is a constantly monitored parameter in all ultrafiltration systems, whether operated in cross flow or dead-end flow mode, the application of ANN models can be extrapolated to large-scale treatment plants (Teodosiu et al., 2000).

Comparison Between Models
Once all the models were analyzed separately, they were compared with each other. The Hermia models were not included in the analysis because it was shown that it cannot give an accurate permeate flux prediction because more than one fouling mechanisms are involved in the ultrafiltration of OOWW. As Corbatón-Báguena et al. (2016) well commented, the regression coefficient R 2 sometimes exceeds its maximum value (R 2 > 1) or has a negative value in some cases. Although this was not observed in our case, for a possible future comparison with other works, it was decided to use [− log10(1 − R 2 )], a normal distribution of R 2 to compare between models. The study was performed with a 95% confidence level. As was commented above, for the comparison of the models, for the ANN, the data obtained with one hidden layer and 5 neurons were used for UH004, UP005, RC70PP, Inside Céram 5, and Inside Céram 50 membranes in ANN, and in the case of the other two membranes, one hidden layer with 6 neurons was selected. The results shown in Fig. 5 correspond to the mean values for the fitting accuracy obtained for each model for all the combinations of TMP and CFV analyzed. Figure 5 shows the means and LSD values for the fitting accuracy achieved for models tested for organic and inorganic membranes, respectively. When comparing the models, it was observed that there is no single model that best represents all the membranes under the operating conditions tested. Low MWCO organic membranes showed similar results in terms of fitting accuracy for the four models considered. The best predictions were obtained by the ANN model flowed by the CM, RSM, and RISM models.
Although the RC70PP membrane also shows this trend, the accuracy of the models is much similar between ANN and CM models. The main differences were observed with UH050 membrane. In that case, the ANN model achieved the worst accuracy, and the CM and RSM models showed a similar and better accuracy.
Regarding the inorganic membranes, the ANN model is classified in second and first place in terms of fitting accuracy for the membrane Inside Céram 5 and 15, respectively. For Inside Céram 50, ANN fitting accuracy is well below that of RSM, which is the model with the highest accuracy. Interestingly, a different trend is again observed between Fig. 4 Comparison between different ANN architectures and experimental results, example for Inside Céram 5, CFV 4 m·s −1 , and TMP 1 bar. Exp, experimental flux; 1hd, 5n, one hidden layer with 5 neurons flux; 1hd, 6n, one hidden layer with 6 neurons flux; 2hd, 5n, two hidden layers with 5 neurons each flux Inside Céram 5 and 15, with RSM having better accuracy for the first one but the worse for the latter membrane. It is important to note that the RSM model does not consider the CFV 4 m•s −1 condition in inorganic membranes that may justify its greater accuracy.
Although it could not be said that a particular model better predicts the flux of all the membranes, in general, ANN presented good accuracy for all the membranes. As an example, Fig. 6 presents the result obtained for RC70PP membrane under a fixed condition of CFV 3.4 m·s −1 and TMP 1.5 bar. It can be clearly seen that the CM model presents difficulties in the first minutes, without achieving a real representation of the experimental data until 80 min. In the zoom, it is possible to see how the RSM and ANN models are the ones that best fit the data, the last being the best. Other authors have also demonstrated the modelling capacity of ANN and RSM for other studies related to membranes, specifically fouling. Khan et al. (2022) evaluated SBM (empirical slot-pore blocking model), RSM, and ANN modelling techniques for accurate mapping of TMP by oscillating slotted pore membrane to treat deformable oil droplets, varying permeate fluxes. Noting that while both RSM and ANN delivered good results, ANN achieved better data modelling.
The analyzed models provide a detailed study of the fouling of ultrafiltration membranes using OOWW. Through semi-empirical models, it was possible to identify the type of fouling characteristic for each group of membranes (organic and inorganic), as well as the specific fouling mechanisms occurring for each membrane. The semiempirical models, RSM, and ANN presented good fittings and advantages when it comes to predicting larger data sets. Using RSM allowed the optimization of the parameters, since it analyzes the significance of these parameters and the interaction effects between them that affect the output response. With ANN, a good prediction of the permeate flux density was achieved.
This leads us to the idea that a joint study, such as the one carried out in this work, allows us to know in depth the membrane fouling mechanisms to select the best working conditions and to predict the permeate flux.

Conclusions
Theoretical models showed that more than one fouling mechanism occurs simultaneously in the same process, achieving both the series resistance model and the combined model, a good representation of the experimental data. This indicates that both cake layer formation and pore blockage contributed to membrane fouling. The ANOVA performed by fitting the response surface models shows that both CFV and TMP are significant variables with respect to permeate flux.
RSM made it possible to study the best operating conditions for membrane processes. Using ANN, the model fits all provided data with high regression coefficients R 2 . Regarding the activation function, tansig presented better results than selu. When comparing all the models, it was shown that depending on the membrane, one model fits better than the others; however, the ANN model is the one that best fits all the experimental data of low/medium MWCO ultrafiltration membranes. It is important to note that the results obtained are adjusted only to the conditions analyzed in this study and are not necessarily extrapolated to other conditions (TMPs and CFVs) or a different wastewater. The work carried out provides extensive knowledge of the data modelling of ultrafiltration membranes used for the treatment of OMW.
Author Contribution Magdalena Cifuentes-Cabezas, José Luis Bohórquez-Zurita, and Sandra Gil-Herrero developed the conceptualization, methodology, software, validation, formal analysis, and research. Magdalena Cifuentes-Cabezas was also the one who wrote the original draft and participated in the revision, edition, and visualization of the article. José Antonio Mendoza-Roca, María Cinta Vincent-Vela, and Silvia Álvarez-Blanco were also part of the conceptualization, methodology, validation, review, editing, and visualization of the work.
Funding Open Access funding provided thanks to the CRUE-CSIC (Universitat Politècnica de València) agreement with Springer Nature. This research has been financed by the Ministry of Economy, Industry and Competitiveness of Spain through the project CTM2017-88645-R and the European Union through the Operational Program of the Social Fund (FSE) financing ACIF-2018.

Data Availability
The data will be made available on request.

Competing Interests
The authors declare no competing interests.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.