1 Introduction

The extraction of bioactive compounds from biomass, particularly phenolic compounds, has elicited scientific interest due to their numerous uses and benefits. For example, the health-promoting benefits derived from phenolic compounds, such as anti-proliferative, anti-inflammatory, antioxidant, and antimicrobial properties, among others, are well documented [1, 2]. The two latter benefits, together with the coloring properties, among others, have been utilized in food preservation by the food and packaging industries as well as the cosmetic and textile industries [3]. In plants, these compounds fulfill various functions such as sensory (i.e. color, taste, and astringency), ultraviolet protection, defense against insects and parasites, and play a role in reproduction [4], among many more. Phenolic compounds have been isolated from many biomass types such as fruits, vegetables, cereals, nuts, herbs, legumes, etc. [5]. However, due to competition with the food chain, alternative sustainable sources of biomass should be utilized for extracting biochemicals. Hence, residues and by-products from various food production chains have been investigated and found to provide attractive and cheap sources of phenolic compounds [3].

To this end, phenolic compounds have been obtained from agricultural residues and by-products such as peels [6], leaves [7], seeds [8], pomace [9], woody bark [10], nutshells [11], among others. The extraction of phenolic compounds from nutshells is particularly noteworthy due to their abundance and ease of handling due to the lower moisture content of this type of biomass [12], as residual biomasses with high moisture content might be prone to fast degradation of the bioactive molecules. Furthermore, nutshells have the potential to have a high phenolic content [11, 12].

By definition, a nutshell is a hard or tough walled-layer that contains a kernel in a fruit. The shell covers and protects the kernel, which may be edible. Before and after harvest, the shells will continue protecting the kernel till when the kernel is required. Most nutshells are inedible and are removed before eating the nut-meat inside, or, in industrial processing, are de-coated together with other components like husks, leaves, etc. At harvest, nutshells have a moisture content of between 8 and 33%, depending on whether the shell has a hull or not [13]. This, however, reduces further when the kernel is removed, thus opening up the shell.

Globally, the inshell nut (or nut + shell) production (calculated from production given on a kernel basis [14], using the potential average tree nutshell weight of 64% (for the entire tree nuts) and peanut shell weight of 25% [15]) has increased from 14.0 and 62.0 million tons to 14.5 and 63.5 million tons, respectively, between the years 2011 and 2021. Hence, in 2021, about 9.2 and 15.9 million tons of shells were potentially generated globally by tree nuts and peanuts, respectively. Interestingly, these nuts are readily available in many tropical countries [16]. In Kenya, for example, in 2019, coconut (Cocos nucifera L.), groundnut (Arachis hypogaea L.) and cashew nuts (Anacardium occidentale L.) which are the most common nuts, were produced in relatively large amounts of about 110, 15, and 13 kt, respectively [16] and 17 kt for macadamia (Macadamia integrifolia L.) [17]. Thus, the nut value chains in Kenya can produce potential bio-waste quantities of about 52 kt from coconut (at 47% waste [16]), 4 kt from groundnut (at 25% waste [18]), 8 kt from cashew nut (at 60% waste [16]), and 8 kt from macadamia (at 47% waste [19]). Despite the fact that these nutshells are abundant and stable, approximately 95% of this waste is disposed of in open landfills and 4% is burned to generate energy [12]. Yet, the shells contain potentially high quantities of phenolic compounds, up to 4046 mg GAE/100 g dw [20] measured by the total phenolic content (TPC) approach. However, there is a need for efficient extraction techniques to achieve good recoveries of the bioactive compounds from nutshells on an industrial scale, in an economical and sustainable manner [21].

Different solid–liquid extractions of TPC from nutshells have already been studied. For example, different ratios of ethanol–water solvents were used to extract TPC from peanut shells, recovering up to 48.5 mg GAE/100 g dw of nutshell [22]. Another study by Yuan et al. [23] also reported a recovery of 1200 mg GAE/100 g fw (fresh weight) of TPC from hazelnut shell using solid-phase extraction. In these reports, the efficiency of the extraction process was typically affected by factors such as solvent-biomass ratio, extraction temperature and time, type of solvent, and particle size, among others [24]. For TPC extraction, a solvent-biomass ratio of 10:1 is normally adequate [25], while a mixture of ethanol and water solvent is preferred due to its low toxicity and minimal environmental impact [7]. Nevertheless, for efficient extraction and subsequent scaling-up of the TPC recovery process to industrial applications, a more fundamental insight into the extraction process is vital. Accordingly, kinetic modeling has been used to study extraction processes to try to examine the optimal conditions for enhanced TPC yield [24]. However, there is still insufficient data in the literature on the kinetic modeling and simulation of the extraction process of TPC from nutshells, particularly when comparing different shells.

This study, therefore, aims to understand and optimize the process parameters of TPC extraction from the shells of peanuts, coconuts and macadamia nuts by conventional solid–liquid extraction and to determine the kinetic model that can best describe the process. The nutshells studied were chosen due to their abundance and lower moisture content [12]. For the optimization, the optimal particle size, temperature, and ethanol–water solvent ratio were examined based on an I-optimal design, in combination with response surface methodology (RSM) modeling. In addition, the kinetics of TPC extraction were examined and several frequently applied kinetic models (pseudo-first order, pseudo-second order, reversible first order, modified Peleg’s, film theory, unsteady-state diffusion, and combined second-order diffusional) were fitted to assess which model is best able to describe the TPC extraction kinetics. In the end, the extraction mechanism and associated kinetic parameters of the selected model were described to obtain a complete understanding of the process of extracting TPC from nutshells.

2 Materials and methods

2.1 Materials and reagents

The shells of peanuts, coconuts, and macadamia nuts used throughout this study were obtained from Homa-bay, Kilifi, and Thika in Kenya, respectively. Ethanol (C2H5OH), 99.8%, was purchased from Fisher Scientific, UK, Folin-Ciocalteu reagent and gallic acid (C6H2(OH)3CO2H), 99.5%, from Loba Chemie, India, and sodium carbonate (Na2CO3), 99% from Across Chemicals, Germany.

2.2 Design of experiments

As stated earlier, the objective of this study was to determine the optimal conditions in terms of particle size (x1), temperature (x2) and ethanol–water solvent ratio (x3) for the extraction of phenolic compounds from three different biomasses. Often, a Central Composite Design (CCD) is used to establish the Design of Experiments (DoE) for this purpose. However, since this study examined the impact of 3 factors for 3 types of biomass, such a design would result in 60 experiments (3 × 20 experiments). Since it is assumed that the impact of these factors on the biomasses would be somewhat similar, to reduce the number of experiments and not to be restricted to the pre-defined levels of factors for the DoE (as in CCD), it was decided to use an Optimal Design. An Optimal Design also permits categorical factors (being the 3 types of biomass) to be included in the DoE, reducing the number of experiments [26, 27]. An I-optimal design was chosen since the main objective was to optimize the extraction conditions for the different biomasses [28]. The levels of the various factors that were considered are shown in Table 1. The levels of these factors were coded, with the minimum value set equal to − 1 and the maximum to 1. The equations for coding are also given in Table 1.

Table 1 Factors and their range that were considered in the DoE

2.3 Extraction of TPC

The nutshells were manually cleaned to remove any remaining kernel, fungal growth, contaminants and decayed parts and then dried under shade (inside the laboratory) for 2 days [29]. Then, the dried shells were hammered to small sizes (about 2 cm) prior to grinding for 20 s using a laboratory grinder (Universal mill, DE-2000G, 25,000 rpm). After grinding, the particles were shaken for 15 min [30] using a sieve shaker (Liya). Hereby, four sieve sizes (≤ 1, 2, 3.15, and 4 mm) were used, classifying the particles into four groups, referred to as particle sizes 1, 2, 3.5 and 4 mm, respectively. Afterwards, the TPC was extracted according to a Design of Experiments (see Sect. 2.2) using a batch solid–liquid extraction method. Thereby, the extraction was performed at several particle sizes (1, 2, 3.5 and 4 mm), temperatures (25, 40, 60 and 75 °C) and ethanol–water solvent ratios (0, 20, 50, 80 and 100 v%). A reflux system was used for extraction, in which a biomass material to liquor ratio (M:R) of 1:10 (m/v) (i.e., for each solvent ratio investigated, 10.0 ± 0.1 g of the samples were placed in 100 mL of solvent in three separate 250 mL conical reflux glasses with a temperature sensor) was applied under continuous stirring using a magnetic stirrer at a rotation speed of 200 rpm [29]. The extract was then cooled and filtered through Whatman filter paper no. 42 (2.5 µm pore size), using a vacuum filter (model, HS-2005S, Hahnhin S&T Co Ltd) and sampled for testing. These extractions were performed in triplicate.

2.4 Determination of TPC

The TPC of the extract was determined using the Folin-Ciocalteu (FC) colorimetric method, using gallic acid as a standard as described by Thebo et al. [31] with some modification. Briefly, 200 μL of the shell extracts was mixed with 800 μL of freshly prepared Folin-Ciocalteu reagent and 2 mL of 7.5% Na2CO3 and vortexed for 10 s. Then, the mixture was diluted with 4 mL deionized water, vortexed again for 10 s and incubated in the dark for 45 min at 22 ± 2 °C. Finally, the absorbance of the final mixture against the reagent blank was determined at 765 nm using a Beckman Coulter Du 720 UV/VIS spectrophotometer. The TPC of the extract, expressed as mg GAE/100 g dw of biomass, was calculated from a gallic acid standard curves: Y = 0.0141x + 0.0133, R2 = 0.9945, (the standard curves made from other solvent ratios investigated here were not different).

2.5 Optimization of TPC extraction

To enable optimization of the process of TPC extraction, the I-optimal design, explained in DoE, Sect. 2.2, was established by an extended quadratic model, where for the solvent ratio, a 3rd power term (x33) was added. This addition made it possible to include 5 levels of solvent ratio in the DoE. This resulted (in a model (Eq. (1)) with 16 parameters, which directly defines the minimum (16) number of experiments. It was decided to increase the number of experiments to 48 in total (including 2 replicates for each biomass). At each of the conditions described by the DoE, the TPC (mg GAE/100 g dw) was determined at several time points, namely 2.5, 5, 10, 15, 30, 60, and 120 min.

$$\mathrm{Y}= {\upbeta }_{0}+\sum {\upbeta }_{\mathrm{i}}{\mathrm{x}}_{\mathrm{i}}+\sum {\upbeta }_{\mathrm{ii}}{\mathrm{x}}_{\mathrm{i}}^{2}+{\upbeta }_{333}{\mathrm{x}}_{3}^{3}+\sum {\upbeta }_{\mathrm{ij}}{\mathrm{x}}_{\mathrm{i}}{\mathrm{x}}_{\mathrm{j}}$$
(1)

The optimization was based on the measured TPC’s at 30 min (just before a plateau, to reduce the errors associated with the plateau phase), where a higher concentration indicates better process conditions. Therefore, the goal of the optimization was to determine the conditions at which the TPC would be maximized after 30 min for each of the biomasses. For this purpose, a quadratic model (Eq. (2)) with interaction terms was established to describe the relationship between the 3 factors (particle size (x1), temperature (x2) and solvent ratio ethanol/water (x3)) and the TPC concentration after 30 min based on the RSM, using a training dataset defined by the I-optimal design:

$$\mathrm{Y}= {\upbeta }_{0}+\sum_{\mathrm{i}=1}^{\mathrm{p}}{\upbeta }_{\mathrm{i}}{\mathrm{X}}_{\mathrm{i}}+\sum_{\mathrm{i}=1}^{\mathrm{p}}\sum_{\mathrm{j}=1}^{\mathrm{p}}{\upbeta }_{\mathrm{ij}}{\mathrm{X}}_{\mathrm{i}}{\mathrm{X}}_{\mathrm{j}}+\sum_{\mathrm{i}=1}^{\mathrm{p}}{\upbeta }_{\mathrm{ii}}{\mathrm{X}}_{\mathrm{i}}^{2}$$
(2)

where Y is the response, \({\beta }_{0}\) is the overall mean response, \({X}_{i}\) and \({X}_{j}\) refer to the ith and jth factor of the DoE and \({\beta }_{i}\), \({\beta }_{ij}\) and \({\beta }_{ii}\) refer to the coefficients describing the main effects for each factor, two-way interaction between the ith and jth factors and quadratic effect for the ith factor respectively.

This involved the initial fitting of the full model and the subsequent systematic elimination of the non-significant terms (p > 0.05). This procedure was repeated until the model with the highest Adjusted-R2 combined with a significant p-value (p < 0.05) was obtained. Next, this model was validated against a validation dataset using the Theil’s Inequality Coefficient (TIC), whereby the level of factors varied within the ranges described in Table 1. Finally, the quadratic model obtained was used to determine, for each of the biomasses, the conditions that result in the highest TPC after 30 min, i.e., the optimal conditions.

2.6 Kinetic modelling

In addition to the optimization of the extraction conditions, the kinetic model (from models commonly used in literature) that could best describe the extraction kinetics of phenols from the nutshells was also examined. Therefore, several kinetic models were fitted to the experimental data (TPC [mg GAE/100 g dw] vs. time [min]) generated according to the DoE. This included some frequently used empirical models, such as the modified Peleg’s model (MPM), a variant of the classical Peleg’s model used to describe solvent extractions, and the pseudo-first order (PFO), pseudo-second order (PSO) and reversible first-order (RFO) models, the latter describing extraction as a chemical reaction [28, 29, 32,33,34].

In addition to these empirical models, two physical models, the film theory model (FTM) [29, 35, 36] and the unsteady state diffusion model (USDM) [29, 36] were considered. Physical models are modified laws of Fick and are simplifications of the fundamental diffusion model. Normally, the USDM model describes the amount of phenolic compounds that remain adsorbed as a function of time. However, since the extracted concentration was measured over time, it was reformulated to express the extracted concentration based on the mass balance [29].

Finally, the combined second-order diffusional kinetic model (CSOD) was also examined, which is a two-step model considering the extraction process as a combination of a washing and diffusion process. Here, the model assumes the resistance to mass transfer in the solid–liquid interface on the liquid side to be zero. The model consists of two terms, the first describing the washing process based on the pseudo-second order equation and the second fundamentally describing the diffusion process based on Fick’s law [28, 29]. This model assumes that at the beginning of the extraction process, the compounds on the particle surface are quickly removed by the solvent [37]. After that, the extraction of any remaining compound within the broken and unbroken cell particles is controlled by either an unhindered slow diffusion of the compounds held within the broken cell or the very slow, hindered diffusion process of compounds held within the unbroken particle cells. The mathematical equations of the kinetic models that were considered are presented in Table 2.

Where \(\mathrm{C}\) is the extract concentration at time t (mg GAE/100 g), \(\mathrm{t}\) is the time (min), \({\mathrm{k}}_{1}\) is the Pseudo first-order kinetic constant (min−1) or Peleg’s constant (min.100 g.mg−1), \({\mathrm{C}}_{\mathrm{e}}\) is the equilibrium extraction concentration (mg/100 g), \({\mathrm{k}}_{2}\) is the Pseudo second-order kinetic constants (L.mg−1.min−1) or Peleg’s capacity constant (mg.100 mg−1), \({\mathrm{k}}_{\mathrm{des}}\) is the rate constant for desorption (mg/100 g.min−1), \({\mathrm{k}}_{\mathrm{ads}}\) is rate constant for adsorption (mg/100 g.min−1), q is the concentration of phenolic compounds on adsorbent (mg.kg−1), \({\mathrm{q}}_{0}\) is the concentration of phenolic compounds on adsorbent at time t = 0 min (mg.100 g−1), \(\mathrm{V}\) is the volume (L), \(\mathrm{m}\) is Mass (kg), \(\mathrm{b}\) is the washing coefficient of film model (-), k is the extraction coefficient of film model (min−1), \({\mathrm{k}}^{\mathrm{^{\prime}}}\) is the extraction coefficient of unsteady state model (min−1), \({\mathrm{b}}^{\mathrm{^{\prime}}}\) is the washing coefficient of the unsteady state model (-), \({\mathrm{C}}^{\mathrm{w}}\) is the extracted concentration due to washing (mg/100 g), \({\mathrm{k}}_{\mathrm{w}}\) is the washing mechanism kinetic constant (L.mg−1.min−1) \({\mathrm{C}}_{\infty }^{\mathrm{w}}\) is the equilibrium extraction concentration due to washing (mg/100 g), \({\mathrm{C}}^{\mathrm{d}}\) is the extracted concentration due to diffusion (mg/100 g), \({\mathrm{C}}_{\infty }^{\mathrm{d}}\) is the equilibrium extraction concentration due to diffusion (mg/100 g), \({\mathrm{k}}_{\mathrm{d}}\) is the diffusion mechanism kinetic constant (min−1), \({\mathrm{t}}_{1/2}^{\mathrm{w}}\) is the half time to washing (min).

Table 2 Kinetic models used in the study

Nonlinear regression was used for parameter regression. This was performed using an R script based on the Flexible Modeling Environment (FME) package, utilizing the ModFit function to minimize the sum of squared errors (SSE) in combination with the Levenberg–Marquardt algorithm as a solver. The models were validated based on the TIC (Eq. (3)), Hybrid Fractional Error Function (HYBRID) (Eq. (4)), and Mean Relative Error (MRE) (Eq. (5)) to indicate their accuracy [38,39,40]:

$$\mathrm{TIC}= \frac{\sqrt{\sum_{\mathrm{i}}{\left({\mathrm{x}}_{\mathrm{meas}}-{\mathrm{x}}_{\mathrm{calc}}\right)}^{2}}}{\sqrt{\sum_{\mathrm{i}}{{\mathrm{x}}_{\mathrm{calc}}}^{2}}+\sqrt{\sum_{\mathrm{i}}{{\mathrm{x}}_{\mathrm{meas}}}^{2}}}$$
(3)
$$\mathrm{HYBRID}=\frac{100}{\mathrm{n}-\mathrm{p}}{\sum }_{\mathrm{i}}\left[\frac{{\left({\mathrm{x}}_{\mathrm{meas}}-{\mathrm{x}}_{\mathrm{calc}}\right)}^{2}}{{\mathrm{x}}_{\mathrm{meas}}}\right]$$
(4)
$$\mathrm{MRE}=\frac{1}{\mathrm{n}}{\sum }_{\mathrm{i}}\left|\frac{{\mathrm{x}}_{\mathrm{meas}}-{\mathrm{x}}_{\mathrm{calc}}}{{\mathrm{x}}_{\mathrm{meas}}}\right|$$
(5)

where n is the number of data points, p is the number of parameters in the model and \({x}_{meas}\) and \({x}_{calc}\) are the experimental and calculated values, respectively [38,39,40].

3 Results and discussions

3.1 TPC extraction optimization

Optimal extraction conditions are useful for the development of any industrial extraction process. Therefore, this section discusses the choice of key factors affecting phenolic extraction from nutshells. It also highlights the combined effects of the various factors on the PTC extraction process.

3.1.1 The effect of extraction parameters

The investigated experimental conditions, defined by the DoE, and the respective TPC yields obtained after 30 min of extraction are presented in Table 3.

Table 3 DoE obtained from an I-optimal design, varying particle size, temperature, and ethanol–water solvent ratio, and the resulting TPC yields after 30 min from peanut, coconut, and macadamia nutshells

From Table 3, it is clear that in all experiments, phenolic compounds were extracted from the three nutshell types. As expected, the quantity of TPC obtained varied considerably depending on the type of biomass and by changing the level of the considered factors. In general, the ranges of TPC obtained from peanut, coconut, and macadamia nutshells were 11.2 ± 0.6–69.4 ± 2.2, 5.9 ± 1.7–76.2 ± 3.1 and 4.4 ± 1.5–63.5 ± 1.6 mg GAE/100 g dw of biomass, respectively. Although our screening experiment for optimal conditions was stopped at 30 min (unlike the kinetic experiments in Sect. 3.2), a similar order of magnitude of TPC was reported by Vijayalaxmi et al. [22], where a TPC yield of between 12.40 and 48.50 mg GAE/100 g dw was extracted from peanut husk using different ratios of ethanol–water solvents. Also, Prakash et al. [20] reported TPC yields from peanut and coconut shells in the range of 5.93–426.4 and 2.36–1056.3 mg GAE/100 g dw of biomass, respectively. Although phenolic compounds were extracted from 1 mm shell particles in their study, they used a different extraction method — centrifugal technique at 500 revolutions per minute for 2 h in various pure solvents such as hexane, ethyl acetate, methanol, ethanol, and water. This might have resulted in the higher optimal values achieved, besides other possible factors such as differences in plant varieties and agronomical conditions, among others.

3.1.2 Optimization

Based on the TPC values after 30 min for the examined biomasses obtained according to the I-Optimal Design, an optimization was performed by means of RSM. Initially, a full quadratic model was constructed, in which categorical terms were introduced to correct for the effect of several factors (particle size (x1), temperature (x2), and solvent ratio (x3)) on the various biomasses. The non-significant terms were systematically removed until a model with the highest Adjusted R2 (0.70) and a significant p-value (p < 0.05) was obtained. An Adjusted R2 of 0.7 for RSM is considered good in the literature [41]. The p-values of the several terms of the obtained model indicate that all the examined factors are significant (p < 0.05) for the extraction of phenolic compounds from the studied biomasses (p-values are given in the supplementary Table 1). This resulted in the individual models Eqs. (6), (7), and (8), being for peanut, coconut, and macadamia nut shell extracts, respectively.

$${\mathrm{TPC}\left(\frac{\mathrm{mg GAE}}{100\mathrm{ g}}\right)}_{30\mathrm{ min}\_\mathrm{Peanut}}=35.82-7.77*{\mathrm{x}}_{1}+4.35*{\mathrm{x}}_{2}+2.83*{\mathrm{x}}_{3}+9.94*{{\mathrm{x}}_{1}}^{2}+5.67*{{\mathrm{x}}_{2}}^{2}-19.30*{{\mathrm{x}}_{3}}^{2}$$
(6)
$${\mathrm{TPC}\left(\frac{\mathrm{mg GAE}}{100\mathrm{ g}}\right)}_{30\mathrm{ min}\_\mathrm{Coconut}}=20.30-17.44*{\mathrm{x}}_{1}+0.37*{\mathrm{x}}_{2}+2.63*{\mathrm{x}}_{3}+9.94*{{\mathrm{x}}_{1}}^{2}+5.67*{{\mathrm{x}}_{2}}^{2}-19.30*{{\mathrm{x}}_{3}}^{2}$$
(7)
$${\mathrm{TPC}\left(\frac{\mathrm{mg GAE}}{100\mathrm{ g}}\right)}_{30\mathrm{ min}\_\mathrm{Macademia}}=24.76-17.31*{\mathrm{x}}_{1}+9.92*{\mathrm{x}}_{2}+11.63*{\mathrm{x}}_{3}+9.94*{{\mathrm{x}}_{1}}^{2}+5.67*{{\mathrm{x}}_{2}}^{2}-19.30*{{x}_{3}}^{2}$$
(8)

where x1, x2, and x3 are the coded variables for particle size, extraction temperature and ethanol–water ratio respectively.

Subsequently, these models were validated based on the data points generated within the studied parameter ranges. Hereby, TIC values of 0.14, 0.23, and 0.26 were obtained for peanut, coconut, and macadamia nut, respectively (Table 4), which indicates that the obtained model is able to describe the relationship between the investigated process parameters and the TPC extraction.

Table 4 Optimal extraction conditions, predicted yield of TPC extracted after 30 min from nutshells at the optimal extraction conditions, and statistical validation values

After validation, the optimal conditions for each of these biomasses were determined based on the above model. For this purpose, the conditions within the investigated parameter range were determined, resulting in a maximum TPC extraction after 30 min.

From Table 4, the TIC validation values are small, confirming the adequacy and validity of the predicted models. Thus, TPC extraction from food shell by-product can be considered satisfactorily predicted by the model in the considered range of particle size, temperature, and ethanol solvent ratio. Therefore, the developed models were adequate and accurate for this study.

In order to better interpret the effect of the various process parameters on the extraction of phenolic compounds, several 3D surface plots were established. Those for peanut shell extract are shown in Fig. 1. The surface plots for the other biomasses are given in supplementary Fig. 1. The graphs were plotted as a function of two independent parameters while the third was kept constant.

Fig. 1
figure 1

Response surface plot for solid–liquid extraction of TPC from peanut shell demonstrating the effect of (a) particle size (x1) and temperature (x2), (b) particle size and solvent-ratio (x3) and (c) temperature and solvent ratio

From Fig. 1, it is observed that the TPC yield seems to have increased inversely with particle size, with the highest yields obtained at a particle size of 1 mm and directly with the extraction temperature. The highest TPC yield seems to be obtained between the boundary conditions, i.e., at about 50% (v/v) ethanol. At ethanol ratios higher than 50% (v/v), there was a decline in the TPC yield. The trend was replicated in all the biomasses studied, as shown in the surface plots given in the Supplementary Fig.1. Similar observations have been reported by other researchers [8, 11, 23]. Likewise, from Eqs. (5)–(7) and the supplementary Table 1, particle size seems to have the highest effect on TPC extraction while temperature, seems to have the least. Generally, all these factors seem to have a significant effect on nutshell extraction (Supplementary Table 1).

The increase of TPC extraction with a decrease in particle size is attributed to the increase in specific surface area of the particles, resulting in an increased contact area of the solvent with the matrix, enhancing extraction. Also, a larger surface area to volume ratio exposes more cells to the solvent and reduces the mass transfer distance from the solvent to the cell matrix, promoting higher phenolic compound extraction. Additionally, this can be attributed to the fact that the relative effect of the harder outer parts, which are less penetrable, on smaller shell particles becomes less represented [23]. Of course, in this study, the minimal particle size considered was 1 mm, which could be further reduced in a future work. However, the high energy cost of shredding, the creation of dust, and the more difficult handling of the fine dust would be limitations for the practical industrial implementation of such particle sizes [42].

For the high extraction efficiency that was noted when adding ethanol, a modified polarity of the medium could have had a positive effect. However, as ethanol concentration increases to higher values (i.e. ˃60%, the dielectric constant of the solvent reduces, decreasing molecule extraction power. Furthermore, use of a highly pure organic solvent has no effect on extraction yield, most likely due to the limited solubility of phenolic compounds [43]. Also, it was noted that macadamia nutshells require a higher (65%) optimal ethanol/water ratio to extract the phenolic compounds as compared to those of other biomasses, i.e., 53 and 54%, respectively, for the shells of coconut and peanut. This is potentially attributed to the profile of phenolic compounds, i.e., both composition and content [44]. Macadamia shells might have had a higher quantity of less water-soluble phenolic compounds compared to the other biomasses, thus requiring less polar-solvents to extract [45, 46].

For the effect of temperature, the increase in TPC yield as temperatures rises is attributed to an increased diffusional and convective mass transport during extraction [47] and the cell rupture, thus increasing the availability of the TPC. Moreover, a rise in temperature causes cytoplasmic cell wall rupture, resulting in the release of more phenolic compounds, and at the same time, the solvent viscosity and surface tension decrease, improving surface wetting and biomass penetration and thus improving the efficiency of TPC extraction [23]. Also, at high temperatures, such as the optimal (75 °C) value obtained in this study, a reduction of phenolic compound yield might be found in case of degradation of the desired compounds [9]; however, this might be balanced by the shorter extraction time (30 min) [48]. Next to degradation issues, the extraction is also limited by the boiling point of the solvent, depending on pressure in the equipment. Nonetheless, in this study, the effect of temperature is relatively small as compared to the other variables. This could be assessed based on the coefficients of the regression models shown in Eqs. (6), (7) and (8). Figure2 in the supplementary information demonstrates the trend of the impact of particle size, temperature, and ethanol/water ratio on TPC extraction from Macadamia shell. Based on this figure, it can be observed that an increase in particle size results in a decrease in response, while an increase in temperature results in an increase in response. For the ethanol/water ratio, this profile is slightly different, showing an initial increase in response until the optimum is achieved, followed by a decrease. However, it is important to keep in mind that this is purely the impact of these factors relative to the reference, the center point, where all three coded values of these factors are equal to 0. The response at this point is described by the intercept of the equations. When considering the impact of each of these factors on the response, it can be seen that the impact of temperature is lower relative to particle size and the ethanol/water ratio. This could be attributed to the range of temperatures investigated probably causing less diffusion and mass transfer [47] as well as inadequate cell ruptures [11]. Besides, factors such as stability of the phenolic-plant matrix and phenolic-plant tissue bonds (i.e. phenolic-lignin bonds) within the nutshell cells at the investigated range of temperatures might have reduced the extractive influence of temperature [49]. However, these were not considered in our study.

From the kinetic study (Sect. 3.2), 60 min seems adequate for the highest overall yield. The short extraction time and the optimal 50% ethanol ratio might be economically and environmentally beneficial since less heating time will be required, meaning reducing the cost of operational labour and the capital cost due to lower Hydraulic Retention Time [50]. Also, less energy will be required as compared to the case when a higher amount of water is used (since water has a higher heat capacity and latent heat as compared to ethanol). Moreover, shorter extraction time would reduce the risk of degradation of the interesting components that are extracted. Furthermore, at a low M:R, a higher TPC yield might be obtained, but at lower concentration which might increase solvent recovery cost.

3.2 TPC extraction kinetics study

Figure 2 shows the yield of TPC extracted from the three biomasses at the same extraction conditions (particle size of 1 mm, temperature of 75 °C, and solvent ratio of 80% (v/v)) that experimentally appeared to yield the highest phenolic content.

Fig. 2
figure 2

Experimentally measured TPCs vs. extraction time for peanut, coconut and macadamia nuts, at a particle size of 1 mm, temperature of 75 °C and an 80 v/v% a solvent ratio. TPC is expressed as /100 g dw. The experimental lines (not model lines) are only for visual interpretation

From Fig. 2, it can be observed that TPC yield from the shells follows the order: coconut ˃ peanut ˃ macadamia nut. This trend is in agreement with the findings of other research [20], which observed higher phenolic compound extractions from coconut shells compared to peanut shells. This is probably due to the fact that coconut shells contain more free (ethanol–water soluble) phenolic compounds compared to the other two biomasses. Also, the differences in TPC extraction kinetics might result from the differences in the microstructure of each biomass’s shell particles. Since the phenolic compounds are within the cell cytoplasm, the integrity of the cell and position of the cells within the particles determines the availability of the compounds to the solvent [28]. The coconut shell might have proportionally more available cells, so more phenolic compounds would be available to the solvents. Also, coconut shell structure, shell fiber polymer type, type of phenols, phenol-matrix association within the cell of the coconut shell and the lignification system might have promoted phenolic compound isolation from the coconut shells as compared to other biomass types [49]. However, further research is needed to better understand this phenomenon.

The data obtained from the DoE (Table 1) was used to determine which kinetic model best describes the extraction kinetics of phenolic compounds from the shells of peanuts, coconuts, and macadamia nuts under various extraction conditions. Since the accuracy of parameter regression of a kinetic study improves with an increase in the number of data points, the extracted TPC concentration was determined for each condition at 2.5, 5, 10, 15, 30, 60, and 120 min. A graphical representation of the examined models after parameter regression and the corresponding experimental data is given in Fig. 3.

Fig. 3
figure 3

Comparison of the examined kinetic models for TPC extraction from the shells of (a) peanuts, (b) coconuts, and (c) macadamia, and that of the combined second-order diffusional model for (d) peanuts, (e) coconuts, and (f) macadamia nutshells at a particle size of 1 mm, temperature of 75 °C and ethanol-solvent ratio of 80% (v/v)

For validation, after parameter regression, the models were subjected to TIC (Eq. (3)), HYBRID (Eq. (4)) and MRE (Eq. (5)) tests. The lower the value of these tests, the better the kinetic description [51]. The validation results for all models for the extraction kinetics of phenolic compounds from peanut, coconut, and macadamia nutshell are given in Table 5 respectively. The statistical data for parameter regression and model validation of TPC extraction from individual datasets of each biomass are given in the supplementary Tables 2, 3, 4.

Table 5 Statistical summary of TPC extraction kinetics modeling

The kinetic curves (Fig. 3) depict three typical, distinct stages of the kinetic reaction curves. Stage I (0–5 min) shows a steeper slope at the initial stages, indicating a faster extraction rate up to about 50 mg GAE/100 g dw of TPC. This is attributed to the higher concentration gradient between solid phase and liquid phase, thus faster rate of washing effect (explained later in this section) of the phenolics at the initial stages of extraction into the solvent, as explained by Fick’s law [9]. This is then followed by a reducing slope (stage II, at about 5–30 min), indicating that the rate of extraction of phenolic compounds is slowing down, probably due to decreasing concentration gradient and a reduced rate of washing. Furthermore, more solvent diffuses into the cells, which later diffuses out carrying along with it the solute. The diffusional extraction, which is the main mechanism at this stage, is lower as compared to the washing effect (explained later in this section). Lastly, the curves generally flatten (stage III, generally above 30 min), indicating that an extraction equilibrium is reached between solid and liquid. The mechanism given in Fig. 4 is proposed to provide an understanding of the extraction profile.

Fig. 4
figure 4

Proposed mechanism depicting the TPC extraction from a nutshell particle

Comparing the experimental data from the three biomasses and their respective predicted values as obtained from all examined models (Fig. 3), it is clearly seen that the calculated values by the combined second-order-diffusional kinetics model best match the experimental data. Also, as shown in Table 5, all applied statistical validation tests indicate that the combined second-order-diffusional kinetics model best describes the TPC extraction kinetics for all three biomasses. It is difficult to compare our kinetic parameters with the literature, as we did not find similar studies on nutshell TPC extraction based on water–ethanol extraction. However, for example, Liao et al. [43] reported that the combined second-order diffusional kinetic model was the best in predicting the extraction of total flavonoids from peanut shell, even when different extraction methods such as reflux, Soxhlet, or ultrasound-assisted extractions were used. However, during their study, only Peleg’s model was used as an alternative model for comparison. In another study, different kinetic models such as parabolic, power law, second-order rate, combined second-order-diffusional (two site kinetic), Elovick’s equation, and Weibull’s equation, were fitted to predict the TPC extraction kinetics from grape pomace [52]. Among the tested models, the combined second-order diffusional was also reported to provide the best fit. A similar observation was made by Linares and co-workers [28], who demonstrated that the kinetics of extraction of phenolic compounds from Yerba mate leaves is better described by a combined second-order-diffusional model.

The combined second-order-diffusional model (Eq. (9)) assumes that an extraction process occurs due to a mechanism of washing off of solute components that are readily available on the particle-solvent boundary, based on the second-order kinetic model, followed by diffusion of the solutes from within the cells, based on Fick’s law.

$$\mathrm{C}=\frac{{\mathrm{C}}_{\infty }^{\mathrm{w}}\mathrm{t}}{{\mathrm{t}}_{1/2}^{\mathrm{w}}+\mathrm{t}}+{\mathrm{C}}_{\infty }^{\mathrm{d}}\left[1-\mathrm{exp}\left(-{\mathrm{k}}_{\mathrm{d}}\mathrm{t}\right)\right]$$
(9)

where C is the extract concentration at time t (mg/100 g), \({\mathrm{C}}_{\infty }^{\mathrm{w}}\) is the equilibrium extraction concentration due to washing (mg/100 g), \({\mathrm{t}}_{1/2}^{\mathrm{w}}\) is the half time to washing (min), \({\mathrm{C}}_{\infty }^{\mathrm{d}}\) is the equilibrium extraction concentration due to diffusion (mg/100 g), \({\mathrm{k}}_{\mathrm{d}}\), is the diffusion mechanism kinetic constant (min−1), t is time (min).

Unlike other models, except for Fick’s second law, the model has a conceptual association with the extraction phenomena [28]. This, by accounting for both the surface washing and diffusion steps that control the overall rate of TPC extraction at the solid/solution interface. To clarify this occurrence, the rate of extraction of TPC from nutshell wastes as a function of time was calculated using Eq. (10) and is visualized in Fig. 5.

$$\mathrm{Extraction}\;r\mathrm{at}e\;\left(\mathrm{mgGAE}/\mathrm{gdb}\right)\frac{{\mathrm C}_{\mathrm n+1}-{\mathrm c}_{\mathrm n}}{{\mathrm t}_{\mathrm n+1}-{\mathrm t}_{\mathrm n}}$$
(10)

where Cn is the extraction concentration at time tn (mg/100 g), Cn+1 is the extraction concentration at time t(n+1) (mg/100), tn is the time at nth data, t(n+1) is the time at nth + 1 data, and n is the number of data points.

Fig. 5
figure 5

TPC extraction per minute from (a) peanut, (b) coconut, and (c) macadamia nutshells vs. time (min) under experimental conditions of 75 °C, particle size 1 mm, and ethanol-solvent ratio 80% v/v. The lines are only for visual interpretation

From Fig. 5, three extraction stages can be generally observed. The TPC isolation profile is characterized by a high extraction rate (Stage I) in the initial part, followed by a falling rate (Stage II), and lastly (Stage III), a slower rate that extends to a longer period. According to Linares et al. [28], Stage I can be ascribed to the washing of the phenolic compounds that are available on the surface of the particles, which are quickly dissolving into the solution, forming a large concentration of solute. This was followed by a reverse flow of solvents into the particles, hindering solute transfer to the external surface, thus resulting in the falling rate in stage II. In stage III, the particles are already swollen and the solvent no longer moves into the cell wall or into the intercellular spaces of the cellular protoplasm. Also, besides the Ficks law that assumes that at this stage there is a higher TPC concentration in the solvent, resulting in a decreased extraction driving force, compounds form complexes and thus their hydrodynamic radius increases. Consequently, solutes move more slowly through the microstructure of the particles before the concentration finally tends to be asymptotic. Thus, the TPC extraction process can be modeled as the accumulation of the mechanisms of washing and swelling and the diffusion mechanisms treated independently. Hence, it can be concluded that the extraction of TPC from nutshells is a result of both the effects of surface washing and diffusion mechanisms, which can best be expressed by the combined second-order-diffusional kinetic model.

Process model parameters, such as Cw, tw1/2, Cd, kd, and Cw/C, for all the three biomasses studied were determined at the best experimental extraction conditions. The results are presented in Table 6. Also, the variation of Cw, Cd, and C vs. t for the examined nutshells is visualized in Fig. 6.

Table 6 Combined second-order diffusional kinetic model parameters for TPC extraction from peanut, coconut, and macadamia nut shells (at particle size of 1 mm, temperature of 75 °C, and 80 v/v% solvent ratio)
Fig. 6
figure 6

TPC Concentrations C, Cw, and Cd vs. Time from the Shells of (a) Peanut, (b) Coconut, and (c) Macadamia at a particle size of 1 mm, temperature of 75 °C, and an ethanol–water solvent ratio of 80% v/v

From Table 6 and also from our previous discussion, it can be seen that the extraction of TPC is a combination of a washing effect and diffusion. However, these values also show that the washing process has a higher (˃ 60%) contribution to the phenolic compound yield compared to diffusion. The tw1/2 for coconut is 12 times higher than for peanut and macadamia nutshells. There is no data in the literature on the same biomasses for comparison. However, this data indicates that phenolic compound extraction due to the washing mechanism is higher in peanut shells (89%) and the shells of macadamia (87%) as compared to coconut (62%). This can be due to differences in the microstructure of the cells. Although not experimentally confirmed, the cellular structure of the peanut and macadamia nut shells could release more phenolic compounds to the surface of the particles during size reduction, making them ready for washing compared to the other biomass types. Also, from Fig. 6, it is evident that there is a faster rate of Cw in the first seconds of extraction, while Cd generally increases gradually in the entire extraction process. This justifies the stages of TPC extraction given in Fig. 5. A similar trend was observed by other researchers when different biomasses were studied [52, 53]. Thus, in general, TPC extraction from nutshells is a result of both a washing and diffusion mechanism, but the washing process was observed to have played a more key role in extraction than the diffusion process. This is because, typically, the washing effect is expected to be a dominant extraction mechanism as particles get smaller, i.e., with broken cell walls, while the effect of the diffusion mechanism is key in bigger particles, i.e., where cells are intact. In our kinetic study, smaller (1 mm) particles were considered, thus explaining the dominance of the washing mechanism observed. However, for the few particles that still had intact cells, diffusion took place. Even so, this was less dominant in the overall extraction of TPC due to fewer unbroken cells. Nevertheless, the rate of the two processes was found to be biomass-dependent.

4 Conclusions

This study focused on the process optimization to understand the influences of particle size, temperature and ethanol–water solvent ratio on the extraction of phenolic components from peanut, coconut and macadamia shells. Among the extraction factors investigated, the optimum value for particle size and extraction temperature is 1 mm, 75 °C respectively, while for the ethanol–water solvent ratio, the optimal values were 53, 54 and 65% for peanut, coconut and macadamia nutshells respectively. Also, particle size has the most important influence on extraction kinetics whereas temperature seems of lesser importance. Besides optimization of the extraction parameters, a model was developed to predict the TPC extraction process. Among the several kinetic models that were examined to describe the TPC extraction kinetics from nutshells, the combined second-order-diffusional model is the most suitable. The model reveals that the TPC extraction is a combination of a washing and a diffusion effect, whereby washing contributes more to the TPC extraction from the nutshells examined. However, the ratio of both effects depends on the type of biomass. Consequently, this study offers a comprehensive understanding of TPC extraction from nutshells, which are interesting by-products from the food chain and thus can become a valuable guide to future research and industrial application of an interesting source of biomolecules from nut shell biorefining.