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

Re: [lammps-users] Nanocutting

From: Fabian Duarte <Fabian.Duarte@...2160...>
Date: Thu, 24 Aug 2017 06:58:14 +0000

Thank you for the last reply.

I have attempted to split the cylinder into different regions, with a core and an external region. I am applying fix move to the core region and fix nve on the external region but I all I get is the core region rotating and the exernal region stays static. It seems as if the regions don't act as one body. Do you know what might be causing the issue? I appreciate your help!

Attached you will find the script that I am using.

Many thanks,


From: Axel Kohlmeyer <akohlmey@...24...>
Sent: Thursday, August 17, 2017 8:41 PM
To: Fabian Duarte
Subject: Re: [lammps-users] Nanocutting

On Thu, Aug 17, 2017 at 2:59 PM, Fabian Duarte <Fabian.Duarte@...2160...> wrote:

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.

and without equilibration? your picture doesn't look like you have equilibrated the system at all.

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?

a moving region does not move the atoms in it, it just matches different atoms depending on the location of the region.
if you want your cylinder to rotate, yet have the atoms on the surface react to the cutting tool, you would have to do something more sophisticated.
the first thing that comes to my mind, is to split the cylinder (workpiece) into two regions: a core and the rest including the surface. now define two groups based on those regions, and then apply fix move to the core atoms and fix nve to the others.



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

Kind Regards,


Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.
# 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 <

# ---------- Initialize Simulation --------------------- 
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 -80 80 -20 85 -80 100
#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 core cylinder y 0 0 2 5 20
region middle cylinder y 0 0 3 5 20
region outer cylinder y 0 0 5 5 20

region external intersect 2 core middle side out
region thermw intersect 2 external middle

region external2 intersect 2 outer middle side out

region newton intersect 2 external2 outer

region workpiece union 3 core 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 core region core
group thermw region thermw

group newton region newton

group workpiece region workpiece

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

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

minimize 1.0-e4  1.0e-4 1000 100000

# 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 3 core move rotate 0 0 0 0 1 0 ${T}

fix 1 tool move variable NULL NULL NULL NULL NULL v_velocity

fix 5 moving nve

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!"