1 Introduction

Textile industry is one of the largest consumers of water and produce a huge amount of wastewater having textile dyes and auxiliary chemicals [1, 2]. A large quantity of chemicals such as dyes, surfactants, biocides, minerals, heavy metal ions, electrolytes, detergents, solvents, and recalcitrant chemicals are used for dyeing and finishing processes [3]. According to an estimate, 5–50% of these dyes, depending upon the nature of the process, are discharged into aquatic environment without any proper treatment. Approximately 280,000 tons of dyes are annually discharged into wastewater effluents [4]. These dyes have complex aromatic structures, where the presence of azo chromophores (-N=N-) and/or phthalocyanine chromophores makes them carcinogenic. They are strong oxidizing agents and non-biodegradable in nature. The removal of these dyes is essential because they pose acute problems to the ecological system [5]. Among the textile dyes, methylene blue (MB) is used in dyeing cottons, wools and textile products, paper coloring, and temporary hair colorant, due to its deep blue appearance [6, 7]. MB can cause some lethal threats to health like eye burning, hypertension, fever, high heart rates, mental disorder, vomiting, jaundice, cyanosis, and tissue necrosis in humans [8, 9]. Therefore, to avoid the health risk, it is necessary to remove MB from the textile wastewater.

Biosorption, flocculation, floatation, ozonation, ion exchange, advanced oxidation, sonolysis, photocatalysis, electrochemical oxidation, membrane separation technology, anaerobic digestion, and aerobic processes are several technologies used to treat textile wastewater [10,11,12]. Among these, biosorption using adsorbents has been found to be versatile and widely used technique due to its simplicity, ease of implementation, economic feasibility, high removal efficiency, and environmentally friendly for the remediation of textile dye-laden wastewater [13]. Many adsorbents such as metal organic frames (MOFs), zeolites, activated carbon, and their composites have been used for the adsorption of dyes due to their high level of effectiveness [14,15,16,17]. These adsorbents are expensive, exhibit poor reusability, and have high operational cost [18, 19]. In addition, biochar (BC), derived from biomass such as organic waste, woody materials, crops and algae, provides an inexpensive and carbon-rich alternative to expensive adsorbent like activated carbon [20,21,22]. The raw macroalgae biomass as waste material is obtained from open ponds and streams, and easily available at very low cost. Presence of functional groups (-OH, -COOH, C-O or C=O) in macroalgae-based BC [23] work as binding sites to adsorb dyes [24]. BC has high porous structure-hollow network, and offers large specific surface area, which makes it suitable to remove dye molecules from the textile wastewater [25, 26]. Unfortunately, the studies on real textile wastewater (RTWW) using conventional adsorbents are scarce. RTWW contains several dyes, salts of sulphates, chlorides and nitrates, phenolic, cyclic compounds, and other unidentified chemical species. These species affect the biosorption capacities of adsorbents to the removal of specific dyes from RTWW [27]. However, limited number of studies of macroalgae-based BC have been reported for biosorption in RTWW. The focus of this study is to compare and replace macroalgae-based BC as an efficient and inexpensive adsorbent to remove MB dye from RTWW as compared to widely used coal-based biochar or activated carbon [28].

In this study, low-cost raw macroalgae-based BC are evaluated for their biosorption kinetics and process thermodynamics. To remove MB, a comparative study is carried out using macroalgae-based BC and coal-based BC (control) as adsorbents. Both adsorbents are used to remove MB dye from simulated wastewater as well as RTWW. The effects of pH, initial dye concentration, contact time, adsorbent dosage, particle size, and temperature on dye removal efficiency are investigated. The equilibrium and kinetic data of the process is used to understand the biosorption of MB molecules on BCs. BCs regeneration is also investigated to assess its economic sustainability.

2 Materials and methods

2.1 Pretreatment, preparation, and characterization of macroalgae and coal-based biochars

Macroalgae culture as a feedstock of BC was collected from wastewater stream located at Bhoptian, Lahore, Pakistan. The collected macroalgae was rinsed several times with ultrapure water (Water Purification System, Adrona SIA-B30, Latvia) to remove solids and impurities, and then, it was dried at 80 ± 1 °C in an oven (Biobase, China) for 24 h. After drying, macroalgae was ground using lab scale grinder and sieved from 120 US standard mesh to obtain average particle size smaller than 125 μm. Afterwards, simple dry macroalgae (SM; −ve control) was stored in air tight falcon tubes for advance physical and chemical treatment. Similarly, coal as a feedstock of BC (−ve control) was obtained from the surrounding area of Thar, Sindh, Pakistan for the comparative study. The obtained coal was ground by using disc mill (Assuza Incorporation, Pakistan), sieved from US standard meshes to achieve different particle sizes smaller than 125, 150, and 212 μm. The ground samples were dried in an oven at 80 ± 1 °C before storing it in airtight falcon tubes at room temperature.

BCs were prepared from feedstock’s such as macroalgae and coal through pyrolysis [29]. In brief, 50.0 g of feedstock was placed in crucible and pyrolized at different temperatures of 450, 550, and 650 °C for 2 h in a Muffle furnace (2.5 kW, Microtech digital, Sentron Asia International, Pakistan). The average yield of final product, i.e., BC obtained was found in the range of 68 ± 2 to 74 ± 2% at different pyrolysis temperatures (Table 1). N2 gas was purged at the rate of 2500 mL min−1 to remove the pyrolytic vapors [23] and heating rate was maintained at 20 °C min−1 during pyrolysis [30]. BCs were allowed to cool down at ambient temperature, then stored in airtight tubes for further use in experiments. Based on pyrolysis temperature, macroalgae and coal-based biochars (+ve control) were designated as MBC450, MBC550, MBC650, CBC450, CBC550 and CBC650, respectively. Figure 1 presents the graphical mapping for preparation of macroalgae and coal-based biochars. On the basis of stated process and parameters, biochar preparation cost is calculated to be approximately 0.018$/gram with the yield of 68% at 650 °C as compared to commercially available activated carbon 0.11$/gram (Sigma Aldrich) with same particle size.

Table 1 Ultimate and proximate analysis of macroalgae and coal-based biochars
Fig. 1
figure 1

Graphical mapping for preparation of macroalgae and coal-based biochars from natural resources

BCs were characterized according to the procedures described in literature [23]. The specific surface area and pore size were measured with the surface area and pore size analyzer at 77 K by N2 adsorption/desorption isotherms, and interpreted using Brunauer-Emmett-Teller (BET) method. Scanning electron micrographs were scanned using scanning electron microscope (SEM, TESCAN Vega LMU) at 15 kV voltage to obtain visual information about the surface morphology of pre and post-biochars. The crystallographic pattern of pre and post BCs was carried out by X-ray diffraction (XRD, Panalytical X’pert pro). Fourier-transform infrared (FTIR) spectroscopy was performed to identify the functional group sites on BCs by FTIR spectrometer (Thermo-Nicolet 6700) using the KBr disk technique [31]. Some other characteristics of raw macroalgae and coal feedstocks and their biochar were measured according to the reported literature [32] such as ultimate analysis (wt.%), proximate analysis (wt.%), and biochar yield (%), as listed in Table 1.

2.2 Kinetics and biosorption evaluation of macroalgae and coal-based biochars

Biosorption studies of MB were carried out to examine the effects of pH, initial dye concentration, contact time, biosorbent dosage, and at different temperature with macroalgae, and coal-based biochars, extracted from natural resources. MB (99.9%, Sigma Aldrich, India) was used as one of the dye pollutants without any further purification. A stock solution of MB simulated wastewater (1000 mg L−1) was prepared by dissolving 1000 mg MB in 1.0 L of ultrapure water. The desired concentrations were diluted according to the stock solution concentration by adding ultrapure water. The concentration was determined at λmax = 664 nm [33] using UV Spectrophotometer (Biobase, BK-UV1900 PC China). The experimental parameters were varied to examine biosorption isotherms and kinetics [34], such as pH (2–10), contact time (1–240 min), BCs dosage (0.2–1 g), initial dye concentration of MB (10–1000 mg L−1), BCs particle size (120–212 μm), and temperature (30–50 °C). The pH of solution was adjusted to desired level using 0.1 M solutions of NaOH and HCl. The pH of dye solution was measured using pH meter (Adwa, AD111, Romania).

In each experiment, 100 ml of known concentrations of solution was taken in a 250-ml conical flask (Pyrex) and mixed with 0.2 g of BCs at 30 ± 0.5 °C, and the mixture was stirred gently in an isothermal shaking incubator (Jeio Tech, ISS-3075, S Korea) at 140 rpm to achieve equilibrium between biosorbent and MB. Samples were withdrawn after preset time intervals (5, 10, 15, 30, 60, 90, 120, 180, and 240 min). After each biosorption run, biosorbent was separated from the supernatant by centrifuge (Centurion Scientific, Pro Research K241, UK) at 5000 rpm for 5 min [35]. The pre- and post treatment supernatant solution absorbance was determined to investigate the endured concentration of MB with UV spectrophotometer. All experiments were performed in duplicate and uncertainty of values (P-value < 0.05) measured according to the t test, as seen in supplementary data Table S1.

The biosorption capacity of BCs at equilibrium qe (mg g−1) was determined by Eq. 1 [36]. The dye removal (%) was measured using Eq. 2 [37]:

$$ \mathrm{qe}=\frac{\left(\mathrm{Co}\hbox{--} \mathrm{Ce}\right)\mathrm{V}}{\mathrm{W}} $$
(1)
$$ \mathrm{Dye}\ \mathrm{Removal}\ \left(\%\right)\kern0.5em =\left(\frac{\left(\mathrm{Co}\hbox{--} \mathrm{Cf}\right)}{\mathrm{Co}}\right)\times 100 $$
(2)

Where, Co, Cf and Ce (mg L−1) are initial, final and equilibrium concentrations, respectively. V is the volume of solution (L) and W is the mass of biochar (g).

To investigate the rate limiting step of biosorption kinetics, experiments was performed at 100 mg L−1concentration of MB for 24 h. The capacity at any time, qt (mg g−1), was calculated using the following Eq. 3 [38]. Where, Ct (mg L−1) is the final concentration at any time t.

$$ \mathrm{qt}=\frac{\left(\mathrm{Co}\hbox{--} \mathrm{Ct}\right)\mathrm{V}}{\mathrm{W}} $$
(3)

Biosorption isotherms describe the interaction among the MB and biochars of any system. The equilibrium concentration is the most important to investigate the biosorption process [39]. The experimental data of biosorption capacity of MB on macroalgae-based biochars such as MBC450, MBC550, MBC650, and coal-based biochars such as CBC450, CBC550, and CBC650 were evaluated and compared using the most common biosorption isotherm models like Langmuir and Freundlich presented in Eq. 4 and Eq. 5 [40].

$$ {C}_e/{q}_e={C}_e/{q}_{\mathrm{max}}+1/{q}_{\mathrm{max}}{K}_L $$
(4)
$$ Log\ {q}_e= Log\ {K}_F+ Log\ {C}_e/n $$
(5)

Where qmax (mg g−1), Ce and KL (L mg−1) are the maximum biosorption capacity, equilibrium dye concentration and Langmuir constant, respectively. KF (L mg−1) is a Freundlich constant and nF is a heterogeneity factor.

The Langmuir isotherm parameters can be used to investigate the attraction between MB and biochars using Eq. 6 for the separation factor or dimensionless equilibrium parameter (RL) [41].

$$ {R}_L=\frac{1}{\kern1.75em 1+{K}_L{C}_o\ } $$
(6)

The value of RL can suggest the nature of biosorption, where Co is the initial concentration and KL is the Langmuir constant.

To describe the biosorption, kinetics models by pseudo-first-order, pseudo-second-order, and intra-particle diffusion were analyzed using Eqs. 7, 8, and 9, respectively [42].

$$ Ln\ \left({q}_e-{q}_t\right)= Ln\ {q}_e\hbox{--} {K}_1\times t\kern0.5em $$
(7)
$$ \frac{t}{q_t}=\frac{1}{K_2\times {q_e}^2}\kern0.5em +\frac{t}{q_e} $$
(8)
$$ {q}_t={K}_{pi}{t}^{1/2}+{C}_i $$
(9)

Where, t is the contact time (min), qe and qt are the biosorption capacity (mg g−1) at equilibrium and at time t (min), respectively. K1 (min−1), K2 (g mg−1 min−1) and Kpi (mg g−1 min1/2) are the pseudo first-order, pseudo second-order, and intra-particle diffusion rate constant, respectively. Ci is the boundary layer thickness.

2.3 Determination of point of zero charge for macroalgae and coal-based biochars

For the investigation of biosorption mechanism, the point of zero charge of the biosorbent needs to be determined. The pH at point of zero charge (pHpzc) of biosorbent was determined using pH drift method as reported in the literature [43]. pH of solution was varied (2 to 11) by the stepwise addition of 0.1 M HCl/NaOH solutions. In this study, pHpzc of macroalgae and coal-based biochar were found to be 9.0 and 7.5, respectively as shown in Fig. 2.

Fig. 2
figure 2

Point of zero charge for macroalgae and coal

3 Results and discussion

3.1 Characterizations of macroalgae and coal-based biochars

The pore size and surface area distribution were determined using BET. BET results showed that MBC650 and CBC650 have largest surface area 56.05 and 54.92 m2 g−1, respectively as compared to other prepared BCs on different pyrolysis temperatures. Surface area of prepare BCs is increased with the change of pyrolysis temperature as shown in Fig. 3a. Surface area of both these adsorbents is significantly higher than 1.5 m2 g−1, 8.2 m2 g−1, 9.2 m2 g−1, and 21.7 m2 g−1 surface areas of the biochars synthesized from rice husk and reported by Leng et al. [44]. Leng et al. reported the removal of Malachite Green dye using rice husk biochar. Hence, MBC650 and CBC650 used in this study showed significantly higher surface area and should be able to remove methylene blue more efficiently from the textile wastewater. Biochar yield for macroalgae and coal-based biochar is obtained about 68–74% and 72–80% at different pyrolysis temperatures, respectively, as listed in Table 1. The elemental analysis of prepared biochars and their feedstock showed that carbon contents is increased with the pyrolysis conditions and found in the range of reported values for algal biochar (30–70%) [45,46,47,48] and coal biochar (53–84%) [49, 50].

Fig. 3
figure 3figure 3

a Pore size distribution and surface area of macroalgae and coal-based biochars, b SEM, c XRD, and d FTIR analysis of macroalgae and coal-based biochars

The morphology of biochars was examined using SEM. SEM images showed that structure of BCs was clearly porous in Fig. 3b. The rough surface with wrinkles showed that BCs underwent physical changes on pyrolysis. These porous or heterogeneous surfaces may be useful for the biosorption of dyes from the aqueous solution [29]. XRD pattern indicated that BCs have the carbon in crystalline and amorphous forms, seen in Fig. 3c. XRD pattern of BC shows peaks of various mineral phases. The peak appearing at 2θ values of 20° and 22.9° indicates the presence of calcite-magnesia, in the synthesized BC. The peaks appearing around 29.3°, 36°, and 39°are associated to well-known presence of calcite contents. Whereas an intensified peak located at 26.9° and a small peak around 43° corresponds to the (002) plane of crystalline carbon, indicating the appearance of graphite like structures [51].

FTIR spectra of macroalgae before and after preparation of biochar are shown in Fig. 3d. The methyl C-H stretching and carbonyl C=O stretching vibration appeared near 2925 cm−1 and 1630 cm−1 in SM. The location of bending C-H deformation vibrations between 1410 and 1450 cm−1 indicated the presence of alkanes. Peaks of bending vibration of C-N groups at 1028 cm−1 provided additional evidence that this band was important for the detection of methyl groups in a given compound [52]. The band between 680 and 875 cm−1 was characterized of aromatic C-H bending [53]. Peaks of bending C-H and C-N indicated the presence of alkane and methyl groups. After preparation of BCs, peaks of group C=O and C-H stretching did not exist in the MBC650 spectra. The absence of such peaks reflected the reduction in surface functional groups with the increase of pyrolysis temperature. The spectra of coal before and after pyrolysis are also shown in Fig. 3. The carbonyl C=O peak appeared at 2920 cm−1. Peak at 1590 cm−1 described the peaks of aromatic C=C stretching [54]. The non-existence peaks of aromatic C-H bending of coal biochar (CBC650) at 911 and 742 cm−1 also indicated the reduction of surface functional groups with the pyrolysis temperature.

BET results showed that MBC650 and CBC650 have largest surface area 56.05 and 54.92 m2 g−1. Surface area of both these adsorbents is significantly higher than 1.5 m2 g−1, 8.2 m2 g−1, 9.2 m2 g−1, and 21.7 m2 g−1 surface areas of the biochars synthesized from rice husk and reported by Leng et al. [44]. Leng et al. reported the removal of Malachite Green dye using rice husk biochar. Hence, MBC650 and CBC650 used in this study showed significantly higher surface area and should be able to remove methylene blue more efficiently from the textile wastewater. Similarly, XRD and SEM of MBC650 and CBC650 showed the porous and crystalline structure respectively, again making these compounds efficient adsorbents.

3.2 Dye removal performance of parameters with macroalgae and coal-based biochars

pH is one of the decisive factor of biosorption process because it regulates the degree of ionization in the solution with the interaction of dye molecules and surface charge of biochar [54]. In this study, biosorption of MB textile wastewater was studied over a range of pH 2–10 for 100 mg L−1 MB using 0.2 g biochar. The biosorption capacities (qe) of MBCs (such as MBC450, MBC550, and MBC650) were slightly increased from 40.5 to 47.7 mg g−1 in comparison to SM (37.7 mg g−1 to 42.6 mg g−1) when pH was increased from 2 to 9 as shown in Fig. 4a. The biosorption capacity increased with the increase in pH of solution. The biosorption capacity was increased due to the lower electrostatic repulsion forces between biosorbent and MB molecules, and less competition between H+ ions and MB molecules for adsorption surface sites. The lowest removal (75.4%) of MB was measured at pH 2 for SM, and it gradually improved up to 85.3% when pH reached to 9. MBC650 showed highest dye removal of MB around 87.5% among other MBCs (81% for MBC450 and 83.4% for MBC550) at pH 2 and reached 95.3% at pH 9. MBC650 adsorbed slightly high MB dye to 95.3% at equilibrium stage as compared to other prepared biochars (MBC550 93.3% and MBC450 91%) and SM 85.3% at pH 9 in this study. Because large BET surface area of MBC650 provided more accessible adsorption sites for the removal of MB than SM, MBC450, and MBC550, as seen in Fig. 3a. Similarly, CBC650 also reached at highest dye removal (95.8%) as compared to other CBCs (CBC450 = 92.2%, CBC550 = 94.4%, and coal = 90%) at pH 7 as shown in Fig. 4b. The pHpzc of macroalgae (9.0) and coal (7.5) indicated that surface charge of MBCs or CBCs below pH 9.0 or 7.5 (pH < pHpzc) is positive and refers to a more acidic medium. In acidic pH medium, dye removal was decreased because of functional group of BCs surface sites get protonated and repel MB cations. In basic pH medium, surface charge of BCs was found to be negatively charge (pH > pHpzc) that produced electrostatic attractive forces between MB molecules and BCs surface and raised the dye removal of MB. Previous studies showed the similar results to remove Congo red by algae-based biochar [35].

Fig. 4
figure 4figure 4

Biosorption capacity and MB removal efficiency with macroalgae and coal-based biochars under different pH (a) and (b); contact time (c) and (d); dosage of biochar (e) and (f) initial dye concentrations of MB (g) and (h); biosorption isotherm (i)

The effectiveness of the biochars can be identified by fast dye uptake and rapid achievement of equilibrium [55]. MBC650 (48 mg g−1) and CBC650 (49.6 mg g−1) showed the highest biosorption capacities at time (120 min) as compared to SM (41 mg g−1) and coal (47.4 mg g−1) in similar time as shown in Fig. 4c. The biosorption capacities was not changed significantly after that time. MB removal was 90.2% and 96.9% in the first 10 min for MBC650 and CBC650 respectively, which was comparatively slow for SM (74.1%) and coal (92.7%). The results indicated that dye removal reached at equilibrium in 30 min for MBC650 as compared to SM time (120 min) and in 15 min for CBC650 as compared to coal (90 min). In early stages, large surface area of these BCs provided more accessible adsorption active sites, which speed up the removal of MB on the BC surfaces and reached at equilibrium. The dye removal rate was started to decrease over time as a function of decreasing adsorption surface sites [56]. The dye removal was decreased due to the occupation of sites by the dye molecules, which led to reduce the porosity or pore volume of adsorbents. MBC650 (98.4%) and CBC650 (99.3%) reached the maximum MB removal among the other BCs and equilibrium established, (Fig. 4d). Afterwards, MB removal was not significantly change with time. Similar results have been reported for the uptake of methyl orange by using groundnut shell-based biochar [55].

Biosorption of MB was investigated as a function of biochar dosage. The dye removal of MB increased with an increase in biochar dosage as shown in Fig. 4f. It increased due to an increase in adsorption active-sites and their total surface area with the addition of more biochar dosage [57]. The maximum biosorption capacities were 48.5 mg g−1 and 49.2 mg g−1 for MBC650 and CBC650, respectively at 0.2 g biochar dosage for 100 mg L−1 MB. Then, biosorption capacities decreased on unit mass of biochar with the increase of BCs dosage. Figure 4e indicates that biochar sites remain unsaturated during the biosorption and/or the number of sites present for biosorption increased by an increase in biochar dosage. MBC650 and CBC650 exhibited a quick rise in biosorption capacity for MB, which is caused by concentration gradient between the MB ions and surface sites of biochars. Similar behavior was also observed in the removal of MB by pulp and paper sludge biochar [58].

The initial dye concentration has profound effect on biosorption due to maintained balance of mass transfer resistance of dye molecules to the biochars [59]. The initial concentrations of MB (10, 20, 40, 60, 80, 100, 250, 500, 750, and 1000 mg L−1) were studied using 0.2 g biochar. MBC650 (238 mg g−1) and CBC650 (248 mg g−1) showed the maximum biosorption capacity at equilibrium as compared to all BCs as shown in Fig. 4g. The biosorption capacities of all BCs were increased when high initial concentrations of MB were tested. The relationship between dye concentration and biosorption capacity depends on the available surface. In case of low initial dye concentration, all of dye molecules adsorb to surface (means increase in biosorption capacities) till equilibrium appears. But, when initial dye concentration increases still all surfaces adsorb dyes, but some dye molecules remain unadsorbed due to unavailability of adsorption sites [60]. Figure 4h shows the highest dye removal for MBC650 and CBC650 around 95.5 and 96.5%, respectively. Afterwards, dye removal was decreased with the increase of initial dye concentration due to the lack of biosorption sites. Therefore, dye removal showed increasing trend and later decreasing trend with the increase of initial dye concentration. The equilibrium isotherm for all BCs was also indicated that MBC650 and CBC650 have the maximum capacities to remove MB molecules from aqueous solution as shown in Fig. 4i. Similar trend was reported in previous study of MB adsorption on solid pine cone biochar [13].

Biosorption capacity can also be investigated as a function of particle size of biosorbent. Different particles size of coal (< 120, < 150, and < 212 μm) were analyzed as compared to macroalgae (< 120 μm), which was not ground further to compare the minimum particle size. The MB removal increased (96%) with the decrease of particle size (< 120 μm) of coal as shown in Fig. 5a. Smaller particle size has a large surface area to volume ratio than large particles and therefore adsorb more pollutant molecules through the initial stages of process [61]. The coal-based biochar showed high dye removal efficiency in comparison to macroalgae having same size of 120 μm, suggesting that coal-based biochar has more sites than macroalgae-based biochar.

Fig. 5
figure 5

a MB removal efficiency for different particle size of macroalgae and coal, and b biosorption capacity for all adsorbents on different temperatures (30–50 °C)

Biosorption of BCs was also investigated at different temperatures (30–50 °C). All parameters were kept constant such as pH = 9 for MBCs and pH = 7 for CBCs, 100 ml of 100 mg L−1 of MB, 0.2 g BCs dosage and contact time 0–240 min. The biosorption capacities were slightly increased with the increase of temperature from 48.7 to 49.7 mg g−1 for MBC650, and 48.2 to 49.8 mg g−1 for CBC650, as seen in Fig. 5b. Biosorption capacity was increased might be due to an increase in mobility of MB molecules at high temperatures. This increase may be due to the possibility of increase in active sites of BCs with the increase of temperature. The results showed that MB biosorption is endothermic process. Saif et al. also reported similar trend of process during the adsorption of cationic brilliant green on anionic red clay at 25–45 °C [62].

3.3 Biosorption isotherms and kinetics for macroalgae and coal-based biochars

The interaction between dye and biochars was investigated by varying MB concentration from 10 to 1000 mg L−1 at the initial pH of 9.0 and 7.5 with 0.2 g dosage for macroalgae and coal-based biochars, respectively. Langmuir (Fig. 6a) and Freundlich (Fig. 6b) models were employed to describe the biosorption equilibrium isotherms [63, 64]. The biosorption coefficients were calculated from the slope and intersect of the linear equation, listed in Table 2. The monolayer biosorbent capacity (qmax = mg g−1) was found in the order CBC650 > MBC650 > CBC550 > CBC450 > MBC550 > MBC450 > Coal >SM. MBC650 (353.9 mg g−1) and CBC650 (381.6 mg g−1) showed the maximum biosorption capacity to adsorb MB molecules from the aqueous solution.

Fig. 6
figure 6

Macroalgae and coal-based biochars Langmuir isotherms (a); Macroalgae and coal-based biochars Freundlich isotherms (b)

Table 2 Langmuir and Freundlich isotherm parameters of macroalgae and coal-based biochars for MB removals

However, Langmuir isotherm model for MBC650 (R2 = 0.954) and CBC650 (R2 = 0.948) suggested that homogeneous monolayer biosorption was carried out. Langmuir model described that only one MB molecule adsorbed on each site of biochar and all sites are energetically equivalent. The value of dimensionless factor of the equilibrium (RL) was calculated using Eq. 6. The value of RL represents unfavorable (RL > 1), favorable (0 < RL < 1), linear (RL = 1) or irreversible (RL = 0) adsorption [41]. In the present study, the values of RL were found to be between 0 and 1 (Table 2), indicated a favorable biosorption process for all BCs. The low value of RL with the increase of initial dye concentration indicates that the adsorption is favorable at high concentrations.

The Freundlich isotherm model describes a multilayer heterogeneous adsorption process and have uneven energy distribution over the homogeneous surface [52]. According to this model, the biosorption of dye is directly proportional to its aggregate in aqueous solution and quantity adsorbed [65]. The literature value of nF indicates that the adsorption is linear (if nF = 1), favorable and physical process (if nF > 1) or an unfavorable and chemical process (if nF < 1) [66]. In this study, the value of nF > 1 indicates a favorable and physical biosorption process, as shown in Table 2. The Langmuir model for BC650 (R2 = 0.954) and CBC650 (R2 = 0.948) is fitted better for the MB adsorption due to the more homogeneous surface and due to the formation of monolayer as compared to Freundlich for BC650 (R2 = 0.769) and CBC650 (R2 = 0.763). The maximum biosorption capacity (qmax) of this study is comparatively better than the previous research for different type of biosorbents as seen in Table 3.

Table 3 Comparative maximum biosorption capacity (mg g−1) of different biochars from natural resources

Kinetic models were applied to observe the effect of contact time on MB biosorption from aqueous solutions for all biosorbents. The studies were carried out at specific time intervals (1–240 min) with constant temperature of 30 °C and shaking at 140 rpm using the optimum conditions. The pseudo-first-order and pseudo-second-order kinetic models [69, 70] were used to describe the biosorption of MB onto all BCs using Eqs. 7, 8 and 9 respectively. The equilibrium rate constant of pseudo-first-order biosorption (K1), pseudo-second-order biosorption (K2), and intra-particle diffusion (Kpi) was calculated from the linear plot of ln (qe - qt) versus t; Fig. 7a, t /qt versus t; Fig. 7b and qt vs t1/2, respectively for MB biosorption on all BCs as shown in Table 4. However, the best curve was fitted for pseudo-second-order on MB with a correlation coefficient (R2 = 0.9995–0.9999) close to unity as compared to pseudo-first-order (R2 = 0.7365–0.9342) and intra-particle diffusion (R2 = 0.2424–0.5429). In addition, the pseudo-second-order explained that external liquid film diffusion, surface adsorption and intra-particle diffusion processes were occurred [34]. Similarly, pseudo-second-order kinetic model was also fitted best for the adsorption of MB on modified barley straw biochar [60].

Fig. 7
figure 7

a Pseudo-first-order kinetics of macroalgae and coal-based biochars; b Pseudo-second-order kinetics of macroalgae and coal-based biochars

Table 4 Pseudo-first-order, pseudo-second-order, and intra-particle diffusion kinetic parameters of macroalgae and coal-based biochars for MB removal

3.4 Thermodynamics performance on biosorption of macroalgae and coal-based biochars

The effect of temperature can be used to describe biosorption of MB using thermodynamics parameters. Thermodynamics parameter such as Gibbs free energy (ΔG°), enthalpy (ΔH°) and entropy (ΔS°) for biosorption were calculated using Eq. 10 and Eq. 11 [62].

$$ \Delta \mathrm{G}{}^{\circ}\kern0.5em =-\mathrm{RT}\ \mathrm{Ln}\ {K}_e $$
(10)
$$ \mathrm{Ln}\ {K}_e\kern0.5em =\frac{\Delta \mathrm{S}{}^{\circ}}{R}-\frac{\Delta \mathrm{H}{}^{\circ}}{RT} $$
(11)

Where, R is the ideal gas constant (8.314 J mol−1 K−1), T is the absolute temperature in Kelvin, and Ke = qe/Ce is the adsorption affinity. The values of enthalpy and entropy were determine from the slope and intercept of linear plot of Ln Ke vs 1/T. All calculated values of thermodynamic parameters were represented in Table 5. The values of ΔG° were found negative in the range of − 12.33 to − 2.38 kJ mol−1 for all adsorbents. The negative values of ΔG° determined the spontaneity and physiosorption process of MB on BCs, according to the reported range (− 20–0 kJ mol−1) in literature [62, 71]. The values of ΔH° (+ 17.64 to + 80.45 kJ mol−1) showed that the biosorption was endothermic process during the increase in temperature from 30 to 50 °C. The positive values of ΔS° indicated that water molecules could be removed from BCs surface or chance of MB desorption due to the increase of temperature [72].

Table 5 Thermodynamics parameters MB biosorption on macroalgae and coal-based biochars

3.5 Regeneration of macroalgae and coal-based biochars

Biosorption process is attractive if we may improve the process economics. Biosorbents are costly, thus, their regeneration can make biosorption economical and feasible industrial scale process. The prospective regeneration of BCs was carried out using HNO3 as the eluent [39]. The dye removal was decreased from 83 to 52, 92–57, 93–62, 96–67, 90–58, 92–62, 94–66, and 96–68% for SM, MBC450, MBC550, MBC650, Coal, CBC450, CBC550, and CBC650 respectively at the third cycle as seen in Fig. 8a. Physiochemical properties of BCs change during their regeneration, which ultimately decrease the dye adsorption. The dye removal was reduced progressively with the number of cycles but efficiency of MBC650 and CBC650 was not less than 65% even after third cycle. The results explained that MBC650 and CBC650 have reversible adsorption, could be regenerated and reused for the biosorption of MB.

Fig. 8
figure 8

a Effect of regeneration cycle of macroalgae and coal-based biochars on MB removal performance (± presents standard deviation and n = 3); b MB removal efficiency with macroalgae and coal-based biochars treating industrial real textile wastewater (± presents standard deviation and n = 3)

3.6 Real textile wastewater (RTWW) treatment

In order to investigate the industrial application, MBCs and CBCs were tested for real textile wastewater (RTWW) samples containing MB dye, collected (at 42 °C, 6.3 pH, 5510 mg L−1 COD and 123 mg L−1 nitrates) from local textile industry located at Manga road, Raiwind (GPS = 31.26,74.07). Figure 8b shows the highest dye removal of MB was around 41.8, 64.5, 72.6, 75.2, 50.4, 66.9, 74.3, and 76.7% for SM, MBC450, MBC550, MBC650, Coal, CBC450, CBC550, and CBC650 respectively, at optimized parameters of this study for RTWW. MBC650 and CBC650 exhibited maximum dye removal due to the presence of more available surfaces for dye molecules as compared to other BCs. The MB removal of RTWW solutions was lower as compared to model MB aqueous solution for all BCs. The reason for low adsorption of MB can be attributed to the presence of other chemical species in RTWW samples. Textile wastewater might contain phenolic, cyclic, nitric and other unidentified chemical species that can affect the adsorption of MB from RTWW. It has been previously shown that activated carbons can be used to remove phenolic and cyclic compounds from aqueous solutions [25]. Activated carbon has higher pore size as compared to other adsorbents, e.g., zeolites, hence making it more likely that these unidentified cyclic compounds will end up in the pores of activated carbon lowering the adsorption of MB. Identification of these species is out of the scope of this work but it will be interesting to specifically study the effect of these unidentified species on the adsorption of MB in future studies. However, still the percentage removal of MB from RTWW is quite high. These results show that MBCs and CBCs can remove high concentration of dyes within the RTWW, confirms the applicability of BC to remove dyes from RTWW.

4 Conclusions

Macroalgae and coal-based biochars are used as adsorbents to remove MB molecules from the textile wastewater. This study shows that macroalgae-based biochar has a potential to remove MB from simulated wastewater as well as RTWW. The experimental results demonstrate that MBC650 biochar offers high MB removal efficiency for simulated wastewater as well as RTWW. The regeneration of adsorbent indicates that macroalgae-based biochars can be reused up to two regeneration cycles. Due to high removal efficiency and reusability potential, macroalgae-based biochar can be considered as an inexpensive and potential alternative adsorbent to expensive activated carbon.