Introduction

Nowadays, increasing use of the limited resource of fossil fuel (Avila-León et al. 2020), global warming (Malhotra and Ali 2019), environmental pollution (Teo et al. 2019), and energy crises (Li et al. 2018) have forced researchers to discover renewable and potential alternative fuels (Gebremariam and Marchetti 2018). Among biofuels, since biodiesel is eco-friendly, has low-sulfur and aromatics content, is non-toxic, and renewable, it is more widely used in industry and transportation as the green fuel (Zhang et al. 2017; Chiosso et al. 2020). Biodiesel is a long-chain mono-alkyl fatty acid methyl ester (FAME) derived from edible or non-edible vegetable oils and animal fats through transesterification and esterification reactions (Quah et al. 2019). Triglyceride oils as a feedstock for biodiesel production change from country to country (Coelho et al. 2017). Most of the vegetable oils and animal fats are considered a resource for human food, but the use of edible oils is not reasonable (Hoseini et al. 2019). Primarily, the edible oils are imported in the Middle East and using them as a feedstock is not economically justified in the transesterification reaction. Also, the Middle East has a warm and dry climate, and most of its lands are deserts. Therefore, the triglyceride oil feedstock for the transesterification reaction should be attuned to these conditions. Various researches were performed to find suitable native non-edible oil as a feedstock source for biodiesel production in the Middle East. The following oils are among edible or non-edible oils that have been reported as a triglyceride source; Phoenix dactylifera (Amani et al. 2013), Common Purslane (Hoseini et al. 2019), safflower oil (Tahvildari et al. 2013), linseed oil (Tahvildari and Mohammadi 2014), canola oil (Pirouzmand et al. 2015; Rezayan and Taghizadeh 2018), soybean oil (Salehi et al. 2016), Amygdalus scoparla (Vares et al. 2016), Eruca sativa oil (Tayari et al. 2020), and waste fish oil (Maghami et al. 2016). According to the literature, the oil used must be significantly available and can be grown in different conditions. For instance, the triglyceride oils that are non-native and imported oils are hard to access, low-efficient, and non-economical. The Capparis spinosa oil used in this study can be widely utilized in various climates and areas, and its seeds can be extensively generated.

Capparis spinosa is a wild-evergreen plant belonging to the Capparaceae family. This plant is native to the Mediterranean and is compatible with dry climate, and also grows widely in west and central Asia like Iran and Armenia (Samari et al. 2019; Motamedi et al. 2020). It is used economically due to applications of its flower buds and fruits, and in cuisine and traditional medicine usages of various parts of the plant (seeds, aerial parts, and roots) for different ailments such as rheumatism, gout, and pain treatment (Tir et al. 2019, Baradaran Rahimi et al. 2020). It is essential to declare that Capparis seeds contain ~ 30–50% oil in which oleic, linoleic, and palmitic acids are the dominant unsaturated fatty acids (Matthäus and Özcan 2005). Figure 1 shows the Capparis spinosa plant, flower, fruit, and seeds used in the present study. There is some research on biodiesel production from Capparis spinosa oil. Tahvildari et al. (2012), Chitsaz et al. (2016) produced biodiesel from Capparis spinosa oil seed using the primary homogenous catalysts KOH and NaOH; their seeds contained nearly 30% oil. Munir (Munir 2019) synthesized biodiesel from nine novel non-edible oil seeds, including Capparis spinosa oil, in the presence of nine different catalysts.

Fig. 1
figure 1

Capparis spinosa a plant, b flowers, c fruit, and d seeds

Generally, KOH and NaOH homogenous catalysts are utilized to produce biodiesel on the industrial scale due to their excellent activity and high rate in the transesterification reaction (Pirouzmand et al. 2015). However, these catalysts form soap in the presence of a high content of free fatty acid (FFA) and water, the saponification reaction causes problems in the washing step of the glycerol separation process, and finally, the biodiesel yield decreases (Pirouzmand et al. 2018). In another approach, using acid catalysts like H2SO4 for biodiesel production causes corrosion in the reactor and needs washing steps to neutralize products and remove the produced effluent (Kaur et al. 2018). Therefore, it is necessary to find a heterogeneous catalyst with the properties of large surface area, low cost, easy separation from the reaction mixture, recoverable, and able to be used several times (Coelho et al. 2017; Quah et al. 2019).

Zeolites are fascinating materials widely used as active catalysts, for separation and purification of liquid or gas, and for environmental protection. The zeolites used as a catalyst or catalyst support are a potential substitute for the conventional catalysts applied for biodiesel production. The zeolites have various advantages that create good supports for a heterogeneous catalyst. This includes selective size and porosity, large surface area, high thermal stability, pore structures with cavities and channels of molecular dimensions, and shape selectivity. The use of zeolite as support for the biodiesel production process has advantages such as easy separation from the reaction mixture, non-corrosive, non-toxic, eco-friendly, and reusable (Al-Jammal et al. 2016). Today, more attention is paid to synthesize zeolites in comparison with the natural zeolites because of their uniformity in particles and crystalline purity (Yang et al. 2019). The desirable synthetic zeolite types are NaX, NaY, Na-p1, etc. (Purnomo et al. 2012). Martínez et al. (Martínez et al. 2014) synthesized K2O/NaX catalyst for biodiesel production from Sunflower oil. Manadee et al. (Manadee et al. 2017) synthesized zeolite NaX as catalyst support applying rice husk silica and impregnating potassium acetate on NaX. The x/NaX catalyst was utilized for the transesterification of jatropha seed oil. Peña et al. (Peña et al. 2013) synthesized biodiesel from sunflower oil using KNO3/NaX catalyst.

In the present study, biodiesel production from Capparis spinosa oil was studied using the heterogeneous catalyst of nanozeolite NaX as the support. The NaOH/NaX catalyst was produced through the hydrothermal reaction and characterized by XRD, SEM, and BET analyses. The response surface methodology (RSM) was used to determine the optimum conditions among the reaction parameters of catalyst weight, methanol to oil molar ratio, and time. A kinetic model was suggested, and the kinetic parameters were specified by fitting the actual results with the model.

Materials and methods

Materials

Sodium aluminate (98%), sodium sulfate (99%), sodium hydroxide (99%), methanol (99%), silicon dioxide (95–98%), isopropyl alcohol (65%), and n-hexane (95%) were purchased from Merck Company, Germany. The Capparis spinosa seeds were collected from Dezful, Khuzestan province, Iran. The devices of BATE PC21 furnace, Lab Tech oven, and RLABINCOM-81 stirrer were used in the experiments.

Feedstock preparation

Capparis spinosa fruits, seed, and roots were cleaned and dried in the shade at room temperature for a week to reduce the moisture content. Then, they were crushed and powdered in a mill; 200 g of powder were mixed with n-hexane (boiling point range 60–70 °C) as a solvent. It should be note methanol is not a good solvent for oil extraction because it is polar solvent. Therefore, Methanol is used in the transesterification, not in the extraction. The oil extraction was performed by applying a Soxhlet apparatus until the discoloration of the solvent for 6-8 h (Tahvildari et al. 2013). The Soxhlet extraction is a better method for achieving crude oil from the Capparis spinosa seeds compared to other extraction methods because this technique is a continuous system, and the solvent can be completely recovered (Kadir Yesilyurt and Cesur 2020). The mixture of solvent and oil was placed on a rotary evaporator to recover the solvent. The recovered solvent and extracted oil were used for the subsequent extraction process and as feedstock for biodiesel production, respectively (Tavakoli et al. 2018).

Catalyst preparation

The NaOH/NaX catalyst was prepared through the hydrothermal reaction. A certain amount of NaOH powder was added to the solution of sodium aluminate and distilled water and stirred by a magnetic stirrer for 1 h. After preparing the aluminate solution, 3.43 g silicon dioxide was added to the reaction mixture. After 15 min, the aluminosilicate gel was transferred to the reactor and stirred at 60 °C for 4 days. The reaction mixture was separated by centrifugation for 15 min at 1000 rpm, and then the mixture filtered and washed under vacuum several times with deionized water until pH < 8. The at 90 °C overnight to crystallize. Finally, it was calcined at 300 °C for 1 h (Zhan et al. 2001, Jakubinek et al. 2007).

Catalyst and oil characterization

The characterization of the nano-catalyst NaOH/NaX was determined by different methods to investigate its structural and composition properties. X-ray powder diffraction (XRD, Philips PW1730) was applied for phase identification of crystalline material. The data were collected over 2 h in the range of 10–80° with a step size of 0.05° and time per step of 1 s. Scanning Electron Microscopy (SEM, Philips XL30 ESEM), and Brunauer–Emmett–Teller (BET, BJH, BELSORP MINI II, BEL) BET analyses were used for determination of the catalyst morphologies and surface area of the non-porous and pore size distribution of the mesoporous solid, respectively. The fatty acid profile was determined by gas chromatography-mass spectrometry (GC–MS) analysis on an Agilent 5973 GC and 6890 Mass Spectrometer at an inlet temperature of 250 °C and auxiliary temperatures of 280 °C and increasing rate of 80 °C per minute for 5 min. The GC-mass column was 0.3 m × 0.32 mm id × 0.15 µm dimensions with nitrogen as the carrier gas.

Transesterification reaction

The transesterification reaction was carried out in a 250 mL round flask batch reactor fitted with an oil bath, magnetic stirrer, and water-cooled reflux condenser. The desired weight of catalyst (1–5 wt%) and methanol (6:1 to 12:1 molar ratio) was mixed at a constant temperature of 65 °C. This temperature was selected to ensure that methanol participates in the reaction. A stirrer heater kept the temperature fixed at all the stages of the biodiesel production, and the temperature was checked using a thermometer. Also, there was no temperature sensitivity for the current study, decreasing or increasing temperature in the range of 1–2 °C did not have any significant effects on the transesterification reaction. Then, Capparis spinosa oil was pre-heated and added to the reaction mixture, and all materials were mixed at 400 rpm for 1–4 h (Teo et al. 2019). At the end of the reaction, the reaction flask was cooled down to room temperature, and the solid catalyst separated by centrifugation from the reaction mixture. Then the residual methanol was entirely removed by rotary vacuum distillation at 60 °C (Xie and Wang 2020). Afterward, the biodiesel and glycerol phases separated as the top and the bottom phases after a few minutes, respectively (Teo et al. 2019.). Figure 2 shows stages of biodiesel production from Capparis spinose oil. For the calculation of biodiesel yield, the product was washed with distilled water to remove impurities such as residual methanol, catalyst, and glycerol. Finally, the biodiesel yield was determined with Eq. (1):

$$Biodiesel yield\;(\% ) = \;({\text{Weight of FAMEs }}/{\text{Weight of Oil }}) \times 100$$
(1)
Fig. 2
figure 2

Stages of biodiesel production from Capparis spinose

Experimental design

In this study, response surface methodology based on the central composite design (RSM-CCD) was employed to design biodiesel production experiments with the biodiesel yield (Y) as a response. The fractional factorial design contained fourteen factorial points and six center points. The catalyst weight (A), methanol to oil molar ratio (B), and time (C) were independent variables selected to be optimized for the conversion of Capparis spinose oil to biodiesel. The ranges, actual, and coded levels of the independent parameters are given in Table 1 (Xie et al. 2007; Martínez et al. 2014; Manadee et al. 2017). Twenty experiments with six replications were performed at the center points to estimate the error value, and the data is analyzed via a second-order polynomial as presented in the following (Halim et al. 2009, Talebian-Kiakalaieh et al. 2013, Aryasomayajula Venkata Satya Lakshmi, et al. 2020, Zhang et al. 2020):

$$Y={\beta }_{0}+\sum_{i=1}^{k}{\beta }_{i}{X}_{i}+\sum_{i=1}^{k}{\beta }_{ii}{X}_{i}^{2}+\sum_{i=1}^{2}\sum_{j=i+1}^{3}{\beta }_{ij}{X}_{i}{X}_{j}+\varepsilon$$
(2)

where Y is the response (biodiesel yield), βo, βi, βii, and βij are the coefficients for the constant, linear, quadratic, and interactive effects, respectively. Xi and Xj show levels of the independent parameters, and ε is the error. A quadratic equation was applied to predict biodiesel yield as a function of independent parameters (Ghoreishi and Moein 2013). The adjusted-R-square and R-square were measured with Eqs. (3) and (4), respectively.

$$R_{adj}^{2} = 1 - [(SS_{{{\text{Re}} sidual}} /DF_{{{\text{Re}} sidual}} )/((SS_{{{\text{mode}} l}} + SS_{Residual} )/(DF_{{\text{model}}} + DF_{{{\text{Re}} sidual}} ))]$$
(3)
$$R^{2} = SS_{{{\text{Re}} sidual}} /(SS_{{\text{model}}} + SS_{{{\text{Re}} sidual}} )$$
(4)

where DF and SS are the degree of freedom and sum of squares, respectively.

Table 1 Actual value and coded levels of variables of the RSM-CCD

GC–MS analysis of Capparis spinosa oil and characterization

The fatty acid profile of Capparis spinosa oil was evaluated via GC–MS analysis with 30 wt% oil extracted from Capparis spinosa seed. First, the pure oil was heated to remove moisture, and the titrimetric assay was used to calculate the initial acid value (Hoseini et al. 2019). The initial acid value of the present extracted oil was 1.8 mg KOH/g oil, which is in agreement with Mendonça et al. (Mendonça et al. 2019), who stated an ideal oil as a feedstock for biodiesel production must have an acid value below 2 mg KOH/g oil. Therefore, an esterification reaction of the oil was not needed, and Capparis spinosa oil was directly used for the transesterification reaction. Also, the color of the oil is ginger with no smell. The viscosity and density were 20 Cst and 0.912 g.cm−3, respectively.

The results of GC–MS analysis and fatty acid composition profile are shown in Fig. 3 and Table 2, respectively. The presence of double bonds causes an increase in the degree of fatty acid unsaturation that leads to the autoxidation of fuels. As can be seen in Table 2, the unsaturated fatty acids are linoleic, oleic, and palmitic acids containing a higher contribution percentage (88%) in the total fatty acid profile. It can be concluded that Capparis spinosa biodiesel is prone to oxidation. This high oxidative characterization of oil is influenced by the fatty acid compound of special oil. The highest percentage among the unsaturated fatty acids is linoleic acid based on the GC–MS analysis.

Fig. 3
figure 3

GC–MS analysis for Capparis spinosa oil

Table 2 Fatty acid profiles of salvia Capparis spinosa oil

Physicochemical properties of biodiesel

The physicochemical properties and biodiesel quality were examined according to the American Standards for Testing Materials (ASTM). Rezania et al. (2019) reported that the main physicochemical characteristics of biodiesel are flash point, pure point, cloud point, cetane number, viscosity, and density. These properties are affected by the compositional profile of biodiesel. Another fuel property specially for biodiesel was carried out based on another standard (Dhawane et al. 2017).

The FFA content and acid value (AV) were determined by the titrimetric method with phenolphthalein indicator and KOH solution, and were calculated in the following (Kadir Yesilyurt and Cesur 2020):

$$AV(mgKOH/g) = [(v - b) \times N \times 56.1]/w$$
(5)
$$FFA(\% ) = [(v - b) \times N \times 28.2]/w$$
(6)

where v and b the volume of titrant solution and blank volume, respectively. N = 0.1 is the normality of the KOH solution, and w is the weight of the oil. The constant values of 56.1 and 28.2 indicate the molar weight of KOH and the percentage of oleic acid content in the oil as the feedstock, respectively.

The iodine value (IV), the saponification number (SN), cetane number (CN), and higher heating value (HHV) are determined with the following formulas:

$$IV = \sum {(254 \times D \times A_{i} )/MW}_{i}$$
(7)
$$SN = \sum {[(560 \times A_{i} )/MW_{i} ]}$$
(8)
$$CN = 46.3 + (5458/SN) - 0.225IV$$
(9)
$$HHV = 49.43 - [0.041(SN) + 0.015(IV)]$$
(10)

where MWi and Ai are the molecular weight and the proportion of each component in biodiesel, respectively. In the end, the molecular weight (MW) of biodiesel from Capparis spinosa oil was determined using the equation below.

$$MW=3\times {(AMW}_{FA})+weight of glycerol backbone$$
(11)

where AMWAF indicates the average molecular weight of total fatty acid.

Results and discussion

Characterization catalyst

XRD analysis

The X-Ray diffraction (XRD) analysis was performed to identify the bulk phase, internal, and crystalline structure (Al-Jammal et al. 2016) and also calculate the pore size of the NaOH/NaX catalyst shown in Fig. 4. The result of this analysis showed that the synthesis of zeolite X is in agreement with the XRD pattern for NaX (FAU) zeolite (Treacy et al. 1996), and the NaOH/NaX catalyst is more than 90% crystalline (Tahvildari et al. 2013). The Bragg and Debye Scherrer equation (Eq. (12)) was applied to the peaks at 2θ values at 2° (111), 16° (331), and 27° (642) to calculate different properties of the crystalline material (Ganesh Kumar et al. 2016).

$$\tau = k\lambda /\beta Cos\theta$$
(12)

where τ is the size of crystalline, k is the dimensional shape factor (here the shape factor is 0.9), λ, β, and θ are the X-ray wavelength, line width at half maximum of the peaks in radians, and Bragg angle, respectively. The results displayed a narrow range of particle size with a mean crystal size of 70.44 nm. The loaded NaOH does not affect the crystalline structure of NaX zeolite, and it preserved the structure of the zeolite pore as the modifier.

Fig. 4
figure 4

XRD pattern of the Nanocatalyst NaOH/NaX

SEM analysis

The scanning electron microscope (SEM) image of the NaOH/NaX catalyst is shown in Fig. 5. The SEM images depicted that the morphology of the catalyst has an average size smaller than 200 nm, and the particle size dispersion of the catalyst was uniform with a spherical shape. The SEM images of NaX zeolite and NaOH/NaX zeolite are quite similar and show a spherical structure, but the fine NaOH particles on NaX could be distinctly observed.

Fig. 5
figure 5

SEM images of the Nanocatalyst NaOH/NaX with magnification of a 5.00 µm b 1.00 µm

BET analysis

For heterogeneous catalysts, the catalytic activity is affected by the surface area of the catalyst (Balajii and Niju 2019). The nitrogen adsorption evaluation was carried out to estimate the Brunauer–Emmett–Teller (BET) surface area (Sahani et al. 2020). The BET results for NaOH/NaX catalyst (Fig. 6) show the SBET surface area and pore diameter of 450.5 m2/g and 2.776 nm, respectively. Since the pore diameter of the triglyceride oil molecule (~ 5 nm) is smaller than the size of the catalyst’s pores (2–50 nm), they can diffuse through the surface. Furthermore, the surface area properties of the nano-catalyst NaOH/NaX proved that the catalyst has enough active sites to perform the transesterification reaction (Sahani and Sharma 2018).

Fig. 6
figure 6

BET analysis of NaOH/NaX catalyst

Response surface methodology (RSM) analysis

The experiments were carried out based on response surface methodology (RSM) with the central composite design (CCD) to find a relation between biodiesel yield as the response and reaction factors. Based on previous studies (Xie et al. 2007; Martínez et al. 2014; Manadee et al. 2017), the three most influential parameters of catalyst weight (A), methanol to oil molar ratio (B), and time (C) are considered in the current study. The regression model presents the best relationship between dependent and independent variables. The possible effect of each factor on the experimental data is illustrated in the regression model (Latchubugata et al. 2018). The obtained biodiesel yields are presented in Table 3, and the experimental sequence was random to decrease the impacts of the uncontrolled parameters (Halim, et al. 2009). Through the RSM analysis, the prediction of response (Y) was suggested by applying a second-order polynomial regression model called a quadratic model (Shuit, et al. 2010). The quadratic regression equation shows a relation between biodiesel yield and independent variables in terms of coded factors presented in Eq. (13). The sign of the coefficient for each variable shows a negative or positive influence on the basic variables (Shuit, et al. 2010).

$$\mathrm{Biodiesel yield}=+86.96-8.18\times \mathrm{A}-2.95\times \mathrm{B}-3.97\times \mathrm{C}-16.23\times {\mathrm{A}}^{2}-2.36\times {\mathrm{B}}^{2}$$
(13)

where A, B and C are coded factors, and A2 and B2 are the square terms.

Table 3 RSM-CCD of independent variable for biodiesel yield

Analysis of variance (ANOVA) for Capparis spinosa biodiesel

The estimation of the quadratic model was carried out by implementing the analysis of variance (ANOVA), and the results are listed in Table 4. Based on the results, the probability value for the model was lower than 0.0001, and the F-value was 71.95, which shows the model was statistically significant and accurate (Thangarasu et al. 2020). Lee et al. (Lee et al. 2010) suggested that the minimum R2 value should be 0.8 to indicate the adequacy of the model. The obtained R2 was 0.9848 that depicts the coefficient of multiple determination and specifies that the model is in a good agreement with the actual data and able to predict the biodiesel yield as the response exactly (Tan et al. 2019). The adjusted R2 value was 0.9711 used to recognize the sufficiency and adaptability of the model (Vinoth Arul Raj et al. 2019), and the predicted R2 was 0.9009. The difference between adjusted-R2 and predicted-R2 is less than 0.2, so they are in reasonable agreement. The coefficient of variance (CV) shows the quadratic model with high precision. Also, the larger signal–noise ratio is needed for a fine-fitted model determined through adequate precision. Thus, the higher adequate precision (30.876) showed a good fitness of the model. Furthermore, if the lack of fit is insignificant (Table 5.), it shows the sufficiency of the predicted model (Tan et al. 2019; Thangarasu et al. 2020).

Table 4 Analysis of variance (ANOVA) for biodiesel production
Table 5 Statistical factors estimated by the ANOVA analysis

If the experimental errors are random, the residuals should be expected to follow a normal distribution (Körbahti and Rauf 2008). The straight-line seen in Fig. 7a shows that the residuals follow a normal distribution. An S-shape curve would have indicated that the wrong model was selected, and it would be necessary to change the biodiesel yield as the response (Noshadi et al. 2012). Figure 7b displays the outlier t plot for all experimental runs of biodiesel production. The outlier t plot shows the value of the residuals for the experimental runs to specify if each of the experimental runs had individually high residuals. Generally, a threshold of three standard deviations is used as the description of an outlier. Many of the standard residuals ought to lie in the distance of ± 4.14. Also, the outlier beyond this shows an operational or potential error in the actual data. As can be seen in Fig. 7b, no data is seen outside the interval of 4.14, and it can be concluded that the model is compatible with all experimental data (Noshadi et al. 2012).

Effects of operating variables on the transesterification reaction

The interaction between the experimental variables affecting the biodiesel yield was investigated by the RSM (Noshadi et al. 2012). The 3D surface and contour plots of the biodiesel yield against the interaction of two independent variables are shown in Fig. 8. In each plot, two variables are assumed constant at the set points. The interaction effect of catalyst weight and methanol to oil molar ratio is presented in Fig. 8a whereby the reaction time was constant. An increase in the catalyst weight from 0.2 to 2.8 wt% and methanol to oil ratio from 4:1 to 6:1 has a positive effect on biodiesel yield. But by increasing the amount of catalyst weight higher than 2.8 wt%, a negative impact on biodiesel yield was observed because of the increment of active sites for the transesterification reaction. Consequently, it increases the contact surface of the oil and methanol to produced biodiesel. Also, the high concentration of the catalyst causes an increase in the mass transfer resistance in the reaction and leads to a saponification reaction and formation of emulsion, so biodiesel yield decreases. As a result, the enhancement of the catalyst weight in biodiesel production is not eco-friendly and economical (Talebian-Kiakalaieh et al. 2013; Tan et al. 2017).

Fig. 7
figure 7

a Normal probability plot and studentized residual plot and b The outlier t plot.

Figure 8b describes the variation of biodiesel yield with changing methanol to oil molar ratio and time while the catalyst weight was fixed at 2.8 wt%. The enhancement of the methanol to oil from 1:4 to 1:6 and time from 1 to 1.43 h increases biodiesel yield. Based on the stoichiometric reaction, only 3 mol of methanol are required to react with triglyceride for biodiesel production. Therefore, the transesterification reaction needs a higher methanol amount for this purpose (Pan et al. 2018; Thangarasu et al. 2020). It can be justified by the collision theory in which an increase in the amount of methanol leads to an increase in the useful collisions between the reacting molecules and the reaction time reduces, so biodiesel yield increases (Tan et al. 2017). The reaction becomes reversible when the transesterification reaction reaches its optimum conditions by the extra methanol entering into the active sites of the catalyst. Therefore, it is hard to separate the product from the reaction mixture because of increasing solubility of glycerol (Lu et al. 2019; Rabie et al. 2019).

Figure 8c illustrates that the biodiesel yield increases until a maximum value of 90.81% as the transesterification time enhances from 1 to 1.43 h. Afterward, it decreases slightly to 90% due to longer reaction time (above 1.43 h) that increased the hydrolysis of ester (reverse transesterification) with a reduction in the ester content and higher fatty acids transferred to the soap form (AlSharifi and Znad 2020; Hsiao et al. 2020).

Optimizations of the transesterification reaction

The RSM numerical optimization method was utilized to specify the optimal reaction condition in the selected range of variables by considering the standard error (Tan et al. 2017). Figure 9 shows the results of the measured optimum condition pondering the upper and lower limits of the domain for all the reaction factors. Based on the limit to maximize the biodiesel yield, the second quadratic model (Eq. (12)) produced optimum process conditions achieved from design expert software (Tan et al. 2019; Thangarasu et al. 2020). The FAME yield was 91% under optimum operating conditions that include catalyst weight of 2.3 wt%, methanol to oil ratio of 6.7:1, and reaction time of 1.24 h. The biodiesel was synthesized three times from Capparis spinosa oil using NaOH/zeolite NaX nano-catalyst at optimum conditions with a mean yield of 92%. It indicates that the final biodiesel yields are very close to each other. Table 6 illustrates the result of model optimization and experimental data. Table 7 compares the optimum reaction condition for biodiesel production using zeolite NaX as the support of the heterogeneous catalyst and different oil as feedstock. Different types of feedstock oils have various percentages of free fatty acids that can affect catalyst performance in biodiesel production. For instance, the acid values of safflower oil and Amygdalus scoparia oil were 5.61 and 0.41 mg KOH/g, respectively (Tahvildari et al. 2013; Vares et al. 2016) (Table 8).

Fig. 8
figure 8

3D surface and counter plots of the interaction between a catalyst weight and methanol to oil molar ratio b methanol to oil molar ratio and time c catalyst weight and time

Table 6 Comparison between model optimized and experimental values
Table 7 Comparison of biodiesel yield for the present work and previous studies
Table 8 Physicochemical properties of optimum biodiesel

Physicochemical properties of the biodiesel

The physicochemical properties of the biodiesel produced from Capparis spinosa oil are presented in Table 7. The flash point helps to estimate the minimum temperature at which fuel is converted to vapor in the form of a flammable mixture with air. The high flash point is useful for fuel transportation and storage because of its thermal stability (Dhawane et al. 2018; Papargyriou et al. 2019; Karmakar et al. 2020). The pour point is an important parameter to show the fuel flowability. The saponification value (SV) indicates the content of saponifiable units (acyl groups) in the oil phase. The high value of SV depicts a higher ratio of fatty acid molecular weight in the oil. The iodine value (IV) is a constant value for each oil that represents the degree of unsaturation of the fatty acid in biodiesel. It is a useful factor to check the chemical stability and oxidative resistance properties of oils for feedstock and biodiesel fuel applications (Ismail and Ali 2015). The viscosity and density are principal parameters because they affect the injection and combustion of fuel. A low viscosity helps simple pumping, better atomization, and creation of finer droplets (Sivaramakrishnan and Ravikumar 2012). The cetane number is an essential factor to indicate the combustion delay period of the fuel in the engine. A lower combustion delay needs a higher cetane number (Sivaramakrishnan and Ravikumar 2012). From Table 7, the biodiesel produced at optimum conditions has good agreement with the ASTM standard method.

Catalyst reusability

In heterogeneous catalysts, two factors of catalytic activity and catalyst reusability are very important (Zhang, et al. 2017). For this purpose, the reusability of the NaOH/NaX catalyst was evaluated for each cycle under optimum conditions. At the end of the reaction, the catalyst was separated by a centrifuge at 6000 rpm for 15 min and then washed with n-hexane and methanol to remove impurities like residual glycerol, catalyst, and methanol. Afterward, it was dried in an oven at 60 °C for 6 h, and the reused catalyst was used for the next transesterification process. As can be seen in Fig. 10, the biodiesel yield is slowly reduced from 92 to 82% caused by the active site deactivation in each cycle. Pirouzmand et al. (2018) reported that a catalyst with interconnectivity and hierarchical porosity between the pore channels has an important role in the transesterification reaction. In biodiesel production, it is necessary to prepare an ideal space for dispersing the active phases of the catalyst to maximize the dispersion and strong interaction between the reactants. The closure of the pores on the inner and outer surfaces causes the catalyst deactivation. Also, a reduction in the catalyst mass was observed because of nanoparticle resizing that can lead to a decrease in the efficiency of biodiesel production.

Fig. 9
figure 9

The optimum reaction conditions for biodiesel production

Fig. 10
figure 10

The reusability of NaOH/NaX catalyst

Conclusions

In this study, the Capparis spinosa oil used as a feedstock for biodiesel production in the presence of NaOH/NaX as the nanoheterogeneous catalyst. Capparis spinosa is a wild-evergreen plant that is compatible with dry climate, and its seeds have a high amount of oil (~ 30–50%). Therefore, it is a good selection as the feedstock for biodiesel production. The optimization process was carried out by the response surface methodology with central composite design (RSM-CCD). Based on the RSM analysis, the predicted biodiesel yield was 90.81% at optimum conditions, include the catalyst weight of 2.3wt%, methanol to oil molar ratio of 1:6.7, and reaction time of 1.24 h. The high value of R2 (0.9848) indicated that the model has high accuracy and precision. The actual experimental runs illustrated that NaOH/NaX is a nanoheterogeneous catalyst that has enough specific surface area and pore volume to make it as an active and recoverable catalyst. The NaOH/NaX was reused six times, and the average value of biodiesel yield achieved was 87.416%, and a low reduction in biodiesel yield was observed after six cycles. Therefore, it can be deduced that the NaOH/NaX catalyst has high activity in biodiesel production. Also, the biodiesel produced had excellent quality and physicochemical properties in agreement with the ASTM standard, so Capparis spinosa oil is a good source for biodiesel production.