# modeling symmetric walls & periodicity

1)
I was trying to model symmetric walls in a couette flow. I use the lattice spacing given in log file to calculate the height of the each wall and use the height of the fluid as the multiple of the same. But, the no. of atoms in my bottom wall is more than the that of the top wall and moreover a whole additional layer of atoms are more in the bottom wall. I cannot figure out how to fix it so as to make my walls symmetric long Y.
2)
Also I tried in a similar way to make the wall periodic along x direction. But, even after using a multiple of lattice spacing as its length it was not periodic. So using trial and error i changed the values till it appeared periodic(as its easier to visualize in x-dir).I believe this is not the correct the way to do it.

Thank you.
BR/Joseph

You need to ask a more specific Q. Like why
does LAMMPS command do X when I expect Y.

Steve

I would try to be more specific:
I am using the 'region command' to create a region and then using the
'lattice'&'create atoms' command creating atoms in the respective
region. Although the LxBxH of the regions assigned to the top and bottom
wall are the same. There are more atoms created in the bottom wall(292
atoms) than on the top(221). If view the lattice in the simulation it
shows a whole additional layer in the bottom wall along the 'Y'
direction.
I am pasting the log file below:

LAMMPS (9 Mar 2011)
# 3-d LJ flow simulation

units lj
dimension 3
boundary p s p

atom_style atomic
neighbor 0.3 bin
neigh_modify delay 5

# create geometry

region fluid block 0 12.513 2.94953 27.51953 -3.61242 3.61242 units
box
region btm_wall block 0 12.513 0 2.94953 -3.61242 3.61242 units box
region top_wall block 0 12.513 27.51953 30.46906 -3.61242 3.61242
units box
region simulation_box union 3 btm_wall fluid top_wall units box

create_box 3 simulation_box
Created orthogonal box = (0 0 -3.61242) to (12.513 30.4691 3.61242)
1 by 1 by 1 processor grid

lattice fcc 0.81 orient x 1 1 -2 orient y 1 1 1 orient z 1 -1 0
Lattice spacing in x,y,z = 2.78084 2.94953 2.40828
create_atoms 1 region fluid units box
Created 1710 atoms
lattice fcc 0.81 orient x -1 1 0 orient y 1 1 1 orient z 1 1 -2
Lattice spacing in x,y,z = 2.40828 2.94953 2.78084
create_atoms 2 region btm_wall units box
Created 292 atoms
lattice fcc 0.81 orient x -1 1 0 orient y 1 1 1 orient z 1 1 -2
Lattice spacing in x,y,z = 2.40828 2.94953 2.78084
create_atoms 3 region top_wall units box
Created 221 atoms

mass 1 1.0
mass 2 1.0
mass 3 1.0

# LJ potentials

pair_style lj/cut 2.2
pair_coeff * * 1.0 1.0
pair_coeff 1 2*3 0.6 1.0
pair_modify shift yes

# define groups

region 1 block INF INF INF 2.94953 INF INF units box
group lower region 1
292 atoms in group lower
region 2 block INF INF 27.51953 INF INF INF units box
group upper region 2
221 atoms in group upper
group boundary union lower upper
513 atoms in group boundary
group flow subtract all boundary
1710 atoms in group flow

set group lower type 2
set group upper type 3

# initial velocities

compute mobile flow temp/partial 0 0 1
fix 2 flow langevin 1.1 1.1 1.0 699483
velocity flow create 1.1 482748 temp mobile units box
fix 1 all nve
#fix 2 flow temp/rescale 200 1.1 1.1 0.02 1.0
fix_modify 2 temp mobile

# Couette flow

velocity lower set 0.0 0.0 0.0 units box
velocity upper set 1.0 0.0 0.0 units box
fix 3 boundary setforce 0.0 0.0 0.0
#fix 4 all enforce2d

group tp_wall region top_wall
221 atoms in group tp_wall
fix 5 flow ave/spatial 1 3000 3500 x center 2.0 z center 3.0 y
lower 2.0 vx file vel_fb.profile units box
#fix 6 tp_wall ave/spatial 1 3000 3500 x center 2.0 z center 2.0
y 3.0 2.0 vx file vel_tw.profile

# Poiseuille flow

#velocity boundary set 0.0 0.0 0.0
#fix 3 lower setforce 0.0 0.0 0.0
#fix 4 upper setforce 0.0 NULL 0.0
#fix 5 upper aveforce 0.0 -1.0 0.0
#fix 6 flow addforce 0.5 0.0 0.0
#fix 7 all enforce2d

# Run

timestep 0.005
thermo 500
#thermo_style custom step temp evdwl ecoul epair ebond edihed eimp
eangle emol etotal
thermo_modify temp mobile
WARNING: Temperature for thermo pressure is not for group all

dump 1 all atom 50 dump.flow
dump 2 boundary custom 1000 dump.flow2 ys vx
run 15000
Memory usage per processor = 2.08349 Mbytes
Step Temp E_pair E_mol TotEng Press Volume
0 1.1 347.54589 0 347.96822
1177.9253 2666.5204
500 0.96197376 348.39084 0 348.76018
1183.0806 2666.5204
1000 1.075858 348.51798 0 348.93105
1183.7333 2666.5204
1500 1.0579045 348.51145 0 348.91762
1183.7142 2666.5204
2000 1.1011854 348.56075 0 348.98354
1183.9454 2666.5204
2500 1.1322373 348.55463 0 348.98934
1183.8539 2666.5204
3000 1.1312877 348.56105 0 348.9954
1183.9336 2666.5204
3500 1.1805699 348.6085 0 349.06177
1184.1384 2666.5204
4000 1.0971365 348.58813 0 349.00937
1183.9671 2666.5204
4500 1.1606725 348.58156 0 349.02719
1184.0667 2666.5204
5000 1.1715961 348.59649 0 349.04631
1184.1244 2666.5204
5500 1.1371929 348.61208 0 349.0487
1184.1429 2666.5204
6000 1.1277097 348.5509 0 348.98387
1183.883 2666.5204
6500 1.0614981 348.56578 0 348.97333
1183.8633 2666.5204
7000 1.1218959 348.529 0 348.95975
1183.8178 2666.5204
7500 1.1107021 348.56019 0 348.98663
1183.9373 2666.5204
8000 1.1566047 348.57986 0 349.02392
1184.0204 2666.5204
8500 1.1671688 348.56439 0 349.01251
1183.9387 2666.5204
9000 1.1158482 348.56539 0 348.99381
1183.9559 2666.5204
9500 1.0754257 348.60095 0 349.01385
1184.0808 2666.5204
10000 1.1506858 348.55995 0 349.00174
1183.8918 2666.5204
10500 1.0373928 348.55725 0 348.95555
1183.9392 2666.5204
11000 1.0647136 348.56861 0 348.9774
1183.9691 2666.5204
11500 1.0458143 348.57672 0 348.97825
1184.0129 2666.5204
12000 1.1688191 348.57626 0 349.02502
1184.0178 2666.5204
12500 1.0832722 348.63231 0 349.04822
1184.2525 2666.5204
13000 1.1496582 348.552 0 348.9934
1183.8578 2666.5204
13500 1.0648774 348.57805 0 348.9869
1183.9175 2666.5204
14000 1.1491871 348.58549 0 349.02671
1183.9652 2666.5204
14500 1.1111518 348.56468 0 348.9913
1183.9504 2666.5204
15000 1.0752677 348.56324 0 348.97608
1183.85 2666.5204
Loop time of 53.0656 on 1 procs for 15000 steps with 2223 atoms

Pair time (\) = 33\.0387 \(62\.2601\) Neigh time \() = 12.4047 (23.3761)
Comm time (\) = 1\.55328 \(2\.9271\) Outpt time \() = 1.18428 (2.23172)
Other time (%) = 4.88469 (9.205)

Nlocal: 2223 ave 2223 max 2223 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 3035 ave 3035 max 3035 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 56518 ave 56518 max 56518 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 56518
Ave neighs/atom = 25.4242
Neighbor list builds = 2123
Dangerous builds = 2

Thank you.
BR/Joseph

When you create atoms in a region, and atoms are
exactly on the surface of the region, then they may
or may not be created due to round-off issues. It's up
to you to adjust the size of the region by epsilon to
account for this.

Steve