*3.2. First Transesterification*

As an intermediate stage, fatty acid methyl esters (FAME) were produced from rapeseed and castor oil. In this reaction, the triglycerides that constitute the vegetable oils react with three moles of methanol to produce three moles FAME and glycerol.

This reaction is reversible, and therefore parameters such as temperature, catalyst concentration, and molar ratio are important to obtain better FAME yields.

For this purpose, a reactor coupled to a condenser and supplied with temperature and stirring rate control was used. The reaction conditions, optimized in previous studies [26], were as follows: a reaction temperature of around 65 ◦C was used (to avoid excessive methanol evaporation); the reaction took place for 60 min (to make sure that the FAME proportion in the final product was over 96.5%); the methanol/oil ratio was 6:1 (according to previous studies, additional methanol was not necessary); the catalyst (potassium hydroxide) added was 1% *w*/*w* (of the total reaction medium). Following these steps, the FAME content of the product was over 96.5%, complying with the standard and making it a suitable reagen<sup>t</sup> for the next step (the second transesterification for biolubricant production). Details of the experimental procedure, methodology, and analytical methods can be found in previous works [6,26].

#### *3.3. Second Transesterification Reaction (Biolubricant Production)*

Concerning biolubricant production, different alcohols (such as 2-ethyl-1-hexanol, 1-heptanol, and 4-methyl-2-pentanol; see Table 4), FAME (obtained earlier), and titanium isopropoxide (as a catalyst) were used for the second transesterification reaction (again, a reversible reaction; see Figure 2). These alcohols were chosen on account of their different structure, with different branching levels (see Table 4), in order to obtain different viscosity values for the products obtained. On the other hand, titanium isopropoxide was chosen due to its effectiveness and the use of titanium catalysts in industry, especially as the precursor of other catalysts such as TiO2 [27–29].


**Table 4.** Structure of the different alcohols used for the second transesterification.

As can be observed in Figure 6, methanol was released along with the biolubricant and its removal contributes to better biolubricant production.

**Figure 6.** Second transesterification.

As was observed in Figure 7, the experimental facility was similar to that described for the FAME production, except for the Dean Stark trap, which collects (and therefore removes from the reaction medium, improving the yield of the biolubricant) the methanol that is evolved during the second transesterification process, and the sampling point (with the aim of taking samples to analyze the FAME content evolution by gas chromatography).

**Figure 7.** Experimental arrangemen<sup>t</sup> for biolubricant production.

In the second transesterification reaction, temperature, catalyst concentration, and molar ratio, in addition to the alcohol type, were studied for biolubricant yield optimization. Table 5 shows the range for these variables. The second transesterification process was carried out near the corresponding boiling point for each alcohol. This way, the temperature was as high as possible, not exceeding each boiling point, so that the alcohol is conserved in the reaction medium and not evaporated. In order to remove the surplus alcohol after the reaction, vacuum distillation was carried out. Figure 8 shows the experimental setup for this purpose.



\* For variable optimization, 2-ethyl-1-hexanol was used.

**Figure 8.** Biolubricant purification.

Thus, the installation was composed of heating and stirring systems (where the lubricant is heated to remove surplus alcohol at approximately 120–150 ◦C), temperature probes, a condenser, the corresponding Erlenmeyer flask to collect the alcohol, a trap flask (to protect the pump), and a vacuum pump.

To measure the decrease in FAMEs during the second transesterification reaction (implying the increase in biolubricant yield), a VARIAN 3900 chromatograph, provided with a FID, and a silica capillary column (30 m length, 0.32 mm ID, and 0.25 mm film thickness) was used. The carrier gas was helium (0.7 mL/min flow rate), and heptane was used as a solvent. The injector temperature was kept at 270 ◦C and the detector temperature at 300 ◦C.

Temperature ramp started at 20 ◦C, and then went 20 ◦C/min up to 220 ◦C. A calibration curve was done for each FAME, using its corresponding standard (Sigma-Aldrich). The calibration was carried out by using an internal standard (methyl heptadecanoate).

## *3.4. Biolubricant Characterization*

Once the biolubricant was obtained and purified, it was characterized. For this purpose, several determinations were carried out. Density determination was obtained by using a pycnometer. Viscosity is determined following the ISO 3104:1994 standard [30] with an Ostwald viscometer. For viscosity index, the ASTM D2270 standard was used [31]. Pour point was measured according to ATSM D-97 standard [32]. To determine cold filter plugging point (CFPP), the EN 116 standard was consulted [33]. For flash and combustion point determination, the Cleveland open-cup method was used (UNE 51-023-90) [34]. For moisture, a Metrohm 870 trinitro plus equipment was used, using the Karl-Fischer method (UNE-EN ISO 12937:2000) [35]. The saponification number was determined following the UNE-EN 55012 standard [36]. The acid number was determined according to the UNE-EN 12634:1999 standard [37]. For Iodine number, the UNE-EN 14111:2003 standard was followed [38]. The oxidative stability was obtained for biolubricant, according to the Rancimat test [39]. Thus, three grams of the sample was placed in a test tube, bubbling air (10 L/h) into the sample, and heating it at 110 ◦C. The resulting stream of air, after passing through the sample, bubbled 50 ml of deionized water. To monitor the whole process, the conductivity of this deionized water was measured. As the sample was oxidized, some by-products were developed and dissolved into the deionized water, increasing the conductivity of the latter. Thus, the induction point was determined at the time when the conductivity increased considerably.
