-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathin.cutsic_planar_grooving.lmp
269 lines (187 loc) · 7.19 KB
/
in.cutsic_planar_grooving.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# Input file for nanocutting of Cubic SiC with a diamond tool
# Chris Fung, June 2013 (last update: Mar 219)
# ------------------------ GPU SETTINGS ----------------------------
#package cuda gpu/node 1 0
#package omp 2 force/neigh
# ------------------------ INITIALIZATION ----------------------------
units metal
dimension 3
boundary s s p
atom_style atomic
variable a equal 4.3667
variable b equal 3.5716
variable c equal $a/$b
variable dx equal 70*$c
variable dy equal 10*$c
variable dx1 equal 11+${dx}
variable dy1 equal ${dy}+11
variable rx equal ${dx}+4
variable ry equal ${dy}+4
variable bx1 equal ${dx1}-1
variable bx2 equal ${bx1}-1
variable by1 equal ${dy1}-1
variable by2 equal ${by1}-1
lattice fcc $a
region whole block 0 99 0 27 0 18
create_box 3 whole
# ----------------------- ATOM DEFINITION ----------------------------
# create C atoms for diamond tool
lattice diamond $b orient x 1 0 0 orient y 0 1 0 origin 0 0 0.4
# define the shape, dimension, and initial position of cutting tool
region cut_toolB block ${dx} ${dx1} ${dy} ${dy1} INF INF
region cut_toolR cylinder z ${rx} ${ry} 4 INF INF
region trimbox1 block ${dx} ${rx} ${dy} ${ry} INF INF side out
region cut_toolTr intersect 2 cut_toolB trimbox1
region cut_tool union 2 cut_toolTr cut_toolR
region trimbox2 prism 4.35 15.65 0 1 INF INF 6 0 0
#define boundaries of cutting tool
region ctTop block ${dx} ${dx1} ${by1} ${dy1} INF INF
region ctxEnd block ${bx1} ${dx1} ${dy} ${dy1} INF INF
region ctTSbottom block ${dx} ${bx1} ${by2} ${by1} INF INF
region ctTSxEnd block ${bx2} ${bx1} ${dy} ${by1} INF INF
region ctbound union 2 ctTop ctxEnd
region ctTSbound union 2 ctTSbottom ctTSxEnd
# create C atoms of diamond tool and make a nano-groove on the flank face
create_atoms 1 region cut_tool
# unit = length of a diamond unit cell
variable gy equal ${dy}+${grooveDepth}
variable gz equal 9*$c
region p1 plane 0 ${gy} ${gz} 0 -1 1
region p2 plane 0 ${gy} ${gz} 0 -1 -1
#region p3 plane ${dx} 0 0 1 0 0
region groove intersect 2 p1 p2
delete_atoms region groove
delete_atoms region trimbox2
group gpCTall region cut_tool
group gpCTbd region ctbound
group gpCTtsbd region ctTSbound
group gpCTmob subtract gpCTall gpCTbd gpCTtsbd
group gpCTeq subtract gpCTall gpCTbd
print "diamond tool created"
#------------------------------------------------------------
# define the lattice of cubic SiC (two atom types form two interpenetrating face-centered cubic lattices)
# define the shape and dimension of the workpiece
lattice fcc $a origin 0 0 0 orient x 1 0 0 orient y 0 1 0
# define the boundaries for workpiece
region workpiece block 0 65 0 15 INF INF
region wpbottom block 0 65 0 1 INF INF
region wpxEnd block 0 1 0 15 INF INF
region wpTSbottom block 1 65 1 2 INF INF
region wpTSxEnd block 1 2 1 15 INF INF
region wpbound union 2 wpbottom wpxEnd
region wpTSbound union 2 wpTSbottom wpTSxEnd
# create Si atoms for SiC workpiece
create_atoms 2 region workpiece
# offset origin for 1/4 unit cell for C atoms
lattice fcc $a origin 0.25 0.25 0.25 orient x 1 0 0 orient y 0 1 0
create_atoms 3 region workpiece
# groups atoms
group gpWPall region workpiece
group gpWPbd region wpbound
group gpWPtsbd region wpTSbound
group gpWPmob subtract gpWPall gpWPbd gpWPtsbd
print "Workpiece created"
#-------------------------------------------------
# define the mass of atoms
mass 1 12 #.0107 # C (g/mol)
mass 2 28 #.0855 # Si (g/mol)
mass 3 12 #.0107 # C (g/mol)
#group Si type 2
#group C type 1 3
lattice fcc $a origin 0 0 0
# ------------------------ FORCE FIELDS ------------------------------
pair_style tersoff
pair_coeff * * SiC_Erhart-Albe.tersoff C Si C
# ------------------------- SETTINGS ---------------------------------
######################################
# EQUILIBRATION
# set temperature at 300 K
group gpCTeq union gpCTmob gpCTtsbd
group gpWPeq union gpWPmob gpWPtsbd
group gpAlleq union gpCTeq gpWPeq
compute myCTtemp gpCTeq temp
compute myWPtemp gpWPeq temp
velocity gpAlleq create 300 102456 dist uniform
fix 1 gpCTeq nvt temp 300.0 300.0 0.1 # aniso 1.0 1.0 0.5
fix_modify 1 temp myCTtemp
fix 2 gpWPeq nvt temp 300.0 300.0 0.1 # aniso 1.0 1.0 0.5
fix_modify 2 temp myWPtemp
reset_timestep 0
timestep 0.001 # set 1 femtosecond per step
fix 3 gpWPbd move linear 0 0 0
fix 4 gpCTbd move linear -0.75 0 0 units box
fix 10 all balance 100 0.9 shift xy 10 1.05 out tmp.balance
fix 13 all property/atom mol ghost yes
set group gpCTmob mol 1
set group gpCTtsbd mol 2
set group gpCTbd mol 3
set group gpWPmob mol 4
set group gpWPtsbd mol 5
set group gpWPbd mol 6
# Display thermo
thermo 100
thermo_style custom step temp c_myCTtemp c_myWPtemp press etotal
#compute eCSP all centro/atom fcc
#compute atomke all ke/atom
dump e0dumpCSP all custom 500 dump.cutsic_eq.*.lammpstrj id type mol element x y z vx vy vz # c_atomke
dump_modify e0dumpCSP element C Si C
# backup initial state and every 1000 steps
#write_restart cut_sic_eq.restart.0000.*.mpiio
#restart 1000 cut_sic_eq.restart.*.mpiio
# Run for at least 10 picosecond
print "start run equilibration"
run 27000
print "Complete equilibration process"
unfix 1
unfix 2
unfix 3
unfix 4
uncompute myCTtemp
uncompute myWPtemp
undump e0dumpCSP
######################################
# DEFORMATION
# move the tool to closer
#displace_atoms gpCTall move -4.9 0 0
reset_timestep 0
timestep 0.0005
compute myCTmobtemp gpCTmob temp/partial 0 1 1
compute myWPmobtemp gpWPmob temp/partial 0 1 1
compute myCTTStemp gpCTtsbd temp
compute myWPTStemp gpWPtsbd temp/partial 0 1 1
# rescale the temperature of thermostatic boundaries to 300 K
fix 1 gpWPtsbd nvt temp 300.0 300.0 0.01 #iso 1.0 1.0 0.5
fix_modify 1 temp myWPTStemp
fix 2 gpCTtsbd nvt temp 300.0 300.0 0.01 #iso 1.0 1.0 0.5
fix_modify 2 temp myCTTStemp
fix 3 gpWPbd move linear 0 0 0
fix 4 gpCTbd move linear -$v 0 0 units box # cutting speed = v * 100 (m s^-1 in the x-direction)
group mobile union gpCTmob gpWPmob
fix 5 mobile nve
compute ke all ke/atom
fix 12 all ave/atom 10 50 500 c_ke
thermo 500
thermo_style custom step c_myCTmobtemp c_myCTTStemp c_myWPmobtemp c_myWPTStemp press etotal fmax fnorm
# 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
## Use cfg for AtomEye
#dump 1 all cfg 2000 dump.cutsic_*.cfg id type xs ys zs c_csym
# backup initial state and every 1000 steps
write_restart cut_sic.restart.0000
restart 1000 cut_sic.restart
# Display thermo
dump 0dumpCSP all custom 500 dump.cutsic.*.lammpstrj id type mol x y z vx vy vz f_12
dump_modify 0dumpCSP element C Si C
#write_restart cut_sic.restart.0000
#restart 1000 cut_sic.restart
reset_timestep 0
variable Nstep equal ceil(400000/$v)
run ${Nstep}
#run 133333 # if vx = -3.0
#run 200000 # if vx = -2.0
#run 400000 # if vx = -1.0
######################################
# SIMULATION DONE
print "All done"
shell curl -u ***API_KEY***: https://api.pushbullet.com/v2/pushes -d type=note -d title="Push from KhrisU" -d body="LAMMPS -- Simulation is finish"