In situ functionalization of a cellulosic-based activated carbon with magnetic iron oxides for the removal of carbamazepine from wastewater

The main goal of this work was to produce an easily recoverable waste-based magnetic activated carbon (MAC) for an efficient removal of the antiepileptic pharmaceutical carbamazepine (CBZ) from wastewater. For this purpose, the synthesis procedure was optimized and a material (MAC4) providing immediate recuperation from solution, remarkable adsorptive performance and relevant properties (specific surface area of 551 m2 g−1 and saturation magnetization of 39.84 emu g−1) was selected for further CBZ kinetic and equilibrium adsorption studies. MAC4 presented fast CBZ adsorption rates and short equilibrium times (< 30–45 min) in both ultrapure water and wastewater. Equilibrium studies showed that MAC4 attained maximum adsorption capacities (qm) of 68 ± 4 mg g−1 in ultrapure water and 60 ± 3 mg g−1 in wastewater, suggesting no significant interference of the aqueous matrix in the adsorption process. Overall, this work provides evidence of potential application of a waste-based MAC in the tertiary treatment of wastewaters. Graphical abstract Graphical abstract


Introduction
Modern human and veterinary health care strongly rely on pharmaceuticals consumption. The European Union (EU) alone accounts for 25% of the global pharmaceutical market and the forecasts point to a continuous growth of consumption (Deloitte Sustainability 2018). These substances are considered the source of tremendous benefits to public health but, in the meantime, are becoming increasingly ubiquitous in several environmental matrices, being detected in the ng to low μg per litre range (Jelic et al. 2012;Pereira et al. 2017;Desbiolles et al. 2018;McCance et al. 2018). Continuous exposure to pharmaceuticals may pose a significant risk to humans and has been proved to have severe disruptive effects in ecosystems (Pomati et al. 2006;Kidd et al. 2007;Malchi et al. 2014;Vasquez et al. 2014;de Jesus et al. 2015;Niemuth and Klaper 2015). The EU has recognized the importance of developing measures to regulate this issue (Parliament 2013) and several pharmaceuticals have recently integrated a Union-wide monitoring list that aims to provide relevant data to support future inclusions in the list of priority substances in the field of water policy (European Commission 2015. Currently, wastewater treatment plants (WWTP) are incapable of efficiently removing pharmaceuticals (Calisto and Responsible editor: Tito Roberto Cadaval Jr Electronic supplementary material The online version of this article (https://doi.org/10.1007/s11356-020-09314-x) contains supplementary material, which is available to authorized users. Esteves 2009;Rivera-Utrilla et al. 2013;Pereira et al. 2015) being the primary entry pathway of these compounds into the environment (Jelic et al. 2011;Luo et al. 2014). A conventional WWTP operation is based on physicochemical (primary) and biological (secondary) processes, which are designed to eliminate suspended solids, inorganic nutrients and biodegradable organic matter (Nakada et al. 2007). As for hydrophilic and non-biodegradable contaminants, such as pharmaceuticals, an extra step of treatment (tertiary) is required to successfully remove them from the final effluent. For instance, the antiepileptic carbamazepine (CBZ) generally presents WWTP removal efficiencies below 10% (Zhang et al. 2008;Bahlmann et al. 2014). The incorporation of an advanced tertiary step, functioning as an effluent refinement stage before the release into the environment, is not a common practice in the majority of WWTP. The main obstacle lies with the high costs, the generation of transformation by-products and the operation complexity associated with tertiary treatments, such as membrane filtration or advanced oxidation processes (Zimmermann et al. 2011).
In the described context, adsorption appears to be a promising alternative for the removal of organic contaminants from water due to its versatility, high removal efficiency in a short time, effectiveness, no undesired by-product formation and the possibility of regeneration/reuse of the exhausted adsorbent (Altmann et al. 2014;Bayramoglu et al. 2016Bayramoglu et al. , 2020Bayramoglu and Arica 2018). Currently, activated carbon is the most commonly used adsorbent in wastewater treatment. However, the production cost of commercial coal-based activated carbon is often considered prohibitive for its large-scale application. As a possible solution, several agricultural and industrial wastes have been successfully applied as activated carbon precursors (Ioannidou and Zabaniotou 2007;Cazetta et al. 2011;Jaria et al. 2017;Satayeva et al. 2018;Oliveira et al. 2018) both lowering production costs and creating a sustainable and innovative waste management strategy (Silva et al. 2018). Powdered activated carbon (PAC) has proved to be highly efficient in the removal of pharmaceuticals (Serrano et al. 2011;Nielsen et al. 2014;Silva et al. 2019), including CBZ (Li et al. 2011;To et al. 2017;Delgado et al. 2019), with several pilot and large-scale studies on effluent wastewater pointing the significant increment in removal efficiency brought to the WWTP and substantiating the viability of a full-scale implementation of this technology (Boehler et al. 2012;Margot et al. 2013;Mailler et al. 2015;Meinel et al. 2016;Kårelid et al. 2017;Guillossou et al. 2019). Nonetheless, a generalized integration of PAC treatment in WWTP systems is still limited, particularly due to its small particle size, which hampers the separation from the treated effluent. Typically, the recuperation of the exhausted PAC is achieved by flocculation/coagulation, sedimentation, filtration (sand or membranes) or a combination of these processes, which tend to be costly, time consuming and impede the PAC recuperation. As a promising alternative, magnetic activated carbon (MAC) combines the adsorption performance of PAC with immediate magnetic retrievability. Magnetic response is achieved through functionalization of PAC surface with magnetic nanoparticles, the magnetic iron oxides magnetite and maghemite being the most typically employed because of their availability and simplicity of preparation (Luiz et al. 2002;Hao et al. 2018). Coating the surface of PAC with magnetic nanoparticles allows its recuperation from the treated effluent through the application of an external magnetic field gradient. As of recently, MAC has been successfully employed in the adsorption of several pharmaceuticals from water. Some examples include the works of Baghdadi et al. (2016) in the removal of CBZ from real wastewater using a magnetized commercial PAC; or Wong et al. (2016) applying a commercial waste-based phenyl-functionalized magnetic PAC in the removal of CBZ from water, among other pharmaceuticals. However, most of these studies involved the magnetization of commercial PAC and very few include adsorption experiments using WWTP effluents (Baghdadi et al. 2016;Yegane Badi et al. 2018;Lompe et al. 2018).
In that sense, the overall objective of this work was to use primary sludge from the pulp and paper industry as precursor to produce an efficient waste-based MAC for the adsorption of the antiepileptic CBZ from wastewater. The production of a MAC that combines high CBZ adsorption efficiency with immediate magnetic separation from the treated aqueous phase was here optimized. Additionally, the relationship between the produced magnetic adsorbents' physical and chemical characterization and their performance was a key objective of this study.

Experimental section
Production of waste-based powdered activated carbon Primary sludge (PS) from pulp and paper mill industry, a cellulosic solid residue, was used as precursor for the preparation of a waste-based powdered activated carbon (WPAC). The procedure was selected according to optimal conditions determined by Jaria et al. (2019). A schematic representation of this procedure is provided in Scheme 1. Briefly, PS was collected from a pulp and paper factory, using eucalyptus wood (Eucalyptus globulus) as raw material and an elemental chlorine-free bleaching method. After drying, PS was ground with a blade mill and chemically activated with KOH 1:1 (w/w) for 1 h under ultrasonic agitation, at room temperature. Batches of 15 g of PS were impregnated with 15 g of KOH in 50 mL of distilled water. The slurry was then allowed to dry at room temperature in the fume hood under weak air stream flow. The impregnated material was subsequently pyrolyzed in porcelain crucibles at 800°C in a convection furnace muffle for 150 min with a heating rate of 10°C min −1 , under constant nitrogen flow through the entire process. After pyrolysis, the carbonized material was acid washed using 1.0 M HCl in a 3% (w/v) proportion for 1 h. The mixture was vacuum filtered through a 0.45μm filter to remove the acid and successively washed with distilled water and filtered until the filtrate reached neutral pH. The WPAC was dried at 100°C overnight and ground into a homogenous powder using a pestle and mortar.

Production of magnetic activated carbon
The WPAC was impregnated with magnetic iron oxides, namely magnetite and maghemite, to produce magnetic waste-based powdered activated carbons, through in situ coprecipitation (Scheme 1). Briefly, magnetic particles were synthesized from an aqueous iron salt solution (Fe 3+ and Fe 2+ ) through the addition of a base to a mixture of iron salts and WPAC under inert a t m o s p h e r e . F o r t h a t p u r p o s e , a m i x t u r e o f FeCl 3 .6H 2 O:FeSO 4 .1.5H 2 O (1:2 w/w) was dissolved in 50 mL of previously deoxygenized water under N 2 flux, at 70-80°C. A defined mass of WPAC was added after complete dissolution. An alkali solution of 0.5 M KOH (50 mL), prepared with deoxygenized water, was added dropwise and the reaction was held during 1 h, keeping the temperature at 70-80°C. The produced MAC was magnetically decanted to remove the excess of alkali solution and washed successively with distilled water until neutral pH, after which the particles were dried in a convection oven at 40°C, overnight or until completely dry, and mechanically ground. Also, magnetic particles without activated carbon (MP1) and a MAC (MCAC2) from a commercial PAC (PBFG4, ChemViron) were produced. Magnetic separation from solution was performed using a neodymium rod-shaped magnet (1 cm diameter; 4 cm height; 1.26-1.29 T). Table 1 lists all the materials studied in this work, indicating the sources of the materials and the different mass ratios of the non-magnetic activated carbon precursors to iron salt mixture used to produce each adsorbent.

Total organic carbon
Total organic carbon (TOC) was determined by calculating the difference between total carbon (TC) content and inorganic carbon (IC) content, both determined with a TOC analyzer (Shimadzu, TOC-VCPH solid sample module SSM-5000A, Japan). Samples were analyzed in triplicate and the carbon content was obtained by the average of such measurements.

Fourier transform infrared spectroscopy with attenuated total reflectance
The Fourier transform infrared spectroscopy with attenuated total reflectance (FTIR-ATR) spectra were recorded on a FTIR spectrophotometer (Shimadzu, IRaffinity-1, Japan), using an ATR module, with a nitrogen purge, between 700 and 4000 cm −1 for PS and WPAC and 400-4000 cm −1 for MAC and MP1, 4.0 of resolution, 128 scans and with atmosphere and background correction.

Specific surface area and pore morphology
Physical textural properties were evaluated on a surface area and porosity analyzer (Micromeritics, Gemini VII 2380, USA) by nitrogen adsorption isotherms at − 196°C, after sample degasification overnight at 120°C. The following parameters were determined: specific surface area (S BET ) was calculated by the Brunauer-Emmett-Teller equation (Brunauer et al. 1938) in the relative pressure range 0.01-0.1; total micropore volume (W 0 ) was determined by the Dubinin-Radushkevich equation (Marsh and Rand 1970); total pore volume (V p ) was

EXTERNAL MAGNETIC FIELD
Scheme 1 Schematic representation of the experimental approach followed for materials' production and adsorptive studies estimated from the amount of nitrogen adsorbed at a relative pressure of 0.99; average pore width (D) was calculated as D = 2 × V p /S BET (Calisto et al. 2014).
Prior to the SEM analysis, the samples were covered with a thin layer of carbon and an electron acceleration voltage of 20 kV was applied.

Point of zero charge
The point of zero charge (PZC) was determined by the pH drift method, similarly to Jaria et al. (2015). A set of ten different pH solutions (pH i = 2-11) of 0.1 M NaCl were prepared, and initial pH (pH i ) values were adjusted with 0.1 M and 0.01 M HCl, and 0.1 M and 0.01 M NaOH. One milligramme of material was incubated in 40 mL of each pH solution (25 mg L −1 ), in propylene tubes for 24 h at 25°C, in an overhead shaker. The final pH (pH f ) was measured and the PZC was determined by plotting ΔpH (pH f -pH i ) versus pH i . The PZC is the pH value corresponding to the x-axis interception of the obtained curve.

Vibrating sample magnetometer
The magnetization measurements were performed using a vibrating sample magnetometer (VSM EV9) with an applied magnetic field (H) to a maximum of 22 kOe. Sample saturation magnetization (M S ) was determined by plotting magnetic moment versus applied magnetic field; the M S corresponded to the plateau value of the magnetization. The sample (about 10 mg) was encapsulated in an acrylic cylindrical container (5.85 mm of diameter and 2.60 mm of height), which was coupled to the linear motor of the VSM EV9 instrument, centred between the two polar heads of the electromagnet used to provide the magnetic field. Prior to the analysis, the instrument was calibrated with a disk of pure nickel (8 mm of diameter) using a procedure that establishes the determination of the magnetic field, applied at around 1 Oe, while the dispersion of the magnetic moment (m) is inferior to 0.5%.

X-ray diffraction
X-ray diffraction (XRD) analysis was performed to evaluate the presence of magnetic iron oxides in the produced materials. Measurements were performed at room temperature with a PANalytical Empyrean powder diffractometer using monochromated CuKα radiation (λ = 1.541°A) in the 10-80°2θ range at 0.02°resolution, and 4000 acquisition points per step. The incident beam optics included a Soller slit of 0.04 rad, a 10 mm fixed mask, a divergence fixed slit of 1 = 4 and an anti-scatter slit of 1 = 8. The diffracted beam optics included a Soller slit of 0.04 rad and anti-scatter slit of 7.5 mm.

Batch adsorption experiments
The adsorptive performance of the produced materials was evaluated by batch adsorption tests. Succinctly, the adsorbent materials were weighed in a microbalance, with an uncertainty of ± 0.001 mg, added to propylene tubes with 40 mL of 5 mg L −1 CBZ solution and shaken, at 80 rpm, in an overhead shaker, at 25°C. All experiments were replicated three times along with CBZ solutions shaken without adsorbent, which were used as controls. After the corresponding shaking period, the adsorbent was separated from the aqueous phase, which was analyzed for the residual CBZ concentration. Preliminary CBZ adsorption tests in ultrapure water were performed to assist in the selection of the most efficient MAC, which was further studied through kinetic and isothermal adsorption experiments. For this purpose, fixed doses of each material (25 and 50 mg L −1 ) were shaken in triplicate with 40 mL of 5 mg L −1 CBZ solution during 24 h and were then analyzed for the residual CBZ concentration. According to the preliminary adsorptive performance obtained with these tests, one MAC was selected, further characterized (the PZC of this material was determined as described in section 2.3.5) and used for kinetic and equilibrium adsorption studies that were carried out both in ultrapure and WWTP effluent (as next described in the "Kinetic adsorption study" section and the "Equilibrium adsorption study" section). The WWTP effluent used in this work was gathered at a local urban WWTP (Aveiro, Portugal) that receives an average wastewater flow of 39,278 m 3 per day, which is subjected to primary followed by biological treatment. Immediately after collection, the effluent was vacuum filtered through a 0.45μm Supor-450 Cellulose Membrane Disc Filter, in order to remove suspended organic matter and solid residues. Then, the filtered effluent was stored at 4°C in the dark until use, within a maximum of 3 weeks. WWTP effluent pH (Hanna Instruments, HI2020-02 pH meter), conductivity (WTW meter) and dissolved organic carbon (DOC) (Shimadzu, TOC-VCPH liquid sample module SSM-5000A, Japan) were measured. The determined values were pH = 8.07, conductivity = 2.77 mS cm −1 and DOC = 19.4 ± 0.3 mg L −1 . These characteristics are coherent with previous collections from the same WWTP used in the work of Silva et al. (2019) (who studied the adsorption of three pharmaceuticals, including CBZ), which validates future comparisons.

Kinetic adsorption study
The kinetic study, carried out with the selected MAC, involved shaking a fixed concentration of adsorbent material for different periods of time. In that sense, and based on preliminary experiments, 25 mg L −1 was established as the fixed concentration of material, in both ultrapure water and WWTP effluent. Accordingly, 40 mL of a 5 mg L −1 CBZ solution was shaken with the referred fixed amount of MAC for 5,10, 15, 30, 60 and 120 min in ultrapure water and 5, 10, 15, 30, 60, 120 and 240 min in WWTP effluent. The amount of CBZ adsorbed at each time (q t (mg g −1 )) was determined by Eq. (1): where C 0 (mg L −1 ) is the initial concentration of pharmaceutical, C t (mg L −1 ) is the pharmaceutical concentration at time t (mg L −1 ), V is the volume of solution (L) and m is the mass of adsorbent (g). The kinetic experimental results were fitted to the pseudofirst-and pseudo-second-order models (Eqs. (2) (Lagergren 1898) and (3) (Ho and McKay 1999), respectively).
where k 1 (min −1 ) and k 2 (g mg −1 min −1 ) are the pseudo-firstand pseudo-second-order rate constant, respectively, q e (mg g −1 ) is the fitted CBZ adsorbed concentration at equilibrium and q t (mg g −1 ) is the adsorbed concentration at a certain time. Non-linear fittings were determined using Graph Pad Prism 5 software. Three parameters (coefficient of determination (R 2 ), standard deviation of residuals (S y/x ) and absolute sum-of-squares (ASS)) were used to evaluate the adequacy of the model fitting, as described in section 1 of SM (SM1).

Equilibrium adsorption study
The equilibrium study involved shaking different concentrations of the selected adsorbent material during a time that guarantees the equilibrium of adsorption, as inferred from kinetic results. In that sense, the material was shaken for 2 h in ultrapure water and 4 h in WWTP effluent (ensuring the attainment of equilibrium) together with 40 mL of a 5 mg L −1 CBZ solution. The CBZ adsorbed concentration at equilibrium q e (mg g −1 ) was determined as defined by Eq. (1), but respectively replacing q t (mg g −1 ) and C t (mg L −1 ) by q e (mg g −1 ) and C e (mg L −1 ) (the aqueous phase concentration of pharmaceutical at equilibrium), considering that the equilibrium has been reached. Experimental data were fitted to the Langmuir and Freundlich non-linear equilibrium models, mathematically represented by Eqs. (4) (Langmuir 1918) and (5) (Freundlich 1906), respectively: where K L (L mg −1 ) is the Langmuir equilibrium constant, K F (mg 1-1/n L 1/n g −1 ) is the Freundlich equilibrium constant and n is a constant related with non-linearity of the equation. Nonlinear fittings were determined using Graph Pad Prism 5 software. Three fitting parameters (R 2 , S y/x and ASS) were used to evaluate the adequacy of the model fitting (SM1).

Analytical method
The quantification of CBZ was performed by Micellar Electrokinetic Chromatography (MEKC) in a Beckman P/ ACE MDQ (Fullerton, CA, USA) equipped with a photodiode array UV-Vis detector, using the software 32 Karat. The separation method was operated in a dynamically coated fused silica capillary with 40 cm total length, 30 cm to the detection window, 75 μm of internal diameter, as described in Calisto et al. (2015). Ethylvanillin was used as internal standard and a 15 mM sodium tetraborate and 20 mM SDS solution was used as running buffer, prepared fresh every 2 days and stored at 4°C. A 100 mM sodium tetraborate solution was used as electrolyte and added to each sample along with internal standard. CBZ detection was performed at 214 nm and samples' concentration was determined in triplicate using a calibration curve obtained with seven standard solutions with concentrations in the range of 0.25 to 5.0 mg L −1 . Each standard was analyzed in quadruplicate and a new calibration curve was obtained for every new capillary. All buffers and CBZ standards were prepared in ultrapure water (Milli-Q, Merck Millipore).
Complementary information about sample preparation and the separation method used can be consulted in SM2. Peak integration was performed with Matlab 7.0 software.

Results and discussion
Materials characterization Figure 1 represents TOC and IC contents of the here considered carbon-based materials. According to TOC determinations ( Fig. 1), pyrolysis strongly contributes to its increase, as proved by the 40% increment when comparing WPAC with PS. As may be seen in Fig. 1, IC content is residual, approximately 0.03-0.12%, for WPAC and all produced MAC, which reflects its efficient removal during the HCl washing step. The TOC decrease in MAC, whether waste-or commercial-based, is evident and in proportion to the iron fraction in the composite (Table 1). Results from FTIR analysis are shown in Figure S2, within SM3. The FTIR spectrum of PS ( Figure S2-a)) displays specific peaks around 1430 cm −1 and 870 cm −1 , which are indicators of the presence of carbonate groups. These peaks are clearly absent in WPAC spectrum ( Figure S2-b)) corroborating IC results. Aromatic ring deformation vibration and C-C stretching can be correlated with the peaks at 700-750 cm −1 , the peak at around 1650 cm −1 can be associated with aromatic C=C stretch and aliphatic C-H stretching signals can also be deduced from the band in the 2815-3000 cm −1 range (Marsh and Rodríguez-Reinoso 2006;Sevilla and Fuertes 2009). Regarding the presence of oxygen groups, the broad band (3000-3700 cm −1 ) centred at 3330 cm −1 , in addition to a peak at 2930 cm −1 , might be attributed to alcohol/phenol O-H stretching vibrations, the peak at around 1100 cm −1 is often associated with the C-O-C stretch characteristic of ether groups (Stuart 2004). In the WPAC and MAC spectra, the intensity abatement of the peaks at 1000-1250 cm −1 and the broad band at 3000-3700 cm −1 can be associated with dehydration during the pyrolysis of the highly cellulosic PS (Sevilla and Fuertes 2009). Nonetheless, still may be inferred the presence of oxygen-containing groups such as phenol, carboxyl and hydroxyl groups as well as some indications of the aromaticity of WPAC at 1430-1650 cm −1 (Stuart 2004). Broad bands at 540 cm −1 and peaks at 650 cm −1 can be linked with Fe-O bonds compatible with the presence of magnetite and maghemite (Cornell and Schwertmann 2003;Mohan et al. 2011). Figure 2 displays the XRD patterns of WPAC, MP1 and MAC4. Activated carbons are characterized by their amorphous structure composed by non-graphitic and nongraphitizable carbon, without any measurable crystallographic order. However, some intermediate structures between graphite and amorphous state (turbostratic structures) can be deduced from the XRD pattern of WPAC-peaks at 28.2°and 47.5° (Balachandran and Ag 2012). Additionally, peaks at around 33.0°and 56.1°can be associated with potassium compounds, due to KOH activation, and some oxygen groups, respectively (Mopoung et al. 2015). A characteristic XRD pattern with diffraction peaks at 30.2°, 35.4°, 43.2°, 53.5°, 57.1°and 62.8°is associated with the cubic spinel structure of magnetite and maghemite (Cornell and Schwertmann 2003). This pattern is found in both XRD spectra of MP1 and MAC4. The distinction between the two magnetic iron oxides is not possible by XRD but it is possible to state that magnetite and/or maghemite are the two main crystalline components present.
Results on the textural and magnetic properties of the materials are depicted in Table 2. Regarding the S BET , that of   (Table 2), which is consistent with previous works Jaria et al. 2019) and within typical values for PAC. In fact, the S BET of WPAC is considerably higher than that of the commercial PBFG4 (Calisto et al. 2014), revealing the potentiality of this waste-based adsorbent. The results from Table 2 highlighted that the introduction of iron oxide nanoparticles in the carbon matrix of WPAC negatively affected the S BET of the produced MAC. Besides, the reduction of S BET values of MAC is in agreement with the increase of iron salt content in the materials (Table 1). This can be explained by the relatively low S BET of the bare MP1 nanoparticles and their occupation of the interstitial spaces of the porous structure of WPAC, causing a decrease in the overall S BET of MAC. The reverse relation is observed for the M S values, which in the case of MAC6 is identical to the one obtained for MP1 particles. All the produced MAC have M S values ranging between 22.8 and 56.4 emu g −1 , which assure successful retrievability from an aqueous medium using a permanent magnet. However, considering visual responsiveness, complete and more immediate magnetic separation was attained by MAC3, MAC4 and MAC6. From Table 2, it is also possible to infer the highly microporous structure of WPAC as the micropore volume (W 0 ) accounts for approximately 58% of total pore volume (V p ). Although MAC average pore diameter (D) results are, in general, compatible with a microporous structure (< 2 nm), V p and W 0 were reduced in comparison with WPAC by the presence of MP1 in the composite. Due to the nanometric size of the magnetic iron oxide particles produced through alkaline coprecipitation (Ahn et al. 2012), the referred occupation of interstitial pore spaces is confirmed by the significant reduction of W 0 with the increasing proportion of iron salt, and therefore MP1 content, in MAC. This can be also inferred when comparing the properties of MCAC2 with its precursor PBFG4 since MCAC2 and PBFG4 have similar V p but the W 0 of PBFG4 is significantly reduced after magnetization.
SEM images, which are presented in Fig. 3 and Figure S3, provide visual context for the results in Table 2. MAC surfaces are rougher than the precursor WPAC ( Figure S3) due to the deposition of magnetic particles throughout the carbon surface and is clear that increasingly iron salt proportions correspond to rougher surfaces and increasingly pore constraints. The amplifications at × 50000, particularly in the case of MAC3, MAC4 and MAC6, clearly depict the pore constraints in the basis of the poorer textural properties of MAC. Figure 4 and Table S1 present the results for the preliminary tests performed at 25 mg L −1 and 50 mg L −1 of material dosage. As it can be observed, the non-magnetized materials, namely PBFG4 and WPAC, mostly showed higher CBZ removal percentages than any of the magnetic carbons at both dosages. Indeed, WPAC performed better than PBFG4 in the adsorption of CBZ, which may be related to the higher S BET of the first (Table 2). Meanwhile, MP1 was not able to remove any CBZ from water (please see Table S1). Regarding the MAC (MAC2 to MAC6), the CBZ removal percentages ranged between 15 and 50% at 25 mg L −1 and between 36 and 91 at 50 mg L −1 . At both dosages, the lower the iron content in the material, the higher the CBZ removal percentage, which can be explained by S BET reduction (Table 2) and increasing pore constraints ( Fig. 3 and Figure S3) with increasing iron content. In any case, it is important to state that, compared with MCAC2, not only MAC2, which has the same iron content, but all the other produced MAC revealed higher or comparable removal results ( Fig. 4 and Table S1).

Batch adsorption experiments
Taking into account the results presented above concerning preliminary adsorption tests in ultrapure water, MAC4 was selected for further adsorption studies because this material revealed the best relation between CBZ adsorption performance and immediate magnetic separation. Accordingly, the PZC of MAC4 was determined (PZC~6, please see Figure S4) and both kinetic and equilibrium studies were performed using MAC4 for the adsorption of CBZ from ultrapure water and from the WWTP effluent.

Kinetic adsorption study
The determination of the equilibrium time is paramount when studying the viability of an industrial application of an adsorbent material. Apart from good adsorptive performance, the  Calisto et al. (2014) period required to attain equilibrium, and hence maximum performance, must allow applicability. The kinetic studies were performed to determine the adsorption rate and the equilibrium time (t e ), which is the time required for the CBZ to reach the equilibrium at the interface between the bulk solution and the surface of the adsorbent. Figure 5 presents the experimental data on the adsorbed concentration of CBZ versus the contact time together with model fittings for MAC4 in ultrapure and wastewater. From the analysis of the kinetic curves, the t e in ultrapure water is around 15-30 min and around 45-60 min in WWTP effluent. Considering that some adsorption systems present equilibrium times of several hours Delgado et al. 2019), this feature reveals the kinetic suitability of this magnetic material for CBZ adsorption.
Kinetic model fitting parameters are summarized in Table 3. Considering the statistical analysis, the pseudo-first and pseudo-second-order model fittings presented R 2 values above 0.98, which indicates that both models reasonably describe the experimental data in ultrapure water and WWTP effluent. As for WPAC, previous results [34], which were included in Table 3 for comparison purposes, revealed that experimental data obtained in both matrices are better described by the pseudo-second-order model. According to the kinetic rate constants (k 1 and k 2 ), the MAC4 presents faster CBZ adsorption kinetics than the precursor WPAC (data presented in Table 3) either in ultrapure water or WWTP effluent. Apart from that, and contrarily to WPAC [34], the adsorption of CBZ onto MAC4 is negatively affected in the  Table 3). This might be attributed to the DOC pore blockage and competition for adsorption sites, which can slow down adsorption kinetics (Li et al. 2003;Altmann et al. 2014;Shimabuku et al. 2014).

Equilibrium adsorption study
CBZ adsorption equilibrium studies were performed using MAC4 in ultrapure water and WWTP effluent. Figure 6 displays the graphical representation of the adsorbed concentration of CBZ onto MAC4 at equilibrium (q e , mg g −1 ) versus the CBZ remaining concentration in solution (C e , mg L −1 ) in both matrices. The isotherm model fitting parameters are summarized in Table 3. From the analysis of R 2 , ASS and S y/x , it is possible to conclude that the Langmuir and Freundlich isotherm models adequately outline the experimental data in both matrices (R 2 > 0.96). Hence, both models can be used to draw comparisons. The same was already verified for the nonmagnetic WPAC [34], with the Langmuir model providing slightly better fittings (Table 3).
The results show that the non-magnetic WPAC presents better performance than MAC4 for CBZ adsorption in ultrapure water and WWTP effluent. In ultrapure water, the Langmuir maximum adsorption capacity (q m ) of MAC4 (68 ± 4 mg g −1 ) for CBZ is about 3 times lower when compared with the q m of WPAC (212 ± 16 mg g −1 ) determined by Silva et al. (2019). This q m reduction must be related with the materials' S BET . Note that the S BET of MAC4 (551 m 2 g −1 ) is approximately 3 times lower than that of the WPAC used by Silva et al. (2019) (1627 m 2 g −1 ). The same relation is verified when comparing both materials in wastewater matrix.
Obtained results on the adsorption of CBZ onto MAC4 may be related with electrostatic interactions since, in the adsorption process, the protonation state of the adsorbate and adsorbent's surface, dictated by the pH of the aqueous matrix, is a decisive factor. Considering that the PZC of MAC4 is around 6 ( Figure S4), its surface is mainly deprotonated and negatively charged in the tested conditions (WWTP effluent pH = 8.07; ultrapure water pH = 5.5-6.0). Regarding the protonation state of CBZ and considering its pk a values (pk a1 = 2.3 (Nghiem et al. 2005) and pk a2 = 13.9 (Jones et al. 2002)), it is expected neutral net charge under the tested conditions. Hence, no electrostatic repulsion forces occur between the surface of MAC4 and the neutral CBZ. Corroborating this hypothesis, the results from Table 3 highlight that the matrix type has little interference on the adsorption of CBZ onto MAC4, with the adsorption capacities being mostly equal in ultrapure water and WWTP effluent.
The decline in the adsorptive performance verified when comparing the non-magnetic precursor with the magnetic adsorbent is inevitable and inherent to the introduction of the magnetic iron oxide particles (Baghdadi et al. 2016). In any case, when compared with maximum adsorption capacities of several non-magnetic adsorbents used in the literature for the adsorption of CBZ (Delhiraja et al. 2019;Turk Sekulic et al. 2019;Kebede et al. 2019), which are presented in Table 4, MAC4 performs well.
Very few studies report on the application of MAC in the removal of CBZ from water (Shan et al. 2016;Wong et al. 2016;Baghdadi et al. 2016), which have been included in  Table 4. It is the case of Shan et al. (2016) who used a wastebased MAC (S BET = 486 m 2 g −1 ; M S = 20.8 emu g −1 ) for CBZ adsorption in ultrapure water. This study determined an adsorption capacity of 135.1 mg g −1 for the magnetic adsorbent and an equilibrium time of 10 h. Apart from the present study, the work of Baghdadi et al. (2016) is, to the best of the author's knowledge, the only study reporting on the adsorption capacity of a MAC for the removal of CBZ in wastewater. The MAC used was obtained from a commercial activated carbon and presented great surface area (S BET = 1241 m 2 g −1 ) which translated into a great adsorption capacity (q m = 182.9 mg g −1 ), mostly explained by the reduced mass fraction of magnetite nanoparticles in the composite and a concomitant reduction of the magnetization of the composite (M S = q e (mg g −1 ); k 1 (min −1 ); k 2 (g mg −1 min −1 ); q m (mg g −1 ); K L (L mg −1 ); K F (mg 1-1/n L 1/n g −1 ) Fig. 6 Graphical representation of the experimental data and the isothermal model fittings (Langmuir and Freundlich) for the equilibrium adsorption studies using MAC4 in ultrapure water and WWTP effluent 5.06 emu g −1 ) (Baghdadi et al. 2016). The challenge in the production of MAC is finding the right compromise between adsorption capacity and immediate and efficient recoverability from the aqueous matrix. Although with inferior performance when compared with other MAC in Table 4, the here produced MAC4 is readily and effectively separated from solution (M S = 39.84 emu g −1 , Table 2) which was a key objective of this study. Significantly, this work provides a pathway for the upcycling of a cellulosic industrial waste into an addedvalue product with application in the removal of pharmaceuticals from water which enforces the principles of a circular economy. Future works include further optimization of the production with the intent of minimizing the negative effect of the magnetic nanoparticles in the adsorptive performance while assuring successful recuperation from the aqueous matrix. Nonetheless, the results provide a promising insight on the potential application of a waste-based MAC in the removal of CBZ from real WWTP effluents.

Conclusions
In this study, a waste-based MAC was successfully produced from primary sludge from the pulp and paper industry via in situ coprecipitation of magnetic iron oxides, and applied in the removal of CBZ from ultrapure water and WWTP final effluent. The impartment of magnetic properties to the WPAC resulted in poorer textural characteristics, namely surface area and micropore volume (S BET, W 0 ), resulting from pore blockage, as confirmed by SEM analysis, and from the introduction of the inactive magnetic mass fraction (low S BET ). This was considered the main factor leading to the decrease in the adsorptive performance verified for all produced MAC in comparison with their precursor. The selected MAC4 (S BET = 551 m 2 g −1 ) combined immediate and efficient magnetic retrievability (M S = 39.84 emu g −1 ) with good CBZ removal percentage. The kinetic studies of MAC4 revealed very short equilibrium times in ultrapure water (15-30 min) and in WWTP effluent (45-60 min), even shorter than those determined for the precursor WPAC. According to the maximum adsorption capacities determined by the Langmuir adsorption model, the q m of MAC4 in both ultrapure and wastewater was approximately 3 times lower than that of WPAC, mostly due to S BET differences. Matrix effects were not significant when comparing the q m results for MAC4 in ultrapure water and WWTP effluent (68 ± 4 and 60 ± 3 mg g −1 , respectively), which is a favourable result in view of the practical application of MAC4 for the tertiary treatment of wastewater. Overall, this study points out the potential of MAC4 in the removal of CBZ from WWTP final effluents and represents a step forward towards the application of magnetically retrievable waste-based activated carbons in continuous WWTP tertiary treatment systems for the adsorption of pharmaceuticals.
Funding information This work is a contribution to the project WasteMAC (POCI-01-0145-FEDER-028598) funded by FCT -Fundação para a Ciência e a Tecnologia, I.P., through national funds, and the co-funding by the FEDER, within the PT2020 Partnership Agreement and Compete 2020. Thanks are also due for the financial support to CESAM (UID/AMB/50017/2019), to FCT/MCTES through national funds, and the co-funding by the FEDER, within the PT2020 Partnership Agreement and Compete 2020. Marta Otero and Diogo Pereira thank FCT funding through IF Program (IF/00314/2015). Vânia Calisto is thankful to FCT for the Scientific Employment Stimulus support (CEECIND/00007/2017). María V. Gil acknowledges support from a Ramón y Cajal grant (RYC-2017-21937) of the Spanish government, co-financed by the European Social Fund (ESF).