-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathin.cutsic_eq_Ltool.lmp
executable file
·253 lines (178 loc) · 8.07 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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
shell mkdir pre_cut
log pre_cut/pre_cut.log
###############################################################
# Input file for nanocutting of Cubic SiC with a diamond tool #
# Chris Fung, June 2013 #
# Input Variable: #
# rA rake angle of diamond tool (in degree) #
###############################################################
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 # lattice constant of 3C-SiC
variable b equal 3.571 # lattice constant of diamond
variable c equal $a/$b # ratio of a and b
variable dx equal 70*$c # datum position x of tool region
variable dy equal 5*$c # datum position y of tool region
variable lx equal 31 # x dimension of tool region
variable ly equal 31 # y dimension of tool region
variable dx1 equal ${dx}+${lx} # xhi of tool region
variable dy1 equal ${dy}+${ly} # yhi of tool region
variable lr equal 4 # tool edge radius
variable rx equal ${dx}+${lr} # x-coordinate of the centre of edge radius
variable ry equal ${dy}+${lr} # y-coordinate of the centre of edge radius
variable rakeangle equal ${rA}/180*PI # degree of rake angle / 180 * PI
variable rkshiftX equal -${ly}*tan(${rakeangle}) # x offset for tiling
variable frx equal ${rx}-${lr}*cos(${rakeangle})
variable fry equal ${ry}-${lr}*sin(${rakeangle})
variable clearangle equal 10/180*PI # degree of clearance angle / 180 * PI
variable fcx1 equal ${rx}+${lr}*sin(${clearangle}) # xlo of trimfc for clearance face
variable fcx2 equal ${fcx1}+${ly} # xhi of trimfc
variable fcy1 equal ${ry}-${lr}*cos(${clearangle}) # ylo of trimfc
variable fcy2 equal ${fcy1}+${lx}*tan(${clearangle}) # yhi of trimfc
variable bx1 equal ${dx1}-1 # xlo of fixed boundary of tool region
variable bx2 equal ${bx1}-3 # xlo of thermostatic boundary of tool region
variable by1 equal ${dy1}-1 # ylo of fixed boundary of tool region
variable by2 equal ${by1}-3 # ylo of thermostatic boundary of tool region
variable wh equal 10 # height of workpiece region
variable doc equal ${wh}-${dy}
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 ${frx} ${dx1} ${dy} ${dy1} INF INF
region rakeface prism ${frx} ${dx1} ${fry} ${dy1} INF INF ${rkshiftX} 0 0
region cut_toolR cylinder z ${rx} ${ry} 4 INF INF
region trimboxfr block EDGE ${rx} EDGE ${fry} INF INF side out
region trimboxfc block ${rx} EDGE EDGE ${fcy1} INF INF side out
region cut_toolBR union 2 cut_toolB rakeface
region cut_toolTr intersect 3 cut_toolBR trimboxfr trimboxfc
region cut_tool union 2 cut_toolTr cut_toolR
region trimfc prism ${fcx1} ${fcx2} ${fcy1} ${fcy2} 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 trimfc
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 ${wh} INF INF
region wpbottom block 0 65 0 1 INF INF
region wpxEnd block 0 1 0 ${wh} INF INF
region wpTSbottom block 1 65 1 2 INF INF
region wpTSxEnd block 1 2 1 ${wh} 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 pre_cut/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 pre_cut/dump.cutsic_eq.doc${doc}.*.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 pre_cut/cut_sic_eq.restart.0000
restart 1000 pre_cut/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 pre_cut/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 pre_cut/dump.cutsic.doc${doc}.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 pre_cut/cut_sic.restart.0000
restart 1000 pre_cut/cut_sic.restart
#run 0
######################################
# SIMULATION DONE
print "All done"
shell echo "Cutting simulation has completed -- cut_sic_eq" | 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"