Commit dd3278ea authored by Trung Nguyen's avatar Trung Nguyen
Browse files

Added examples for body rounded/polygon and rounded/polyhedron

parent 4bd4b2a1
Loading
Loading
Loading
Loading
+76 −0
Original line number Diff line number Diff line
LAMMPS data file for polygons: cubes, moment of inertia I = m edge^2/ 6
2 atoms
2 bodies
1 atom types
0 6 xlo xhi
0 6 ylo yhi
0 6 zlo zhi

Atoms

1 1 1 1 1.5 1.5 1.5
2 1 1 1 4.0 4.0 4.0

Bodies

1 3 79
8 12 6
0.667 0.667 0.667 0 0 0
1 1 1
1 -1 1
-1 -1 1
-1 1 1
1 1 -1
1 -1 -1
-1 -1 -1
-1 1 -1
0 1
1 2
2 3
3 0
4 5
5 6
6 7
7 4
0 4
1 5
2 6
3 7
0 1 2 3
4 5 6 7
0 1 5 4
1 2 6 5
2 3 7 6
3 0 4 7
0.5
2 3 79
8 12 6
0.667 0.667 0.667 0 0 0
1 1 1
1 -1 1
-1 -1 1
-1 1 1
1 1 -1
1 -1 -1
-1 -1 -1
-1 1 -1
0 1
1 2
2 3
3 0
4 5
5 6
6 7
7 4
0 4
1 5
2 6
3 7
0 1 2 3
4 5 6 7
0 1 5 4
1 2 6 5
2 3 7 6
3 0 4 7
0.5

examples/body/in.cubes

0 → 100644
+53 −0
Original line number Diff line number Diff line
# 3d rounded cubes

variable    r     index 3
variable    steps index 10000

units       lj
dimension   3

atom_style  body rounded/polyhedron 1 10

read_data   data.cubes

replicate   $r $r $r

velocity    all create 1.2 187287 dist gaussian mom yes rot yes

variable cut_inner  equal 0.5
variable k_n        equal 100
variable k_na       equal 1
variable c_n        equal 20
variable c_t        equal 5
variable mu         equal 0
variable A_ua       equal 1

pair_style body/rounded/polyhedron ${c_n} ${c_t} ${mu} ${A_ua} ${cut_inner}
pair_coeff * * ${k_n} ${k_na}

comm_modify vel yes

neighbor     0.5 bin
neigh_modify every 1 delay 0 check yes

timestep     0.001

#fix          1 all nve/body
fix          1 all nvt/body temp 1.2 1.2 0.1
#fix          1 all npt/body temp 1.2 1.2 0.1 iso 0.002 0.02 1.0

compute      p2 all pressure 1_temp

compute      1 all body/local id 1 2 3
dump         1 all local 1000 dump.* index c_1[1] c_1[2] c_1[3] c_1[4]

#dump         2 all image 1000 image.*.jpg type type &
#             zoom 1.5 adiam 1.5 body yes 0 0 view 60 15
#dump_modify  2 pad 6

thermo_style custom step ke pe etotal c_p2 c_1_temp

thermo       1000

run          ${steps}
+57 −0
Original line number Diff line number Diff line
# pouring 3d rounded polyhedron bodies

variable    steps index 6000

units       lj
boundary    p p fm
comm_modify vel yes

atom_style  body rounded/polyhedron 1 8
atom_modify map array

region		reg block 0 50 0 50 0 50 units box
create_box	4 reg

variable cut_inner  equal 0.5
variable k_n        equal 100
variable k_na       equal 5
variable c_n        equal 20
variable c_t        equal 5
variable mu         equal 0
variable A_ua       equal 1

pair_style body/rounded/polyhedron ${c_n} ${c_t} ${mu} ${A_ua} ${cut_inner}
pair_coeff * * ${k_n} ${k_na}

neighbor     0.5 bin
neigh_modify every 1 delay 0 check yes

timestep     0.001

fix          1 all nve/body
fix          2 all gravity 1.0 spherical 0.0 -180.0

molecule     object molecule.cube molecule.tetra toff 1 &
             molecule.rod3d toff 2 molecule.point3d toff 3

region       slab block 5 45 5 45 25 35 units box
fix          ins all pour 500 0 4767548 vol 0.4 10 region slab mol object &
             molfrac 0.25 0.25 0.25 0.25

fix          4 all wall/body/polyhedron 2000 50 50 zplane 0.0 NULL

#compute      1 all body/local type 1 2 3
#dump         1 all local 1000 dump.polyhedron index c_1[1] c_1[2] c_1[3] c_1[4]
#dump         10 all custom 1000 tmp.dump id type x y z radius

thermo_style custom step atoms ke pe etotal press

thermo       1000

#dump	     2 all image 500 image.*.jpg type type &
#	     zoom 1.5 adiam 1.5 body yes 0 0 view 75 15
#dump_modify  2 pad 6

run	     ${steps}

+52 −0
Original line number Diff line number Diff line
# 3d polygon body: cubes, moment of inertia I = m edge^2/ 6

1 atoms
3 79 body

Coords

1 0 0 0

Types

1 1

Masses

1 1.0

Body Integers

8 12 6

Body Doubles

0.667 0.667 0.667 0 0 0
1 1 1
1 -1 1
-1 -1 1
-1 1 1
1 1 -1
1 -1 -1
-1 -1 -1
-1 1 -1
0 1
1 2
2 3
3 0
4 5
5 6
6 7
7 4
0 4
1 5
2 6
3 7
0 1 2 3
4 5 6 7
0 1 5 4
1 2 6 5
2 3 7 6
3 0 4 7
0.5
+26 −0
Original line number Diff line number Diff line
# 2d polygon body: disks Izz = 1/2 m radius^2

1 atoms
3 10 body

Coords

1 0 0 0

Types

1 1

Masses

1 1.0

Body Integers

1 0 0

Body Doubles

1 1 1.125 0 0 0
0 0 0 
3.0
Loading