LAMMPS region rotate cuts off created atoms


I am trying to run a peridynamics simulation where a cylinder rotated around the y-axis impacts a rigid plate. However, atoms on the rotated cylinder are being cut off at the bounding box of the original, unrotated region. I’ve been changing the size of the cylinder region to see if anything changes but it isn’t working. I can’t seem to figure out the problem. The bounding box should change when the cylinder rotates?

I attached a screenshot of the cut off cylinder and a copy of my input file.


units           si
dimension       3
boundary        p p p
atom_style      peri
atom_modify     map array
neighbor        0.0010 bin
lattice         sc 0.0005

# Desired box
region          box block -0.1 0.1 -0.04 0.04 -0.0012 0.1 units box

# Create desired target
region          target block -0.03 0.03 -0.03 0.03 -0.0004 0  units box
#region          target block -0.1 0.1 -0.04 0.04 -0.0012 0  units box

# Make 2 atom types
create_box      2 box

# Create the atoms in plate
create_atoms 	1 region target
group 		plate region target

# Construct cylinder
variable        y0 equal 0.00510 #sphere initial position
variable        vy equal -60  #sphere initial velocity
variable 	theta equal 0.2932
region          cyl cylinder z 0 0 0.01 0.002 0.047 rotate v_theta 0 0 0.01 0 1 0 units box 
create_atoms    2 region cyl
group           projectile region cyl

#Peridynamics style
pair_style      peri/lps
#               <type1> <type2>    <K>    <G>    <horizon>   <s00>   <alpha>
pair_coeff         1       1    200e9     77e9    0.0015001  0.00672   0.5

#               <type1> <type2>    <K>    <G>    <horizon>   <s00>   <alpha>
pair_coeff         2       2    8.333e8  3.846e8  0.0015001  0.0008283   0.25

#               <type1> <type2>    <K>    <G>    <horizon>   <s00>   <alpha>
pair_coeff         1       2    200e9     77e9    0.0015001    0.0008283   0.25
#               <type1> <type2>    <K>    <G>    <horizon>   <s00>   <alpha>
#pair_coeff         1       2    8.333e8  3.846e8   0.0015001  0.008283   0.25

# Set mass density
set             group plate density 15000
set             group projectile density 917

# volume = lattice constant^3
set             group all volume 1.25e-10

# Zero out velocities of particles
velocity        all set 0.0 0.0 0.0 sum no units box

#Impose initial velocity to the sphere
velocity        projectile set 0.0 0.0 v_vy units box

# Use velocity-Verlet time integrator
fix             F1 projectile nve

# Compute damage for each particle
compute         C1 all damage/atom
timestep        1.0e-7
thermo          200
dump            D1 all custom 50 dump.ICE_YMP04 id type x y z c_C1
run             5000

Please have a look at the “guidelines” post for this forum to learn how to properly quote input files so that people can properly view and analyze them.

Ok done, thanks.

From the documentation of the “create_atoms” command:

For the region style, a geometric volume is filled with particles on the lattice. This volume is what is both inside the simulation box and also consistent with the region volume. See the region command for details. Note that a region can be specified so that its “volume” is either inside or outside its geometric boundary.

You create a group of atoms here that is inside the box and inside the region. If the “cyl” region extends outside the box due to the (static) rotation of the region, then no atoms will be created, even though you have periodic boundary conditions. This would be different, if you first create the atoms in the unrotated region and then rotate the group of atoms with the displace_atoms command — LAMMPS documentation

LAMMPS applies commands always immediately when they are encountered unless the documentation says differently.

If you don’t want the atoms to be cut off, you either need to increase the simulation box so that it always encompasses the entire region used for creating the atoms, or move the atoms as indicated above.

LAMMPS is behaving as its documentation says.