Sie sind auf Seite 1von 6

# Input file for uniaxial compressive loading of single crystal aluminum

# Mark Tschopp, November 2010

# ------------------------ INITIALIZATION ----------------------------


units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 3.61

# ----------------------- ATOM DEFINITION ----------------------------


lattice fcc ${latparam}
region whole block 0 10 0 10 0 10
create_box 1 whole

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
create_atoms 1 region upper

# ------------------------ FORCE FIELDS ------------------------------


pair_style meam
pair_coeff * * Library.meam Cu Cu .meam Cu

# ------------------------- SETTINGS ---------------------------------


compute csym all centro/atom fcc
compute peratom all pe/atom

######################################
# EQUILIBRATION
reset_timestep 0
timestep 0.005
velocity all create 300 12345 mom yes rot no
fix 1 all npt temp 300 300 1 iso 0 0 1 drag 1

# Set thermo output


thermo 100
thermo_style custom step lx ly lz press pxx pyy pzz pe temp

# Run for at least 10 picosecond (assuming 1 fs timestep)


run 4000
unfix 1

# Store final cell length for strain calculations


variable tmp equal "lx"
variable L0 equal ${tmp}
print "Initial Length, L0: ${L0}"

######################################
# DEFORMATION
reset_timestep 0

fix 1 all npt temp 300 300 1 y 0 0 1 z 0 0 1 drag 1


variable srate equal 1.0e10
variable srate1 equal "-v_srate / 1.0e12"
fix 2 all deform 1 x erate ${srate1} units box remap x

# Output strain and stress info to file


# for units metal, pressure is in [bars] = 100 [kPa] = 1/10000 [GPa]
# 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 Cu_comp_100.def1.txt screen
no

# Use cfg for AtomEye


dump 1 all custom 250 dump.Cu.comp.* id xs ys zs c_csym c_peratom fx fy fz

# Display thermo
thermo 100
thermo_style custom step v_strain temp v_p2 v_p3 v_p4 ke pe press

run 4000

######################################
# 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.

LAMMPS (5 Nov 2010)


# Input file for uniaxial compressive loading of single crystal aluminum
#Mark Tschopp, November 2010

# ----- INITIALIZATION -----


units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 4.05

# ----- 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

# ----- FORCE FIELDS -----


pair_style eam/alloy
pair_coeff * * Al99.eam.alloy Al
# -----SETTINGS -----
compute csym all centro/atom fcc
compute peratom all pe/atom

# ----- 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

# Set Thermo Input


thermo 1000
thermo_style custom step lx ly lz press pxx pyy pzz pe temp

# Run Time (At least 10 picoseconds)


run 20000
Memory usage per processor = 2.55571 Mbytes
Step Lx Ly Lz Press Pxx Pyy Pzz PotEng Temp
0 40.5 40.5 40.5 2496.1233 2446.9902
2534.6541 2506.7256 -13440 300
1000 40.558342 40.558342 40.558342 731.50829 755.55351
696.37101 742.60035 -13363.301 169.49172
2000 40.574199 40.574199 40.574199 106.78935 -46.253007
296.26883 70.352219 -13356.097 178.17311
3000 40.579471 40.579471 40.579471 314.81803 314.71612
292.22553 337.51245 -13347.025 183.623
4000 40.586697 40.586697 40.586697 107.84524 52.829414
112.73441 157.9719 -13340.823 194.61149
5000 40.593224 40.593224 40.593224 172.67874 158.86784
199.13978 160.02861 -13334.364 204.85854
6000 40.601567 40.601567 40.601567 56.953653 -6.2830484
-16.301111 193.44512 -13327.55 213.93605
7000 40.60782 40.60782 40.60782 31.891969 35.437938
63.396951 -3.1589825 -13320.86 222.48071
8000 40.616908 40.616908 40.616908 -244.41321 -212.11716
-305.70692 -215.41555 -13317.384 236.254
9000 40.618876 40.618876 40.618876 13.561356 111.07353
-29.999797 -40.389663 -13313.071 247.18002
10000 40.625506 40.625506 40.625506 -125.06329 -105.4566
-93.514599 -176.21866 -13308.875 256.93613
11000 40.631525 40.631525 40.631525 -75.690987 141.36136
14.068057 -382.50238 -13303.582 263.00631
12000 40.631815 40.631815 40.631815 79.38005 63.796397
144.76416 29.579595 -13299.23 269.23326
13000 40.637408 40.637408 40.637408 -152.9113 -399.37081
-31.484802 -27.878283 -13298.162 280.0582
14000 40.636962 40.636962 40.636962 237.09239 58.799334
196.78768 455.69014 -13294.166 283.43969
15000 40.641455 40.641455 40.641455 105.44503 114.55343
142.4659 59.315739 -13291.527 287.73561
16000 40.643072 40.643072 40.643072 82.986611 -130.36308
288.9926 90.330318 -13288.384 289.39655
17000 40.64789 40.64789 40.64789 -12.310673 -112.67891
-132.8659 208.6128 -13289.081 296.89271
18000 40.644319 40.644319 40.644319 269.36896 180.82571
218.97472 408.30644 -13286.862 297.25615
19000 40.646772 40.646772 40.646772 166.57104 20.881491
-79.807885 558.63952 -13287.577 301.80321
20000 40.649126 40.649126 40.649126 116.57534 -108.86953
156.54682 302.04873 -13284.646 298.01867
Loop time of 79.3677 on 8 procs for 20000 steps with 4000 atoms

Pair time (%) = 63.798 (80.3828)


Neigh time (%) = 0 (0)
Comm time (%) = 12.2773 (15.4689)
Outpt time (%) = 0.00290701 (0.00366271)
Other time (%) = 3.28956 (4.1447)

Nlocal: 500 ave 500 max 500 min


Histogram: 8 0 0 0 0 0 0 0 0 0
Nghost: 2930 ave 2930 max 2930 min
Histogram: 8 0 0 0 0 0 0 0 0 0
Neighs: 35000 ave 36430 max 33540 min
Histogram: 2 0 1 1 0 0 1 1 0 2
FullNghs: 0 ave 0 max 0 min
Histogram: 8 0 0 0 0 0 0 0 0 0

Total # of neighbors = 280000


Ave neighs/atom = 70
Neighbor list builds = 0
Dangerous builds = 0
unfix 1

# Store final cell length for strain calculations


variable tmp equal "lx"
variable L0 equal ${tmp}
variable L0 equal 40.64912642
print "Initial Length, L0: ${L0}"
Initial Length, L0: 40.64912642

# -----DEFORMATION -----
reset_timestep 0
fix 1 all npt temp 300 300 1 y 0 0 1 z 0 0 1 drag 1
variable srate equal 1e10

#The only difference between this compressive example and


#the previous tensile example is the negative sign in the
#definition of srate1, seen below.

variable srate1 equal "-v_srate / 1e12"


fix 2 all deform 1 x erate ${srate1} units box remap x
fix 2 all deform 1 x erate -0.01 units box remap x

# Output strain and stress information to file.


# For metal units, pressure is [bars] = 100 [kPa] = 1/10000 [GPa]
# p2, p3, and 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_comp.def1.txt
screen no

# Dump to cfg for AtomEye post processing


dump 1 all cfg 250 dump.comp_*.cfg id type xs ys zs c_csym c_peratom fx fy
fz
dump_modify 1 element Al

# Display thermo information


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.01 302.82586 -0.61033601 0.054190295 -0.0032380699
156.53411 -13286.645 1864.6126
2000 -0.02 298.61071 -1.2849368 -0.00313581 0.026906426
154.35526 -13281.302 4203.8871
3000 -0.03 302.18611 -1.8380212 -0.011375474 0.0087206074
156.20342 -13277.349 6135.5869
4000 -0.04 297.31028 -2.4628066 -0.0095117003 -0.026443669
153.68305 -13266.262 8329.2065
5000 -0.05 294.28788 -3.0927297 -0.0021071467 -0.050407399
152.12073 -13253.309 10484.147
6000 -0.06 301.6804 -3.7194292 -0.01909606 0.018996497
155.94201 -13242.696 12398.429
7000 -0.07 298.64768 -4.4073614 0.019050091 0.051288755
154.37437 -13223.403 14456.742
8000 -0.08 298.53159 -5.0314374 0.046526108 0.0042843939
154.31436 -13202.054 16602.09
9000 -0.09 289.63258 -5.5876729 0.0064037479 0.07394267
149.71436 -13172.278 18357.755
10000 -0.1 284.07377 -5.8774427 0.011876434 0.017658887
146.84095 -13140.895 19493.024
11000 -0.11 320.11761 -4.2791145 0.062847323 0.072604489
165.47242 -13130.428 13812.209
12000 -0.12 384.47793 -0.26899312 0.06384105 0.075858441
198.74099 -13172.063 430.97876
13000 -0.13 406.8698 -2.3913058 -0.036697295 -0.037783423
210.31561 -13200.26 8219.2883
14000 -0.14 385.84693 -3.3014902 0.059581512 -0.048723245
199.44864 -13199.524 10968.773
15000 -0.15 365.16317 -4.0204884 0.058056622 0.017209135
188.75697 -13191.173 13150.742
16000 -0.16 352.29941 -4.8141755 0.052769795 -0.039907224
182.10755 -13179.442 16004.377
17000 -0.17 333.83554 -5.4774396 0.014373592 -0.0069549415
172.56337 -13157.84 18233.403
18000 -0.18 326.9576 -6.0482935 0.022646093 0.050253999
169.00809 -13135.624 19917.978
19000 -0.19 328.65703 -5.4349022 -0.052976878 0.02948022
169.88654 -13113.032 18194.663
20000 -0.2 402.8138 -1.2165489 0.030833241 -0.037641657
208.21901 -13158.984 4077.8578
Loop time of 95.4143 on 8 procs for 20000 steps with 4000 atoms

Pair time (%) = 74.0979 (77.6591)


Neigh time (%) = 0.127079 (0.133187)
Comm time (%) = 11.7939 (12.3607)
Outpt time (%) = 2.51201 (2.63274)
Other time (%) = 6.8834 (7.21423)
Nlocal: 500 ave 507 max 495 min
Histogram: 2 1 0 0 2 1 1 0 0 1
Nghost: 2485.88 ave 2494 max 2479 min
Histogram: 1 1 2 0 1 0 0 1 0 2
Neighs: 35096 ave 36398 max 34125 min
Histogram: 2 0 2 1 0 0 0 2 0 1
FullNghs: 70196.5 ave 71230 max 69522 min
Histogram: 3 0 0 0 2 1 1 0 0 1

Total # of neighbors = 561572


Ave neighs/atom = 140.393
Neighbor list builds = 62
Dangerous builds = 0

print "All done"


All done

Das könnte Ihnen auch gefallen