0% found this document useful (0 votes)
19 views

Assignment 1

The document describes simulations of 2D friction using LAMMPS molecular dynamics software. It defines the simulation parameters such as dimensions, boundary conditions, atom styles, potentials and regions. The simulations involve two surfaces with asperities in contact and atoms are assigned to different regions. Temperature is controlled using velocity rescaling and the simulations are run for 20,000 timesteps while thermodynamic properties are output every 1000 timesteps.

Uploaded by

Aniket Panigrahi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Assignment 1

The document describes simulations of 2D friction using LAMMPS molecular dynamics software. It defines the simulation parameters such as dimensions, boundary conditions, atom styles, potentials and regions. The simulations involve two surfaces with asperities in contact and atoms are assigned to different regions. Temperature is controlled using velocity rescaling and the simulations are run for 20,000 timesteps while thermodynamic properties are output every 1000 timesteps.

Uploaded by

Aniket Panigrahi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

1. In.

friction_P1
# 2d friction simulation

dimension 2

boundary psp

atom_style atomic

neighbor 0.3 bin

neigh_modify delay 5

# create geometry

lattice hex 0.9

region box block 0 100 0 22 -0.25 0.25

create_box 4 box

mass 1 1.0

mass 2 1.0

mass 3 1.0

mass 4 1.0

# atom regions

region lo-fixed block INF INF INF 1.1 INF INF

region lo-slab block INF INF INF 7 INF INF

region above-lo block INF INF INF 7 INF INF side out

region hi-fixed block INF INF 20.9 INF INF INF

region hi-slab block INF INF 15 INF INF INF


region below-hi block INF INF 15 INF INF INF side out

region lo-asperity sphere 32 7 0 8

region hi-asperity sphere 18 15 0 8

region lo-half-sphere intersect 2 lo-asperity above-lo

region hi-half-sphere intersect 2 hi-asperity below-hi

# create 2 surfaces with asperities

create_atoms 1 region lo-slab

create_atoms 1 region hi-slab

create_atoms 2 region lo-half-sphere

create_atoms 3 region hi-half-sphere

# LJ potentials

pair_style lj/cut 2.5

pair_coeff * * 1.0 1.0 2.5

# define groups

group lo region lo-slab

group lo type 2

group hi region hi-slab

group hi type 3

group lo-fixed region lo-fixed

group hi-fixed region hi-fixed

group boundary union lo-fixed hi-fixed

group mobile subtract all boundary


set group lo-fixed type 4

set group hi-fixed type 4

# initial velocities

compute new mobile temp/partial 0 1 0

velocity mobile create 0.1 482748 temp new

velocity hi set 1.0 0.0 0.0 sum yes

# fixes

fix 1 all nve

fix 2 boundary setforce 0.0 0.0 0.0

fix 3 mobile temp/rescale 200 0.1 0.1 0.02 1.0

fix_modify 3 temp new

fix 4 all enforce2d

# Run

timestep 0.0025

thermo 1000

thermo_modify temp new

dump 1 all atom 500 dump.friction_P1

#dump 2 all image 500 image.*.jpg type type &

# zoom 1.6 adiam 1.5

#dump_modify 2 pad 5
#dump 3 all movie 500 movie.mpg type type &

# zoom 1.6 adiam 1.5

#dump_modify 3 pad 5

run 30000

2. In.friction_P2
# 2d friction simulation

dimension 2

boundary psp

atom_style atomic

neighbor 0.3 bin

neigh_modify delay 5

# create geometry

lattice hex 0.9

region box block 0 200 0 22 -0.25 0.25

create_box 4 box

mass 1 1.0

mass 2 1.0

mass 3 1.0

mass 4 1.0

# atom regions
region lo-fixed block INF INF INF 1.1 INF INF

region lo-slab block INF INF INF 7 INF INF

region above-lo block INF INF INF 7 INF INF side out

region hi-fixed block INF INF 20.9 INF INF INF

region hi-slab block INF INF 15 INF INF INF

region below-hi block INF INF 15 INF INF INF side out

region lo-asperity sphere 30 7 0 8

region lo-asperity2 sphere 120 7 0 8

region hi-asperity sphere 60 15 0 8

region hi-asperity2 sphere 160 15 0 8

region hi-half-sphere2 intersect 2 below-hi hi-asperity2

region lo-half-sphere intersect 2 lo-asperity above-lo

region lo-half-sphere2 intersect 2 lo-asperity2 above-lo

region hi-half-sphere intersect 2 hi-asperity below-hi

# create 2 surfaces with asperities

create_atoms 1 region lo-slab

create_atoms 1 region hi-slab

create_atoms 3 region hi-half-sphere2

create_atoms 2 region lo-half-sphere

create_atoms 2 region lo-half-sphere2

create_atoms 3 region hi-half-sphere

# LJ potentials

pair_style lj/cut 2.5

pair_coeff * * 1.0 1.0 2.5


# define groups

group lo region lo-slab

group lo type 2

group hi region hi-slab

group hi type 3

group lo-fixed region lo-fixed

group hi-fixed region hi-fixed

group boundary union lo-fixed hi-fixed

group mobile subtract all boundary

set group lo-fixed type 4

set group hi-fixed type 4

# initial velocities

compute new mobile temp/partial 0 1 0

velocity mobile create 0.1 482748 temp new

velocity hi set 1.0 0.0 0.0 sum yes

# fixes

fix 1 all nve

fix 2 boundary setforce 0.0 0.0 0.0

fix 3 mobile temp/rescale 200 0.1 0.1 0.02 1.0

fix_modify 3 temp new

fix 4 all enforce2d


# Run

timestep 0.0025

thermo 1000

thermo_modify temp new

dump 1 all atom 500 dump.friction_P2

#dump 2 all image 500 image.*.jpg type type &

# zoom 1.6 adiam 1.5

#dump_modify 2 pad 5

#dump 3 all movie 500 movie.mpg type type &

# zoom 1.6 adiam 1.5

#dump_modify 3 pad 5

run 100000

Snapshot of simulation for P2


3. Log.in.friction_P2

#dump 2 all image 500 image.*.jpg type type # zoom 1.6 adiam 1.5

#dump_modify 2 pad 5

#dump 3 all movie 500 movie.mpg type type # zoom 1.6 adiam 1.5

#dump_modify 3 pad 5

run 20000

Generated 0 of 6 mixed pair_coeff terms from geometric mixing rule

Neighbor list info ...

update: every = 1 steps, delay = 5 steps, check = yes

max neighbors/atom: 2000, page size: 100000

master list distance cutoff = 2.8

ghost atom cutoff = 2.8

binsize = 1.4, bins = 162 31 1


1 neighbor lists, perpetual/occasional/extra = 1 0 0

(1) pair lj/cut, perpetual

attributes: half, newton on

pair build: half/bin/atomonly/newton

stencil: half/bin/2d

bin: standard

Per MPI rank memory allocation (min/avg/max) = 3.111 | 3.111 | 3.111 Mbytes

Step Temp E_pair E_mol TotEng Press Volume

0 0.1 -3.1305352 0 -3.0898482 -1.0680329 9779.7333

1000 0.1 -3.0895772 0 -3.0488902 0.066193511 9779.7333

2000 0.1 -3.0784919 0 -3.0378049 -0.58892101 9779.7333

3000 0.085125174 -3.0760412 0 -3.0414063 -0.21270751 9779.7333

4000 0.087302026 -3.0770452 0 -3.0415246 -0.52154352 9779.7333

5000 0.092660384 -3.0811622 0 -3.0434615 -0.088853689 9779.7333

6000 0.087204993 -3.0769307 0 -3.0414496 -0.5466044 9779.7333

7000 0.1027515 -3.0763231 0 -3.0345166 -0.35360692 9779.7333

8000 0.10263526 -3.0773115 0 -3.0355522 -0.21404319 9779.7333

9000 0.096910479 -3.0737901 0 -3.0343601 -0.46128572 9779.7333

10000 0.095307671 -3.0738845 0 -3.0351066 -0.2770988 9779.7333

11000 0.088429556 -3.0711267 0 -3.0351474 -0.43429333 9779.7333

12000 0.096347782 -3.0761677 0 -3.0369667 -0.11289558 9779.7333

13000 0.083551466 -3.0678001 0 -3.0338055 -0.62454967 9779.7333

14000 0.092134215 -3.0749774 0 -3.0374907 -0.053882095 9779.7333

15000 0.085941584 -3.0700847 0 -3.0351176 -0.50583355 9779.7333

16000 0.086804306 -3.0736304 0 -3.0383123 -0.18394745 9779.7333

17000 0.089006799 -3.0705946 0 -3.0343803 -0.50198219 9779.7333

18000 0.09329154 -3.0739154 0 -3.0359579 -0.15906299 9779.7333

19000 0.095003168 -3.0738777 0 -3.0352237 -0.44214125 9779.7333

20000 0.099089203 -3.0759052 0 -3.0355888 -0.3622748 9779.7333


Loop time of 17.7807 on 1 procs for 20000 steps with 6448 atoms

Performance: 242959.886 tau/day, 1124.814 timesteps/s, 7.253 Matom-step/s

72.7% CPU use with 1 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:

Section | min time | avg time | max time |%varavg| %total

---------------------------------------------------------------

Pair | 13.709 | 13.709 | 13.709 | 0.0 | 77.10

Neigh | 0.7772 | 0.7772 | 0.7772 | 0.0 | 4.37

Comm | 0.070999 | 0.070999 | 0.070999 | 0.0 | 0.40

Output | 0.58592 | 0.58592 | 0.58592 | 0.0 | 3.30

Modify | 2.0092 | 2.0092 | 2.0092 | 0.0 | 11.30

Other | | 0.6281 | | | 3.53

Nlocal: 6448 ave 6448 max 6448 min

Histogram: 1 0 0 0 0 0 0 0 0 0

Nghost: 145 ave 145 max 145 min

Histogram: 1 0 0 0 0 0 0 0 0 0

Neighs: 53854 ave 53854 max 53854 min

Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 53854

Ave neighs/atom = 8.3520471

Neighbor list builds = 698

Dangerous builds = 0

Total wall time: 0:00:17

Log.lammps_P3_a(for the same source code as P2 but different


frequency output)
#dump 2 all image 500 image.*.jpg type type # zoom 1.6 adiam 1.5

#dump_modify 2 pad 5

#dump 3 all movie 500 movie.mpg type type # zoom 1.6 adiam 1.5

#dump_modify 3 pad 5

run 20000

Generated 0 of 6 mixed pair_coeff terms from geometric mixing rule

Neighbor list info ...

update: every = 1 steps, delay = 5 steps, check = yes

max neighbors/atom: 2000, page size: 100000

master list distance cutoff = 2.8

ghost atom cutoff = 2.8

binsize = 1.4, bins = 162 31 1

1 neighbor lists, perpetual/occasional/extra = 1 0 0

(1) pair lj/cut, perpetual

attributes: half, newton on

pair build: half/bin/atomonly/newton

stencil: half/bin/2d

bin: standard

Per MPI rank memory allocation (min/avg/max) = 3.111 | 3.111 | 3.111 Mbytes

Step Temp E_pair E_mol TotEng Press Volume

0 0.1 -3.1305352 0 -3.0898482 -1.0680329 9779.7333

1000 0.1 -3.0895772 0 -3.0488902 0.066193511 9779.7333

2000 0.1 -3.0784919 0 -3.0378049 -0.58892101 9779.7333

3000 0.085125174 -3.0760412 0 -3.0414063 -0.21270751 9779.7333

4000 0.087302026 -3.0770452 0 -3.0415246 -0.52154352 9779.7333

5000 0.092660384 -3.0811622 0 -3.0434615 -0.088853689 9779.7333

6000 0.087204993 -3.0769307 0 -3.0414496 -0.5466044 9779.7333


7000 0.1027515 -3.0763231 0 -3.0345166 -0.35360692 9779.7333

8000 0.10263526 -3.0773115 0 -3.0355522 -0.21404319 9779.7333

9000 0.096910479 -3.0737901 0 -3.0343601 -0.46128572 9779.7333

10000 0.095307671 -3.0738845 0 -3.0351066 -0.2770988 9779.7333

11000 0.088429556 -3.0711267 0 -3.0351474 -0.43429333 9779.7333

12000 0.096347782 -3.0761677 0 -3.0369667 -0.11289558 9779.7333

13000 0.083551466 -3.0678001 0 -3.0338055 -0.62454967 9779.7333

14000 0.092134215 -3.0749774 0 -3.0374907 -0.053882095 9779.7333

15000 0.085941584 -3.0700847 0 -3.0351176 -0.50583355 9779.7333

16000 0.086804306 -3.0736304 0 -3.0383123 -0.18394745 9779.7333

17000 0.089006799 -3.0705946 0 -3.0343803 -0.50198219 9779.7333

18000 0.09329154 -3.0739154 0 -3.0359579 -0.15906299 9779.7333

19000 0.095003168 -3.0738777 0 -3.0352237 -0.44214125 9779.7333

20000 0.099089203 -3.0759052 0 -3.0355888 -0.3622748 9779.7333

Loop time of 24.2068 on 1 procs for 20000 steps with 6448 atoms

Performance: 178462.059 tau/day, 826.213 timesteps/s, 5.327 Matom-step/s

58.9% CPU use with 1 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:

Section | min time | avg time | max time |%varavg| %total

---------------------------------------------------------------

Pair | 15.141 | 15.141 | 15.141 | 0.0 | 62.55

Neigh | 0.8352 | 0.8352 | 0.8352 | 0.0 | 3.45

Comm | 0.080786 | 0.080786 | 0.080786 | 0.0 | 0.33

Output | 5.3147 | 5.3147 | 5.3147 | 0.0 | 21.96

Modify | 2.1698 | 2.1698 | 2.1698 | 0.0 | 8.96

Other | | 0.6654 | | | 2.75


Nlocal: 6448 ave 6448 max 6448 min

Histogram: 1 0 0 0 0 0 0 0 0 0

Nghost: 145 ave 145 max 145 min

Histogram: 1 0 0 0 0 0 0 0 0 0

Neighs: 53854 ave 53854 max 53854 min

Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 53854

Ave neighs/atom = 8.3520471

Neighbor list builds = 698

Dangerous builds = 0

Total wall time: 0:00:24

You might also like