1 Introduction

Phosphorus (P) plays an important role in agricultural production (Yang et al. 2020). Excessive P leaching into surface waters often leads to eutrophication and eventually disturbs the balance of aquatic ecosystems (Schelske 2009; Shaheen et al. 2022a). In China, P losses from the livestock and poultry industry were estimated to be approximately 119.7 Mt in 2017, which was higher than that from agriculture (76.2 Mt), domestic sewage (95.4 Mt), and industrial sources (70.9 Mt) (Second National Pollution Source Census Bulletin 2020). Thus, the growth of China’s livestock industry and intensive agriculture have resulted in large amounts of P moving into aquatic ecosystems (Liu et al. 2016), causing eutrophication in rivers, lakes, wetlands and coastal waters. On the other hand, the global P resources are expected to be exhausted in the next 300 years, thus recovering P from wastewater is a potential strategy to alleviate water eutrophication and cope with the depletion of P reserves (Mineral commodity summaries 2020; Bradford-Hartke et al. 2015).

Adsorption is an effective technology for P recovery from wastewater due to its simple operation and high efficiency. However, several challenges often limit its wider application, particularly issues such as low adsorption capacity and the relatively high cost of adsorbent preparation (Li et al. 2020a, b). Biochar is a carbon-rich material produced by the thermal pyrolysis of biomass under anoxic conditions, and it can be produced from a wide range of feedstocks including animal waste, microbial and plant residues (Ippolito et al. 2020; Li et al. 2022, 2019; Shaheen et al. 2019). Biochar has been effectively used as a carbon sink (Matovic 2011) to improve soil water holding capacity and fertility (Ding et al. 2016), remove pollutants and recover nutrients from wastewaters (Mohammadi et al. 2021; Shaheen et al. 2022b; Bolan et al. 2022), and reduce greenhouse gases emissions and toxic metal mobilization in soils (Kammann et al. 2017; Shaheen et al. 2023). Unfortunately, the negative surface charge of biochar repels anionic elements including phosphate in the medium (Zheng et al. 2019; Yang et al. 2023). Prior studies attempted to improve biochar’s anion adsorption capability by introducing metal (hydro) oxides such as MgO, AlOOH, Fe3O4, CaO, ZrO2, and La(OH)3) into the biochar matrix (Oginni et al. 2020; Zhang and Gao 2013; Peng et al. 2019; Samaraweera et al. 2021; Huang et al. 2020; Shaheen et al. 2022c,d; Zhang et al. 2022a, b). Among these metal-biochar composites, the introduction of low-cost MgO particles into the biochar was reported to have high P removal efficiency, and it has been suggested that P saturated biochars could be directly used as a slow-release fertilizer (Gao et al. 2013). Previous studies reported that the synthesis of MgO biochar by Mg salt impregnation during pyrolysis, hydrothermal precipitation, and electrochemically assisted impregnation achieved increased P removal from wastewater (Li et al. 2018a; Yao et al. 2011).

Despite advances in preparing metal impregnated engineered biochar there remain critical research gaps that need to be addressed. These gaps prompt investigations into assessing and improving the soaking efficiency of metal elements into the biomass and the subsequent impact of the degree of metal dispersion on P adsorption. The variation in the impregnation efficiency of metals into biochar is affected by its physicochemical properties that vary greatly for biochar derived from different feedstock, which consequently leads to the differences in biochar adsorption capacity (Kwon et al. 2020; Krasucka et al. 2021). Most of the biomass investigated in previous studies could not be fully and evenly impregnated with metal salts in a natural state. Recent studies indicated that metal oxides were only nonuniformly dispersed on the surface of adsorbents, which greatly limited the utilization efficiency of metals and increased the cost of production (Jiang et al. 2022; Zhang et al. 2012). Therefore, it is of great urgency to find a new way to promote the impregnation efficiency of metal salts into biomass during the production of metal-biochar. One promising approach to address the challenge of metal impregnation into biochar is applying the burst pressure technique. This is a typical method that includes physically puffing of the biomass, which rapidly turns biomass with dense features into a loose structure due to an internal pressure surge (Asada et al. 2005). It is hypothesized that an improved impregnation of biomass with metal salts could be achieved after biomass puffing treatment, and that a biochar composite with highly dispersed metallic moieties could be synthesized after pyrolysis. The pre-puffing of biomass before metal salt soaking will also make full use of a metal-containing chemical.

The selection of a cost-effective source of biomass that can be enhanced using the puffing treatment is an important consideration. Thus, it would be best if the source of biomass is a waste material that would be cheap to acquire. Mold manifestation in grain is a common problem in grain storages, and FAO estimated that about 25% of the world's crops, including corn, were contaminated with mycotoxins, which could lead to acute or chronic disease outbreaks if ingested (Smaoui et al. 2020; Marroquín-Cardona et al. 2014). The safe disposal and utilization of mildewed grains is thus an important issue in ensuring food security, which makes mildewed grains an ideal biomass feedstock for engineered biochar composite adsorbent preparation and P recovery. Most of the previous studies on P recovery with metal-biochar composites focused on P recovery from aqueous solution or simulated wastewater in the laboratory. Thus, the performance and mechanisms of P recovery from real livestock wastewater using engineered metal-biochar composites have not been fully explored.

In this study, the specific objectives were to: (1) synthesize and characterize metal-biochar composites made from mildewed corn with and without puffing pretreatment, followed by a combined MgCl2 impregnation and pyrolysis, (2) compare the efficiencies of metal-biochar composites prepared from different pretreatments on P recovery from livestock wastewater, (3) characterize the P recovery mechanisms, (4) assess the release and availability of P in the P-loaded BC, Mg-BC, and Mg-PBC treated soil and their impacts on the plant growth, and (5) conduct a cost–benefit analysis to highlight the potential use of the engineered metal-biochar composites for P recovery from livestock wastewater.

2 Materials and methods

2.1 Materials and reagents

The mildewed and deteriorated corn (Zea mays) was collected from several farmers at Zhangjiagang, Yangling, China. After cleaning with deionized (DI) water and removing the mold layer on the surface, the corn was dried in an oven at 40 °C for 6 h and sealed in a desiccator. The livestock wastewater used in the experiment was collected from a pig breeding farm located in the suburb of Yangling, and the suspended solids in the wastewater were removed by vacuum filtration (0.45 μm). The filtrate was kept in a refrigerator at 4 o C for further use. The initial pH of wastewater was 6.5, and the concentration of total P, potassium (K), nitrogen (N), ammonium nitrogen, and nitrate nitrogen were 32, 58, 90, 2.68 and 71.12 mg L−1, respectively. Further physical–chemical properties of livestock wastewater are provided in Table. S1. MgCl2, HCl, NaOH, K2S2O8 and other chemicals of analytical grade used in the experiments were purchased from **long Science Co. Ltd. (Guangdong, China).

2.2 Adsorbents preparation and characterization

Approximately 500 g of mildewed corn without pre-puffing was mixed with DI water containing 100 g of Mg (as MgCl2) and soaked for 6 h. The mixture was then dried in an oven at 80 °C for 12 h until the supernatant evaporated, and the solid was pyrolyzed at 600 °C in a muffle furnace for 1 h (Fig. 1). It was supposed that the MgCl2 was decomposed into MgO at 600 °C through reactions of MgCl2nH2O → MgOHCl + HCl↑ (250−450 °C) and MgOHCl → MgO + HCl↑ (450−650 °C) (Zhang et al. 2012). The resulting product was labeled as Mg-BC. In addition, the popcorn (500 g) produced by mildewed corn puffing was treated with the same procedures, and the resultant product was identified as Mg-PBC. Corn biochar (BC) and popcorn biochar (PBC) without impregnation of MgCl2 solution were also prepared and used for comparison purposes. All the products were carefully collected, milled to a size less than 0.2 mm and kept in a N2 flushed desiccator before use (Fig. 1).

Fig. 1
figure 1

Schematic diagram of material preparation, static and dynamic adsorption experiments

The corn and popcorn (impregnated and un-impregnated with MgCl2) were sliced and observed by a microbeam X-ray fluorescence scanning electron microscopy (μ-XRF; M4 tornado, Boyue, China) to determine the distribution of metals. The surface morphology and elemental distribution of biochar before and after P adsorption were analyzed using scanning electron microscopy (SEM; ULTIM Max65, OXFORD, UK). The N2 adsorption–desorption isotherms were measured at 77 K by an automated physical analyzer (ASAP2060 Plus HD88, Micromeritics, USA). The specific surface area (SBET) was calculated using the Brunauer–Emmett–Teller method. The total pore volume (TPV) was calculated based on the adsorbed N2 at a relative pressure of 0.99. The average pore size (AVP) was determined based on the Barrett –Joyner–Halenda (BJH) method. The pHpzc of the adsorbents were determined by pH drift method (Lopez-Ramon et al. 1999). The crystalline feature and changes in binding energy on the different elements of biochars before and after P sorption were also identified using XRD and XPS.

2.3 Batch adsorption experiment

For a typical batch recovery experiment, approximately 0.05 g of adsorbent was added to a polyethylene centrifuge tube containing 25 mL of livestock wastewater, and the tube was shaken for 12 h at a platform (25 ± 0.2 °C). The solution was then filtered through a 0.45 μm nylon filter; the filtrate was collected, digested by potassium persulfate and the P concentration was determined using spectrophotometry (UVmini-1240, Shimadzu, Japan) (Li et al. 2018b). The P removal efficiency of the adsorbent was evaluated at different pH values (2–10) of wastewater (adjusted using 1 mol L−1 HCl or NaOH solution), different contact times (5–1440 min), and different initial P concentrations (5–1000 mg L−1). The recovery capacity of the adsorbent (q, mg Pg−1) was evaluated using mass balance. Each test was implemented in triplicate. Recovery kinetics of P adsorption on the biochar was examined by mixing 0.5 g of the adsorbent with 0.25 L of livestock wastewater in a polyethylene bottle at room temperature. At specific time intervals (5, 10, 20, 30, 60, 120, 240, 360, 720, and 1440 min), the filtered suspension was taken for analysis as previously mentioned. The experimental data were fitted to the pseudo-first-order (Eq. (1)), pseudo-second-order (Eq. (2)), and intraparticle diffusion models (Eq. (3)) in linear form (Huang et al. 2018). In the P recovery isotherm study, the adsorptive equilibrium data were explored using typical Langmuir (Eq. (4)), Freundlich (Eq. (5)) and Langmuir–Freundlich (Eq. (6)) isotherm models. The compliance of each model was evaluated by calculating the determination coefficient (R2) and chi-square statistic (χ2) (Zhang et al. 2022a, b).

$${q}_{t}/{q}_{e}+1\mathrm{n}\left({q}_{{e}^{-}}{q}_{t}\right)=1\mathrm{n}{q}_{{e}^{-}}{k}_{1}t$$
(1)
$${t/q}_{t}={1/k}_{2}{q}_{{e}^{2}}+{t/q}_{e}$$
(2)
$${q}_{t}={k}_{\mathrm{ip}}{t}^{1/2}+\mathrm{C}$$
(3)
$${q}_{e}={K}_{\mathrm{L}}{C}_{e}/\left(1+{K}_{e}{C}_{e}\right)$$
(4)
$${q}_{e}{K}_{\mathrm{F}}{C}_{{e}^{I/n}}$$
(5)
$${q}_{e}= {\left({K}_{\mathrm{LF}}{C}_{e}\right)}^{I/n}\left(1+{\left({K}_{\mathrm{LF}}{C}_{e}\right)}^{I/n}\right)$$
(6)

where qe and qt (mg Pg−1) are the P recovery capacities at equilibrium and at specific time t, respectively. k1 (min−1), k2 (g[mg min]−1) and kip (mg(g min1/2)−1) are the reaction rate of the pseudo-first-order, pseudo-second-order and inner particle diffusion models, respectively. C represents the constant of the intraparticle diffusion model. Ce (mg PL−1) is the equilibrium level of P in wastewater. KL (L mg−1) and Ke (L mg−1) are the Langmuir model constants. KF (mg g−1) is the Freundlich model constant. KLF (L mg−1) is the Langmuir–Freundlich model constant. 1/n is the adsorption strength in the Freundlich model.

2.4 Adsorption cycle experiment

In order to further assess the industrial application potential of the adsorbent, the cycling capacity of the adsorbents were tested. The NaOH solution was used instead of the more effective acid reagents to avoid the release of Mg during the regeneration process. In a typical procedure, 0.05 g adsorbent was added into 25 mL livestock wastewater containing 100 mg L−1 P, shaken for 12 h, centrifuged at 4000 rpm for 5 min, and equilibrium P concentration (Ce, mg PL−1) was determined. Then, the supernatant was poured off and 25 mL DI water was added into the sediment. The mixture was shaken for 5 min and centrifuged at 4000 rpm for 5 min, after that the supernatant was poured off. This cleaning procedure was repeated 3 times and the sediment was dried in an oven at 105 °C for 2 h. Then, 25 mL desorption solution (2 mol L−1 NaOH) was added into the sediment and shaken for 12 h, and the residual concentration (Ct, mg PL−1) was determined. The adsorption–desorption procedure was repeated3 times. Desorption rate was calculated using Eq. (7).(please separate ‘desorption’ and ‘rate’ in the following formula)

$${\mathrm{Desorption rate}}=\frac{{C}_{t}}{\left({C}_{0}-{C}_{e}\right)}\times 100\%$$
(7)

where Ce and Ct (mg PL−1) are the P concentrations at equilibrium and after desorption, respectively. C0 (mg PL−1) is the initial P concentration.

2.5 Column adsorption experiment

The dynamic P recovery capacity was assessed by a column test. Approximately 3.00 g of biochar was added to a glass chromatographic column (1 cm × 10 cm) with 50 μm filters at the top and bottom. Livestock wastewater (with P initial level (C0) of 32 mg L−1) was passed through the column from the bottom by a peristaltic pump (LEAD-1, Lange, China) at a steady flow rate of 0.25 mL min−1. The effluent was collected by an automatic collector (EBS-20, Huxi, China) every 54 min until the biochar was saturated. The related dynamic recovery data werefitted by the Thomas model (8) and the Yoon-Nelson model (9) (Malkoc et al. 2006).

$${C}_{t}/{C}_{0}=1/\left[1+{\mathrm{e}}^{\left(\left({{K}_{th}}^{/Q}\right)\left({{{q}_{th}}^{m-{C}_{0}}}^{V}\right)\right)}\right]$$
(8)
$${C}_{t}{C}_{0}=1/\left[1+{e}^{\left({{K}_{YN}}^{\left(\tau -t\right)}\right)}\right]$$
(9)

where Kth (mL(mg min)−1) and KYN (h−1) are the rate constants of the Thomas and Yoon-Nelson models, respectively; qth (mg g−1) is the theoretical maximum recovery capacity of the adsorbent, Q is the flow rate (mL min−1), m is the amount of adsorbent (g), V is the volume of the solution passing through the column (L); τ (min) is the time when the effluent concentration (Ct, mg L−1) reaches 50% of the inlet concentration (C0, mg L−1), and t0 (min) is the equilibrium time. All adsorption experiments were performed in triplicate.

2.6 Assessing the release and availability of P in the biochar treated soil

A pot experiment was conducted to investigate the release of P from the P-loaded BC, Mg-BC, and Mg-PBC treated soilsto plants and to assess the potentiality of reusing those biochars as a slow-release P fertilizer. A composite top (0–25 cm) soil sample was collected from a farmland in the Agricultural Test Station of Northwest A&F University. The soil sample was air dried and crushed to a size of < 2 mm. The soil was alkaline with pH = 8.06 and poor in its content of organic matter (1.95%), total N (0.60 g kg−1), P2O5 (0.98 g kg−1), K2O (28.50 g kg−1), and available P (22.8 mg kg−1). Approximately 1 kg of the soil was mixed with the biochar and filled into an appropriate pot (15 cm in diameter, 15 cm in height). The biochars before (BC, Mg-BC, Mg-PBC) and after (BC-P, Mg-BC-P, Mg-PBC-P) adsorption of P and a kind of commercial P fertilizer (Stanley) were mixed with the experimental soil at the ratio of 1% (mass ratio). At the same time, the soil without adding any material was taken as control. The treatments were labeled as control (100% soil), 1% BC, 1% Mg-BC, 1% Mg-PBC, 1% BC-P, 1% Mg-BC-P, 1% Mg-PBC-P, and 1% P fertilizer, respectively, in four replicates for each treatment. Indian mustard (Brassica juncea) seed was purchased from a local market. Five mustard seeds were sown in each pot, and thinned to 1 seedling per pot after germination. The soils of all treatments were wetted at soil moisture of 65% of the field capacity. During the experiment, distilled water was added daily to maintain the soil moisture based on weight. After 30 days of growth, the whole plant of each treatment was carefully harvested and washed with tap and distilled water in a sequence to remove any dust and soil. The plant height and fresh weight were recorded. At the day of 0, 5, 10, 15, 20, 25 and 30, three soil samples were taken with a plastic tube collector (diameter equal to 1.5 cm) from each pot randomly. The content of available P in the collected soil samples was extracted by sodium bicarbonate and measured colorimetrically as per the methods of Olsen et al. (1954) and Murphy and Riley (1962).

2.7 Cost–benefit analysis

2.7.1 Cost analysis

It is important to understand the cost and economic benefits of preparing the adsorbent for industrial applications. The collection of raw materials and detailed treatment procedures such as collecting, drying, and carbonization should be accounted for in the cost of adsorbent preparation (Banerjee et al.2016). Therefore, the cost in Chinese Yuan (CNY) of preparing one kilogram of the adsorbent was calculated in this study (Huang et al. 2018).

The cost of preparation of adsorbent was calculated using the following procedure:

  • A. Net cost (NC) of preparation of adsorbent per preparation step:

    • (i) Cost of collecting raw materials (CCRM); mainly cost of transportation for the mildewed corn discharged by farmers without charging money.

    • (ii) Cost of drying raw mildewed corn material (CDRM) = hour • units • (1000W) • per unit cost.

    • (iii) Cost of puffing raw mildewed corn material (CPRM) = hour • units • (1000W) • per unit cost.

    • (iv) Cost of impregnation (CI) with MgCl2•6H2O chemical = mass • units • per unit cost.

    • (v) Cost of pyrolysis (CP) = hour • units • (1000W) • per unit cost, including the costs of heating, holding and cooling. Hence, NC would be the sum of CCRM, CDRM, CI, and CP.

  • B. Other overhead cost such as hire fee for preparation of Mg-BC and Mg-PBC assumed to be 10% of the NC.

$$\mathrm{Total}\;\mathrm{cost}\;(\mathrm{TC})\:=\:\mathrm A\:+\:\mathrm B$$

2.7.2 Benefit analysis

After P loaded MgO-biochar is applied into the soil, organic acids secreted by soil microorganisms and plant roots will dissolve P and make it release slowly into the soil (An et al. 2021). Thus, P loaded biochar after P recovery was considered as a slow-release fertilizer. The benefit analysis of this study was based on the economic benefits compared to a commonly used slow released phosphate fertilizer, the monopotassium phosphate garden fertilizer (Stanley, China) (P content 21.80%; 99.00 CNY kg−1). The price of the biochar fertilizer (BF, CNY) per kg can be converted to the price of commercial P fertilizer as outlined in Eqs. 10 and 11 according to the P content.

$$\mathrm{P content }={m}_{\mathrm{p}}\left({m}_{\mathrm{p}}+m\right)\times 100\%$$
(10)
$$\mathrm{Price}\;\mathrm{of}\;\mathrm{the}\;\mathrm{biochar}\;\mathrm{fertilizer}\;(\mathrm{PBF})={\mathrm{Pcontent}}_{\mathrm{BF}}/{\mathrm{Pcontent}}_{\mathrm{Stanley}}\times{\mathrm{Price}}_{\mathrm{Stanley}}$$
(11)

where mP (g) is the P content adsorbed by MgO biochar and m (g) is the amount of MgO biochar. The net benefit of the biochar is derived from the P-saturated biochar fertilizer, that is, net benefit (NB) is equal to the price of the biochar fertilizer (PBF).

Total benefit is net benefit minus the total cost, which is shown as Eq. 12.

$$\mathrm{Total}\;\mathrm{benefit}(\mathrm{TB})=\mathrm{NB}-\mathrm{TC}$$
(12)

3 Results and discussion

3.1 Surface characteristics of adsorbents

The SBET of BC and PBC was similar with values of 249.47 and 253.12 m2g−1, respectively (Table 1, Fig. S1). Additionally, the TPV and AVP size of PBC did not change notably when compared to BC. Interestingly, after impregnation, the AVP size of Mg-BC and Mg-PBC increased significantly, which led to a decrease in SBET. According to the N2 adsorption–desorption curve (Fig. S1), all the biochar samples’ desorption curves had a H3 hysteresis loop at different degrees, which indicated that these biochars belonged to mesoporous structural materials (Zhao et al. 2014). The loading of metal oxides not only filled the surface mesopores of the biochar, but also etched the surface during high-temperature pyrolysis, which created a large number of pores (Liu et al. 2013). Therefore, the decrease in SBET was mainly due to the processes of impregnation and pyrolysis, which coincided with the results of Li et al. (2016).

Table 1 Specific surface area and porosity properties of adsorbents

The μ-XRF images of corn and popcorn with and without salt soaking indicated that the seed coat of corn kernels was complete and compact in texture before puffing, while after puffing, the seed coat cracked and detached, the texture became loose, and number of cavities generated with the volume and the crispness increased (Fig. 2). After impregnating the corn with MgCl2 solution, only weak fluorescence intensity was detected in the surface layer of the corn, which indicated that the metal was only distributed on the surface during the impregnation process. After puffing, the volume of popcorn expanded, and a strong fluorescence intensity was detected on the popcorn after MgCl2 solution impregnation. Impregnation promoted metal diffusion into the popcorn because the puffing effect destroyed the corn seed and caused the endosperm to loosen its structure.

Fig. 2
figure 2

μ-XRF images of corn and popcorn with or without salt solution impregnating (a, b, c, and d) and SEM images of Mg-BC (e) and Mg-PBC (f)

Both BC and PBC had relatively smooth surfaces and no developed pore structures were found even after magnifying the image by 50,000 times (Fig. 2). After salt impregnation, the surface of Mg-BC (Fig. 2e) and Mg-PBC (Fig. 2f) became rough and some pores and particles appeared, particularly for the Mg-PBC, indicating the loading of metal oxide was more uniform after pre-puffing. These results, combined with those of the X-ray diffraction analysis (shown in Fig. 6c), indicated that the nanoparticles formed were nanoparticles   of magnesium oxide. It is thus evident that pre-puffing promoted the preparation of an evenly doped MgO biochar composite Mg-PBC.

3.2 Static phosphorous recovery capability

The pHpzc of the BC was 7.24, and the introduction of magnesium increased the pHpzc values to > 10 for both Mg-BC and Mg-PBC (Fig. 3). In aqueous systems, protonation on MgO biochar surface results in the formation of ≡MgOH+, which increases the pH of the solution. The pHpzc of Mg-PBC (10.87) was slightly higher than Mg-BC (10.52), which suggested pre-puffing made MgO dispersion more uniform. Results of batch experiments showed that there was no P recovery by BC from the livestock wastewater (Fig. 3b), which can be attributed to its negatively charged surface. The recovery of P by Mg-PBC was less affected by pH when it was at high pH (7–11), indicated pre-puffing made the pH application range wider. In general, at higher pH values (~ 10), phosphate in solution exists mainly in forms of HPO42− and PO43−, which results in a strong repulsion between phosphate and hydroxyl ions, and thus reduces the amount of P recovery (Rashid et al. 2017). However, results indicated that the recovery amount of P on biochar did not decrease under high pH conditions, indicating the Lewis acid–base action played a dominant role. In addition, PO43− may form surface complexes with metal oxides on the surface of biochar (Shin et al. 2004), thus stabilizing its P adsorptive recovery amount.

Fig. 3
figure 3

(a) Influence of pH on adsorbents and pH change after adding adsorbent into DI water with different pH values; (b) effect of pH on P recovery from livestock wastewater

In general, P adsorptive recovery in wastewater increased rapidly at the early stage (~ 100 min) and then gradually reached equilibrium (Fig. 4a). After puffing treatment, the P recovery amount of Mg-PBC was slightly higher than that of Mg-BC. Furthermore, the pseudo-second-order was a better fit than the pseudo-first-order model (higher R2 and lower χ2) (Zhang et al. 2022a, b) for all P recovery experiments for all investigated biochar (Table 2). The results supported that the P recovery process was mainly controlled by chemical reactions (Gerente et al. 2007). In addition, the fitted recovery rate constant (k2) of Mg-PBC was higher than that of Mg-BC (Table 2), indicating that puffing treatment promoted the P recovery by MgO modified biochar from livestock wastewater.

Fig. 4
figure 4

Kinetic data fitted to pseudo-first and second order model (a) and inner particle diffusion model (b); P adsorptive recovery isotherm data fitted to the Langmuir, Freundlich, and Langmuir-Freundlich isotherm models (c); results of the removal efficacy of P by Mg-BC and Mg-PBC and desorption rate of sorbed P over three sorption-desorption cycles (d) ((Reaction condition: 0.05 g absorbent, 25 mL 100 mg•L−1 P solution; desorption solution: 100 mL 1 mol•L−1 NaOH)

Table 2 Obtained parameters of P adsorptive recovery kinetics model and isotherm models

In order to further simulate the recovery process, the inter-particle diffusion model was also used to fit the experimental data. The well-fitting results (R2 > 0.9) showed that the P recovery process of both biochars from wastewater was not a simple surface chemisorption process but a multiple process. Both biochars underwent the fast and slow P adsorptive recovery process (Fig. 4b), but neither of the fitted lines passed through the origin, which meant that inner diffusion was not the only rate control step (Li et al. 2017). The slope of the first stage for Mg-PBC (1.751) was significantly higher than that for Mg-BC (1.246), which confirmed the results of the pseudo-second-order model, and indicated that pre-puffing could greatly shorten the adsorptive recovery equilibrium time (Huang et al. 2018). As shown in Fig. 4c, the sharp increase of P adsorption amount at lower concentrations was due to the sufficient reaction sites on the adsorbent, and the P adsorption amount gradual saturation at higher concentrations was because of the consumption of reaction sites (Zhang et al. 2022a, b). The Langmuir–Freundlich model was more suitable for the description of P recovery process than both the Langmuir model and the Freundlich model alone, indicating that the adsorbent surface was homogeneous and the adsorptive recovery was not a single process (Azizian and Eris 2021). The fitted maximum P recovery capacity of Mg-PBC was 241.0 mg g−1, which was more than twice of that of the Mg-BC (96.6 mgg−1). This clearly indicates that puffing treatment significantly increased the availability of active sites on biochar, resulting in higher P removal from the wastewater (Table 2).

Furthermore, the P removal efficiencies of Mg-BC and Mg-PBC decreased from 48.77% and 99.76% to 0% and 41.50%, respectively, after three cycles (Fig. 4d). Although the P removal efficiency decreased, Mg-PBC still showed a P recovery performance of 21.52 mg g−1 after three cycles, which meant that it could be regenerated to some extent, while Mg-BC showed no P adsorptive recovery ability after three cycles. These results indicated that pre-puffing treatment not only increased the P recovery performance but also improved the recycling efficiency of biochar. These results also support that biomass pre-puffing treatment probably changes the P recovery mechanism of MgO doped biochars.

3.3 Dynamic phosphorous recovery capability

Dynamic P adsorptive recovery experiments allow adsorbents to be tested in the laboratory to assess their industrial application potential with experimental data fitting by dynamic models. The results of P adsorptive recovery breakthrough curves (Fig. 5) and the estimated parameters (Table 3) indicated that the two breakthrough curves were Sigmoidal and can be well fitted by the Thomas and Yoon-Nelson models (R2 > 0.8). The P adsorptive recovery capacity of Mg-PBC fitted by the Thomas model was 90.73 mg g−1, which was 4 times more than that of the Mg-BC (22.89 mg g−1). The τ value (9934 min) of Mg-PBC obtained by the Yoon-Nelson model was about 2 times that of Mg-BC (4535 min), which meant that Mg-PBC can be a more effective adsorbent to treat larger amounts of livestock wastewater than Mg-BC under the same conditions. These results demonstrated that the biochar composite with pre-puffing treatment had a more promising potential to be applied in the field than that without pre-puffing.

Fig. 5
figure 5

Dynamic adsorption data fitted to the Thomas and Yoon-Nelson model

Table 3 Predicted parameters of column P adsorptive recovery models

3.4 Adsorption mechanism

In aqueous systems, the protonation of ≡MgO on the surface of Mg-BC and Mg-PBC biochar resulted in the formation of ≡MgOH+, indicating the electrostatic interaction possibly happened during the negative phosphate ion adsorptive recovery process. The P adsorptive recovery kinetic study showed that the P recovery was a multiple step process. The regeneration efficiencies of the P loaded biochar were relatively low, implying the strong interaction between phosphate ions and MgO during the P adsorptive recovery process. In addition, compared to the SEM images of the pristine Mg-BC (Fig. 2e) and Mg-PBC (Fig. 2f), after P adsorptive recovery, the surfaces of both biochars were covered by newly formed particles (Fig. 6a, b), indicating precipitation between MgO and P species probably occurred. The surface of Mg-PBC was more reactive than that of Mg-BC, which demonstrated that pre-puffing promoted the dispersion and availability of MgO particles in the biochar composites.

Fig. 6
figure 6

SEM images of Mg-BC (a) and Mg-PBC (b) after P adsorptive recovery; X-ray diffraction patterns (c), FTIR spectrum (d) and the XPS spectrum (e, f) of Mg-BC and Mg-PBC before and after P adsorptive recovery

To identify the newly formed minerals on the P saturated adsorbents, the Mg-BC and Mg-PBC samples before and after adsorption were tested by XRD analysis (Fig. 6c). Two wide diffraction peaks at 25º and 43º for BC and PBC were observed in Fig. S2a, which are the diffraction peaks of graphite structure from biochar. After MgCl2 impregnation, Mg-BC and Mg-PBC had similar XRD patterns, and sharp diffraction peaks appeared at 2 theta of 36.9º (111), 42.9º (200), 62.3º (220), 74.7º (311), and 78.6º (222), implying the formation of MgO (JCPDS No.71–1176). After adsorption of P from the livestock wastewater, the diffraction peaks of Mg-BC were weakened dramatically but without peak position change, suggesting it was still in the MgO crystal phase. This might be caused by the large amount of amorphous precipitates that were deposited on the surface of Mg-BC (Fig. 6). The MgO diffraction peaks of Mg-PBC completely disappeared after P adsorptive recovery and several new sharp diffraction peaks appeared. These peaks centered at 2 theta of 18.6º, 32.8º, 37.9º, 50.8º, 58.6º, 62.0º, 68.2º, 72.0º, and 81.2º and corresponded to the crystal planes of (001), (100), (011), (012), (012), (110), (111), (103), (201) and (004) in Mg(OH)2 crystal (JCPDS No.83–0114), respectively. The results indicated the occurrences of ≡MgO + 2 H2O ⟶ ≡Mg(OH)2 + 2 OH and ≡Mg(OH)2 ⟶ ≡MgOH+  + OH reactions in the experimental condition (Li et al. 2017). This suggested that intense electrostatic attraction might occur between ≡MgOH+ on the surface of Mg-PBC and phosphate ions.

Results of the FT-IR analysis for the pristine Mg-BC and Mg-PBC are shown in Fig. 6d. The peaks in the range of 400–800 cm−1 were designated as the stretching vibrations of the metal-O band, which shifted or disappeared after P adsorption, indicating that the phosphorous ions combined to the active sites of MgO (Li et al. 2017). After P adsorptive recovery, a sharp peak of metal-OH group appeared at 3710 cm–1 (** and Li 2009), indicating the protonation of MgO particles on the surface of Mg-PBC, which was consistent with the results of XRD and XPS analysis. For example, the XPS analysis indicated that P 2p peak and corresponding HPO42–/PO43– were detectable after Mg-BC and Mg-PBC adsorbed P from the livestock wastewater (Fig. S2b). This demonstrated that phosphate ions were bonded to the active sites on the surface of MgO doped biochar composites and caused the slight shift of binding energy of MgO shown in the Mg 1 s spectrum (Fig. 6e, f). The presence of HPO42–/PO43– on the surface of P-loaded biochar suggested that complexation also played a vital role in the P recovery process. The peak strength of Mg-HPO4/PO43– in Mg-PBC was much higher than that in Mg-BC, indicating that more MgO active sites on Mg-PBC interacted with P through complexation. The peaks of O1s of Mg-BC and Mg-PBC before and after P adsorptive recovery was identified (Fig. S2c, d) and the peaks of -OH and O-M groups shifted slightly while the ratio of hydroxyl oxygen to lattice oxygen decreased significantly. This demonstrated that HPO42– was bound to MgO by inner surface complexes (Wang et al. 2020). Based on these results, the P adsorption mechanisms could be hypothetically illustrated (Fig. 7). It can be deduced that the mechanisms of P adsorptive recovery by MgO doped biochars were controlled by precipitation, electrostatic interaction, and the formation of inner surface complexes processes. Compared to the raw mildewed corn grains, the pre-puffing treatment destroyed the epidermis of corn kernels, which allowed the MgCl2 salt to easily enter the biomass matrix, thus promoting the dispersion of MgO particles in biochar, which changed the contribution of different mechanisms on P adsorptive recovery. For Mg-BC, precipitation is more important than electrostatic interaction and surface complexation, while it is the opposite for Mg-PBC, indicating a more stable adsorption of P onto Mg-PBC.

Fig. 7
figure 7

Mechanism diagram of MgCl2 impregnation promotion by pre-puffing and P adsorption on MgO biochar

3.5 Assessing the release and availability of P inthe biochar treated soil

Addition of Mg-BC-P, Mg-PBC-P, and P fertilizer to the soil significantly increased the available P content, while addition of BC, Mg-BC, Mg-PBC, and BC-P to the soil did not cause a significant change in the available P content, as compared to the control, during the experimental time (Fig. 8a). The initial content of available P in the soil was 0.02 g kg−1 and increased to 0.06, 0.25, and 0.36 g kg−1 after the addition of Mg-BC-P, Mg-PBC-P and P fertilizer, respectively, showing higher available P contents in these treatments than the control and BC, Mg-BC, Mg-PBC, and BC-P treatments (Fig. 8a). The high input of P to the Mg-PBC-P treated soil can be explained by its high sorption capacity for P (241 mg g−1; see Sect. 3.2). The available P content in the P fertilizer treated soil was high in the beginning of the experiment (0.36 g kg−1); then, decreased with time down to 0.20 g kg−1 in the end of the experiment. On the other side, the available P content in the Mg-PBC-P treated soil was low in the beginning of the experiment (0.25 g kg−1); then increased with time up to0.32 g kg−1 in the end of the experiment (Fig. 8a). The continuous decrease of available P content with time in the P fertilizer treatment may indicate a fast release of P in the soil, while the increase of available P content in the Mg-PBC-P treatment with time may imply a slow release of P during the growing season. These results suggested that Mg-BC-P and Mg-PBC-P, the later particularly, can be used as a slow-release P fertilizer. These results were confirmed by the repose of the plant growth (Fig. 8b; Fig S3). Addition of Mg-BC-P and Mg-PBC-P promoted the plant length and fresh weight as compared to the control and other treatments, which indicated that the Mg-BC-P and Mg-PBC-P could be used as slow-release P fertilizers in soil. The potentiality of using P-loaded biochar as P fertilizer has been reported in some other studies (e.g. Gao et al. 2013; Li et al. 2016; and An et al. 2021).

Fig. 8
figure 8

Changes of available P content (a) and plant growth (b) in the soil treated with the studied biochar before (BC, Mg-BC, Mg-PBC) and after (BC-P, Mg-BC-P, Mg-PBC-P) P adsorption and a commercial P fertilizer

3.6 Cost–benefit analysis

3.6.1 Cost analysis

The satisfactory P recovery ability of MgO doped biochar derived from mildewed grain with pre-puffing has the potential to be applied at an industrial scale. Nevertheless, the applicability is hinged on its satisfactory cost–benefit analysis. The process of collecting, puffing, and drying of raw material did not cost much, but the cost of impregnation occupied most of the total cost of preparation, so it is particularly important to improve the impregnation effect and utilization efficiency. The benefits of the pre-puffing treatment (i.e., improving the impregnation effect, high chemical utilization efficiency, and P recovery capacity) indicates that the pre-puffing treatment increased the efficiency of MgO doped biochar engineered composite preparation. The cost of each step for preparing the adsorbent and the effect of applying MgO doped biochar into livestock wastewater are summarized in Table 4. The total costs (TC) for preparation of Mg-BC and Mg-PBC were 44.8 and 45.3 CNY per kilogram of adsorbent, respectively, which is much lower than the preparation cost of P adsorbent materials modified by lanthanum (208 USD per kilogram) and cesium (4965 USD per kilogram) (Li et al. 2020a, b).

Table 4 Costs and benefits of per kg of Mg-BC and Mg-PBC in engineering use

3.6.2 Benefit analysis

Due to the weak desorption of P loaded biochar after P recovery, it was considered as a slow-release fertilizer (Bacelo et al. 2020). Based on the P recovery capacities of Mg-BC (96.59 mg g−1) and Mg-PBC (241.0 mg g−1), the P content of the two P-saturated adsorbents calculated by Eq. (10) was 8.81% and 19.42%, respectively. The price of the P recovered biochar (PBF) estimated by Eq. (11) was approximately 40.00 CNY kg−1 (Mg-BC-P) and 88.19 CNY kg−1 (Mg-PBC-P), and thus, the net profit (NP) was 40.00 CNY kg−1 (Mg-BC-P) and 88.19 CNY kg−1 (Mg-PBC-P). The total benefit was -4.77 CNY (-5.51US$)kg−1 (Mg-BC-P) and 42.87 CNY (5.90 US$)kg−1 (Mg-PBC-P) according to Eq. (12). Based on the analysis, the TP of Mg-PBC (42.87 CNY kg−1) was evidently higher than that of Mg-BC (-4.77 CNY kg−1), thus, the pre-puffing treatment is a promising method for synthesis of a cost-effective metal-biochar composite for the recovery of P from livestock waste water.

4 Conclusions

MgO doped biochar with (Mg-PBC) and without (Mg-BC) pre-puffing treatment was used for P recovery from livestock wastewater. Based on the findings, we can conclude that the thermal puffing increased the porosity of the modified biochar, improved the MgCl2 soaking efficiency, and produced biochar with uniform MgO particle dispersion and high density of active sites. The Mg-PBC showed significantly higher P recovery capacity (241 mg g−1) than Mg-BC (96.6 mg g−1). Adsorption of P using the MgO doped biochar was governed by precipitation, complexation, and electrostatic attraction processes. Increasing the available P content with time and promoting the plant growth in the P loaded Mg-modified biochar (Mg-BC-P and Mg-PBC-P, the later particularly)-treated soil more than the control, raw biochar, and inorganic P fertilizer treatments confirm that the P-loaded Mg-PBC can be used as a slow-release P fertilizer. In addition, the MgO doped biochar with pre-puffing treatment had a satisfactory economic benefit. Biomass pre-puffing treatment integrated with the MgCl2 soaking and pyrolysis method provided a promising MgO doped engineered biochar composite, which has great potential for the large-scale production of engineered biochar and economically feasible adsorptive recovery of P from livestock wastewater. These results are important for the understanding of the feasibility of Mg-PBC for amelioration of P-contaminated water, and also are highly relevant for sustainable management and conservation of bioresources.