Introduction

Food additives critically impact food safety and quality1. In the food industry, both natural and synthetic colours are frequently utilized2. Natural dyes are usually unstable and readily destroyed during food processing. Therefore Synthetic dyes with chemical compounds similar to natural colorants are extensively utilized in food products3.

Azo dyes, the largest group of synthetic food colorants, constitute 70% of all organic dyes produced worldwide4. They are decomposed and converted into secondary amine metabolites called benzidine due to the activity of microorganisms and heat, which are often more stable and resistant to oxidizing agents, pH variations, heat, UV radiation, acids, and alkalis in terms of their complex chemical structure3,5,6. Toxicological studies indicated that azo dyes could cause mild to severe side effects, such as persistent headaches, hyperactivity in children, asthma, allergic reactions, urticarial, liver and kidney disorders, cancer, and interference with human serum albumin and hemoglobin7,8,9,10.

The list of permitted food colorants varies from country to country11,12,13. The permitted synthetic food dyes in Iran include sunset yellow (orange), quinoline yellow (yellow), brilliant blue (blue), indigotin or indigo carmine (blue), Allura red (red), ponceau (red), and carmoisine (red). However, they have been prohibited in some products, e.g., ice cream, drinks, fruit juice, desserts, and traditional products14.

Sunset Yellow, a famous synthetic food dye, is a hydroxyl mono-azo disulfone dye with conjugated aromatic rings and an azo functional group (N = N)13. The maximum daily intake of 4 mg per kilogram of body weight has been determined for this colorant by the World Health Organization (WHO) and the Food and Agriculture Organization (FAO)15,16. Its maximum allowed level in alcoholic and non-alcoholic beverages is 200 and 50 mg L−1, respectively16.

Two widely used methods for removing dyes as contaminants from food sources include the adsorption process in the presence of a sorbent and photodegradation in the presence of a photocatalyst17,18. The adsorption process involves binding contaminant molecules to a solid material, known as a sorbent, resulting in their removal from real samples19,20,21,22. This method can be tailored to target specific dye molecules, making it versatile and precise. It effectively removes a wide range of synthetic dyes commonly used in the food industry and is cost-effective and environmentally friendly23. The procedure can be customized to different food matrices and is easily applicable to various types of food products24. Additionally, the reusability of sorbents makes the process economically viable and reduces waste generation, highlighting its environmental sustainability.

Nanostructured materials such as multilayers, nanowires, nanoparticles, and nanocomposites have attracted vast attention due to their specific optical, electrical, chemical, and magnetic properties25,26,27,28,29,30. Simultaneous control of one or more parameters during food production or processing, transportability, and high speed and accuracy evaluation are among the characteristics of nanocomposites31. Spinel ferrites with excellent magnetic and electronic properties and reusability have been interesting magnetic oxide nanoparticles in the last decades32,33. Nickel ferrite, a soft semiconductor spinel ferrite, has high electrical resistance, and low magnetic saturation34,35. For biomedical applications, nanoparticles should be coated with biocompatible polymers like chitosan to ensure stability, biodegradability, and non-toxicity in the physiological environment36,37,38. Chitosan, a natural polymeric sorbent, has been reported to eliminate anionic dyes from solutions39.

The limitation of chitosan is its difficult separation from the final solution. The chitosan-magnetic nanoparticle composites can easily be separated from the solution via an external magnet40.

This research evaluated the adsorption rate of sunset yellow on chitosan-coated nanoparticles. A two-level CCD was utilized to optimize the parameters effective on sunset yellow removal, including sorbent amount, reaction time, dye concentration, and pH. The experimental design reduces the number of tests, costs, and time in the process of optimizing the useful components via the simultaneous examination of several parameters. The adsorption behaviour was examined using pseudo-first-order, pseudo-second-order, and intraparticle diffusion kinetic models, as well as Langmuir and Freundlich isotherms.

Materials and methods

Materials

Chitosan (Low Mw, 50,000–190,000 KDa), NaOH, NiCl2 .6H2O, FeCl3 .6H2O, oleic acid, acetic acid (˃ 98%), and sunset yellow (98%) were supplied by Merck Company (Darmstadt, Germany).

Synthesis of NiFe2O4 nanoparticles

Initially, a solution of NiCl2·6H2O (0.2 M, 20 mL) was combined with a solution of FeCl3.6H2O (0.4 M, 20.0 mL) under stirring at room temperature. The pH of the solution was adjusted to approximately 13 using an aqueous solution of NaOH (3.0 M). The mixture was stirred at 60 °C for 30 min, followed by the addition of 0.01 mL of oleic acid to the solution as a surfactant. The mixture was then heated at 80 °C for 40 min. The resulting brown precipitates (amorphous NiFe2O4 NPs) were separated using a magnet, subsequently rinsed with deionized water and ethanol several times, and finally dried at 80 °C for 2–3 h. The resulting amorphous NiFe2O4 nanoparticles were sealed in a stainless-steel autoclave with Teflon coating and kept at 600 °C for 6 h41,42,43,44,45.

Synthesis of Cs@NiFe2O4 NPs

Chitosan solution was prepared by dissolving 1 g of chitosan with 50.0 mL of 1% acetic acid solution. Subsequently, 0.25 g of NiFe2O4 NPs were added to this solution. The suspension was stirred at ambient temperature for 3 h at 500 rpm. Following this, the mixture was centrifuged to separate the resulting brown precipitates (CS@NiFe2O4 NPs), and then rinsed with ethanol and distilled water before being dried at 60 °C for 12 h41,42. The schematic image of the adsorbent synthesis method is presented in Fig. 1.

Figure 1
figure 1

The schematic image of the adorbent synthesis procedure.

Characterization

Fourier transform infrared spectroscopy (FTIR) was achieved using Bruker Vertor-22 FTIR with a resolution of 4 cm−1 in the 500–4000 cm−1 range. At 25 °C, the X-Ray diffraction (XRD) pattern was captured at 2θ = 5–80° using a 0.04°/min scanning speed. A transmission electron microscope (TEM, EM Philips EM 208S) was employed to observe the particle size and dispersibility of the composite nanoparticles. Using scanning electron microscopy (SEM, MIRA3-LUM, Czech), the morphological properties were also studied, and the specific surface area was found by the Brunauer–Emmett–Teller (BET) Surface Area & Porosity Analyzer (II BELSORP mini, Japan). The mass loss of the materials was investigated with a thermogravimetric analyzer (TGA; TGA STA6000, PerkinElmer Corporation, USA) ranging from 20 to 850 °C at a heating rate of 10 °C/min using nitrogen as purge and protective gas.

Experiment design and optimization

The RSM method was used to design sorption experiments using Design Expert software. This model helps to describe the effect of the influencing factors and interrelationships with the least number of experiments considering optimal values for each factor. A total of 30 experiments were determined according to preliminary tests (Table 1). Data analysis for the desired response, the removal efficiency, was performed considering the confidence interval of 95%.

Table 1 The principal factors, experiments, and responses obtained in the CCD for sunset yellow removal by Cs@NiFe2O4 NPs.

To evaluate the sorption efficiency, the Cs@NiFe2O4 NPs were separated from the samples at the end of the process by centrifuging at 4000 rpm for 10 min. The sediments were removed using a magnet. The absorbance of the solution was calculated using a UV–visible spectrophotometer (Uviline 9400, Secomam) at a wavelength of 485 nm. The dye reduction percentage and the adsorption amount were calculated by Eqs. (1) and (2), respectively.

$$R\%=\frac{\left({C}_{0}-{C}_{e}\right)}{{C}_{0}}$$
(1)
$${q}_{e}=\frac{V}{M}\left({C}_{0}-{C}_{e}\right)$$
(2)

where R is the dye removal efficiency (%), C0 is the initial dye concentration (mg L−1), Ce is the equilibrium dye concentration (mg L−1), qe is the adsorption capacity (mg g−1), V is the sample volume (L), and M is the sorbent mass (g L−1 )46,47.

Adsorption isotherms

Adsorption isotherms, including Langmuir and Freundlich isotherms, were used to investigate the behavior of the synthesized sorbent and the interaction between the sorbent and the dye. Isotherm tests were performed at a pH of 3.84, an equilibrium time of 68 min, and various dye concentrations (10, 15, 20, 25, 30, 35, 40, 45, and 50 mg L−1)46.

Models of the kinetics of adsorption

Intraparticle diffusion, pseudo-first-order, and pseudo-second-order kinetic models were used to control, quantitatively analyze, and determine the mechanism of the adsorption process of sunset yellow dye by the synthesized Cs@NiFe2O4 NPs. The adsorption kinetic parameters were calculated by matching equations obtained from charts with adsorption kinetic equations. Kinetic experiments were performed under varying contact times (10, 20, 30, 40, 50, 60, 70, and 80 min) at an initial dye concentration of 26.48 mg L−1 using the optimized sorbent dose (0.038 g L−1) in the pH of 3.846.

Real sample study

The application of the nanocomposites to remove sunset yellow dye in the orange juices purchased from a local market (Tehran, Iran) and traditional orange juices spiked with 5 mg L−1 of sunset yellow dye was investigated to evaluate the impact of the matrix on dye removal. It has been confirmed that all methods, the experimental data collection, and the plant experiments complied with relevant with relevant institutional, national, and international guidelines and legislation. The samples were placed in an ultrasonic bath for 60 min and then diluted with deionized water. Afterward, the samples were filtered with 0.45 μm membranes. Nanoparticles were added to the sample solution (0.038 g L−1), and after 68 min at 20 °C, they were removed with a magnet from the solution. The absorbance of the samples was measured before adding nanoparticles to the sample solution and after separating the nanoparticles with a spectrophotometer at 485 nm. The removal efficiency was calculated as follows Eqs. (1).

Results and discussion

FTIR analysis

The FTIR spectra of Cs, NiFe2O4 NPs, and Cs@NiFe2O4 NPs are presented in Fig. 2. The FTIR spectrum of Cs indicates a broad band at 3600–3267 cm-1 attributed to O–H (hydroxyl group) and NH2 (amine group) starching vibrations48,49, sharp peaks owing to symmetric and asymmetric C–H stretching vibrations at 2901 cm−1 and 2806 cm−1, respectively, and peaks at 1638, 1423, and 1194 cm-1 due to N–H (amide I) bending, C–N carboxylic vibrations of the glycoside ring, C–O–C respectively50,51.

Figure 2
figure 2

The FTIR spectra of Cs, NiFe2O4 NPs, Cs@NiFe2O4 NPs.

The FTIR pattern of NiFe2O4 NPs demonstrated a characteristic band in 460–595 cm−1 related to the Fe–O stretching vibration. The sharp band in 1764 cm−1 can be assigned to the vibrations of ions of sulfate adsorbed on the particle surface of NiFe2O449,52.

Similar peaks are also observed in the FTIR range of Cs@NiFe2O4 NPs. The only difference is slight variations in the peaks’ appearance and intensity. The results confirmed the successful coating of NiFe2O4 nanoparticles by chitosan, probably through chemical reaction and electrostatic interaction between the chitosan's positively charged surface and the nickel ferrite's negatively charged surface.

XRD analysis

In Fig. 3A and B, the XRD patterns show NiFe2O4 NPs with and without chitosan coating.

Figure 3
figure 3

The XRD patterns of NiFe2O4 NPs (A) and Cs@NiFe2O4 NPs (B).

The peaks at 2θ = 30.12°, 37.23°, 43.26°, 54.32°, 63.85°, 75.40°, and 80.02°, respectively, indicate the crystal planes (222), (311), (400), (422), (440), (533), and (444) (Fig. 3A). NiFe2O4 nanoparticles' XRD pattern matches the XRD spectrum on JCPDS standard card no. 10-032553,54.

The XRD pattern of Cs@NiFe2O4 NPs also revealed distinctive NiFe2O4 NPs peaks (Fig. 3B). The retention of the same characteristic peaks and the unchanged intensity of the peaks after the activation of NiFe2O4 NPs coated by Cs composite implies an ideal compatibility and good interaction with the preservation of the crystal structure of nanoparticles at a high level.

Also there are peaks at 2θ = 20.50° and  10.32°, that are identical to pure chitosan in terms of strength and location50. The chitosan peaks in the XRD pattern of Cs@NiFe2O4 NPs also exhibit a low intensity. It can be explained by how interactions with different monomers cause chitosan's well-crystalline linear structure to be disrupted. These findings supported the effective coating of Cs on nanoparticles.

TGA analysis

The sorbent's thermal stability was examined utilizing thermogravimetric analysis (Fig. 4). The graph illustrates the high stability of NiFe2O4 NPs up to 800 °C, with minimal degradation of approximately 5%. However, upon heating the sorbent (Cs@NiFe2O4 NPs), a decrease in mass is observed at 197 °C, attributed to the removal of water molecules, indicating that the weight percentage of moisture in the absorbent is approximately 8%. Subsequently, a sharp decline in the weight percentage of the sorbent is evident as the temperature increases to 800 °C, signifying the degradation of chitosan. This observation reveals a decrease in weight percentage of 29% at this stage, indicating the percentage of chitosan present in the sorbent.

Figure 4
figure 4

The TGA of NiFe2O4 NPs and Cs@NiFe2O4 NPs.

SEM analysis

The SEM pictures of uncoated and chitosan-coated nickel-ferrite nanoparticles are presented in Fig. 5. The NiFe2O4 NPs (Fig. 5A) demonstrated a high accumulation, relatively large holes, and heterogeneous surface structures. Chitosan-coated nickel ferrite (Fig. 5B) is composed of spherical particles. The average particle size is in the nanoscale, and the largest particles have a diameter of approximately 34 nm. The precipitation rate of the intermediate product is higher than the rate of surface agent arrangement on the particles. After the initial precipitation, chitosan is adsorbed on the particles and declines the surface tension, turning them into spheres with an appropriate surface-to-volume ratio, which leads to the formation of well-differentiated nanospheres with floatability. These findings indicate how chitosan works to keep particles from sticking together and confirm the coating of particles by chitosan. The results were consistent with others55,56.

Figure 5
figure 5

The SEM images of NiFe2O4 NPs (A) and Cs@NiFe2O4 NPs (B).

TEM analysis

The internal structure and microstructural characteristics of NiFe2O4 and Cs@NiFe2O4 NPs were analyzed by TEM (Fig. 6). The NiFe2O4 nanoparticles (Fig. 6A) showed spherical or elliptical shape with various sizes that aggregated due to strong magnetic dipole interactions.

Figure 6
figure 6

The TEM images of NiFe2O4 NPs (A) and Cs@NiFe2O4 NPs (B).

The incorporation of Cs into NiFe2O4 NPs changed the surface morphology and roughness. The TEM image (Fig. 6B) indicates that the rod-shaped particles are a result of the formation of chitosan nanoparticles within the sorbent structure. Additionally, a reduction in the aggregation of NiFe2O4 NPs is observed as they are dispersed within the chitosan solution during the synthesis of the sorbent. The image reveals that the structure of the sorbent is not uniform, with chitosan nanoparticles generally forming as rod-shaped particles positioned on the surface of NiFe2O4 NPs in certain areas. The TEM images indicated a uniform distribution of Cs@NiFe2O4 NPs with a typical size of 25 ± 5.05 nm. This finding confirms the potential of the developed composite material as an effective platform for a wide range of applications42,56.

BET analysis

Accurate surface area and porosity measurement is essential for many applications, including catalysts, nano-sorbents, chemicals and additives, pharmaceuticals, and Food-related companies, as well as in nano-structures like metal nanoparticles, nano-tubes, nano-fibers, etc. Determination of the molecule's surface area helps to calculate the surface occupied by the molecule, the sorbent amount, and the total sample area. The surface area of the synthesized Cs@NiFe2O4 NPs was measured using the BET test57. Based on the results, the surface area of the particle was 59.134 m2 g−1, the medium pore diameter was 13.22 nm, the micropore volume was 0.279 cm3 g−1, and the porosity was meso-type (Fig. 7).

Figure 7
figure 7

The BET image of Cs@NiFe2O4 NPs.

The type IV isotherm was obtained for the nanocomposite. This type of isotherm is used for porous materials and industrial catalysts, indicating the porous structure of the nanocomposite. Moreover, it demonstrates that the composite has very narrow pores in the capillary form, significantly enhancing the adsorption and the condensing of the sorbent on the surface. The corresponding curve was utilized to determine the pore size distribution 57,58.

Modeling the sorption process

The impacts of several factors, including contact time, sorbent amount, pH, and dye concentration, were investigated on the removal efficiency of sunset yellow dye to maximize effectiveness of dye removal.

A two–level CCD comprising 30 runs of experiments on a block with a random run order was utilized to eliminate uncontrolled factors’ effects. Each experiment was carried out three times, and the average adsorption amount was utilized to calculate the removal efficiency. The designed experiments and the results are presented in Table 1.

The one-way ANOVA test with a confidence interval of 95% was used to evaluate the effect of each factor (Table 2). The analysis of variance demonstrated a high significance of the presented polynomial regression model to predict sunset yellow adsorption on Cs@NiFe2O4 NPs (P ˂ 0.05). Moreover, The p-value for lack of fit (LOF) indicates that the proposed model accurately describes experimental responses. The R-squared and adjusted R-squared (93.07 and 96.42, respectively) indicated a significant ability of the model to predict variations. Besides, the low standard deviation (4.22) and coefficient of variation (5.64%) represented a high accuracy and low error of the experiments.

Table 2 The ANOVA test for sunset yellow adsorption on Cs@NiFe2O4 NPs.

In the normal probability diagram, there are more points around the base line, which indicates that the curve follows the normal distribution (Fig. 8A).

Figure 8
figure 8

The normal probability (A), random distribution of residuals (B), predicted values versus experimental values (C), and Box-Cox (D) plots.

The error diagram of the residuals displayed the random distribution of the data around the baseline, indicating that the results do not follow a specific pattern, which reflects the adequacy of the proposed response surface model to remove the sunset yellow dye (Fig. 8B). The Fig. 8C exhibited the consistency of the predicted and experimental results. The Box-Cox diagram (Fig. 8D) indicated the normal distribution of the data, representing the adequacy of the proposed model in removing the dye.

Table 2 shows the significant effect of all the factors and the interactions F4*F4, F1*F1, and F2*F2 on the removal efficiency of sunset yellow dye, with F4*F4 as the most significant. Four two-way interactions between dye concentration and sorbent amount (F1*F2), sorbent amount and contact time (F2*F3), sorbent amount and pH (F2*F4), and pH and contact time (F3*F4) indicated a significant effect on sunset yellow removal and other two-way interactions were not considerable for dye removal.

Regression analysis can be calculated using the central composite design to express the relationship between significant variables and experimental responses. Based on the findings, a full quartic mathematical model is the most effective way to determine this relationship, as shown by the following Eqs. 3.

$${\text{Removal Efficiency }}\left( \% \right) \, = { 2}.{\text{14F}}_{{1}} + { 2}.{\text{93F}}_{{2}} + { 7}.{\text{16F}}_{{3}} - { 1}0.{\text{51F}}_{{4}} + {3}.0{\text{5F}}_{{1}} {\text{F}}_{{2}} - { 1}.{\text{43F}}_{{1}} {\text{F}}_{{3}} + { 1}.0{\text{7F}}_{{1}} {\text{F}}_{{4}} + {7}.{\text{34F}}_{{2}} {\text{F}}_{{3}} + {2}.{\text{86F}}_{{2}} {\text{F}}_{{4}} + { 2}.{\text{53F}}_{{3}} {\text{F}}_{{4}} {-}{ 7}.{\text{26F}}_{{1}}^{{2}} {-}{ 5}.{\text{79F}}_{{2}}^{{2}} {-} \, 0.{\text{2934F}}_{{3}}^{{2}} {-}{ 8}.{\text{29F}}_{{4}}^{{2}} + { 87}.{76}$$
(3)

Effect pH

In this study, we looked into the effect of pH in the range of 3–9 on dye adsorption by Cs@NiFe2O4 NPs. Figure 9 shows the impact of pH and sorbent amount interaction about the adsorption of azo dye molecules by the synthesized nano-sorbent. The results indicated that decreasing pH led to a significant increase in adsorption capacity of the sorbent and efficiency of dye removal. Two processes may occur for adsorbing the anionic dye onto the sorbent. First, the sunset yellow dye penetrates the sorbent pores through physical adsorption. Therefore, the sorbent components chitosan and magnetic Fe2O4 significantly impact the process. Second, it is due to intermolecular links (O–HN, O–Hπ) and electrostatic interactions between the positive surface charge of Cs@NiFe2O4 NPs and the negative charge of the anionic dye.

Figure 9
figure 9

The interaction of sorbent and pH.

It has been indicated that raising the pH to ˃7 results in a negative charge on the sorbent surface, and at lower pHs, a positive surface charge will be created. The Sunset yellow is an anionic compound. Therefore, enhancing electrostatic attraction in the middle of the sorbent and the dye is the main factor in increasing adsorption capacity. At acidic pHs, the amine groups of chitosan will be protonated, increasing the electrostatic force between the negatively charged dye molecules and the positively charged sorbent active sites. Under alkaline conditions, the production of hydroxide functional groups in the environment leads to a negative charge on the sorbent surface, resulting in a weak interaction or even a repulsive electrostatic force between the anionic dye molecule and the sorbent, decreasing the adsorption amount. The results were consistent with those of Travolo et al.59 and Aliabadi et al.60.

Sorbent amount, dye concentration, and contact time

Increasing the dosage of sorbent and reducing the initial dye concentration resulted in a higher removal percentage (Fig. 10A). The explanation for this is that at low dye concentrations, and high sorbent dosage, more active sites are available to adsorb a higher dye percentage. Increasing initial dye concentration decreases the removal percentage due to filling adsorption sites at higher concentrations. Moreover, it resulted in a higher dye adsorption capacity by increasing the driving force for mass transfer on the sorbent surface.

Figure 10
figure 10

The interactions of sorbent dose and dye concentration (A) and sorbent dose and contact time (B).

Increasing the sorbent amount and contact time enhanced the dye removal efficiency (Fig. 10B). The color adsorption on the sorbent is maximum in the first minutes due to the high contact surface and accessibility of the sorbent sites. After equilibrium, it decreases by the saturation of surface active sites of the sorbent. Therefore, the sorbent is no longer available to remove the color. Results were in line with the studies of Roosta et al.61, Sadegh et al.62.

Adsorption isotherm

Adsorption isotherm is an important factor in the design of absorption systems and describes the interaction between the sorbent and the adsorbed material. Therefore, it is always considered substantial for determining the capacity for adsorption of a sorbent and optimizing the sorbent amount. The data on equilibrium obtained to aid in the absorption of sunset yellow in the concentration range of 10–150 mg L−1 on the sorbent (0.045 g L-1) by the Langmuir and Freundlich isotherms (Table 3) were used to match the experimental data, which represent information about the system and the capability for adsorption of the sorbent. The linear versions of the Langmuir and Freundlich equations (Eqs. 4 and 5, respectively) are as follows63,64,65.

Table 3 Adsorption kinetics and isotherms for sunset yellow removal by Cs@NiFe2O4 NPs.
$$\frac{{{\text{C}}}_{e}}{{q}_{e}}=\frac{{C}_{e}}{{q}_{max}}+\frac{1}{{bq}_{max}}$$
(4)
$${{\text{ln}}q}_{e}={{\text{ln}}k}_{f}+\frac{1}{n}{{\text{ln}}C}_{e}$$
(5)

Where Ce and qe are the initial concentration of the dye in the sample solution and the equilibrium adsorption amount per sorbent mass (mg g−1), respectively. The qmax, b, kf, and n are the maximum monolayer adsorption capacity (mg g−1), Langmuir constant (mg L−1), maximum Freundlich adsorption capacity (mg g−1), and adsorption intensity, respectively.

The graphs of Ce/qe versus Ce and ln qe versus ln Ce were drawn to determine the values of the parameters and determine the appropriate isotherm model using the regression coefficient (R2). According to the findings, Freundlich isotherm (Fig. 11B) can better predict dye adsorption by Cs@NiFe2O4 NPs than Langmuir isotherm (Fig. 11A). Therefore, it was concluded that the sorbent surface is heterogeneous, and adsorption is mainly performed in several layers. These outcomes matched up with what was seen in the sorbent's SEM photos.

Figure 11
figure 11

Langmuir (A) and Freundlich (B) sorption diagrams (n = 3).

According to the Freundlich equation, the adsorption intensity (n) is usually utilized to evaluate the desirability of the process of adsorption. Optimal adsorption happens when the value of n is in the range of 1 to 10. The attained value of n is 1.85, indicating the process of adsorption appropriateness. The highest adsorption capacity of sunset yellow dye on Cs@NiFe2O4 NPs (qmax) was determined using the Langmuir equation's slope as 212.766 mg g−1.

Adsorption of kinetics

Adsorption kinetics were looked into to understand the dynamics of dye adsorption on Cs@NiFe2O4 NPs due to the abundance of functional groups, such as an increased surface-to-volume ratio, oxygen, and to prepare a predictive model that allows estimating the amount of dye adsorbed during the process. This information can be used to design large systems. Therefore, model kinetics, including pseudo-first-order, pseudo-second-order, and intraparticle diffusion, were extensively used to examination of adsorption process kinetics and fitness of the data on adsorption versus time (Table 3). The linear forms of pseudo-first-order, pseudo-second-order, and intraparticle diffusion models (Eqs. 6, 7, and 8, respectively) for use in the kinetic study are as follows66.

$${\text{log}}\,\left({q}_{e}-{q}_{t}\right)= {\text{log}}{q}_{e}- \frac{{k}_{1}}{2.303}t $$
(6)
$$\frac{{\text{t}}}{{q}_{t}}=\frac{1}{{k}_{2}{q}_{e}^{2}}+\frac{1}{{q}_{e}}t$$
(7)
$${q}_{t}={k}_{i }* {t}^\frac{1}{2}+C$$
(8)

where k, qe (mg g−1), and qt (mg g−1) are the rate constant, the amount of dye adsorbed at equilibrium, and that adsorbed at time t (min), respectively. The impact of contact time in the range of 10–80 min under optimal conditions was investigated to evaluate the kinetic models’ capability to estimate the dye adsorption amount by Cs@NiFe2O4 NPs (Fig. 12).

Figure 12
figure 12

The effect of contact time on sunset yellow removal by the CS@ NiFe2O4 NPs (n = 3): The pseudo-first-order kinetic model (A), pseudo-second-order kinetic model (B), and intraparticle diffusion model (C).

The kinetic model of pseudo-first order states that the penetration occurs inside the monolayer, and the variations of the adsorption amount versus time are in proportion to quantity of vacant sorbent sites. The kinetic model of pseudo-first order expresses retarding chemical adsorption process that controls the adsorption, in which the square of the number of unoccupied sites in the sorbent is proportional to the occupation rate of the adsorbed sites.

A linear relationship is obtained by plotting log (qe-qt) versus t, and k1 and qe can be determined from the line slope and y-intercept, respectively. If the y-intercept is not equal to qe, the reaction does not resemble a first-order reaction, even if the diagram has a high correlation coefficient.

Experimental findings for the pseudo-first-order kinetic model (Fig. 12A) and intraparticle diffusion model (Fig. 12C) demonstrated a high degree of non-linearity and a low correlation coefficient.

The pseudo-second-order kinetic diagram (Fig. 12B) obtained by plotting the t/qt values versus t resulted in a straight line with a high correlation coefficient. The second-order kinetic velocity constant (k2) and equilibrium adsorption capacity (qe) were calculated from the y-intercept and the slope of the t/qt graph vs. t, respectively. R2 and qe values demonstrated that the model of kinetic pseudo-second order leads to better results.

The removal efficiency (%) increased up to 68 min and at higher times remaining practically constant. Consequently, the adsorption process is rapid and can achieve equilibrium in under 70 min. This process is mainly performed as a result of the interaction of the anionic dye with the functional groups on the sorbent surface. In addition, low values for the correlation coefficient for the intraparticle distillation model confirmed that the dye diffusion in the pores of the sorbent is notably low, and the sunset yellow adsorption is caused by physical or chemical interactions with CS@NiFe2O4 NPs (Fig. 12, Table 3).

Removal of dye from orange juice samples

The dye removal efficiency of 91.75% and 93.24% was obtained using the nanocomposites for industrial and traditional orange juices, respectively. The outcomes demonstrated that the nanoparticles have acceptable efficiency in the surface adsorption of sunset yellow from the fruit juice samples on a laboratory scale.

Recovery capability

The recoverability of the sorbent is economically significant, indicating the cost-effectiveness of using the sorbent in pollutant removal, the constancy of the adsorbed material on the sorbent surface, and the sorbent regeneration conditions. After the removal procedure, the sorbent was washed using distilled water and then separated using a magnet. An aqueous ammonium solution (0.2 M, 1.0 mL) was added to the sorbent and shaken for 10 min at 150 rpm. The sorbent was then washed with distilled water before reuse. The results in (Fig. 13A) demonstrated that the adsorption efficiency of sunset yellow dye by Cs@NiFe2O4 NPs did not significantly change up to 5 cycles and was above 86%. Any decline in the effectiveness of dye adsorption could be attributed to the inadequate separation of the dye from the sorbent, the slight loss of sorbent during its separation from the solution, and the degradation of the sorbent structure during the dye removal step. Consequently, the synthesized nanocomposite is an effective and enduring sorbent for sunset yellow dye removal, consistent with the findings of Ansari et al.56 and Habiba et al.67. To evaluate the change in the sorbent structure after the desorption process, the XRD pattern of the sorbent after five adsorption–desorption cycles is shown in Fig. 13B, indicating no significant change in the sorbent structure. Only a slight decrease in the intensity of the peaks in this pattern compared to the initial pattern of the sorbent was observed. The SEM image (Fig. 13C) clearly shows that pores remained on the surface of Cs@NiFe2O4 NPs, indicating that less pores may be saturated by the dye sunset yellow during the adsorption process.

Figure 13
figure 13

Reusability of Cs@NiFe2O4 NPs for sunset yellow removal (n = 3) (A), XRD pattern (B) and SEM image (C) of Cs@NiFe2O4 NPs after five adsorption–desorption cycles.

Comparison with other sorbents

Table 4 presents a comparison of the efficiency of the synthesized sorbent with other sorbents previously studied for the removal of sunset yellow dye. The data indicates that the developed sorbent demonstrates a favorable adsorption capacity, surpassing most of the prepared sorbents. While sorbent No. 2 (PDMAEMA grafted PS-DVB-VBC) exhibits a higher absorption capacity than the synthetic sorbent, it necessitates a relatively low acidic pH and a larger quantity of sorbent to achieve dye removal. Likewise, the use of sorbent No. 6 (Alligator weed activated carbon) and No. 8 (Thermally reduced graphene oxide) for sunset yellow dye removal requires a significantly longer contact time and a higher amount of sorbent compared to the sorbent prepared in this study, respectively.

Table 4 Comparison of the various sorbents for sunset yellow removal.

Study No. 9, the sorbent (Magnetic Fe3O4 embedded chitosan–crosslinked-polyacrylamide composites) demonstrates superior efficiency for dye removal compared to the prepared sorbent. However, it is noteworthy that the steps, reagents, and synthesis time required for preparing this sorbent are significantly greater than those for the sorbent in the study. Additionally, the use of synthetic polymer compounds in this sorbent, while enhancing its stability, could potentially lead to environmental concerns due to their persistence. Therefore, the synthesized sorbent exhibits the proper ability to remove sunset yellow dye with suitable reusability, adsorption capacity, and contact time, making it a promising candidn ate for the effective removal of this dye from food samples.

Conclusion

Cs@NiFe2O4 NPs, a new magnetic adsorbent, were created and characterized using various techniques. Cs@NiFe2O4 NPs is a green and efficient sorbent for the sunset yellow removal dye from food samples. The importance of Cs@NiFe2O4 NPs as a sorbent for removal of synthetic dyes lies in their high adsorption capacity, regeneration potential, environmental friendliness, and fast adsorption rate, making them a promising solution for addressing the challenges of synthetic dye removal in industrial settings. The process of adsorption's main contributing variables, such as pH, contact time, dye concentration, and sorbent amount, were carefully tuned using a design experiment methodology. The sunset yellow dye was adsorbed to the developed nanocomposite mainly by electrostatic interactions. Adsorption data were matched with Freundlich isotherm and models of pseudo-second-order kinetics. The produced sorbent showed excellent efficiency for the recovery of sunset yellow dye, which was greater than 86% after five cycles of adsorption and desorption. The recovery data for juice samples indicated that the synthesized nanocomposite could be an efficient sorbent for sunset yellow removal in food samples.