Talk:Mod:ia2514 LiqSim
JC: General comments: All tasks answered well. Try to make your written explanations more specific and focus on the details which are most relevant to explaining the trends that you see in your results.
Third year simulation experiment
This experiment involved performing molecular dynamics simulations for Lennard-Jones systems at various densities, pressures and temperatures, in the microcanonical, canonical and the isobaric-isothermal ensemble in order to investigate the variation of density with temperature at different pressures, to compute the heat capacity and the diffusion coefficient and plot the radial distribution function. The obtained results were correlated with theory and were used to investigate the structure and properties of the systems. All the simulations were run using LAMMPS and the resulting data was further plotted and analysed using Python and Excel. The trends observed in the results were as expected and the values obtained for the diffusion coefficient were in accordance with literature values. A lack of accuracy in some of the results was attributed to the system not reaching equilibrium within the simulated time.
Introduction to molecular dynamics simulation
In this section, the values obtained by employing the Velocity Verlet algorithm for the position of a harmonic oscillator were compared with the classical results and were further used for calculating the total energy of the system. The change in total energy was calculated from the Velocity Verlet solution in order to determine the largest timestep value for which it does not exceed 1%. Various calculations regarding the Lennard-Jones potential, periodic boundary conditions and reduced units were performed.
Task 1
Open the file HO.xls. In it, the velocity-Verlet algorithm is used to model the behaviour of a classical harmonic oscillator. Complete the three columns "ANALYTICAL", "ERROR", and "ENERGY": "ANALYTICAL" should contain the value of the classical solution for the position at time , "ERROR" should contain the absolute difference between "ANALYTICAL" and the velocity-Verlet solution (i.e. ERROR should always be positive -- make sure you leave the half step rows blank!), and "ENERGY" should contain the total energy of the oscillator for the velocity-Verlet solution. Remember that the position of a classical harmonic oscillator is given by (the values of , , and are worked out for you in the sheet).
The energy of the system was calculated as a sum of the potential energy, , and the kinetic energy, . The filled in file can be found here.
Task 2
For the default timestep value, 0.1, estimate the positions of the maxima in the ERROR column as a function of time. Make a plot showing these values as a function of time, and fit an appropriate function to the data.

The values of the maxima in the graph of the error (the absolute difference between the analytical solution for the position of the harmonic oscillator with respect to the values obtained from the velocity-Verlet algorithm) as a function of time, along with their corresponding times are presented in table 1 and plotted in figure 1. They occur at time intervals of approximately 3 and can be fitted to a linear function ().
JC: Why do you think the error oscillates over time even though the height of the maximum error increases?
Time | Error |
---|---|
2.00 | 7.58E-4 |
4.90 | 2.01E-3 |
8.00 | 3.30E-3 |
11.10 | 4.60E-3 |
14.20 | 5.91E-3 |
Task 3
Experiment with different values of the timestep. What sort of a timestep do you need to use to ensure that the total energy does not change by more than 1% over the course of your "simulation"? Why do you think it is important to monitor the total energy of a physical system when modelling its behaviour numerically?
Monitoring the total energy of the system is important for ensuring that the system has reached equilibrium. The variation in the total energy increases with the value of the timestep and a timestep of 0.334 leads to a change in the total energy of 1.00%. Therefore, in order to ensure that the energy does not change by more than 1% the timestep should be set to less than 0.334.
JC: Energy must be conserved, approximately, for the simulation to give physically relevant results.
Task 4
For a single Lennard-Jones interaction, , find the separation, , at which the potential energy is zero. What is the force at this separation? Find the equilibrium separation, , and work out the well depth (). Evaluate the integrals , , and when .
The separation, , at which the potential energy is zero is:
(since and )
The force at this separation is:
At equilibrium,
For σ = ϵ = 1.0,
For σ = ϵ = 1.0,
For σ = ϵ = 1.0,
JC: All maths correct and well laid out.
Task 5
Estimate the number of water molecules in 1ml of water under standard conditions. Estimate the volume of water molecules under standard conditions.
Since the density of water under standard conditions is 1 g/mL, the mass of 1 mL of water is m = 1 g.
The number of molecules in 1 mL of water is
The mass of N=10000 water molecules is
The volume of 10000 water molecules under standard conditions is therefore .
Task 6
Consider an atom at position in a cubic simulation box which runs from to . In a single timestep, it moves along the vector . At what point does it end up, after the periodic boundary conditions have been applied?
After moving along the vector , the atom ends up at . By applying the periodic boundary conditions, this is equivalent to .
Task 7
The Lennard-Jones parameters for argon are . If the LJ cutoff is , what is it in real units? What is the well depth in ? What is the reduced temperature in real units?
The well depth is .
The temperature is .
JC: All calculations correct and working clearly shown.
Equilibration
Simulations for the same system (in the microcanonical ensemble) at five different timesteps (0.001, 0.0025, 0.0075, 0.01, 0.015) were performed and various commands within the input files were explained. The energy, pressure and temperature were plotted against time for the five timestep values which allowed for the selection of an optimum timestep to be used in further simulations.
Task 8
Why do you think giving atoms random starting coordinates causes problems in simulations? Hint: what happens if two atoms happen to be generated close together?
Setting up a simulation with random coordinates could generate atoms that are too close together (at a distance lower than the sum of their Van der Waals radii), which would lead to strong repulsion. The probability of creating overlapping atoms is higher for more dense systems.
JC: What would be the problem with strong repulsive forces? Large forces can make the simulation unstable and cause it to crash unless much smaller timesteps are used.
Task 9
Satisfy yourself that this lattice spacing corresponds to a number density of lattice points of . Consider instead a face-centred cubic lattice with a lattice point number density of 1.2. What is the side length of the cubic unit cell?
Since the density and (because it is a simple cubic lattice), the volume of the unit lattice is and therefore .
In the case of a FCC lattice (for which ) with a lattice point number density of 1.2, the volume is which gives a side length of the cubic unit cell of .
Task 10
Consider again the face-centred cubic lattice from the previous task. How many atoms would be created by the create_atoms command if you had defined that lattice instead?
For a face-centred cubic lattice the number of lattice points per unit cell is 4, and therefore for a 10x10x10 box, the create_atoms
command would create 4x10x10x10=4000 atoms.
JC: Correct.
Task 11
Using the LAMMPS manual, find the purpose of the following commands in the input script:
mass 1 1.0 pair_style lj/cut 3.0 pair_coeff * * 1.0 1.0
The mass 1 1.0
command sets the mass of all the atoms of type 1 to 1.0 (in this case, all the atoms are of type 1, as set in the command create_atoms 1 box
).
The pair_style lj/cut 3.0
command models the interactions between each pair of atoms using the standard Lennard-Jones potential, with a cutoff of 3.0 (i.e. the potential is calculated only for ; above this value it is 0).
The pair_coeff * * 1.0 1.0
command sets and for all the possible pairs of atoms (the asterisk represents all the atom types).
All the aforementioned values are in reduced units.
JC: Well explained, why is a cutoff used for this potential?
Task 12
Given that we are specifying and , which integration algorithm are we going to use?
Since both the position and velocity are used as initial conditions, the Velocity Verlet Algorithm will be used.
Task 13
Look at the lines below.
### SPECIFY TIMESTEP ### variable timestep equal 0.001 variable n_steps equal floor(100/${timestep}) variable n_steps equal floor(100/0.001) timestep ${timestep} timestep 0.001 ### RUN SIMULATION ### run ${n_steps} run 100000
The second line (starting "variable timestep...") tells LAMMPS that if it encounters the text ${timestep} on a subsequent line, it should replace it by the value given. In this case, the value ${timestep} is always replaced by 0.001. In light of this, what do you think the purpose of these lines is? Why not just write:
timestep 0.001 run 100000
The purpose of using ${timestep} instead of 0.001 (i.e. using a variable instead of a numeric value) is to facilitate using the same script with different values and ensure consistency. By using variables, any change in values has to be done only once (when assigning the values to the variable) and any mistakes in replacing the numbers manually are avoided.
JC: Correct.
Task 14
Make plots of the energy, temperature, and pressure, against time for the 0.001 timestep experiment (attach a picture to your report). Does the simulation reach equilibrium? How long does this take? When you have done this, make a single plot which shows the energy versus time for all of the timesteps (again, attach a picture to your report). Choosing a timestep is a balancing act: the shorter the timestep, the more accurately the results of your simulation will reflect the physical reality; short timesteps, however, mean that the same number of simulation steps cover a shorter amount of actual time, and this is very unhelpful if the process you want to study requires observation over a long time. Of the five timesteps that you used, which is the largest to give acceptable results? Which one of the five is a particularly bad choice? Why?

As shown in figures 2-4, the system reaches equilibrium since, after an equilibration time, the total energy, temperature and pressure all start fluctuating around a constant equilibrium value. Figures 5-7 illustrate the same graphs for the time interval [0,2], revealing that the system equilibrates after .
Figure 8 shows a graph of the total energy as a function of time for five different timesteps: 0.001, 0.0025, 0.0075, 0.01 and 0.015. As expected, a smaller timestep minimises the total energy, since it approaches the behaviour of a real physical system, so the lowest total energy is obtained for a timestep of 0.001. A timestep of 0.0025 gives an average total energy at equilibrium that is within 0.0045% of the value obtained in the case of a timestep of 0.001, deeming it a suitable choice for further simulations as it allows for a shorter computational time (less timesteps) than a timestep of 0.001 (for the same simulation time) while yielding reasonably accurate results.
Another notable feature of the plot in figure 8 is the fact that an increase in the size of the timestep eventually leads to non-equilibration: in the case of a timestep of 0.015, the system does not reach equilibrium within the time , its average total energy increasing steadily after the initial decrease. A timestep of 0.015 is therefore not a good choice for simulating such a system.
JC: Good, the average total energy should not depend on the timestep, so 0.0025 is the best choice.
Running simulations under specific conditions
In this section, performing simulations at seven temperatures and three pressures in the NpT ensemble allowed for the investigation of the variation of density with temperature and a comparison with results obtained from the ideal gas equation.
Task 15
Choose 5 temperatures (above the critical temperature ), and two pressures (you can get a good idea of what a reasonable pressure is in Lennard-Jones units by looking at the average pressure of your simulations from the last section). This gives ten phase points — five temperatures at each pressure. Create 10 copies of npt.in, and modify each to run a simulation at one of your chosen points. You should be able to use the results of the previous section to choose a timestep. Submit these ten jobs to the HPC portal. While you wait for them to finish, you should read the next section.
Simulations were run for seven different temperatures: 1.6, 1.7, 1.8, 1.9, 2.0, 2.2 and 2.4 at three different pressures: 2.5, 3.0 and 3.5 and with a timestep of 0.0025, which was previously selected to be a suitable value.
Task 16
We need to choose so that the temperature is correct if we multiply every velocity . We can write two equations:
Solve these to determine .
Since is a constant, it can be taken out of the sum: .
Replacing the sum from the first equation gives .
Given that , it follows that .
JC: Good.
Task 17
Use the manual page to find out the importance of the three numbers 100 1000 100000. How often will values of the temperature, etc., be sampled for the average? How many measurements contribute to the average? Looking to the following line, how much time will you simulate?
The three number arguments of fix ave/time
represent (in order) the number of steps elapsed between sampling values for the average, the number of values that contribute to the average and the number of steps after which the average is computed. The values of temperature, etc. are therefore sampled every 100 steps for the average and 1000 out of these measurements contribute to the average, which is calculated every 100000 steps.
The simulation will run for 100000 steps (run 100000
) and hence, for a timestep of 0.0025, the time that will be simulated is .

Task 18
When your simulations have finished, download the log files as before. At the end of the log file, LAMMPS will output the values and errors for the pressure, temperature, and density . Use software of your choice to plot the density as a function of temperature for both of the pressures that you simulated. Your graph(s) should include error bars in both the x and y directions. You should also include a line corresponding to the density predicted by the ideal gas law at that pressure. Is your simulated density lower or higher? Justify this. Does the discrepancy increase or decrease with pressure?
Figure 9 shows the expected trend in the values of the density as a function of temperature: for all three pressures simulated, the density decreases with an increase in temperature. The plot also displays the density as obtained from the ideal gas equation () and as expected, the values obtained from the Lennard-Jones systems are lower than those calculated for an ideal gas, for all three pressures. This discrepancy can be explained through the approximations made when considering an ideal gas: the interactions between the particles are purely elastic, whereas the Lennard-Jones potential takes into account the attractive forces between the particles (as well as the repulsive ones). The difference between the ideal gas and the Lennard-Jones densities also increase with an increase in pressure and decrease in temperature (which is consistent with the fact that the ideal gas theory works best for very dilute gases, reduced pressures and high temperatures): for a pressure of 2.5 the difference decreases with temperature from 0.84 to 0.46, whereas for a pressure of 3.5, this difference ranges from 1.41 to 0.81.
JC: The main approximation in the ideal gas equation that is relevant here is the lack of repulsive forces which means that particles in an ideal gas can be at much higher densities than in a Lennard-Jones gas, attractive forces are not very significant in a gas. Try to be a bit more specific in your answer.
Calculating heat capacities using statistical physics
The change in heat capacity per volume with temperature was studied using the results obtained from running simulations for a Lennard-Jones system at five different temperatures and two density values.
Task 19
As in the last section, you need to run simulations at ten phase points. In this section, we will be in density-temperature phase space, rather than pressure-temperature phase space. The two densities required at and , and the temperature range is . Plot as a function of temperature, where is the volume of the simulation cell, for both of your densities (on the same graph). Is the trend the one you would expect? Attach an example of one of your input scripts to your report.

The trend shown in figure 10 is the one expected: the heat capacity decreases with temperature for both densities. This observation can be explained through the fact that at higher temperatures, the particles vibrate more, the interactions between them become weaker and therefore they can store less energy, leading to a decrease in their heat capacity. Between the two data sets, it can be observed that heat capacity increases with increasing density, since a higher density implies a larger number of particles per unit volume which can therefore store more energy, which is consistent with the fact that heat capacity is an extensive property.
JC: Good explanation of the trend with density. For the trend with temperature, if particles vibrate more won't they store more kinetic energy? The change in heat capacity with temperature can be related to the density of states, but more analysis is needed to recover this.
### SPECIFY THE REQUIRED THERMODYNAMIC STATE ### variable T equal 2.0 variable timestep equal 0.0025 variable dens equal 0.2 ### DEFINE SIMULATION BOX GEOMETRY ### lattice sc ${dens} region box block 0 15 0 15 0 15 create_box 1 box create_atoms 1 box ### DEFINE PHYSICAL PROPERTIES OF ATOMS ### mass 1 1.0 pair_style lj/cut/opt 3.0 pair_coeff 1 1 1.0 1.0 neighbor 2.0 bin ### ASSIGN ATOMIC VELOCITIES ### velocity all create ${T} 12345 dist gaussian rot yes mom yes ### SPECIFY ENSEMBLE ### timestep ${timestep} fix nve all nve ### THERMODYNAMIC OUTPUT CONTROL ### thermo_style custom time etotal temp press thermo 10 ### RECORD TRAJECTORY ### dump traj all custom 1000 output-1 id x y z ### SPECIFY TIMESTEP ### ### RUN SIMULATION TO MELT CRYSTAL ### run 10000 unfix nve reset_timestep 0 ### BRING SYSTEM TO REQUIRED STATE ### variable tdamp equal ${timestep}*100 fix nvt all nvt temp ${T} ${T} ${tdamp} run 10000 reset_timestep 0 ### SWITCH OFF THERMOSTAT ### unfix nvt fix nve all nve ### MEASURE SYSTEM STATE ### thermo_style custom step etotal temp vol density atoms variable dens equal density variable N equal atoms variable N2 equal atoms*atoms variable temp equal temp variable temp2 equal temp*temp variable vol equal vol variable en equal etotal variable en2 equal etotal*etotal fix aves all ave/time 100 1000 100000 v_dens v_temp v_vol v_en v_en2 v_temp2 run 100000 variable avedens equal f_aves[1] variable avetemp equal f_aves[2] variable avevol equal f_aves[3] variable aveen equal f_aves[4] variable aveen2 equal f_aves[5] variable varen equal f_aves[5]-f_aves[4]*f_aves[4] variable heatcap equal ${N2}*${varen}/f_aves[6] print "Averages" print "--------" print "Density: ${avedens}" print "Temperature: ${avetemp}" print "Volume: ${avevol}" print "Energy: ${aveen}" print "N2: ${N2}" print "Var Energy: ${varen}" print "Heat Capacity: ${heatcap}"
Structural properties and the radial distribution function
Density and temperature values for the vapour, liquid and solid phases of a Lennard-Jones system were extracted from the phase diagram and used to compute the radial distribution function for the three states. Plots of the RDFs allowed for correlations with the structure of the system in each phase.
Task 20
Perform simulations of the Lennard-Jones system in the three phases. When each is complete, download the trajectory and calculate and . Plot the RDFs for the three systems on the same axes, and attach a copy to your report. Discuss qualitatively the differences between the three RDFs, and what this tells you about the structure of the system in each phase. In the solid case, illustrate which lattice sites the first three peaks correspond to. What is the lattice spacing? What is the coordination number for each of the first three peaks?
Phase | Density | Temperature |
---|---|---|
vapour | 0.07 | 1.3 |
liquid | 0.80 | 1.2 |
solid | 1.20 | 0.8 |
The densities and temperatures for the solid and vapour systems were extracted from the Lennard-Jones system phase diagram [1] and are presented in table 2.
![]() |
![]() |

The radial distribution functions for vapour, liquid and solid Lennard-Jones systems are shown in figure 11 and present the expected features. At distances lower than the minimum interatomic distance, the RDF is zero for all three cases. The solid system, the most ordered one, presents sharp peaks corresponding to certain positions in the FCC lattice. The intensity of the peaks decreases with an increase in the radius suggesting a decrease in the long-range order, which can be attributed to thermal motion. The liquid system is not as ordered as the solid one (it only displays short-range order), but still presents a few peaks at low distances after which the RDF falls to 1, indicating a similar density in the spherical shell at distance r as in the bulk, and therefore a lack of long-range ordering of the system. The RDF for the vapour case is the one which falls to 1 at the lowest distance out of the three cases, an observation which is consistent with the lack of ordering observed in the gas phase.[2] Given the differences between the RDF plots for the three systems, it is expected that the running integral for the vapour reaches a plateau before the liquid, which in turn reaches a constant value before the solid. These features are confirmed by the graph in figure 12.
In the case of a solid system, the first RDF peaks represent the nearest neighbour shells. For a FCC lattice, we expect the first three peaks in the RDF to occur at r values corresponding to the distances between the yellow particle (the centre) and the blue, red and green particles in figure 13 as these are the first three closest particles to the centre. The values of the r distances for the first three RDF peaks, which approximately correspond to the predicted values, along with the corresponding distance to the centre as a function of the lattice spacing (extracted from the log file of the simulation for the solid system) and the coordination numbers (calculated by considering the number of atoms per unit cell and the number of neighbouring cells) are presented in table 3.
r value | Distance from centre as a function of L | Coordination number |
---|---|---|
1.025 | 12 | |
1.475 | 6 | |
1.825 | 24 |
JC: The running integral should not reach a plateau, but should reach a straight line with constant gradient as the RDF tends to 1, not zero. The peaks in the solid RDF decrease over time because the volume of the spherical shell used in the calculation of the RDF increases more quickly than the number of atoms at a given distance. Good diagram of an fcc lattice and good idea to use each of the first 3 peaks to compare with the lattice parameters, but you should show how well they agree - what is the lattice parameter predicted from each of the first 3 peaks?
Dynamical properties and the diffusion coefficient
The mean square displacement and the velocity autocorrelation function were extracted from the outputs of simulations for the vapour, liquid and solid Lennard-Jones systems. The features of the plots of both MSD and VACF against time were discussed in correlation to the structures of the system in the three phases. The VACF of the Lennard-Jones system was also compared to the calculated VACF of a 1D harmonic oscillator. The diffusion coefficient was computed using both the MSD and VACF and the results were similar and consistent with literature values. The lack of accuracy in some of the results obtained by using the VACF were attributed to the systems not reaching equilibrium by the end of the simulation.
Task 21
In the D subfolder, there is a file liq.in that will run a simulation at specified density and temperature to calculate the mean squared displacement and velocity autocorrelation function of your system. Run one of these simulations for a vapour, liquid, and solid. You have also been given some simulated data from much larger systems (approximately one million atoms). You will need these files later.
The parameters used for the vapour, liquid and solid are presented in table 2.
Task 22
Make a plot for each of your simulations (solid, liquid, and gas), showing the mean squared displacement (the "total" MSD) as a function of timestep. Are these as you would expect? Estimate in each case. Be careful with the units! Repeat this procedure for the MSD data that you were given from the one million atom simulations.
![]() |
![]() |
The plots in figures 14-15 present the expected features: the mean square displacement increases in the order solid < liquid << vapour, in accordance with the freedom of movement for the particles in each of the three states. After a period of time, they all exhibit a linear behaviour, with the vapour MSD gradient being the highest of the three and the solid MSD having an approximately constant value close to 0. The non-linear region at small t values represents the ballistic regime where, in the time before a particle collides with another particle, its velocity can be considered constant and therefore its MSD varies with t2, leading to a parabolic curve at low t.[3]
The data points in the time interval [6,10] were each fitted to a linear function and the resulting gradients were used to calculate the diffusion coefficient according to the equation . The results are summarised in table 4 and their magnitudes reflect the ease of diffusion within each phase: the diffusion coefficient for the vapour phase is higher than for the liquid and the one for the solid state is close to 0. The values obtained from the two data sets are similar, with the largest difference being observed in the case of the vapour phase (the smaller system yielded a diffusion coefficient value that is 20% smaller than the one calculated from the million atom simulation). Nevertheless, the values obtained for the diffusion coefficient are in accordance with previously reported values obtained through a similar method.[4]
Data set | Diffusion coefficient | ||
---|---|---|---|
Vapour | Liquid | Solid | |
8000/32000 atoms | 2.51 | 8.48x10-2 | -6.66x10-6 |
1000000 atoms | 3.14 | 8.90x10-2 | 1.22x10-6 |
literature [4] | 3.694 (at density 0.05); 1.798 (at density 0.10) | 7.9x10-2 | - |
JC: Very good explanation of the ballistic regime. Show the different phases on different plots as it is difficult to see the shape of the solid or liquid MSD from those plots.
Task 23
In the theoretical section at the beginning, the equation for the evolution of the position of a 1D harmonic oscillator as a function of time was given. Using this, evaluate the normalised velocity autocorrelation function for a 1D harmonic oscillator (it is analytic!):
Be sure to show your working in your writeup. On the same graph, with x range 0 to 500, plot with and the VACFs from your liquid and solid simulations. What do the minima in the VACFs for the liquid and solid system represent? Discuss the origin of the differences between the liquid and solid VACFs. The harmonic oscillator VACF is very different to the Lennard Jones solid and liquid. Why is this? Attach a copy of your plot to your writeup.
and
and are finite numbers, and therefore, which leads to
JC: Correct result, you can simplify the derivation by recognising integrands as even or odd functions and canceling them accordingly.
![]() |
![]() |
The evolution of the velocity autocorrelation function with time is shown in figures 16-17. In the case of the vapour phase, the VACF decays exponentially with time, indicating a decrease in the correlation between the velocity at time t and the initial velocity which is consistent with the fact that the velocity of a particle is continually changed due to the weak intermolecular forces present in a gas. Due to its highly ordered structure, a solid behaves differently: each particle has its well defined position in the lattice and will mostly just vibrate around it, its movement being dictated by the much stronger interatomic forces than in the case of a gas. A plot of the VACF for a solid is thus expected to exhibit oscillations that decrease in magnitude with time due to disruptions in the ideal oscillatory motion. Having a less ordered structure than a solid, but stronger interatomic forces than a gas, a liquid displays a behaviour that is intermediate between that of a gas and a solid. The plot of the VACF for a liquid therefore exhibits a few damped oscillations, since in a liquid the atoms are not fixed in a lattice and they can diffuse under the influence of the interatomic interactions, unlike in a solid. For both liquids and solids, the minima in the plots represent the time points at which, on average, the atoms collide.

The VACF for a harmonic oscillator (with ), calculated using , was plotted against the VACF for the liquid and solid Lennard-Jones systems in figure 18. The most notable difference is regarding the damping of the oscillations: while both the Lennard-Jones solid and liquid oscillations decay for the aforementioned reasons, the harmonic oscillator VACF does not decrease in amplitude since it is an ideal system, with no perturbations disrupting its oscillations.
JC: Be more specific, what are the perturbations? Collisions between particles randomise the velocities and make the VACF decay to zero, there are no collisions in the harmonic oscillator. Look at the equation for the VACF again, when is it negative?
Task 24
Use the trapezium rule to approximate the integral under the velocity autocorrelation function for the solid, liquid, and gas, and use these values to estimate in each case. You should make a plot of the running integral in each case. Are they as you expect? Repeat this procedure for the VACF data that you were given from the one million atom simulations. What do you think is the largest source of error in your estimates of D from the VACF?
Consistent with the plots of the VACF as a function of time, the graphs of the running integral of the VACF (calculated using scipy.integrate.simps
in Python), shown in figures 19-20, are all expected to plateau once the VACF has decayed to 0. This plateau occurs relatively early in the case of liquids and solids, whereas for the vapour case, the integral increases significantly and has not visibly plateaued after , as expected since the vapour VACF has not completely decayed in this time interval (figures 16-17).
The values of the integrals at t=10 were used as approximations for the plateau value (which represents a good estimate for ) in order to calculate the diffusion coefficient using . The results are shown in table 5 and they are mostly consistent with the values obtained previously by using the MSD (table 4). However, the calculated values for the vapour phase, especially in the case of the one million atoms simulation, are expected to be less accurate since the VACF does not decay completely within the simulated time range, affecting the accuracy of the approximation of the integral. The fact that the running integral plot does not plateau is therefore expected to be the largest source of error in this calculation.
Data set | Diffusion coefficient | ||
---|---|---|---|
Vapour | Liquid | Solid | |
8000/32000 atoms | 2.57 | 9.79x10-2 | -1.14x10-4 |
1000000 atoms | 3.27 | 9.01x10-2 | 4.52x10-5 |
JC: Good, but show the graphs on separate axes so that it's clear that the solid and liquid integrals have reached a plateau. The trapezium rule is another possible source of error.
Conclusion
Simulations under various conditions and in different ensembles were run for Lennard-Jones systems in order to extract a range of data: density versus temperature, heat capacity versus temperature, RDF, MSD and VACF. The obtained results were correlated and compared with theory and with the expected behaviour of real systems. The MSD and VACF data was used to calculate the diffusion coefficient and the obtained values were in accordance with previously reported literature values. The relatively high uncertainty in the results obtained for the diffusion coefficient using the VACF was attributed to the approximations made when calculating the VACF integral.
References
- ↑ J. P. Hansen and L. Verlet, Phys. Rev., 1969, 184, 151-161.
- ↑ P. Atkins and J. Paula, Atkins' Physical chemistry, Oxford University Press, Oxford, 9th edn, 2010.
- ↑ H. Safdari et al., Phys. Rev., 2017, 95, 012120-15.
- ↑ 4.0 4.1 R. L. Rowley and M. M. Painter, Int. J. Thermophys., 1997, 18, 1109-1121.