Introduction

In many industrial processes, acid solutions are used to remove the undesirable substances and corrosion products in metallic materials. Hydrochloric and sulfuric acids are the most used acids among the acidic cleaning methods [1]. At the time of this process metallic corrosion can also occur. Metallic corrosion is the degradation of metals and alloys via an electrochemical reaction that occurs with different effects. For instance this metallic degradation causes serious economical disadvantages in several industrial fields of all countries [2]. In acidic cleaning methods, organic corrosion inhibitors are added to the medium to prevent the corrosion and to reduce the acid utilization. Most of the organic inhibitors that are used in acidic media are compounds that include N, S, O heteroatoms in their structure. Electrostatic interactions between the inhibitor molecules and the metal surfaces occur via these heteroatoms. Furthermore, these heteroatoms involve unpaired electrons that offer possible adsorption centers for the chemical adsorption. In spite of the existence of many organic compounds as inhibitors, development of new compounds must be done [3].

Amide-based organic compounds have an extensive utilization field in industry. The use as corrosion inhibitor is one of the most important usage area of these compounds. In literature, there are many researches into the corrosion prevention of metals and alloys in acidic media of the amide-based organic compounds that include long chains of carbon [49]. In recent years, cationic-based surfactant-oriented corrosion inhibitor research has become fairly important and new compounds that have corrosion inhibitor character can be found to the literature [1013]. Among these researches, there are cationic surfactants that contained an amide functional group [14].

Synthetic fatty acids and their derivatives are widely used products, mainly as industrial raw materials. Examples of potential uses of these materials include oil field chemicals. Long chain compounds are widely used in the oil industry as corrosion inhibitors. Industrial corrosion is a serious problem that causes severe economic losses because of the destruction of metal- and alloy-based processing equipment and devaluation of industrial products. It has been reported that cationic type surfactants are good inhibitors in certain acidic media [15]. Molecules of these compounds form a monomolecular hydrophobic protective layer at the metal surface that effectively prevents further attack by the corrosive media. In some corrosive systems especially in water–oil liquid system certain compounds require hydrophilic group or groups present on their structures for the effectiveness as corrosion inhibitors. These groups effects solubility behaviors of corrosion inhibitors compounds and make them more soluble or dispersible in such media.

In the present study, some organic cationic surfactants contain amide functional group was synthesized. Corrosion inhibitory properties of these compounds were investigated in aqueous acidic media. 1.5 M HCl and H2SO4 solutions were used as acidic media. Sample metals were treated with an acidic medium for a period of 24 h at room temperature, and inhibition efficiencies were determined by the gravimetric method. The effect of the HCl concentration on corrosion inhibition of some synthesized compounds was also investigated. In addition the possible corrosion inhibition mechanisms of inhibitors were also investigated by contact angle measurements.

Experimental Procedures

Materials and Instrumentation

All the reagents and solvents were purchased from either Merck or Fluka Chemie and used without further purification. Melting points were recorded with a Büchi melting point B-540 apparatus. IR spectra were measured by Thermo Nicolet 6700 FT-IR spectrometer. 1H-NMR spectra were measured using a Varian Mercury Plus spectrometer (400 MHz) in CDCl3 using TMS as the internal standard. The static water contact angle measurements were carried out at room temperature with a contact angle measurement system (KSV Instrument Attension Optical Tensiometers Theta Lite).

Synthesis of Compounds

Synthesis of 2-Chloro-N-alkylacetamides

The synthesis of 2-chloro-N-octyl, -dodecyl and -hexadecylacetamides was performed under similar reaction conditions to those previously described in the literature [16, 17].

General Procedure for the Synthesis of N-Alkyl-2-(4-formyl-2-methoxyphenoxy)acetamides 1a1c

In a 100-mL round-bottom flask, 1 equivalent of vanillin, 2 equivalent of K2CO3 and 25 mL of DMF as the solvent were placed and the solution was mixed for a few minutes. One equivalent of the corresponding 2-chloro-N-alkylacetamide was added to this mixture and the flask was fitted to a reflux condenser. The reaction mixture was stirred over night under reflux at 65–70 °C in a water bath. After the completion of the reaction, cold water was added to the flask and the reaction mixture was extracted with chloroform. The organic phase was dried over sodium sulfate and the solvent was removed with a rotary evaporator. The residue was crystallized from THF/petroleum ether.

General Procedure for the Synthesis of N-Alkyl-2-[4-(hydroxymethyl)-2-methoxyphenoxy]acetamides 2a2c

One equivalent of (1a1c) was dissolved in 15 mL of ethanol in a 100-mL round-bottom flask and cooled to 0–5 °C. To the observed mixture, 2 equivalent amounts of NaBH4 were added in portions and the reaction was allowed to return to room temperature, with stirring continued for 3 h. The ethanol was removed under reduced pressure and to the residue was added cold water and the white solid obtained was filtered under vacuum. After drying at room temperature, the crude product was crystallized from methanol/water. Unlike (2b) and (2c), the compound (2a) was obtained as an oily product which was dissolved in ethyl acetate, washed with water and dried over sodium sulfate. Solvent was removed under reduced pressure to give yellowish oily product.

General Procedure for the Synthesis of N-Alkyl-2-[4-(chloromethyl)-2-methoxyphenoxy]acetamides 3a3c

In a 100-mL two-necked flask fitted with a reflux condenser (protected by a calcium chloride guard-tube), 1 equivalent of (2a2c) was dissolved in 20 mL of dichloromethane. The flask was cooled to 0 °C in an ice bath and 2 equivalent of SOCl2 was added dropwise over a 30-min period. The reaction mixture was stirred for 4 h at room temperature and then refluxed for 30-min in a water bath at 60–70 °C. After this time, the flask was cooled to room temperature and the mixture was washed with water and 5 % NaHCO3 solution. The organic phase was dried over sodium sulfate and the solvent was removed with a rotary evaporator. The residue was crystallized with petroleum ether.

General Procedure for the Synthesis of N, N-Diethyl-N-(3-methoxy-4-(2-(alkylamino)-2-oxoethoxy)benzyl)ethanaminium chlorides 4a4c

One equivalent of (3a3c), 4 equivalents of triethylamine and 15 mL of acetonitrile as the solvent were placed in a 100-mL round-bottom flask fitted with a reflux condenser. The reaction mixture in the flask was stirred overnight under reflux. After the reaction had ended (monitored by TLC) the solvent was evaporated under reduced pressure and diethyl ether was added to the oily residue. The crude product obtained was crystallized from diethyl ether/acetone.

General Procedure for the Synthesis of 1-{4-[2-(Alkylamino)-2-oxoethoxy]-3-methoxybenzyl}pyridinium chlorides 5a5c

One equivalent of (3a3c), 1.5 equivalents of pyridine and 15 mL of acetonitrile as solvent were placed in a 100-mL round-bottom flask fitted with a reflux condenser. The reaction mixture in the flask was refluxed for 24 h. As the reaction completed (monitored by TLC) the solvent was evaporated under vacuum and the residue was washed with a mixture of diethyl ether/hexane (1:1). The solid obtained was filtered under vacuum.

General Procedure for the Synthesis of 2-(4-Acetylphenoxy)-N-alkylacetamides 6a6c

To a 100-mL round-bottom flask, 1 equivalent of 4-hydroxyacetophenone, 2 equivalents of K2CO3 and 20 mL of DMF as solvent were placed and the solution was mixed for a few minutes. One equivalent of the corresponding 2-chloro-N-alkylacetamide was added to this mixture and the flask was fitted to a reflux condenser. The reaction mixture was stirred over night under reflux at 65–70 °C in a water bath. After completion of the reaction, cold water was added to the flask and reaction mixture was extracted with dichloromethane. The organic phase was dried over sodium sulfate and the solvent was removed with a rotary evaporator. The residue was crystallized from methanol/water.

General Procedure for the Synthesis of 2-[4-(Bromoacetyl)phenoxy]-N-alkylacetamides 7a7c

One equivalent of (6a6c), and 15 mL of 1,4-dioxane as solvent were placed in a 100-mL two-necked flask fitted with a reflux condenser. Three drops of HBr (47 %) were added to the mixture and the flask was cooled to 0 °C in an ice bath. One point two equivalents of Br2 was then dropped slowly into the flask and the reaction mixture was stirred overnight at room temperature. After the reaction had completed (monitored by TLC) 100 mL of cold water was added to the mixture. The solid obtained was filtered under vacuum and then crystallized from a mixture of hexane/ethyl acetate.

General Procedure for the Synthesis of N,N,N-Triethyl-2-{4-[2-(alkylamino)-2-oxoethoxy]phenyl}-2-oxoethanaminium bromides 8a8c

In a 100-mL round-bottom flask fitted with a reflux condenser, 1 equivalent of (7a7c) and 15 mL of acetonitrile as solvent were placed. To this mixture, 4 equivalents of triethylamine were added and the reaction mixture was refluxed overnight. After the reaction was complete, the solvent was removed under vacuum. To the oily residue diethyl ether and acetone were added respectively and the flask was cooled in an ice-bath. The solid obtained was filtered under vacuum.

General Procedure for the Synthesis of 1-(2-{4-[2-(Alkylamino)-2-oxoethoxy]phenyl}-2-oxoethyl)pyridinium bromides, 9a9c

One equivalent of (7a7c), 2 equivalents of pyridine and 15 mL of acetonitrile as solvent were placed in a 100-mL round-bottom flask fitted with a reflux condenser. The flask was refluxed overnight and then the reaction mixture was cooled to room temperature. Diethyl ether was added to the mixture and the solid obtained was filtered under vacuum. The crude product obtained was crystallized from acetone/diethyl ether.

Corrosion Tests Performed in Acidic Media

Preparations of Coupons and Acidic Solutions

Gravimetric measurements were done using coupons made from cold-rolled low-carbon steel and possessed DIN EN 10130-99 with the composition of 0.07 % C, 0.35 % Mn, 0.015 % P, 0.015 % S. Coupons were cut into a rectangular shape of 0.1 × 2.2 × 5.0 cm in thickness, width and length, respectively. The following cleaning procedure was carried out before the immersion test: firstly coupons were kept in 15 % HCl, polished lightly with paper tissue and washed twice with deionized water. Secondly, they were kept in acetone and finally dried. Solutions of 1.5 M HCl and 1.5 M H2SO4 were prepared from concentrated HCl (37 %) and concentrated H2SO4 (95–97 %) (Merck) grade respectively.

Weight Loss Measurements

Inhibition efficiencies of (4a4c), (5a5c), (8a8c) and (9a9c) derivatives were tested at 25, 50, and 100 ppm concentrations in 100 mL of 1.5 M HCl and 1.5 M H2SO4 solutions respectively. The corrosion inhibitors (4a4c) and (5a5c) were directly dissolved in acid solutions while (8a8c) and (9a9c) were added to the acid solutions dissolved in 10 % acetone. Later the treatment solutions were poured into 150-mL -sealed glass bottles and the coupons were suspended in these solutions without stirring and kept for 24 h at room temperature. Control tests were done in the same way without the inhibitors. After the corrosion test, the samples were treated as follows: coupons were taken out and wiped with paper tissues. The coupons were gently polished with emery paper to clean the rust as needed, rinsed with water then acetone and dried in an oven until the had a constant weight.

Contact Angle Measurements

The static water contact angle measurements were carried out at room temperature with the commercially available contact angle measurement system. The oxide layer of four metal plates was removed as described previously in the experimental part of this article. One of the metal plates was immersed in inhibitor-free and 1.5 M 100 mL of HCl solution, while the remaining three plates were immersed in 1.5 M 100 mL of HCl solution containing one of the inhibitors, (4a4b) or (9c) at 100 ppm concentration. All the samples were stored for 24 h at room temperature. Thereafter, the metal plates were removed from the acidic solutions and kept until dry in a vacuum desiccator. The contact angle was measured at both ends of the water drop placed on a thoroughly dried metal surface.

Results and Discussion

Several cationic surfactants as potential corrosion inhibitors for mild steel in acidic media were synthesized. Starting compounds required for the synthesis of these surfactants were easily prepared. To our knowledge, all the synthesized surfactants in this study are novel. Our approaches for the synthesis of the amide-based cationic surfactants investigated in this research are shown in (Schemes 1, 2). Their physical properties and spectral data (except of the ones that had been previously described in the literature) including detailed synthetic procedures for each compound are given under the experimental section of this study. To accomplish synthesis of the compounds (4a4c), a series of long chain amines obtained were treated with chloroacetyl chloride as described previously in the literature [16, 17]. Thereafter the 2-chloro-N-alkylacetamides were reacted with vanillin to give compounds (1a1c). Subsequently (1a1c) were reduced with NaBH4 in a suitable solvent and then the compounds obtained (2a2c) were treated with SOCl2 to give (3a3c). Finally benzyl chlorides (3a3c) were heated with triethylamine in acetonitrile under reflux to obtain the desired cationic surfactants (4a4c) (Scheme 1).

Scheme 1
scheme 1

Synthesis reactions and structures of 4a4c and 5a5c

Scheme 2
scheme 2

Synthesis reactions and structures of 8a8c and 9a9c

Cationic surfactants (5a5c) were synthesized with better yields and in a similar manner to that described for compounds (4a4c) except that pyridine was used instead of triethylamine (Scheme 1). Starting from 2-chloro-N-alkylacetamides and 4-hydroxyacetophenone, compounds (6a6c) were obtained in fairly good yields. 2-[4-(Bromoacetyl)phenoxy]-N-alkylacetamides, (7a7c) were prepared via the α-bromination under mild conditions of the corresponding acetophenones (6a6c). Finally α-brominated acetophenones were refluxed with triethylamine in acetonitrile to give the corresponding cationic surfactants (8a8c) (Scheme 2). Cationic surfactants (9a9c) were synthesized in a similar manner to that described for compounds (8a8c) except that pyridine was used instead of triethylamine (Scheme 2).

The structures of all the compounds were confirmed by IR and 1H-NMR spectroscopic methods. For instance the IR spectra of (4a) showed absorption bands at 3,228 cm−1 due to the amide –NH group, at 3,033 cm−1 due to the aromatic =C–H stretching, and at 1,677 cm−1 due to the amide C=O group. The IR spectra of (5a) showed absorption bands at 3,411 cm−1 due to the amide –NH group, at 3,123 cm−1 due to the pyridine =C–H stretching, and at 1,652 cm−1 due to the amide C=O group. On the other hand the IR spectra of (8b) showed absorption bands at 3,329 cm−1 due to the amide –NH group, at 1,701 cm−1 due to the ketone C=O stretching, and at 1,680 cm−1 due to the amide C=O group. Additionally the IR spectra of (9b) showed absorption bands at 3,423 cm−1 due to the amide –NH group, at 3,138 cm−1 due to the pyridine =C–H stretching, and at 1,671 cm−1 due to the amide C=O group. The 1H-NMR spectrum of (4a) showed a singlet at δ = 4.89 ppm for the ArCH 2–N+ protons, a quadruplet at δ = 3.46 ppm for the –N+(CH 2CH3)3 protons and a triplet at δ = 1.47 ppm for the methyl protons of the –N+(CH2CH 3)3 group. The 1H-NMR spectrum of (5a) showed a singlet at δ = 6.27 ppm for the ArCH 2–Py+ protons, a singlet at δ = 4.50 ppm for the –CH 2O–protons a quintet at δ = 1.53 ppm for the methylene protons of the –CH2CH 2CH2NH group. The 1H-NMR spectrum of (8b) showed a singlet at δ = 5.53 ppm for the O=CCH 2–N+ protons, a singlet at δ = 4.55 ppm for the –CH 2OAr protons, a quintet at δ = 3.87 ppm for the –N+(CH 2CH3)3 group and a triplet at δ = 1.45 ppm for the nine methyl protons of the –N+(CH2CH 3)3 group. The 1H-NMR spectrum of (9b) showed a singlet at δ = 7.12 ppm for the methylene protons of the O=CCH 2–Py+ group, a triplet at δ = 6.87 ppm for the amide –HNC=O proton, and a singlet at δ = 4.54 ppm for the methylene protons of the –CH 2O–group.

Corrosion Tests in Acidic Media and Contact Angle Measurements

Corrosion inhibition capabilities of synthesized compounds tested in 1.5 M HCl and 1.5 M H2SO4 acidic media are given as percentage inhibition efficiencies (IE %). Observed results for the triethylaminium and pyridinium surfactants are given in Tables 1 and 2. Molecular formulas of the tested compounds are given in Scheme 3. Percentage inhibition efficiencies were calculated using the following equation:

$$ ({\text{IE}}\,\% ) = \frac{{W_{\text{o}} - W}}{{W_{\text{o}} }} \times 100 $$
(1)

where (IE %) is the percentage inhibition efficiency, Wo is the weight loss of the coupon in the absence of inhibitor and W is the weight loss of the coupon in the same environment with the presence of an inhibitor. Acetone (10 %) was added to facilitate solubility of the inhibitors (8a8c) and (9a9c) in acidic solutions and to the reference solutions to eliminate the solvent factor.

Table 1 Corrosion inhibition efficiencies (IE %) for varying concentrations of tested inhibitors in 1.5 M HCl for 24 h at room temperature
Table 2 Corrosion inhibition efficiencies (IE %) for varying concentrations of tested inhibitors in 1.5 M H2SO4 for 24 h at room temperature
Scheme 3
scheme 3

Molecular formulas of the tested inhibitors

Compounds prepared in this study containing straight chain alkyl and quaternary ammonium groups that form hydrophobic and hydrophilic parts of the molecules respectively. The results obtained of the corrosion inhibition efficiency of the synthesized cationic type surface active compounds are listed in Tables 1 and 2.

Otherwise the effect of HCl concentration on corrosion inhibition was investigated for selected compounds (4b4c) and (5b) at 50 ppm fixed inhibitor concentration in 100 mL of 2, 4 and 6 M HCl solutions respectively. The results obtained are given in Table 3. Contact angles were measured at room temperature with the compounds (4a), (4b) and (9c) and theresults obtained are given in Table 4.

Table 3 Corrosion inhibition efficiencies (IE %) of some synthesized surfactants in varying concentrations of HCl for 24 h at room temperature
Table 4 Static water contact angle measurements on the metal surface that immersed in 1.5 M 100 mL HCl solution containing one of the inhibitors 4a, 4b or 9c a at 100 ppm concentration

These results prompted us to propose that a reliable mechanism of corrosion inhibition of these surfactants depends on the variety of factors related both to physical and chemical properties of inhibitor molecules. For instance, alkyl chain length of the hydrophobic moieties, critical micelle concentration (CMC) and solubility properties of these inhibitors, and additionally a molecular monolayer or a molecular bilayer or multilayers formed by these inhibitor molecules play important roles on their tendency toward corrosion inhibition.

First of all, when a metal surface is positively charged, anions like chlorides or bromides can adsorb onto the surface to create dipoles in acidic solutions (Fig. 1).

Fig. 1
figure 1

Dipoles created by halide ions in an acidic medium

In this way, cationic corrosion inhibitors can readily adsorb onto the observed negatively charged metal surface to give protection against corrosive damage. In this sense, the possible corrosion inhibition mechanism can be explained based on the adsorption of the long chain cationic molecules on the metal. Firstly inhibitor molecules are adsorbed on the dipoles to build a monomolecular layer below and at the critical micelle concentration. The dipoles are observed via interaction of bromide ions and the positively charged metal surface. The hydrophilic quaternary ammonium head group of the surfactant molecules is adsorbed onto to the dipole via electrostatic attraction. On the other hand the hydrophobic tail of the surfactant molecule is oriented perpendicularly to the metal surface. Thus bilayer or multimolecular layers designated as protective layers are formed which behave as barrier between the metal and the corrosive medium.

As shown in Table 1 the highest inhibition values for the compounds (4b4c), (5b5c), (8c) and (9b) were obtained at the critical micelle concentrations (CMC) of the inhibitors. As it can be seen from the evaluated results there is no increase in inhibition efficiency above the CMC. The orientations of the inhibitor molecules (4b4c), (5b5c), (8c) and (9b) at the metal-acidic solution interface and the possible inhibition mechanism was shown in Fig. 2.

Fig. 2
figure 2

Corrosion inhibition by compounds 4b4c, 5b5c, 8c and 9b at CMC

On the other hand, the inhibition efficiencies of the compounds (4a), (8a8b), (5a) and (9a) increased with an increase in inhibitor concentration. Orientation of the molecules and the possible inhibition mechanism for these inhibitors is shown in Fig. 3.

Fig. 3
figure 3

Corrosion inhibition by compounds 4a, 8a8b, 5a and 9a

The hydrophobic part plays an important role in corrosion inhibition of the inhibitor molecules. Non-polar interactions between the long alkyl chains of the molecules due to Van der Waals forces provides a better protective layer against corrosive media. The length of the chain is very important in this case. Usually longer hydrocarbon chains provide better corrosion protection but sometimes solubility of the inhibitors decreases and this leads to a reduction in the inhibitory activity. Additionally, tight packing provided by hydrophobic alkyl chains of molecules contributes to an increase in inhibition. As seen in Table 2, the compounds (5c) and (9c) including the longest hydrophobic alkyl chains demonstrated low protection of metal against acidic attack because of their poor solubility in the medium. The possible inhibition mechanism for these inhibitors is shown in Fig. 4.

Fig. 4
figure 4

Orientation and low inhibition exhibited by compounds 5c and 9c

The above-discussed mechanisms in relation to the corrosion inhibition of synthesized inhibitors are also supported by the contact angle measurements. As seen in the second column in Table 4, the measured contact angle values of the that water droplet on the inhibitor free metal surface changed between 14.72 and 19.51. Furthermore, measured values of the contact angles on the surfaces of the metals containing inhibitors (4a4b) or (9c), changed between, 35.09–35.45, 79.85–81.97 and 53.87–54.56 respectively. The photographs taken of the contact angle measurements are given in Fig. 5.

Fig. 5
figure 5

View of the water droplet on the metal surface

As is clear from these results, cationic surface-active agents increased the metal’s surface hydrophobicity which gave rise in the value of the measured contact angle for the water droplet. As well as these observations, for the compound (9c) contact angle was measured in a different place on the metal surface. In this case quite different result was obtained according to the first measurement. Depending on the time the first contact angle measurement showed little change, while the angle of the second measurement is quite varied. See the second line from the bottom in (Fig. 6). These results indicate the presence of partially hydrophobic and partially hydrophilic regions on the surface of the metal due to low solubility of the inhibitors (5c) and (9c). As a result these data supports our proposed inhibition mechanism for the compounds (5c) and (9c).

Fig. 6
figure 6

Contact angle measurements versus time

In addition to the tests performed on the synthesized cationic surfactants that are specified in the experimental section of this study, we also investigated inhibitory activities of the inhibitors at higher than 1.5 M concentrations of HCl. Despite the relatively high HCl concentration and also as low as 50 ppm of inhibitor concentration, the results of inhibition obtained were very good. It was observed that the tested three compounds gave maximum protection in 4 M of HCl solution (Table 3).

As a result we can conclude that almost all the synthesized cationic surface-active compounds exhibited fairly good corrosion inhibitory efficiencies in both HCl and H2SO4 media. In addition both weight loss test results and contact angle measurement data supported the mechanisms we proposed for the corrosion inhibition. On the other hand, all of the inhibitors investigated in this study were synthesized on the basis of biodegradable compounds.