Added 2d example

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14458 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
athomps 2016-01-19 22:26:48 +00:00
parent 0d1c7af98b
commit 7c810d6198
1 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,57 @@
# Test volume definitions for 2d and finite systems
variable rcut equal 10.0
variable rskin equal 2.0
variable rcomm equal 20.0
variable len equal 4.0
variable lenz equal 10.0
dimension 2
units metal
boundary p p p
#lattice sq 1.0 origin 0.5 0.5 0.0
lattice hex 1.0 origin 0.5 0.5 0.0
atom_style atomic
region box block 0 ${len} 0 ${len} 0.0 ${lenz}
region atoms block 0 ${len} 0 ${len} 0.0 0.0
create_box 1 box
create_atoms 1 region atoms
mass 1 1.0
pair_style lj/cut ${rcut}
pair_coeff 1 1 0.0 1.0
neighbor ${rskin} nsq
neigh_modify delay 10
# set the minimum communication cut-off
comm_modify cutoff ${rcomm}
thermo 1
#
# TEST 1: Volume check for 2d bulk system
#
compute v1 all voronoi/atom
dump d1 all custom 1 dump.voro id type x y z c_v1[1] c_v1[2]
compute volvor all reduce sum c_v1[1]
variable volsys equal lz*lx*ly
variable err equal c_volvor-v_volsys
thermo_style custom c_volvor v_volsys vol v_err
run 0
#
# TEST 2: Volume check for 2d finite system
# add margins in x and y directions
#
change_box all boundary f f p
variable rless equal ${rcomm}<(${rcut}+${rskin})
variable rmargin equal 0.01+${rcomm}*!${rless}+(${rcut}+${rskin})*${rless}
variable volsys equal (lx+2*${rmargin})*(ly+2*${rmargin})*lz
run 0