Periodic Boundary condition in LIGGGHTS

Submitted by cheng1988sjtu on Mon, 03/11/2013 - 21:13

For LIGGGHTS, I just noticed the periodic boundary condition is enforced during the post-processing by lpp. Is there a way to do it in liggghts so the particles exiting the region will come back through the boundary in the other end? Really appreciate!

ckloss's picture

ckloss | Mon, 03/11/2013 - 21:33

Hi cheng1988sjtu,

boundary conditions in LIGGGHTS can be set via the 'boundary' command - see manual for details

Cheers
Christoph

cheng1988sjtu | Tue, 03/12/2013 - 16:26

I did set the periodic boundary condition using 'boundary' command. The problem is when I used vmd to visualize the result, I found particles are going out of the region and not coming back. And in post-processing tools lpp, 'wrap' function is used to enforce the periodic boundary condition. I am just wondering is there a way to do it in liggghts instead of using post-processing to make the result look periodic? Really appreciate!

C.Z. U of D

jorisheyman | Tue, 03/12/2013 - 22:14

Does the number of particles stay constant in your simulation ? If yes, it is only a visualization problem, but I doubt it is as the dump file automatically takes into account the periodicity in particle position...

cheng1988sjtu | Wed, 03/13/2013 - 17:48

Hi,

Thanks for your reply.

Indeed the number of particles does not change, however, I've done two identical runs by using lammps and liggghts, respectively, both of them has the same input file, and I was using VMD to post-process both results.

Strangely, the result are not the same. in Lammps result, the periodic boundary are right, and particles goes out of boundary will come back in the other boundary. However, in Ligggths, it's strange that the particles goes out and will not come back, and interestingly, it seems that the liggghts are still calculating the particles outside the box that I defined.

Could you give a hint on how the liggghts deal with the periodic boundary? Thanks!

Best

Charlie

C.Z. U of D

sbateman | Wed, 03/13/2013 - 18:51

What are your neighbor list settings? LAMMPS and LIGGGHTS only remap particle positions across periodic boundaries when the neighbor list is rebuilt.

It would be easier to help if you posted your input file.

cheng1988sjtu | Wed, 03/13/2013 - 20:15

I just modified the example file (benchmark case in LAMMPS) to run granular flow on a sloped channel. This is the input

#----------------------------------------------#
#--------DEM : particles initialisation--------#
#----------------------------------------------#

atom_style granular
atom_modify map array
communicate single vel yes
boundary p p fm
newton off
units si
processors 6 1 1
read_restart ../DEM/liggghts.restart

# Definition of DEM domain
variable xl equal 0.15
variable yl equal 0.075
variable zl equal 0.20

neighbor 0.005 bin
neigh_modify delay 0

# Material properties required for new pair styles

fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5

# pair style
pair_style gran/hertz/history 1 0 #Hertzian without cohesion
pair_coeff * *

# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 chute 24.0

#walls
fix zwalls all wall/gran/hertz/history 1 0 zplane 0. NULL 1
#fix ywalls all wall/gran/hertz/history 1 0 yplane -${yl} ${yl} 1

#particle insertion
#region bc2 block -${xl} ${xl} -${yl} ${yl} 0.1 0.2 units box
#fix ins2 nve_group pour 47000 1 1 vol 0.7 100 diam uniform 0.002 0.002 dens uniform 2500 2500 vel uniform 0. 0. 0. 0. -0.5 region bc2

#apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere

#screen output
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

#insert the first particles so that dump is not empty
run 1
dump dmp all custom 1000 post/dump.init_test id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]

run 100000

C.Z. U of D

sbateman | Wed, 03/13/2013 - 21:46

It sounds like LIGGGHTS and lpp are correctly accounting for periodic boundaries and updating particle image flags (ix, iy, iz). VMD, however, might be reading in your dump file and "unwrapping" the particle coordinates using those image flags, since your dump custom command includes "x y z ix iy iz". In other words, this is a visualization problem with VMD.

Also, you are using an old version of LIGGGHTS. Maybe try the newest version (2.3) if you can.

cheng1988sjtu | Thu, 03/14/2013 - 19:34

Thank you for your explanation!

That really clear my puzzle, and yes, I think what you said make sense!

Charlie

C.Z. U of D