Alkaloid Extract of Ageratina adenophora Stem as Green Inhibitor for Mild Steel Corrosion in One Molar Sulfuric Acid Solution

: Green corrosion inhibitors are of great interest due to their exciting and environmentally friendly behavior in mild steel corrosion control during and after the acid cleaning process. Herein, alkaloids were extracted from the stem of Ageratina adenophora and were ensured by qualitative chemical tests as well as spectroscopic test methods. The corrosion inhibition efﬁcacy of the alkaloids against mild steel corrosion was evaluated by gravimetric, electrochemical and EIS measurement methods. In addition, the adsorption isotherm, free energy of adsorption and thermodynamic parameters of the process were evaluated. The investigations indicated the most promising inhibition efﬁcacy of the alkaloids for mild steel corrosion. The adsorption isotherm study revealed that the adsorption of inhibitor molecules on the MS interface was manifested by dominant physisorp-tion followed by chemisorption. Free energy and thermodynamic parameters are well suited to endothermic processes.


Introduction
Corrosion is detrimental and threatening to beneficiation, especially in metallic materials, which are crucial in today's industrialized, mechanized, commercialized, and technologically advanced era [1]. The cost of metallic corrosion in terms of monetary loss is approximately US$900 million in Saudi Arabia, US$26.1 billion in India, US$276 billion in the United States, and US$310 billion in China [2,3]. In the context of Nepal, the cumulative annual cost of corrosion corresponds to about 4.3% of the GDP [4]. Moreover, the indirect impacts of metallic corrosion include public service interruptions, accidents, forced shutdowns, the release of toxic substances, and other issues [5]. Sulfuric acid is the most extensively used chemical in the world, with 200 million tons consumed every year. It is typically used in acid pickling, descaling, the production of various chemicals and fertilizers, and the leaching of metallic ores [6]. Mild steel is a preferred, widely used and reasonably priced metallic material for many construction and structural applications due to its mechanical, thermal, magnetic, and electrochemical properties [7]. However, despite its exposure to the environment, it is more vulnerable and susceptible to corrosion through electrochemical reactions [8].
Minimization or inhibition, through various means such as electro-polishing [9], coatings [10], and applications of inorganic and organic inhibitors [11], may be the only way to prevent catastrophes. However, designing economically feasible, sustainable, accessible, efficient, and ecologically safe materials to counteract corrosion through more dependable methods is currently directing corrosion research toward green inhibitors [12]. In addition to other natural products, plant-derived alkaloids are drawing attention as effective corrosion inhibitors [13][14][15][16][17]. Alkaloids are allelochemical compounds mostly Optimum temperature for the inhibitor to work is 35 • C. [25] The Ageratina adenophora Spreng. (synonym Eupatorium adenophorum) plant is a major conspicuous, invasive, prevalent, and alien species known to be of Mexican origin and belonging to the Asteraceae plant family (Figure 1). The plant possesses high adaptability and reproducibility in the invaded environment by modifying the microbial communities in the soil, which has the potential to affect the soil, plants and biodiversity of the area [26,27]. According to the review of the literature on phytochemical [28], phytotoxicity [29], invasive nature, biological control [30] and pharmacological [31] studies, the Ageratina plant has been a prolific producer of numerous primary and secondary bioactive phytochemicals, making it beneficial for antibacterial, anti-inflammatory, antioxidant, and pharmacological purposes. Additionally, this plant has historically been utilized by traditional medicine practitioners for curing various ailments.
The Ageratina adenophora Spreng. (synonym Eupatorium adenophorum) plant is a major conspicuous, invasive, prevalent, and alien species known to be of Mexican origin and belonging to the Asteraceae plant family (Figure 1). The plant possesses high adaptability and reproducibility in the invaded environment by modifying the microbial communities in the soil, which has the potential to affect the soil, plants and biodiversity of the area [26,27]. According to the review of the literature on phytochemical [28], phytotoxicity [29], invasive nature, biological control [30] and pharmacological [31] studies, the Ageratina plant has been a prolific producer of numerous primary and secondary bioactive phytochemicals, making it beneficial for antibacterial, anti-inflammatory, antioxidant, and pharmacological purposes. Additionally, this plant has historically been utilized by traditional medicine practitioners for curing various ailments. A recent study on the phytochemical screening of Ageratina leaves reported a higher quantity of alkaloids than other bioactive components such as saponin, tannin and flavonoids [32]. Interestingly, the chemotaxonomic study of this plant's alkaloids also reported the presence of the phosphorus-containing functional groups P-O-P and P-O-C [33], and the phosphorus heteroatoms are considered to have the greatest inhibition efficiency in a series of heteroatoms (oxygen < nitrogen < sulfur < phosphorus) [25,34]. Consequently, the plant is a promising green inhibitor. To date, however, there has been no research on Ageratina adenophora as a green inhibitor for mild steel corrosion. The chemical structure of variously reported pyrrolizidine alkaloids such as lycopsamine [35], 3-Hydroxy-2-methyl-butyric acid-retronecinester, and other acetyl derivatives [36] in the Genus Ageratina is represented in Figure 2. A recent study on the phytochemical screening of Ageratina leaves reported a higher quantity of alkaloids than other bioactive components such as saponin, tannin and flavonoids [32]. Interestingly, the chemotaxonomic study of this plant's alkaloids also reported the presence of the phosphorus-containing functional groups P-O-P and P-O-C [33], and the phosphorus heteroatoms are considered to have the greatest inhibition efficiency in a series of heteroatoms (oxygen < nitrogen < sulfur < phosphorus) [25,34]. Consequently, the plant is a promising green inhibitor. To date, however, there has been no research on Ageratina adenophora as a green inhibitor for mild steel corrosion. The chemical structure of variously reported pyrrolizidine alkaloids such as lycopsamine [35], 3-Hydroxy-2-methyl-butyric acid-retronecinester, and other acetyl derivatives [36] in the Genus Ageratina is represented in Figure 2.

Chemicals and Instruments
For the extraction and characterization of the alkaloids as well as to prepare the corrosive media, the chemicals and instruments were used as described in the literature

Chemicals and Instruments
For the extraction and characterization of the alkaloids as well as to prepare the corrosive media, the chemicals and instruments were used as described in the literature [7]. Sulfuric acid (Fischer Scientific, Hampton, NH, USA, 97%, sp. gr. 1.835), oxalic acid (Fischer Scientific, 99%), and sodium hydroxide (Merck life Science, Darmstadt, Germany, 97%) were used to prepare the corrosive media. Dichloromethane (Galaxo Laboratories, Greenford, UK, sp. gr. 1.326), methanol (Thermo Fischer Scientific, Waltham, MA, USA, sp. gr. 0.792), tartaric acid (RANBAXY Lab., Gurgaon, India, 99.0%), and ammonia (Sisco Research Lab., Maharashtra, India, sp. gr. 0.91) were used to extract the alkaloids. All the chemicals were of laboratory grade and were used as received, without any purification. Instruments such as UV (Labotronics, LT-2808), FTIR (Perkin Elmer 10.6.2), a rotary evaporator (IKA 10), and the Digital Vernier Caliper were used as analytical tools. For the electrochemical measurements (i.e., potentiodynamic polarization and electrochemical impedance spectroscopic analyses), the Gamry Framework analyst program version 7.9.0 was used.

Plant Collection and Alkaloid Extraction
The stems of Ageratina adenophora (AA) were collected from Ghorahi (Latitude: 28.0583 • N, Longitude: 82.4880 • E), Dang, Nepal. The shade-dried plant's stems were milled into a powder. One hundred grams of the powder sample was soaked in 750 mL of methanol solution for a week. The alkaloid was extracted from the methanol extract according to the procedure outlined in the literature [23]. The filtrate obtained after the filtration of the mixture was then collected in a beaker and acidified with 5% tartaric acid until the pH reached 3.0. Alkaloids were precipitated in the form of salt. The mixture was then filtered. The residue was taken, and ammonium hydroxide solution was added to maintain pH 10. The alkaline solution was subjected to solvent extraction with an equal volume of dichloromethane (DCM), i.e., alkaline solution, and DCM in (1:1) ratio. The DCM layer contained alkaloids which were collected in a beaker and concentrated using a rotary evaporator. The concentrated solution was then dried using a water bath at 40 • C up to dryness.

Qualitative Tests for As-Prepared Alkaloid
Preliminary chemical analyses such as Mayer's test, Dragendroff's test, and Wagner's test were carried out for the confirmation of alkaloid phytoconstituents. Furthermore, UVvisible spectrophotometry and Fourier Transform Infrared Spectroscopy were performed for the spectrophotometric characterizations of the alkaloid. The UV Spectrophotometer (Labtronics, LT-2802) was used to record the UV-Vis spectrum of alkaloids in the 200-800 nm wavelength range. Similarly, the Perkin-Elmer Spectrum IR version 10.6.2 was used to record spectral data from a 450-4000 cm −1 wavenumber range with 4 cm −1 resolution, but, before each experiment in spectroscopy, the background correction was performed using isopropanol solvent.

Preparation of MS Specimen, Corrosive Media, and Inhibitor Solution
Mild steel coupons were purchased from the local store in Kathmandu, Nepal. Each coupon was then resurfaced with silicon carbide paper of varying grits (80-1000) and stored in the moisture-free desiccator. The MS coupons were sonicated in ethanol for 10-15 min, dried, and their dimensions were recorded using digital Vernier calipers before each weight loss and electrochemical experiment. The analytical grade of commercial solutions of H 2 SO 4 (Fisher Scientific, 97%, sp. gr. 1.835) was used to prepare 1M H 2 SO 4 as corrosive medium through the dilution process. The inhibitor solution was prepared by dissolving one gram of as-prepared alkaloids in a minimum volume followed by dilution up to 1000 mL by using 1M H 2 SO 4 . The resultant solution was 1000 ppm of stock solution of AA. From this stock solution, a series of different concentrations (i.e., 200, 400, 600, and 800 ppm) were prepared by dilution.

Weight Loss Measurement
The methodology described in the literature [7] was adopted for assessing weight loss measurements. The previously abraded, sonicated, dimensioned, and initially weighed MS coupons were submerged in the acid and various inhibitor solution concentrations (200, 400, 600, and 800 ppm) for varying lengths of time (0.5, 1, 3, 6, 9, 18, and 24 h). After immersing the MS coupons for the designated amount of time, each coupon was removed, left to air dry, and then reweighed. Similarly, the temperature effect was investigated by immerging MS coupons in various inhibitor solution concentrations for 1 h at 28, 38, and 48 • C, respectively. The acquired data were used to assess the corrosion kinetics, thermodynamic parameters, and adsorption isotherms.
The following Equation (1) was used to assess the weight loss data to calculate corrosion inhibition efficiency (IE%).
where W a and W p are the weight loss of MS in acid and different concentrations of inhibitor solutions.

Electrochemical Measurements
The electrochemical measurements were performed by the Gamry Interface 1010B Potentiostat/Galvanostat instrument operated by the software Gamry Framework 7.9.0 analyst version at the APY Laboratory, Central Department of Chemistry, Tribhuvan University, Nepal. A traditional three-electrode electrochemical setup was established by taking MS as the working electrode, platinum (Pt) as the auxiliary electrode, and saturated calomel electrode (SCE) as the reference electrode. The corrosive media and inhibitor solutions were used as the electrolytes in which the pretreated MS samples were submerged for one hour. Afterward, the electrochemical setup was enclosed in a CHI picoamp booster and Faraday cage to prevent electrical interference and frequency noise. Since potentiostatic electrochemical impedance spectroscopy (EIS) is a non-destructive analytical technique, it was carried out before potentiodynamic polarization (PDP) for all one-hour immersed MS samples.
An open circuit delay was carried out for 99 s before each EIS analysis. The EIS curve was then recorded in the frequency range of 100 Hz to 0.01 Hz by applying an AC voltage of 10 mV rms at a scan rate of five points per decade, and the inhibition efficiency was computed using the following Equation (2): where R ct(inh) (Ω cm 2 ) and R ct (Ω cm 2 ) represent the charge transfer resistance of the MS samples in the presence and absence of inhibitor solution, respectively. The polarization curves were recorded by scanning in the potential range from −0.8 to −0.2 V at a scan rate of 1 mV/s, and the inhibition efficiency (IE) was computed from the following Equation (3): where I corr(inh) (A cm −2 ) and I corr (A cm −2 ) are the corrosion current density of the MS samples in the presence and absence of inhibitor solution, respectively.

Alkaloid Characterization
The qualitative chemical tests of the as-prepared alkaloids obtained from the Ageratina adenophora (AA) stem gave a colorful precipitate with different chemical reagents [23,25] and confirmed the presence of alkaloids, as displayed in Table 2. Table 2. Confirmatory test for the alkaloids extracted from the AA stem.

Mayer's Test Dragendroff's Test Wagner's Test
Observation to −0.2 V at a scan rate of 1 mV/s, and the inhibition efficiency (IE) was computed from the following Equation (3): where Icorr(inh) (A cm −2 ) and Icorr (A cm −2 ) are the corrosion current density of the MS samples in the presence and absence of inhibitor solution, respectively.

Alkaloid Characterization
The qualitative chemical tests of the as-prepared alkaloids obtained from the Ageratina adenophora (AA) stem gave a colorful precipitate with different chemical reagents [23,25] and confirmed the presence of alkaloids, as displayed in Table 2. The colored precipitate is due to the formation of complexes between the several alkaloid molecules with the respective chemical reagents. The chemical reactions involved in the phytochemical screening of alkaloids can be simplified and illustrated by considering the lycopsamine compound as a reference alkaloid, as seen in Figure 3. The precipitate formation is due to the formation of potassium salt of alkaloid [23,25,37], and the color development is due to charge transfer/electron transfer reaction within the salt [38,39].
to −0.2 V at a scan rate of 1 mV/s, and the inhibition efficiency (IE) was computed from the following Equation (3): where Icorr(inh) (A cm −2 ) and Icorr (A cm −2 ) are the corrosion current density of the MS samples in the presence and absence of inhibitor solution, respectively.

Alkaloid Characterization
The qualitative chemical tests of the as-prepared alkaloids obtained from the Ageratina adenophora (AA) stem gave a colorful precipitate with different chemical reagents [23,25] and confirmed the presence of alkaloids, as displayed in Table 2. The colored precipitate is due to the formation of complexes between the several alkaloid molecules with the respective chemical reagents. The chemical reactions involved in the phytochemical screening of alkaloids can be simplified and illustrated by considering the lycopsamine compound as a reference alkaloid, as seen in Figure 3. The precipitate formation is due to the formation of potassium salt of alkaloid [23,25,37], and the color development is due to charge transfer/electron transfer reaction within the salt [38,39].
to −0.2 V at a scan rate of 1 mV/s, and the inhibition efficiency (IE) was computed from the following Equation (3): where Icorr(inh) (A cm −2 ) and Icorr (A cm −2 ) are the corrosion current density of the MS samples in the presence and absence of inhibitor solution, respectively.

Alkaloid Characterization
The qualitative chemical tests of the as-prepared alkaloids obtained from the Ageratina adenophora (AA) stem gave a colorful precipitate with different chemical reagents [23,25] and confirmed the presence of alkaloids, as displayed in Table 2. The colored precipitate is due to the formation of complexes between the several alkaloid molecules with the respective chemical reagents. The chemical reactions involved in the phytochemical screening of alkaloids can be simplified and illustrated by considering the lycopsamine compound as a reference alkaloid, as seen in Figure 3. The precipitate formation is due to the formation of potassium salt of alkaloid [23,25,37], and the color development is due to charge transfer/electron transfer reaction within the salt [38,39].
The colored precipitate is due to the formation of complexes between the several alkaloid molecules with the respective chemical reagents. The chemical reactions involved in the phytochemical screening of alkaloids can be simplified and illustrated by considering the lycopsamine compound as a reference alkaloid, as seen in Figure 3. The precipitate formation is due to the formation of potassium salt of alkaloid [23,25,37], and the color development is due to charge transfer/electron transfer reaction within the salt [38,39]. The interaction of the as-prepared alkaloid with UV or visible light produced spectra with a broad peak at 305 nm is shown in Figure 4. This is manifested by the n-π* electronic transition suggesting the presence of a lone pair of electrons or unsaturation in the molecules [23,40,41]. If lycopsamine is used as a reference, then this peak signifies the The interaction of the as-prepared alkaloid with UV or visible light produced spectra with a broad peak at 305 nm is shown in Figure 4. This is manifested by the n-π* electronic transition suggesting the presence of a lone pair of electrons or unsaturation in the molecules [23,40,41]. If lycopsamine is used as a reference, then this peak signifies the presence of a polyphenolic group and an aromatic ring with N as a heteroatom. The interaction of the as-prepared alkaloid with UV or visible light produced spectra with a broad peak at 305 nm is shown in Figure 4. This is manifested by the n-π* electronic transition suggesting the presence of a lone pair of electrons or unsaturation in the molecules [23,40,41]. If lycopsamine is used as a reference, then this peak signifies the presence of a polyphenolic group and an aromatic ring with N as a heteroatom.  The Fourier Transform Infrared Spectroscopic measurement was performed on the polished MS specimen, pure alkaloid or inhibitor, as well as on the MS surface after 1 h immersion in a 600 ppm inhibitor solution, as shown in Figure 5. The broad peak of pure alkaloid at 3385 cm −1 , in the range of 3469-3272 cm −1 , is related to the O-H and N-H stretching vibration of the hydroxyl and primary amine functional groups. Another sharp peak at 2925 and 2859 cm −1 are due to C-H stretching vibrations by the aliphatic asymmetric hydrocarbon group. The sharp peaks at 1717 and 1663 cm −1 are related to the stretching vibrations of the asymmetric and symmetric carbonyl groups (C=O). Similarly, the absorption peak at 1459 cm −1 is related to the O-H bending vibration, and a sharp peak at 1374 cm −1 is related to the aldehydic C-H bending vibrations. In the 1240-1064 cm −1 range, multiple peaks are observed among which an elongated peak at 1064 cm −1 is due to the C-N stretching vibrations [40]. Furthermore, a small sharp peak at 977 cm −1 could be due to the P-O-P or C-N-C group [42], but a broad peak around 700 cm −1 and a sharp peak in the 1050-970 cm −1 is absent, indicating the absence of the P-O-P group but the presence of the C-N-C group [40]. In the 1240-1064 cm −1 range, multiple peaks are observed among which an elongated peak at 1064 cm −1 is due to the C-N stretching vibrations [40]. Furthermore, a small sharp peak at 977 cm −1 could be due to the P-O-P or C-N-C group [42], but a broad peak around 700 cm −1 and a sharp peak in the 1050-970 cm −1 is absent, indicating the absence of the P-O-P group but the presence of the C-N-C group [40].

Effect of Inhibitor Concentration and Immersion Time
The corrosion inhibition efficiency of the alkaloid is a concentration-dependent parameter [19,25]. The observation showed the accelerated inhibiting performance of the inhibitor's concentrations in a series of 200 ppm < 400 ppm < 600 ppm < 800 ppm, as depicted in Figure 6a. The highest inhibiting performance was shown by the 800 ppm (96.95% IE) inhibitor solution due to the abundance of alkaloid molecules which almost completely covered the MS surface for a 1 h immersion period during which the lowest inhibition was seen for the 200 ppm (84.93% IE) inhibitor solution. The longest immersion period during which substantial efficiency (above 70% IE) was seen was 18 h, except for the 200 ppm inhibitor solution. However, after 24 h, the inhibitory performance of the 800 ppm inhibitor concentration declined to 77.88%, and the 200 ppm inhibitor concentration to 40.89%. This is because there are fewer inhibitor molecules to cover the MS substrate, allowing the acid's corrosive attack to happen [23].
Electrochem 2023, 4, FOR PEER REVIEW 9 ppm inhibitor concentration declined to 77.88%, and the 200 ppm inhibitor concentration to 40.89%. This is because there are fewer inhibitor molecules to cover the MS substrate, allowing the acid's corrosive attack to happen [23]. In general, Figure 6b illustrates a noticeable variation in weight loss per unit area of the MS sample exposed to corrosive and inhibitor solution for the prolonged immersion time, indicating an accelerated corrosion rate when inhibition efficiency decelerates. In this experiment, the MS sample dipped in acid solution showed explicitly higher weight loss compared to the corresponding sample in inhibitor solution for all immersion times. The weight loss per unit area curve of the MS substrate was in a sequential order of acid > 200 ppm > 400 ppm > 600 ppm > 800 ppm. When the MS substrate was submerged in an acid solution for 18 h, the weight loss was 0.0678 g/cm 2 , while the weight loss for MS submerged in an 800 ppm inhibitor solution for the same period was 0.0052 g/cm 2 . The difference in weight loss caused by the inhibitor's presence is 0.0626 units. This is due to the formation of adsorptive layers, which masked the reactive metal ions from the corrosive media that reduces the weight loss from the substrate, thus increasing the inhibition efficiency [17,25].
However, when immersion time increased, a sudden decrease in weight loss and inhibition efficiency was observed; this may be due to the following two reasons. The In general, Figure 6b illustrates a noticeable variation in weight loss per unit area of the MS sample exposed to corrosive and inhibitor solution for the prolonged immersion time, indicating an accelerated corrosion rate when inhibition efficiency decelerates. In this experiment, the MS sample dipped in acid solution showed explicitly higher weight loss compared to the corresponding sample in inhibitor solution for all immersion times. The weight loss per unit area curve of the MS substrate was in a sequential order of acid > 200 ppm > 400 ppm > 600 ppm > 800 ppm. When the MS substrate was submerged in an acid solution for 18 h, the weight loss was 0.0678 g/cm 2 , while the weight loss for MS submerged in an 800 ppm inhibitor solution for the same period was 0.0052 g/cm 2 . The difference in weight loss caused by the inhibitor's presence is 0.0626 units. This is due to the formation of adsorptive layers, which masked the reactive metal ions from the corrosive media that reduces the weight loss from the substrate, thus increasing the inhibition efficiency [17,25].
However, when immersion time increased, a sudden decrease in weight loss and inhibition efficiency was observed; this may be due to the following two reasons. The first reason may be the inhibitor molecule's simultaneous desorption from the sample surface triggering a subsequent dissolution in the exposed area [7], and the second one may be the inhibitor molecules' large size, orientation, and interaction, which results in a particular type of defect on the inhibitor layer [25].

Effect of Temperature
The effect of temperature on the inhibitor solutions' inhibitory action depends on the molecular vibration, structure, and concentrations of the alkaloids [7]. In this experiment the rise in temperature from 28-48 • C also showed a variation in the weight loss and inhibition efficiency for the MS samples in both acid and inhibitor solutions, as depicted in Figure 7a,b. Here, the sample in inhibitor solution shows implicit weight loss at room temperature 28 • C. At 38 • C, the weight loss of MS dipped separately in acid solution, and in the 200 ppm inhibitor solution this was almost the same. This may be due to the rapid desorption of inhibitor molecules from the substrate. The sample in the 800 ppm inhibitor solution showed minimal weight loss, and other inhibitors (i.e., 400 and 600 ppm) showed relatively moderate weight loss. As shown in Figure 7a, more pronounced nonlinearity in the efficiency of 200 ppm and less in 800 ppm of inhibitor were observed, but, from 38-48 • C, linearity was observed for samples in the 400, 600, and 800 ppm inhibitor concentrations. Furthermore, the observation showed a 20-50% decrease in inhibition efficiency from 28-38 • C; afterward, only a 1-8% decrease was seen. This indicates that the suitable temperatures for the formation of the inhibitor layer are 28 and 48 • C.
Electrochem 2023, 4, FOR PEER REVIEW 10 600 ppm) showed relatively moderate weight loss. As shown in Figure 7a, more pronounced nonlinearity in the efficiency of 200 ppm and less in 800 ppm of inhibitor were observed, but, from 38-48 °C, linearity was observed for samples in the 400, 600, and 800 ppm inhibitor concentrations. Furthermore, the observation showed a 20-50% decrease in inhibition efficiency from 28-38 °C; afterward, only a 1-8% decrease was seen. This indicates that the suitable temperatures for the formation of the inhibitor layer are 28 and 48°C.
The inhibition performance of the alkaloid is primarily due to physisorption followed by chemisorption which in turn is related to the molecular vibrations [25], so temperature-induced physical desorption from the substrate is feasible due to increased molecular vibrations at high temperatures. Not limited to this, at higher temperatures the decomposition of alkaloid molecules may also occur [43].

Adsorption Isotherm
Adsorption isotherm models are important graphical representations for understanding the fundamentals of the adsorptive properties of the organic compounds on the MS surface [43,44]. The inhibitor solution was made by dissolving alkaloid in an acid solution; it has been suggested by Karki et al. [17] that there always exists an equal possibility for the simultaneous adsorption and replacement between the water and inhibitor molecules on the MS surface. The weight loss measurement method was used to evaluate the adsorption isotherms where the fraction of surface coverage (θ) and inhibitor concentration were used. In this experiment, the molecular weight of the alkaloid Lycopsamine was used as a reference to calculate the molar concentration of the inhibitor solution. The Langmuir adsorption isotherm Equation (4) was used for the plot of against Cinh (mol/L) as shown in Figure 8a. A straight line with a regression coefficient (R 2 ) value close to unity (0.999) was obtained. This suggests a process of formation of The inhibition performance of the alkaloid is primarily due to physisorption followed by chemisorption which in turn is related to the molecular vibrations [25], so temperatureinduced physical desorption from the substrate is feasible due to increased molecular vibrations at high temperatures. Not limited to this, at higher temperatures the decomposition of alkaloid molecules may also occur [43].

Adsorption Isotherm
Adsorption isotherm models are important graphical representations for understanding the fundamentals of the adsorptive properties of the organic compounds on the MS surface [43,44]. The inhibitor solution was made by dissolving alkaloid in an acid solution; it has been suggested by Karki et al. [17] that there always exists an equal possibility for the simultaneous adsorption and replacement between the water and inhibitor molecules on the MS surface. The weight loss measurement method was used to evaluate the adsorption isotherms where the fraction of surface coverage (θ) and inhibitor concentration were used. In this experiment, the molecular weight of the alkaloid Lycopsamine was used as a reference to calculate the molar concentration of the inhibitor solution. The Langmuir adsorption isotherm Equation (4) was used for the plot of C inh θ against C inh (mol/L) as shown in Figure 8a. A straight line with a regression coefficient (R 2 ) value close to unity (0.999) was obtained. This suggests a process of formation of monolayers before multilayers on the equivalent adsorption sites [17,45,46].
where C inh represents the inhibitor's concentrations (mol L −1 ) and θ represents surface coverage. The K ads represents the Langmuir adsorption equilibrium constant from which the Gibbs free energy of the adsorption (∆G ads ) was determined using Equation (5).
where R is the ideal gas constant (J mol −1 K −1 ). The calculated value of adsorption equilibrium and free energy of adsorption is 3333.33 L mol −1 and −30.35 kJ mol −1 , respectively, at 301 K. The obtained value of ∆G ads is less than 40 kJ mol −1 and greater than 20 kJ mol −1 . This indicates a weak electrostatic interaction, accompanied by the chemical interaction of lone pairs of an electron at the electronegative sites of alkaloid molecules with the MS sample [25,47], thus developing a thin protective layer on the MS interface.
where R is the ideal gas constant (J mol −1 K −1 ). The calculated value of adsorption equilibrium and free energy of adsorption is 3333.33 L mol −1 and −30.35 kJ mol −1 , respectively, at 301 K. The obtained value of ∆Gads is less than 40 kJ mol −1 and greater than 20 kJ mol −1 . This indicates a weak electrostatic interaction, accompanied by the chemical interaction of lone pairs of an electron at the electronegative sites of alkaloid molecules with the MS sample [25,47], thus developing a thin protective layer on the MS interface. Similarly, the corrosion inhibition mechanism, the interaction nature, and the adsorption processes' spontaneity were studied from the Temkin and Freundlich adsorption isotherm models employing Equations (6) and (7). The fitting of the Freundlich isotherm plot of ln θ versus ln Cinh yielded a slope of a straight line with an R 2 coefficient value in the merely acceptable range (0.971) and a slope (1/n) equal to 0.185 as illustrated in Figure 8b. As the value of 1/n lies between 0 and 1, this verified a spontaneous adsorption process [17]. Similarly, the corrosion inhibition mechanism, the interaction nature, and the adsorption processes' spontaneity were studied from the Temkin and Freundlich adsorption isotherm models employing Equations (6) and (7). The fitting of the Freundlich isotherm plot of ln θ versus ln C inh yielded a slope of a straight line with an R 2 coefficient value in the merely acceptable range (0.971) and a slope (1/n) equal to 0.185 as illustrated in Figure 8b. As the value of 1/n lies between 0 and 1, this verified a spontaneous adsorption process [17].
where 'a' is an interaction parameter. The fitting of the Temkin plot of θ against lnC inh gave a slope of a straight line with an R 2 coefficient value near unity (0.981), as shown in Figure 8c. The obtained R 2 value, however, was a little lower than the corresponding R 2 value observed in the Langmuir model, so the adsorption of inhibitor extracted from the AA onto the MS obeys the Langmuir model. The calculated values of interaction parameters (a) and K from the intercept and slope were found to be negative 3.31 and 181,679.60 indicating the strong attraction and adsorption of the inhibitor molecules on the MS surface [17,48].

Corrosion Kinetics
The corrosion kinetic and thermodynamic activation parameters were elucidated by considering the data obtained from the weight loss measurements at different temperatures. The corrosion rate (CR) was calculated using Equation (8), where K is the corrosion rate constant (87,600), W is the mass loss of the MS (g), A is the total surface area of each coupon in (cm 2 ), T is the submerging time (h), and D is the density of MS (g/cm 3 ). The activation energy of the corrosion reaction was calculated by using the Arrhenius Equation (9).
where A represents Arrhenius's pre-exponential constant, E a represents the activation energy, and T is the absolute temperature. From a plot of log (CR) against 1/2.303RT, a slope of a straight line was obtained from which activation energy was determined. The Arrhenius plot in Figure 9 shows that the energy of activation of the reaction between MS and the acid solution was 48.54 kJ/mol. This activation energy increases with the addition of inhibitors to 107.26, 114.14, and 113.14, and reaches 139.28 kJ mol −1 for 200, 400, 600, and 800 ppm inhibitor solutions, respectively. This increment in activation energy indicates a decrease in the dissolution of MS in acid media. These calculated values lie in between physical and chemical adsorption. Therefore, the adsorption of alkaloids on the MS surface in one molar acid solution is mixed-kind adsorption with dominant chemisorption [17,49].

Thermodynamics of Corrosion
The transition state Equation (10) was used to determine the enthalpy and entropy of the system.
where h is Plank's constant (6.6261 × 10 −34 J s) and N is Avogadro's number (6.0225 × 10 23 mol −1 ). The transition state graph is fitted by plotting log CR T against 1 2.303RT . The enthalpy of activation (∆H • ) is measured from the slope of the straight line while the entropy of activation (∆S • ) is measured from its intercept in the absence and presence of inhibitors, as seen in Figure 10.
The activation energy of the corrosion reaction was calculated by using the Arrhenius Equation (9).
where A represents Arrhenius's pre-exponential constant, Ea represents the activation energy, and T is the absolute temperature. From a plot of log (CR) against 1/2.303RT, a slope of a straight line was obtained from which activation energy was determined. The Arrhenius plot in Figure 9 shows that the energy of activation of the reaction between MS and the acid solution was 48.54 kJ/mol. This activation energy increases with the addition of inhibitors to 107.26, 114.14, and 113.14, and reaches 139.28 kJ mol −1 for 200, 400, 600, and 800 ppm inhibitor solutions, respectively. This increment in activation energy indicates a decrease in the dissolution of MS in acid media. These calculated values lie in between physical and chemical adsorp- Electrochem 2023, 4, FOR PEER REVIEW 13 tion. Therefore, the adsorption of alkaloids on the MS surface in one molar acid solution is mixed-kind adsorption with dominant chemisorption [17,49].

Thermodynamics of Corrosion
The transition state Equation (10) was used to determine the enthalpy and entropy of the system.
. The enthalpy of activation (ΔH°) is measured from the slope of the straight line while the entropy of activation (ΔS°) is measured from its intercept in the absence and presence of inhibitors, as seen in Figure 10. From the observation, the enthalpy (ΔH°) of the system in the presence of an inhibitor appeared higher than in the absence of an inhibitor. There was a gradual increase in the enthalpy value with an increase in inhibitor solution from 45.96 to 136.69 kJ mol −1 . Here, the positive value of enthalpy (ΔH°) indicates that the adsorption took place through an endothermic process and reduced the corrosion rate [49]. Similarly, the entropy of the system (ΔS°) is calculated from the intercept of the transition state plot. The entropy increased from negative 76.63 kJ mol −1 of acid solution to 104.69, 123.55, 118.08, and 197.96 kJ mol −1 for 200, 400, 600, and 800 ppm inhibitor solution. This represents a huge difference in value as it moves from the negative to positive entropy value. This is due to an increase in randomness in the transition state by the formation of activated complexes, i.e., associative mechanisms [17,45] and to the free protons roaming in the solution [7]. This may be due to the replacement of water molecules on the MS surface by the alkaloid molecules during the adsorption process; the process is quasi-substitution [43].
The calculated values of Ea, ΔH°, and ΔS° are presented in Table 3. Here, the Ea value From the observation, the enthalpy (∆H • ) of the system in the presence of an inhibitor appeared higher than in the absence of an inhibitor. There was a gradual increase in the enthalpy value with an increase in inhibitor solution from 45.96 to 136.69 kJ mol −1 . Here, the positive value of enthalpy (∆H • ) indicates that the adsorption took place through an endothermic process and reduced the corrosion rate [49]. Similarly, the entropy of the system (∆S • ) is calculated from the intercept of the transition state plot. The entropy increased from negative 76.63 kJ mol −1 of acid solution to 104.69, 123. 55, 118.08, and 197.96 kJ mol −1 for 200, 400, 600, and 800 ppm inhibitor solution. This represents a huge difference in value as it moves from the negative to positive entropy value. This is due to an increase in randomness in the transition state by the formation of activated complexes, i.e., associative mechanisms [17,45] and to the free protons roaming in the solution [7]. This may be due to the replacement of water molecules on the MS surface by the alkaloid molecules during the adsorption process; the process is quasi-substitution [43].
The calculated values of E a , ∆H • , and ∆S • are presented in Table 3. Here, the E a value is higher than ∆H • , indicating a cathodic hydrogen evolution reaction leading to a decrease in total reaction volume. The average value of E a -∆H • is 2.58 kJ mol −1 , which is very close to the value of RT; this obeys the relation E a -∆H • = RT. Thus, the adsorption of alkaloids occurs as the physical dominant chemical adsorption [7,45].

Electrochemical Measurements
The corrosion kinetics and inhibition type of the MS sample in 1 M H 2 SO 4 solution with and without different concentrations of alkaloid extracted from the AA was investigated by PDP and EIS measurements at 293 K.

Potentiodynamic Polarization Tests (PDP)
The pretreated MS sample with the acid and corresponding inhibitor solutions (200, 400, 600, and 800 ppm) were placed in an electrochemical setup to record the one-hour immersed polarization curves in the potential window of −0.8 to −0.2 V on the Gamry Framework instrument at 293 K. Triplicate measurements were performed for the reproducibility issue. Figure 11 shows the anodic and cathodic Tafel polarization curves of onehour-immersed MS sample in acid and different concentrations of inhibitor solution, from which electrochemical parameters such as current density, corrosion potential, anodic slope, cathodic slope, and inhibition efficiency are recorded by the extrapolation method and placed in Table 4. The rapid physical adsorption and desorption of the inhibitor molecules on the MS surface after its exposure to acid and inhibitor media showed a decrement in the corrosion current density (I corr ) [7,17] with the increment in the inhibitor concentrations.   The Tafel plot of the one-hour-immersed MS sample exhibited a decreasing I corr value with a corrosion potential in the range of −0.468 to −0.490 V as the inhibitor concentration increased. The inhibitory performance of the 800 ppm solution appeared to have the highest efficiency (91.23%) with an I corr value of 0.10 µA/cm 2 . The decreasing I corr value shown in Table 4 is due to the physical adsorption of inhibitor molecules covering the substrate, which reduces electron transfer from the surface, thus preventing potential attack from the corrosive ions, resulting in the increased resistance of MS [7].

Electrochemical Impedance Spectroscopy (EIS)
Electrochemical impedance spectroscopy was performed to estimate the resistance or impedance of the MS at one-hour immersion. Triplicate measurements were performed in order to maintain reproducibility. R ct(inh) represents the charge transfer resistance of the inhibitor molecules on the MS sample. The Nyquist and Bode plots obtained from the EIS study are shown in Figure 12a-c, and the equivalent circuit model is shown in Figure 12d. In the circuit model, Rs represents the solution resistance, Rct represents charge transfer resistance at the metal/solution interface, and CPE is a constant phase element representing the double layer capacitance of the metal/solution interface. The Rct value of MS in acid solution is 6.59 Ω cm −2 . The real corrosion system comprises non-homogeneity due to the presence of surface roughness, the adsorption of inhibitors and the formation of a porous layer on the electrode surface. The CPE in the model circuit compensates for this non-homogeneity [50]. The impedance function is represented by the Equation (11) [48]: where Q represents the magnitude of the CPE, j is the imaginary number and ω is angular frequency, and n is the CPE exponent that lies between −1 to +1; this could reflect the non-homogeneity [48,49]. The observation showed an increment in the impedance value with an increase in the concentration of the inhibitor molecules as in Table 5. The maximum inhibitory performance (92.53%) was observed for MS in the 800 ppm solution, while the minimum inhibitory performance was observed for the MS sample in the 200 ppm inhibitor solution. This is due to the development of the thin protecting layer on the MS interface which prevents or eliminates the potential penetration of the corrosive ions or molecules by increasing the interfacial resistance/impedance of the MS sample.  The observation showed an increment in the impedance value with an increase in the concentration of the inhibitor molecules as in Table 5. The maximum inhibitory performance (92.53%) was observed for MS in the 800 ppm solution, while the minimum inhibitory performance was observed for the MS sample in the 200 ppm inhibitor solution. This is due to the development of the thin protecting layer on the MS interface which prevents or eliminates the potential penetration of the corrosive ions or molecules by increasing the interfacial resistance/impedance of the MS sample. It was found that the corrosion of MS in acid medium is controlled by the charge transfer process without changing the mechanism, as indicated by a single capacitive loop (Figure 12a) in the Nyquist plot and only one time constant in the Bode plot [51]. The gradual increase in capacitive loop diameter in the Nyquist plot upon increasing the concentration of inhibitor represents an increment in charge transfer resistance due to more substantial surface coverage by the inhibitor molecules [52]. The increase in the It was found that the corrosion of MS in acid medium is controlled by the charge transfer process without changing the mechanism, as indicated by a single capacitive loop (Figure 12a) in the Nyquist plot and only one time constant in the Bode plot [51]. The gradual increase in capacitive loop diameter in the Nyquist plot upon increasing the concentration of inhibitor represents an increment in charge transfer resistance due to more substantial surface coverage by the inhibitor molecules [52]. The increase in the phase angle in the Bode-phase plot also confirms the inhibitive behavior of alkaloids [20,53].
The adsorption isotherms were also fitted from the data obtained by the PDP and EIS measurement methods. The best fitted data were for the Langmuir adsorption isotherm. The R 2 values for both cases are nearly equal to unity, indicating that the adsorption followed the Langmuir adsorption isotherm. This finding is similar to the isotherm fitted from weight loss data. Figure 13a,b presents the Langmuir adsorption isotherm fitted from the PDP and EIS data, respectively.
Electrochem 2023, 4, FOR PEER REVIEW 17 phase angle in the Bode-phase plot also confirms the inhibitive behavior of alkaloids [20,53]. The adsorption isotherms were also fitted from the data obtained by the PDP and EIS measurement methods. The best fitted data were for the Langmuir adsorption isotherm. The R 2 values for both cases are nearly equal to unity, indicating that the adsorption followed the Langmuir adsorption isotherm. This finding is similar to the isotherm fitted from weight loss data. Figure 13a,b presents the Langmuir adsorption isotherm fitted from the PDP and EIS data, respectively.

Discussion and Inhibition Mechanism
The maximum efficiency observed in the polarization experiment is, however, smaller compared to that of the EIS tests, which in turn is smaller compared that of the

Discussion and Inhibition Mechanism
The maximum efficiency observed in the polarization experiment is, however, smaller compared to that of the EIS tests, which in turn is smaller compared that of the weight loss measurements. The handling and systematic errors may have contributed to differing inhibition efficiencies between the weight loss and PDP tests [25]. Since EIS is considered a more sensitive and accurate electrochemical technique than PDP [54], the efficiency of inhibitors obtained from this method is acceptable.
Corrosion inhibition by organic molecules is described by their adsorption on the MS surface. The presence of heteroelements and the polar functional groups in the organic moieties are responsible for the adsorption process [7,55]. Initially, the protonated alkaloid molecules interact with the negatively charged ions being adsorbed on the MS surface. Then, after the successful release of the proton, the alkaloid molecules are adsorbed on the MS surface, forming a protective layer [56]. This mechanism is supported by thermodynamic values and electrochemical measurements [23,57]. The detailed inhibition mechanism is displayed in Figure 14 below.

Conclusions
An alkaloid as a green inhibitor has been extracted from the stem of the Ageratina adenophora plant through the cold percolation method and solvent extraction technique. The chemical and spectroscopic characterizations confirmed the presence of the as-prepared alkaloid molecules. The maximum corrosion inhibition efficiency (%) of 91.23, 92.53, and 96.95 was exhibited by the 800 ppm inhibitor solution in the polarization, EIS, and weight loss measurements, respectively, at 293 and 301 K. Based on the calculated values of Kads and ∆Gads, the adsorption nature of the inhibitor molecule on the

Conclusions
An alkaloid as a green inhibitor has been extracted from the stem of the Ageratina adenophora plant through the cold percolation method and solvent extraction technique. The chemical and spectroscopic characterizations confirmed the presence of the as-prepared alkaloid molecules. The maximum corrosion inhibition efficiency (%) of 91.23, 92.53, and 96.95 was exhibited by the 800 ppm inhibitor solution in the polarization, EIS, and weight loss measurements, respectively, at 293 and 301 K. Based on the calculated values of K ads and ∆G ads , the adsorption nature of the inhibitor molecule on the MS interface strongly obeys the Langmuir adsorption isotherm model. Furthermore, the adsorption is spontaneous due to the strong interaction between the inhibitor molecules, as suggested by the Freundlich and Temkin models. It can thus be inferred that the Ageratina adenophora alkaloid is a prospective green inhibitor against mild steel corrosion. However, more studies are still needed to identify and determine major alkaloids and their individual effects on inhibitory performance.