Introduction

In recent years, nonequilibrium molecular dynamics (NEMD) simulations have given unique insights into the nanoscale behaviour of fluids under shear. A detailed understanding of this behaviour is crucial in tribology since this often governs the macroscopic friction (Vanossi et al. 2013) and wear (Molinari et al. 2018) responses that are observed experimentally. MD was invented in the 1950s and can be used to study the dynamics of a system of interacting particles by numerically solving Newtons equations of motion using a finite difference scheme over a series of short time steps. In classical MD, the forces between the particles and their potential energies are calculated using interatomic potentials or molecular mechanics force fields (Ewen et al. 2018a). Initially, MD played a central role in corroborating theories of the liquid state (Barker and Henderson 1976). For example, Alder and Wainwright (1957) showed that ‘hard sphere’ liquids crystallized as the density were increased above a certain value while Rahman (1964) showed that the diffusion and structural evolution of liquid argon takes place by a series of small, highly coordinated motions of neighbouring atoms.

More recently, MD has been increasingly utilized to study liquid transport properties such as viscosity, initially without shear applied (Levesque et al. 1973) but using Green–Kubo formalism (Kubo 1957). This remains a popular equilibrium method to study such transport coefficient, but NEMD simulations, in which the fluid is sheared, is particularly useful for tribological applications. In early NEMD simulations, the system was sheared by applying an equal and opposite velocity to the regions of fluid atoms at the top and bottom of the simulation cell (Ashurst and Hoover 1975). Instead of moving the outer fluid atoms, shear is now more commonly applied by adding velocities to solid walls which confine the system (Bitsanis et al. 1987). Confinement can significantly influence the fluid behaviour (Granick 1991; Gubbins et al. 2011), which is discussed in more detail below.

An example system setup for confined NEMD simulations with moving solid surfaces is shown in Fig. 3.1. Periodic boundary conditions are applied in x and y directions.

Fig. 3.1
figure 1

Adapted from Ewen et al. (2018a)

Schematic of confined NEMD simulation (a) and an example snapshot from confined NEMD simulation (b).

Alternatively, bulk NEMD simulations can be performed with periodic boundary conditions in all three Cartesian directions. In bulk NEMD simulations, the periodic cell is deformed using the SLLOD equations of motion (Evans and Morriss 1984), Lees–Edwards boundary conditions (Lees and Edwards 1972) and temperature is controlled by a non-stochastic thermostat like Nosé–Hoover (Nosé 1984; Hoover 1985). It is important to note that excellent agreement between bulk and confined NEMD simulations has been observed when the surfaces are sufficiently separated such that there is a negligible confinement-induced viscosity increase in the latter (Liem et al. 1992; Todd and Daivis 2007). In this chapter, we will focus on recent applications of NEMD simulations in tribology. For the underlying theory, readers are directed to comprehensive books on the topic by Evans and Morriss (2008) and Todd and Daivis (2017).

Over the past four decades, advances in computational power, software parallelization and model sophistication have enabled NEMD simulations to progress significantly in terms of time and length scale accessibility, molecule complexity and accuracy compared to experiment (Ewen et al. 2018a). Thus, NEMD has now become capable of directly evaluating physical properties in industrially important systems. For example, NEMD can now accurately describe the high-pressure rheology of lubricant molecules (Jadhao and Robbins 2017), which is of significant industrial interest. Moreover, relatively new techniques, such as ab initio NEMD, are starting to be applied to study additive tribochemistry (Loehlé and Righi 2018; Kuwahara et al. 2019). As a result, NEMD can now be employed to test the applicability of macroscopic models and even facilitate the rational design of improved lubricants and additive molecules (Ewen et al. 2018a).

This chapter will first discuss key simulation methodology required to obtain accurate results from NEMD simulations. The subsequent sections will focus on three important areas where NEMD has been recently applied. The first section will discuss classical NEMD simulations of confined lubricants, the second and third sections are devoted, respectively, to NEMD and ab initio NEMD simulations of confined lubricant additives. The final section examines a multi-scale method by domain decomposition coupling CFD and NEMD and applied to tribologically relevant systems.

Simulation Details

Within the constraints of commonly available computational resources, only rather small time (ns) and length (nm) scales are generally accessible to MD simulations. As a consequence, an important consideration for any MD simulation is whether the behaviour of interest can be captured over these accessible scales (Elber 2016).

Examples of simulation methods used in tribology and their accessible time and length scales are shown in Fig. 3.2.

Fig. 3.2
figure 2

Adapted from Ewen et al. (2018a)

Different methods and accessible scales for simulations of tribological systems.

One important manifestation of the rather short accessible timescales in NEMD simulations are that high shear rates (generally \(\ge \)10\(^7\) s\(^{-1}\)) are required to reach a nonequilibrium steady state (Bair et al. 2002a; Jadhao and Robbins 2017). Simulating lower shear rates have been a long-term goal of NEMD simulations to facilitate direct overlap with experiments and real components. For comparison, the high-pressure viscosity of lubricants can generally only be measured up to shear rates of approximately 10\(^4\) s\(^{-1}\) (Bair et al. 2002a), tribology experiments can extend up to around 10\(^6\) s\(^{-1}\) (Spikes and Jie 2014), while high-performance engine components can reach up to 10\(^8\) s\(^{-1}\) (Taylor and de Kraker 2017). Direct NEMD simulations have been conducted for squalane at shear rates as low as 10\(^5\) s\(^{-1}\) through \(\upmu \)s simulations on large supercomputers by Jadhao and Robbins (2017), although direct overlap between experiments and NEMD simulations has still not been obtained for realistic fluids. Techniques, such as the transient-time correlation function (TTCF) (Evans and Morriss 1988), facilitate accurate results for shear rates below 10\(^5\) s\(^{-1}\) using ensemble averaging correlation products from many independent NEMD trajectories (Pan and McCabe 2006). However, thousands of independent trajectories are required, making it a rather computationally expensive technique, and thus it has only been used to study rather small molecules (n-decane) up to now (Pan and McCabe 2006).

To obtain accurate results from confined NEMD simulations, which are representative of experiments, a number of methodological choices need to be carefully considered. For example, an appropriate thermostatting strategy and force field should be employed; these are briefly outlined below. In NEMD simulations, effective thermostatting is essential to reach a nonequilibrium steady state by removing heat produced during the shearing process. There are a number of possible thermostatting methods available for confined NEMD simulations, as reviewed by Bernardi et al. (2010) and Yong and Zhang (2013). For confined NEMD simulations, the thermostat is most commonly applied only to the wall atoms. This allows a thermal gradient to develop through the thickness of the lubricant film (Khare et al. 1997), as it occurs in tribology experiments (Lu et al. 2018). NEMD simulations with thermostats applied directly to the confined fluid molecules do not allow temperature gradients to develop and can artificially influence the structure, flow and friction behaviour (Martini et al. 2008; Bernardi et al. 2010; Yong and Zhang 2013). In confined NEMD simulations of tribological systems, wall thermostatting is performed using stochastic thermostatting algorithms, e.g. Langevin (Schneider and Stoll 1978), are generally utilized due to their efficient energy dissipation (Berro et al. 2011). For the relatively thin films usually studied in confined NEMD simulations (nm), the temperature rise, which is generally largest in the centre of the film, only becomes significant at high shear rates (Berro et al. 2011).

In MD simulations, force fields are used to describe the forces between the system of interacting atoms. The accuracy of any MD simulation is heavily dependent on the force field used, and thus significant effort should be spent choosing and testing before production simulations are conducted (Ewen et al. 2016b). The functional forms of most classical molecular force fields are quite similar, most include bonded (bond stretching, angle bending, and dihedral torsion) and nonbonded (van der Waals, electrostatic) terms. Bonded interactions are commonly represented with simple harmonic potentials while nonbonded terms are usually represented by the Lennard-Jones (LJ) and Coulomb potentials. LJ interactions are usually cut-off at a distance of around 10 Å  whereas long-ranged Coulombic interactions are treated with a solver such as particle–particle, particle–mesh (PPPM) since truncation can lead to unphysical results (Feller et al. 1996). These potentials can be empirically parametrized to reproduce important experimental properties for a set of training compounds, derived from first principles calculations, or computed using a combination of the two. Force field parameterization is a complex and time-consuming process, and most of the force fields used to study liquid lubricants were originally developed for biological applications (Ewen et al. 2016b).

A key target of NEMD simulations of tribological systems is to yield realistic viscous behaviour of lubricant-sized molecules, which requires the use of highly accurate force fields. The computational expense of classical NEMD simulations is usually dominated by the nonbonded interactions. Consequently, most historic simulations of tribological systems which include alkane molecules have employed united-atom (UA) force fields where the nonpolar hydrogens are grouped with the carbon atoms to generate CH, CH\(_2\) and CH\(_3\) pseudo-atoms (Ewen et al. 2016b). This decreases the number of interaction sites by around 2/3 and computational expense by up to an order of magnitude compared to all-atom (AA) force fields (Martin and Siepmann 1999). However, UA force fields have been shown to lead to large viscosity under prediction for linear, long-chain alkanes (50% error for n-hexadecane) compared to experiment (Ewen et al. 2016b). For alkanes with multiple short branches, UA force fields can give reasonably accurate viscosity results (15% for squalane), but for those with fewer, longer branches they are less accurate (50% for 9-n-octyldocosane) (Moore et al. 2000). For such molecules, all-atom (AA) force fields are required to accurately reproduce viscous behaviour (Allen and Rowley 1997; Ewen et al. 2016b). For example, the L-OPLS-AA force field (Siu et al. 2012) within 10% for n-hexadecane at ambient and high-temperature–high-pressure conditions (Ewen et al. 2016b). Thus, for accurate viscosity prediction, AA force fields are required for longer, linear molecules, while for more branched, shorter molecules, UA force fields may be an acceptable trade-off.

Classical NEMD Simulations of Lubricants

Many lubricated engineering components include elements that roll and slide together, for example, rolling bearings, gears, constant velocity joints and cam/follower systems. In these components, a significant proportion of the friction loss is in the elastohydrodynamic lubrication (EHL) regime, where very thin (nm) fluid films are sheared at very high shear rate, \(\dot{\gamma }\) (10\(^{5}\)\(10^{8}\) s\(^{-1}\)) and pressure, P (GPa) (Spikes and Jie 2014). Such extreme conditions are clearly difficult to investigate with in situ experiments and thus prediction of EHL friction remains a considerable challenge.

Bulk NEMD Simulations

NEMD simulations have been widely utilized to study fluids under high-pressure and shear conditions. For example, Moore et al. (2000) studied the effect of high shear rate and temperature on the viscosity of C\(_{30}\) isomers. While the Newtonian viscosity was significantly underpredicted due to the UA force field used, the change in viscosity with temperature, also known as viscosity index (VI), was in excellent agreement with experiments. Similarly, McCabe et al. (2001) and Liu et al. (2015) performed NEMD simulations to study the change in viscosity with pressure of 9-octylheptadecane and 1-decene trimer. The Newtonian viscosity was again significantly underpredicted due to the UA force fields used; however, the change in viscosity with pressure, the \(\alpha \) value was in good agreement with experiment in both cases. Accurate prediction of VI and \(\alpha \) of new molecules is a potentially valuable application of NEMD since these properties are important to their performance under EHL conditions (Bair and Kottke 2003).

NEMD has been used to test the applicability of the Eyring (1936) and Carreau (1972) shear thinning models commonly applied to predict EHL friction. For example, Bair et al. (2002a) compared the high-pressure viscosity of a molecular lubricant (squalane) from a rheometer and bulk NEMD simulations. This was the first comparison of the nonlinear rheology predicted by NEMD with experiment, and was thus the first experimental test of NEMD simulations in the shear thinning regime. Although the experimental and simulation data were separated by several orders of magnitude in shear rate, they collapsed onto the same time–temperature superposition master curve (Bair et al. 2002a). This master curve was successfully fit using the power-law Carreau (1972) model. Similarly, Liu et al. (2017) used the Carreau (1972) model to describe the shear thinning behaviour of squalane as well as several types of poly-alpha-olefin (PAO) molecule. They correlated the shear thinning behaviour with changes to the conformation of the molecules, quantified through the radius of gyration. Recent bulk NEMD simulations by Jadhao and Robbins (2017) suggested that, although the viscosity-shear rate behaviour at lower pressure was better described by the Carreau (1972) model, the Eyring (1936) shear thinning model was more appropriate at higher pressure. Moreover, the ‘incremental viscosity’ of the Eyring model, measured for LJ fluids using a ‘shear-kick’ NEMD scheme, has been shown to be a special case of the Carreau model (Heyes et al. 2018).

Confined NEMD Simulation Results

A significant assumption of bulk NEMD simulations is that a linear velocity profile develops in the fluid between the sliding surfaces (Delhommelle et al. 2003; Cao and Likhtman 2012). However, deviations from this Couette case were suggested by Israelachvili (1986) from surface forces apparatus experiments and later confirmed by confined NEMD simulations (Thompson and Robbins 1990). Such behaviour in nanoconfinement has been attributed to phase transitions (vitrification or crystallization) and large viscosity increases that facilitate localization of the shear at the confining surfaces or within the fluid itself (Thompson and Robbins 1990). Robbins and Smith (1996) suggested that high pressures could induce similar phase transitions to those in the relatively thicker EHL films (\(\approx \)100 nm) (Spikes and Jie 2014). Moreover, nonlinear flow has been used for more than half a century to explain observations from EHL experiments (Plint 1967; Ehret et al. 1998), but conclusive experimental proof has remained elusive for realistic lubricants. However, such behaviour has been observed in confined NEMD simulations, with increasing complexity, as discussed below.

Comprehensive confined NEMD simulations of atomic Lennard-Jones (LJ) fluids under EHL conditions (Heyes et al. 2012; Gattinoni et al. 2013; Maćkowiak et al. 2016) have identified the transition from Couette flow to various types of shear localization with increasing pressure. For example, central localization (CL), where the outer regions of the fluid move at the same velocity as the confining surfaces and only the central region is sheared. Another form of shear localization is plug slip (PS), where the outer regions of the fluid are sheared while the central region remains unsheared. In the LJ fluid systems, friction behaviour deviated from classical friction relations between macroscopic bodies, for example, the friction force was observed to decrease with increasing load and shear rate in some cases (Maćkowiak et al. 2016). More recently, similar NEMD simulations have been performed for molecular systems (Ewen et al. 2017b; Washizu et al. 2017; Porras-Vazquez et al. 2018).

The EHL friction coefficient from these NEMD simulations was in good agreement with extrapolations from experiments conducted at lower shear rates (Ewen et al. 2017b; Porras-Vazquez et al. 2018). For example, Fig. 3.3a shows the change in friction with logarithmic shear rate for two molecular fluids; 2,6,10,15,19,23-hexamethyl-tetracosane (squalane) and 2,3-dimethyl-2-[(3-methylbicyclo[2.2.1]hept-2-yl)methyl]bicyclo[2.2.1]heptane (DM2H). Squalane is a linear C\(_{24}\) alkane with six methyl branches that have commonly been employed as a model lubricant, designed to give low friction. DM2H is a rigid bicyclic molecule designed to give high friction for use in traction drives (Zhang et al. 2017).

Fig. 3.3
figure 3

Adapted from Ewen et al. (2017b)

a Friction coefficient versus log(shear rate) for the fluids at: 353 K and 0.5–2.0 GPa; squalane (i) a DM2H (ii). Thermally corrected experimental data shown as filled diamonds. Isothermal NEMD data shown as filled circles, NEMD data with a temperature rise shown as open circles. NEMD data time-averaged for the final 10 nm of sliding. b Flow profiles for squalane at 0.5 GPa (i), squalane at 2.0 GPa (ii), DM2H at 0.5 GPa (iii), DM2H at 2.0 GPa (iv).

In Fig. 3.3a-i, the friction coefficient for squalane increases logarithmically with shear rate and also generally increases with pressure (Ewen et al. 2017b). This type of behaviour is commonly observed in experiments and NEMD simulations of lubricants under EHL conditions (Spikes and Jie 2014). The slope of the friction coefficient with logarithmic shear rate decreases with increasing pressure, as was also observed in NEMD simulations of binary atomic LJ fluids (Gattinoni et al. 2013). At very high shear rate, the friction coefficient of squalane at 0.5 GPa exceeds that at 2.0 GPa, which has also been observed for LJ fluids (Maćkowiak et al. 2016).

Although Fig. 3.3a-ii shows that the friction coefficient of DM2H also increases logarithmically with shear rate, it does so with a much lower slope than for squalane. This behaviour is similar to that observed in NEMD simulations of single-component LJ fluids subjected to high pressures (Heyes et al. 2012; Gattinoni et al. 2013; Maćkowiak et al. 2016). Moreover, DM2H shows much higher friction than squalane, particularly at low shear rate. The high friction of DM2H can be attributed to interlocking of the bulky bicyclo[2.2.1]heptyl groups which coupled with its internal molecular stiffness, increases energy barriers for neighbouring molecules to slide over one another (Ewen et al. 2017b). The friction coefficient of DM2H at 0.5 GPa exceeds that at 2.0 GPa at much lower shear rate than for squalane.

Figure 3.3b shows the flow profiles for squalane at 0.5 GPa (i) and 2.0 GPa (ii) and DM2H at 0.5 GPa (iii) and 2.0 GPa (iv). In all cases, the outer molecular layer of fluid moves at the same velocity as the iron oxide surfaces, indicating that no boundary slip occurs (Ewen et al. 2017b). For squalane at 0.5 GPa, a Couette flow profile develops, with a linear velocity gradient in the fluid confined between the two surfaces. At 2.0 GPa, the mass density profile shows strong layering of the fluid close to the surfaces, suggesting the formation of an ordered, solid-like region close to the slabs, with a liquid-like region in the centre of the film. It is important to note that the strong layering extends much further into fluid than was directly influenced by the surface (LJ interactions cut-off at 12 Å). The flow profile for squalane at 2.0 GPa shows CL behaviour, in common with the simulations for LJ fluids (Heyes et al. 2012; Gattinoni et al. 2013; Maćkowiak et al. 2016). Experiments have also shown CL (Bair et al. 1993, 1994; Bair and McCabe 2004; Galmiche et al. 2016) under EHL conditions, although presently only for very viscous polymers.

The change in flow behaviour with pressure for DM2H is similar to that for squalane, but it shows greater divergence from Couette flow under equivalent conditions. Even at 0.5 GPa, DM2H shows weak CL, with layering of the molecules close to the surface resulting in a cubic velocity profile. At 2.0 GPa, DM2H shows PS, another phase identified in confined NEMD simulations of LJ fluids (Heyes et al. 2012; Gattinoni et al. 2013; Maćkowiak et al. 2016). Note that PS is distinct from the boundary slip behaviour, which is commonly observed in NEMD simulations of very thin films (Martini et al. 2008). PS has also been observed experimentally for very viscous polymers under EHL conditions (Ponjavic et al. 2014; Sperka et al. 2014; Jeffreys et al. 2019).

From these NEMD simulations, potential links have been drawn between the glass transition, nonlinear flow and the limiting shear stress. This is the point at which the friction coefficient becomes insensitive to shear rate and pressure (Martinie and Vergne 2016). Recent NEMD simulations have suggested that it is the glass transition of the confined fluid that drives both the unusual friction and flow behaviour (Porras-Vazquez et al. 2018).

Classical NEMD Simulations of Lubricant Additives

Organic friction modifiers (OFMs) are amphiphilic surfactant molecules that contain nonpolar hydrocarbon tail groups attached to polar head groups. Commercial OFMs generally contain unbranched aliphatic tail groups containing 12–20 carbon atoms as a result of their effective friction reduction, high base oil solubility and high availability from natural fats and oils. Many head groups have been employed, but the most commonly studied in the literature are carboxylic acids, amines, amides and glyceride esters. Extensive experimental evidence suggests that OFMs reduce friction through the adsorption of their polar head groups to metal-, ceramic- or carbon-based surfaces, with strong, cumulative van der Waals forces between proximal nonpolar tails leading to the formation of incompressible monolayers that prevent contact between solid surfaces (Spikes 2015).

Classical NEMD simulations can be used to simultaneously probe the nanoscale structure and friction of OFM films, making them a valuable complement to experiments (Ewen et al. 2018a; Apóstolo et al. 2019). Due to the relatively slow film formation process on MD timescales, NEMD simulations with preformed films, similar to those formed by Langmuir–Blodgett experiments (Briscoe and Evans 1982), are usually employed. Carboxylic acid Langmuir–Blodgett films on solid surfaces were first studied by MD in the 1990s (Moller et al. 1991). This was soon followed by the first NEMD simulations of such systems which showed that higher coverage films led to lower friction (Kong et al. 1997). Their simulations predicted that OFM molecules were approximately normal to the surface at high surface coverage (4.8 nm\(^{-2}\)) but became more tilted at lower surface coverage. The authors suggested that tilting maximizes the van der Waals attraction between the chains by increasing the packing efficiency. The tilting transition was attributed to the packing of the hydrogen atoms belonging to methylene groups on neighbouring molecules, meaning that the correct behaviour could only be accurately reproduced using AA and not UA force fields (Karaborni and Verbist 1994). NEMD simulations Ewen et al. (2016b) showed that the use of AA force fields is also critical to give accurate flow and particularly friction behaviour for OFM films under shear.

More recently, NEMD simulations of preformed OFM films have investigated the effect of head group type (Eder et al. 2013; Ewen et al. 2016a), tailgroup structure (Doig et al. 2014; Ewen et al. 2016a) and surface roughness (Eder et al. 2013; Ewen et al. 2017a) on their structure and friction under boundary lubrication conditions. For example, Fig. 3.4 shows the change in mass density and flow profiles (a) and friction coefficient (b) with surface coverage for a representative OFM, stearic acid (SA). The velocity profiles at all SA coverages in Fig. 3.4a show that there is no slip at the surface, as expected for the strongly absorbed OFM head groups. The OFM tail groups move at a similar velocity as the slab to which they are absorbed (±5 m s\(^{-1}\)) until the region where they become interdigitated with the n-hexadecane lubricant. The low-coverage (1.44 nm\(^{-2}\)) flow profile (i) resembles Couette flow, with a near-linear fluid velocity profile between the slabs. The velocity profile contains step-like features, suggesting partial plug flow between the combined OFM-hexadecane layers. At medium coverage (2.88 nm\(^{-2}\)) (ii), the OFM tail groups are sheared in the region in which they are interdigitated with hexadecane. The velocity profile passes through zero at the centre of the hexadecane layer, with a steeper gradient than at low coverage. At high coverage (4.32 nm\(^{-2}\)) (iii), the fluid layers remain mostly unsheared and slip planes form between the well-defined OFM and hexadecane layers.

Fig. 3.4
figure 4

Adapted from Ewen et al. (2016a)

a Flow and mass density profiles during sliding, for a representative OFM system (SA) at low (i), medium (ii) and high (iii) coverage. b Friction coefficient as a function of coverage for SA, OA, SAm, OAm, GMS and GMO. Both at 0.5 GPa and 10 m s\(^{-1}\).

This flow behaviour correlates with the observed change in friction coefficient with surface coverage in Fig. 3.4b. Results are shown for SA, oleic acid (OA), stearamide (SAm), oleamide (OAm, glycerol monostearate (GMS), and glycerol monooleate (GMO). For all of the OFMs at 10 m s\(^{-1}\), the friction coefficient increases by around 5% for all OFMs between low and medium coverage (Fig. 3.10a) before decreasing by 30% between medium and high coverage. This trend is consistent with SFA experiments using monolayer films formed from other surfactants in which friction increased as the film moved from a liquid-like to an amorphous film and then decreased when a solid-like film was formed (Yoshizawa et al. 1993).

Comparisons have also been made between the friction-sliding velocity behaviour from confined NEMD simulations of OFMs and boundary friction experiments. Figure 3.5 shows the change in the friction coefficient with logarithmic sliding velocity from CETR UMT boundary friction experiments (Campen et al. 2012) and NEMD simulations (Ewen et al. 2016a, b). The NEMD simulations were performed at much higher sliding speeds (1–10 m s\(^{-1}\)) than the tribology experiments (10\(^{-7}\)–10\(^{-2}\) m s\(^{-1}\)). The NEMD simulations were performed with iron oxide surfaces at 0.5 GPa and 300 K for low-coverage (1.44 nm\(^{-2}\)) and high-coverage (4.32 nm\(^{-2}\)) SA films. In the tribology experiments, OFM concentration, rather than coverage, is varied since this is far easier to measure and control. The tribology experiments were performed in a steel–steel contact at 0.7 GPa and 308–373 K for SA and OA at a concentration of 0.01 mol dm\(^{-3}\). Desorption isotherm experiments have shown that SA forms films with higher maximum coverage (\(\approx \)4 nm\(^{-2}\)) compared to OA (\(\approx \)2 nm\(^{-2}\)) on iron oxide surfaces (Wood et al. 2016). This is due to the Z-alkene group in the OA tail group which leads to less efficient surface packing. Moreover, NEMD simulations (Fig. 3.4) have shown that, at equal surface coverage, there is negligible difference in friction coefficient between SA and OA (Ewen et al. 2016a). Therefore, at high concentration, the SA experimental results are comparable to the high-coverage (4.32 nm\(^{-2}\)) NEMD simulations while the OA experimental results are comparable to the low-coverage (1.44 nm\(^{-2}\)) NEMD simulations.

Fig. 3.5
figure 5

Change in friction coefficient with logarithmic sliding velocity from experiments and NEMD simulations. NEMD results for SA at low coverage, 1.44 nm\(^{-2}\) (LC) and high coverage, 4.32 nm\(^{-2}\) (HC) from Ewen et al. (2016a, b) and experimental results for SA and OA from Campen et al. (2012)

The tribology experiments in Fig. 3.5 show that OFMs with saturated tails (SA) give lower friction which increases logarithmically with sliding velocity. Conversely, OFMs with Z-unsaturated tail groups (OA) show higher friction, which is more weakly dependent on sliding velocity (Campen et al. 2012). Similarly, the NEMD simulations at low coverage give higher friction than at low coverage and increase with a shallower slope than at high coverage. This can be attributed to the more liquid-like film and widely spaced OFM molecules which are able to rearrange in order to reduce the energy barrier height during sliding (Ewen et al. 2016a). Moreover, the high-coverage NEMD results are in quantitative agreement with extrapolations from the SA experiments to higher sliding velocity. It is important to note that such agreement is only attainable with an accurate, AA force field (Ewen et al. 2016b). Although the low-coverage friction results are somewhat higher than extrapolations from the OA experiments to higher sliding velocity, and they show the same qualitative trend. Thus, combined these NEMD and experimental results provide strong evidence that OA forms lower coverage films than SA, which leads to higher friction which is less dependent on sliding velocity.

Some NEMD studies have studied film formation from concentrated OFM solutions rather than using preformed films. OFM molecules are unlikely to exist in isolation in nonpolar solvents and most are expected to form dimers (Jaishankar et al. 2019). Moreover, some OFMs, such as glyceride esters, are known to form reverse micelles in nonpolar solvents (Bradley-Shaw et al. 2015). NEMD simulations have also been used to study the resilience of these reverse micelles to pressure and shear (Bradley-Shaw et al. 2016, 2018). They have shown that, while they are stable without sliding, the reverse micelles usually disintegrate under shear to form surface films. Thus, it is expected that such OFMs eventually form films similar to those shown in Fig. 3.4 inside tribological contacts.

In addition to reducing boundary friction, OFMs have also been postulated to reduce friction in the hydrodynamic lubrication regime by inducing liquid slip (Choo et al. 2007). This has also been investigated in recent NEMD simulations (Ewen et al. 2018b). The simulations showed that a measurable slip length was only observable for OFM films with a high surface coverage, which provide smooth interfaces between well-defined OFM and n-hexadecane layers. Slip commenced above a critical shear rate, beyond which the slip length first increased with increasing shear rate and then asymptoted towards a constant value. This was consistent with previous NEMD simulations of n-alkane slip on flexible solid surfaces (Martini et al. 2008). The maximum slip length increased significantly with increasing pressure. Systems and conditions which showed a larger slip length typically gave a lower friction coefficient. Generally, the friction coefficient increased linearly with logarithmic shear rate; however, it showed a much stronger shear rate dependency at low pressure than at high pressure. Relating slip and friction, slip only occurred above a critical shear stress (Spikes and Granick 2003), after which the slip length first increased linearly with increasing shear stress and then asymptoted. This behaviour was well-described using the slip model due to Wang and Zhao (2011) which is based on Eyring’s molecular kinetic theory. The NEMD simulations supported that high-coverage OFM films can significantly reduce friction by promoting slip, even when the surfaces are well separated by a lubricant (Ewen et al. 2018b).

Ab Initio NEMD Simulations of Lubricant Additives

A detailed understanding of tribochemical reactions is of paramount importance for designing new, more effective and environmental-friendly lubricant additives. Density functional theory (DFT) calculations can provide insights into the adsorption and dissociation of additives on solid surfaces from first principles (Gattinoni and Michaelides 2015; Loehlé and Righi 2017; Gattinoni et al. 2018). However, in most cases, these calculations are static, i.e. no shear is applied.

Sliding surfaces are ubiquitous in tribology, and thus ‘mechanochemistry’ is of critical importance (Spikes and Tysoe 2015; Spikes 2018). Classical NEMD simulations can give insights regarding tensile forces on the bonds of molecules under compression and shear (Adams et al. 2015). However, the harmonic form of the bonding term in most classical force fields prevents the study of tribochemical processes. Force fields which approximate chemical reactivity through bond order potentials, for example, ReaxFF (Senftle et al. 2016) can be used to study tribochemistry in NEMD simulations. ReaxFF NEMD simulations of phosphoric acid confined and sheared between solid surfaces were used to explain its liquid superlubricity behaviour (Yue et al. 2013). Previous experiments by Li et al. (2011) showed that phosphoric acid and water mixtures can exhibit liquid superlubricity when confined between sapphire surfaces. Confined NEMD simulations of phosphoric acid molecules using ReaxFF (Yue et al. 2013) showed that the variation of hydrogen bond interaction strength and change of velocity accommodation affect the frictional response. At high temperature, tribochemical reactions, specifically, polymerization of phosphoric acid molecules, generation of water molecules and formation of slip planes occurred. The generation of water molecules, and their accumulation at the sliding interface, leads to weaker interfacial hydrogen bond interactions and velocity accommodation between the interfacial water layers.

ReaxFF is more computationally expensive than most classical force fields, and thus simulations are limited to shorter timescales (\(\approx \)1 ns) and higher sliding velocities (\(\approx \)100 m s\(^{-1}\)) (Yue et al. 2013). As well as ReaxFF, many other ‘reactive’ force fields are available for MD simulations, as discussed in a recent review by Harrison et al. (2018). A considerable drawback of all reactive force fields is the limited availability of reliable parameter sets to study the materials, conditions and properties of interest in tribology. The generation of high-quality parameter sets is a very difficult and time-consuming task due to the huge number of parameters which need to be fitted in comparison to conventional molecular force fields (Ewen et al. 2018a). However, when properly fitted, reactive force fields facilitate simulation studies of relatively large systems for appreciable timescales, which can significantly improve our understanding of additive tribochemistry.

Ab initio MD can be used to model additive tribochemistry from first principles and thus does not require force field parameterization. However, they increase the computational expense by more than an order of magnitude compared to MD simulations with reactive force fields, meaning that the accessible length (usually single molecules) and timescales (ps) are more limited. This can be mitigated somewhat by employing less computationally intensive ab initio techniques such as Car–Parrinello and tight binding.

Despite the limited length and timescales accessible, recent ab initio MD simulations have given useful insights in tribochemistry of lubricant additives. For example, Mosey et al. (2005) performed compression/decompression cycles up to very high pressures (2.5–32.5 GPa) using ab initio MD simulations to study the tribochemistry of zinc dialkyldithiophosphate (ZDDP) antiwear additives. The Car–Parrinello method (Car and Parrinello 1985) was used for the ab initio calculations. The simulations revealed the molecular origins of ZDDP film formation, wear resistance and energy dissipation. These effects were shown to originate from pressure-induced changes in the coordination number of atoms acting as cross-linking agents to form chemically connected networks (Mosey et al. 2005). More recently, shear has also been applied, for example, by Loehlé and Righi (2018) who performed ab initio NEMD simulations of trimethylphosphite (TMPi) molecules confined between Fe surfaces. The ab initio calculations were performed using full DFT. Gas phase lubrication (GPL) experiments suggested that TMPi dissociates on Fe surfaces leading to the formation of Fe–P tribofilms that significantly reduces friction and wear (Gao et al. 2004). The ab initio molecular dynamics simulations (Loehlé and Righi 2018) uncovered the atomistic mechanisms that lead to P release under boundary lubrication conditions. These P atoms are critical to passivate the Fe surface and reduce friction. Simulation snapshots of a TMPi molecule confined between Fe surfaces, thermostatted at 300 K, pressurized at 2.0 GPa, and moved at 200 m s\(^{-1}\) are shown in Fig. 3.6. The activation time for molecular dissociation observed in the simulations was orders of magnitudes smaller than that expected for open surfaces under static conditions on the basis of the calculated activation barriers. This observation and the observed dependence of reaction rates on the applied load constitute clear evidence that mechanical stress is able to activate tribochemical reactions, even at room temperature (Loehlé and Righi 2018). These findings are consistent with experimental evidence for ZDDP film formation on solid surfaces (Gosvami et al. 2015; Zhang and Spikes 2016). Combined, experimental and simulation evidence strongly supports a stress-augmented thermal activation (SATA) model for antiwear additive tribochemistry (Spikes 2018).

Fig. 3.6
figure 6

Adapted from Loehlé and Righi (2018)

Snapshots acquired during ab initio NEMD simulation of a TMPi molecule confined between sliding iron surfaces at 200 m s\(^{-1}\), 2.0 GPa, and 300 K. The simulation time increases from 0 ps (a) to 7 ps (f). Fe is coloured in blue, P in yellow, O in red, C in grey, and H in white.

Ab initio NEMD simulations have also been used by Kuwahara et al. (2019) to study the mechanochemical decomposition of OFMs with multiple reactive centres. This is important since such additives have shown superlow friction when confined and sheared between tetrahedral amorphous carbon (ta-C) surfaces (Kano et al. 2005). The ab initio calculations were performed using the tight binding approximation (Sutton et al. 1988). The simulations (Kuwahara et al. 2019) revealed that, due to the simultaneous presence of two reactive centres (carboxylic acid and alkene groups), unsaturated fatty acids can concurrently chemisorb on both of the ta-C surfaces. When sliding was initiated, mechanical strain triggers a cascade of molecular fragmentation reactions releasing passivating hydroxyl, keto, epoxy and olefinic groups. Simulation snapshots of an OA molecule confined between ta-C surfaces, thermostatted at 300 K, pressurized at 5.0 GPa, and moved at 100 m s\(^{-1}\) are shown in Fig. 3.7. Similarly, glycerol, which has three hydroxyl groups, reacts simultaneously with both ta-C surfaces, causing complete mechanochemical fragmentation and formation of aromatic passivation layers with superlow friction. Conversely, OFMs with only one reactive centre, such as SA, can only adsorb to one of the ta-C surfaces, and are thus less reactive, are less efficient in passivating the surfaces, and thus show higher friction (Kuwahara et al. 2019).

Fig. 3.7
figure 7

Adapted from Kuwahara et al. (2019)

Snapshots acquired during ab initio NEMD simulation of an OA molecule confined between sliding ta-C surfaces at 100 m s\(^{-1}\), 5.0 GPa, and 300 K. The simulation time increases from 0 ps (left) to 10 ps (right). Surface C is coloured in black, OA saturated C in green, OA unsaturated C in orange, O in red and H in white.

These examples showcase how ab inito NEMD simulations can provide mechanistic insights into the tribochemistry of lubricant additives confined and sheared between solid surfaces. Such techniques also show significant promise for the rational design of improved antiwear (Spikes 2004, 2008) and OFM additives (Spikes 2015) in the near future.

Multi-scale Modelling of Hydrodynamic Lubrication. Coupling MD-CFD Using Domain Decomposition

Introduction

It is evident, from the previous sections, that classical and ab initio NEMD methods are of paramount importance to the understanding of tribological mechanisms. Despite this, computational fluid dynamics (CFD) remains the de facto method for modelling hydrodynamic lubrication. By solving the Navier–Stokes equations or, most commonly, their thin film approximation known as Reynolds equation, a wide range of tribological problems can be studied. Accurate continuum simulation of tribological systems requires accurate constitutive relations, transport coefficients and boundary conditions for the system of interest. In some cases, this information may not be readily available nor even measurable with the current experimental technology. In addition, many physical processes that can be modelled explicitly at the atomic level (e.g. adsorption, phase changes, slip, etc.) cannot be easily incorporated into continuum methods. These aspects arise naturally in atomistic modelling, from the interatomic interactions defined by the force field in use. Why then not use NEMD pervasively? The big drawback of atomistic simulations is their enormous computational cost. Despite the huge increase in available computer power since the advent of high-performance computing (HPC), length scales over a few nanometres and timescales beyond nanoseconds are currently unfeasible to simulate. This limitation can be found in the systems reviewed in previous sections, where lubricant films modelled do not go beyond a few tens of nanometres at most. In the case where the scales of interests are beyond our computational power a multi-scale method can, for certain cases, be employed as a trade-off between computational efficiency and accuracy. An extensive overview of tribological modelling at different scales (including multi-scale modelling) can be found in Vakis et al. (2018). A multi-scale simulation method is a combination of two or more methods which operate at distinct scales. It is useful to categorize multi-scale methods into three types:

Fig. 3.8
figure 8

Three types of coupling, a parameterizing data by running MD simulations to build up lookup tables or design closure models, b embedded coupling using MD simulation on-the-fly driven by the local CFD field, with resulting behaviour passed back to the CFD, c domain decomposition where both CFD and MD share a single simulation domain, exchanging information at the overlapping boundaries

  1. 1.

    Parameterization of macroscopic models through microscopic data, see Fig. 3.8a. Constitutive relations like stress-velocity in fluids are computed and tabulated from a microscopic model and incorporated into a macroscopic one. This strategy is also feasible to obtain non-trivial boundary conditions (e.g. slip condition) for PDE-based macroscopic models (Holland et al. 2015).

  2. 2.

    Heterogeneous Multi-scale Method (Ren and Weinan 2005) (also termed embedded method) represents a general framework for tackling multi-scale problems, see Fig. 3.8b. In this method, the macroscopic solver is used throughout the whole simulation domain and the microscopic solvers are used to perform ‘local refinement’ on demand (e.g. computing viscosity using NEMD-SLLOD algorithm (Hoover et al. 2008) to feedback a CFD solver). This strategy is useful when the parameter space is too big to pre-compute and tabulate the data.

  3. 3.

    Methods which deal with isolated defects, see Fig. 3.8c. In this context, a defect means a certain region of the simulation domain where the macroscopic model is invalid. We can find several methods in this category (Weinan et al. 2004) but, among them, it is worth highlighting coupled continuum-NEMD strategies through domain decomposition (Mohamed and Mohamad 2009). The defect in fluid dynamics is often at an interface between two flow regimes where the continuum becomes invalid, for example, a solid–liquid or liquid–vapour interface or a moving shock wave between fast and slow moving fluid.

    Domain decomposition along an interface will be the method of interest in this section.

Fig. 3.9
figure 9

A detailed typical setup for MD-CFD domain decomposition is depicted. The bottom domain where the liquid interacts with the surface is modelled using an atomistic description. Far from the surface, where bulk behaviour of the fluid is found, CFD is employed. The mesh (grid) discretizing the domain has been plotted with black lines. Two kinds of boundary conditions can be found in the CFD. The ones provided by the MD domain to the CFD (pink dots) and the user-provided (black dots). The constrained region is the region within the MD domain where the CFD constrains/fluxes are applied. In the averaging region, the coupled fields are averaged and passed from the MD to the CFD solver. The box diagram on the right is a schematic of how the software framework is set up. CPL_Library (Smith et al. 2016b) acts as a communication interface through the CFD and MD solver

Another family of multi-scale methods which deserve a mention are the ‘equation-free’ type. They are used to compute macroscopic properties without having to fit the data to a model when this is too complicated or unknown in advance (Weinan et al. 2004). The NEMD simulations presented in the previous sections of fluid lubricant films under shear are limited to the nanoscale. Simulations are limited to a few hundred nanometres in length scale with the longest timescales generally of order nanoseconds. The timescale limitation cases are hard to tackle, but length scale acceleration is naturally suited to a domain decomposition multi-scale method (Fig. 3.9). The idea is to use NEMD near the surface to capture interfacial phenomena and CFD far from it, where the liquid behaviour can be well described by bulk approximations. This coupled approach allows the exploration of larger fluid (lubricant) films by enlarging the CFD domain at virtually no extra cost, since the bottleneck, in terms of computational resources, is always in the MD domain which remains fixed in size. The complexity lays in how to couple both solvers consistently which is explained in this section, after a brief introduction to computational fluid dynamics. The rest of the chapter is devoted to the theory and implementation details of the domain decomposition method for fluids with special consideration of tribological systems.

The Domain Decomposition Method

The continuum hypothesis is an idealization of a real material, which replaces molecular detail with a mean-field approximation. Intuitively, a mean field considers so many molecules they can be treated as a continuous flowing substance, with the individual molecular motion and structure no longer important. The evolution of this mean field is then governed by identical physical laws to molecular dynamics, namely, mass and energy conservation along with a continuum analogue of Newton’s Law. This mean description allows the evolution of countless molecules to be simulated with affordable computational effort.

The key equation for fluid simulation is the Navier–Stokes equations, a set of nonlinear partial differential equations describing how the fluid velocity field evolves in time,

$$\begin{aligned} \frac{\partial \varvec{u}}{\partial t} + \left( \varvec{u} \cdot \varvec{\nabla } \right) {\varvec{u}} = - \frac{1}{\rho } \varvec{\nabla } P + \nu \nabla ^2 \varvec{u}, \end{aligned}$$
(3.1)

where \(\varvec{u}\) is velocity field, P the pressure field, \(\rho \) density and \(\nu \) the coefficient of kinematic viscosity. The use of the Navier–Stokes equation in this form is valid for many fluids, where the complex evolution of molecular structures can be reduced to a single viscosity coefficient (Gad-el Hak 2006). Often in tribological applications, this assumption is not valid and more complex descriptions would be required. The analytical solution of Eq. (3.1) turns out to be impossible in all but the simplest of cases. Numerical simulations, called computational fluid dynamics (CFD), are therefore the main engineering approach to predicting fluid motion. Various methods are employed to solve the equations numerically. Perhaps the simplest is the finite differences method, where derivatives in Eq. (3.1) are approximated using a truncated Taylor expansion and the higher the truncation, the higher the accuracy. More common for fluid simulation is the finite volume approach, where the continuum equations of motion are solved in a weakened form as fluxes over the surface of a volume. The finite volume form has the advantage of being conservative as flow from one volume goes directly into the adjacent one, as well as allowing arbitrary-shaped grid cells. The time evolution at each point on the grid is therefore obtained from a combination of the values at the previous time and flow from adjacent points on the grid, described by the terms in Eq. (3.1). The values at the edges, known as boundary conditions, have to be explicitly provided and determine the evolution of the simulation. It is these values that coupled domain decomposition simulation aims to provide from the average behaviour of the molecular simulation.

The continuum representation of a fluid often fails to capture solid-liquid interfacial behaviour. Nucleation events for micelle and bubble formation, cavitation, liquid–vapour interfaces and the non-Newtonian liquids prevalent in tribological applications, all require the addition of extra models with a set of increasingly tenuous empirical assumptions. In addition, the Navier–Stokes equations do not ensure energy conservation without additional models, a factor which can become decisive in high-pressure and shear systems. MD captures all this and more with no additional models, extending to chemical reactions and interfacial interactions with the addition of quantum detail. Domain decomposition aims to model these key events by using a molecule model only where molecular detail is important.

The first example of domain decomposition for fluid dynamics is given in the work of O’Connell and Thompson (1995), which established the key features of this form of two-way concurrent coupling. Many of these features have a historical precedent from techniques used in solid mechanics for coupling of particles and continuum, dating back to the 1970s (Curtin and Miller 2003). The simulation domain is decomposed into two subdomains which overlap in a certain region, as shown in Fig. 3.9. This region acts as a ‘handshake’ zone, also called the hybrid simulation interface (HSI), where the two subdomains interchange data in real time. The bottom subdomain where the liquid interacts with a flat/rough surface is modelled atomistically, shown with molecules in Fig. 3.9. In the top subdomain, CFD is employed and the mesh (grid) discretizing the domain into a grid of finite volumes is denoted by the black lines. Two boundary conditions are shown in Fig. 3.9 for the CFD, the bottom boundary condition provided by the MD subdomain (pink dots) and the top boundary condition specified by the user (black dots). The left and right boundaries are set to periodic, which is consistent with the periodic boundaries in the MD part of the domain. In the MD region, the constrained region applies a force to guide the molecular to a value which agrees with the CFD subdomain, while in the average region, the data from the MD system is accumulated to provide the CFD boundary.

The challenges for domain decomposition coupling include the following:

  1. 1.

    A termination of the MD subdomain. A restraint mechanism is required at the boundary of the molecular region to prevent molecules escaping. This can be a generic force (O’Connell and Thompson 1995; Nie et al. 2004), one based on a previous simulation or calculated from the radial distribution function (Werder et al. 2005). Another method uses a reflective boundary with a correction for density fluctuations based on exponential smoothing of the unbalanced forces due to the missing fluid at the termination boundary (Issa and Poesio 2014). Alternatively, a buffer zone of molecules can be used (Hadjiconstantinou 1999; Delgado-Buscalioni 2012).

  2. 2.

    A method of inserting and removing molecules is required to match the mass flux from the continuum. For simple molecules, the most common method is a steepest descent energy search approach called USHER (Delgado-Buscalioni and Coveney 2003). For complex molecules, energy insertion location can be impossible to find, so techniques exist which try to insert slowly, gradually increasing the complexity of the inserted molecules (Praprotnik et al. 2005).

  3. 3.

    A procedure for averaging the MD region to obtain the continuum boundary conditions (blue region in Fig. 3.9). The MD simulation can be thought of as simply providing a boundary condition to the CFD solver, with as many boundary conditions as fields required. In the simplest case, this is just a velocity boundary value, but for more complex CFD problems, required fields can include density, stress, temperature, concentration, phase or many others. This requires summing over time and space to establish averaged values in discrete locations (Allen and Tildesley 1987; Irving and Kirkwood 1950). The removal of statistical noise is a key issue (Kotsalis et al. 2007), as is the ratio of timesteps used in the two solvers and size of averaged region in terms of statistics (Hadjiconstantinou et al. 2003). The domain decomposition coupling literature is divided into state coupling (mass, momentum, energy) and flux coupling (mass flux, stress, energy flux) (Mohamed and Mohamad 2009), with different statistical properties for the different averaging methods (Hadjiconstantinou et al. 2003).

  4. 4.

    A constraint must be applied to the molecular region to match properties to the continuum (green region in Fig. 3.9). This can be performed by an applied force derived as a constraint using a variational principle formulation of mechanics (Goldstein et al. 2002; O’Connell and Thompson 1995; Nie et al. 2004), an applied force based on stresses (Flekkøy et al. 2000) or Maxwell’s demon-type approach (Hadjiconstantinou 1998).

  5. 5.

    Software to exchange the information between the two descriptions, ideally designed for distributed simulations on high-performance computers (HPC).

The last three points are the focus of this section.

We start with point three, the averaging of the MD to give a CFD boundary condition. A rigorous link between the continuum and molecular descriptions is obtained from Irving and Kirkwood (1950) in a derivation of the equations of fluid motion in terms of statistical mechanics. The equations of Irving and Kirkwood (1950) are equivalent to the pointwise continuum, with the limit of the continuum infinitesimal resulting in a Dirac delta function in the molecular description. As a result, an equivalent description for the whole domain results in a number of inherent problems for coupled simulations. As a mathematical idealization of an infinitely thin point, the Dirac delta functional cannot be used in practice in a numerical simulation, so some relaxed function must be employed, such as a Gaussian Kernel or other weighting function (Hardy 1982; Lucy 1977). For NEMD, in general, this is perfectly valid as we obtain an average field for the molecular system which can be used to interpret the system and measure quantities. For domain decomposition coupling, we need both systems to be expressed in the same form, as they exist at the same time and length scales. Any choice of relaxed function departs from the rigorous Irving and Kirkwood (1950) limit and the descriptions are no longer equivalent, with some arbitrary-averaged region assumed to be equivalent to a point in the continuum. To avoid these problems, both molecular and continuum equations should be expressed in terms of control (or finite) volumes (Smith et al. 2012). This replaces the Dirac delta function with an integral over a volume, called the control volume function, defined as \(\vartheta _i \equiv \int _V \delta (\varvec{r}_i -\varvec{r}) dV \). Mathematically, this gives an expression for \(\vartheta _i\) in terms of Heaviside functions, useful as it is amenable to both theoretical manipulation and numerical implementation (for details, please see Smith et al. 2012). More important is the conceptual shift, we relax the assumption that it is possible to define quantities at every point in space, accepting that only an average in a volume is possible to obtain. This is exactly the assumption made when solving CFD using the finite volume method, and as many CFD solvers express the continuum equations in finite volume form, the exact flux conservation can be matched between the two descriptions. The relationship between molecular and continuum can then be formally expressed as follows, for any face of a control volume,

$$\begin{aligned} \int _{S_f} \left[ - \rho \varvec{u} \varvec{u} + \varvec{\Pi } \right] \cdot d \mathbf S _{f} = - \! \displaystyle \sum _{i=1}^{N} \! m_i\dot{\varvec{r}}_i \dot{r}_{f i} d{S}_{f i} + \frac{1}{2}\displaystyle \sum _{i,j}^{N} \varvec{f}_{ij} dS_{f ij}, \end{aligned}$$
(3.2)

where the left-hand side has the continuum convective term, \(\rho \varvec{u} \varvec{u}\) and stress \(\varvec{\Pi }\) over the surface of a control volume, equal to the fluxes over a surface f of an equivalent (or overlapping) molecular control volume. Molecular fluxes are obtained by taking the sum of all molecular motions and selecting only the surface-motions fluxes using the function \(d{S}_{f i}\), as well as the sum over all cumulative intermolecular interactions and selecting only the ones crossing the surface using the function \(d{S}_{f ij}\). The form of these surface-crossing terms are obtained by applying the same process used in the continuum control volume derivation to the function \(\vartheta _i\) through standard manipulations of the Delta function. The resulting form of stress is also well known in the literature as the method of planes (Todd et al. 1995). The sum of this stress on every surface of an enclosed volume can be shown to entirely define the momentum evolution inside. In this way, we have obtained a consistent description of both continuum and molecular systems.

Next, we consider point 4, applying a constraint to ensure the MD region agrees with the CFD. In this context, the mathematical control volume operator is useful as it can be incorporated directly in a minimization constraint. As described in section “Introduction”, much of the theory of NEMD focuses on techniques for periodic systems (i.e. SLLOD) or aims to constrain to ensembles, such as the NVT with the Nosé–Hoover thermostat. The use of local thermostatting is valid when applied to wall molecules as no flow is induced. When applied to a part of the fluid, a heat gradient will be created and careful control over molecules entering and leaving the thermostatted region may be required. For coupled simulation, the constraint must be local, as shown in Fig. 3.9, and so we have to apply these local constraints with care. This unique challenge for coupling can still use NEMD theory: applying minimization principles, which include Gauss’ principle of least constraint (Hoover 1991). When minimization is applied to a region in space as selected by the control volume function (Smith et al. 2015), a constrained equation is obtained, Eq. (3.3), localized to a volume in space. This is simply a statement that the fluxes must be the same in both continuum and molecular systems,

$$\begin{aligned} m_i \ddot{\varvec{r}}=\displaystyle \sum _{i,j}^{N}\varvec{f}_{ij} - \sum _f^{N_{faces}} F_f, \end{aligned}$$
(3.3)

where the force \(F_f\) ensures Eq. (3.2) is satisfied for each face f, which over all faces enforces the constraint that the sum of surface crossing is subtracted for a volume and replaced by the continuum surface fluxes. This provides a differential constraint which ensures the momentum evolution (\(d/dt\int \rho \varvec{u} dV\)) in a molecular control volume is identical to the continuum. In order to achieve this, the constraint is iterated as molecules enter and leave the volume in order to ensure the correct change in momentum to machine precision. Careful implementation can be used to provide exact control of momentum in any arbitrary volume in the molecular system.

Finally, we address point 5, the information exchange between the two descriptions in parallel. The development of CPL_library (Smith et al. 2016b) started with the coupling of two in-house codes, aiming to provide optimal scaling by ensuring minimal point-to-point communication between overlapping processes. This evolved to become an open-source shared library with a minimal interface to facilitate the coupling of any CFD to any MD program. This is done by providing a minimal set of functions in Fortran, C++ and Python to set up the mapping between two overlapping subdomains, ensuring all information is sent and received on the right processes. By providing a minimal shared library, it becomes easy to couple new codes, as well as allowing the user to divide up the problem so both CFD and MD codes can be tested in isolation. This divide and test philosophy is a major part of the design of CPL_library, with a wide range of automated unit and integration tests provided for both the library and for coupled case with OpenFOAM and LAMMPS. Deployment is provided using Docker and Anaconda, with a range of minimal examples and quickstart guides detailed on the project website http://www.cpl-library.org.

Fig. 3.10
figure 10

A schematic of a coupled Couette flow with polymer brushes. The top wall of the continuum is driven at a velocity of one, and the colours in the background show the velocity field in the coupled system (with molecules coloured by the same field). The constraint regions and CFD boundaries are denoted on the figure to show the way the coupling is applied

Fig. 3.11
figure 11

Couette flow analytical solution compared to the coupled CFD-MD results overlapping a snapshot of the liquid molecules (black) and polymer brushes (pink). The MD velocity is shown by green crosses with a green spot showing the constrained cell, red lines and points denote the CFD values with black circles the boundary values and all values are matched to the analytical solution shown by the dotted blue line at times \(t=\{15, 25, 37.5, 65, 200\}\)

We now demonstrate the combination of control volume averaging, constrained dynamics Eq. (3.3) and CPL_library applied to the problem of domain decomposition. One of the simplest useful simulations for tribological application is pictured in Fig. 3.10, with the effect of shear shown using the same schematic as in Fig. 3.1. This comparison emphasizes an important application of coupled modelling, namely, the reduction of MD system size by use of a continuum model. By modelling polymer brushes attached to the wall, the complex molecular detail is isolated to a region in space and the remainder of the domain is well described by a Newtonian fluid. For this reason, the use of a continuum solver is ideal as it replaces the complexity and cost of modelling a large molecular system, while retaining the effect of the polymer brushes on the flow itself, which persists into the continuum region. This can be seen in Fig. 3.11 where the Couette flow solution is effectively shifted up from the wall by the presence of the polymer brushes. The MD solver is Flowmol, which is fully verified (Smith 2014) and has been demonstrated in a range of fluid dynamics studies (Smith et al. 2016a; Trevelyan and Zaki 2016). The MD simulation consists of 356,864 molecules, with fluid molecules at a density of \(\rho =0.8\) interacting via the Lennard-Jones potential with a cut-off of \(2^{1/6}\). The walls are set to the same density of \(\rho =0.8\), tethered using the anharmonic potential of (Petravic and Harrowell 2006) with the polymer brushes grafted onto them at a density of 0.1 as chains of 10 FENE molecules with maximum separation of \(R_0 = 30.0\) and spring constant \(k_{FENE} =1.5\). The outer half of the walls is thermostatted to \(T=1.0\) using the Nosé–Hoover thermostat with a heat bath size obtained from the product of 0.1, the number of thermostatted molecules and the timestep \(\Delta t = 0.005\). The MD subdomain is \(140.2 \times 27.4 \times 116.3\) in reduced LJ units split into four cells in x each of size 35.1, 16 in y of size 1.71, and in z of size 29.1. The CFD has the same number of cells and the same size, with both subdomains overlapping by eight cells and the timestep ratio between the CFD and MD codes is set to one (i.e. \(\Delta t_{CFD} = \Delta t_{MD}\)), so both systems evolve together. The constraint (Eq. 3.3) is applied to cell 14 of the MD subdomain, and the top two cells are left as a buffer. The control volume averaging and constraint methodologies discussed above are implemented in Flowmol with runtime tests to ensure exact momentum control at each step. In Fig. 3.11, the constrained region can be seen to agree exactly with the CFD value at that location, with control to machine precision.

The continuum solver is based on OpenFOAM’s icoFOAM (version 3.0.1; Weller et al. 1998), a flow solver for Eq. (3.1) with a single viscosity coefficient \(\nu =2.1\), estimated from the current MD density \(\rho =0.8\) and temperature \(T=1.0\) through a parameter study obtained in previous work (Smith 2015). The icoFOAM solver is adapted to receive information from the MD through CPL_library and apply this to the bottom cells of the domain as a boundary condition, all other features of the solver are kept identical. The bottom CFD boundary can be seen to result from an average of the MD region, while the top boundary is set to a velocity of one, with left and right boundaries periodic. Both MD and CFD codes are run on four processes each, with optimal parallel exchange between the overlapping processes managed by CPL_Library.

Beyond Lennard-Jones fluids

Lennard-Jones fluids are ubiquitous in MD-CFD-coupled simulations due to their simplicity. They consist of point particles which do not exhibit non-Newtonian behaviour nor significant shear heating at moderate shear rates. Furthermore, measurable quantities (velocity, stress, temperature, etc.) are less noisy than in molecular fluids, since they do not contain any internal degree of freedom leading to high-frequency motion modes. Hence, they are perfect candidates for test cases and proof of concept simulations. It is difficult to find in the literature studies which actually exploit the benefit of domain decomposition to solve a real problem. To achieve this, particularly in tribology, it would be at least necessary to couple molecular fluids using a realistic potential.

A fully coupled simulation using OPLS benzene is shown in Fig. 3.12. The simulation is performed at \(\gamma =10^{10}\,\text {s}^{-1}\), \(T=300\,\text {K}\) and \(\rho =0.89\,\text {kg/m}^{3}\), where the molecule exhibit Newtonian behaviour (Lee 2004). Excellent agreement is shown during the transient and (pseudo-) steady state and shows promising evidence that moving from simple to molecular fluids is achievable without much modification of the method. It is yet to be proven if this is also true for more complicated molecules like linear and branched hydrocarbons.

Fig. 3.12
figure 12

Time evolution of velocity field for a CFD-MD coupled simulation of 40,691 molecules of OPLS (Jorgensen et al. 1996) benzene. Initial configuration equilibrated at \(T=300\,\text {K}\) and \(P=1000\,\text {atm}\) with a density \(\rho =0.89\,\text {kg/m}^{3}\). The NEMD viscosity (SLLOD method) of benzene measured at \(\gamma =10^{10}\,\text {s}^{-1}\) at the given conditions is \(\eta =0.58\,\text {mPa}\,\text {s}\). Shearing velocity at the top wall \(v=100\,\text {m/s}\) with a total domain length \(L=40\,\text {nm}\). Fluid–surface interactions are strong enough to avoid slip. A shear rate of \(\gamma =2.5\times 10^{10}\,\text {s}^{-1}\) is registered at the steady state and a linear profile obtained is a sign of the Newtonian behaviour of benzene under simulated conditions

Applications of Domain Decomposition in Tribology

NEMD shear simulations applied to tribology are limited by several factors which make the comparison against experimental data quite difficult: (a) high shear rates of O(\(10^{8}\)\(10^{11}\) s\(^{-1}\)), due to small system sizes and high shear velocities (Bair et al. 2002a, b); (b) number of atoms, O(\(10^{6}\)) which for dense fluids means characteristic system sizes of no more than O(10 nm); (c) simulation time, O(10 ns) due to timestep sizes of O(1 fs).

Multi-scale domain decomposition allows the removal of limitation (b). By modelling most of the domain using a CFD solver and keeping the NEMD solver close to the surface (Fig. 3.9), we can arbitrarily enlarge the direction perpendicular to it. This method provides the opportunity to tackle (at least) two type of problems:

  1. 1.

    Comparing simulations with experimental data. The possibility of simulating liquid lubricant films of hundreds of nanometres to micrometres would permit the comparison of time-evolving velocity fields obtained from numerical simulations, with the ones obtained from thin-film experiments such as fluorescence lifetime-based techniques (Galmiche et al. 2016; Ponjavic et al. 2015). Furthermore, lubricant layers of this size are technologically relevant since they can be found in lubricated engine parts (Tung and McMillan 2004) and in biological systems (Myant et al. 2012).

  2. 2.

    Prediction of no-slip condition. Experimental data is fitted to models which usually assume no-slip condition (Ponjavic et al. 2015; Ponjavic and Wong 2014) but it has been experimentally known for almost two decades (Pit et al. 2000) that this is not always true. The question to answer is: for a particular interface, at a certain thermodynamic point and fixed shear velocity, what is the minimum film thickness that makes the no-slip assumption valid (Asproulis et al. 2012)? Therefore, being able to compute scaling laws for slip can guide experimentalists to obtain more accurate measurements by choosing appropriate models.

The applications presented here are interesting enough to justify the implementation of a domain decomposition framework despite the difficulties this might entail. A caveat of multi-scale methods is the complexity to understand, develop and test them properly. Typically, a decent amount of software development is required since it is unlikely to find a readily available software package for this specific purpose. In the author experience, the effort on this regard should not be taken lightly. This is discussed in the next sections along with some recommendations for someone who wants to develop a domain decomposition framework.

Implementation Caveats of Domain Decomposition

The complexity of using/developing a multi-scale method where two (or more) methods are coupled, is greater than the sum of the complexities of using/developing each individual method alone. This is true because the coupling method itself introduces a new layer of complexity both at the conceptual and implementation level. A list of some caveats of domain decomposition for MD-CFD coupling is presented (most of are also, in general, applicable to any multi-scale method). Along with them, some recommendations are made on how to tackle each one.

General

  1. 1.

    Training on each of the methods to be coupled. This can be a daunting task itself due to the disparity in the theory and technical considerations between them. This is an effort that has to be assumed.

  2. 2.

    Development considerations I. The first decision to make is to either develop in-house solvers or to use existing software packages that allow source code modification or development through a scripting interface. In this regard, it is advisable to follow the DRY (Do not Repeat Yourself) principle from software development. It is tempting to write your own code for the sake of learning and self-prise, but widespread third-party software is in general well tested and stable. It is a good idea to use as much as it is already available and add features to it as needed.

  3. 3.

    Development considerations II. Coupling two solvers at the software level means passing back and forth information between them in some way. This can be done in (A) a monolithic fashion, by compiling and linking them together at the binary level (calling one from inside the other) or (B) decoupling them by using a coupling library designed for the purpose, in which case the solvers are developed and compiled independently and data is exchanged in a smart way (commonly) through MPI communication. In this regards, there are several options. From more general frameworks like MUI library (Tang et al. 2015) and PRECICE (Bungartz et al. 2016), to more user-friendly options targeted for coupled simulation like CPL_Library (Smith et al. 2016b). In general, while strategy (A) is more efficient, strategy (B) is preferable. Some notable advantages of strategy (B) are:

    1. (a)

      Independent development and testing of each coupled solver is easier. Version upgrading of a certain solver is less involved.

    2. (b)

      Avoid solver incompatibility due to dependencies. A complicated issue arises if two solvers depend directly (or indirectly) on a certain library, but different versions of it. If those versions are not compatible between them we are in trouble.

    3. (c)

      Arbitrary parallel domain decomposition of each solver. Each solver can independently decompose its domain, whereas in a monolithic approach, one decomposition has to fit both solvers.

  4. 4.

    Difficult to identify sources of errors and quantify them. Errors in the outcome of a multi-scale simulation can be difficult to track back to their origin. Is it an error in the inputs/outputs of the individual solvers or in the coupling methodology itself? Furthermore, codes used in multi-scale simulations are designed usually to run in parallel which makes debugging much harder.

Tribology related

  1. 1.

    Pre-computing transport coefficients and Equation of State from molecular dynamics simulations. This is necessary to achieve consistent coupling between MD and CFD (time evolution of momentum, density and energy are consistent in both solvers). In the case of tribologically relevant fluids (e.g. hydrocarbon mixtures) under high pressure, these fluids exhibit strong non-Newtonian behaviour (Jadhao and Robbins 2017). This requires a careful selection of a non-Newtonian model which represent the viscous behaviour of the molecular fluid in the MD. As far as we know, the non-Newtonian regime is still fertile ground to explore in the field of coupled simulations.

  2. 2.

    Coupling density field for complex molecules. There is currently no easy procedure to tackle this problem. If the density field varies significantly over time, removal or insertion of molecules is needed at the overlap region. This can be successfully performed for point-particle fluids like Lennard-Jones using the USHER method (Delgado-Buscalioni and Coveney 2003). On the other hand, molecule insertion can be trickier than point particles and a triple-scale scheme (AdResS) (Praprotnik et al. 2005) has been developed for this purpose to coarse-grain all-atom molecules into blobs near the insertion/removal zone. Other less physically meaningful methods like FADE (Borg et al. 2014) could, in principle, do the job but there are concerns about the effect non-instantaneous insertion on time-evolving flows.

This section has been written with the idea of facilitating the newcomer to grasp the potential complexities of implementing a multi-scale method, in particular, CFD-MD domain decomposition. It is our hope that by attracting research momentum into these techniques, eventually they will find their way to the mainstream engineering use.

Conclusions

In this chapter, we have reviewed recent advances in methodologies made available as modelling tools to tribologists who want to investigate molecular-scale effects and their link to structural and electronic properties at the lowest scales and to the macroscopic response at the larger scales. Some recent applications of NEMD simulations in tribology are first discussed and then critically reviewed. Such simulations have given unique insights into the nanoscale structure, flow and friction behaviour of lubricants and additives. Classical NEMD simulations of lubricants have shown how these fluids behave under high-pressure and shear conditions, which is particularly useful to study EHL. Classical NEMD simulations of lubricant additives have demonstrated the importance of surface coverage on the friction behaviour. Ab initio NEMD simulations of lubricant additives have started to reveal tribolochemical degradation mechanisms of lubricant additives under compression and shear. Coupled CFD-NEMD simulations of lubricants provide access to larger time and length scales, which are inaccessible to standard NEMD simulations. An overview of how to tackle issues related to the use of coupling techniques has been provided, together with a critical outlook.