Particle size distribution

Submitted by ullassssss on Tue, 07/18/2017 - 07:16

I need to insert spherical particles of size varying from 0.0001m to 0.00001m (diameter) into a container until the container fills completely. Without feeding no of particles as input data how can i formulate the syntax for this condition.

alice's picture

alice | Tue, 07/18/2017 - 09:21

Hello ullassssss,
I would suggest to estimate the target voidfraction and use the insert/stream command in combination with the mass parameter. Please note that you will need some "free space" for the insertion of the elast bit of particles. If possible I would suggest to slightly "overfill" the container and use the delete_atoms command to remove the surplus for making sure that enough material was added.
Cheers,
Alice

ullassssss | Wed, 07/19/2017 - 07:13

I tried with insert/stream command, but it showed particle id error message while running. Can you send me the link to LIGGGHTS Manual. I cant find it in the forum.

ullassssss | Thu, 07/27/2017 - 07:01

I tried to insert the particles with different radius (varying from 10 microns to 100 microns) using the following input script...

# Shear Cell example
### Initialization
# Preliminaries
units si
atom_style sphere
boundary m m m
newton off
communicate single vel yes
#processors 2 2 2

# Declare domain
region reg block -0.007 0.007 -0.007 0.007 -0.001 0.030 units box
create_box 2 reg
neighbor 0.0002 bin
neigh_modify delay 0

### Setup
# Material and interaction properties
fix m1 all property/global youngsModulus peratomtype 1.0e7 1.0e7
fix m2 all property/global poissonsRatio peratomtype 0.31 0.31
fix m3 all property/global coefficientRestitution peratomtypepair 2 0.5 0.5 0.5 0.5
fix m4 all property/global coefficientFriction peratomtypepair 2 0.5 0.5 0.5 0.5
fix m5 all property/global characteristicVelocity scalar 2.

region void cylinder z 0. 0. 0.00571 0. 0.02 units box

# Physics
pair_style gran model hertz tangential history
pair_coeff * *

# Particle setup – insertions to be handled below
fix pts1 all particletemplate/sphere 12345787 atom_type 1 density constant 8200 radius uniform number 10e-06 100e-06 volume_limit 4.1867e-15
fix pdd1 all particledistribution/discrete 63243 1 pts1 1.0

# Geometry
fix cad1 all mesh/surface/stress/servo file LIGGGHTS_Examples/3.5/sample1.stl type 1 scale 1. stress on com 0. 0. 0. ctrlPV force axis 0. 0. 0. vel_max 1.0
fix cad2 all mesh/surface/stress file LIGGGHTS_Examples/3.5/bottom_plate.stl type 1 scale 1. stress on
fix ins_mesh all mesh/surface/planar file LIGGGHTS_Examples/3.5/factory.stl type 1 scale 1.
fix cad3 all mesh/surface/stress/servo file LIGGGHTS_Examples/3.5/top_plate.stl type 1 scale 1. stress on com 0. 0. 0. ctrlPV force axis 0. 0. -153.64 vel_max 1.0
fix geometry all wall/gran model hertz tangential history mesh n_meshes 3 meshes cad1 cad2 cad3

### Detailed settings
# Integration
fix integrator all nve/sphere

# Gravity
fix grav all gravity 9.81 vector 0.0 0.0 -1.0

# Timestep
timestep 0.000002

# Thermodynamic output
thermo_style custom step atoms ke cpu
thermo 10000
thermo_modify lost ignore norm no

### Execution and further settings

# Particle insertion – large particles
fix ins all insert/pack seed 123457 distributiontemplate pdd1 vel constant 0. 0. -0.5 insert_every once overlapcheck yes all_in yes region reg volumefraction_region 0.625
run 500000

#parameters for gradually growing particle diameter
variable alphastart equal 0.25
variable alphatarget equal 0.40
variable growts equal 50000
variable growevery equal 40
variable relaxts equal 50000

# Set the dumps
dump dumpmesh all mesh/vtk 10000 Ullas/dimple35/dump*.vtk stress
dump dmp all custom 10000 Ullas/dimple35/dump.1 id type type x y z ix iy iz vx vy vz fx fy fz &

#calculate grow rate
variable Rgrowrate equal (${alphatarget}/${alphastart})^(${growevery}/(3.*${growts}))
print "The radius grow rate is ${Rgrowrate}"

#do the diameter grow
compute rad all property/atom radius

variable dgrown atom ${Rgrowrate}*2.*c_rad
fix grow all adapt ${growevery} atom diameter v_dgrown

#run
run ${growts}

#let the packing relax
unfix grow
run ${relaxts}

and it showed an error message as below...

WARNING: Particle insertion: Less insertions than requested (/build/buildd/liggghts-3.0.3+repack/src/fix_insert.cpp:646)
ERROR on proc 2: Failed to allocate 869899668 bytes for array neigh:binhead (/build/buildd/liggghts-3.0.3+repack/src/memory.cpp:45)
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 2 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun has exited due to process rank 2 with PID 2170 on
node ligghts-desktop2 exiting improperly. There are two reasons this could occur:

1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.

2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"

This may have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).

What can be the possible reason?

alice's picture

alice | Thu, 07/27/2017 - 08:30

Hello,
first of all I'd recommend to generate the particle distribution by definind a couple of different particle templates and combining the to a distribution (see for example packing example in the examples section of LIGGGHTS-PUBLIC, here two particle templates are used in one distribution, more are possible just as well). Then, secondly, make sure that the neighbor bin size is approx. equal to the diameter of the larger sphere (maximum), or, if there are only few of the bigger particles, a bit smaller.
Then, one further remark: you are inserting particles with a volumefaction of 0.625, this is by far too much. I'd suggest a value around 0.2 or maybe 0.25 (watch out for warnings like "WARNING: Particle insertion: Less insertions than requested (/build/buildd/liggghts-3.0.3+repack/src/fix_insert.cpp:646)" in combination with a settling/compression etc.
Cheers,
Alice

ullassssss | Thu, 08/03/2017 - 09:15

Neighbor bin size is equal to the diameter of larger sphere. I have changed the volumefraction to 0.25. And it is showing the following error

LIGGGHTS (Version LIGGGHTS-PUBLIC 3.0.3, compiled 2014-08-28-20:04:12 by kloss based on LAMMPS 23 Nov 2013)
Created orthogonal box = (-0.007 -0.007 -0.001) to (0.007 0.007 0.03)
1 by 1 by 4 MPI processor grid
Fix particledistribution/discrete (id pdd1): distribution based on mass%:
pts1: d=2.000000e-04 (max. bounding sphere) mass%=100.000000%
Fix particledistribution/discrete (id pdd1): distribution based on number%:
pts1: d=2.000000e-04 (max. bounding sphere) number%=100.000000%

Reading STL file 'LIGGGHTS_Examples/3.5/sample1.stl'

Reading STL file 'LIGGGHTS_Examples/3.5/bottom_plate.stl'

Reading STL file 'LIGGGHTS_Examples/3.5/factory.stl'

Reading STL file 'LIGGGHTS_Examples/3.5/top_plate.stl'
Setting up run ...
Import and parallelization of mesh cad1 containing 34114 triangle(s) successful
Import and parallelization of mesh cad2 containing 104 triangle(s) successful
Import and parallelization of mesh ins_mesh containing 104 triangle(s) successful
Import and parallelization of mesh cad3 containing 104 triangle(s) successful
INFO: Resetting random generator for region reg
INFO: Particle insertion ins: inserting every 0 steps
Memory usage per processor = 12.3457 Mbytes
Step Atoms KinEng CPU
0 0 -0 0
insertion: proc 3 at 0 %
insertion: proc 0 at 0 %
insertion: proc 1 at 0 %
insertion: proc 2 at 0 %
insertion: proc 0 at 10 %
insertion: proc 3 at 10 %
insertion: proc 1 at 10 %
insertion: proc 2 at 10 %
insertion: proc 3 at 20 %
insertion: proc 2 at 20 %
insertion: proc 0 at 20 %
insertion: proc 1 at 20 %
insertion: proc 0 at 30 %
insertion: proc 3 at 30 %
insertion: proc 2 at 30 %
insertion: proc 1 at 30 %
insertion: proc 0 at 40 %
insertion: proc 3 at 40 %
insertion: proc 2 at 40 %
insertion: proc 1 at 40 %
insertion: proc 0 at 50 %
insertion: proc 3 at 50 %
insertion: proc 1 at 50 %
insertion: proc 2 at 50 %
insertion: proc 0 at 60 %
insertion: proc 3 at 60 %
insertion: proc 1 at 60 %
insertion: proc 2 at 60 %
insertion: proc 0 at 70 %
insertion: proc 3 at 70 %
insertion: proc 1 at 70 %
insertion: proc 2 at 70 %
insertion: proc 0 at 80 %
insertion: proc 3 at 80 %
insertion: proc 1 at 80 %
insertion: proc 2 at 80 %
insertion: proc 0 at 90 %
insertion: proc 3 at 90 %
insertion: proc 2 at 90 %
insertion: proc 1 at 90 %
insertion: proc 0 at 100 %
insertion: proc 3 at 100 %
insertion: proc 1 at 100 %
INFO: Particle insertion ins: inserted 1305615 particle templates (mass 0.012447) at step 1
- a total of 1305615 particle templates (mass 0.012447) inserted so far.
ERROR on proc 1: Failed to allocate 1574489280 bytes for array neigh:binhead (/build/buildd/liggghts-3.0.3+repack/src/memory.cpp:45)
ERROR on proc 2: Failed to allocate 1574489280 bytes for array neigh:binhead (/build/buildd/liggghts-3.0.3+repack/src/memory.cpp:45)

arnom's picture

arnom | Thu, 08/03/2017 - 09:52

How much RAM do you have? You are trying to allocate 3 GB of RAM here, so this might cause issues.

DCS team member & LIGGGHTS(R) core developer

arnom's picture

arnom | Fri, 08/04/2017 - 11:38

I suggest that you use larger particles and see if the error persists.

DCS team member & LIGGGHTS(R) core developer

ullassssss | Tue, 08/15/2017 - 17:33

I increased the particle size. The simulation became faster, but showed the following error...

LIGGGHTS (Version LIGGGHTS-PUBLIC 3.0.3, compiled 2014-08-28-20:04:12 by kloss based on LAMMPS 23 Nov 2013)
Created orthogonal box = (-0.007 -0.007 -0.001) to (0.007 0.007 0.03)
1 by 1 by 4 MPI processor grid
Fix particledistribution/discrete (id pdd1): distribution based on mass%:
pts1: d=2.000000e-04 (max. bounding sphere) mass%=100.000000%
Fix particledistribution/discrete (id pdd1): distribution based on number%:
pts1: d=2.000000e-04 (max. bounding sphere) number%=100.000000%

Reading STL file 'LIGGGHTS_Examples/3.5/sample1.stl'

Reading STL file 'LIGGGHTS_Examples/3.5/bottom_plate.stl'

Reading STL file 'LIGGGHTS_Examples/3.5/factory.stl'

Reading STL file 'LIGGGHTS_Examples/3.5/top_plate.stl'
Setting up run ...
Import and parallelization of mesh cad1 containing 34114 triangle(s) successful
Import and parallelization of mesh cad2 containing 104 triangle(s) successful
Import and parallelization of mesh ins_mesh containing 104 triangle(s) successful
Import and parallelization of mesh cad3 containing 104 triangle(s) successful
INFO: Resetting random generator for region void
INFO: Particle insertion ins: inserting every 0 steps
Memory usage per processor = 12.3457 Mbytes
Step Atoms KinEng CPU
0 0 -0 0
insertion: proc 2 at 0 %
insertion: proc 0 at 0 %
insertion: proc 1 at 0 %
insertion: proc 2 at 10 %
insertion: proc 0 at 10 %
insertion: proc 1 at 10 %
insertion: proc 2 at 20 %
insertion: proc 0 at 20 %
insertion: proc 1 at 20 %
insertion: proc 2 at 30 %
insertion: proc 0 at 30 %
insertion: proc 2 at 40 %
insertion: proc 1 at 30 %
insertion: proc 0 at 40 %
insertion: proc 2 at 50 %
insertion: proc 1 at 40 %
insertion: proc 0 at 50 %
insertion: proc 2 at 60 %
insertion: proc 1 at 50 %
insertion: proc 0 at 60 %
insertion: proc 2 at 70 %
insertion: proc 1 at 60 %
insertion: proc 0 at 70 %
insertion: proc 2 at 80 %
insertion: proc 1 at 70 %
insertion: proc 0 at 80 %
insertion: proc 2 at 90 %
insertion: proc 1 at 80 %
insertion: proc 0 at 90 %
insertion: proc 2 at 100 %
insertion: proc 1 at 90 %
insertion: proc 0 at 100 %
INFO: Particle insertion ins: inserted 260930 particle templates (mass 0.004194) at step 1
- a total of 260930 particle templates (mass 0.004194) inserted so far.
ERROR on proc 0: Failed to allocate 1159941600 bytes for array neigh:binhead (/build/buildd/liggghts-3.0.3+repack/src/memory.cpp:45)
ERROR on proc 3: Failed to allocate 1159941600 bytes for array neigh:binhead (/build/buildd/liggghts-3.0.3+repack/src/memory.cpp:45)
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 3 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 1821 on
node ullas-Inspiron-5558 exiting improperly. There are two reasons this could occur:

1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.

2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"

This may have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[ullas-Inspiron-5558:01818] 1 more process has sent help message help-mpi-api.txt / mpi-abort
[ullas-Inspiron-5558:01818] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

ullassssss | Wed, 08/23/2017 - 10:26

i need to insert spherical particles with radius ranging from 50e-6 to 100e-6 in a cylindrical container with radius 0.00571 and height 0.02 until the container is filled completely. Then the particles size grows and the subsequent wall pressure is to be obtained. I am using DELL inspiron laptop with Intel® Core™ i7-5500U CPU @ 2.40GHz × 4 processor and 8 GB RAM. The script file i prepared is given below.

### Initialization
# Preliminaries
units si
atom_style sphere
boundary m m m
newton off
communicate single vel yes
processors 1 2 2

# Declare domain
region reg block -0.007 0.007 -0.007 0.007 -0.001 0.030 units box
dimension 3
create_box 2 reg
neighbor 0.0002 bin
neigh_modify delay 0

### Setup
# Material and interaction properties
fix m1 all property/global youngsModulus peratomtype 1.0e7 1.0e7
fix m2 all property/global poissonsRatio peratomtype 0.31 0.31
fix m3 all property/global coefficientRestitution peratomtypepair 2 0.5 0.5 0.5 0.5
fix m4 all property/global coefficientFriction peratomtypepair 2 0.5 0.5 0.5 0.5
fix m5 all property/global characteristicVelocity scalar 2.

# Physics
pair_style gran model hertz tangential history
pair_coeff * *

# Particle insertions properties
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 8200 radius uniform number 50e-06 100e-06 volume_limit 20.933e-15
fix pdd1 all particledistribution/discrete 63243 1 pts1 1.0

# Geometry
fix cad1 all mesh/surface/stress/servo file LIGGGHTS_Examples/3.5/sample1.stl type 1 scale 1. stress on com 0. 0. 0. ctrlPV force axis 0. 0. 0. vel_max 1.0
fix cad2 all mesh/surface/stress file LIGGGHTS_Examples/3.5/bottom_plate.stl type 1 scale 1. stress on
fix ins_mesh all mesh/surface/planar file LIGGGHTS_Examples/3.5/factory.stl type 1 scale 1.
fix cad3 all mesh/surface/stress/servo file LIGGGHTS_Examples/3.5/top_plate.stl type 1 scale 1. stress on com 0. 0. 0. ctrlPV force axis 0. 0. -153.64 vel_max 1.0
fix geometry all wall/gran model hertz tangential history mesh n_meshes 3 meshes cad1 cad2 cad3

### Detailed settings
# Integration
fix integrator all nve/sphere

# Gravity
fix grav all gravity 9.81 vector 0.0 0.0 -1.0

# Timestep
timestep 0.000002

# Thermodynamic output
thermo_style custom step atoms ke cpu
thermo 10000
thermo_modify lost ignore norm no

### Execution and further settings

# Particle insertion – large particles
fix ins all insert/stream seed 123481 distributiontemplate pdd1 nparticles INF particlerate 100000 overlapcheck yes vel constant 0. 0. -0.5 insertion_face ins_mesh extrude_length 0.001
run 500000

#parameters for gradually growing particle diameter
variable alphastart equal 0.25
variable alphatarget equal 0.40
variable growts equal 50000
variable growevery equal 40
variable relaxts equal 50000

# Set the dumps
dump dumpmesh all mesh/vtk 10000 Ullas/dimple35/dump*.vtk stress
dump dmp all custom 10000 Ullas/dimple35/dump.1 id type type x y z ix iy iz vx vy vz fx fy fz
dump dmv all movie 10000 Ullas/dimple35/movie.avi type type size 640 480
dump dmi all image 10000 Ullas/dimple35/dump.*.jpg type type

#calculate grow rate
variable Rgrowrate equal (${alphatarget}/${alphastart})^(${growevery}/(3.*${growts}))
print "The radius grow rate is ${Rgrowrate}"

#do the diameter grow
compute rad all property/atom radius

variable dgrown atom ${Rgrowrate}*2.*c_rad
fix grow all adapt ${growevery} atom diameter v_dgrown

#run
run ${growts}

#let the packing relax
unfix grow
run ${relaxts}

But the simulation ended after the insertion of 8200 particles and showed the following error...

ERROR on proc 1: Failed to allocate 1221146460 bytes for array atom:binhead (/build/buildd/liggghts-3.0.3+repack/src/memory.cpp:45)