3.3.1 Molecular Dynamics (MD) Simulations
The interest in MD simulation is growing due to the rapid development of complex hardware and software that allow simulation of large systems. The concept of MD simulation is based on solving Newton’s equations of motion for the atoms in the simulation system using numerical integration [41, 42]. In a given system, its constituents, i.e. atoms and molecules, can move and interact with other constituents in the vicinity. The time evolution and atomic‐scale dynamics of this system can be simulated and described by MD. The total energy of the system is mathematically described as a function of all atomic coordinates. A point‐like nature of the interactions between atoms in the system are maintained conforming to a given potential energy E(r1, r2,…,rN), where rj is the vector position of the j‐th atom. To obtain atom trajectories, the equation of motion is used to determine the location and velocity vector of each atom at every time‐step [43–45].
(3.16)
where r is the spatial gradient, E is the system’s empirical potential, while ri and mi denotes the spatial coordinates and the mass of the i‐th atom, respectively.
3.3.1.1 Total Energy Minimization
The aim of the total energy minimization process, also called geometry optimization or structural relaxation, is to find a stable structure, and it is the first essential step in almost all atomistic simulations [1, 2]. By performing this iterative procedure, atoms in a system can reach a lowest energy configuration; their coordinates are adjusted, so the net forces acting on the atoms are zero. In this procedure, forces on atoms as well as the energy of the system are calculated considering only total energies. An effective energy minimization process depends on the used minimization algorithms, which are mostly based on experimentally determined thermodynamic parameters [46, 47].
The simplest minimization algorithm is the steepest descents (SD). It is not a recommended minimization method given the fact that it does not consider previous steps when choosing a search direction. The method of conjugate gradients (CG) is a well‐preferred minimization method and can correct the failings of SD. It is generally a reliable and robust minimization algorithm that is preferred for minimizing a large number of simulation systems. Another minimization algorithm is the Quasi‐Newton (QN) methods, which seek to build an approximation to the inverse of the Hessian during the minimization. QN methods are often more efficient than Newton’s method.
3.3.1.2 Ensemble
The accurate characterization of a system cannot be achieved only by its total energy; the consideration of realistic conditions such as entropy changes, volume, and pressure is essential to produce a useful output. In MD simulation, different thermodynamic potentials, called the ensemble, are used to account for these conditions. The ensemble is a collection of all possible systems that have identical thermodynamic or macroscopic attribute but different microscopic states. An ensemble leaves one parameter variable while it fixes the others [48]. The most common ensembles are the microcanonical ensemble (NVE), canonical (NVT), isobaric–isothermal ensemble (NPT), and grand canonical ensemble (μVT). With these ensembles, the energy can vary during the simulation.
3.3.1.3 Force Fields
In MD simulation, the used potential is a critical factor in determining the reliability of simulations. The set of parameters acting on the nuclei of atoms and mathematical formulas that relate a potential energy (usually described by pair potentials) to a configuration of a molecular system is called Force fields. It is a challenging task in every simulation to choose or create a correct force field for a given system [49]. Force fields are parameterized with experimental data and those from ab initio calculations. In corrosion inhibition, the Condensed‐phase Optimized Molecular Potentials for Atomistic Simulation Studies (COMPASS) is the most cited force field. In addition to ab initio calculations, COMPASS was parameterized considering various experimental data including organic compounds made with H, C, N, O, S, P atoms, halogens, and metals [50]. Other used force fields include universal force field (UFF) [51, 52], which is an all‐atom potential containing parameters for each atom, and the consistent‐valence force field (CVFF) that is a generalized valence force field [53–55]. Because of the high computational cost, three‐ and more‐body interactions are not considered when parameterizing a force field [56].
3.3.1.4 Periodic Boundary Condition
It is impossible to deal with a system composed of 6×1023 particles (one‐mol‐order size) in MD simulation. Fortunately, reasonable results can be obtained by treating a small system of about 100–10 000 particles using the periodic boundary condition approach. In the case of a two‐dimensional system as that represented in Figure 3.1, the main simulation box is replicated so the simulation region is the central square and the virtual boxes are the surrounding squares. For instance, the actual corrosion inhibition process cannot be simulated using an infinite system since it involves thousands of atoms and molecules [50]. To make more realistic simulations with a reduced computational cost, researchers developed several boundary conditions; among them, the periodic boundary conditions, which can make the corrosion inhibition simulation close to an infinite system. It has been used in all MD simulations of corrosion inhibition [57–67].
Figure 3.1 Periodic boundary condition.
3.3.2 Monte Carlo (MC) Simulations
In contrast to the MD approach, which deals with both thermodynamic equilibrium and nonequilibrium phenomena, the MC method can only simulate a system under thermodynamic equilibrium [45]. It generates a series of configurations using random trial moves under a certain stochastic law regardless of the equation of motion. The concept of Monte Carlo has been used to develop several methods such as Metropolis MC, kinetic Monte Carlo (kMC), and quantum Monte Carlo which are used, besides atomistic simulations, in many physical and chemical applications. In corrosion inhibition research, Metropolis MC is the widely used approach to simulate the interaction between inhibitor molecules and surface of metals.
3.3.3 Parameters Derived from MD and MC Simulations of Corrosion Inhibition
In the field of corrosion inhibition, atomistic simulations have been used to provide some very relevant and credible insights into the interaction between the chemical compounds used as corrosion inhibitors and metals [68, 69], which cannot be gained from laboratory‐based experiments. The comprehensive description of the molecular system on the atomic level can help in the understanding of the adsorption mechanism. Simulation systems differ significantly from work to work; however, most of the atomistic simulations for corrosion inhibition focus on finding a link between the experimental inhibition efficiency and parameters derived from simulations [68, 69]. The choice of suitable surface plans for simulations has been a subject of intense interest. Based on morphology parameters, Cu(111) and Al(111) are so far the most used copper and aluminum plans [3, 70].
In the case of iron plans, for investigating the adsorption of pyrrole, furan, and thiophene on iron surfaces, Guo et al. [71] found that among the three iron plans, Fe(110), Fe(100), and Fe(111), the Fe(110) has a high packed density and it is the most stable plans compared with others. Other parameters derived from MD and MC simulations are reviewed in the following