forked from asmunder/BPIPMDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1-BPIPMDS.tex
2153 lines (1930 loc) · 127 KB
/
1-BPIPMDS.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% LIVECOMS ARTICLE TEMPLATE
%%% ADAPTED FROM ELIFE ARTICLE TEMPLATE (8/10/2017)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% PLEASE COMPILE USING LUALATEX.
%%%
%%% PREAMBLE
\documentclass[9pt,tutorial]{livecoms}
% Use the 'onehalfspacing' option for 1.5 line spacing
% Use the 'doublespacing' option for 2.0 line spacing
% Use the 'lineno' option for adding line numbers.
% Use the "ASAPversion' option following article acceptance to add the DOI and relevant dates to the document footer.
% Use the 'pubversion' option for adding the citation and publication information to the document footer, when the LiveCoMS issue is finalized.
% The 'bestpractices' option for indicates that this is a best practices guide.
% Omit the bestpractices option to remove the marking as a LiveCoMS paper.
% Please note that these options may affect formatting.
\usepackage[version=4]{mhchem}
\usepackage{siunitx}
\DeclareSIUnit\Molar{M}
\usepackage[italic]{mathastext}
\graphicspath{{figures/}}
\usepackage{upgreek}
\usepackage{subcaption}
\usepackage{todonotes}
\usepackage{natbib}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{pifont}
\usepackage{wasysym}
\usepackage{ulem}
\definecolor{color-3}{rgb}{1,0,0}
\newcommand{\checkref}[1]{\uline{\emph{{\color{LiveCoMSDarkBlue}#1}}}}
%\newcommand{\checkref}[1]{{\color{LiveCoMSDarkBlue}#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% IMPORTANT USER CONFIGURATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\versionnumber}{1.0} % you should update the minor version number in preprints and major version number of submissions.
\newcommand{\githubrepository}{\url{https://github.com/asmunder/BPIPMDS}} %this should be the main github repository for this article
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% ARTICLE SETUP
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{A Guide to Computing Interfacial Properties of Fluids from Molecular Simulations [Article v\versionnumber]}
\author[1*]{Erich A. M\"{u}ller}
\author[2*]{\AA{}smund Ervik}
\author[3*]{Andr{\'e}s Mej\'{i}a}
\affil[1]{Department of Chemical Engineering, Imperial College London, United Kingdom}
\affil[2]{Department of Gas Technology, SINTEF Energy Research, Trondheim, Norway}
\affil[3]{Departamento de Ingenier\'{i}a Qu\'{i}mica, Universidad de Concepci\'{o}n, Chile}
\corr{e.muller@imperial.ac.uk}{EAM} % Correspondence emails.
\corr{asmund.ervik@sintef.no}{\AA{}E}
\corr{amejia@udec.cl}{AM}
\orcid{Erich A. M\"{u}ller}{0000-0002-1513-6686}
\orcid{\AA{}smund Ervik}{0000-0003-1073-887X}
\orcid{Andres Mej\'{i}a}{0000-0001-7238-6633}
\blurb{This LiveCoMS document is maintained online on GitHub at \githubrepository; to provide feedback, suggestions, or help improve it, please visit the GitHub repository and participate via the issue tracker.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% PUBLICATION INFORMATION
%%% Fill out these parameters when available
%%% These are used when the "pubversion" option is invoked
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pubDOI{10.XXXX/YYYYYYY}
\pubvolume{<volume>}
\pubissue{<issue>}
\pubyear{<year>}
\articlenum{<number>}
\datereceived{Day Month Year}
\dateaccepted{Day Month Year}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% ARTICLE START
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{frontmatter}
\maketitle
\begin{abstract}
Molecular simulation is ideally suited to explore and describe the behavior of
inhomogeneous fluid mixtures as it allows a unique perspective into the physics
at the scale relevant to interfacial properties, filling the gaps between
experimental determinations and theoretical predictions. Although
rather common Molecular Dynamics and Monte Carlo
schemes are employed, the technical implementation and the post-processing of the results
are more challenging than for homogeneous fluids due to the spatial dependence
of the interfacial properties. This work is devoted to describing and recommending methods
for molecular-simulation computation of the most important interfacial properties
of pure fluids and fluid mixtures, \textit{i.e}., interfacial concentration of
species, the interfacial thickness, the surface activity or adsorption of
species, superficial enthalpy and entropy, wetting between phases and the
interfacial or surface tension on planar interfaces. Herein, a detailed description is given
of the steps required to perform classical molecular simulations including
setting up of the initial configuration, choice of cell dimensions, thermodynamic conditions
and ensemble, selection of the force field, simulation length, etc.
and a discussion of the required post-processing steps in order to
obtain interfacial properties. Additionally, general background and description
of the expected results of interfacial fluid properties are provided, and step-by-step examples
are included for the case of interfacial properties of pure fluids (carbon dioxide, decane)
and mixtures (carbon dioxide + decane).
\end{abstract}
\end{frontmatter}
\section{Introduction}
%Keep in mind, as you prepare your manuscript, that you should plan for a representative image which will be used to highlight your article on the journal website and publications. Usually, this would be one of your figures, but it must also be uploaded separately upon article submission. We give specific guidelines for this image on the journal website in the section on article submission (see \url{https://livecomsjournal.github.io/authors/policies/index.html#article-submission}).
The term "interfacial properties" refers to the fundamental thermophysical
properties that govern the behaviour of inhomogeneous fluids. The defining
attribute of these systems is the existence of a boundary or interface,
spanning only a few nanometers, but across which there are typically large
changes in the local conformation of the fluids. The presence of this boundary
region plays a central role in natural, environmental, and industrial
processes. The most representative of these interfacial properties are the
concentration profiles of the species across the interface, the actual extent
(thickness) of the interfacial region, the surface activity or adsorption of
species at the interface, the superficial enthalpy and entropy, the wetting
between phases, and last, but not least, the interfacial or surface tension.
Some of these properties can be directly measured (\textit{e.g}., interfacial
thickness, wetting and interfacial/surface tension) \citep{evans2006}
whereas others must be inferred from direct measurements, albeit
usually with a high level of accuracy.
Molecular theories for interfacial properties are well developed, usually based
on classical density functional theory \citep{hansen2013,evans2016,wu2006,evans1992,rowlinson1982}, including the van der Waals square gradient
theory \citep{davis1982,rowlinson1982}.
These theories have been shown to provide accurate results for both simple and
complex mixtures, and their results are directly compare to molecular simulations can also share the same molecular parameters,
\citep{mejia2014a,muller2009,mejia2005,muller2017,garrido2016a,cardenas2016}
but inevitably some mixtures need extraneous information regarding
interfacial properties to be effectively used as correlation tools.
On the other hand, molecular simulation is particularly well posed to study
physical phenomena at the fluid interfaces. In these scenarios, while the
perturbations caused by the fluid heterogeneities typically extend for several
nanometers, rarely do the correlations in the neighbouring bulk phase fluid
span distances larger than 50 nm. These are the system sizes which we are
comfortable simulating with commonly available modern computers (and
clearly this will only improve with time). This accessibility of the size and
length scales pertinent to fluid interfaces has spawned in the recent past decades a surge in studies
on the computational aspects of the interfacial
tensions of pure fluids and mixtures, including the effects of third players
(surfactants, nanoparticles, etc.)
The interfacial tension is typically not affected by the dynamics nor the prior
history of the system \footnote{The term "dynamic" interfacial tension
refers to the scenarios where the tension changes with the observation time.
These are not equilibrium conditions, but rather situations where the
properties of the interfacial region are continually evolving, typically due to
the slow mass transfer to/from the interfacial region of a third component,
\textit{e.g}., a surfactant. We will not be covering these aspects in this
manuscript. See for example \citet{dukhin1995}.}, \citep{rowlinson1982}, hence it is amenable to be computed on
the basis of an ensemble average of appropriate configurations. Both Molecular
Dynamics (MD) \citep{allen2017} and Monte Carlo (MC) \citep{frenkel2002} methods can be employed
with equal success to generate these configurations and this review makes
little distinction between both strategies, as the tensions are calculated
post-simulation by making suitable calculations on these configurations. MD has
been used more extensively than MC in recent years, as MD has benefitted from
advances in parallel computing and the use of graphical processing units \citep{faraday2014}.
The main advantage of classical molecular simulation (MS) for studying
interfacial fluids is the explicit representation of the molecules in an
environment which is commensurate with the dimension of the interfacial region
of fluids (${\simeq}$ 10 to 100 \AA{}). The interfacial regions are
characterized by sharp changes in densities and compositions, and these have to
be considered explicitly, hence the overall system sizes in terms of number of
particles can easily reach $O$(10$^{5}$), or even $O$(10$^{6}$) in cases with
surfactants or proteins, which is considerably more
than what is typical in single phase studies. Notwithstanding, the increasing
power of computers and the improvement in speed of the available MS packages
mean that evermore, this region of matter can be studied with increased
scrutiny. Starting with the seminal publications on MS of interfacial
properties from the middle of '70s \citep{liu1974}, several
authors have included in their manuscripts guidelines for obtaining meaningful
calculations. However, these guidelines are dispersed and sometimes differ from
author to author. The main goal of this manuscript is to provide a general,
self-contained and unified guide to perform a MS for calculating
interfacial properties of fluids using MD or MC. We do this by carrying out an
exemplary MS of an inhomogeneous fluid detailing the advice with regards to the
set-up, running and data analysis. In this work, we are focused on MS for
computing interfacial properties of pure fluids and fluid mixtures in
vapor-liquid equilibrium with planar interfaces.
The practices and methodologies described in this work can be applied for
the cases of other planar fluid interfaces arising in liquid-liquid \citep{algaba2020,muller2014b,herdes2018,chen2018,papavasileiou2018} and vapor-liquid-liquid
equilibria \citep{muller2014b,alonso2020,stephan2020b}. For the case of curved interfaces, the reader is redirected to Refs. \citep{rowlinson1982,sampayo2010,malijevsky2012,wilhelmsen2015,min2019}.
\section{Prerequisites}
\subsection{Recommended Reading}
In addition to the recommendations, highlights and other issues concerning the
prediction of interfacial properties are described in this document; we
recommend the following textbooks and selected reviews and regular articles in
this field.
\begin{itemize}
\item Allen and Tildesley, \textit{Computer simulation of liquids}, 2$^{\mathrm{ed}}$. pages 84\textendash{}89 and Chap. 14. \citep{allen2017}
In this new edition of a classical textbook, the authors have included a chapter devoted to summarizing the most important aspects of carrying out MD and MC for inhomogeneous systems.
\item Gray, Gubbins, and Joslin, \textit{Theory of molecular fluids: Vol. 2: Applications}, Chap. 8. \citep{gray2011}
This book lucidly presents the principal elements of the statistical mechanics involved in the prediction of interfacial properties from MS, such as the Kirkwood pressure tensor and Test Area method.
\item Ghoufi et al., \textit{Computer modelling of the surface tension of the gas-liquid and liquid-liquid interface.} \citep{ghoufi2016}
In this recent review the interfacial tension and related properties are calculated by using different methodologies using both MC and MD. A significant number of key references as well as previous reviews are listed within.
\item Holcomb et al., \textit{A critical study of the simulation of the liquid-vapour
interface of a Lennard-Jones fluid.} \citep{holcomb1993}
This is a
seminal paper where the implementation and use of Kirkwood pressure
tensor to calculate interfacial tension is described. Still relevant today,
this work summarizes some important issues concerning to the impact of the
initial condition on the results from Kirkwood pressure tensor.
\item Gloor et al., \textit{Test-area simulation method for the direct determination of the interfacial tension of systems with continuous or discontinuous potentials.} \citep{gloor2005}
This manuscript presented an alternative methodology to compute interfacial tension from perturbation theory rather than the more commonly used Kirkwood pressure tensor.
\item Zhang et al., \textit{Computer simulation of liquid/liquid interfaces. I. Theory and application to octane/water.} \citep{zhang1995}
This work enumerates and comments on the several types of molecular ensembles available to carry out MS of interfacial tensions.
\item Ervik et al. \citep{ervik2017} and Sega et al. \citep{sega2018}
These works provide details and frameworks to carry out MD of fluid systems with interfaces, including post-processing, using Python codes.
\item Additionally, references \citep{walton1983,chapela1977,trokhymchuk1999,mecke1997,mecke1999,duque2004,errington2007,stephan2019} are a few
selected articles where the calculation of interfacial density (or
concentration) and interfacial tension for pure fluids and fluid mixtures are
described with emphasis on either methodology or reference fluid results.
\item Finally, the reader is directed towards several publications that describe in detail the general aspects of molecular simulation:
\begin{itemize}
\item Braun et al., \textit{Best Practices for Foundations in Molecular Simulations} \citep{braun2018b}
\item Bopp et al., \textit{The Hitchhiker’s Guide to Molecular Dynamics} \citep{bopp2018}
\item Grossfield et al., \textit{Best Practices for Quantification of Uncertainty and Sampling Quality in Molecular Simulations} \citep{grossfield2018}.
\end{itemize}
\end{itemize}
\subsection{Software}
There is
a spectrum of molecular simulation packages to
carry out molecular simulations of inhomogeneous fluids,
ranging from commercial and academic
versions to homemade codes. Most of them have a built-in subroutine to
calculate the density or concentration along the interfacial region but rarely
is there built-in provision to calculate interfacial/surface tension. This
interfacial property should be calculated by modifying the original code or
computed in a post-processing step as will be described later. Table
\ref{tab:1} summarizes some examples of the molecular simulation packages frequently
employed in academia for describing interfacial properties of fluids. In
general terms, MD software is available in parallelized versions, capable of
running on multiple CPUs (and/or multiple GPUs) whereas MC software is normally
only available in serial versions. The corresponding websites of these
simulation packages typically include the user manual, some examples of the input
files and output files as well as some benchmarks. The reader is redirected to
Ref. \citep{wiki} for a general classification of MS software.
\begin{table}[hb]
\caption{Summary of selected software to perform molecular simulations
of inhomogeneous fluids. Checks (crosses) indicate the availability
(unavailability) of provisions to output the density profile ${\rho}(z)$,
interfacial tension $\gamma$, the ensemble average of the pressure tensor
${\langle}P_{kk}{\rangle}$ and/or the ensemble average of the
pressure tensor in each slab along the $z$ coordinate
${\langle}P_{kk}$ ($z$)${\rangle}$.}
\label{tab:1}
\begin{tabularx}{\textwidth}{
p{\dimexpr 0.23\linewidth-2\tabcolsep}
p{\dimexpr 0.22\linewidth-2\tabcolsep}
p{\dimexpr 0.08\linewidth-2\tabcolsep}
p{\dimexpr 0.13\linewidth-2\tabcolsep}
p{\dimexpr 0.08\linewidth-2\tabcolsep}
p{\dimexpr 0.10\linewidth-2\tabcolsep}
p{\dimexpr 0.14\linewidth-2\tabcolsep}}
\centering\arraybackslash{}Software & \centering\arraybackslash{}Language & \centering\arraybackslash{}MS & \centering\arraybackslash{}${\rho}$ (z) & \centering\arraybackslash{}${\gamma}$ & \centering\arraybackslash{}${\langle}$P$_{kk}{\rangle}$ & \centering\arraybackslash{}${\langle}$P$_{kk}$(z)${\rangle}$ \\
\midrule
\href{https://www.scd.stfc.ac.uk/Pages/DL_POLY.aspx}{DL\_POLY} & Fortran & MD & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{56} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{56} \\
\href{http://www.gromacs.org}{GROMACS} & C++ & MD & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{56} \\
\href{http://glotzerlab.engin.umich.edu/hoomd-blue/}{HOOMD} & C++ & MD & \centering\arraybackslash{}\ding{56} & \centering\arraybackslash{}\ding{56} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{56} \\
\href{https://lammps.sandia.gov}{LAMMPS} & C & MD & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{52} \\
\href{http://www.ks.uiuc.edu/Research/namd/}{NAMD} & C++ & MD & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{56} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{56} \\
\href{http://pagesperso.lcp.u-psud.fr/rousseau/gibbs.html}{Gibbs}\footnotemark & Fortran & MC & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{52} & \centering\arraybackslash{}\ding{52} \\
\end{tabularx}
\end{table}
\footnotetext{The Gibbs program is commercially available as part of the Materials Design software suite \url{https://www.materialsdesign.com}}
The selection of a simulation package is to some extent a personal decision,
influenced by the general environment (\textit{i.e.}, available support ) and
familiarity. For most simulations described here, the programs have been
tested, validated and debugged as it is described on the corresponding websites of the softwares
and the references therein (see however Sec. \ref{sec:bugs}). For research
applications it is well advisable to select a program written in a language
which is familiar to the user, as most likely some level of modification will eventually
be needed. In this regard, and with no prejudice, DL\_POLY is an exemplary
choice as its codes are written in a clear, modular, style providing for
a reasonably straightforward way to implement additional subroutines. Speed of
execution is also an important consideration, and there can be significant
differences between the different compiled programs. In addition to calculation
software, MS typically uses extra programs for three purposes: to setup initial configurations
(\textit{i.e}., molecular editor), to plot resulting tabular data like such as
time evolution of temperature and pressure, and to visualize
spatial configurations and their temporal evolution. Some selected examples are
the Avogadro \citep{avogadro}, xmgrace \citep{xmgrace},
VMD \citep{VMD}, Ovito \citep{ovito}, and PyMOL \citep{pymol} softwares.
Avogadro is a molecular editor and visualizer which can
be used to build initial configurations or to read molecular configurations in
a myriad of styles, including the NIST webbook \citep{lemmon2013}. xmgrace is a 2D graphic software with high capability to
easily read, manipulate data, compute preliminary results and plot the output
files from MS. VMD, Ovito and PyMol are 3D visualization programs useful to
produce snapshots of spatial configurations and to visualize their temporal
evolution. VMD, Ovito and PyMol can read numerous different file formats which
making them very versatile. They also include some plugins to
carry out some simpler calculations, such as computing and plotting density profiles. VMD and Ovito
are free of charge software, whereas PyMol is a commercial software and
requires an annual fee.
This guide discusses the background and details of molecular simulation for computing interfacial properties over the next six sections. A checklist for performing simulations is given in Appendix \ref{checklist}.
%Here you would identify prerequisites/background knowledge that are assumed by your work and your checklist which you view as critical, ideally giving links to good sources on these topics.
%Checklists are normally focused on errors made by users with training and experience in molecular simulations, so you can assume a basic familiarity with the fundamentals of molecular simulations.
\section{General description and main equations to compute interfacial properties of fluids.}
The properties in the interfacial region are characterized by their spatial
dependence. In molecular simulations, the interfacial region is generally
described as a function of a unidimensional coordinate. For the case of planar
interfaces, the selected coordinate is $z$ which is perpendicular to the
interfacial area, here $xy$. For the case of spherical interfaces, such
as drops or bubbles, the interfacial region is generally described as
a function of a radius.
In this section, we enumerate the most common interfacial properties and the
expressions for the planar interfaces case. For a complete description of
these expressions, the reader is redirected to Refs. \citep{allen2017,gray2011}.
\subsection{Density Profiles}
Fig. \ref{fig:1} illustrates a typical density profile, ${\rho}$ ($z$), in the
$z$ direction (perpendicular to the interface plane) for a pure fluid
in a state of vapor-liquid equilibrium. A characteristic feature is the
constant density in the bulk regions of the liquid (L) and vapor (V)
(\textit{i.e}., ${\rho}$ = ${\rho}^{\mathrm{L}}$ or ${\rho}^{\mathrm{V}}$),
and sharp, but continuous, changes along the interfacial regions.
\begin{figure}
\centering
\includegraphics[width=0.4\textwidth]{gfx/image1.png}
\caption{Density profile, ${\rho}$ (black line) against the position coordinate perpendicular to the interface ($z$) for a pure liquid CO$_{2}$ in equilibrium with its vapor at 240 K. Overlaid is a snapshot of the detail of a simulation of a liquid-vapor interface.}
\label{fig:1}
\end{figure}
For the case of mixtures, the interfacial concentration of each component can
exhibit different patterns than those shown in Fig. \ref{fig:1}, where a simple
monotonous drift is seen in the concentration profile from a higher to a lower
density. Two other possible cases are schematically shown in Figs.
\ref{fig:2} (a) and (b). Fig. \ref{fig:2} (c) illustrates a typical example of a binary mixture
(\textit{e.g}., CO$_{2}$ + C$_{10}$H$_{22}$ at 344.15 K) where the fluid with
lower interfacial tension shows adsorption (\textit{e.g}., CO$_{2}$)
\begin{figure}
\centering
\begin{subfigure}{0.2\textwidth} % width of left subfigure
\includegraphics[width=1\textwidth]{gfx/image2.png}
\caption{positive surface activity (adsorption)} % subcaption
\end{subfigure}
\hspace{1em} % here you can insert horizontal or vertical space
\begin{subfigure}{0.2\textwidth} % width of right subfigure
\includegraphics[width=1\textwidth]{gfx/image3.png}
\caption{negative surface activity (desorption)} % subcaption
\end{subfigure}
\begin{subfigure}{0.4\textwidth} % width of right subfigure
\includegraphics[width=1\textwidth]{gfx/image4.png}
\caption{CO$_{2}$ + C$_{10}$H$_{22}$ mixture} % subcaption
\end{subfigure}
\caption{Concentration profiles in mixtures. (a) Schematic representation of positive surface activity (adsorption); (b) Schematic representation negative surface activity (desorption); (c) Density profile for the CO$_{2}$ + C$_{10}$H$_{22}$ mixture at 344.15 K and 2.39 MPa (cf. Example 2).} % caption for whole figure
\label{fig:2}
\end{figure}
In Fig. \ref{fig:2} (a) and (b), the concentration profile displays a stationary point,
which is a maximum (point A) or a minimum (point D) of the concentration with
respect to position. Both points reflect what is referred to as \textit{surface
activity}. In general terms, surface activity refers to the accumulation (may
it be positive or negative) of a species $i$ at the interface region and
is characterized by the condition, d${\rho}_{\mathrm{i}}$/dz = 0. The
positive surface activity reflects absolute adsorption of species along the
interface region and is reflected in a negative second derivative,
d$^{2}{\rho}_{\mathrm{i}}$/dz$^{2}$ {\textless} 0. Conversely, the negative
surface activity denotes depletion of a species along the interface region, and
its condition is given by d$^{2}{\rho}_{\mathrm{i}}$ /dz$^{2}$
{\textgreater} 0. As can be appreciated, a finite surface activity implies that
the species reach higher (adsorption) or lower (desorption) concentrations than
those seen in the bulk phases.
In mixtures, the most common concentration profiles of species display no
surface activity (component with high surface tension) or positive surface
activity (component with low surface tension) \citep{stephan2020}. Concentration profiles of
species with negative surface activity have never been observed in experiments,
but are predicted by some theories e.g. for mixtures with
molar isopycnicity (or molar density) inversion \citep{garrido2016b} and for aqueous solutions of
alcohols in liquid-liquid equilibria \citep{algaba2020}.
Surface activity will be described later by using
the traditional Gibbs adsorption theory. Additionally, Fig. \ref{fig:2} (c) shows the
concentration profiles for the case of the CO$_{2}$ + C$_{10}$H$_{22}$ mixture.
In this case, the CO$_{2}$ exhibits adsorption, where the interfacial
concentration of CO$_{2}$ is higher in the interfacial zone than bulk
concentration. This behavior is common in mixtures for the component that
exhibits the lower interfacial tension.
In addition to the average density profiles previously described, the
interfacial region is characterized by intrinsic density profiles caused by
capillary wave fluctuations, which provide a route to carry out the detailed
analysis of the interfacial structure. For a complete description and
methodological approach, the reader is redirected to Bresme et al. \citep{bresme2008a,bresme2008b}.
Since those works and references therein provide a thorough coverage of
fluctuating interfaces, this work will not discuss the topic in further detail.
\subsection{Interfacial Tensions}
The interfacial (or surface) tension, $\gamma$, is arguably the best known and
most widely studied of the interfacial properties. Strictly speaking, the term
interfacial tension applies in any situation where two regions in space with
different composition and/or state are separated by a clearly defined interface
(\textit{e.g.} solid/fluid, solid/solid, fluid/fluid). Many authors let
interfacial tension refer specifically to liquid-liquid
interfaces, and let surface tension refer to gas-liquid interfaces that may be
a liquid in contact with its own vapor phase, or with a general gas such as air.
In the context of this manuscript, the methods and discussion are more general,
and so we do not make this distinction but use the terms interchangeably.
In MS, the interfacial (or surface) tension of pure fluids and
fluid mixtures can be typically calculated from two different approaches,
namely a) the mechanical or pressure approach and b) the thermodynamic or
perturbation approach.
For an inhomogeneous fluid, the pressure is a second-order tensor \textbf{P},
where each component $P_{ij}$ gives the force per unit area in the
$j$-direction on a surface pointing in the $i$-direction. The
axial symmetry about the $z$-axis (normal to the interface) and
translational symmetry in the $xy$-plane imply that all the off-diagonal
components are zero, thus there are only two independent, non-zero components:
$P_{xx} = P_{yy} = P_T$, the tangential pressure (which changes along the
interfacial region in the $z$ direction); and the normal, or bulk
pressure $P_{N} = P_{zz} = P$ which remains constant
throughout the system, guaranteeing mechanical equilibrium. In the
pressure approach, the interfacial (or surface) tension, $\gamma$, is given by the
Hulshof integral \citep{hulshof1901}, which
is based on evaluating the inhomogeneity of the pressure tensor:
\begin{equation}
\gamma=\int_{-\infty}^{+\infty}\left[P_{N}-P_{T}\right]dz
\label{eq:hulshof}
\end{equation}
An alternative, but equally rigorous approach, recognizes that the interfacial
(or surface) tension may be expressed statistically as the difference in free energy for
systems in closely related macrostates with different interfacial areas. In
this so-called thermodynamic approach, $\gamma$ is calculated from the
following expression \citep{gray2011,gloor2005,errington2007}:
\begin{equation}
\gamma=\left(\frac{\partial F}{\partial A}\right)_{N_{i},T,V}
\label{eq:2}
\end{equation}
Where $F$ is the Helmholtz free energy of the system\footnote{
Most commonly in the engineering literature the Helmholtz free energy is symbolized by the
letter "$A$". However, in the context of this manuscript this would lead
to a confusion between this quantity and the surface area, which we label herein as
"$A$".}. The derivative is calculated by performing an (almost)
infinitesimal perturbation in the interfacial area $A$ at canonical conditions
(keeping the compositions, volume $V$ and temperature $T$ of the
system constant). The details of the implementation of these methods is the
subject of Sec.~\ref{sec:simdetails}.
Fig. \ref{fig:3} illustrates some examples of the experimentally observed behaviour of
$\gamma$ in pure fluids and fluid mixtures. For the case of pure fluids and
zeotropic fluid mixtures in vapor-liquid equilibrium (the most common
scenarios), {${\gamma}$} decreases as temperature or pressure increases.
A similar monotonous decay can be observed with changing compositions. For the
case of azeotropic [(${\partial}$P/${\partial}$x$_{\mathrm{i}}$) = 0 or
(${\partial}$T/${\partial}$x$_{\mathrm{i}}$) = 0] or aneotropic
[(${\partial}${${\gamma}$} /${\partial}$x$_{\mathrm{i}}$) = 0] fluid mixtures,
{${\gamma}$} exhibits a stationary point [(${\partial}${${\gamma}$}
/${\partial}$x$_{\mathrm{i}}$) = 0; (${\partial}${${\gamma}$}/${\partial}$P)
= 0; (${\partial}${${\gamma}$}/${\partial}$T) = 0]. These stationary points
reflect a change of the surface activity of species $i$. These are
infrequently encountered systems and conditions, normally associated with
certain pathological types of liquid-liquid equilibria, where {${\gamma}$} shows a parabolic
behaviour with temperature or pressure.
\begin{figure}
\centering
\includegraphics[width=0.4\textwidth]{gfx/image7.png}
\caption{Schematic examples of the possible behaviour of the interfacial (or surface) tension ({${\gamma}$}) with temperature ($T$), pressure ($P$) or mole fraction ($x$) in either vapor-liquid, or liquid-liquid equilibria. $An$ refers to aneotropic points, $Az$ refers to azeotropic points.}
\label{fig:3}
\end{figure}
A third class of methods is based on the
concepts of finite-size scaling within the grand canonical ensemble
\citep{binder1982,errington2003}. Essentially, umbrella
sampling is used to fully sample the relevant range of values for the number of
particles $N$ present in the grand canonical system, thus providing a free-energy
density profile (which is directly related to the density profile) from where
the interfacial density may be derived. The method is particularly suitable in the vicinity of
the critical region where other methods are cumbersome to apply, but its
implementation \cite{allen2017,schrader2009} will not be discussed
herein.
\subsection{Derivative interfacial properties}
The density (or concentration) profiles along the interfacial region,
${\rho}_{i}$ ($z$), and the interfacial (or surface) tension,
{${\gamma}$}, are by far the most reported of the thermophysical properties of
fluid interfaces. Aside from their own inherent value, these properties provide
a route to calculate others descriptors of the interface such as the
interfacial thickness, {${\delta}$}, the relative Gibbs adsorption isotherm,
${\Gamma}_{ij}$, the change of surface entropy
, $s^{{\gamma}}$, and surface enthalpy
, $h^{{\gamma}}$, and the critical temperature of pure
fluids, $T_{c}$, as we describe below.
\subsubsection{The interfacial thickness}
The interfacial thickness $\delta$ is defined as the width of the region where observable properties such as
density change with the spatial coordinate. The range of the interfacial
thickness typically oscillates between 10 to 200 \AA{} at subcritical conditions and has
an exponential increase with temperature. As the system tends to the critical
state, the width diverges, {${\delta}$} ${\rightarrow}{\infty}$. Clearly, as
the continuous nature of the density (composition) variation precludes any
unique definition of where the bulk region ends and where the interface itself
dominates, some arbitrary criterion must be invoked. A popular choice is the so-called
10/90 criteria. Within this definition, {${\delta}$} represents the
$z$ range where the density profile changes from
${\rho}^{\mathrm{{\upalpha}}} + 0.1({\rho}^{\mathrm{{\upbeta}}}
- {\rho}^{\mathrm{{\upalpha}}}$) to
${\rho}^{\mathrm{{\upalpha}}} + 0.9 ({\rho}^{\mathrm{{\upbeta}}}
- {\rho}^{\mathrm{{\upalpha}}}$), where
${\rho}^{\mathrm{{\upalpha}}}$ and ${\rho}^{\mathrm{{\upbeta}}}$ are the bulk
densities in the {${\alpha}$} and {${\beta}$} phases, respectively.
For the case of pure fluid, {${\delta}$} can be calculated by fitting the following expression to the density profile\citep{evans1992,rowlinson1982}:
\begin{equation}
\rho\left(z\right)=\frac{1}{2}\left(\rho^{\alpha}+\rho^{\beta}\right)-\frac{1}{2}\left(\rho^{\alpha}-\rho^{\beta}\right)tanh\left[\frac{\theta\left(z-z_{0}\right)}{\delta}\right]
\label{eq:3}
\end{equation}
where $\rho^\alpha$ and $\rho^\beta$ are the densities of the bulk phases with
$\rho^\alpha > \rho^\beta$; $z_{0}$ is a reference coordinate, which is usually taken as the
mean interface or the position of the Gibbs dividing surface (see next
section) and {${\uptheta}$} = 2 tanh$^{-1}$ 0.8 = 2.19722; this latter value
chosen so that {${\delta}$} can be defined as the 10/90 interfacial thickness.
The use of the $\tanh$ (or equivalent fitting function such as $\mathrm{erf}$) suggests
that one could express the adsorption (or depletion) of a species as the
difference between the pointwise composition (or density) and that of the bulk
regions, as will be described in the next sections.
\subsubsection{The relative Gibbs adsorption isotherm}
The relative Gibbs adsorption isotherm of a species $i$
relative to a species $j$ (${\Gamma}_{ij}$ ) can be thus defined in
terms of ${\rho}_{i}$ ($z$) by the following integral
equation \citep{rowlinson1982}:
\begin{equation}
\varGamma_{ij}=\int_{-\infty}^{z_{0}^{j}}\left[\rho_{i}\left(z\right)-\rho{}_{i}^{\alpha}\right]dz+\int_{z_{0}^{j}}^{+\infty}\left[\rho_{i}\left(z\right)-\rho{}_{i}^{\beta}\right]dz
\label{eq:4}
\end{equation}
In Eq. \ref{eq:4}, $z_{0}^{\mathrm{j}}$ is the transition point between the two bulk
phases and corresponds to the position of the Gibbs dividing surface relative
to a species $j$. $z_{0}^{\mathrm{j}}$ is calculated from Eq. \ref{eq:4}
considering that species $j$ does not have adsorption along the
interfacial region, \textit{i.e}., $z_{0}^{\mathrm{j}}$ is solved for the
case that ${\Gamma}_{jj}$ = 0. Mathematically, $z_{0}^{\mathrm{j}}$ is
given by the expression:
\begin{equation}
z_{o}^{j}=\frac{\int_{-\infty}^{+\infty}\rho_{j}\left(z\right)dz}{\rho_{j}^{\alpha}-\rho_{j}^{\beta}}
\end{equation}
\begin{figure}
\includegraphics[width=0.5\textwidth]{gfx/image11.png}
\caption{(a) Schematic position of the Gibbs dividing surface $z^{j}_{0 }$calculated by selecting the point of no adsorption, ${\Gamma}_{jj}$ = 0, where the areas above and below the density profile cancel out. (b) For other components $i$ in the mixture, this Gibbs dividing surface suggests the adsorption of a species $i,{\Gamma}_{ij}$ {\textgreater} 0.}
\label{fig:4}
\end{figure}
Fig. \ref{fig:4} (a) illustrates this construction, which essentially maps the areas
between the smooth density profile and a hypothetical infinitely steep (and
thin) interface in such a way that the dividing surface corresponds to the
average interface. If there is more than one component in the system, the
Gibbs dividing surface for component $j$ does not need to correspond
a point of average null adsorption for other components. As seen in Fig. \ref{fig:4} (b),
another component $i$ in the mixture may display adsorption at the
interface relative to a species $j.$
Alternatively, $\Gamma_{ij}$ can be calculated from the expression proposed by Telo da Gama and Evans\citep{telo1983}:
\begin{equation}
\Gamma_{ij}=-\left(\rho_{i}^{\beta}-\rho_{i}^{\alpha}\right)\int_{-\infty}^{+\infty}\left\{ \frac{\rho_{j}\left(z\right)-\rho{}_{j}^{\beta}}{\rho_{j}^{\beta}-\rho_{j}^{\alpha}}-\frac{\rho_{i}\left(z\right)-\rho_{i}^{\beta}}{\rho_{i}^{\beta}-\rho_{i}^{\alpha}}\right\} dz
\end{equation}
\subsubsection{The surface entropy and surface enthalpy}
The entropy ($s^{\gamma}$) change of surface formation can be deduced from the
Gibbs-Duhem expression for interfaces and the homogeneous first-order function
of the interfacial tension ($\gamma$). Mathematically, the Gibbs-Duhem expression for
interfaces is given by \citep{rowlinson1982,defay1966}:
\begin{equation}
-d\gamma=s^{\gamma}dT-\tau^{\gamma}dP^{\gamma}+\sum_{k=1}^{c}\Gamma_{k}^{\gamma}d\mu_{k}^{\gamma}
\label{eq:gamma-1}
\end{equation}
where $T$ is the temperature, $t$ is the thickness of the surface, the superscript $\gamma$ denotes interfaces, $P$ is the pressure, $c$ number of components, $\Gamma_k$ and $\mu_k$ are the surface concentration and the chemical potential, respectively, for species $k$.
The interfacial tension, $\gamma$, can be also expressed as a homogeneous first-order function of the extensive parameters ($T, P, \mu_k$) \citep{rowlinson1982,defay1966}:
\begin{equation}
d\gamma=\left(\frac{\partial\gamma}{\partial T}\right)_{P,\mu_{k}}dT+\left(\frac{\partial\gamma}{\partial P}\right)_{T,\mu_{k}}dP+\sum_{k=1}^{c}\left(\frac{\partial\gamma}{\partial\mu_{k}}\right)_{T,P}d\mu_{k}
\label{eq:gamma-2}
\end{equation}
From Eq. \ref{eq:gamma-1} and \ref{eq:gamma-2}, $s^{\gamma}$ is calculated from the following expression:
\begin{equation}
s^{\gamma}=-\left(\frac{\partial\gamma}{\partial T}\right)_{P,\mu_{k}}
\label{eq:6}
\end{equation}
The enthalpy ($h^{\gamma}$) change of surface formation can be obtained from the fundamental equation of internal energy ($u$) with interfaces and its Euler associate expression. Mathematically, the fundamental equation is given by \citep{rowlinson1982,defay1966}:
\begin{equation}
du^{\gamma}=Tds^{\gamma}-P^{\gamma}d\tau^{\gamma}+\gamma+\sum_{k=1}^{c}\mu_{k}^{\gamma}d\Gamma_{k}^{\gamma}
\label{eq:fundamental}
\end{equation}
From Eq. \ref{eq:fundamental}, the enthalpy ($h^{\gamma}$) change of surface formation can be calculated as:
\begin{equation}
h^{\gamma}=\gamma+Ts^{\gamma}
\label{eq:7}
\end{equation}
These quantities cannot be directly measured, but are inferred from surface tension isotherms.
\subsubsection{Critical temperature of a pure fluid}
Although not strictly an interfacial property, the value of the critical
temperature of a pure fluid$, T_{c, }$can be conveniently estimated by
extrapolating the thermal evolution of the interfacial tension (${\gamma}$
\textendash{} $T$) and employing scaling laws. For the
case of ${\gamma}$, the following expression holds \citep{rowlinson1982}
\begin{equation}
\gamma=\gamma_{0}\left(1-\frac{T}{T_{c}}\right)^{1.26}
\label{eq:8}
\end{equation}
where ${\gamma}_{0}$ and $T_{c}$ are treated as unknown constants,
and their values are found by fitting the interfacial tension data with
temperature. The exponent in Eq. \ref{eq:8} corresponds to the Ising universality
value, which is applicable to real fluids. There is however no guarantee that it
can be applied to any general molecular force field.
\section{Initial setup of the simulation}
\label{sec:setup}
\subsection{Shape of the simulation cell}
The system sizes for the MS of interfacial systems are necessarily larger than
their pure phase counterparts (or the vapor-liquid equilibrium if one considers
Gibbs Ensemble MC simulations), as one must simultaneously track two bulk phases and two
interfacial regions at the same time. In order to guarantee the simultaneous
formation of two bulk phases (\textit{e.g}., vapor and liquid or liquid and
liquid) and the interfacial region, it is customary to use a rectangular
parallelepiped simulation cell, where one Cartesian direction is larger than
the other two. By employing this geometry, one forces the appearance of slabs
of liquid and vapor ( or liquid 2 ) sandwiched side by side. The system will
spontaneously form the interfaces spanning the minimal area, parallel to the
$xy$ plane. The volume of the simulation box, $V$, is given by
$L_{x}L_{y}L_{z}$, where $L_{x}$
= $L_{y}$ and $L_{z}$ {\textgreater}{\textgreater}
$L_{x}$. Due to the periodic boundary conditions, each bulk phase is
bounded by two independent interfaces. The periodic boundary conditions in $xy$ directions
allow for conditions representative of essentially infinite interfaces. The use of
small systems and/or cubic geometries risks the formation of bubbles/drops or
similar bridges between clusters of molecules and their periodic
images\footnote{In some cases, this may actually be the desired outcome.
For example in the study of the interfacial tension of drops and bubbles,
relatively large cubic boxes are employed, where a drop/bubble forms
far away from its periodic images. See for example \citep{lau2015}}.
Standard practice is to make the box large (and elongated), and several authors
have studied in detail \citep{gonzalez2005,orea2005,janecek2009} the minimum dimensions for the simulation box.
For the case of a parallelepiped cell ($L_x \times L_y \times L_z; L_z > L_x,
L_y)$, the interfacial area ($L_x \times L_y$) needs to be at least such that $L_x = L_y > 10$ times the
molecular diameter (or bead diameter). This is to avoid oscillatory behavior of vapor
pressure and surface tension due to finite size effects. $L_z$, in turn, needs to be 3 to 10
times $L_x, L_y$. These values are chosen with the purpose to accommodate enough
molecules to ensure sensible-sized bulk phases and the corresponding two
interfacial regions. In general terms, this route to define the cell dimensions
are adequate for several types of pure fluid and fluid mixtures. However, for
the case of long-chain molecules, it is advised to replace the bead size by the
radius of gyration. The latter selection avoids the issue of molecules
interacting with themselves.
\subsection{Initial setup of the simulation cell}
To perform the inhomogeneous simulation, one must place in the simulation cell
both phases in intimate contact. A na\"{i}ve and impractical way is to
pre-equilibrate the coexisting phases at the approximate conditions of
temperature, density and composition and build a composite box by joining both
pre-equilibrated boxes. Although possible, this strategy is not trivial to
implement, in particular when dealing with complex molecules, as the periodic
boundary conditions must be unravelled and the interface region is prone to
have overlaps between the cojoined boxes. There are two practical ways around
this problem, the volume expansion or the temperature quench methods.
\begin{figure}[h]
\centering
\begin{subfigure}{0.14\textwidth} % width of left subfigure
\includegraphics[width=\textwidth]{gfx/image16.png}
\caption{Initial configuration} % subcaption
\end{subfigure}
\hspace{5pt}
\begin{subfigure}{0.31\textwidth} % width of left subfigure
\includegraphics[width=\textwidth]{gfx/image17.png}
\caption{Volume quench}
\end{subfigure}
\begin{subfigure}{0.45\textwidth} % width of left subfigure
\includegraphics[width=\textwidth]{gfx/image18.png}
\caption{Final configuration}
\end{subfigure}
\caption{Initial configurations for the volume expansion method. (a) An initial
cubic simulation box is set up with the density close to that of the expected
liquid phase. Molecules may be in a lattice position, randomly placed or can be
the output of an equilibrated pure fluid simulation. (b) The simulation box is
expanded in the z direction, leaving empty spaces on both sides. (c) Upon
further equilibration, some of the liquid phase molecules will evaporate,
filling the void space until the vapor pressure is attained.}
\label{fig:5}
\end{figure}
In the volume expansion ( or volume quench \citep{holcomb1993} ) case,
an initial ensemble of molecules is placed, usually in a cubic periodic box,
in a lattice configuration or randomly distributed within the simulation cell.
The dimension of the simulation box can be set by specifying the number of
molecules desired (see below) and the expected liquid density, whose value can
be obtained from experimental data, molecular-based EoS, or other simulations
using the same force field. Once the system
equilibrates to the required temperature, two empty boxes are included at both
z-sides, making the final dimension box equal to $L_{x}
\times L_{x} \times$(3 to 10)$L_{x}$. This procedure is illustrated in Fig. \ref{fig:5}.
A further equilibration will
allow some of the liquid molecules to evaporate and fill the void regions until
the equilibrium vapor pressure is attained. This technique is particularly
suited for the case of vapor-liquid equilibria of single site molecules
(spheres) at low temperatures.
\vspace{15pt}
\begin{mdframed}[linewidth=0pt,backgroundcolor=LiveCoMSLightBlue!8,fontcolor=LiveCoMSDarkBlue!80!black]
\textbf{EXAMPLE 1:} \textbf{\textit{Selection of simulation box size and number of particles for a volume expansion.}}
As an example, let us consider the MS for pure CO$_{2}$ at 240 K in the liquid
state. For this case, CO$_{2}$ will be represented by a single sphere (Mie
potential) of diameter of {${\upsigma}$} = 3.741 \AA{} \citep{avendano2011}. We take a total of 3200 spheres
and using the expected liquid density, ${\rho}$ = 24.742 mol/L \citep{lemmon2013}:
\begin{eqnarray}
V & = & \frac{\left(3200\,\textrm{particles}\right)\left(10^{10}\right)^{3}\left(\frac{\textrm{Å}}{m}\right)^{3}}{24.742\left(\frac{mol}{L}\right)\left(N_{av}\right)\left(\frac{\textrm{molecules}}{mol}\right)\left(1000\right)\left(\frac{L}{m^{3}}\right)}\nonumber\\
& = & 214770\textrm{Å}^{3}
\end{eqnarray}
where N$_{\mathrm{av}}$ = 6.022 . 10$^{23}$ is Avogadro's constant. Using the
value of the expected volume and a cubic cell, its vertex will be
$L_x = \sqrt[3]{V} = $ 59.886 \AA{}, which is larger than 10 $\sigma$ (37.41
\AA{}).
\end{mdframed}
There are many instances where the volume expansion technique is not practical,
notably liquid-liquid equilibria, systems with high vapor pressures (where
a significant portion of the liquid will need to evaporate), mixtures with
large number of components, etc. An alternative is to design the simulation
cell from the onset as a rectangular parallelepiped with
$L_{x} \times L_{x} \times$(3 to 10)$L_{x}$. In order to define the
$L_{x}$ dimension, an average \textit{global} density of the fluid is
used. As an example, for the case of liquid-vapor system, the initial density
average is ${\rho}$ = (${\rho}^{\mathrm{V}}$
+ ${\rho}^{\mathrm{L}}$)/2\textit{.} Using this value of density and the
number of molecules, $M$, it is possible to calculate the total volume,
$V$ ($V$ = $M/\rho$) and $L_{x}$
= ($V$/(3 to 10))$^{\mathrm{1/3}}$. This initial configuration is
simulated at high temperature (above the critical state) to homogenize the
system. After a few steps (\textit{e.g}., 50 000 steps), the temperature of the
simulation is abruptly scaled to the final temperature (hence the name of
temperature quench \citep{martinez2005}). If the initial
density is chosen appropriately, the system is left in a state of mechanical
instability and separates into coexisting equilibrium phases, equilibrating by
diffusion, as shown in Fig. \ref{fig:6b}.
\begin{figure}
\includegraphics[width=0.5\textwidth]{gfx/image19.png}
\caption{Preparation of the initial box. In the temperature quench strategy, one starts with a system with overall initial density and temperature such that the system is in a one phase mixed state (point A). Upon a rapid decrease in temperature, the system becomes trapped in a metastable state (B) where it spontaneously separates into two distinct phases ( V \& L ). }
\label{fig:6b}
\end{figure}
%\begin{figure}
% \centering
% \begin{subfigure}{0.3\textwidth} % width of left subfigure
% \includegraphics[width=1\textwidth]{gfx/image20.png}
% \end{subfigure}
% \begin{subfigure}{0.3\textwidth} % width of left subfigure
% \includegraphics[width=1\textwidth]{gfx/image21.png}
% \end{subfigure}
% \caption{
% Top: three typical pitfalls which are apparent from a density profile:
% (a) insufficient statistics in the vapor region. The box should be longer to have room for the vapor phase.
% (b) the liquid slab does not show a plateau corresponding to a bulk liquid. Instead it shows two interfaces merging. This is resolved by increasing the average density of the system.
% (c) the appearance of a drop outside the liquid slab. The simulation must be repeated, or run for a longer time.\\
% Bottom: a density profile which shows a correct outcome.
% }
%\label{fig:7b}
%\end{figure}
In either case mentioned above, the final outcome is an elongated simulation
box with slabs containing the two coexisting phases. A point to consider is the
use of an appropriate number of particles to describe not only the liquid and
vapor (or second liquid) bulk phases but also the interfacial region. The
resulting density profiles should show significant flat density regions for
each bulk phase and sufficient molecules in the sparse (vapor) phases to
provide for adequate statistics. Sec. \ref{sec:init-dens} discusses some typical
pitfalls.
For the case of pure fluids in vapor \textendash{} liquid equilibria, it is not
necessary to specify the values of $N^{L}$ and $N^{V}$, it is
only necessary to define $N^{T}= N^{L}+ N^{V}$,
as the system naturally evolves to the liquid-vapor distribution. For the case
of fluid mixtures in vapor \textendash{} liquid equilibria, it is necessary to
take into account the total number of particles for each component in all
phases (\textit{i.e}., $N_{i}^{T}$ = $N_{i}^{L}$
$+ N_{i}^{V}$). In order to calculate $N_{i}^{T}$, it is
advised to consider not only the total number of particles in each phase
($N^{L}$ and $N^{V}$) but also their composition. The
compositions in $N^{L}$ and $N^{V}$ are given by the
corresponding mole fractions in the liquid ($x_{i}$) and vapor
($y_{i}$) state. The same idea can be applied for the case of mixtures
in liquid-liquid equilibria.
\begin{mdframed}[linewidth=0pt,backgroundcolor=LiveCoMSLightBlue!8,fontcolor=LiveCoMSDarkBlue!80!black]
\textbf{EXAMPLE 2: \textit{Selection of simulation box size and number of particles for a mixture}}
Let us to consider a CO$_{2}$ (1) + n-C$_{10}$H$_{22}$ (2) mixture at 344.15
K and 3.47 MPa. The available information \citep{shaver2001} suggests that at these
conditions, the expected mole fraction in the liquid and vapor phases are
$x_{1}$ = 0.262 and $y_{1}$ = 0.994, respectively, and the
mass densities of the phases are ${\rho}^{V}$ = 62.9 kg/m$^{3}$ and
${\rho}^{L}$ = 698.7 kg / m$^{3}$. Considering the mole fractions and the
molecular weight for the pure fluids (M$_{\mathrm{w}}$CO$_{2}$ = 44.01
kg/kgmol, M$_{\mathrm{w}}$C$_{10}$H$_{22}$ = 142.282 kg/kgmol), the average molecular
weight of the mixture in the liquid and vapor phase are M$_{\mathrm{w}}$liquid
= 116.535 kg/kgmol and M$_{\mathrm{w}}$vapor = 44.6 kg/kgmol, respectively.
Therefore, the molar densities of the mixture are ${\rho}^{V}$ = 1.410 mol/L
and ${\rho}^{L}$ = 5.996 mol/L, hence (${\rho}^{V}$ + ${\rho}^{L}$)/2
= 3.703 mol/L.
Fluids can be described with coarse grained potentials, where CO$_{2}$ is
modelled as a single sphere ${\sigma}_{1}$ = 3.741 \AA{} \citep{avendano2011,mejia2014a}
and n-decane as
a chain of three spheres, each with a size (diameter) constant of
${\sigma}_{2}$ = 4.629 \AA{} \citep{mejia2014a}.
In this example, initially, $N_{t}^{L}$ = $N_{1}^{L}$
+ $N_{2}^{L}$ = 4150 particles (beads) in the liquid phase and
$N_{t}^{V}$ = $N_{1}^{V}$ + $N_{2}^{V}$ = 1850
particles in the vapor phase. While these numbers are in principle arbitrary,
as a starting point one can consider around 2000 to 5000 particles for the
liquid ($N^{L}$), whereas for the vapor phase 1000 to 2000 particles
($N^{V}$) could suffice. Smaller systems tend to promote oscillations
in the vapor pressure and interfacial tension results \citep{gonzalez2005,orea2005,janecek2009};
larger systems will be computationally more expensive.
The number of molecules of each species $N_{i}$ is calculated by
employing the mole fraction definition and the mass balance expressions and
rewriting them it in terms of particles and the number of sites of each
component. The final expression for $N_{1}^{L}$ is given by:
\begin{equation}
N_{1}^{L}=\frac{x_{1}N_{t}^{L}/f_{2}}{\frac{1}{f_{1}}-\frac{x_{1}}{f_{1}}+\frac{x_{1}}{f_{2}}}
\end{equation}
where $f_{i}$ denotes the number of particles that conform the
component $i$. In this example, $f_{1}$ = 1, $f_{2}$
= 3, therefore:
\begin{equation}
N_{1}^{L}=\frac{0.262\times4150/3}{\frac{1}{1}-\frac{0.262}{1}+\frac{0.262}{3}}\approx439
\end{equation}
Considering the value of $N_{t}^{L}$, $N_{2}^{L}$ = 4150
\textendash{} 439 ${\approx}$ 3711 particles or $M_{2}^{L}$
= $N_{2}^{L}$/$f_{2}{\approx}$ 1237 molecules. For the
case of vapor phase, similar procedure can be followed replacing
$N_{1}^{L}$ by $N_{1}^{V}$ and $x_{1}$ by
$y_{1}$ giving $N_{t}^{V}$ = 1850, $N_{1}^{V}$
${\approx}$ 1817 and $N_{2}^{V}{\approx}$ 33. In summary, the box
can be built with a total of 2256 CO$_{2}$ molecules and 1248 n-decane
molecules.
Considering these values, the simulation volume can be calculated from:
\begin{eqnarray}
V & = & \frac{\left(6000\,molecules\right)\left(10^{10}\right)^{3}\left(\frac{\textrm{Å}}{m}\right)^{3}}{3.703\left(\frac{mol}{L}\right)\left(N_{av}\right)\left(\frac{molecules}{mol}\right)\left(1000\right)\left(\frac{L}{m^{3}}\right)}\nonumber\\
& \simeq & 2690600\textrm{Å}^{3}
\end{eqnarray}
In this case, V = $L_{x}$ x $L_{x}$ x 6 $L_{x}$,
$L_{x}{\approx}$ 76.5 \AA{} and $L_{z}$ = 459.0 \AA{}. As
in the previous examples, it is important to verify that $L_{x}$ will
be larger than 10 ${\sigma}_{\mathrm{max}}$ (46.29 \AA{}). This initial
simulation box is heated to an arbitrarily high temperature, significantly
higher than the critical temperature of the mixture (\textit{e.g}., 1000 K).
A subsequent quench of the mixed system to the final temperature produces a two
phase split. This design of simulation cell was used to describe the
interfacial behavior in CO$_{2}$ + n-decane \citep{mejia2014a}. In the supplementary material, some
examples of initial configurations are included.
\end{mdframed}
For multicomponent systems, the quench methods do not allow the \textit{a
priori} specification of the bulk compositions, as these derive from the
liquid-vapor equilibria. Even in the case where the equilibrium conditions are
known and this information is used to build the initial boxes, the excess
adsorption at the interfaces will change the initial compositions. Some trial
and error, or very large systems where the interfacial volume is much smaller
than the bulk will be needed in such cases. Similarly, in cases where the
composition of a given component in the mixture is very small, there is the
need to run increasingly larger systems for the coexisting phases to be
statistically representative.
From a practical perspective, most of the popular molecular simulation software
suites provide auxiliary codes or GUI to build the initial configurations.
Additionally, the density for pure fluids and fluid mixtures can be found in
specialized journals (\textit{i.e}., Fluid Phase Equilibria (\url{https://www.journals.elsevier.com/fluid-phase-equilibria}),
Journal of Chemical Thermodynamics (\url{https://www.journals.elsevier.com/the-journal-of-chemical-thermodynamics}),
Journal of Chemical \& Engineering Data (\url{https://pubs.acs.org/journal/jceaax}),
etc)
or databases such as DIADEM-DIPPR (\url{https://dippr.aiche.org}),
NIST \citep{lemmon2013} (\url{https://www.nist.gov/mml/acmd/trc/thermodata-engine/srd-nist-tde-103b}),
or DECHEMA (\url{https://i-systems.dechema.de/detherm/}).
Alternatively, the density can be estimated using a reference equation of state
(\textit{e.g}. GERG-2008 \citep{kunz2012}),
or a molecular-based equation of
state, such as SAFT \citep{lafitte2013,mccabe2010}.
Versions of the latter model have been implemented in process simulation
software such as Aspen (\url{https://www.aspentech.com/en/products/engineering/aspen-plus})
or gProms (\url{https://www.psenterprise.com/products/gproms}).
\section{Simulation details}
\label{sec:simdetails}
\subsection{Selection of Ensemble}
\label{sec:ensemble}
Perhaps the most common ensemble to obtain interfacial properties for a pure component is
the canonical ($NVT$) ensemble, where the number of molecules
$N$, the volume $V$ and the temperature $T$ are kept
constant\textit{.} For a mixture, the added degrees of freedom suggest that
apart from keeping the compositions and the temperature, an added constraint is
needed, namely the pressure $P$. While an isobaric-isothermal
($NPT$) ensemble would seemingly be appropriate, this ensemble is based
on isometric changes in the volume of the box. In the case of systems with
interfaces, this would amount to changing the interfacial area, which brings in
additional stresses due to the effects of the interfacial tension. Furthermore,
the pressure in these heterogeneous systems is not a scalar, but rather
a tensor, with different values for the elements of the tensor associated to
the different Cartesian directions. For mixtures the
$NP_{zz}AT$ ensemble is the recommended choice. In this
ensemble, the normal pressure (which is the component of the pressure tensor in
the direction perpendicular to the interface and corresponds to the bulk
pressure) is maintained constant by modifying the $L_{z}$ dimension of
the box keeping the interfacial area, $A$, constant (equivalently
keeping $L_{x }$and $L_{y}$ fixed). We note in passing that
application of the Gibbs phase rule suggests that the
$NP_{zz}AT$ ensemble can only be employed for mixtures, not
for pure components. Other alternative ensembles are available
\citep{zhang1995} whereby the tangential pressure and/or the tension
is kept fixed, but are seldomly used.
\subsection{Thermostat and Barostat}
\label{sec:thermostat}
For any ensemble employed (barring the microcanonical) it is necessary to use
a \textit{thermostat} to fix the temperature and/or a \textit{barostat} to fix
the pressure. In general terms, these constrains ($T$, $P$) are
obtained modifying the Hamiltonian expressions of movement by adding an
artificial coupling. The commonly used thermo/barostats are those proposed by
Nos\'{e} and later modified by Hoover, the Nos\'{e}-Hoover \citep{hoover1985},
however there is a trend to employ more advanced propositions such as
those by Martyna-Tobias-Klein \citep{martyna1992} who use a series of
Nos\'{e}\textendash{}Hoover thermostats to construct
a Nos\'{e}\textendash{}Hoover "chain". The choice of coupling is critical to
the outcome of the simulation \citep{shirts2013}
and an inappropriate use can give rise to results which are biased
or even unphysical \citep{wong2016}, \textit{e.g}. the use of
the Berendsen thermostat \citep{berendsen1984},
once popular, is now generally discouraged \cite{braun2018} as it does not
guarantee the bulk phases to be in equilibrium, thus providing incorrect
boundary conditions for the interface.