Simulation of planar systems at constant normal pressure: Is it also

the dynamics are mean square displacements (MSD) because they are closely .... other parameters including the initial configuration were identical for all runs.
201KB taille 1 téléchargements 180 vues
Computer Physics Communications 149 (2002) 61–70 www.elsevier.com/locate/cpc

Simulation of planar systems at constant normal pressure: Is it also possible to keep the plate separation constant? Fathollah Varnik Centre Européen de Calcul Atomique et Moléculaire (CECAM), Ecole Normale Supérieure, 46 Allée d’Italie, 69007 Lyon, France Received 27 February 2002; accepted 10 May 2002

Abstract Constant pressure simulations of planar systems (at fixed particle number) usually require the fluctuations of the conjugate length: When, for example, the temperature is increased, the film thickness D increases in order to keep the normal pressure PN constant. Obviously, PN can also be kept constant by leaving D unchanged but varying the surface area A. However, as PN and A are not conjugate variables, a proper realization of this idea is not straightforward. Using the fact that A is conjugate to the lateral pressure PT and that PT is related to PN via the surface free energy, we present an iterative method which searches for that value of PT corresponding exactly to the desired normal pressure. It is shown that a simulation at this value of PT ensures that the time average of the normal pressure is indeed equal to the desired value. Analytic arguments are given for the convergence of the method in its initial formulation. Furthermore, an empirical rule is presented which improves the rate of convergence by an order of magnitude in simulation time. The present method allows to separate the effects of the temperature from that of the film thickness, and thus, is particularly useful for the study of ultra thin films where a variation of the film thickness can have crucial effects on system properties.  2002 Elsevier Science B.V. All rights reserved. PACS: 07.05.T; 73.61.J; 64.70.P Keywords: Computer modeling and simulation; Constant pressure algorithms; Pressure tensor; Thin films; Fluid dynamics; Glass transition

1. Introduction Real experiments on thin films are usually done at constant normal pressure PN,ext . On the other hand, as the temperature is varied (at PN = const), the corresponding change of the film thickness D is rather small. For instance, in studies of the glass transition of freely-standing polystyrene films, the film thickness increases by a few percent when heating

E-mail address: [email protected] (F. Varnik).

the sample through the glass transition temperature of the film [1,2]. Therefore, if one wants to investigate thermal properties of the films, such as the glass transition [3–6], by simulations, these experimental results suggest to define a simulation method which keeps the normal pressure at the imposed value PN,ext 1 1 In the following the index “ext” of P N,ext denotes the externally imposed pressure, which is a mere number. On the other hand, PN represents the average normal pressure measured in the system. To keep the notation simple, we will use this convention also for other quantities when distinguishing between external and internal

0010-4655/02/$ – see front matter  2002 Elsevier Science B.V. All rights reserved. PII: S 0 0 1 0 - 4 6 5 5 ( 0 2 ) 0 0 6 1 7 - 3

62

F. Varnik / Computer Physics Communications 149 (2002) 61–70

The expression for dF in Eq. (1) has a somewhat unusual form but is more convenient when dealing with simulations. The reason lies in the fact that the variations of D and A are uniquely defined, whereas a change of the volume can be achieved in different ways: by varying D and/or A. However, using dV = D dA + A dD to eliminate A dD from Eq. (1) and using the definition of the surface free energy [7–9], 2γ = D(PN − PT ),

Fig. 1. Illustration of the work (at constant film thickness) due to a change dA of the surface area. As the lateral pressure PT depends on z, the work against the lateral pressure is given by D  0 PT (z) dz dA ≡ PT D dA.

while at the same time avoiding variations of the film thickness. In addition to being consistent with experiments, this approach has the advantage of fully separating the effects of temperature from those of confinement, which become crucial when the film thickness is of the order of a few nanometers. In this paper, we want to present such a method which allows for cooling down (or heating up) the system while keeping both the normal pressure and the film thickness constant. Note that the thermodynamic state of a planar system is uniquely determined by a choice of four independent parameters. Choosing, for example, N, D, A and T as control variables (NDAT -ensemble), the infinitesimal change of the Gibbs free energy dF due to a change of the external parameters can be written as dF = −S dT − PN A dD − PT D dA + µ dN,

(1)

where S is the system entropy, µ the chemical potenD tial and PT = 0 PT (z) dz/D the lateral pressure averaged over the transverse coordinate2 [see Fig. 1]. variables. Furthermore, the instantaneous value of a given variable will be indicated by showing the time argument. Thus, PN (t) is the instantaneous value of the normal pressure at time t, whereas PN is the average value. 2 Note that, unlike P which is constant with respect to the N distance z from the interface, the lateral pressure PT does in general depend on z [7–9].

(2)

one can recover the more familiar expression dF = −S dT − PN dV + 2γ dA + µ dN . In writing Eq. (2) we assume that the system has two identical surfaces, which explains the factor 2. In principle, the approach can easily be generalized to a thin film with two inequivalent interfaces (as it may be more realistic in surface force apparatus experiments, for instance). It follows from Eq. (1) that D is conjugate to APN and not to PN only. Similarly, A is conjugate to D PT ,   ∂F = PN A, FN = − ∂D T ,N,A (3)   ∂F   = PT D. FT = − ∂A T ,N,D T denote the thermodynamic forces Here, FN and F conjugate to D and A, respectively. Thus, a formalism which introduces fluctuations of D and/or A will only allow for simulations at constant FN and/or T . To simulate at constant normal pressure constant F PN,ext one should additionally impose the condition of constant surface area. This means that a simulation at constant normal pressure does necessarily involve fluctuations of the film thickness while keeping the surface area constant. Similarly, a simulation at PT = PT,ext requires simultaneously both a fluctuating A and the condition of constant D. These conclusions seem to contradict our objective of simulating at constant PN,ext while keeping the film thickness constant. Strictly speaking, this is true. However, there is a solution to this dilemma: If the parameters N , D and T are fixed, one can still vary the surface area A in order to change the system properties such as density, normal pressure, etc. Now, as D = const, A is conjugate to the average lateral pressure PT . Therefore, the same change of system properties can also be achieved by a variation of PT . Let γ (PN,ext ) denote the value of the surface

F. Varnik / Computer Physics Communications 149 (2002) 61–70

free energy which corresponds to the desired value of the normal pressure. It follows from Eq. (2) that a NDPT T -ensemble simulation at a constant lateral pressure of PT,ext = PN,ext − 2γ (PN,ext )/D will lead to PN = PN,ext , provided that the system is ergodic. Furthermore, the time average of the surface area during such a simulation gives A(PN,ext). Once A(PN,ext ) has been computed, one can switch from the NDPT T -ensemble to a canonical or microcanonical ensemble simulation by fixing either (NDAT ) or (NDAE). Here, E is the energy obtained as the time average from the preceding simulation stage. For ergodic systems, the time average of the normal pressure within such a canonical or microcanonical simulation must be equal to PN,ext . This requirement can be used to check the reliability of the method [see Section 6]. To apply this approach, it is therefore necessary to determine γ (PN,ext ) which then fixes PT,ext . On the other hand, γ (PN,ext ) has to be calculated in a simulation that only allows fluctuations of A which are in turn controlled by PT,ext . Therefore, the procedure to determine γ (PN,ext ) and PT,ext must be selfconsistent. It will be shown in the next section that this can be achieved via an iterative method. The convergence of the iteration is investigated in Section 3. In Section 4 we introduce a polymer model to which the new method is applied to show that it is indeed useful in practice. Section 5 compiles the results and the last section closes the report with a brief conclusion.

2. Iterative calculation of the surface free energy γ (PN,ext ) at constant N, D and T

(i) Start the iteration at n = 0 by choosing a reasonable value for γ n . If a better choice is unknown, set γ 0 = 0. (ii) In the (n + 1)th iteration step, perform (for a certain amount of time, τ ) a simulation that controls fluctuations of A by imposing the external lateral n ≡ PN,ext − 2γ n /D. To obtain new pressure PT,ext estimates for the surface free energy and the internal normal pressure, calculate n γout

1 = τ

(n+1)τ 

γ (t) dt nτ (n+1)τ  

  D PN (t) − PT (t) dt 2 nτ   2γ n n = γ PT,ext = PN,ext − D

1 = τ

  2γeq . γeq = γ PT,ext = PN,ext − D

(4)

Thus, the surface free energy γ satisfies a selfconsistent equation for a given value of PN,ext . This self-consistency can be used to formulate an iterative procedure:

(5)

and n PN,out

1 = τ

(n+1)τ 

PN (t) dt,

(6)



where PN (t) and PT (t) are the instantaneous values of the normal and lateral pressures averaged over all z. These quantities are determined by the analogue of the virial expression for thin films [7, 8,10] N 2 N 1 pi,z (t)

+ zi (t)Fi,z (t) , (7) PN (t) = V mi i=1 i=1 N 2 N 1 pi, (t)

  + ri, (t) · Fi, (t) . PT (t) = 2V mi i=1

Suppose that N , D and T are kept constant. Then, the discussion of the previous section suggests that we can consider γeq ≡ γ (PN,ext ) as a function of the external lateral pressure

63

i=1

(8) Here, mi is the mass of particle i. In (7), pz,i and zi denote the instantaneous momentum and position of particle i perpendicular to the planar interface, and Fi,z is the z-component of the total force on the particle at time t. The variables in (8) have the same meaning, but are calculated parallel to the interface: pi, = (pi,x , pi,y ), ri, = (xi , yi ), and Fi, = (Fi,x , Fi,y ). n − PN,ext)/PN,ext < , stop the iteration. (iii) If (PN,out n and go to (ii). Here,  is the If not, set γ n+1 = γout tolerable relative error. We usually set  ≈ 0.01.

64

F. Varnik / Computer Physics Communications 149 (2002) 61–70

The iteration can in principle be started with an arbitrary value of γ 0 . It will, however, converge faster if γ 0 is close to γeq . The reason why we monitor n and not that of γ n is the convergence of PN,out motivated by the fact that we are interested in setting the normal pressure to the given external value PN,ext . It is therefore reasonable to check for the convergence n already within the iteration procedure and of PN,out use this as the exit-criterion.

3. Convergence of the iterative method In this section, we discuss the convergence of the series γ n towards γeq , which in turn implies the n towards PN,ext . First, we note convergence of PN,out that close to γeq   2γ n n n γ n+1 = γout = γ PT,ext = PN,ext − D    ∂γ 2 γeq − γ n ≈ γeq + , (9) D ∂ PT D,T where we used the definition (4) of γeq and a firstorder Taylor expansion of γ at PT = PN,ext − 2γeq /D. Note that we study a situation where N, D and T are kept fixed. A change of the lateral pressure is therefore realized by a change of the surface area A only. If we now assume that   ∂γ > 0, (10) ∂ PT D,T

Combining the last line of (13) with the assumption (10), it follows that the convergence of the iteration procedure is ensured if   2 ∂γ < 1. (14) 0< D ∂ PT D,T A justification of the left inequality in (14) [and thus of the assumption (10)] might be as follows: The surface free energy arises from the imbalance between molecular forces on particles close to the interface. Let the number of particles, film thickness and temperature be kept at some given values. Imagine that the average lateral pressure PT is increased (dPT > 0) by an infinitesimal reduction of the surface area. As a result of this change of the surface area, the system volume decreases. Consequently, the mean particle separation decreases leading to an enhancement of the imbalance between molecular forces at the surface and thus to an increase of the surface free energy (dγ > 0). This argument leads to (dγ /dPT )D,T > 0, which is identical to the left inequality in (14). A similar argument for the validity of the right inequality in (14) is hard to put forward. Nevertheless,

we obtain from Eq. (9) γ n > γeq ⇒ γ n+1 < γeq γ < γeq ⇒ γ n

n+1

or

> γeq .

(11)

Thus, the successive values of γ n oscillate around γeq ≡ γ (PN,ext ). The convergence of the series of γ n towards γeq is proved if we can show that γeq − γ n+1 < γeq − γ n . (12) Let γ n < γeq . It follows from inequality (11) that γ n+1 > γeq . Therefore, (12) is equivalent to γ n+1 − γeq < γeq − γ n    ∂γ 2 n γeq − γ ⇐⇒ < γeq − γ n D ∂ PT D,T   2 ∂γ ⇐⇒ < 1. D ∂ PT D,T

(13)

Fig. 2. Dependence of the surface free energy γ on the lateral pressure PT . These data are obtained in course of the iteration at T = 1 for a film of thickness D = 5 [and for τ given by 2 , see (16)]. The slope of the straight line is roughly 2 g3 (τ ) = 25Ree so that (2/D)∂γ /∂ PT ≈ 0.8. Note that D stands for the wall-to-wall separation. The distance of the closest approach of a monomer to a wall is approximately its own diameter (i.e. σ = 1). Therefore, a value of D = 5 corresponds to the extreme case of three monomer layers only. The inequality (14) is thus satisfied even in the case of an extremely thin film.

F. Varnik / Computer Physics Communications 149 (2002) 61–70

for sufficiently large D, it is clear that the inequality holds. To see this, we first note that PN ≈ PT for large film thicknesses. It now follows from Eq. (2) that (2/D)∂γ /∂ PT = ∂PN /∂ PT − 1 1. Therefore, if there is a limit to the validity of (14), it must be at small film thicknesses. We implemented the method for a model of thin polymer film [see Section 4] and carried out molecular dynamics simulations at various film thicknesses. As shown in Fig. 2, even for a film of three atomic layers the validity of both inequalities of (14) is nicely borne out by the simulation data.

4. Model We study, via molecular dynamics simulations, a Lennard–Jones model for a dense polymer melt [11, 12] of short chains (each consisting of 10 monomers) embedded between two completely smooth, impenetrable walls [5–7]. Two potentials are used for the interaction between particles. The first one is a truncated and shifted LJ-potential which acts between all pairs of particles regardless of whether they are connected or not,

ULJ (r) − ULJ (rc ) if r < rc , ULJ-ts (r) = 0 otherwise, where ULJ (r) = 4[(r/σ )12 − (r/σ )6 ] and rc = 2 × 21/6 σ . The connectivity between adjacent monomers of a chain is ensured by a FENE-Potential [11]   2  k 2 r , UFENE (r) = − R0 ln 1 − 2 R0 where k = 30/σ 2 is the strength factor and R0 = 1.5σ the maximum allowed length of a bond. The wall potential was chosen as  9 σ , (15) UW (z) =  z where z = |zparticle − zwall | (zwall = ±D/2). This corresponds to an infinitely thick wall made of infinitely small particles which interact with inner particles via the potential 45(σ/r)12/(4πρwall σ 3 ) where ρwall denotes the density of wall particles. The sum over the wall particles then yields (σ/z)9 . All simulation results are given in Lennard–Jones (LJ) units. All lengths and energies are measured respectively in

65

units of σ and , temperature in units of /kB (kB = 1) and time in units of (mσ 2 /)1/2 . More details about the simulation can be found in [7].

5. Results All simulation results presented here correspond to a film of thickness D = 5. Recall that D stands for the wall-to-wall separation. The distance of the closest approach of a monomer to a wall is approximately its own diameter (i.e. σ = 1). Therefore, a value of D = 5 corresponds to the extreme case of three monomer layers only. The number of particles for this film thickness is chosen to N = 500 (50 chains of 10 monomer per chain). At a temperature of T = 1 and a normal pressure of PN,ext = 1, the iterative approach √ leads to a lateral system size of Lx = Ly = A = 13.9. For our polymer model, no finite size effects are present at this lateral system length [13]. Periodic boundary conditions are applied in lateral directions (x and y) only. During each iteration step, N , D, T and PT,ext are treated as external parameters. This was realized by a combination of the Nosé–Hoover thermostat [14, 15] with the Anderson barostat [16–19] extended to planar systems [13]. Note that PT,ext is adjusted once at the beginning of each iteration step and then is kept strictly constant until the beginning of the next step. Thus, if the duration of an iteration step is chosen long enough (see later this section), the applied NDPT T ensemble simulation will lead the system through those points of the phase space which correspond to the prescribed values of N , D, T and PT,ext . Fig. 3 illustrates that the method always converges towards the same limit, independent of the initial choice for γ 0 . Furthermore, it also shows that a value of γ 0 close to γeq is favorable for the convergence of the iteration. Thus, if some estimate of γeq exists, for example if γeq is known for a different temperature and/or pressure, one should set γ 0 to this value. In addition to γ 0 , the method described in Section 2 contains another parameter which must be well characterized: the time interval, τ , of an iteration step. If τ is too small, the time integrals in (5) and (6) will lead to n , respectively. On inaccurate results for γ n and PN,out the other hand, if it is chosen too large, the method becomes inefficient.

66

F. Varnik / Computer Physics Communications 149 (2002) 61–70

Fig. 3. Independence of limn→∞ γ n of the initial value γ 0 . The iterations should find γeq (PN,ext = 1). Results shown here correspond to γ 0 = 0 (far from γeq ) and γ 0 = 2.6 (close to γeq ). As expected, both series of γ n converge towards the same limit, irrespective of the initial value γ 0 . The data correspond to a film of thickness D = 5 at a relatively low temperature of T = 0.55. The external pressure in perpendicular direction is PN,ext = 1.

n [see Eq. (5)] Fig. 4. Dependence of the rate of convergence of γout on the duration, τ , of an iteration step. Three choices of τ are 2 ) (dashed line with circles), τ (9R 2 ) (bold solid considered: τ (4Ree ee 2 ) (solid line with triangles) [for the line with diamonds) and τ (25Ree definition of τ (x) see Eq. (16)]. Rapid convergence is obtained only 2 ) [see also Fig. 5] (D = 5, N = 500, T = 1, for the case of τ (9Ree PN,ext = 1 ⇒ γeq = 2.07 ± 0.01).

To fix τ one has to study the dynamic properties of the system under consideration. A convenient probe of the dynamics are mean square displacements (MSD) because they are closely related to relaxation processes of position dependent physical quantities. As the surface free energy depends on intermolecular forces and distances, we expect the magnitude of MSD’s to be a natural measure of time for our purpose. To measure the time, we thus define τ (x) as the time needed by g3 , the mean-square displacement of the chain’s center of mass   g3 τ (x) ≡ x (defining equation for τ (x)). (16) Figs. 4 and 5 compare the time evolution of γ n and n computed according to Eqs. (5) and (6) for PN,out 2 ), τ (9R 2 ) and τ (25R 2 ) three choices of τ : τ (4Ree ee ee [Ree is the chain’s end-to-end distance]. The aim of the iteration was to find γeq corresponding to a normal pressure of PN,ext = 1 (within a tolerance of  = 0.005). As shown in Figs. 4 and 5, the 2 ). For the best convergence is obtained for τ (9Ree smaller τ , however, a rapid approach towards γeq ≡ γ (PN,ext ) is limited to the beginning of the iteration only. After about 3 · 106 MD steps statistical errors n seem to dominate and results for γ n and PN,out

n Fig. 5. Same as in Fig. 4, now for the normal pressure PN,out computed within successive iteration steps.

improve much more slowly. Finally, taking a much 2 ) slows down the convergence rate larger time τ (25Ree considerably. 2 ) is approximately equal However, note that τ (9Ree to the typical duration of a whole production run. To

F. Varnik / Computer Physics Communications 149 (2002) 61–70

67

obtain an estimate of the total time necessary for an iteration procedure, this time must further be multiplied by the number of iteration steps. From Fig. 5 we count 12 steps for a relative accuracy of  = 0.005. So, the iterative method seems to be very time consuming. Fortunately, a major improvement of the convergence rate can be achieved if the input of the next step is calculated taking into account not only the actual iteration step, but also the previous ones. The idea of combining two previous iteration steps to improve the convergence rate is a well-known empirical rule and has already been successfully applied in various fields where self consistent equations are to be solved via an iterative approach [20,21]. Therefore, we introduce an extra parameter, 0 < α < 1, and set n + (1 − α)γ n . γ n+1 (α) = αγout

(17) γ n+1 (α)

It is easy (17) is equivalent to  to see that Eq.n−k = α nk=0 (1 − α)k γout + (1 − α)n+1 γ 0 . Thus, n+1 n , where the con(α) is a weighted sum over γout γ tribution of the kth step before the most recent one is weakened by a factor of (1 − α)k . Now, as seen from n oscillate around γ . inequality (11), γ n and thus γout eq Therefore, the convergence of successive values of γ n towards the average value, γeq , is now accelerated by the simple fact that we integrate over these oscillations while at same time attributing more weight to the later steps. n for α = 1 (no Fig. 6 displays results on PN,out mixing), 0.7, 0.6 and finally α = 0.5. All other parameters (including the initial configuration) were the same for all runs, i.e. D = 5, N = 500, Text = 1 and PN,ext = 1. Note that a smaller value of the parameter α corresponds to a stronger contribution of the previous steps, for the older steps are weighed by successive factors of 0 < 1 − α < 1. As shown in Fig. 6, the smaller α, the faster the method converges. It is seen from this figure, that the application of Eq. (17) with α around 0.6 leads to an enhancement of the convergence rate by an order of magnitude. Note also, that there is not much difference between results obtained for α = 0.6 and α = 0.5. This may be related to the fact that α = 0.5 is a lower bound, in the sense that α < 0.5 corresponds to overemphasizing the “older” steps compared to the actual one. As a rough estimate, our simulations at lower temperatures and other film thicknesses show that a good choice for α usually lies in the range 0.6  α  0.7.

Fig. 6. Effect of mixing successive iteration steps on the convern . Four values of the parameter α appearing in the gence of PN,out mixing rule (17) are compared: α = 1 (no mixing), 0.7, 0.6, 0.5. All other parameters including the initial configuration were identical for all runs. For α  0.7, the rate of convergence is improved by a considerable amount.

6. Reliability of the method The reader may have noticed that, within the iterative procedure, the system is driven through various thermodynamic states corresponding to different values of the external parameter PT (or, equivalently, PN ). It is therefore important to check if the final output of the iterative method does really correspond to the desired value of the normal pressure PN,ext . As mentioned in Section 1, this can be examined by computing the average surface area, 1 A= τ

tmax A(t) dt,

(18)

tmax −τ

during the last iteration step and then switching to a NDAT -ensemble simulation using this value of the surface area. The “goodness” of the iterative method now manifests itself in PN , the time average of the normal pressure within the NDAT -run. Obviously, the closer PN to PN,ext the better the iteration result. An example of such a test is shown in Fig. 7, where the profile of the normal pressure, obtained from NDAT -ensemble simulations, is depicted versus the transverse coordinate z (the walls are placed at z = ±D/2 = ±2.5). The surface area A has been

68

F. Varnik / Computer Physics Communications 149 (2002) 61–70

Table 1 Normal pressure PN as obtained during N DAT -production runs. The volume used in each run was computed within a preceding iterative approach with PN,ext = 1 [see Eq. (18)]. The film thickness was D = 5 and the number of particles N = 500 α

τ

γ0

PN

1 1

0.5 0.5

0 2.6

0.996 ± 0.009 0.994 ± 0.009

1 1

0.6 0.7

2.6 2.6

1.004 ± 0.010 1.003 ± 0.010

0.55

0.7

2.6

0.990 ± 0.002

0.55 0.55

0.7 0.5

2 ) τ (4Ree 2 ) τ (4Ree 2 ) τ (4Ree 2 ) τ (4Ree 2 ) τ (9Ree 2 ) τ (4Ree 2 ) τ (2Ree 2 ) τ (2Ree 2 τ (Ree )

2.6 0

0.994 ± 0.002 1.017 ± 0.015

2.6

0.997 ± 0.002

2.6

1.004 ± 0.002

T

Fig. 7. Profile of the normal pressure PN as an average over 5 independent runs calculated within the N DAT -ensemble. In each run, the surface area A has been computed within the iterative method. Obviously, the average over the whole system (i.e. over z) of PN = 1.0046 is very close to PN,ext = 1. Furthermore, the requirement of PN (z) = constant is well satisfied.

computed via a preceding iterative approach. The profile represents the average of PN (z) over 5 independent runs for a film of thickness D = 5 at a low temperature of T = 0.38 (note that the mode-coupling critical temperature of the system at this film thickness is Tc (D = 5) = 0.305 ± 0.005 [5]). Length of each run was 4 × 107 MD steps and the sampling was done once in 103 MD steps. It is worth noting that due to the sharp rise of relaxation times at this temperature, a simulation run of the length 107 –108 MD steps is relative short. At the end of mentioned runs, for example, the mean square displacements of chain cen2 . Therefore, to limit computing ters hardly reached Ree 2 ) for the length of an ittime, we did not choose τ (4Ree eration step but the much smaller value of max(5 · 106, 2 )). τ (0.5Ree However, despite this crude choice of τ , not only the average value over the whole system is well close to PN,ext = 1, but also the local profile is in good agreement with the requirement PN (z) = PN,ext = const., as expected for planar systems (see [7–9] for a more detailed discussion of the properties of the pressure tensor in planar systems). Thus, the iterative method works well not only at small film thicknesses, but also at low temperatures. The same test was also applied to polymer films of various thicknesses and

0.55

0.5

0.55

0.5

temperatures in addition to the results presented here. In all cases studied, the NDAT -ensemble simulations gave results for PN which agreed well with PN,ext within a relative accuracy of 1%. Table 1 contains results obtained from NDAT ensemble simulation runs, where A was computed using Eq. (18), i.e. as time average during the very last iteration step. It is seen from this table that the average surface area, computed within the iterative method, does indeed correspond to the given external normal pressure PN,ext = 1 to a high degree of accuracy. Finally, we investigate the magnitude of the fluctuations of the normal pressure within the iterative method. For this purpose, we plot in Fig. 8 the instantaneous normal pressure PN (t) versus time during NDPT T -ensemble simulations. Also the time averages of the normal pressure over each iteration step, n PN,out , and successive values of the external paramen ter PT,ext are depicted in this figure. The initial value 0 of the external lateral pressure PT,ext is fixed using 0 γ = 2.6 [see (ii) in Section 2] and is updated at the end of each iteration step. Fig. 8 also depicts PN (t) obtained during a NDAT -ensemble (constant A) simulation at the end of the iterative determination of A(PN,ext ). For a better comparison of the data, the time axis of the NDAT -curve is shifted by an amount of 6.5 · 106 MD steps towards larger times. It is seen from this figure that, at the final stage of the iterative approach, the fluctuations of PN (t) are of the same magnitude as those during the constant A simulation.

F. Varnik / Computer Physics Communications 149 (2002) 61–70

Fig. 8. Instantaneous normal pressure PN (t) (solid line) versus time during a N DPT T -ensemble simulation, where the external n , is successively varied in an iterative approach parameter, PT,ext n , (connected circles). Diamonds connected by a solid line give PN,out the time average of the normal pressure from t = nτ to t = (n + 1)τ n n and PN,out , the first entry [see Eq. (6)]. Note that, both in PT,ext corresponds to n = 0. The latter is computed during the simulation, 0 is known at the end of the first iteration step only. so that PN,out n represents an external parameter which Contrary to that, PT,ext must already be updated at the beginning of each iteration step. The inset shows PN (t) for a small time interval, thus allowing the observation of individual samples. It can be seen from this plot that sampling is done once every 1000 MD steps. Assuming statistical independence, one can also compute the standard deviation of PN for each iteration step. The results of this procedure are shown n . Data for t > 6.5 · 106 correspond to a by error bars on PN,out N DAT -ensemble simulation at the end of the iterative approach and oscillate around an average of PN = 1.005. The white long-dashed line marks PN,ext = 1.

7. Conclusion We address the problem that, at fixed particle number (which is usually the case in ordinary MD simulations), a constant pressure simulation of confined systems with planar geometry requires the fluctuations of the conjugate length, i.e. the film thickness D. As a result, when the temperature is increased the film thickness increases in order to keep the normal pressure constant. On the other hand, it is also well known that the properties of highly confined systems like that of ultra thin films do strongly depend on the film thickness [3–6]. When studying the temperature dependence of the properties of ultra thin films at constant normal pressure, it is therefore desirable to keep

69

not only the normal pressure but also the film thickness at a well defined value. In the present work, we propose a way to achieve this objective. Our approach is based on the simple fact that PN can also be kept constant by letting D unchanged but varying the surface area A. We showed that the problem, that PN and A are not conjugate can be circumvented by carrying out MD simulations at such a value of the average lateral pressure PT that corresponds to the desired normal pressure. Now, these two quantities are related by the surface free energy of the system: 2γ = D(PN − PT ) for a planar system with two identical surfaces. The problem is therefore reduced to a computation of the unknown quantity γ . We show that, starting with an arbitrary initial guess, the surface free energy corresponding to the desired value of the normal pressure can be computed via an iterative method. We give analytic arguments for the convergence of the iteration and present simulation results of an ultra-thin polymer film of three monomer layers to exemplify the robustness of the method in an extreme situation where the theoretical argument to justify its convergence could be violated. It is demonstrated that, in its initial formulation, the iterative procedure converges towards the desired value of PN,ext if the length of an iteration step is appropriately chosen. A reasonable choice is found as the time when the sys2 )). Furtem has clearly become diffusive (i.e. τ (9Ree thermore, we show that the converges of the method is independent of the initial guess for γ . However, an iteration steps with a duration of 2 ) can be quite time consuming when dealing τ (9Ree with glassy systems at low temperatures [22,23]. We show that the convergence can be accelerated by an appreciable amount, if the input of the next iteration steps is not simply taken from the output of the preceding step, but as a linear combination of the two n +(1 −α)γ n−1 , preceding ones, i.e. if γ n+1 (α) = αγout out where 0 < α < 1 is an adjustable parameter. Varying the parameter α, we find that, for values of α between 0.5 and 0.7, the total number of MD steps from the beginning until the end of the iteration can be reduced by more than one order of magnitude. The present method thus provides a fast algorithm for simulation studies of thin films subject to a constant normal pressure at various temperatures while keeping the film thickness at a predefined value.

70

F. Varnik / Computer Physics Communications 149 (2002) 61–70

Acknowledgement This work was done during my PhD thesis in Johannes Gutenberg-Universität, Institut für Physik, Mainz (Germany) in the group of professor Kurt Binder to whom I express my thanks for continuous support and encouragement. I would also like to thank Jörg Baschnagel for many useful discussions and his constructive criticism concerning this report. The financial support by the “Deutsche Forschungsgemeinschaft” (DFG) under the project number SFB262 and by BMBF under the project number 03N6015 and by the project “Multifunktionale Werkstoffe und Miniaturisierte Funktionseinheiten” is gratefully acknowledged. I am also indebted to the European Science Foundation for financial support by the ESF Programme on “Experimental and Theoretical Investigations of Complex Polymer Structures” (SUPERNET). Generous grants of simulation time by the computer center at the university of Mainz (ZDV), the NIC in Jülich and the RHRK in Kaiserslautern are also acknowledged. References [1] J.L. Keddie, R.A.L. Jones, R.A. Cory, Europhys. Lett. 27 (1994) 59. [2] K. Dalnoki-Veress, et al., Phys. Rev. E 63 (2001) 31 801.

[3] J.A. Forrest, K. Dalnoki-Veress, J.R. Dutcher, Phys. Rev. E 56 (1997) 5705. [4] J. Jäckle, J. Phys. IV 10 (2000) 3. [5] F. Varnik, J. Baschnagel, K. Binder, Phys. Rev. E 65 (2002) 021507. [6] F. Varnik, J. Baschnagel, K. Binder, J. Phys. IV 10 (2000) 239. [7] F. Varnik, J. Baschnagel, K. Binder, J. Chem. Phys. 113 (2000) 4444. [8] J.P.R.B. Walton, D.J. Tildesley, J.S. Rowlinson, J.R. Henderson, Mol. Phys. 48 (1983) 1357. [9] B.D. Todd, D.J. Evans, P.J. Daivis, Phys. Rev. E 52 (1995) 1627. [10] J.S. Rowlinson, B. Widom, Molecular Theory of Capillarity, Clarendon Press, Oxford, 1982. [11] K. Kremer, G.S. Grest, J. Chem. Phys. 92 (1990) 5057. [12] C. Bennemann, W. Paul, K. Binder, B. Dünweg, Phys. Rev. E 57 (1998) 843. [13] F. Varnik, Ph.D. Thesis, University of Mainz, 2000, available from http://ArchiMeD.uni-mainz.de/pub/2001/0007/. [14] S. Nosé, J. Chem. Phys. 81 (1984) 511. [15] W.G. Hoover, Phys. Rev. A 31 (1985) 1695. [16] H.C. Andersen, J. Chem. Phys. 72 (1980) 2384. [17] M. Parrinello, A. Rahman, Phys. Rev. Lett. 45 (1980) 1196. [18] W.G. Hoover, Phys. Rev. A 34 (1986) 2499. [19] S. Melchionna, G. Ciccotti, B.L. Holian, Mol. Phys. 78 (1993) 533. [20] A.A. Broyles, J. Chem. Phys. 33 (1960) 456. [21] J.-P. Hansen, I.R. McDonald, Theory of Simple Liquids, Academic Press, London, 1990. [22] W. Kob, Experimental and Theoretical Approaches to Supercooled Liquids: Advances and Novel Application, ACS Books, Washington, 1997. [23] E. Donth, Relaxation and Thermodynamics of Polymers: Glass Transition, Akademie-Verlag, Berlin, 1992.