1 Introduction

Processes for renewable fuel production have been in development in recent years because of the need for alternatives to fossil fuels. However, the use of high-quality feedstocks relies on resources that could otherwise provide food [1,2,3]. Second-generation biofuel feedstocks avoid this problem but require processing before they are suitable for use. Each feedstock has its own unique problems that need to be addressed on a technical level. One of the most common problems with feedstocks coming from second-generation sources is their high oxygen content [4,5,6], which can cause corrosion, poor heating value, and fuel instability [7,8,9]. In order to overcome this difficulty, bio-oils with a high oxygen content undergo an oxygen removal process called hydrodeoxygenation (HDO), which is normally performed with a heterogeneous catalyst in a reactor under a hydrogen atmosphere at high pressures and temperatures [10, 11]. This chemical process can be negatively affected in case of impurities in the feedstock, leading to lower product quality and increased operating costs [12].

Depending on the source, the feedstock can contain ash that could, for instance, lead to decreasing the catalytic activity, shortening the catalyst’s lifetime, and fouling on the inside of process equipment [13, 14]. Moreover, it has been shown to cause char formation during HDO treatment [15]. Removal of ash content prior to hydrotreatment of oil could therefore improve fuel upgrading performance [15, 16]. A suitable removal process is needed to produce a lipid oil that is pure enough to qualify for HDO.

Ion exchange resins are used in water treatment applications such as in the production of drinking water or the cleaning of wastewater for the removal of metallic impurities. They have also been shown to be effective for the removal of trace contaminants in organic liquids such as cooking and pyrolysis oils [17, 18]. This dry impurity removal process is relatively more environmentally friendly than other wet washing methods that are set to achieve the same results as it could lead to reduced wastewater production [19]. Moreover, a bed of used resin in a purification reactor can easily be regenerated for reuse. Lower amounts of chemicals are required to regenerate the resin compared to the wet washing method. Unlike the conventional wet washing method, there is no need for an additional solvent to be added to the raw feed oil, avoiding the need for a liquid–liquid separation step, and resulting in lower use of energy and lower operating costs, making it a cost-effective purification option [20]. This follows the 12 principles of green chemistry, where the minimization of waste has become a top priority in the chemical industry [21]. Nonetheless, there is a lack of research on the purification of lipids by ion exchange resins.

The resins are constructed by crosslinked polystyrene that is thermally and mechanically stable, to which functional groups are applied. By the addition of functional groups to the polystyrene network, the resins are tuned to suit a desirable reaction. The most common type of strong acid cation resin uses sulfonic groups carrying a mobile positive ion such as hydrogen.

In the present study, lipid wax obtained from black soldier fly larvae (BSFL) was used as the second-generation feedstock in the experiments. Mineral analysis in larvae at different stages by another study also showed calcium to be the most prevalent mineral [22]. Commercial strong acid cation exchange resins were used in this research work to remove calcium from the lipid oil. Two types of tests were performed in this work: screening of ion exchange resins with the purpose of finding the most suitable candidates and large-scale purification of lipids with the selected resins. There is an immense potential for the production of lipids from larvae to be scaled up, providing a promising path for renewable fuels production in the future.

2 Materials and methods

2.1 Materials

The lipid material was provided by Enorm Biofactory located in Flemming, Denmark. This lipid was derived from BSFL, after a separation process where the product is divided into two main products: protein meal and fats [23]. The fat was primarily comprised of triglycerides, with analytical data of the fatty acid profile and the free fatty acid (FFA) content presented in Table 1, obtained from lipid manufacturer Enorm Biofactory. The wax also contained a large number of ash substances due to the larvae composition and feed, of which calcium had the highest concentration of approximately 92 mg/kg (Fig. 1).

Table 1 Fatty acid profile and free fatty acid content in the BSFL lipid oil
Fig. 1
figure 1

A selection of ash substances found in the lipid oil

The feed used in the experiments contained a mixture of lipids and nonanoic acid (≥ 96%, FG, Sigma–Aldrich) with different ratios in a total amount of three feeds. The lipid had a solid aggregate state at room temperature. Preliminary investigation was conducted to determine the melting temperature of the lipid material. The lipid wax began to melt at 29 °C and completely melted at approximately 38 °C. Since the melting temperature exceeded the room temperature and insulating the pipes and hoses from the feed flask to the preheater was not practical, the decision was made to dissolve the lipid material in a solvent to make it pumpable. The solvent-lipid mixtures were heated to 40 °C and filtered prior to use with a 20-μm filter.

The selected ion exchange resins that were used in the experiments were Lewatit GF 202 and Amberlyst 15DRY (AL 15). They are commercially available dry resins that are used in industry for pretreating organic liquids. Moreover, both are strong cation resins made from polystyrene with sulfonic acids as functional groups. This makes them suitable for adsorbing alkali and alkaline earth metals in low concentrations. However, they differ slightly in physical properties (Table 2).

Table 2 A selection of properties for the ion exchange resins [24, 25]

2.2 Experimental setup

The purification tests were conducted in a 1/2″ tubular reactor with an inner diameter of 9.2 mm. The reactor length was either 19 cm for the resin screening tests or 90 cm for the large-scale purification tests. The reactor was heated with an oven constructed to be opened vertically, as shown in Fig. 2. Feed was pumped to the reactor using a Shimadzu LC-10AD pump, which was calibrated with the liquid feed beforehand. The feed inlet was located at the bottom of the reactor, ensuring complete utilization of the resin bed throughout the tests. The reactor was filled with 10 mL of resin for the screening tests and 40 mL for the large-scale purification tests. The bed depth in the screening tests were set to be lower than what was suggested by the manufacturers in order to purify the oil samples at harsher conditions, making it possible to differentiate between the resin performances. On the other hand, the bed depth for the large-scale purification tests was based on the suggested bed height of at least 60 cm provided by a manufacturer of AL 15 [24].

Fig. 2
figure 2

A schematic of the lipid purification process by ion exchange resins

In preparation for a typical test, the resin bed was washed with methanol at a liquid hourly space velocity (LHSV) of 2 h−1 to remove any traces of water in the resin. Thereafter, the methanol in the bed was emptied, and the resin was dried using nitrogen gas at 30 °C with a flow of 20 NL/h until no methanol was visibly leaving the reactor in the product-sampling flask. After the drying step, the reactor was ready to be used for lipid purification.

The feed mixture was maintained at 30 °C with a heating plate to reduce lipid crystallization. The LHSV for the lipid solution feed was set to 4 h−1 during the course of testing, which was within the range recommended by the product specification [24]. The testing procedure was kept consistent for both ion exchange resins in every set of testing conditions.

2.3 Lipid sample analysis

The determination of the calcium content in the samples was performed using an inductively coupled plasma–optical emission spectrometry system (SPECTROBLUE, Spectro Analytical Instruments GmbH, Kleve, Germany). The sample introduction system consisted of an organic torch, a SeaSpray nebulizer, and an autosampler system (Cetac ASX-520) equipped with an organic sample needle. A plasma power of 1490 W was used. The argon gas flow rates were as follows: cooling gas 15.0 L/min, auxiliary gas 1.8 L/min, and atomizing gas 0.5 L/min. For the concentration determination, standard solutions were prepared spanning the range 1 to 10 mg/kg, and the system was calibrated before measurements. For the determination of calcium, 2 g of sample and another 2 g of Shellsol T were added to prepare the sample solution. A pump speed of 20 rpm was used for calibration and sample measurements. The detection limit of calcium by the instrument was 0.0427 mg/kg.

The oil samples were also characterized by measuring physical properties such as viscosity and density. These measurements were conducted using a SVM 3000 Stabinger Viscosimeter from Anton Parr. The viscosity and density were measured simultaneously, and were determined at 40, 50, and 60 °C.

2.4 SEM imaging

Scanning electron microscopy (SEM) was performed to analyze the surface morphology of the resin beads. Prior to SEM analysis, the resin samples were coated with a thin layer of carbon using a carbon evaporator (CED 030) made by BAL-TEC (Balzers, Liechtenstein). The layer was applied to improve the SEM imaging resolution, which can be difficult to achieve due to the non-conductive nature of the samples [26, 27]. The SEM system was a JSM-6700F, manufactured by JEOL Ltd (Tokyo, Japan).

3 Results

3.1 Feed properties

Analysis of physical properties was performed to obtain an improved understanding of the product oil samples and how the different solvent ratios in the feed mixtures might have influenced the results. The properties obtained from these tests were viscosity and density (Table 3). The results indicate that the density was not affected significantly by the increase of solvent in the blend. The viscosity, on the other hand, was affected to a much larger degree. This can influence the mass transfer of the triglycerides from the bulk to the surface of the resin, as well as through the pore structure inside the bead to the canal surface, thus enhancing the ion exchange between the resin hydrogen and calcium present in the oil.

Table 3 Viscosity and density of the untreated and treated feeds at different test conditions

It is evident that the product samples remained relatively constant with regards to density compared to their feed counterpart. There is a small decrease in density as the concentration of nonanoic acid in the feed increases, which is to be expected due to the influence of the slightly less dense nonanoic acid. On the other hand, there is a notable change in viscosity when comparing the different feeds with their corresponding product samples. The density of the treated samples remained largely unchanged compared to the untreated feed samples. The viscosity was generally at a slightly lower level, especially for the samples treated with AL 15 at 50 °C and GF 202 at 75 °C.

3.2 Removal of calcium by ion exchange

3.2.1 Screening of ion exchange resins

Screening tests were performed on two resins for calcium removal in three different feed solutions to investigate the impurity removal capability of the resins under different conditions at a reduced bed height.

Figure 3 shows calcium removal in Feeds A to C by treatment with AL 15. These purification tests resulted in calcium removal substantially, increasing with the higher temperature, which was the case for all feed mixtures. Moreover, higher solvent ratio also improved the calcium removal process. That effect is more apparent when comparing the results of tests conducted at a higher temperature. The raw data used to construct the graph are available in Table S1 of the supplementary material.

Fig. 3
figure 3

Calcium removal (%) in Feeds A, B, and C using ion exchange resin AL 15 at 50 °C and 75 °C

Furthermore, there was a difference in behavior when using GF 202 for similar tests. The results from treating Feed A with GF 202 at 50 °C show higher calcium removal than expected and appear to stand out as an outlier (Fig. 4). The expected level would be lower than what can be observed for the cases Feed B and C. It is evident that the overall performance in every case is low compared to using AL 15. The exact temperature effect is visible in these results, where calcium removal increases with temperature increase. The raw data used to construct the graph are available in Table S1 of the supplementary material.

Fig. 4
figure 4

Calcium removal (%) in Feeds A, B, and C using ion exchange resin GF 202 at 50 °C and 75 °C

3.2.2 Large-scale ion exchange treatment

Large-scale purification tests were performed with the same testing conditions as during the screening tests, apart from having a resin bed with a larger bed height, set at 60 cm. Feed A was chosen as the feed for these experiments for the higher loading of substrate as it would entail a more cost-effective process with a potentially higher purified product yield as a result. In these large-scale tests, a unit of the feed had to pass through a longer resin column before leaving the reactor at the other end. The liquid was therefore exposed considerably to calcium removal processes.

The resulting effect of the extended reactor bed is displayed in Fig. 5, where the lipid mixture purification for both resins was significantly enhanced. Tests performed using GF 202 at 75 °C resulted in over 86% calcium removal. Furthermore, just below 99% and over 99% calcium removal was achieved in experiments with AL 15 at 50 and 75 °C, respectively. The lower temperature in the case of AL 15 did not affect the performance significantly. The raw data used to construct the graph are available in Table S2 of the supplementary material.

Fig. 5
figure 5

Calcium removal (%) in Feed A using two different ion exchange resins at 50 °C and 75 °C, through a resin bed height of 60 cm

3.3 SEM images of the used resins

During the treatment of lipid oil blends, the resins were subjected to temperatures of up to 75 °C. SEM imaging was therefore performed on samples of the used resins to visualize any morphological changes caused by these conditions. The images depicted in Fig. 6 show the surface of the ion exchange resins of both types after being used in the screening tests. The surface of the beads appears to be uniform, with only a few cracks to be observed in an arbitrary sample.

Fig. 6
figure 6

SEM images showing the surfaces of the used resins a AL 15 and b GF 202, both of which were used in the screening tests at 50 °C and 75 °C

4 Discussion

4.1 Mass transport limitations

Prior to performing the purification tests, the different feeds were prepared by blending lipid wax with nonanoic acid in varying proportions. The purpose of this was to get a sense of the impact caused by the addition of a solvent. This variable showed a substantial effect on the performance of calcium removal. It could be explained by the reduction of mass transfer limitations. The lower viscosity in blends with more nonanoic acid ensured more accessible travel from the bulk phase to the resin surface as well as inside the resin canals. The lipid compounds are bulky and have a substantial contact interface when interacting with each other due to triglycerides formation, giving rise to a higher oil viscosity. The introduction of a single and shorter hydrocarbon chain compound to the lipid bulk, such as nonanoic acid, reduces the occurrence of those interactions. The calcium soap would reach sulfonic groups more frequently, therefore enhancing the chemical adsorption processes between the sulfonic sites and the soaps.

Another parameter that influenced the purification performance was the temperature. In all cases, the purification tests were performed at two different temperatures. The results confirmed the same phenomena occurring here similarly with the increase of solvent ratio in the feed blends, improving the chemisorption at higher temperatures, independent of solvent ratio. The explanation for this phenomenon is that the mobility of compounds in the bulk increased with temperature due to a reduction of the cohesive forces. Furthermore, both parameters working in tandem could be observed to have a double effect as the difference between the performances for all blends increased exponentially as both the solvent ratio and the temperature increased.

4.2 Purification by ion exchange resin

4.2.1 Effect on the purified product and resins

The purification tests demonstrated that this water-free washing method was suitable for lowering the calcium concentration in a lipid blend, as over 99% of impurity removal was achieved with AL 15 at 75 °C. These experiments reveal that AL 15 was the resin that excelled compared to GF 202 in all cases. Moreover, the resins had little effect on the molecular structure of the organic feed material, as the density and viscosity revealed.

The testing conditions did not appear to affect the surface of the resin beads significantly. Cracks in the beads can enhance kinetics toward the center, further promoting the impurity removal process [28]. A potential cause for the cracks could be swelling of the beads when getting exposed to liquids. The temperature used in the experiment was below the maximum operating temperature for both resins (Table 2). Therefore, it is not anticipated that the temperature had a detrimental effect on the resins’ performance.

Calcium is an essential component in building the exoskeleton of the BSFL [29]. Calcium can form a soap salt complex due to high FFA in raw oil [17]. Literature indicates that calcium, when in contact with FFA formed from hydrolysis of ester bonds in animal intestines, such as the upper small intestine, can combine to form calcium salts [30,31,32]. The calcium present in the lipid oil may originally be derived from two potential sources: it might be generated during the extraction process from the larvae exoskeleton, or it could come from the digestive system of the larvae, after the consumption of calcium-containing feed. Considering the literature and the known prevalence of FFA in the lipid oil, it is possible that the calcium present in the raw lipid oil obtained from the manufacturer exists in the form of calcium soap salts.

A similar approach using commercial strong acid cation exchange resins was employed in a study where alkali and alkali earth metal were removed from biodiesel by using an ion exchange resin. They concluded from their experiments that chemical adsorption had occurred, where the hydrogen ions from the sulfonic acid sites within the cation exchange resin were substituted by the alkali and alkaline earth metal ions from salts [33]. Through XPS analysis, they observed ash component-free sulfonic acid sites prior to the experimental run, whereas after the run, components such as calcium were found chemically adsorbed to these sites. This is assumed to occur in the experiments of this study. Additionally, the surface on the resins can help in facilitating the adsorption of non-polar compounds due to hydrophobic fragments [34, 35].

4.2.2 Comparison to other purification methods

Various methods other than using ion exchange resins exist for reducing metal content from fats and oils. One of these methods is liquid–liquid extraction, where a solvent is used to extract a compound from another phase by utilizing the solubility properties of the compound in different liquid media. When comparing the calcium removal level achieved in this study with that of liquid–liquid extraction reported in a patent, it is on par with the level of calcium removal achieved by solvent extraction in lipid material [36]. Additionally, a different approach was presented in another study where animal fat was preheated to 280 °C and treated with and without phosphoric or sulfuric acid to form a separate phase, lowering the calcium levels by a similar degree [37]. Moreover, another method presented was performing a chemical treatment process of heavy hydrocarbon oils by mixing in aqueous solutions containing gelatinous agents while lowering the pH value. This resulted again in a similar calcium removal efficiency [16]. These comparisons suggest that the technique used in this work is as effective as other commonly applied demetallization methods and can be regarded as a competitive alternative for selectively removing alkaline earth metals from animal fats and oils.

The quantity of water used in purification that requires water heavily depends on the type of oil being treated, as well as the contaminant targeted for removal. The water amount compared to oil can range from a small fraction of the oil’s volume to an amount several times greater. Moreover, water is commonly not used on its own but rather with the addition of acid or other agents. Fatty substances have been treated with an aqueous solution mixed with polycarboxylic acid salts [38]. One of the primary purposes of that process was to remove metals such as calcium from the oil, and a typical water quantity would range from 0.5 to 30%. However, it was also mentioned that working with an aqueous solution comprising 5–10 wt% of the fatty substance would be preferable [38]. Despite the apparently modest concentrations of water relative to the oil weight, the scale of water usage will significantly increase in proportion to the oil needed to be purified, leading to considerable total water consumption. A purification method that requires no water could have a positive impact on the environment by conserving water resources, minimizing water pollution, and saving energy that is needed for transport and wastewater treatment. In general, it could lead to more sustainable industrial practices.

5 Conclusions

Purification tests were performed on lipids derived from BSFL using commercially available ion exchange resins as a dry washing method. The results showed that removing impurities in the form of unwanted metals such as calcium by such a method is a viable purification process for oils derived from second-generation feedstocks, with the added benefit of leaving the oil stream dry from any solvent often used in wet washing methods. Large-scale purification tests using AL 15 produced a water-free and purified stream of lipid blend with a calcium removal exceeding 99% at 75 °C. Comparable results can be achieved with conventional methods using solvents such as water, but this requires using large quantities of water, potentially up to 30% by oil weight. Utilizing large amounts of water in purification processes can be costly due to energy requirement for heating. Additionally, using a solvent for extracting impurities will require another separation step, which may compromise the quality of the final oil product. The density and viscosity did not change significantly, which indicates the resins are effective at removing impurities, without significantly disrupting the properties of the lipid blend. The results from this study suggest a potential advancement in renewable oil purification by efficient calcium removal in lipid blend and maintaining oil quality of the liquid product, all achieved without any use of water. This approach demonstrates the potential for reduced costs in oil purification.

Further research is required to perform similar tests without any use of solvent. This would require melting the lipid wax to a liquid state and maintaining it consistently throughout the whole process. This is necessary to avoid initiating crystal formation, which could cause obstruction in the pipes. Avoiding the use of a solvent would give a proper understanding of the purification performance on the lipid material. Another aspect is to evaluate a wider selection of ion exchange resins and vary the test parameters even further to adapt to the intended application. The oxygen-rich oil derived from second-generation feedstocks could contain a variety of impurities, and a careful selection of resins, together with tuning of the process parameters, would be necessary to achieve an optimal purification.

Additionally, given the necessity for testing and optimization mentioned above, it is equally important to develop kinetic models on specific resins or feed types to enhance impurity removal rates, which should be a subject for future research. As the demand for efficient purification processes grows, it becomes increasingly important to gain further understanding of industrially used resins for refining oils from renewable sources.