Creating a box

Hi Lammps users,

I am trying to simulate a box filled with hard sphere.
I used the following input commands:

atom_style sphere
boundary p p fm
newton off
comm_modify vel yes

region reg block -125.0 125.0 -125.0 125.0 -175.0 275.0 units box
create_box 1  reg

pair_style gran/hooke 20000000000.0 NULL 50.0 NULL 10000 0
pair_coeff  * *

timestep 0.0002

fix  1 all nve/sphere
fix 2 all gravity 1.0 spherical 0.0 -180.0 
fix zlower all wall/gran hooke/history 200000.0 NULL 50.0 NULL  0.5 0 &
zplane -175.0 275.0

region slab block -125.0 125.0 -125.0 125.0 175.0 225.0 units box
fix ins1 all pour 8000 1 558299465 region slab diam poly 199 0.400963758837 0.0000 ...

dump 1 all custom 3000000 filename.pour type x y z radius 
run 3000000

The dimensions of the box are in um.
In actual scenario, the box dimensions are in cm.

When I changed it to cm dimensions, my simulations are running for hours and I don’t know whether I will get results or not.

I have following questions:
(i) Is it okay to simulate a cm scale box in lammps, instead of um?
(ii) If yes, how to decide the number of number of spheres to be poured for cm scale box?
(iii) If no, can I simulate um scale boxes and attach them together to get my cm scale geometry?
(iv) Is there any way in lammps to know the packing density of spheres poured in box?

Thank you.

Not really. The unit of length in LAMMPS is determined by the units command — LAMMPS documentation. Since you don’t have any “units” command in your input, you are using the default of reduced units (or units ‘lj’).

If you want specific dimensions/units, you have to choose a suitable setting for the units command. If the specific units you are looking for are not available, you have to convert your parameters accordingly to the units setting you choose instead.

Hi,

Thanks for replying and sorry for the confusion.
I do understand that I can choose different units. My question was not about specific units.
I am not getting result when I increased the dimensions of the box. Do you have any idea what have went wrong? I kept rest of the input code same, just changed the dimensions of the box.

Thank you.

I have no idea because you didn’t demonstrate what you did. And be certain, that using reduced units like you are currently doing in your input is not like unit um or cm. So a meaningful input starts with the correct choice of the units setting.

It’s impossible to say. There are some issues with your input file:

  1. As Axel said, you are using the default units lj, therefore every number in your script (e.g. energy and distances) will be dimensionless. It is therefore pointless to talk about microns or centimetres, unless you work in units cgs.
  2. The dumping frequency of your output means that you will only see the end of your simulation. If you want to understand what is going on, dump your sample at a reasonable rate.
  3. I am not an expert of granular simulations, but with your settings the atoms get lost. I have used the parameters from the examples just to demonstrate your simulation, without having lost atoms.

Here my input file, for your reference.

atom_style sphere
boundary p p fm
newton off
comm_modify vel yes

region reg block -125.0 125.0 -125.0 125.0 -175.0 275.0 units box
create_box 1  reg

pair_style gran/hooke 2e5 NULL 50.0 NULL 0.5 1
pair_coeff  * *

timestep 0.0002

fix 1 all nve/sphere
fix 2 all gravity 1.0 spherical 0.0 -180.0 
fix zlower all wall/gran hooke/history 2e5 NULL 50.0 NULL 0.5 1 &
zplane -170.0 270.0

region slab block -125.0 125.0 -125.0 125.0 175.0 225.0 units box
fix ins1 all pour 100000 1 558299465 region slab diam poly 4 &
1.4 0.2 &
2.4 0.3 &
4.8 0.3 &
8.2 0.2
thermo_style custom step atoms ke
thermo 1000

dump 1 all custom 5000 test.dump type xu yu zu radius 
run 3000000