1,694
Views
4
CrossRef citations to date
0
Altmetric
Articles

The importance of reference frame for pressure at the liquid–vapour interface

ORCID Icon
Pages 57-72 | Received 29 Mar 2021, Accepted 25 Jun 2021, Published online: 21 Jul 2021

ABSTRACT

The local pressure tensor is non-unique, a fact which has generated confusion and debate in the 70 years since the seminal work by Irving Kirkwood. This non-uniqueness is normally attributed to the interaction path between molecules, especially in the interfacial-science community. In this work, we reframe this discussion of non-uniqueness in terms of the location, or reference frame, used to measure the pressure. By using a general mathematical description of the liquid–vapour interface, we obtain a reference frame that moves with the interface through time, providing new insight into the pressure. We compare this instantaneous moving reference frame with the fixed Eulerian one. Through this process, we show the requirement that normal pressure balance at the moving surface is satisfied by surface fluxes; however, an additional corrective term based on surface curvature is required for the average pressure in a volume. We make the case that a focus on the path of integration is the cause of confusion in the literature. Using an explicit reference frame with a more general derivation of pressure clarifies some of the issues of uniqueness, providing a pressure tensor which is defined at any instant in time and valid away from thermodynamic equilibrium.

View correction statement:
Correction

1. Introduction

Since the pioneering work of Irving and Kirkwood [Citation1], we have had a firm theoretical foundation for the pressure tensor in statistical mechanics. In practice, however, there remains an ongoing debate about what form of pressure tensor is the right one to use in a molecular dynamics (MD) simulation. Irving and Kirkwood [Citation1] present the mathematics of a point in space, a direct consequence of using continuum quantities in a discrete system. Mathematically this gives us a Dirac delta function, which is an infinitesimal point and so must be adapted for use in a molecular dynamics simulation, expanding it over a finite area in order to collect measurements. Different communities of researchers have done this in different ways. The simplest approach is to set the delta functions to one and use the tensor version of the Virial [Citation2] at a local point in space to get the pressure. This is the IK1 approximation, so called because it is a first-orderterm in the full Irving Kirkwood expressions [Citation3]. In the solid mechanics community, the delta function is sometimes replaced by defining a non-infinite function with a finite width and compact support as in [Citation4–7]. These solid mechanics stress tensors, where stress is simply the negative of the pressure tensor, are largely in the form of averages inside volumes, so have become known as the volume average (VA) expressions [Citation8]. For the non-equilibrium molecular dynamics (NEMD) community, an approach treating the functions in Fourier space [Citation3,Citation9,Citation10] has been followed to yield mathematically tractable forms. The most well-known form is the method of planes (MOP) [Citation11] and its extensions [Citation10,Citation12]. Both the MOP and VA forms of pressure can be shown to be equivalent in the limit of small volumes [Citation13], both demonstrating a pressure gradient of zero normal to a solid-liquid interface, a requirement for mechanical equilibrium. This is worth noting as the IK1 form of pressure fails to satisfy this requirement for mechanical equilibrium [Citation14]. In addition to the VA, IK1 and MOP pressures from the solid mechanics and NEMD communities, researchers interested in the interface between two fluids, in particular, between a liquid and a vapour, tend to work with pressure obtained relative to that interface. There are two common forms obtained by integrating relative to the interface area itself, called the Irving Kirkwood [Citation15] and Harasima [Citation16] contours. The difference between the Harasima and Irving Kirkwood forms is attributed to the different interaction paths, or interaction contours, assumed between the molecules [Citation17]. This is generalised in the work of Schofield and Henderson [Citation18] who show that the path of interaction between two particles, which defines their interaction force, can occur in an infinite number of ways. This is explored for various contours in recent work [Citation19]. Far from a philosophical point, this non-uniqueness has profound implications for measurements in MD systems. Published results were recently called into question due to the non-uniqueness of pressure [Citation20,Citation21]. In addition, the use of Harasima and Irving Kirkwood surface forms led to the conclusion that Marangoni flow cannot be measured at the molecular scale [Citation22]. Malijevsý and Jackson [Citation23] concluded the mechanical route to pressure is unreliable and should be avoided in systems with thermal fluctuations. In an attempt to address the confusion in the literature, Varnik et al. [Citation14] compared different forms of pressure, considering the Harasima and Irving Kirkwood contour along with the method of planes on a flat surface. In this work, we aim to extend this comparison to an arbitrary liquid–vapour interface, working with the VA pressure and a generalisation of the MOP pressure we call the surface flux (SF) form, we then discuss the relationship between these forms and the Harasima and Irving Kirkwood contours.

This consideration of pressure on a general interface shifts the focus away from the interaction contour between two molecules. A focus on the contour of interaction ignores the range of other factors in defining the pressure tensor. For example, the split of the kinetic term into streaming and fluctuating part is not free from ambiguity [Citation24], a point which takes on new importance for a reference frame moving with the interface. In addition, the measured pressure is only correct to a gauge, meaning any divergence-free term could be added and the equations of motion would still hold [Citation11]. Most importantly for interfaces, both the interaction contour and the location of measurement are required to determine the pressure, a point highlighted in the original work of Irving and Kirkwood [Citation1] who note the force acting and the location it acts across, dS , are quite arbitrary. In comparing Harasima and Irving Kirkwood forms, Varnik et al. [Citation14] note the interactions will be counted upon crossing an area, showing the contour path definitions are intertwined with the location of measurement. A contour could, therefore, be chosen which avoids being counted because it misses the area used to measure pressure. Here the SF formulation has a clear advantage, as it measures pressure on six connected surfaces enclosing a volume, for a molecule in the volume it is impossible for any choice of contour to not cross at least one surface. The location of SF pressure measurement is, therefore, not a plane but a volume defined by the set of connected patches which encloses it. The measurement location is typically defined to be located at the centre of the liquid–vapour interface [Citation15], the surface of a sphere [Citation25,Citation26], cylinder [Citation27], and so on. A number of recent publications have shown that we can track the liquid–vapour interface instantaneously down to the intermolecular spacing [Citation28–32], moving with the molecules as they evolve in time. Instead of considering the average of a plane (or sphere, cylinder, etc.), in this work, we use a pressure measurement which follows the instantaneous surface described by an arbitrary function ξ=ξ(x,y,t). This is mathematically tedious, but can be done for both VA [Citation33] and SF pressure [Citation34]. Using a measurement relative to an arbitrary surface gives the most general possible form of interface pressure, where ξ could then be chosen to be a flat surface, spherical segment, etc. As a result, these are valid for any surface away from equilibrium at every time step. We provide a comparison of the resulting profiles for these SF pressures to the expression obtained inside a volume (IK1, VA) using both a flat plane and one moving with the instantaneous surface. Results for both the solid–liquid interface and liquid–vapour interface are compared, and it is shown that Harasima and Irving Kirkwood contours are a special case of the more general VA and SF pressures. Through this comparison, the importance of explicit consideration of the reference frame is highlighted. The use of a reference frame fluctuating with the instantaneous interface changes the pressure definition from thermodynamic to purely mechanical by accounting for every single force and flux. With every crossing counted, measured SF pressures on all surfaces of a volume can, therefore, be shown to exactly balance the momentum change in the volume, to machine precision [Citation34]. This addresses at least one concern of thermal fluctuations invalidating the pressure measurement [Citation23]. The long-range contributions to the pressure tensor [Citation35] as well as the inclusion of three body [Citation10] and greater interactions are not considered in this work, although the exact balance on a control volume might prove useful in the extension to these cases.

This article is structured as follows: we start with an overview of the various mathematical forms of the pressure tensor in Section 2, with a novel correction term for the VA pressure derived at the end. Next, the molecular setup is discussed, for the two cases simulated in this work, a solid-liquid interface for reference and the liquid–vapour interface in Section 3. The results and discussion from these cases are presented in Section 4, with particular focus on the results taken in a reference frame moving with the interface, followed by the conclusions in Section 5.

2. Theory

We briefly present the theoretical developments that lead to the different forms of the pressure tensor.

2.1. Irving–Kirkwood pressure tensor

The derivation of the pressure tensor is given in the work of Irving and Kirkwood [Citation1], taking the time evolution of momentum and comparing forms with the expected continuum equations. The resulting pressure tensor at point r in the fluid is of the form (1) P(r,t)=i=1Nmir˙iur˙iuδ(rir)+12jiNfijrijOijδ(rir);f,(1) where angular brackets a;f denote the phase space average of a, the velocity of molecule i is given by r˙i and the streaming velocity is u. The distance between the positions of molecules i and j is defined by rij=rirj and fij=ϕij/rij denotes the inter-molecular force (the force exerted by i on j). The first term is the kinetic part of the pressure tensor, which includes the contributions due to molecular velocity. The second term is the configurational pressure, due to the interactions between molecules. The Oij term is known as the IK operator [Citation11], obtained from the difference between the Dirac delta functions for molecule i and j, (2) δ(rir)δ(rjr)=rijrOijδ(rir),(2) where Oij denotes a Taylor expansion operator, (3) Oij=112rijri++1n!rijrin1+.(3) In what follows, we drop the phase space average so we can obtain expressions that are valid instantaneously in a molecular dynamics simulation. Introducing the definition pi/mi=r˙iu, Equation (Equation1), therefore, becomes (4) P(r,t)=i=1Npipimiδ(rir)+12i,jNfijrijOijδ(rir),(4) where the sum notation i,jN=i=1NjjN has been introduced for conciseness.

2.2. Irving–Kirkwood one (IK1) tensor

First, we consider Equation (Equation4) with only the first term in the IK operator of Equation (Equation3), known as the IK1 approximation. The result is the tensorial form of the virial pressure [Citation2] but applied locally (5) PIK1(r,t)=i=1Npipimiδrri+12i,jNfijrijδrri.(5) The IK1 form of pressure is the most widely used in the molecular dynamics literature due to its simplicity, and at the time of writing is the default in LAMMPS, calculated from a binning of the per-atom stress [Citation36]. Using the virial pressure locally in an inhomogeneous system is incorrect, as interactions with the surrounding fluid are not included [Citation37]. This can also be interpreted as a consequence of neglecting terms of higher order in Equation (Equation3) so effects of local inhomogeneity in the fluid are lost. Away from equilibrium, a localised description is required and full equation (Equation3) expression must be retained.

2.3. The contour forms – Irving Kirkwood and Harasima

In order to retain the higher order terms of Equation (Equation3), the delta functions in Equation (Equation2) can be reformulated as a contour integral between the two molecules. In order to do this, we rewrite the IK operator using the fundamental theorem of contour integration, (6) δ(rri)δ(rrj)=δrrid=ri+ri+δrrid=rδrrid,(6) where the integral along represents an infinite number of paths of integration between the atoms i and j [Citation18]. In the classical paradigm of molecular dynamics, especially for the pairwise potentials considered in this work, Occam's Razor dictates that the interaction is a straight line between molecules. This is also in line with Newton's assumption of impressed force between two points. This assumptions results in =λrij with 0<λ<1, (7) rδrrid=rrij01δrriλrijdλ,(7) where d=rijdλ. So the configurational pressure is (8) PC(r,t)=12i,jNfijrij01δrriλrijdλ.(8) Now as δ(rriλrij) = δ(xxiλxij)δ(yyi - λyij)δ(zziλzij), the Irving Kirkwood contour can be seen to be the special case when delta functions in the x- and y-directions are set to one, and we get the resulting form of pressure over a flat interface in z by integrating along the line of interaction, (9) 01δzziλzijdλ=1|zij|HzzizijHzjzzij(9) with H the Heaviside function. This choice of a straight line contour in z, crossing a fixed area, appears in the appendix of the original paper by Irving and Kirkwood [Citation1] to derive (10) PC1K(r,t)=12i,jNfijrij|zij|HzzizijHzjzzij,(10) with components (11) PIKNC=PIKzzC=12i,jNfzijzij|zij|HzzizijHzjzzij,(11) (12) PIKTC=12PIKxxC+PIKyyC=14i,jNfxijxij+fyijyij|zij|HzzizijHzjzzij.(12) This form of pressure is known in the literature as the Irving Kirkwood contour [Citation15]. It has been shown that normal pressure equation (Equation11) is equivalent to the normal part of the MOP expression [Citation14]; however, the tangential parts of Equation (Equation12) appears to be a hybrid of the VA and MOP forms. The pressure expression fxijxij of Equation (Equation12) is the same as the tangential VA component but counted like the normal MOP contribution when a crossing occurs on the z plane.

The other common formulation of pressure in the interface literature is based on the work of Harasima [Citation16], which adjusts the interaction contour between the molecules based on the location of the interface of interest. The contour splits the path into a tangential and a normal component to a surface, so for a flat interface, the resulting form of stress is (13) PHN=PIKN,(13) (14) PHT=14i,jNfxijxij+fyijyij|zij|δ(zzi).(14) For more complicated surfaces, with a position in the z-direction described by a function ξ=ξ(x,y,t), the normal n=ξ/|ξ| and tangents t1 and t2 would be used to give an interaction path moving along the tangential and then the normal direction. The general contour of Equation (Equation6) can be considered to be =t+n with t and n defined as tangent and normal to the interface function ξ. This choice of contour has a side effect. The inter-molecular interaction between the molecules is based on the current shape of the liquid–vapour interface and the reference frame we fit to it. It is argued here that it is more natural to consider the inter-molecular interaction to be the same regardless of the system and instead explicitly consider the reference frame changing based on the interface. We will then obtain expressions which are similar to the Harasima contour but derived in terms of the reference frame. To do this, we integrate over a volume as in [Citation8, Citation9], which leads to the so-called Volume Average (VA) pressure formulation.

2.4. Volume average pressure

The volume average (VA) pressure is obtained from a volume integral of Equation (Equation4), assuming linear inter-molecular interactions using Equations (Equation6) and (Equation7). The location, size and shape of the volume is arbitrary and can be chosen wherever we want to measure the pressure. The kinetic pressure includes the kinetic contributions of molecules inside the volume, while the configurational term is based on the fraction of an inter-molecular interaction that passes through the given volume in space. This has the advantage that it is equivalent to the virial when all volumes in space are added up, as all fractions are included, (15) PVA=1ΔVi=1Npipimiϑi+12i,jNfijrij01ϑλdλ,(15) where ΔV is the local volume; the ϑi function is only non-zero for a molecule inside the volume and the ϑλ is non-zero when a fraction of the interaction is inside the averaging volume. The ϑ function is simply the integral of the Dirac delta function over a volume [Citation33, Citation38, Citation39], ϑα=ΛxαΛyαΛzα, where Λxα=H(x+xα)H(xxα) with H the Heaviside function, x+ the top of a volume in x, x the bottom and xα the position of either molecules when α=i or a point on the line of interaction when α=λ so xλ=xi+λxij. The difference between the two Heaviside functions is known as a boxcar function, shown in Figure , a function which is one between two points and zero outside.

Figure 1. (Colour online) A schematic showing a single control volume and the action of the different mathematical terms in the SF expression. The location of a surface crossing, λk, is checked to be between the two molecules using the difference H(1λk)H(λk), while the various Λ expressions act to limit the crossing to within a rectangular region of the surface. The normal at the point of crossing is used in the calculation of the surface term. The top right shows different example contours between molecules including the Irving Kirkwood as a solid line and two interpretations of the Harasima as different dotted lines assumed to move tangentially to the surface until it gets to a line either normal (which is consistent with the definition but can have multiple solutions for an arbitrary surface) or along the z-axis.

Figure 1. (Colour online) A schematic showing a single control volume and the action of the different mathematical terms in the SF expression. The location of a surface crossing, λk, is checked to be between the two molecules using the difference H(1−λk)−H(−λk), while the various Λ expressions act to limit the crossing to within a rectangular region of the surface. The normal at the point of crossing is used in the calculation of the surface term. The top right shows different example contours between molecules including the Irving Kirkwood as a solid line and two interpretations of the Harasima as different dotted lines assumed to move tangentially to the surface until it gets to a line either normal (which is consistent with the definition but can have multiple solutions for an arbitrary surface) or along the z-axis.

An advantage of the VA approach is we can choose any volume, including one which is moving with the interface ξ in the z -direction, so this z boxcar function becomes Λzα=H(z++ξ(xα,yα,t) - zα)H(z+ξ(xα, yα,t)zα). Mathematically the value of zα, with molecule α=i or line α=λ, can be interpreted as shifted based on the surface ξ at the same xα and yα location, where this form follows directly from the mathematical derivation [Citation33]. The shape of a typical volume with the z surface following the interface can be seen in Figure . As a result, it has some similarities to the Harasima approach, expressing terms parallel to the current interface. We can simplify the integral along λ in the Harasima case by noting that if molecule i is in the volume, the integration of a contour over all components tangential to the surface must also be inside. Assuming the integral of the Λλx and Λλy functions give the line segment in the volume in x, which is Δx, and in y, which is Δy, and taking PTC as the sum of the xx and yy components, (16) PTC=14i,jNfxijxij+fyijyijΔzΛiz.(16) This is similar to the tangential pressure part of the Harasima contour, but derived assuming the reference frame is moving with the surface.

Finally, it is worth mentioning that nothing in the integration process over a volume depends on the contour, so we could write the general form of contour integral (17) PVA=1ΔVi=1Npipimiϑi+12i,jNfijrijϑd,(17) where the length of a contour in a volume is obtained from the integral over ϑ=ΛxΛyΛz function with Λx=H(x+xix)H(xxix), where x is the x component of the contour, similarly for y with the moving z surface, Λz=H(z++ξ(x,y,t)ziz) - H(z+ξ(x,y,t)ziz). In practice, this would be obtained in a piecewise manner in a computer code, stepping along a contour and evaluating ϑ for each segment. Different contours would give different results, for example, a few contours are given in Figure , which each show different lengths inside the volume. The next section expresses pressure as surface crossings, which avoids this ambiguity, counting contributions entirely based on which surface is crossed.

2.5. Method of Planes and Surface Flux Pressure

The surface pressure approach avoids the expansion in delta functions of Equation (Equation3) by considering the interaction over a plane; introduced empirically by Tsai [Citation37] and derived formally by a Fourier transform of the Irving Kirkwood expression, Equation (Equation1) in [Citation11]. This MOP form has the ability to deal with systems arbitrarily far from equilibrium [Citation11]. It also gives three components of the stress tensor acting across a plane; when the plane normal is aligned along the x-axis, this is (18) PMOPx=1ΔAxi=1Npipixmiδ(xix)+14i,jNfijsgn(xxj)sgn(xxi),(18) where sgn(x) is the signum function. These two signum functions have the interpretation of including inter-molecular crossings over the surface of the plane. The normal component Pxx uses the normal components pix and fxij, and is equivalent to the IK form of pressure in the normal direction given in Equation (Equation11) (as sgn(zij)=zij/|zij| is cancelled by the zij denominator in Equation (Equation11), see [Citation38]). The other two components of momentum and force provide the two other pressure components, PxyandPxz, and return a single value for a plane covering the whole domain. Han and Lee [Citation12] used three mutually perpendicular planes converging at a point to obtain all nine components of stress, with planes limited to a local region of interest. This allows us to write the tangential components of pressure Pyy,PyxandPyz as (19) PMOPy=1ΔAxi=1Npipixmiδ(yiy)ΛxiΛzi+14i,jNfijsgn(yyj)sgn(yyi)Λx(λk)Λz(λk),(19) where Λxi and Λx(λk) are boxcar functions which localise the plane to a patch in space. These check if the molecular i and point of crossing (λk) are between the limits of the surface in x (similar for y) with Λx(λk)=H(x+xi + λkxij)H(xxi+λkxij). It is instructive to compare this pressure, where Pyy is the y component of force on the y surface, with the Irving Kirkwood contour of Equation (Equation12) which measures the y force times yij but on the z surface. This difference will be small for thin volumes but could become significant as Δz increases.

The local MOP pressure proposed by Han and Lee [Citation12] occurs naturally from the derivation in the original paper by Irving and Kirkwood [Citation1], by working in integrated, or control volume, form [Citation38]. This proceeds by integrating the Irving and Kirkwood [Citation1] momentum over a volume and evaluating the time evolution of this volume [Citation38]. The resulting equations have a number of advantages, the pressure on the six volume surfaces can be used to get all nine components as in the Han and Lee [Citation12] form. The derivation provides a natural link between VA and MOP pressures [Citation38], while the use of a closed volume means any choice of contour must be included on one of the surfaces (see Figure ). This directly addresses the non-uniqueness of interaction contour, as all interactions must be included provided one molecule is inside the volume and the other outside, so contour choice simply changes which surface an interaction is counted on. This has the effect of shifting it from a shear pressure contribution to a direct contribution (or vice versa) and becomes similar to choosing a different slice through a material. A notable corollary of this is that while P=0 is satisfied, shear components, e.g. Pxy/x, maybe non-zero for certain choices of contour. We can, therefore, verify direct components are constant and shear components are zero (required in a Newtonian liquid by definition), as a test that the choice of a contour is meaningful. The other important advantage of the control volume approach is by defining the surfaces enclosing a volume, the sum over all surfaces is exactly equal to momentum change inside the volume. The pressure equilibrium condition is generalised to a form valid every time step, so becomes P=dρu/dt+ρuu in control volume form. This allows us to derive a general surface pressure expression we are sure includes all terms for surface movement and curvature, by checking the sum of forces and momentum on a volume balance exactly. It is this property that has been used to validate the result for pressure presented in this work.

In order to generalise the MOP form to a surface, we introduce the notation dSxi+=δ(xix+)ΛiyΛiz and dSxλ+=δ(xλx+),ΛλyΛλz for the top surface (denoted by the + superscript) in the x -direction, (20) ρuux+Px+SF=1ΔSxi=1Nmir˙ix˙idSxi++12ΔSxi,jNfij01xijdSxλ+dλ,(20) and it can be shown that (21) 01xijdSxλ+dλ=sgn(x+xj)sgn(x+xi)Λy(λk)Λz(λk)(21) for a flat interface. The use of peculiar momentum pi has been dropped and the convective terms moved to the left-hand side to avoid making the assumption that streaming velocity is constant. Equation (Equation20) can, therefore, be seen to be the localised MOP as shown in Equation (Equation19), which we call the Surface Flux (SF) pressure, because it can be generalised to get fluxes on any surface, including ones which are not flat. The Λαz term is a function of the moving surface ξ, so the size of the rectangular part of the plane it selects is constant, but moves as the surface changes. As a result, it is always the same distance from the surface and the same width (see Figure ).

For interactions crossing the arbitrary surface itself, ξ, the SF pressure is expressed as follows: (22) ρuuz+Px+SF=1ΔSzi=1Nmir˙ix˙iξi+xi+y˙iξi+yiKinetic Curvature+z˙i+ξi+tSurface EvolutiondSzi++12ΔSzi,jNfij01xijξλ+xλ+yijξλ+yλConfigurational Curvature+zijdSzλ+dλ,(22) where dSzα+=δ(ξα+zα)ΛxΛy with ξα+=z++ξ(xα,yα,t) catching the point of crossing if it is on the interface surface. We have a number of additional terms due to local surface curvature at the location of the crossing. These include the crossing of a molecular trajectory and the crossing of an intermolecular interaction for kinetic and configurational parts, respectively, as well as a surface time-evolution term.

For the case when ξ is constant or zero, the expression of Equation (Equation22) will simplify to the localised form of the MOP pressure given in Equation (Equation20), so this expression can be used to get pressure on every surface of a volume. The different surfaces of a volume moving with an interface are shown in Figure . The expression to actually calculate the pressure on a surface in an MD simulation, here the z+ surface, is, (23) t1t2ρuuz+Pzc+SFdt=1ΔSzi=1Nmir˙ir12nz|r12nz|dS++1ΔSzi=1Nmir˙iϑtPzc+SF=12ΔSzi,jNfijrijnz|rijnz|dS+,(23) where r12=r2r1 is the line of time evolution of a molecule between t and t+Δt, ϑt=[H(ξ(t)zi(t))H(ξ(tΔt)zi(t))]ΛixΛiy counting how many molecules have left or entered the volume due to surface movement between time tΔt and t, and the surface normal includes all of the surface curvature terms of Equation (Equation22) with nz=α(ξzα)α(ξzα). This normal is the one used in the Harasima contour for a general surface, which could be combined with the tangential contour of Equation (Equation16). We have generalised the treatment of both kinetic and configurational terms in Equation (Equation23) by recognising that molecules must move from a starting point r1=ri(t) to an endpoint r2=ri(t+Δt) for surface crossings to occur. These movements can be written as an integral between two points in space (the molecule at different times), which makes it identical in form to the configurational term, an integral between two points (different molecules) in space. Both kinetic and configuration terms are treated identically, the crossing of a moving molecule or the crossing of an interaction are mathematically and algorithmically equivalent. In the case of a straight line and general surface ξ here, this becomes a ray-tracing problem which is common in computer graphics. Once the location of crossing, λk, is obtained, it can be inserted in the following expression (24) dS+=k=1NrootsH1λkHλkΛx(λk)Λy(λk),(24) with the first two Heaviside functions selecting if the root λk is between the endpoints r1 and r2. The Λ functions then check if that crossing is in a rectangle area of the surface (see Figure for a graphical illustration of this).

Multiple crossings are possible as the surface function ξ is general. Indeed, this approach should be applicable for any interaction contour and surface, simply requiring the point on the contour that the surface crossing λk occurs to evaluate dS+. It seems reasonable that this approach could therefore be applied to get the intersection of Equation (Equation6), with any surface. The pressures tensors defined from a closed volume of bounding surfaces would have the property already discussed which ensures any missed contributions from differing contour paths would be included as shear components on another surface.

2.6. A correction to the volume average

In this section, we present three extra terms which must be included to get the correct form of VA pressure on a moving interface. VA pressure equation (Equation15) is commonly obtained by integrating Equation (Equation4) over a volume [Citation8, Citation33]. However, we derive the SF equations from the time evolution of momentum inside a control volume, (25) ddti=1Nmir˙iϑi=i=1Nmir˙idϑidt+i,jNfijrij01ϑλrλdλ,(25) which results in extra terms for both the time evolution of the moving volume and the surface curvature. For the first term, (26) i=1Nmir˙idϑidt=ri=1Nmir˙ir˙iϑiPVAkΔV+i=1Nmir˙ir˙iξi+ridSzi+ξiridSziExtra Kinetic Curvature (KC) Terms+i=1Nmir˙iξi+tdSzi+ξitdSziExtra Time Evolving (TE) Terms(26) where we have used ξi±/zi=0 to write the expression concisely in a vector form. We identify the kinetic part with reference to Equation (Equation15) using an overbrace, under the assumption that everything inside the /r operator is VA pressure, and identify the two additional terms, KC and TE, missing from the VA treatment.

The second term in Equation (Equation25) is the configurational part, which for the VA in a moving interface, swapping ϑλ/rλ to ϑλ/r results in additional terms [Citation34]; so the full expression with correction term CC is (27) i,jNfijrij01ϑλrλdλ=ri,jNfijrij01ϑλdλPCVAΔV+i,jNfijrij01ξλ+rλdSzλ+ξλrλdSzλdλExtra Configurational Curvature (CC) Term,(27) again using ξλ±/zλ=0 to write in a vector form. So, Equation (Equation25) shows the link between SF and VA form with the extra terms naturally included in the SF derivation (28) ddti=1Nmir˙iϑi=α{x,y,z}[Pα+SFPαSF]ΔSαrPVAΔV+KC+TE+CC,(28) where the time evolution is exactly equal to the sum of SF over all six faces (convective terms are set to zero for simplicity) but only approximately equal to the divergence of the volume average with correction terms .Footnote1

Pressure in the VA form is the average inside a divergence operator /r, so it is natural to write the extra terms in Equations (Equation26) and (Equation27) in the same way. Terms in the x- and y-directions are expected to be zero so we take the derivative of the integral in just the z-direction (29) zKC+TE+CCdz=zi=1Nmiz˙ir˙iξiri+miz˙iξitϑi+i,jNfzijrij01ξλrλϑλdλ(29) so everything inside the derivative is in the form of a pressure contribution inside a volume. As with other VA terms, the functions ϑα assigns pressure contributions only when molecules, α=i, or points on interactions path, α=λ, are inside the volume. The interface movement ξi/t and surface curvature ξi/ri at the location of the molecules is used in the kinetic part, while the curvature integrated along the contour between molecules ξλ/rλ appears in the configurational part. Obtaining curvature at varying locations while moving along an interaction contour will likely be complex and computationally expensive. For simplicity, these terms will be estimated using the surface flux terms from Equation (Equation22) in this work as these are already obtained when collecting SF expressions and are expected to be similar for the thin averaging volumes employed.

3. Methodology

In this section, we outline the molecular dynamics (MD) setup for the three cases shown schematically in Figure . All cases use the simple, pairwise shifted Lennard Jones potential, (30) ϕ(rij)=ϵσrij12σrij6ϕ(rc);rij<rc,(30) with a cut-off rc=2.5, where all numbers are presented in reduced LJ units. This is chosen to allow efficient simulations but is shorter than required to give surface tension with a good experimental agreement [Citation40]. Time integration uses the velocity Verlet scheme (31) ri(t+Δt)=ri(t)+Δtvi(t+Δt/2),vi(t+Δt/2)=vi(tΔt/2)+ΔtFi(t)(31) with a time step Δt=0.005 and force on i calculated from Fi=jiNfij. The simulations are run using Flowmol which has been verified in a range of previous publications [Citation34, Citation41, Citation42] and has recently been made open-source [Citation43].

Figure 2. (Colour online) A schematic of the three cases considered in this work: (a) a solid-liquid interface with a fixed grid, (b) a liquid–vapour interface with a fixed grid and (c) a liquid–vapour interface with a grid moving with the intrinsic interface. The profiles of normal pressure are shown below with kinetic (

), configurational (
) and total (
) pressure contributions.

Figure 2. (Colour online) A schematic of the three cases considered in this work: (a) a solid-liquid interface with a fixed grid, (b) a liquid–vapour interface with a fixed grid and (c) a liquid–vapour interface with a grid moving with the intrinsic interface. The profiles of normal pressure are shown below with kinetic (Display full size), configurational (Display full size) and total (Display full size) pressure contributions.

For the solid–liquid simulation, the domain is set up with height Lz=34.2 and walls of thickness 3 from the top and bottom of the domain. The system is periodic in the other directions, with Lx=Ly=13.6 giving a total of N=5120 molecules. The walls are fixed using tethered molecules with anharmonic spring constants of Petravic and Harrowell [Citation44] with strength k4=5×103 and k6=5×106. The system is initialised using an FCC lattice of density ρ=0.8 throughout and initial temperature of T=1, with the untethered region allowed to melt while the system is equilibrated. After melting, the average temperature of the system is around Tave=0.6. Statistics are then collected over 100,000 steps.

For the liquid–vapour coexistence, the setup is identical to previous work [Citation34], with periodic boundaries in all directions of size Lx=Ly=12.7 and Lz=47.62. The setup also uses an FCC lattice and deletes molecules, with the middle 40% designated as liquid with a density of ρl=0.79 and remaining gas at density ρg=0.0002 giving N=2635 molecules. The system is equilibrated for 100,000 time steps in a Nosè Hoover NVT ensemble with set point Ts=0.7. The main runs are restarted in an NVE ensemble run until well-resolved statistics are obtained.

The intrinsic interface is fitted to the outer molecules of a cluster of liquid molecules, identified by cluster analysis with Stillinger cut-off length rd=1.5 and requiring more than three neighbours per molecule. The functional form of surface ξ(x,y,t) is fitted using the intrinsic surface method (ISM) [Citation28] where the interface is described by an arbitrary number of sines and cosines (32) ξ(x,y,t)=μ=kukuν=kukuaμν(t)fμ(x)fν(y),(32) where fμ(x)=cos(kxx), fμ(x)=sin(kxx) and aμν is the matrix of surface wavenumbers. The number of wavelengths is calculated from the system size ku=nint(LxLy/λu) with λu=1 the minimum wavelength. This function is fitted by minimising the least-square difference between surface molecules zp and the intrinsic surface function at these positions ξ=ξ(xp,yp,t), (33) W=12p=1Npzp(t)ξ(xp,yp,t)2+ψA~,(33) with extra constraint ψ=1×108 to prevent overfitting by ensuring intrinsic area A~ does not become too large. This process proceeds in stages, starting with a 3 by 3 grid of the most extreme molecules, the fitting is repeated, using new pivots added in batches based on proximity to the current surface, until the density of the surface reaches a value of ns=0.7. Once fitted, this surface is then used to determine the grid of cells, or bins, which we use to collect averaged statistics. This is the Lagrangian reference frame used to obtain pressure measurements which are always the same distance from the current position of the moving surface. The domain is split into bins with dimensions Δx=Δy=0.198 tangential to the surface and Δz=0.0875 in the normal direction. For the SF term, the intrinsic interface is converted to a piecewise set of bilinear squares each of size Δx by Δy which are used to calculate the interaction with the surface. This employs an efficient algorithm for ray-tracing to obtain crossings [Citation45] and assigns these to the appropriate cells. The conservation of every control volume in the domain is tested every time step, by summing up Equation (Equation23) for all six surfaces and checking it has a difference of less than 1×109 compared to the momentum change inside that volume. For the VA pressure, a mapping based on molecular positions, or points on the interaction contour between molecules, is applied using the corresponding surface position. The mapped coordinate can then be efficiently binned using integer division, as if on a uniform grid. The full details of these algorithms are described extensively in previous work [Citation34]

4. Results and discussion

In this section, we compare three types of pressure measurements, IK1 equation (Equation5), VA equation (Equation15) and SF equation (Equation22), split into kinetic and configurational components. These three forms also provide the Irving Kirkwood and Harasima contours, and the link to these is discussed. The convention is the same in all figures, kinetic terms are shown in orange, configurational in blue and total pressures in green (colour online, see caption of Figure for black and white equivalents in print). The IK1 pressure is shown as a dotted line, the VA as filled circles and the SF as a solid line. The three cases are shown in Figure , first (a), the solid–liquid case is shown in Figure , which is used to demonstrate the flat normal pressure profile obtained by both the VA and SF methods, as required for mechanical equilibrium, together with the varying IK1. The same set of pressure measurements of case (b) the liquid–vapour interface using a fixed averaging grid are shown in Figure , demonstrating the same flat normal pressure profile from both VA and SF terms and the same variation in the IK1 expression.

Figure 3. (Colour online) Comparing wall-normal, PN, pressure measurements near a solid–liquid interface showing (a) half channel and (b) near-wall region. The kinetic components are shown for IK1 (

), VA (
) and SF (
), the configurational part for IK1 (
), VA (
) and SF (
) while the total pressure is IK1 (
), VA (
) and SF (
). The density (
) with the zero axis shown by a horizontal black line (
) and the shaded region on (a) is the section shown in (b).

Figure 3. (Colour online) Comparing wall-normal, PN, pressure measurements near a solid–liquid interface showing (a) half channel and (b) near-wall region. The kinetic components are shown for IK1 (Display full size), VA (Display full size) and SF (Display full size), the configurational part for IK1 (Display full size), VA (Display full size) and SF (Display full size) while the total pressure is IK1 (Display full size), VA (Display full size) and SF (Display full size). The density (Display full size) with the zero axis shown by a horizontal black line (Display full size) and the shaded region on (a) is the section shown in (b).

Figure 4. (Colour online) (a) Normal PN and (b) tangential PT pressure near a liquid–vapour interface using a fixed reference frame (a uniform grid). The kinetic components for IK1 (

), VA (
) and SF (
), the configurational part for IK1 (
), VA (
) and SF (
) and the total pressure for IK1 (
), VA (
) and SF (
) with the zero axis shown by a horizontal black line (
). The Irving Kirkwood contour would give the same normal and tangential pressure as the VA and SF curves.

Figure 4. (Colour online) (a) Normal PN and (b) tangential PT pressure near a liquid–vapour interface using a fixed reference frame (a uniform grid). The kinetic components for IK1 (Display full size), VA (Display full size) and SF (Display full size), the configurational part for IK1 (Display full size), VA (Display full size) and SF (Display full size) and the total pressure for IK1 (Display full size), VA (Display full size) and SF (Display full size) with the zero axis shown by a horizontal black line (Display full size). The Irving Kirkwood contour would give the same normal and tangential pressure as the VA and SF curves.

Finally, Figure (c) is the focus of the remaining work, using interface tracking to obtain pressure in a reference moving with an intrinsic liquid–vapour interface. All of the IK1, VA and SF forms of pressure give different behaviour, and the kinetic and configurational terms are compared in Figure , before discussing the total pressure in Figure . In order to understand the differences, the normal and tangential parts are presented individually and the resulting contributions to surface tension from their respective integrals are displayed in Figure . A full breakdown of all SF contributions to normal pressure from Equation (Equation22), together with the surface curvature and movement which are needed as corrections to the VA form, then given in Figure . This is shown to satisfy the momentum equilibrium in a moving control volume, proving the SF form must contain all possible contributions and that the curvature and surface movement is essential to ensure VA expressions satisfied mechanical equilibrium in the reference frame moving with the interface. The shape of tangential pressure is shown normalised by density in Figure with a fitting proposed which could be used to approximate pair interactions in terms of density. The link to the Irving Kirkwood and Harasima contours is discussed.

Figure 5. (Colour online) (a) Normal PN and (b) tangential PT pressure for a reference moving with the liquid–vapour interface, showing the kinetic components for IK1 (

), VA (
) and SF (
) (note the dashed line exactly follows the solid line) and the configurational part for IK1 (
), VA (
) and SF (
) with density (
) with the zero axis shown by a horizontal black line (
). The Harasima contour would give the same normal pressure as the SF curves in (a) and the same tangential pressure as the IK1 in (b).

Figure 5. (Colour online) (a) Normal PN and (b) tangential PT pressure for a reference moving with the liquid–vapour interface, showing the kinetic components for IK1 (Display full size), VA (Display full size) and SF (Display full size) (note the dashed line exactly follows the solid line) and the configurational part for IK1 (Display full size), VA (Display full size) and SF (Display full size) with density (Display full size) with the zero axis shown by a horizontal black line (Display full size). The Harasima contour would give the same normal pressure as the SF curves in (a) and the same tangential pressure as the IK1 in (b).

Figure 6. (Colour online) The total pressure components for a reference moving with the interface: (a) normal PN and (b) tangential PT, with IK1 (

), VA (
) and SF (
) with the kinetic and configurational constituent parts from Figure shown faintly for reference and zero axis shown by a horizontal black line (
). The Harasima contour would give the same normal pressure as the SF curves in (a) and same tangential pressure as the IK1 in (b).

Figure 6. (Colour online) The total pressure components for a reference moving with the interface: (a) normal PN and (b) tangential PT, with IK1 (Display full size), VA (Display full size) and SF (Display full size) with the kinetic and configurational constituent parts from Figure 5 shown faintly for reference and zero axis shown by a horizontal black line (Display full size). The Harasima contour would give the same normal pressure as the SF curves in (a) and same tangential pressure as the IK1 in (b).

Figure 7. (Colour online) The cumulative integral of the total pressures in a reference moving with the interface shown in Figure with normal PN on (a) and the negative of the tangential PT pressure shown on (b), starting from z=−5 up to the current z on the axis, for the IK1 (

), VA (
) and SF (
) measurements, and the horizontal black line (
) is the zero axis. The inserts zoom in on the values that the integrals have converged to by the upper limit displayed on the plot, z=2, where the sum of normal and tangential components would give the total surface tension.

Figure 7. (Colour online) The cumulative integral of the total pressures in a reference moving with the interface shown in Figure 6 with normal PN on (a) and the negative of the tangential −PT pressure shown on (b), starting from z=−5 up to the current z on the axis, for the IK1 (Display full size), VA (Display full size) and SF (Display full size) measurements, and the horizontal black line (Display full size) is the zero axis. The inserts zoom in on the values that the integrals have converged to by the upper limit displayed on the plot, z=2, where the sum of normal and tangential components would give the total surface tension.

Figure 8. (Colour online) The terms required to balance normal pressure in a reference moving with the interface, where (a) shows the normal component of the Volume Average (VA) pressure, both kinetic (

) and configurational (
) with additional correction terms from Equations (Equation26) and (Equation27) including kinetic curvature ξi/ri, KC, (
), time-evolving ξi/t, TE, (
) as well as the negative of the configurational curvature ξλ/rλ, CC, (
) (shown as negative to allow comparison with the VA configurational pressure). In figure (b), the VA pressure is displayed with the correction terms added compared to the SF forms, which naturally include all of these terms. These include the kinetic VA with KC and TE added (
) compared to kinetic SF (
), configurational VA with CC added (
) against configurational SF (
) and total corrected VA (
) against total SF (
). The zero axis is shown by a horizontal black line (
).

Figure 8. (Colour online) The terms required to balance normal pressure in a reference moving with the interface, where (a) shows the normal component of the Volume Average (VA) pressure, both kinetic (Display full size) and configurational (Display full size) with additional correction terms from Equations (Equation26(26) ∑i=1Nmir˙idϑidt=∂∂r⋅∑i=1Nmir˙ir˙iϑi⏞PVAkΔV+∑i=1Nmir˙ir˙i⋅∂ξi+∂ridSzi+−∂ξi−∂ridSzi−⏞Extra Kinetic Curvature (KC) Terms+∑i=1Nmir˙i∂ξi+∂tdSzi+−∂ξi−∂tdSzi−⏟Extra Time Evolving (TE) Terms(26) ) and (Equation27(27) ∑i,jNfijrij⋅∫01∂ϑλ∂rλdλ=−∂∂r⋅∑i,jNfijrij∫01ϑλdλ⏞PCVA⁡ΔV+∑i,jNfijrij⋅∫01∂ξλ+∂rλdSzλ+−∂ξλ−∂rλdSzλ−dλ⏟Extra Configurational Curvature (CC) Term,(27) ) including kinetic curvature ∂ξi/∂ri, KC, (Display full size), time-evolving ∂ξi/∂t, TE, (Display full size) as well as the negative of the configurational curvature ∂ξλ/∂rλ, CC, (Display full size) (shown as negative to allow comparison with the VA configurational pressure). In figure (b), the VA pressure is displayed with the correction terms added compared to the SF forms, which naturally include all of these terms. These include the kinetic VA with KC and TE added (Display full size) compared to kinetic SF (Display full size), configurational VA with CC added (Display full size) against configurational SF (Display full size) and total corrected VA (Display full size) against total SF (Display full size). The zero axis is shown by a horizontal black line (Display full size).

Figure 9. (Colour online) Total tangential pressure divided by density for quantities in a reference frame moving with the interface, VA (

) and total SF (
). The kinetic, SF (
), VA (
), and configurational, SF (
), VA (
) components are shown faintly in the background for reference. A fitting is shown (
) with functional form and fitting coefficients annotated on the figure with the zero axis the horizontal black line (
).

Figure 9. (Colour online) Total tangential pressure divided by density for quantities in a reference frame moving with the interface, VA (Display full size) and total SF (Display full size). The kinetic, SF (Display full size), VA (Display full size), and configurational, SF (Display full size), VA (Display full size) components are shown faintly in the background for reference. A fitting is shown (Display full size) with functional form and fitting coefficients annotated on the figure with the zero axis the horizontal black line (Display full size).

We start with the case shown in the schematic of Figure (a). The wall normal (PN=Pzz) pressure near a solid–liquid interface is presented first in Figure with half of the channel shown in (a) and a focus on just the near-wall region in (b). The shaded region in Figure (a) shows the area focused on in Figure (b), as it contains the majority of the variation, and in all subsequent figures, only a small region near the interface is displayed. The kinetic and configurational parts of the pressure are shown to balance for both the VA and SF forms of pressure, with the average giving a constant pressure value. This satisfies the condition for equilibrium P=0. The IK1 pressure has identical kinetic components to both the VA and SF, but the configurational part is seen to have larger shifted peaks which results in a non-zero average pressure so P0. These peaks in the pressure cannot be correct in an equilibrium system, as they would induce a flow, so this suggests the IK1 pressure is not correct, a well-documented result in the literature [Citation11, Citation14].

The same quantities discussed for the solid–liquid case are shown for the liquid–vapour interface using a fixed grid in Figure , the schematic of Figure (b) . As with the solid–liquid cases, the VA and SF give similar results, while the IK1 shows a difference in the normal configurational pressure in Figure (a). The result again shows a flat line for the VA and SF forms, indicating the required P=0 condition is satisfied. The normal component of SF pressure, shown by the solid lines, is equivalent to the Irving Kirkwood contour. The IK1 fails to give the correct normal component, although the difference can be seen to have roughly equal positive and negative areas. This means the Kirkwood and Buff [Citation46] integral used to get surface tension will be the same as the other methods.

The tangential pressure (Figure (b)) is almost identical for IK1, VA and SF measurements. The IK1 shows a slight shift toward the interface when compared to the other forms of pressure. We do not explicitly calculate the tangential Irving Kirkwood contour of Equation (Equation12), but it is a combination of the VA form measured on an SF style z plane, so we would expect it to give the same results as both the VA and SF expressions, which are very similar in Figure (b).

So, the conclusion from Figures and are that the VA and SF satisfy force balance in the normal direction while the IK1 does not. However, the IK1 PN contribution above and below the axis is roughly equal so this will cancel in an integral. As the tangential components of the IK1 is similar to both the VA and SF, the integral of PNPT used in surface tension will be identical. For the normal pressure, the Irving Kirkwood contour is represented by the SF results and satisfy the equilibrium P=0. For the tangential pressure, the Irving Kirkwood contour is a combination of the VA and SF, which give very similar results. There is very little difference in these various measures for a fixed reference frame, so next we consider the same pressure measurements in a reference frame moving with the interface, the case shown in Figure (c).

Both kinetic and configurational components of pressure are shown in Figure with the total pressure shown in Figure , again split into normal (a) and tangential components (b). As before, the IK1, VA and SF terms are compared, but here we see notable differences in all three. For the kinetic terms in Figure (a), the IK1 and VA agree, showing peaks which mirror the density shown in grey, representing the location of the molecules relative to the surface. The SF term is shown and naturally includes the surface evolution term, ξ/t and kinetic curvature which are not included in the VA expression. The kinetic curvature terms are zero on average, but the inclusion of the surface evolution is important, without it the kinetic SF pressure profile would be identical to the VA and IK1 [Citation34]. As a result of including the surface movement, the SF profile has a flat region on the liquid side (Figure (a)), between the interface and first layer, as well as a smoother transition to zero on the gas side. The profile is exactly mirrored by the SF configurational pressure (Figure (a)), so the sum of kinetic and configurational terms gives a flat pressure profile in Figure (a). We, therefore, see from Figure (a), only the SF form satisfies the equilibrium force-balance condition. The extra term in Equation (Equation27) for the configurational curvature is also missing from the configurational term of the VA pressure, a point we return to at the end of this section. As a result, the VA pressure does not satisfy the equilibrium force-balance condition in Figure (a) in a moving reference frame. The IK1 form is very different to the VA and SF, showing large oscillations in normal configurational pressure which results in significant peaks in the configurational pressure of Figure (a) and, therefore, the total in Figure (a). As the IK1 pressure fails to satisfy the balance condition in the simpler case of a solid–liquid interface, as well as the fixed reference liquid–vapour case, there is no reason to suspect it will perform any better for a moving-reference case. In fact, the oscillatory nature of the IK1 pressure appears to show more prominent peaks which is a feature of the IK1 observed in the solid–liquid case of Figure . This is interesting as the IK1 departs further as the system becomes more inhomogeneous and structured [Citation14], so the IK1 performs worse here as a moving reference frame exposes the inhomogeneity of the molecular structure near the intrinsic interface. These molecular peaks are apparently smoothed by the continuous operation of taking a fraction of the line inside a volume for the VA case, while the SF expression depends on crossings and so is less dependent on the absolute position of the molecules. The measuring volumes are also centred on the interface itself so surface crossing measurements are offset either side by Δz/2. The SF, therefore, avoids the peak at the interface in the normal pressure measurement seen in Figure (a).

The tangential components are identical for VA and SF in Figure (b), as they are both calculated using a uniform grid in the surface tangent direction, so we would expect them to agree in the same way any fixed volume cases do. The IK1 actually shows smaller oscillation than the VA/SF terms in the tangential direction with a peak at the interface and a smaller, more smeared contribution for the first and second fluid layers.

Despite the very different profiles for the three pressure measurements, it is well documented that the Kirkwood and Buff [Citation46] integral will give the same surface tension for all three [Citation23]. This integral of the difference between normal and tangential terms will also be the same as using a fixed reference frame [Citation34]. One way to understand this: all definitions of pressure considered here use the same forces but vary how they distribute these measurements to different bins or cells, so the integral must be the same. As the Kirkwood and Buff [Citation46] integral is using the difference between normal and tangential components (PNPT)dz , it is instructive to split them into these two additive contributions, as is done in Figure with (a) the integral of the normal PNdz and (b) the integral of the negative of the tangential PTdz. In Figure (a), the flat SF normal pressure profile gives a linearly increasing integral over the interface which agrees with the oscillating VA and IK1 after the integral has moved far enough away from the interface into the gas phase (shown approaching z=2 in the insert). The integral of the normal contribution is small, contributing less than 10% (0.05 by z=2) to the total surface tension integral which is approximately 0.6 in this case. The main contribution is from the tangential pressure which shows an identical trend for both the VA and SF in Figure (b). The tangential part of the IK1 pressure can be seen to have fewer fluctuations and therefore a simpler integrated contribution. Again, all three methods converge to approximately the same integrated result for the tangential contributions, with a value of about 0.55 by z=2. Therefore, the measured surface tension, obtained from the sum of the normal (Figure (a)) and minus tangential (Figure (b)), converges to roughly the same value of γ=(PNPT)dz0.6 for all methods. Differences are attributed to statistical noise, which integrated quantities like surface tension are more susceptible to.

Figure (a) shows the VA pressure and the three additional terms, KC, TE and CC, which were derived as corrections to the VA pressure in Section 2.6. These terms are due to the moving interface and would be zero for a fixed reference frame, which is why the VA and SF normal pressures have identical profiles in Figures and but not in Figures and . The corrected VA forms are shown to give a constant normal pressure in Figure (b), as required for mechanical equilibrium in a moving interface, as well as a good agreement with the SF pressure which naturally includes these terms. For the kinetic pressure, the normal VA contribution is shown in Figure (a) and the additional correction terms due to kinetic and configurational interface curvature as well as the movement of the surface itself are shown with lines because they are obtained from SF terms. The VA shown in Figure (b) includes the surface movement correction in (a), and the kinetic curvature (both extra terms from Equation (Equation26)). With these additional corrections, the kinetic part of the VA has an identical shape to the SF pressure which naturally includes these terms. For the configurational pressure on (a) shows the magnitude of the configurational curvature contributions, which are the extra terms missing from the VA measurements in Equation (Equation27). The total for both SF and corrected VA is shown in green as a flat normal pressure which is indicative of mechanical equilibrium. However, the VA shows a few values which are not flat near the interface, attributed to using the SF form of pressure to get the correction terms instead of the VA form. This was expected to give a small error for the thin bins used here, but near the rapid change at the interface the limits of this assumption appear to show. This indicates how important getting an exactly consistent form of pressure is, with only the SF able to give a mechanical balance at all points.

Finally, the tangential pressure is considered in Figure , where the value is plotted normalised by density. The peaks in the kinetic pressure PT(z) and density ρ(z) correspond exactly as a function of z, so the ratio is constantly giving a flat profile. The shape of the total pressure is, therefore, due to the configurational part, which depends on interactions passing through a location in space, and will be non-zero even where no molecules are located. As a result, a diverging profile is observed on either side of zero, as the intrinsic fitting process results in a large density peak at the interface and no molecules on either side. This means PT/ρ as ρ0 but a finite value is observed at zero due to the molecules which sit on the intrinsic surface. The shape of the profile represents the pressure per molecule, so it is useful to understand the functional form it takes. Fitting is obtained using a decaying exponential eaz times an oscillating function 1bsin(2cπz+d), where a,b,candd are coefficients to be fitted, where a reasonable fit is observed for values a=1, b=2.5, c=1 and d=0.5, so tangential pressure in the liquid can be approximated using (34) PT(z)ρ(z)ez12.5sin2πz+0.5where <z<1.(34) This form seems to be a reasonable approximation for the first two peaks and captures the decay to zero moving into the bulk. This fitted expression could be used in a coarse-grained approximation or mean-field approach to model the pressure near the interface.

Finally, we consider the link between results obtained here in a reference frame tracking the interface and the contour forms. The Irving Kirkwood contour assumes a fixed reference, so is not trivially related to the forms of pressure shown in Figures and for a moving reference frame. However, the Harasima contour is obtained by moving first tangentially to the surface, then in the normal direction. The tangential part from Equation (Equation16) is, therefore, a similar quantity to the tangential IK1 components shown in Figures (b) and (b). This shows much smaller oscillations in Figure (b) than the VA and SF methods. The normal component of the Harasima contour is mathematically similar to the SF form, which takes the contribution dotted with the surface normal. It can be seen in Figure that the integral of the normal and tangential terms all converge to the same value, so mixing the tangential components of the IK1 pressure with the normal components of the SF to obtain the Harasima contour would result in the same surface tension. The Harasima contour would, therefore, satisfy the equilibrium condition in the normal direction, give the simple tangential profile of Figure (b) and return the correct surface tension. This work, therefore, gives the mathematical process to measure this contour for a general surface, by taking the SF in the normal direction (Equation (Equation23)) and then the IK1 for the tangential components using Equation (Equation16). This process was first reported in the work of Sega et al. [Citation47] with differences between the Harasima and IK tangential pressure explored in later work [Citation35]

However, for a general surface, the split of the Harasima contour into a normal and tangential part is non-unique, as highlighted in Figure where different combinations of tangent and normal to the surface would be possible. As the calculation of the SF interaction and surface normal is required to get the Harasima contour for a general interface, simply using the SF is preferable in this case, although for more complex potentials and long-range interaction the Harasima contour may offer additional advantages [Citation27,Citation35]. The SF provides three components per surface, so all nine pressure terms are available, also giving the curvature contributions and surface movement shown in Figure . It also provides an explicit mathematical link between any contour crossing the closed surface and momentum evolution inside that closed control volume. By mixing the tangential IK1 and SF, we would lose this property of exact control volume balance.

5. Conclusions

The appropriate definition of pressure in molecular dynamics (MD) simulation has been the subject of some debate. In this work, it is argued that a consideration of the reference frame is more illuminating in defining pressure than the interaction contour. This is especially true near an interface. By considering a reference frame described by an arbitrary function ξ=ξ(x,y,t) fitted to the surface every time, we get a general form of interface pressure. The derivation provides an expression in terms of the surface fluxes (SF), a generalisation of the method of planes (MOP) pressure to an arbitrary surface. This is compared to a range of other pressure definitions, with the differences discussed. These include a contour between two molecules averaged in a volume called the volume average (VA) pressure, the virial applied locally with interaction split into two called the IK1 pressure as well as the Irving Kirkwood and Harasima contours. All forms of pressure give the same surface tension but result in different pressure distributions over an interface. Results show the IK1 form does not satisfy mechanical equilibrium in the interface normal direction, even in the simplest cases, while the VA fails to satisfy mechanical equilibrium in the case of moving with a reference frame. Correction terms are derived for the VA form and shown to account for moving interface and curvature, giving the expected constant normal pressure over the interface. Combining the SF and IK1 results is shown to provide a generalisation of the Harasima contour for an arbitrary surface. As a result, we show a choice of reference frame provides a clear link between the various forms of pressure. The SF is argued to be the preferred form as it naturally includes all curvature and surface movement terms, provides an exact equation linking SF pressure and instantaneous momentum change in the volume. As the SF pressures can be defined on all surfaces which bound a closed volume, it ensures any of the infinite possible contour choices must cross one of the surfaces and be included in the pressure tensor.

Data Availability

The data that support the findings of this study are freely available from https://doi.org/10.24435/materialscloud:5b-0g saved in the open Python pickle format with all required Python scripts to load the data and reproduce the figures in this work (as well as allowing further analysis of the data). The input files to simulate this exact case are also included in the above link with a README.txt explaining the process of building and running Flowmol. The latest version of the Flowmol code is freely available from https://github.com/edwardsmith999/flowmol, however, to ensure reproducibility, the version of Flowmol used to generate the data in this work is available at the following persistent link https://doi.org/10.5281/zenodo.4639546.

Disclosure statement

No potential conflict of interest was reported by the author(s).

Additional information

Funding

The author is grateful to the UK Materials and Molecular Modelling Hub for computational resources, which is partially funded by Engineering and Physical Sciences Research Council [EP/T022213/1].

Notes

1 The exact equality is lost because the VA form assumes pressure is constant in a volume, while the exact balance of the control volume requires fluxes averaged over the bounding surfaces of the volume.

References