LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Nanocutting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Nanocutting


From: Fabian Duarte <Fabian.Duarte@...2160...>
Date: Thu, 17 Aug 2017 18:59:44 +0000

Dear all,


I am currently new in LAMMPS and I am trying to run a nanocutting simulation. What I want to do is to rotate the workpiece about the y-axis and the tool move linearly in the z-axis. Attached you will find an image.


The problem in using the fix move rotate command on the workpiece is that I can't perform the fix nve time integration on the workpiece (so when the tool moves across the workpiece, no cutting takes place). I can't do time integration twice on the same atoms.


For that reason, I though it would be useful to use the region move rotate command to rotate the workpiece and then use fix nve to perform time integration on the workpiece. For some reason, when I apply the region move rotate command on the workpiece I get no rotation and I am not sure why. Does anyone know how to solve this issue?


I have attached the script. Any help would be highly appreciated.


Kind Regards,

Fabian

# Find minimum energy fcc configuration
# Mark Tschopp, 2010
# This requires the variable latconst to be input via the command line
# e.g., lmp_win_no-mpi -var latconst 4 < calc_fcc_ver1.in

# ---------- Initialize Simulation --------------------- 
clear 
units metal 
dimension 3 
boundary p p p 
atom_style atomic 
atom_modify map array
timestep 0.0005




variable latconst equal 3.2506

# ---------- Create Atoms ---------------------
region simbox block -30 30 -20 85 -50 80
#Creating tool


lattice 	custom ${latconst}  a1 1 0 0 a2 0 1 0 a3 0 0 1 basis 0 0 0 basis 0.5 0.5 0.5



#region tool union 3 red blue yellow
region 1 prism -2 2 21 26 -15 -7 0 0 -3
region 2 prism -2 2 24 80 -9 -6 0 0 -10
region 3 intersect 2 1 2
region tool union 2 1 2



create_box 2 simbox

create_atoms 2 region tool basis 1 2 basis 2 1


lattice 	custom ${latconst}  a1 1 0 0 a2 0 1 0 a3 0 0 1 basis 0 0 0 basis 0.5 0.5 0.5

#region workpiece block -20 0 10 20 0 20

variable theta equal 4*dt*step


region boundary cylinder y 0 0 6 -5 -3 rotate v_theta 0 0 0 0 1 0
region thermw cylinder y 0 0 6 -3 -1 rotate v_theta 0 0 0 0 1 0
region newton cylinder y 0 0 6 -1 20 rotate v_theta 0 0 0 0 1 0

region workpiece union 3 boundary thermw newton



create_atoms 2 region workpiece basis 1 2 basis 2 1
delete_atoms region 3
delete_atoms region 2

group tool region tool

group boundary region boundary
group thermw region thermw
group newton region newton

group workpiece union boundary thermw newton

group moving union newton thermw







# ---------- Define Interatomic Potential --------------------- 
pair_style meam 
pair_coeff * * library.meam Zr Cu ZrCu.meam Zr Cu

#pair_style eam/fs 
#pair_coeff * * Cu-Zr_2.eam.fs Zr Cu

#minimize 1.0-e4  1.0e-4 1000 100000



neighbor 2.0 bin 
neigh_modify delay 10 check yes 
 
# ---------- Define Settings --------------------- 
#compute eng all pe/atom 
#compute eatoms all reduce sum c_eng 

dump		1 all atom 100 dump.structure


# ---------- Run Minimization --------------------- 
#reset_timestep 0 
#fix 1 all box/relax iso 0.0 vmax 0.001
#thermo 10 
#thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms 
#min_style cg 

# initialize temperature, except for fixed atoms
velocity moving create 293 58142275 units box







fix thermw thermw langevin 293.0 293.0 0.05 832743
fix tempw2 newton  langevin 293.0 293.0 0.05 928349

run 15000


variable natoms equal "count(all)" 
variable teng equal "c_eatoms"
variable length equal "lx"
variable ecoh equal "v_teng/v_natoms"



unfix thermw
unfix tempw2

variable A equal 2
variable T equal 0.1
variable omega equal 2.0*PI/$T
variable x equal swiggle(100*dt*step,$A,$T)
variable v equal v_omega*($A-cwiggle(0.0,$A,$T))

variable vmax equal 500
variable sin equal abs(sin(0.5*v_omega*dt*step))
variable velocity equal (v_vmax*v_sin)

fix md moving nve
fix 1 tool move variable NULL NULL NULL NULL NULL v_velocity

#fix 3 boundary move rotate 0 0 0 0 1 0 ${T}







fix 4 tool setforce 0 0 0



compute ke all ke/atom

variable fx equal fcm(tool,x)
variable fy equal fcm(tool,y)
variable fz equal fcm(tool,z)


thermo 1000
thermo_style custom step temp pe ke v_fx v_fy v_fz



dump  2  all custom 10 v_ht.*.lammpstrj id type xu yu zu vx vy vz c_ke 
run 5000
#print "Total energy (eV) = ${teng};"
#print "Number of atoms = ${natoms};"
print "Lattice constant (Angstoms) = ${length};"
#print "Cohesive energy (eV) = ${ecoh};"



print "All done!" 

Attachment: Image.JPG
Description: Image.JPG