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: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 24 Aug 2017 07:43:42 -0400


On Thu, Aug 24, 2017 at 2:58 AM, Fabian Duarte <Fabian.Duarte@...2160...> wrote:

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!

​actually, when i run your input, i see the outer part of your rotating rod "exploding". this is not much surprising, since you have set up fix move to do 10 rotations per picosecond. that is *very* high.

but your input is overall far too complex to make sense of it. when trying something new, it is usually the best strategy to start as simple as possible.​
​so i quickly whipped up a minimal example​ (based on settings from a LAMMPS example input:

units metal
boundary f f p
lattice fcc 3.52
region box   block -10.0 10.0 -10.0 10.0 -10.0 10.0
region rod   cylinder z 0.0 0.0 9.0 -11 11
region core  cylinder z 0.0 0.0 4.0 -11 11

# use two atom types for better visualization
create_box 2 box
create_atoms 1 region rod
set region core type 2

group rod   region rod
group core  region core
group shell subtract rod core

pair_style eam
pair_coeff * * Ni_u3.eam

# do regular time integration on shell and apply fix move to core
fix 1 shell nve
fix 2 core  move rotate 0.0 0.0 0.0  0.0 0.0 1.0 1000.0

thermo 100
dump 1 all movie 1000 rotate.mp4 type type size 600 600 adiam 2.0
run 100000

this has a rotation speed of 1 revolution per nanosecond, which is still very high, but not quite that extreme.
as you can from the visualization, the method works, but since at this time scale metals are quite "wobbly", the abrupt start and the inertia of the shell causes unwanted oscillations in the system, and thus would require a very long equilibration time to subside. the obvious workaround to address this is to initialize the velocities for *all* atoms to a rotation first, so, before doing the fix nve plus fix move combo, i insert the following script code:


# initialize velocities for uniform rotation
fix 0 all  move rotate 0.0 0.0 0.0  0.0 0.0 1.0 1000.0
run 1
unfix 0
reset_timestep 0


now, if i also want to have the atoms on the shell heated to a specific temperature, i need to thermostat the atoms in the shell group. however, i also need to consider the kinetic energy (and thus temperature) from the forced rotation. the clean way of doing this in LAMMPS is to subtract that bias, but there currently is no temperature compute for rotational motion. so here is a hack to try and work around it. i just measure the forced temperature from the rotation and add it to the thermostat target temperture and then do a temperature ramp and hold that temperature for a bit, before switching to simple unbiased time integration with fix nve


compute tshell shell temp
compute tcore  core  temp
thermo_style custom step temp pe c_tcore c_tshell
thermo 100

# initialize velocities for uniform rotation
fix 0 all  move rotate 0.0 0.0 0.0  0.0 0.0 1.0 100.0
fix 1 all  ave/time 1 1 1 c_tshell
run 1
unfix 0
reset_timestep 0

variable trot    equal f_1
variable ttarget equal 300.0+${trot}

# do regular time integration on shell and apply fix move to core
fix 2 shell nvt temp ${trot} ${ttarget} 0.5
fix 3 core  move rotate 0.0 0.0 0.0  0.0 0.0 1.0 100.0
unfix 1

dump 1 all movie 100 rotate.mp4 type type size 600 600 adiam 2.0
run 30000

fix 2 shell nvt temp ${ttarget} ${ttarget} 0.5

run 70000

unfix 2
fix 2 shell nve

run 10000


​i am attaching the complete script for your reference. you can see the visualization at:

​for a real production simulation, you may want to tweak the various time related parameters some more and ​extend the equilibration period before doing production, so that you have a clean start. changing the material composition and adding other elements to the simulation should be trivial to do. i strongly recommend to build and test those parts of your production input script in a similar way as separate inputs before finally combining them into a full production simulation. this way you have a much better handle on errors, faster simulation times, and less adjustable parameters to worry about.



Attached you will find the script that I am using.

Many thanks,


Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.

Attachment: in.rotatebycore
Description: Binary data