Valorization of Wet Oily Petrochemical Sludge via Slow Pyrolysis: Thermo-Kinetics Assessment and Artificial Neural Network Modeling

Oily sludge is a hazardous waste stream of oil refineries that requires an effective process and an environment-friendly route to convert and recover valuable products. In this study, the pyrolytic conversion of the wet waste oil sludge was implemented in an autoclave pyrolyzer and a thermogravimetric analyzer (TGA) at 5°C/min, 20°C/min, and 40°C/min, respectively. The kinetic analysis was performed using model-free methods, such as Friedman, Kissenger–Akahira–Sunose (KAS), and Ozawa–Flynn–Wall (OFW) to examine the complex reaction mechanism. The average activation energy of wet waste oil sludge (WWOS) estimated from Friedman, KAS, and OFW methods was 198.68 ± 66.27 kJ/mol, 194.60 ± 56.99 kJ/mol, and 193.28 ± 54.88 kJ/mol, respectively. The activation energy increased with the conversion, indicating that complex multi-step processes are involved in the thermal degradation of WWOS. An artificial neural network (ANN) was employed to predict the conversion during heating at various heating rates. ANN allows complex non-linear relationships between the response variable and its predictors. n H , ΔG, and ΔS were found to be 191.26 ± 2.82 kJ/mol, 240.79 ± 2.82 kJ/mol, and −9.67 J/mol K, respectively. The positive values of ΔH and ΔG and the slightly negative value of ΔS indicate the endothermic nature of the conversion process, which is non-spontaneous without the supply of energy.


INTRODUCTION
Economic and social growth are linked to the demand for energy (Gai et al., 2021;Kumar Mishra and Mohanty, 2021). Carbon is one of the sources mainly obtained from fossil fuel, which serves as the primary source of energy and feedstock for the petrochemical industry (Mishra and Mohanty, 2020a). The exploitation of fossil fuel by refining generates a large quantity of oily sludge (Collin et al., 2020). Waste oil sludge (WOS) is a heterogeneous mixture of solids and oil (Cheng et al., 2017), which is accumulated in oil tanks, in slop oil emulsion tanks, in oil/water phase separators, and open ponds for different treatments in a petroleum refinery . It is a heterogeneous mixture containing organic and inorganic constituents (Verma et al., 2010), such as waste oil, water, and minerals . The disposal of WOS is environmentally challenging due to the presence of cyclic hydrocarbons (Heidarzadeh et al., 2009) such as benzene, phenols, and anthracene as well as heavy metals (Lin et al., 2018) and various other toxic materials (Liu et al., 2018). As a common practice, WOS ends up in a landfill or is burnt in the air. WOS is an unstable composition of cyclic hydrocarbons along with heavy metals. Its usage in landfilling could contaminate the underground water and burning causes serious air pollution.
Due to these problems, Resource Conservation and Recovery Act (RCRA) designated WOS as a hazardous compound (Gaur et al., 2020;Ghazizade et al., 2020). There is not a single method to treat the oily sludge. A combination of physical and chemical processes is used to treat it, and some of the treatments involve solvent extraction (Zhao et al., 2020), centrifugal separation , oil recovery using surfactants (Ramirez and Collins, 2018), oil recovery using ultrasonic field (Luo et al., 2020), freezing and thawing cycles (Hu et al., 2015), microwave (Tan et al., 2007), and ultrasonic irradiation (Xu et al., 2009). Each method has its own merits and demerits, but overall, the treatment or disposal of oily sludge is expensive owing to the costs of reagents and operating processes containing complex schemes and arrangements of the equipment. Oil recovery using surfactants presents another challenge as the effluents from the treatment process are often toxic and thus rendered as an additional source of pollution. Oily sludge disposal and recovery technologies were discussed in the literature. However, its effective utilization strategies toward green energy and a safer environment still require a comprehensive study.
Environment-friendly treatment of hazardous waste has attracted the attention of the scientific community in recent times. Pyrolysis is considered a promising option for waste treatment, owing to the conversion of biomass into various forms of energy (Mishra et al., 2020a). Pyrolysis is a simple and the least environmentally polluting process (Assad Munawar et al., 2021), which has shown its effectiveness in converting complex waste materials into volatiles and biochar (Hameed et al., 2020;Tang et al., 2020). Some of the previous works involving pyrolysis (Chang et al., 2000;Conesa et al., 2014;Mishra et al., 2019;Mishra and Mohanty, 2020b) focused on the quality and yield of the bio-oil (Gong et al., 2018) as a function of the pyrolysis temperature (Yang et al., 2019) and use of different additives (Cheng et al., 2017) and catalysts (Sikander et al., 2019). WOS may vary significantly from refinery to refinery and within a refinery in terms of the type of crude oil used, schemes of refinery operations, and the selection of different substances in different treatment processes such as coagulants (Verma et al., 2010), oxidizers (González et al., 2018), and electro-kinetic systems for oily sludge demulsification (Fellah Jahromi and Elektorowicz, 2018). The number of hydrocarbons may vary significantly (Hu et al., 2013) from 5 to 86% with wastewater (González et al., 2018) and minerals (Naqvi et al., 2018a). The variation in the composition poses a greater challenge to the industrial operations for its treatment.
The research needs to focus on the solid-state reaction mechanism of the complex-natured wet oily sludge. Extensive literature reviews suggested a lack of the WOS thermo-kinetic study with model-free methods. The combination of WOS with thermodynamics and machine learning in a slow pyrolysis process was not available. Therefore, this work aims to elucidate the process behavior by employing iso-conversional methods to estimate the activation energy of wet oil sludge. Pyrolysis experimentations were performed using an autoclave pyrolyzer unit to determine the pyrolysis' product yield and oil composition. To the best of our knowledge, studies were scarce for identifying the multiple or single-step reaction scheme of hazardous oily complex compounds. This study also provides insight into the oily sludge conversion process and a multi-step complex reaction scheme. The pre-exponential coefficient was calculated from ASTM E1641-16 international standards. The thermodynamic properties (ΔH, ΔG, and ΔS) were obtained from the kinetic parameters (E a , n, A). As aforementioned, there is no Artificial Neural Network (ANN) study on the hazardous oily complex compound found in the literature. This study provides the successful implementation of ANN models on mass loss data to study the slow pyrolysis process of WOS.

MATERIALS AND METHODS
The wet waste oil sludge (WWOS) from the filter press at the bottom of the oil separating tank in a Pakistani oil refinery was collected. The received samples were tested for proximate and ultimate compositions. The ASTM international standard methods were followed to estimate the volatile matters, fixed carbon, and ash contents (Naqvi et al., 2019b). Elemental analysis was carried out using a PerkinElmer's CHNS element analyzer (2400II, United States), whereas a higher heating value (HHV) was obtained from a bomb calorimeter (proximate analysis). The thermal behavior was envisaged in a thermogravimetric analyzer (TGA) (SDT Q600). An inert atmosphere was created inside the TGA by purging a continuous flow of 60 ml/min of N 2 gas while heating from 25°C to 1,000°C at different constant heating rates of 5°C, 20°C, and 40°C/min.

Thermogravimetric Analysis
The TGA is an essential device for a precise measurement of the mass loss of a substance with changing numerous temperature values. The kinetic analysis was performed by the relative mass loss data at altering temperature values with respect to time.

Kinetic Analysis
The rate equation (Eq. 1), dα dt , is equal to the product of the rate constant, k(T), and the reaction model in the differential form, f(α).
where α is the extent of conversion and is defined in terms of mass variations presented in Eq. 2 where m 0 is the starting mass of the sample, m ∞ is its remaining mass, and m t is the mass at some instant in time (t). The rate equation can be expanded by defining a heating rate, β dT/dt, and the dependence of rate constant on temperature from the Arrhenius law (Eq. 3).
where R is the gas constant and E a is the activation energy. Integration is proceeded after the rearrangement of the variables to deliver a reaction model in the integral form, g(α) as depicted in Eq. 4.
The right-hand side of the equation is not straightforward to work with. Several methods such as Friedman (Friedman, 1964), Kissinger-Akahira-Sunose (KAS) (Kissinger, 1957), and Ozawa-Flynn-Wall (OFW) (Takeo, 1965) use certain approximations (Flynn and Wall, 1966). Friedman, Kissinger-Akahira-Sunose (KAS), and Flynn-Wall-Ozawa (FWO) are model-free methods to evaluate the trend of activation energy during conversion (Mishra et al., 2019;Mishra et al., 2020b). Model-free methods are often employed as they don't require a pre-assumption of the reaction mechanism. Friedman (Eq. 5) is a differential and linearized form of the rate equation whereas integral methods such as KAS (Eq. 6) and FWO (Eq. 7) are approximate solutions of a rate equation (Eq. 4). The Friedman method, in its true sense, is a better representative than the rest; however, the derivative in Friedman's linear equation makes it sensitive to data noise which is the reason why other non-sensitive integral methods are necessary to subside the variations caused by the data noise.
where ( dα dt ) α i T α i and E αi are the conversion rate, temperature, and activation energy corresponding to α i , whereas β i is one of the heating rates at which the experiments are conducted.
The apparent activation energy, E α , can be calculated from the slopes of the lines if the experiment is performed at different heating rates. The above methods are referred to as nonisothermal methods. Pre-exponential coefficient (A) is obtained from ASTM E1641-16 considering the first-order reaction mechanism.

Thermodynamic Analysis
The changes in the enthalpy (ΔH) (Naqvi et al., 2019b;Naqvi et al., 2019a), Gibbs free energy (ΔG) (Tahir et al., 2019), and entropy (ΔS) (Tahir et al., 2020) can be determined from the activation energy E a and pre-exponential coefficient A by using these given equations (Eqs 8-10): where k B represents the Boltzmann's constant whose value is 1.381 × 10 -23 J K −1 , h represents the Planck's constant whose value is 6.626 × 10 -34 J s, and T p is the DTG peak temperature.

Autoclave Pyrolyzer Unit
The pyrolysis tests of WWOS samples were carried out in a single-mode autoclave pyrolyzer unit at different temperatures (350°C, 450°C, and 550°C) by keeping all other conditions (pressure and amount of sample) constant for each run. The autoclave pyrolyzer unit consisted of a 360 ml vessel made up of stainless steel (SS) material with 1 dm 3 capacity. An amount of 150 g of wet, oily sludge sample was kept in the vessel (20.32 cm length × 10.16 cm I.D), which was airtight. The experimental setup in terms of a schematic diagram is shown in Figure 1.
The system was heated at 10°C/min to the required temperature and sustained for 0.5 h to provide sufficient time for thermal degradation. Then, the release of pyrolysis products from the autoclave pyrolyzer unit was manually stopped. The vapor produced in the vessel evolved from the top of the vessel and was directed into the condenser, where the liquid products were condensed and collected. The non-condensable gases were usually expelled either into the atmosphere or collected in gas-sampling bags for analysis and characterization. The pyrolyzed solid product was collected from the bottom of the autoclave vessel after completing each experimental run. The yield of solid char and pyrolysis liquid was determined in each experiment by weighing products and the sample used in each experimental run whereas the yield of gases by the difference. The yield of the product is obtained by using Eq. 11.

Yield (%)
amount of product amount of sample × 100.

Predictive Model Development Using Feed Forward Neural Network
A multilayer perceptron (MLP) based feed-forward back propagation neural network (FFBPN) was employed in this study to simulate the mass loss of WWOS obtained from the pyrolysis experiments conducted in TGA by maintaining an inert atmosphere. The variation in mass and conversion rates at different temperatures and under different heating rates has been modeled using an ANN. The ANN has been developed for a long time (Klemeš and Ponton, 1992) with many variations (Ponton and Klemeš, 1993;Shahbaz et al., 2020;Rashid et al., 2021). The FFBPN model has been widely used in the literature owing to its good pattern classifier and overall efficiency capability (Hafeez et al., 2020;Arshad et al., 2021). The proposed feed-forward network is a supervised learning technique comprised of three-layered architecture for data prediction, that is, the input, the hidden, and the output layers [ (Naqvi et al., 2019a;Naqvi et al., 2018b. Each layer is connected through weights and biases. The nonlinear function can be adjusted using the weights and biases in the hidden layer. For the development of the feed-forward neural network (FFNN), the input layer was fed with heating rate and temperature. The output layer was fed with weight loss (%). The data has been normalized in the range of [0-1] to improve network performance. 70% of the data was used to train the network, while 30% of the remaining data was divided equally in the validation and testing of the network. The number of neurons in the hidden layer has been adjusted iteratively to achieve the minimum mean square error (MSE) and maximum R 2 values . For the training of the network, Levenberg-Marquardt (LM) function has been used. Back propagation (BP) is widely used in neural network modeling. It is generally known as a supervised learning technique, which is used for nonlinear mapping. Therefore, it has been used in this study. Table 1 shows the various parameters used for the training of the feed-forward BP network to predict the mass loss (%) of wet oily sludge. The mass loss (%) of WWOS at various heating rates was simulated using 10 different models for the heating rate of 5°C/ min by changing the number of neurons in the hidden layers. This study has also been conducted with two other heating rates (20 and 40°C/min). Table 2 shows the network performance results based on MSE and R 2 for the mass loss (%) prediction at the heating rate of 5°C/min for different topologies. It can be witnessed that the values of MSE and R 2 for training, validation, and testing be varied by changing the number of neurons in the hidden layer from 1 to 10. The minimum value of MSE and the maximum value R 2 were found to be [6.22 e −05 5.34 e −05 1.20 e −04 ] and [9.99 e −01 9.99 e −01 9.99 e −01 ] for training, validation, and testing, at 9 neurons in the hidden layer and 9 neurons was selected for the hidden layer in the network. The selected network architecture was found to be [2 × 9 × 1].

Material Characterization
The freshly received WWOS had 34.27% of moisture content. The sludge's oil content was 24%, with a volatile matter of 40.73% and HHV of 15.65 MJ/kg. The amounts of carbon, hydrogen, and oxygen were 35.78, 3.10, and 59.58%. The oily sludge's physicochemical composition makes it suitable for thermochemical conversion with 14.5% of ash, reducing the requirement of the catalyst during the conversion process.

Thermal Behavior
The thermograms (TG and DTG curves) of WWOS under an inert atmosphere are illustrated in Supplementary Figure S1. It shows the variation in mass and conversion rates at different temperatures and under different heating rates. The mass loss started at a reasonably low temperature owing to the vaporization and evaporation of low boiling volatiles and water. A slight shift in the peaks toward high temperatures can be identified with a significant increase in the degradation rate of WWOS at a higher heating rate. The shift of the peak toward higher temperature indicates the delay in the escaping of the gases from the material structure. The thermal characteristics of WWOS at different heating rates were obtained from (DTG) the curves in Supplementary Figures S2(A-C) at 5, 10, and 20°C/min. The obtained values are reported in Supplementary Table S1 and plotted in Supplementary Figure S2D. It is evident that T i , T p , and ( dα dt ) p increased with the increasing heating rates. T f increased significantly when the heating rate was increased from 5 to 20°C/min. This value was slightly decreased indicating a delay in completing the mass loss.

Iso-conversional Methods
The Friedman, KAS, and OFW methods rely on linear curve fittings for a specific conversion (iso-conversion) at various heating rates. E a of WWOS at different extents of conversion can be estimated from the linear fitted line as shown in Figures 2A-C. Table 3 summarizes the evolution of E a with the extent of conversion, while Figure 3 shows it in a graphical form. The R 2 values of 0.95 and above are an indicator for the effective estimation of E a for the conversion between 0.2 and 0.6. The E a from different methods coincide well until 50%, which is also indicated by the values of R 2 close to 1 and a lower standard deviation in Figure 3. The E a values were increased from 119.35 kJ/mol to 364.41 kJ/mol when estimated using the Friedman method. The increase in the activation energy shows that a multi-step complex process is involved in  converting the oil sludge under pyrolytic conditions. The variation in E a indicates the variation in the composition and complexity of the feedstock. A similar trend in the activation energy during conversion has been reported in a recent study (Ma et al., 2019). Lower E a values at initial stages can be related to the physical devolatilization of water and lower molecular weight hydrocarbons. The increase in the E a values at higher conversion (Serio et al., 1987) or temperature can be attributed to the chemical transformation such as cracking (Siddiqui, 2010). The A values were increased from 1.67E07 s −1 to 1.04E09 s −1 , when the conversion increased from 0.2 to 0.6. Table 3 A summary of the kinetic studies performed on the oily sludge is given in Supplementary Table S2. The average activation energy of WWOS in this study was higher than the earlier reported values in the literature. Ma et al. (2019) reported a similar trend in the activation energy. The authors attributed the increase in the activation energy at a greater extent of conversion to the complex thermal conversion and variability in the composition, which is normally associated with WWOS obtained from oil refineries.

Thermodynamic Analysis
The constants E a and A obtained from the kinetic analysis were used to evaluate the thermodynamic characteristics of the conversion process. A summary of the thermodynamic parameters is provided in Table 4. Enthalpy, nH, of the process, remained positive, indicating the endothermic nature of the reaction. A difference of 49.5 kJ/mol between E a and nH indicates some potential of forming activated complexes during the conversion. Positive ΔG and negative ΔS indicate that the reaction remains reactant-favored and non-spontaneous at all temperatures (Naqvi et al., 2018c;Naqvi et al., 2020).

Yield and Oil Composition
The yield of liquid, solid, and gaseous products obtained from the pyrolysis of WWOS at various isothermal temperatures of 350°C, 450°C, and 550°C are depicted in Figure 4. The calculated values shown in the table are the mean values and the standard deviations of at least three pyrolyses operated at the specific temperature. It was found that as the pyrolysis temperature increased, the yield of pyrolysis liquid increased (30.67-39.00 wt%), the gas yield increased (16.98 wt%-19.84 wt%), and the solid yield decreased (52.35-41.16 wt%). The higher yield of pyrolysis liquid and gas occurred owing to secondary cracking at higher temperatures. The solid yield decreased at elevated temperatures, which was also confirmed by the thermogravimetric analysis (Tang et al., 2019). Similar observations were observed in the literature . Lin et al. (2018) investigated the oily sludge in the U-shaped reactor for saturation-enriched light oil production. It was observed that temperature played a significant role in maximum liquid production. Song et al. (2019) reported different properties of the products obtained from the pyrolysis of oily sludge carried out in a pyrolysis-magnetic separation reactor. The pyrolysis liquid was composed of water and tar. Pyrolysis product yields were observed at different temperatures. It was also reported that the pyrolysis temperature increased the yield of water, tar, and gas, while a corresponding decrease in the yield of solids was also reported. These studies conclude that 550°C was the optimum temperature to obtain the maximum liquid yield using pyrolysis. GC-MS obtained the composition of oils produced from pyrolysis of wet oily sludge at different temperatures: 350°C, 450°C, and 550°C. The elements acknowledged in the fractions analyzed have been classified into six aliphatic groups, methyl aliphatic, aromatic and polycyclic aromatic compounds, nitriles and amides, alcohols, and oxygen-containing compounds such as carboxylic acids, esters, and ketones. Supplementary Table S3 shows the distribution according to the percentage area of various compounds. These main TABLE 3 | Activation energies obtained from the Friedman, KAS, and OFW methods and pre-exponential coefficients estimated from the ASTM E1641-16 method considering the first-order reaction mechanism at 20°C/min of wet waste oil sludge.    Figure 5. The error histogram is shown in Figure 5A, representing the normal distribution of errors across zero. Figure 5A shows that the error between the experimental and simulated mass% lies in the range of [−0.06 to +0.06]. Since the errors between actual and predicted values are low, it depicts that the model is well trained and can be further utilized. For the prediction of new output data, Figure 5B shows the performance plot using MSE for mean square error for training, validation, and testing of a network with 9 hidden neurons in the hidden layer. It can be observed that the minimum error has been achieved at 253 epochs. Figure 5C shows the training, validation, and testing regression plots. It can be observed that very few errors have been obtained between the target and output values, which demonstrates a strong correlation. The results show that the value of R 2 in all the training, validation, and testing plots is close to 1. A good fit between the experimental and predicted data was achieved, as shown in Figure 6. The results explained that the proposed network is in good agreement with the experimental results and could be extensively applied to predict TGA for various waste sludge with nonlinear nature (Bong et al., 2020;Prabhakaran et al., 2020). Pyrolysis characteristics of industrial wet oil sludge in an inert atmosphere of nitrogen were investigated using a thermogravimetric analyzer at 5°C/min, 20°C/min, and 40°C/ min. Activation energies at different conversion levels were estimated from Friedman, KAS, and OFW methods. According to Friedman, KAS, and OFW methods, the average activation energy was 198.68 kJ/mol, 194.60 kJ/mol, and 193.28 kJ/mol. The increase in the activation energy on conversion showed that the conversion process might have followed a multi-step complex reaction scheme. Positive nH and ΔG with negative ΔS indicate the endothermicity and non-spontaneity of the reaction. The maximum liquid yield using pyrolysis was obtained at 550°C containing aliphatic, methyl aliphatic, aromatic, and polycyclic aromatic compounds, nitriles and amides, alcohols, and oxygencontaining compounds such as ketones and aldehydes. The proposed ANN that was developed showed a good agreement with experimental results to predict complex compounds' decomposition behavior. The R 2 in all training, validation, and testing plots was close to 1. This study provides an effective strategy to convert complex hazardous fuels into valuable energy products.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/Supplementary Material; further inquiries can be directed to the corresponding author.

AUTHOR CONTRIBUTIONS
SN, ST, AK, IA, and MM proposed the main idea and methodology and performed the experiments. WF and NT contributed toward validation and modeling. DJ and AA provided suggestions to improve the manuscript.