1 Introduction

The severe impact of corrosion is seen in industries such as plant shutdown, environmental pollution, and economical loss. It is a great menace to the national economy and industrial structure [1]. Unfortunately, we cannot fully prevent corrosion, and the only method is to control the corrosion using various techniques. This can be done either by slowing down the kinetics of the reaction or by altering the mechanism. Mild steel is a commercially available metal, extensively employed in industrial applications and construction of buildings, storage tanks, ships, etc., because of its extraordinary tensile strength, ductility, malleability, and easy accessibility [2, 3].

Acid solutions are mainly used for pickling, descaling, and cleaning applications in industries. Commercial acids like hydrochloric, sulfuric, and phosphoric acid are used for these purposes [4, 5]. Sulfamic acid (NH2SO3H) is preferred as a pickling agent as it dissolves hard scales and deposits [6]. Although the use of SA solution has a significant role in the cleaning application, the literature review discloses that there are only limited studies of the corrosion behavior of different metals in this medium [7,8,9]. SA is available in solid form, so it is easy to handle and formulate [10]. Moreover, harmful fumes are not produced by SA but, some materials can get corroded in the pH range of 6–12.

Owing to the corrosive action of acid medium over metallic material, the use of inhibitors is considered an effective control technique. In the last few decades’ organic inhibitors containing polar functional groups which it is strongly adsorbed on the metal surface and can act as an anti-corrosive agent by isolating the metal from the corrosive agents have been used widely [11,12,13]. However, the use of organic inhibitors is losing ground because of their hazardous effect on the environment as well as on mankind [14]. This encouraged researchers to search for a replacement for organic inhibitors and the lacunae are filled with the eco-friendly, non-toxic inhibitor which led to the exploration of green inhibitors. Green inhibitors are biocompatible with the natural environment which includes plant extract, amino acids, drugs, biopolymers, and so on.

Various green inhibitors are studied by several researchers. Nevertheless, the current trend mainly focuses on polymers as green inhibitors. Because of their structural diversity, they are expected to be a viable option for green corrosion inhibitors. Biopolymers are the one that belongs to the same category and find a broad spectrum of applications in medicine, electronic devices, and food industries due to their harmless and environmentally benign nature. It has a large number of –OH groups, and these –OH groups are responsible for their enhanced solubility in water. The dissolved inhibitor molecules can be adsorbed well on the metal surface and eventually lead to an increase in the inhibition efficiency [15]. The biopolymers are decomposable, chemically stable, and possess unique impeding strengths. Its mechanistic approach to the metal surface was able to provide bulk protection [16].

Guar gum (GG) is a natural polysaccharide that originated from the endosperm of the seed of the legume plant Cyamopsis tetragonoloba composed of both galactose and mannose sugar units. The backbone of GG consists of a linear chain of 1,4-linked mannose residues. The short side branches are formed by linking 1,6 linked galactose residues to every second mannose. The structure of the GG unit is given in Fig. 1. The presence of a greater number of heteroatoms in the GG molecule facilitates the formation of coordinate-type linkage with the empty orbitals of the MS surface and a stable chelate ring with ferrous ions [17]. Functionalization and grafting of GG with various molecules have been studied for improved anticorrosion behavior in an acid medium.

Fig. 1
figure 1

Structure of guar gum

The unique properties of graphite oxide (GO) account for its high mechanical strength and electrochemical properties. At the outset, the negatively charged functional groups can repel anions that normally facilitate corrosion. The hydrophilic nature of GO possesses improved water dispersibility due to oxygen-containing functionalities [18, 19]. Therefore, GO could be an excellent filler and functional material for polymer composites in anticorrosion applications. For instance, functionalized graphene oxide with hydroxyls, epoxides, carboxyl, amine groups, etc., can improve the usability of the graphene as a corrosion inhibitor. Interestingly, to the best of our knowledge, the inhibition potential of xGO/GG polymer composite is not studied in SA solution against MS. Thus, the present work is an attempt to explore its anticorrosion behavior on MS in SA solution.

The corrosion inhibition behavior of GG on MS in 1 M SA solution at 303 K was examined by potentiodynamic polarization (PDP) and electrochemical impedance spectroscopy (EIS) techniques. As the inhibition efficiency of GG was on the lower side, an attempt was made to enhance its efficiency by preparing a composite of xGO and GG. The characterization of GG and xGO-GG polymer composite was done using Fourier transform infrared (FT-IR) spectroscopy and X-ray diffraction (XRD). The effect of temperature on the corrosion inhibition efficiency of xGO-GG polymer composite against mild steel-acid corrosion at different intervals of immersion was explored using the WL method.

The optimization process is one of the most commonly documented applications in corrosion study to regulate the levels of process constraints which result in an outcome of maximum value [21]. Various techniques are often employed in optimization studies as they involve much less time, chemical reagents, and less experimental work. The response surface method (RSM) is a useful technique to assess the influence of various factors and their relations on the measured outcome with a certainly lower number of investigations [22, 23]. If the considered independent variables are repeating and measurable, the response surface is expressed as:

$$y = f(x_{1} ,x_{2} , \ldots ,x_{k} )$$
(1)

where x1 to xk are independent input variables. A quadratic polynomial is generally employed to correlate the independent variables with the response surface.

$$y = b_{0} + \sum\limits_{i = 1}^{n} {b_{i} x_{i} } + \sum\limits_{i = 1}^{n} {b_{ii} x_{i}^{2} } + \sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{n} {b_{ij} x_{i} x_{j} } }$$
(2)

where y output; b0 constant coefficient; bi linear coefficient; bii quadratic coefficient and bij interaction coefficient. The least square regression was used to obtain the above-mentioned coefficients. xi and xj are the independent variables [24].

2 Experimental Procedure

2.1 Working Specimen and Corrosive Medium

A commercially accessible MS rod was used to prepare specimens of the required dimension. The composition of the mild steel was 0.432% C, 0.187% Si, 0.77% Mn, 0.0085% P, 0.011% S, 0.011% Cr, 0.0063% Ni, 0.019% Mo, 0.039% Al, 98% Fe. The specimen was then molded with cold setting resin with an exposed area of 1 cm2. The metal surface was abraded using different grades of polishing papers, and then disk polishing was done using levigated alumina abrasive to obtain a mirror finish on the surface. This freshly polished surface specimen was used to study its corrosion behavior in SA solution containing various concentrations of inhibitor at different temperatures.

The medium used was 1 M SA, procured from Sigma-Aldrich, and the percentage purity was found to be 99.3%. Exactly, 97 g of SA crystals were dissolved in 1 L of distilled water to prepare the stock solution of corrosive medium, and it was standardized using the volumetric method.

2.2 Inhibitor Preparation

The biopolymer namely GM procured from Sigma-Aldrich. The required inhibitor concentration was prepared by dissolving a known quantity of GG in 1 M SA solution. The corrosion inhibition studies were performed using calibrated thermostat at room temperature.

2.2.1 Synthesis of xGO

2 g of graphite flakes and 60 mL of concentrated H2SO4 were taken in a 250-mL round-bottom flask. 1.5 g of sodium nitrate and 8 g of potassium permanganate were added gradually under stirring below 5 °C followed by 50 mL of distilled water. The reaction mixture was then stirred for 1 h, and to the stirred solution, 3 mL of 30% hydrogen peroxide was added. The solid product was separated by centrifugation and washed repetitively with 5% HCl solution. The suspension was subjected to ultra-sonication and then dried in an oven at 90 ̊C for 6 h to obtain exfoliated oxidized graphite flakes.

2.2.2 Preparation of xGO/GG Polymer Composite Film

2.5% w/w of xGO/GG polymer composite was prepared by distributing 12.5 mg of xGO in 487 mg of GG which was dissolved in 5 mL of distilled water. The content was sonicated at 37 ± 3 kHz for 10 min. The solution was cast into a film on a petri dish at room temperature. The formation of xGO and the xGO/GG composite film was confirmed by scanning electron microscope, FT-IR, and X-ray diffraction study.

2.3 Electrochemical Measurements

The PDP and EIS techniques were employed to measure the corrosion rate of MS in SA solution. A three-electrode system comprising platinum (counter), mercury–mercurous (calomel-reference), and a working electrode connected to the electrochemical work station (CH600 D-series). The open-circuit potential (OCP) was achieved at a steady rate by leaving the electrochemical system in an unchanged condition at the end of 30 min. In PDP method, the Tafel plots generated by sweeping the potential in the range of − 250 to + 250 mV at a scan rate of 1 mV/s with respect to OCP. EIS technique delivers the Nyquist plots by applying a small amplitude ac signal of 10 mV between the frequency range of 10 kHz to 0.01 Hz at the OCP.

2.4 Weight Loss Measurement

In weight loss studies, previously weighed cylindrical test specimens of MS are immersed in 1 M SA solution in the absence and presence of different concentrations (0.005, 0.03, and 0.06 g/L) of xGO/GG polymer composite at different intervals of time (in h). The specimens are then removed from the immersion environment, and the surface was cleaned to remove the oxide deposit, washed with acetone, dried, and weight was noted. The difference in the specimen weights before and after corrosion was compared to calculate the loss in weight due to corrosion. The corrosion rate (CR) and IE are obtained from Eqs. (3) and (4), respectively [25].

$${\text{CR}} = \frac{87.6 \times \Delta w}{{\rho \times \alpha \times t}}$$
(3)
$$\% {\text{IE}} = \frac{{W_{0} - W_{1} }}{{W_{0} }} \times 100$$
(4)

Δw indicates weight loss due to corrosion, \(\rho\) indicates the density of mild steel (7.75 g/cm3), \(\alpha\) stands for total surface coverage of the sample (1 cm2), and t is the immersion time in hours. Here, W0 and W1 are loss in weight in the absence and presence of inhibitor.

2.5 Response Surface Method

The experiments were designed using the Box-Behnken method (BBD). The results obtained from the experiments are designed based on BBD and are used as a data basis for establishing the RSM. The equations were created based on experiments, and the coefficients were solved using the least square method [26]. The chief objective of this study is to inspect the impact of independent variables like temperature (A), inhibitor concentration (B), and time (C) on the corrosion inhibition properties of the MS in SA solution using the RSM approach at three different levels (− 1, 0 and + 1). The input levels of independent variables used in RSM are given in Table 1.

Table 1 Input levels of independent variables used in RSM

3 Results and Discussion

3.1 Characterization of xGO/GG Polymer Composite

3.1.1 FT-IR Studies

The IR spectra of xGO, GG, and xGO/GG are shown in Fig. 2. The IR spectrum of xGO depicted an intense peak at 1700 cm−1 for carbonyl (C=O) stretching of the carboxylic group. The hydroxyl (O–H) stretching of the carboxylic group was observed at 3321 cm−1 as intense broadband. This confirms the oxidation of graphite flakes [27]. Another sharp peak at 1586 cm−1 is corresponding to the –C=C– stretching of graphite layers. In the FT-IR spectrum of the GG sample, prominent absorption peaks were observed at the regions 3350 and 1640 cm−1 corresponding to the –O–H and –C–O–C– ring stretching, respectively [28]. The –CH2 stretching and bending peaks were observed at 2875 and 1015 cm−1, respectively. In the FT-IR spectrum of xGO/GG composite, the characteristic absorption peaks of GG were observed as it is in the pristine sample with slight broadening. This broadening could be due to the hydrogen bonding interactions between the hydroxyl groups of guar gum and carboxylic groups of the exfoliated graphite. The characteristic peaks of the exfoliated graphite oxide corresponding to the –O–H stretching and –C = C– stretching might have been buried in the hydroxyl and –C–O–C– ring stretching peaks of GG. The –C=O stretching of the carboxylic group of xGO appeared at 1690 cm−1 as a small dent on the –C–O–C– stretching peak of guar gum.

Fig. 2
figure 2

Overlay of FT-IR spectrum of a exfoliated graphite oxide (xGO), b graphite oxide and c xGO/GG polymer composite film

3.1.2 Optical Microscopic Analysis

The optical microscopic image of the composite film was taken under transmission mode (Fig. 3). The image showed the distribution of xGO particles of various sizes below 10 μm in the gaur gum matrix.

Fig. 3
figure 3

Optical microscopic image of the polymer composite film

3.1.3 Scanning Electron Microscope Study

The nature and morphology of GO and the composite film were examined by the field emission scanning electron microscope (FESEM) equipped with the energy dispersive spectroscopy technique (FESEM Ultra 55 Karl-Zeiss). The SEM image of commercial graphite powder was taken to analyze the flake size and appearance. A sheet of graphite is shown in Fig. 4a which has a particle size greater than 1 µm in thickness. It is also seen that the sample contains smaller chunks along with it. The SEM image (Fig. 4b) showed the morphology of smoother micro-sized partially oxidized exfoliated graphite flakes. The average thickness of the flakes was measured to be 0.45 µm, and the diameter was between 25 to 100 µm.

Fig. 4
figure 4

SEM image of a graphite powder, b partially oxidized exfoliated graphite flakes, c topography of the composite film

It is clearly visible from the SEM images (Fig. 4c) that the topography of the composite film surface is non-homogeneous. The surface of the composite film contains a large number of groves and crevices along with clusters of fine particles of varying sizes in nanometers.

3.1.4 XRD Analysis

The XRD pattern of xGO represented in Fig. 5 shows an amorphous structure with a characteristic broad peak at 26.58° which corresponds to the (002) plane of graphite [29]. The interlayer d-spacing was found to be 3.351 Å using Bragg’s equation. The XRD pattern of both guar gum and the composite film depicted an amorphous structure. The crystalline regions of guar gum were seen at the angle 17.39°, 20.09°, and 22.40° [30]. These crystalline regions in the composite film were seen almost at the same angle with decreased peak intensity at 16.63°, 19.70°, and 22.19°.

Fig. 5
figure 5

XRD of xGO, GG, and xGO/GG polymer composite film

3.2 Electrochemical Measurements

Electrochemical measurements such as PDP and EIS were performed to compare the corrosion inhibition performance of both GG and xGO/GG polymer composite on MS in 1 M SA solution. Figure 6a, b shows the Tafel plots for the corrosion of MS in 1 M SA in the absence and presence of GG and xGO/GG polymer composite, respectively. The PDP constraints such as anodic corrosion potential (Ecorr), corrosion current density (icorr), and CR measured at 303 K are recorded in Table 2. The inhibition efficiency (%IE) values are calculated using equation [31] and are recorded in Table 2.

$${\text{IE}}(\% ) = \frac{{i_{{{\text{corr}}}} - i_{{{\text{corr}}({\text{inh}})}} }}{{i_{{{\text{corr}}}} }} \times 100$$
(5)

where icorr and icorr (inh) indicate the corrosion current density in the absence and presence of inhibitor respectively.

Fig. 6
figure 6

Potentiodynamic plots of MS in 1 M SA solution at 313 K a in the absence and presence of GG; b in the absence and presence of xGO/GG polymer composite

Table 2 Results of PDP measurements for the corrosion of MS in 1 M SA solution in the presence of GG and xGO/GG polymer composite molecules

Inspection of Table 2 reveals that icorr and CR decreased with an increase in the concentration of both the inhibitors. This is attributed to the adsorption of inhibitor molecules onto the metal surface by forming a protective film. This protective film can act as a barrier between the underlying metal surface and the corrosive acid solution [32, 33]. The observed maximum displacement in Ecorr values in the occurrence of inhibitors is less than + 85 mV indicating the mixed inhibition [25]. Maximum efficiency of 74.5% at 0.3 g/L and 93% at 0.06 g/L is obtained, respectively, for GG and xGO/GG polymer composite in 1 M SA solution.

The results obtained from the electrochemical measurements showed that xGO/GG polymer composite acts as an excellent inhibitor even at its lower concentration. It showed an IE of 48.6% at 0.005 g/L (50 ppm) and then increased with an increase in xGO/GG polymer composite concentration and reached 93.4 at 0.06 g/L (600 ppm). The enhanced efficiency of xGO/GG polymer composite may be due to graphite oxide having the capability of ensuring the coatings when used as filler with hydrophobic features and can also weaken the adsorption and migration of corrosive media, which effectively improves the corrosion resistance of the composite film [31]. The hydroxyl groups from the guar gum backbone generate hydrogen bonding interaction with the carboxylic groups of the exfoliated graphite and decrease the pore size along with the film thereby increasing the barrier between the metal and corrosive medium [33].

Even though polymeric coatings have shown very good inhibition performance in acidic solutions against MS corrosion, some polymeric coatings are permeable to different kinds of corrosive species such as oxygen, water, and Cl. The penetration of these corrosive species not only eases the corrosion initiation process, but also decreases the durability of the polymeric coating [34, 35]. The assimilation of graphite oxide into the polymeric coating helps to overcome the penetration or permeability problem but also extends the lifetime of the composite coating. Graphene or graphite /polymer composites can provide an enhanced barrier effect between metal–solution interaction, thereby increasing its inhibition performances [33, 38] and improving the mechanical properties. The hydrogen bonding interaction between the OH groups of guar gum and –COOH groups of the exfoliated graphite forms a protective film at the metal solution interface, thus enhancing the inhibition efficiency [37].

Further, the mechanism of metal–solution interaction is deeply explained by the EIS technique, and the results are expressed in terms of Nyquist or Bode plots. Figure 7a, b depicts the Nyquist plots for GG and xGO/GG polymer composite, respectively, obtained by plotting the imaginary part of the impedance vs the real part of the impedance, and the resultant outcomes are tabulated in Table 3. As observed in the Nyquist plot, the first intersects at a very high frequency corresponding to the solution resistance of the media, while the second intersects at very low frequencies corresponding to the charge transfer resistance.

Fig. 7
figure 7

Nyquist plot of MS in 1 M SA solution at 313 K a in the absence and presence of GG; b in the absence and presence of xGO/GG polymer composite

Table 3 Results of EIS measurements for the corrosion of MS in 1 M SA solution in the presence of GG and xGO/GG polymer composite molecules

The plot showed a depressed semicircle and the diameter of the loop increased with inhibitor concentrations. This can be due to surface inhomogeneity due to the deposition of the corrosion product on the specimen surface [38]. Further, the shape of the Nyquist plot remains unchanged by the addition of GG and xGO/GG polymer composite molecules. This indicates that there is no influence of added inhibitors on the corrosion inhibition mechanism, which remains unaffected both in the absence and presence of inhibitors. The Nyquist plots fitted with suitable equivalent circuits are used to draw the impedance parameters. A simple Randel’s equivalent circuit RQR as shown in Fig. 8a was used to analyze the data in the absence of an inhibitor, and R(Q(R(QR) was used in the presence of GG and xGO/GG polymer composite molecules.

Fig. 8
figure 8

a Equivalent circuit used to fit the impedance data in the absence of inhibitor and b in the presence of GG and xGO/GG polymer composite

The circuit is composed of three resistances like resistance due to solution (Rs), charge transfer (Rct), film formation (Rcoat), and two constant phase elements (CPEcoat and CPEdL). CPE is used in place of pure double-layer capacitance CdL to provide a more accurate fit which occurred due to the heterogeneity in the system. The CPE impedance is expressed as follows [39]:

$$Z_{{{\text{CPE}}}} = Q^{ - 1} \left( {i \, W_{\max } } \right)^{ - n}$$
(6)

where Q—proportionality coefficient, Wmax—angular frequency, and n—exponential term associated with phase shift (0 ≤ n ≤ 1). The modification in capacitance to its actual value is obtained from equation [40]:

$$C_{{{\text{dL}}}} = \frac{1}{{2\pi f_{\max } R_{{{\text{ct}}}} }}$$
(7)

where fmax is the frequency where − Z′′ is maximum.

The polarization resistance (Rp) obtained from the summation of Rct and Rf is then implemented to determine the inhibition efficiency (%IE) as follows [41]:

$$\% {\text{IE}} = \frac{{R_{{{\text{p}}({\text{inh}})}} - R_{{\text{p}}} }}{{R_{{{\text{p}}({\text{inh}})}} }} \times 100$$
(8)

where Rp(inh) and Rp are the polarization resistance obtained in inhibited and uninhibited solutions, respectively.

The Rp values increases as the inhibitor concentration increases which indicates that the corrosion of MS in 1 M SA solution is mainly controlled by the charge transfer process. The decrease in CdL may be attributed to the increase in the thickness of the electric double layer formed at the metal solution interface. The large GG and xGO/GG polymer composite molecules get adsorbed at the metal solution interface by substituting the primarily adsorbed water molecules from the MS surface [42].

3.3 Weight Loss Measurements

The influence of temperature on the corrosion inhibition efficiency of xGO/GG polymer composite is studied using the WL method. Figure 9 shows the effect of WL of MS in 1 M SA solution at varying temperatures and at different time intervals. It is noted that the increase in WL is due to an increase in the exposure time of the working specimen to the corrosive medium. The prolonged exposure of MS specimen to the conducting medium can cause hydrolytic degradation and thus enhance the CR.

Fig. 9
figure 9

Results of WL measurements for MS in 1 M SA solution at different temperatures and at varying time intervals

Figure 10 reflects the WL data and IE for MS in 1 M SA solution containing different concentrations of xGO/GG polymer composite at varying temperatures. The percentage IE enhanced with xGO/GG polymer composite concentration and found a maximum of 84.1% at 0.06 g/L at 1 h of exposure at 303 K. The increase in IE is attributed to the adsorption of xGO/GG polymer composite on MS specimen surface.

Fig. 10
figure 10

Plots of WL data and percentage IE for MS in 1 M SA solution in the presence of xGO/GG polymer composite

3.4 Evaluation of Thermodynamic Parameters

The study of adsorption isotherms aids to explore the metal–solution interaction. It also provides useful information regarding corrosion mechanism. Adsorption of inhibitor molecules can be classified as physical adsorption and chemical adsorption based on their interaction. The nature of the electrolyte, charge present on the specimen surface, and structure of the inhibitor influence the types of adsorption [17]. Different adsorption isotherms were verified for their fit to the experimental data. Langmuir’s adsorption isotherm with R2 − (∼0.99) was able to provide the finest correlation between the experimental result and isotherm function, and it is given by Eq. 9:

$$\frac{{C_{inh} }}{\theta } = \frac{1}{K} + C_{inh}$$
(9)

where K is the adsorption or desorption equilibrium constant, Cinh is the concentration of inhibitor molecule in the solution, and θ is the surface coverage [43]. Langmuir’s plot for different immersion intervals at varying temperatures is shown in Fig. 11.

Fig. 11
figure 11

Adsorption isotherm plots for the corrosion of MS in 1 M SA solution containing xGO/GG polymer composite at different intervals of time and at different temperature

The plots were obtained with a straight line with an intercept equal to 1/K. For the studied temperature range, the observed K values decreased with an increase in exposure time. This could be due to the desorption of adsorbed inhibitor molecules from the metal surface as the time of metal–solution contact increases. In the present case, the Langmuir isotherm was used to achieve a good linear fit for different intervals of immersion at various temperatures.

The standard free energy of adsorption (ΔG°ads) is computed by using Eq. (10).

$$K_{{{\text{ads}}}} = \frac{1}{55.5}\exp \left( {\frac{{ - \Delta G^\circ_{{{\text{ads}}}} }}{RT}} \right)$$
(10)

where Kads, R, T and 55.5 symbolize the adsorption constant, universal gas constant (8.314 J/mol/K), temperature (K) and molar concentration (mol/L), respectively, and the obtained parameters are recorded in Table 4.

Table 4 Thermodynamic parameters for the corrosion of MS in 1 M SA solution containing xGO/GG polymer composite molecules at different temperatures and at varying time intervals

The spontaneous adsorption of the inhibitor on the metal surface is indicated by the negative value of the free energy of adsorption. As per the reported literature, the ΔG°ads values around − 20 kJ/mol or less negative are consistent with the physisorption and those around − 40 kJ/mol or more negative involve chemisorption [44]. In the present case, the observed ΔG°ads are less negative than − 20 kJ/mol which exclusively indicates the physisorption of xGO/GG polymer composite molecules onto the metal surface due to electrostatic attraction between the charged metal surface and protonated inhibitor molecules.

3.5 Mechanism of Inhibition

The adsorption of inhibitor molecules onto the MS-medium interface indicates the primary phase within the system of its inhibition action. Adsorption of an inhibitor is especially prompted through physicochemical features of inhibitor molecules [35, 45]. The metal surface adsorption of the inhibitor is generally facilitated either through electrostatic interaction or electron transfer interaction.

Guar gum is a polysaccharide comprising a backbone of d-mannopyranose monomer units linked to one other by β-(1 → 4) linkage with a side-branch containing a single α-d-galactopyranose connected to units of mannose by α-(1 → 6) linkages [46]. The xGO/GG polymer composite molecules are adsorbed on the MS surface through some active centers like oxygen and hydroxyl groups. The hydroxyl groups from the guar gum backbone generate hydrogen bonding interaction with the carboxylic groups of the exfoliated graphite. This interaction leads to a decrease in the pore size along the film thereby increasing the barrier between the metallic and corrosive medium. The doping of graphite oxide into biopolymer helps to overcome the penetration or permeability problem, but also extends the composite coating life expectancy. Generally, the adsorption of inhibitor molecules can be through physical mode or chemical mode. The protonation of hydroxyl groups present in the inhibitor can cause physical adsorption on the MS surface. This makes the polymer exist as polycation which then gets adsorbed on the negatively charged MS surface [34].

The surface of MS samples is positively charged in an aqueous acid solution due to its initial dissolution in the corrosive medium. Sulfamate ions (H2NSO3­) of sulfamic acid will adsorb on a positively charged MS surface due to excessive electron density and form a negatively charged double layer at the metal solution interface. Thus, the adsorption is aided by the negative layer of neutral inhibitor molecules onto the metal surface by electrostatic interaction leading to physisorption [36]. The chemical interaction may be by the transfer of lone pair of electrons from the hetero-atoms of the inhibitor molecule to the empty orbitals of metal. A schematic representation of the electrostatic interaction of the metal inhibitor is shown in Fig. 12.

Fig. 12
figure 12

Schematic representation for the adsorption of xGO/GG polymer composite molecules onto the metal surface

3.6 Surface Morphological Observation

3.6.1 Scanning Electron Microscopy (SEM) Study

The adsorption of xGO/GG polymer composite molecules on the MS surface can be further confirmed by scanning electron microscope (SEM). The SEM micrograph of mild steel in the absence and presence of xGO/GG polymer composite in 1 M Sulfamic acid is shown in Fig. 13. Figure 13a represents mild steel without inhibitor where the surface of MS is severely corroded by the attack of acid. The addition of xGO/GG polymer composite (Fig. 13b) as an inhibitor results in a clean and smoother metal surface. This proves the potentiality of xGO/GG polymer composite to act as an efficient corrosion inhibitor for MS in sulfamic acid solution.

Fig. 13
figure 13

SEM image of MS immersed in the SA a absence of xGO/GG polymer composite and b presence of xGO/GG polymer composite molecules

3.6.2 Atomic Force Microscopy (AFM) Study

The surface roughness value containing the optimum concentration of xGO/GG polymer composite was quantified by performing AFM, and roughness values obtained are recorded in Table 5. The AFM image obtained in the absence of xGO/GG polymer composite is highly scratched and severely corroded (Fig. 14a). Conversely, in the presence of xGO/GG polymer composite (Fig. 14b), morphology of the surface is improved due to the adsorption of xGO/GG polymer composite molecules, and there is a decrease in the average surface roughness (Ra) and root-mean-square roughness (Rq). The apparent decrease in the roughness value indicates the presence of the protective inhibitor film of xGO/GG polymer composite molecules.

Table 5 Surface roughness values obtained for MS surface immersed in the SA solution (a) absence and (b) presence of xGO/GG polymer composite, respectively
Fig. 14
figure 14

Three-dimensional image of MS immersed in the SA solution a absence and b presence of xGO/GG polymer composite molecules, respectively

3.7 Comparison of Inhibition Performance of xGO/GG Polymer Composite with the Other Reported Functionalized Composites

Table 6 depicts the comparison study for the performance efficiency of xGO/GG with other reported inhibitors [20, 47,48,49,50,51,52] of a similar type. From the table, it can be inferred that the studied inhibitor act as a potential inhibitor for corrosion inhibition of MS in SA solution, as it is showing nearly similar inhibition effi

Table 6 Comparison of xGO/GG polymer composite with the other reported functionalized composites

ciencies in comparison with the other reported inhibitors.

3.8 Response Surface Method

A total of nine experimental runs were completed as obtained from BBD. The variables were individually expressed as a function of the independent variables. The inhibition performance of the inhibitor was assessed by analyzing the response (Y). The response is dependent on the input factors like temperature, inhibitor concentration, and time, and the behavior was observed using a quadratic polynomial equation.

Regression equation in coded units

$$\begin{aligned} {\text{IE}} & = 8.15 + 0.922 A + 1971.9 B + 1.42 C - 0.01263 A*A \\ &\quad- 16559 B*B - 0.052 C*C - 2.61 A*B\\ &\quad - 0.0831 A*C + 23.32 B*C \\ \end{aligned}$$

The results specified a coefficient of determination (R2) of 99.9%, indicating the accuracy of the empirical model to explain experimental data further implying that about 99.9% of the variability in the data was explicated by the model, and only 0.01% remains unexplained by the model.

A small p-value and a large regression coefficient, for any of the model terms, designate the significant impact on the corresponding response variables.

3.8.1 Main Effect

To illustrate the optimal inhibition efficiency for maximum corrosion protection, the resultant main effect plots for each process factor is shown in Fig. 15. The higher the inhibition efficiency value, the better is the quality characteristic for optimization. As it can be seen, this curve has ascending and descending trends. The inhibition efficiency decreases with the increase in immersion time and temperature, whereas an increasing trend was observed with respect to the inhibitor concentration. The increased corrosiveness of the specimen surface on prolonged exposure to the corrosive medium leads to deterioration of the protective composite film formed by the adsorbed inhibitor molecules.

Fig. 15
figure 15

Main effect plots for means and time, inhibitor concentration, and temperature

3.8.2 Response Surface Plot

The three-dimensional response plots for the measured response were built using the quadratic model. The quadratic model used in the study is composed of three independent variables. By keeping the third variable constant, the influence of two variables on the process was studied. Figure 16 shows the three-dimensional (3D) responses of the input parameters like temperature, inhibitor concentration, and time. The IE was high at all ranges of temperatures and higher inhibitor concentrations. IE was found to decrease at higher temperatures and longer immersion periods. At the highest inhibitor concentration and all immersion periods, inhibition efficiency was more.

Fig. 16
figure 16

Response surface plots of the dependent and independent parameters

4 Conclusions

  • Guar gum (GG) exhibited moderate inhibition efficiency of 74% relatively at its higher concentration (0.3 g/L).

  • Synthesis of xGO/GG polymer composite film was confirmed by FT-IR, optical microscopic analysis, scanning electron microscopy, and XRD analysis.

  • The hydroxyl groups from the guar gum backbone generate hydrogen bonding interaction with the carboxylic groups of the exfoliated graphite and act as an excellent inhibitor.

  • Incorporation of xGO into GG matrix showed enhanced inhibition efficiency of 93.4% at 0.06 g/L.

  • xGO/GG polymer composite acted as mixed-type inhibitor by obeying Langmuir’s adsorption isotherm.

  • The RSM was used to optimize the parameters to improve corrosion inhibition efficiency of xGO/GG polymer composite.