Introduction

Biochar, a carbon rich material, which is usually generated form pyrolysis of biomass has been utilized for both agricultural soil (i.e., loose soil for crop growth; Kavitha et al. 2018) and dense soil (i.e., in landfill covers; Bordoloi et al. 2018) applications. Addition of biochar helps to improve soil water retention which is important for crop growth fertility (Lehmann and Joseph 2015) and also reduces infiltration (Gopal et al. 2019) in slopes. However, the interaction of biochar, however, in both loose and dense soils has not been systematically compared and analyzed. Soils in agriculture are generally compacted at 65% degree of compaction (Garg and Ng 2015), whereas in geo-environmental infrastructure, it may vary between 80 and 95% degree of compaction (Jien and Wang 2013).

Soils used in landfills are required to have low permeability toward water infiltration as well as gas permeation to minimize leakage of greenhouse gases (Mohareb et al. 2011; Mateus et al. 2012). Gas permeability depends on the void space or degree of compaction (Joseph et al. 2019). Generally, application of BC has been found to reduce gas permeability of dense soil (Garg et al. 2019). This is because of retention of higher amount of water in soil and biochar pores. However, the interaction of biochar in loose soil can be different from that of dense soil depending on the composition of biochar content. This is because there is porosity of biochar itself may compete with highly porous loose soil, which needs further investigation. Further, organic content in biochar can further enhance the bonding between large particles (Liu et al. 2012). As far as authors are aware, there is a lack of comprehensive study that investigates the effects of degree of compaction on gas permeability of biochar-amended soil. Further, there is a need to interpret the significance of soil suction and water content (due to complex soil and biochar porous structure) on gas permeability and possibly explores their relationship. Empirical modeling using k-nearest neighbor (KNN) has been adopted widely for establishing relationship. Analysis of predictability of soil load-bearing capacity can be done by machine learning by the use of data sets consisting of the data collected from the field measurements. Good predictions were recorded up to 200 m from the closest point with the known bearing capacity (Pohjankukka et al. 2016). The effects of the microbial activity on the permeability of the compacted clay soils were analyzed, and the data obtained were applied to the KNN for prediction of permeability of soils in the sites of landfill (Ozcoban et al. 2018). In another study, KNN has been used for derivation of pedotransfer functions (PTF) for the soil properties (Jagtap et al. 2004). KNN is used for the prediction of soil series and provides a suitable crop yield suggestion for a specific type of soil (Zaminur Rahman et al. 2018). For the estimation of the water content present in the soil, KNN was used and the correlations were shown in terms of R2 value (Nemes et al. 2006). A KNN algorithm, nonparametric approach, was developed for prediction of cation exchange capacity from the measured soil properties by considering two parameters which were optimized before implementation (Zolfaghari et al. 2016). Such model development would help to improve understanding of soil–BC–water interactions in loose and dense soils, which are commonly found in agriculture and engineering applications, respectively.

The major objective of this study is to develop a model for computing gas permeability with respect to soil suction, water content and temperature for different degrees of compaction of soil. Further, the relative significance of soil suction, water content and temperature has been analyzed. Three different degrees of compaction (i.e., 65%, 80% and 95%) have been considered. Based on measurements of gas permeability as well as other soil parameters, a new empirical model using KNN technique was developed to understand the mechanism of soil–BC interaction under varying degrees of compaction (i.e., void ratio). This study aims to improve understanding of soil–BC–water interaction under different degrees of compaction.

Materials and methods

Gas permeability and water retention property tests of biochar-amended soil

All the experimental tests were conducted in the greenhouse established at Shantou University, China. Soil selected for investigation was collected from the campus of Shantou University, China. The particles in soil corresponding to size range of 1.18–2.36 mm and 2.36–4.75 mm were found to be 29.7% and 50%, respectively. The properties of soil are summarized in Table 1. Based on unified soil classification system (USCS; ASTM D2487-17 2017), the soil can be categorized as SP (poorly graded sand). Three series of gas permeability tests were conducted including one series on bare soil and other two series on soil amended with 5% and 10% biochar content, respectively. These two different biochar contents were chosen owing to its improved soil properties as explored by Reddy et al. (2015). Soils were compacted at three different degrees of compaction (65%, 80% and 95%). All these tests were conducted in 9 soil columns with a diameter 300 mm and a height of 250 mm. These columns were manufactured (in-house) using PVC.

Table 1 Properties of soil adopted for investigation

Biochar was also prepared in-house using water hyacinth collected locally. The details of the preparation of biochar are provided in Bordoloi et al. (2018). For understanding structure of biochar, FESEM and FTIR analyses were conducted as shown in Fig. 1. SEM images revealed high specific surface area and porosity, while FTIR analysis indicates three major surface functional groups (i.e., –OH, –COOH and –CO; shown in Fig. 1b). These functional groups indicate the biochar produced from locally collected water hyacinth is hydrophilic in nature.

Fig. 1
figure 1

Structure of biochar produced in-house from water hyacinth using a FESEM, b FTIR images

For measuring gas permeability under different soil suction and water content, compacted soil columns were subjected to four 49-day monitoring cycle that for each cycle includes 42-day drying period and a 7-day continuous wetting period. The measurement system used for monitoring is shown in Fig. 2b, c. Soil suction was measured using MPS-6 sensor, which has a range from 10 to 100,000 kPa (Decagon Devices 2016), whereas volumetric water content was measured using soil water content probe EC-5 probe (Decagon Devices 2016). Both these sensors were inserted 100 mm into the soil from the top of the column. Average relative humidity of 69.9%, average temperature of 14.2°–38.1° and evaporation rate of 0.28–11.07 mm/d were measured during the whole period. Gas apparatus as developed by Garg et al. (2019) is considered for investigation. CO2 gas has been considered in this study for its non-reactivity with soil. Based on Darcy’s law, the gas permeability of soil column can be determined by the following equation (Damkjaer and Korsbech 1992):

$${\text{Gas}}\,{\text{permeability}} = \frac{\mu qL}{{A\Delta P}}$$
(1)

where ΔP is difference of gas pressure between the bottom and the top of soil column; q is the flow rate; A is the soil sample cross-sectional area; L is the length of the soil column; and μ is the absolute viscosity of the carbon dioxide gas flow (\(14.8 \times 10^{ - 6} \,{\text{N}}\,{\text{s/m}}^{2}\)).

Fig. 2
figure 2

Test column in greenhouse at Shantou University, China. a Greenhouse interior; b original diagram of soil column measurement system; c schematic diagram of soil column measurement system; d climate conditions

KNN modeling

In the present study, KNN algorithm was implemented in MATLAB (version 2019A). The KNN method does not use any predefined mathematical functions for the prediction of the target variable. In this methodology, based on k-nearest neighbor values of the input parameters, prediction of the target output is carried out. Most commonly, the nearest neighbor distances are calculated using the Euclidean distance algorithm.

The flowchart of the KNN modeling which includes the training and testing steps is shown in Fig. 3. The first step is to prepare the experimental data and identify input and output parameters. The experimental data were divided into the training and testing data sets. Subsequently, to generate the model using training date set, the distances from the k-nearest neighbor were calculated using Eucledian distance function \(\sqrt {\sum\nolimits_{i = 1}^{k} {\left( {x_{i} - y_{i} } \right)^{2} } }\). In this distance function, the choice of k has a drastic impact on the prediction. In KNN modeling, the best selection of k depends on the data and is chosen among the various weighting schemes of the samples selected. Therefore, an arbitrary value k was initialized and R2 and mean absolute percentage error (MAPE) were calculated. The same procedure was repeated for different values of k until the maximum value of R2 and the minimum value of MAPE were achieved. In this case, k = 2 provided the best prediction based on R2 and MAPE. The model was used to predict the target output for test data set, and the predicted values were validated against the experimentally measured values. The measured and predicted values were analyzed for its accuracy based on R2 and MAPE.

Fig. 3
figure 3

Flowchart of KNN modeling

The error in the KNN modeling was determined by comparing the predicted result with the experimentally measured values. The mean absolute percentage error MAPE and R-squared (R2) were employed to assess how close prediction values were to the actual values, and the following equation was used for error analysis:

$${\text{MAPE}} = \frac{100}{n} \mathop \sum \limits_{i = 1}^{n} \frac{{\left| {T_{i} - P_{i} } \right|}}{{T_{i} }}$$
(2)

where Ti is the target value (measured experimental value), Pi is the predicted value, and n is the number of data. The value of MAPE should be minimum to ensure the accuracy of the prediction model. R-squared (R2) is a measure of closeness of the data to the fitted regression line. It is the percentage of the response of variable variation that is explained by the linear model. The higher the value of R-squared, the better the model fits the data. If the final data obtained are not satisfactory, the parameters of the model are changed to achieve the desired output; otherwise, the results are satisfactory.

Since KNN model is incapable of predicting the normalized importance, random forest method (another machine learning algorithm) was used to predict the normalized importance plots. The normalized importance plot provides the ranking of importance of each input parameter on the target output.

The suction, volumetric water content, soil compaction and biochar, at various levels, were employed for the KNN training and testing phases. For training the model, data corresponding to 0% and 10% biochar content for all degrees of compaction (65%, 80% and 95%) was selected. The testing was done on data corresponding to 5% biochar content at all degrees of compaction. Similarly, in another case, data corresponding to 65% and 95% degrees of compaction (for all biochar contents) was used for training of model. The testing was conducted using 80% degree of compaction for all biochar contents. Figure 4 describes the network design used for the prediction of air permeability.

Fig. 4
figure 4

KNN architecture applied to air permeability prediction

Results and discussion

Air permeability versus soil suction for soil–biochar composites at different degrees of compaction

Figure 5a–c shows the comparison between measured and computed air permeability versus suction curves for different degrees of soil compaction. The biochar content of 5% was kept as constant during prediction. It can be observed from these figures that the prediction using KNN technique seems reasonable considering the fluctuation in measured data of air permeability as a function of soil suction. For different degrees of compaction, air permeability generally rises with an increase in soil suction. This is primarily due to an increase in connectivity of pores (with air) with a lowering of volumetric water content. The observed trend is consistent with Garg et al. (2019) for 95% soil compaction. However, when we compare trends among different degrees of compaction, air permeability gradually increases with suction for 65% degree of compaction, while it increases significantly beyond a certain suction (~ 450 kPa) for 95% degree of compaction. This indicates that for higher degree of compaction, larger amount of soil suction is needed to enhance air permeability. For application in landfill covers located in subtropical regions of heavy rainfall (suctions within lower range of up to 400 kPa), where minimum gas permeability is desirable, higher degree of compaction is more suitable. It is also interesting to note that air permeability of biochar-amended soil at lower suction range (between 10 and 350 kPa) is highest for loose soil (i.e., 65% compaction) followed by 80% and 95%. However, the difference in air permeability between loose and dense soils becomes lower at higher suction ranges. This seems to imply that compaction may not have a huge difference in air permeability of soil under very dry state. This is reasonable as under dry state, most of voids of soil are filled with air, thus providing improved connectivity for gas to flow.

Fig. 5
figure 5figure 5

KNN prediction of 5% biochar—air permeability versus suction plot on log scale a for 65% soil compaction, b 80% soil compaction, c 95% soil compaction, d normalized importance of input parameters

In order to further interpret the soil–biochar–water–gas interaction, the relative importance of parameters (suction, volumetric water content (VWC), biochar content and compaction) affecting air permeability was investigated. Figure 5d shows the relative importance of parameters affecting air permeability. It was found that soil suction is the important parameter affecting air permeability of biochar-amended soil followed by volumetric water content, compaction (i.e., void ratio) and biochar content. The result seems to be consistent with the theory suggested by Fredlund and Morgenstern (1977) that soil suction is one of the important stress state parameters for understanding of unsaturated soil behavior. As per Fig. 5d, the second most important parameter is volumetric water content or compaction. This is expected that it itself has direct relationship with soil suction through soil–water characteristic curve (SWCC; Bordoloi et al. 2018). On the other hand, theoretical models proposed in the literature such as Carman–Kozeny equation (Carman 1956; Valdes-Parada et al. 2009) and Yang–Alpin equation (Yang and Aplin 2010) also suggest that dependence of gas permeability on porosity (or void ratio). Such models, however, have been proposed for granular material and clay material, respectively. They further do not take into account directly any influence of soil suction, that itself is a measure of air–water interfaces in an unsaturated soil. Saiyouri et al. (2008) investigated gas permeability on cement grouted soils. They observed that gas permeability reduced significantly due to cementation of soil (i.e., reduction in void ratio). However, their study was performed on saturated soils without taking into account variation in soil moisture. Table 2 summarizes the R2 values of predicted air permeability and suction curves for soil amended with biochar at different degrees of compaction. It can be observed that the R2 values are greater than 0.9, suggesting reasonably good prediction capacity of KNN.

Table 2 Coefficient of correlation and maximum percentage error for 5% biochar prediction using KNN

Air permeability versus soil suction for soil–biochar composites at different biochar contents

Figure 6a–c shows the plot of air permeability and suction for soil amended with different biochar contents such as 0, 5% and 10%. As per figures, it can be observed that generally with the presence of biochar, there is a reduction effect on gas permeability, especially for biochar content of 10%. The observation is consistent with that observed by Wong et al. (2016), where they found that with an increase in biochar content the gas permeability reduces. However, interestingly, their study found that at 80% degree of compaction, the biochar effects are negligible. On the contrary, our study found that biochar content of 5% could be also impactful in reducing gas permeability at 65% degree of compaction. This variation can be due to difference in soil type (silty sand in our study as compared to clay in their study) as well as biochar type (produced from invasive weed as compared to commercial peanut shell in their study). Such differences can cause variation in packaging arrangement of soil–biochar particles and hence any observed gas permeability. Kumar et al. (2019) observed that feedstock type (animal or plant) from which biochar is produced can significantly influence erosion properties of soil. Kumar et al. (2019) observed that biochar produced from animal and plant waste can significantly alter its influence on soil erosion properties. The reason is due to different functional groups present in animal- and plant-based biochar that can cause its structure to be hydrophilic or hydrophobic in nature. Further systematic studies are needed to consider influence of soil type and biochar type (animal source or plant source). Similar to Fig. 5d, soil suction is found to be the most significant parameter in influencing gas permeability of soils amended at different biochar contents. Volumetric water content and void ratio have similar importance followed by biochar content to be the least. Based on the second KNN predictions, it can be confirmed that soil suction is highly essential in governing gas permeability in unsaturated soils amended with biochar (Table 3).

Fig. 6
figure 6figure 6

KNN prediction of 80% soil compaction—air permeability versus suction plot on log scale a for 0% biochar, b 5% biochar, c 10% biochar, d normalized importance of input parameters

Table 3 Coefficient of correlation and maximum percentage error for 80% soil compaction using KNN

Conclusions

The study involves the investigation of gas permeability of biochar-amended soils at different degrees of compaction. Further, KNN modeling has been applied to develop model and identify relative importance of parameters (soil suction, water content, biochar content and compaction) that influence gas permeability. As per study, it was found that biochar-amended soils have lower gas permeability as compared to unamended soils. Further, it was also found that higher degree of compaction requires larger suction (or drying) to enhance gas permeability. Gas permeability among different compacted soils (for 5% biochar content) was highest at lower suction range. Soil suction is found to be the most influential parameter for gas permeability in biochar-amended soils.