forked from JeroenMulkers/lammps_graphene
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tensiletest.lmp
81 lines (74 loc) · 3.26 KB
/
tensiletest.lmp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
################################################################################
# GRAPHENE: TENSILE TEST
################################################################################
#
# This is a lammps input file to simulate the stretching or compression of
# graphene. The output data can be used to calculate the Young's modulus and the
# breaking stress/strain. Buckling of a graphene sheet can be studied by
# compressing the sheet.
#
# When using this script, make sure that lammps is installed with the USER-REAXC
# and the MANYBODY packages.
#
# Date: 28/03/2016
# Author: Jeroen Mulkers
# Mail: jeroen.mulkers@uantwerpen.be
#
################################################################################
# UNITS
# 'real' units are needed when using reax/c. The default time step (1fs) for
# real units is used. Some useful conversion factors are defined.
units real
timestep 1
variable fpress equal 0.000101325 # atm -> GPa
variable fenergy equal 0.043 # Kcal/mole -> eV
# GRAPHENE SHEET
# The atom positions and the simulation box size will be read from a data file.
# Reactive force fields (reaxFF) are used to describe the interaction between
# the carbon atoms.(The pair_style reax is deprecated. so we use the modern
# reax/c implementation)
dimension 3
boundary p p f
atom_style charge
read_data graphene.dat
pair_style reax/c NULL checkqeq no
pair_coeff * * ffield.reax C
# OUTPUT
# Calculate the average total, kinetic and potential energy per atom. Stress and
# strain are defined in x and y direction. When calculating the stress, we
# assume that the thickness of graphene is 3.35A.
variable tmp equal lx
variable lx0 equal ${tmp}
variable tmp equal ly
variable ly0 equal ${tmp}
variable etotal equal etotal/atoms*${fenergy} #eV/atom
variable pe equal pe/atoms*${fenergy} #eV/atom
variable ke equal ke/atoms*${fenergy} #eV/atom
variable strainx equal (lx-${lx0})/${lx0}
variable strainy equal (ly-${ly0})/${ly0}
variable stressx equal -pxx*(lz/3.35)*${fpress} #GPa
variable stressy equal -pyy*(lz/3.35)*${fpress} #GPa
thermo_style custom step time temp etotal press v_etotal v_pe v_ke &
v_strainx v_stressx v_strainy v_stressy
# TEMPERATURE SETTINGS
variable temp index 300
variable seed index 1717
velocity all create ${temp} ${seed} dist uniform
# EQUILIBRATION
# Relaxation of the system will be done in a NPT ensemble. The size of the
# simulation box can change in x and y direction to resolve stresses. The number
# of time steps should be large enough to relax the system in your final
# simulation but can be small for debugging purposes.
fix fnpt all npt temp ${temp} ${temp} 10 x 0 0 500 y 0 0 500
thermo 1
run 1000
# DEFORMATION
# Rescale the box to simulate stretching (scale > 1) or compressing (scale<1)
# of the graphene sheet. Again, a NPT ensemble is used. But this time the size
# of the box can only change in the direction perpendicular to the direction of
# deformation. Change x and y to switch the deformation direction.
fix boxdeform all deform 1 x scale 2 remap x
fix fnpt all npt temp ${temp} ${temp} 10 y 0 0 500
dump 1 all atom 10 dmp.lammpstrj
thermo 1
run 10000