Universidad

Week 5

weekmenu | week1 | week2 | week3 | week4 | week6 | Project

5th week (March 7th- March 13th): Thermodynamic equilibrium in big samples.

Thermalization

In molecular dynamics for microcanonical systems (NVE: number of atoms, volume and energy are constants), the thermalization process is one of the most important part of the simulation, because the temperature is directly related with the energy. Before to evaluate any physical property or before making any alteration of the system (for example, impact it with a projectile) all the system have to be in a thermal equilibrium. In physics, thermalization is the process of particles reaching thermal equilibrium through mutual interaction.

To achieve thermal equilibrium of a system through molecular dynamics, the procedure performed is: To achieve thermal equilibrium of a system through molecular dynamics, the procedure performed is: from time to time the system is required to be at the desired temperature, this is repeated until the system, once left free, it remains to the desired temperature.

In lpmd program, you can thermalize the system using tempscaling plugin:

use tempscaling
    from 100.0
    to 100.0
enduse

apply tempscaling start=0 each=10 end=1000

It means that each 10 steps, starting in the step zero, the system will be required to have a temperature of 100 kelvin. This will be done to step 1000.

Create a folder for this week, within this creates a folder called "part1". Copy the part1.tar.gz file from /home/lab/claudial/ to this folder. unzip it!

Take a look the file, what makes this simulation? make some comments in the comment part :)

Now, run it with nohup command!

 $nohup ... ... &

This simulation will take 45 seconds. Make a "step vs temperature", "step vs pressure" and "step vs all energies (in the same graph)" graphics.

Upload them:

Now copy the control file with another name and change the "each" variable in:

apply tempscaling start=0 each=10 end=3000

for 50. Upload the "step vs temperature" graph for the simulation.

Compare the results and make some conclusions in the comment part!!

Copy the control file with another name and change the "end" variable in:

apply tempscaling start=0 each=... end=....

for 500 and using the best result for "each" variable obtained before, run the control file!. Upload the "step vs temperature" graph:

Compare the results!! make a comment in the comment part!


Take a look the argon-thermalneedle.control file:

  • The initial temperature is 10 K.
  • Output file have a lpmd extension, and save the position velocities and colors!!
     output lpmd file=sphere.lpmd level=1 extra=rgb
    

  • There is a tempscaling from 10,000 to 10,000 Kelvin!!
     use tempscaling
         from 10000.0
         to 10000.0
     enduse
    

  • This temscaling is applied in two steps, 200 and 201 over a sphere (do you remember the filters?!!)
    apply tempscaling each=1 start=200 end=201 over sphere radius=8.5 center=<17.12,17.12,17.12>
    

  • For see the different temperatures we paint the atoms with some colors (the color scale is between: red is high temperature, 300 Kelvin; and blue is low temperature, 0 Kelvin).
    use propertycolor as tempcolor
        property temperature
        min 0.0
        max 300.0
        debug none
    enduse
    apply tempcolor
    

  • We can view it immediately by adding to the control file:
    use lpvisual
        debug none
    enduse
    
    visualize lpvisual
    

Run the simulation!!!

Profiles


press the figure
for full size.

In this type of simulations (see figure at left), where the change of temperature, pressure and density, among others, occurs locally, the analysis of physical properties can not be done in the whole sample simultaneously. In these cases you can use filters to select a set of atoms for further analysis. Thus LPMD has created a utility to evaluate locally the temperature, pressure and density in these cases, called "profiles". For example, we take a cylindrical piece of the simulation center, shown in the figure, by means of filters, and applied to the cylinder the temperature profile, which divide the cylinder into equal sections and evaluated the temperature locally.



Temperature profile in the central cylinder at different times!


The simulation that we will study and analyze now is a shockwave in a solid argon, see week 2 for know how create a shockwave, if you want take a look this paper pdf. The shockwave is a high energy wave injected into the system in an instant of time, so this produces a big changes in temperatures, pressures and densities in a local region.

In order to analyze a shockwave simulation, I will provide you an output file from my simulations. In the profiles folder you will find the sw-colores.lpmd output file, view it! and tell me when you are here!

 $lpmd-visualizer -i lpmd:file=sw-colores.lpmd,rgb=true -u lpvisual:paused=true -r

did you see!! it is fantastic!! Do you know that shockwaves are using in medicine for fix broken bones and tendons?

take a picture in any time of this simulation, you can paused it with p letter.

Temperature profile

How you saw, the temperature is changing locally in the z axis. For analice this we will use the tempprofile tool, take a look the temperature.control file.

The following part define the temperature profile:

use tempprofile
    axis z
    bins 20
    range x all
    range y all
    range z all
    average false
    output temperature.dat
enduse

property tempprofile start=1 end=70 each=10

This means, in the input file the z axis will be divided in 20 equal parts, and the temperature evaluation will be made in all x, y and z axis, it means all the sample. The information will be save in temperature.dat file. The evaluation of this profile will be made each 10 steps, starting in step 1, until step 70.

Run this property, how is a property, you will have to use the lpmd-analyzer executable!

 $lpmd-analyzer temperature.control -r 

Make a "time vs temperature" graph of the output file, for do this see first the output file!!

change the bins variable for 10 and 45, run the simulations, upload the "time vs temperature" graphycs. Make a comment about the results in the comment part!

Stress profile

See the pressure.control file and fill the missing information with the best results obtained before. Look that this have information about the potential used for the simulation!! Why do you think this property need this information??made the comment in the comment part!!

Now run the simulation, and see the output file. You will find a lot of columns, because we calculated the stress matrix!!. So, we have 3 directions this implies we have 9 component of the stress matrix: xx, xy, xz, yx, yy, yz, zx, zy and zz.

What do you think is the component of the matrix that is important to this simulation??

Make the "time vs ??-stress" graph! upload it!!

Density profile

See the density.control file and fill the missing information with the best results obtained before. Run the simulation and make the "time vs density" graph! upload it!!

Project

We begin the project by building and thermalized the sample. The sample characteristics are:

  • Material: Copper.
  • Number of replicates: 30 x 30 x 15.
  • Output: xyz, saved each 500 steps.
  • Number of steps: 50,000.
  • Potential: Sutton-Chen (Paper with potential parameters newwin pdf. Remember to check the functional form of the potential).
  • Initial temperature: room temperature in kelvin.
  • Thermalization: room temperature in Kelvin. Use the best result obtained for the each variable in the previous exercise. Run the thermalization during the first 20,000 steps.
  • Save: steps, temperature, pressure and all energies, each 1 steps.
  • Integrator: beeman.
  • Cell manager: linkedcell, mode auto.

Run the simulation! this simulation will take more or less 2 days!! We will have to wait and prepare the other part ;)

Go to the Project part!! :)


Comment Part!

hannah?22 March 2011, 09:32

TEMPSCALING: For the first simulation, the new idea is that the sample is going to be "tempscaled" or set to a certain temperature during the simulation. In this first run, the sample will be set to 5 K every 10 steps.

When you change the control file and instead do the tempscaling every 50 steps, the graph of temperature is still very up and down, but it is significantly more centered around five, and the peaks are less severe.

If the file is changed to every 500 steps, the graph again has smaller peaks than the first one, but the entire graph is centered more around 5.5 K.

PROFILES: TEMPERATURE In the first simulation, there are 20 bins, or the z axis is cut into 20 equal pieces to be analyzed. When the bins are changed to 10, the peaks make a less smooth curve (which makes sense because you're getting less accurate data). With only 10 pieces of the z axis, you're getting an average temperature for a bigger piece of the axis, which may have completely different temperatures at one end or the other. Then with 45 bins, the graph's peaks are very smiliar, and the curve of the line connecting the peaks would be very smooth. However, this curve would almost be a horizontal line, and does not give us a very clear picture of what's happening to the sample. For this reason, I think the best number to choose would be 20, because there are enough pieces for the data to be accurate enough, and the graph shows a clear trend in temperature.

STRESS The potential tells the simulation about how the atoms interact. This information is neccesary during the stress profile run, because how the atoms interact determines how much stress and pressure there is during the simulation. If the atoms are very weakly attracted and movable, the stress would be very different than if the atoms were rigidly bound together.

''.Keep(str_replace(array('$Chrono','$PostTo','$AccessCode'), array('chrono','',RandomAccess()), FmtPageName($GLOBALS['CommentBoxFmt'],$pagename)))

University

Personal

edit SideBar