Professional Documents
Culture Documents
Uniaxial Tension
From EVOCD
Contents
1 Questions / Comments
2 Abstract
3 INPUT
3.1 Description of Simulation
3.2 LAMMPS input script
4 OUTPUT
4.1 LAMMPS logfile
4.2 LAMMPS datafile
4.3 LAMMPS dumpfile
5 POST-PROCESSING
5.1 Stress-Strain Plot
5.2 Deformation Movie
6 Questions and Answers?
7 Next Tutorial
8 Go Back
9 Acknowledgments
10 References
Questions / Comments
Please contact me if you have any questions or comments about this tutorial.
Abstract
This example script shows how to run an atomistic simulation of uniaxial tensile loading of an aluminum single crystal
oriented in the <100> direction. This example uses a parallel molecular dynamics code, LAMMPS[1]. These scripts
were initially used to study dislocation nucleation in single crystal aluminum and copper[2][3][4].
INPUT
Tensile Loading of an Aluminum
Description of Simulation Single Crystal. Movie showing
deformation of single crystal
This molecular dynamics simulation first generates a simulation cell with fcc atoms with <100> orientations in the x, y, aluminum loaded in the <100>
and z-directions. For this example, the simulation cell size is 10 lattice units in each direction, i.e., 4000 total atoms. direction at a strain rate of 1010 s-
Larger simulation cell sizes should be used to converge the dislocation nucleation stress values and to not influence the 1 and a temperature of 300 K.
dislocation nucleation mechanism. The potential used here is the Mishin et al. (1999) aluminum potential[5]. The
equilibration step allows the lattice to expand to a temperature of 300 K with a pressure of 0 bar at each simulation cell
boundary. Then, the simulation cell is deformed in the x-direction at a strain rate of 10^10 1/s, while the lateral boundaries are controlled using the NPT
equations of motion to zero pressure. The stress and strain values are output to a separate file, which can be imported in a graphing application for plotting.
The cfg dump files include the x, y, and z coordinates, the centrosymmetry values, the potential energies, and forces for each atom. This can be directly
visualized using AtomEye[6].
This input script was run using the Aug 2015 version of LAMMPS. Changes in some commands in more recent versions may require revision of the input
script. To run this script, store it in "in.tensile.txt" and then use "lmp_exe < in.tensile.txt" in a UNIX environment where "lmp_exe" refers to the LAMMPS
executable.
https://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Tension 1/7
28/3/2018 Uniaxial Tension - EVOCD
units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 4.05
######################################
# EQUILIBRATION
reset_timestep 0
timestep 0.001
velocity all create 300 12345 mom yes rot no
fix 1 all npt temp 300 300 1 iso 0 0 1 drag 1
######################################
# DEFORMATION
reset_timestep 0
# Display thermo
thermo 1000
thermo_style custom step v_strain temp v_p2 v_p3 v_p4 ke pe press
run 20000
######################################
# SIMULATION DONE
print "All done"
OUTPUT
LAMMPS logfile
The log.lammps file should look like this below. Notice that the 20 ps (20,000 fs) equilibration step brought the temperature of the simulation cell up to 300
K. The corresponding deformation went up to a strain of 0.2. The thermo command was set for every 1000 timesteps, so any plots should be made from the
data included in the datafile.
https://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Tension 2/7
28/3/2018 Uniaxial Tension - EVOCD
# ----------------------- ATOM DEFINITION ----------------------------
lattice fcc ${latparam}
lattice fcc 4.05
Lattice spacing in x,y,z = 4.05 4.05 4.05
region whole block 0 10 0 10 0 10
create_box 1 whole
Created orthogonal box = (0 0 0) to (40.5 40.5 40.5)
2 by 2 by 2 processor grid
region upper block INF INF INF INF INF INF units box
lattice fcc ${latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
lattice fcc 4.05 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
Lattice spacing in x,y,z = 4.05 4.05 4.05
create_atoms 1 region upper
Created 4000 atoms
######################################
# EQUILIBRATION
reset_timestep 0
timestep 0.001
velocity all create 300 12345 mom yes rot no
fix 1 all npt temp 300 300 1 iso 0 0 1 drag 1
######################################
# DEFORMATION
reset_timestep 0
https://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Tension 3/7
28/3/2018 Uniaxial Tension - EVOCD
# p2, p3, p4 are in GPa
variable strain equal "(lx - v_L0)/v_L0"
variable p1 equal "v_strain"
variable p2 equal "-pxx/10000"
variable p3 equal "-pyy/10000"
variable p4 equal "-pzz/10000"
fix def1 all print 100 "${p1} ${p2} ${p3} ${p4}" file Al_SC_100.def1.txt screen no
# Display thermo
thermo 1000
thermo_style custom step v_strain temp v_p2 v_p3 v_p4 ke pe press
run 20000
Memory usage per processor = 2.8622 Mbytes
Step strain Temp p2 p3 p4 KinEng PotEng Press
0 -8.7965858e-11 298.01867 0.010886953 -0.015654682 -0.030204873 154.04923 -13284.646 116.57534
1000 0.0099999999 301.40099 0.67990399 0.067064258 0.0053203864 155.79758 -13283.836 -2507.6288
2000 0.02 298.01046 1.2830198 0.019592784 -0.036714858 154.04498 -13276.743 -4219.6592
3000 0.03 304.39575 1.9202839 0.064889677 0.016160978 157.34561 -13271.94 -6671.115
4000 0.04 293.49046 2.5079447 -0.011621532 -0.045248722 151.70854 -13255.553 -8170.2481
5000 0.05 299.61448 3.1080399 -0.0063053351 -0.001951119 154.87412 -13245.404 -10332.611
6000 0.06 301.13685 3.7262713 -0.018319706 0.058027821 155.66105 -13230.48 -12553.265
7000 0.07 304.50008 4.3068752 0.036084841 0.022188973 157.39954 -13214.12 -14550.497
8000 0.08 301.24768 4.8543157 -0.0043461496 0.0099095843 155.71833 -13192.071 -16199.597
9000 0.09 295.90445 5.3741975 -0.0084256638 -0.013966722 152.95636 -13166.694 -17839.35
10000 0.1 292.31188 5.8552584 -0.023696478 -0.020282681 151.09932 -13139.944 -19370.931
11000 0.11 298.84284 6.4501419 0.017547204 0.015913195 154.47525 -13116.23 -21612.008
12000 0.12 295.8812 6.918376 -0.027979731 0.033011555 152.94434 -13085.401 -23078.026
13000 0.13 296.6501 7.4105164 0.040017275 0.063746831 153.3418 -13054.406 -25047.602
14000 0.14 291.84214 7.7838516 0.010140057 -0.050282654 150.85651 -13018.661 -25812.363
15000 0.15 290.68698 7.9945223 0.04870559 0.076553482 150.25939 -12983.262 -27065.938
16000 0.16 377.39464 2.6003776 0.022766694 0.0045660696 195.07956 -13008.794 -8759.0346
17000 0.17 412.37758 1.2494147 -0.0087695036 0.018247454 213.16264 -13041.345 -4196.3088
18000 0.18 429.78685 0.95088514 -0.078803047 0.051915067 222.16169 -13073.821 -3079.9905
19000 0.19 427.62458 0.98387526 0.017524712 0.053337669 221.04399 -13096.987 -3515.7922
20000 0.2 410.07663 1.1025637 0.010470766 -0.082932084 211.97325 -13109.962 -3433.6746
Loop time of 96.4415 on 8 procs for 20000 steps with 4000 atoms
######################################
# SIMULATION DONE
print "All done"
All done
LAMMPS datafile
LAMMPS dumpfile
The following dumpfile in cfg format was also generated during this simulation.
https://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Tension 4/7
28/3/2018 Uniaxial Tension - EVOCD
H0(2,3) = 0 A
H0(3,1) = 0 A
H0(3,2) = 0 A
H0(3,3) = 40.6491 A
.NO_VELOCITY.
entry_count = 8
auxiliary[0] = csym
auxiliary[1] = peratom
auxiliary[2] = fx
auxiliary[3] = fy
auxiliary[4] = fz
26.982
Al
0.0493442 0.0581882 0.00323696 1.58804 -3.34266 0.196691 -0.804728 -0.0280286
0.0987502 0.00417997 0.00238952 0.827133 -3.34273 -0.475844 -0.270217 -0.120716
0.0989802 0.0523976 0.0521907 0.363772 -3.30304 -0.309005 -0.274515 -0.299433
0.0495058 0.102418 0.0536544 0.611128 -3.30518 0.162097 -0.42069 -0.15808
0.0995051 0.102793 0.00119416 0.614289 -3.28181 -0.406727 -0.192102 0.405813
0.0473774 0.0488825 0.10204 0.581043 -3.3709 0.135458 -0.205472 -0.294232
0.0989535 0.000697083 0.0977144 0.583569 -3.30702 -0.474259 0.0845695 0.400838
...
POST-PROCESSING
Stress-Strain Plot
The stress-strain curve in Figure 1 can be generated using the following MATLAB script:
d = dir('*.def1.txt');
for i = 1:length(d)
% Get data
fname = d(i).name;
A = importdata(fname);
strain = A.data(:,1);
stress = A.data(:,2:4);
% Generate plot
plot(strain,stress(:,1),'-or','LineWidth',2,'MarkerEdgeColor','r',...
'MarkerFaceColor','r','MarkerSize',5),hold on
plot(strain,stress(:,2),'-ob','LineWidth',2,'MarkerEdgeColor','b',...
'MarkerFaceColor','b','MarkerSize',5),hold on
plot(strain,stress(:,3),'-og','LineWidth',2,'MarkerEdgeColor','g',...
'MarkerFaceColor','g','MarkerSize',5),hold on
axis square
ylim([0 10])
set(gca,'LineWidth',2,'FontSize',24,'FontWeight','normal','FontName','Times')
set(get(gca,'XLabel'),'String','Strain','FontSize',32,'FontWeight','bold','FontName','Times')
set(get(gca,'YLabel'),'String','Stress (GPa)','FontSize',32,'FontWeight','bold','FontName','Times')
set(gcf,'Position',[1 1 round(1000) round(1000)])
The exportfig command refers to a script on MATLAB Central File website. You will need to go to the website and download the script into the current
directory for this to work.
Deformation Movie
This assumes that you already have AtomEye and ImageJ downloaded and installed.
Visualize the dumpfile in AtomEye by typing the following command, "/A dump.tensile_0.cfg" (UNIX).
https://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Tension 5/7
28/3/2018 Uniaxial Tension - EVOCD
Use the AtomEye options to select how you want to visualize deformation. In this example, the centrosymmetry parameter was used to show only
atoms in a non-centrosymmetric environment (see Fig. 2).
Use Alt+0 to activate centrosymmetric (csym) view.
Adjust threshold, or set of atoms to view, by using Shift+T. This will allow creation of a set for the current parameter (in this case, csym). Please
note that you need to adjust both lower and higher thresholds unless the atoms from following images that exceeds maximum value for the first
one will be not shown. You can make it 5 or 10.
Make atoms with values outside of the threshold invisible by using Ctrl+A.
Press 'y' within AtomEye to produce an animation script.
The folder "Jpg" now contains snapshots of all dumpfiles.
Open ImageJ
Drag the folder Jpg into ImageJ
Select "Convert to RGB" to keep the color from the AtomEye images.
Choose "yes" to load a stack.
Adjust the size as needed (Image/Adjust/Size)
Adjust frame rate as desired (Image/Stacks/Tools/Animation Options)
Save as Animated Gif file
A1: Interatomic potentials play a commanding role in the properties of molecular dynamics simulations. The most simple potential is the Lennard
Jones potential. The embedded atom method potential is a little more sophisticated and I would encourage you to look up the original papers by Mike
Baskes (1983, 1984) to examine how this common potential formulation was created. While there are an increasing number of potential formulations
out there now and an increasing number of potentials, the embedded atom method has been widely used over the years and still is. However, this
brings up the point that different potentials may give vastly different properties because each potential may have been formulated for a particular
problem. It is up to the user to decide whether the potential seems to give plausible results for their application or whether the initial fitting contains
properties that are important for their application.
Next Tutorial
Go to the next tutorial.
Go Back
Nanoscale
LAMMPS tutorials
Acknowledgments
The authors would like to acknowledge funding for this work through the Department of Energy.
References
https://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Tension 6/7
28/3/2018 Uniaxial Tension - EVOCD
1. ↑ S. Plimpton, "Fast Parallel Algorithms for Short-Range Molecular Dynamics," J. Comp. Phys., 117, 1-19 (1995).
2. ↑ Spearot, D.E., Tschopp, M.A., Jacob, K.I., McDowell, D.L., "Tensile strength of <100> and <110> tilt bicrystal copper interfaces," Acta Materialia
55 (2007) p. 705-714 (http://dx.doi.org/10.1016/j.actamat.2006.08.060).
3. ↑ Tschopp, M.A., Spearot, D.E., McDowell, D.L., "Atomistic simulations of homogeneous dislocation nucleation in single crystal copper," Modelling
and Simulation in Materials Science and Engineering 15 (2007) 693-709 (http://dx.doi.org/10.1088/0965-0393/15/7/001).
4. ↑ Tschopp, M.A., McDowell, D.L., "Influence of single crystal orientation on homogeneous dislocation nucleation under uniaxial loading," Journal of
Mechanics and Physics of Solids 56 (2008) 1806-1830. (http://dx.doi.org/10.1016/j.jmps.2007.11.012).
5. ↑ Y. Mishin, D. Farkas, M.J. Mehl, and D.A. Papaconstantopoulos, "Interatomic potentials for monoatomic metals from experimental data and ab
initio calculations," Phys. Rev. B 59, 3393 (1999).
6. ↑ J. Li, "AtomEye: an efficient atomistic configuration viewer," Modelling Simul. Mater. Sci. Eng. 11 (2003) 173.
https://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Tension 7/7