-
Notifications
You must be signed in to change notification settings - Fork 0
/
in.cutsic_eq_Ltool.lmp
239 lines (168 loc) · 6.6 KB
/
in.cutsic_eq_Ltool.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
# Input file for nanocutting of Cubic SiC with a diamond tool
# Chris Fung, June 2013
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.571
variable c equal $a/$b
variable dx equal 70*$c
variable dy equal 5*$c
variable lx equal 31
variable ly equal 31
variable dx1 equal ${dx}+${lx}
variable dy1 equal ${dy}+${ly}
variable rakeangle equal 15/180*PI
variable rkshiftX equal -${ly}*tan(${rakeangle})
variable lr equal 4
variable rx equal ${dx}+${lr}-${lr}*tan(${rakeangle})
variable ry equal ${dy}+${lr}
variable clearangle equal 10/180*PI
variable tx1 equal ${rx}+${lr}*sin(${clearangle})
variable tx2 equal ${tx1}+${ly}
variable ty1 equal ${ry}-${lr}*cos(${clearangle})
variable ty2 equal ${ty1}+${lx}*tan(${clearangle})
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 47 0 9
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 rakeface prism ${dx} ${dx1} ${dy} ${dy1} INF INF ${rkshiftX} 0 0
region cut_toolR cylinder z ${rx} ${ry} 4 INF INF
region trimbox1a block EDGE ${rx} ${dy} ${ry} INF INF side out
region trimbox1b block EDGE EDGE EDGE ${ty1} INF INF side out
region cut_toolBR union 2 cut_toolB rakeface
region cut_toolTr intersect 3 cut_toolBR trimbox1a trimbox1b
region cut_tool union 2 cut_toolTr cut_toolR
region trimbox2 prism ${tx1} ${tx2} ${ty1} ${ty2} INF INF ${lx} 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
delete_atoms region trimbox2
group gpCTall region cut_tool
group gpCTbd region ctbound
group gpCTtsbd region ctTSbound
group gpCTmob subtract gpCTall gpCTbd gpCTtsbd
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 4.3667 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 10 INF INF
region wpbottom block 0 65 0 1 INF INF
region wpxEnd block 0 1 0 10 INF INF
region wpTSbottom block 1 65 1 2 INF INF
region wpTSxEnd block 1 2 1 10 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 4.3667 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 4.3667 origin 0 0 0
# ------------------------ FORCE FIELDS ------------------------------
#pair_style atomistica Tersoff
#pair_coeff * * C Si C
pair_style tersoff
pair_coeff * * SiC_Erhart-Albe.tersoff C Si C
# ------------------------- SETTINGS ---------------------------------
######################################
# EQUILIBRATION
# set temperature at 300 K
compute myCTtemp gpCTmob temp
compute myWPtemp gpWPmob temp
velocity all create 300 102456 dist uniform
fix 1 gpWPall nvt temp 300.0 300.0 0.05 #iso 1.0 1.0 0.5
fix 2 gpCTall nvt temp 300.0 300.0 0.05 #iso 1.0 1.0 0.5
reset_timestep 0
timestep 0.0005 # set 1 femtosecond per step
fix 3 gpWPbd move linear 0 0 0
fix 4 gpCTbd move linear 0 0 0
fix 10 all balance 100 0.9 shift xy 10 1.05 out tmp.balance.log
fix 13 all property/atom mol
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
#compute eCSP all centro/atom fcc
#compute atomke all ke/atom
dump e0dumpCSP all custom 1000 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
restart 1000 cut_sic_eq.restart
# Run for at least 10 picosecond
print "start run equilibration"
run 10000
unfix 1
unfix 2
unfix 3
unfix 4
print "Complete equilibration process"
#uncompute eCSP
#undump e0dumpCSP
######################################
# DEFORMATION
# move the tool to closer
#displace_atoms gpCTall move -4.9 0 0
reset_timestep 0
timestep 0.001
# rescale the temperature of thermostatic boundaries to 300 K
fix 1 all nve
fix 3 gpWPbd move linear 0 0 0
fix 4 gpCTbd move linear 0 0 0
# 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
# Display thermo
#thermo 100
#compute atomdisp all displace/atom
#compute atomstres all stress/atom
dump 0dumpCSP all custom 100 dump.cutsic.lammpstrj id type mol element x y z vx vy vz #c_atomdisp[4] c_atomstres[1] c_atomstres[2] c_atomstres[3] c_atomstres[4] c_atomstres[5] c_atomstres[6]
dump_modify 0dumpCSP element C Si C
#write_restart cut_sic.restart.0000
restart 1000 cut_sic.restart
#run 0
######################################
# SIMULATION DONE
print "All done"
shell echo "Cutting simulation has completed -- ${respath}" | mail -s "LAMMPS - simulation done" ***REMOVED***
shell curl -u ***REMOVED***: https://api.pushbullet.com/v2/pushes -d type=note -d device_iden="***REMOVED***" -d title="Push from KhrisU" -d body="LAMMPS -- Simulation is finish"