Different particle size distribution between input file and output file, smallest particles lost?

Submitted by Matteo on Thu, 08/31/2017 - 18:35

Hello,
I'm struggling to understand what is wrong with my simulation since I specify a particle size distribution in the input file which is not reflected in the output file.

Can anyone help me please? Basically it looks like I get a shift of the mean value of the PSD toward higher values in the output file.
It seems that this might be related to missing of the smallest particles in the output file? Not sure why they are not there as checking the log file all the particles seem to be inserted.

See below input file

modify_timing on
processors 36 32 1
atom_style granular
atom_modify map array
boundary f f f
newton off
communicate single vel yes
units si
region reg block -0.0405 0.0405 -0.016435 0.016435 -0.0025 0.0105 units box
create_box 1 reg
neighbor 2e-05 bin
neigh_modify delay 0
fix m1 all property/global youngsModulus peratomtype 5e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.4
fix m5 all property/global coefficientRollingFriction peratomtypepair 1 0.15
pair_style gran model hertz tangential history rolling_friction cdt
pair_coeff * *
timestep 4e-07

fix gravi all gravity 9.81 vector 0.0 0.0 -1.0

fix visc all viscous 4.19e-09

fix inlet all mesh/surface file meshes/Inlet.stl type 1 scale 0.001
fix boxstl all mesh/surface file meshes/Box.stl type 1 scale 0.001
fix wall all wall/gran model hertz tangential history rolling_friction cdt mesh n_meshes 1 meshes boxstl

fix pts1 all particletemplate/sphere 15485867 atom_type 1 density constant 8540.0 radius constant 5.8750000000000005e-06 volume_limit 1E-16
[...]
fix pts20 all particletemplate/sphere 15487097 atom_type 1 density constant 8540.0 radius constant 3.9125e-05 volume_limit 1E-14
fix pdd1 all particledistribution/discrete/numberbased 15485959 20 pts1 0.008396813315658632 pts2 0.06333908239699312 pts3 0.16606065379985516 pts4 0.2292475633992992 pts5 0.21088004089976708 pts6 0.14876072228603576 pts7 0.0878246847800793 pts8 0.04591090271252629 pts9 0.022065680357771907 pts10 0.010004948055087537 pts11 0.004357738902779471 pts12 0.0018470267386979722 pts13 0.0007690116940360366 pts14 0.0003166987170344148 pts15 0.00012967303358253963 pts16 5.299321996434913e-05 pts17 2.1678201316358547e-05 pts18 8.896429334350538e-06 pts19 3.6687888055679338e-06 pts20 1.5222713745660183e-06

#region for insertion
group nve_group region reg #Create a group

fix ins nve_group insert/stream seed 15485863 distributiontemplate pdd1 maxattempt 100 mass 0.000600 massrate 40.000000 overlapcheck yes vel constant 0.000000 0.000000 -0.080000 insertion_face inlet extrude_length 0.00035

#apply nve integration to all particles that are inserted as single particles
fix integr nve_group nve/sphere

fix ts all check/timestep/gran 100000 0.1 0.1
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke f_ts[1] f_ts[2] vol
thermo 100000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

run 1
dump dmp all custom 250000 post_sim0/dump*.atoms id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

run 750000 upto

Omid dorostkar | Thu, 08/31/2017 - 18:50

Hi mate,

You can check it by following commands:

thermo_style custom step atoms
thermo_modify lost warn norm no

The first one gives you number of atoms at each time step and the second one gives a warning if a particle is lost. Just update your input and try these commands.
Best,
OD

Matteo | Fri, 09/01/2017 - 11:06

Hi OD,

Your suggestion makes sense but if the number of particles inserted after insertion is the same of the particles LIGGGHTS expects to insert, I don't think I lose any particles.
See for example what I get in the output

Beginning of insertion:
INFO: Particle insertion ins: 2000501781.593308 particles every 10937 steps - particle rate 457278454236.378357 (mass rate 4.000000e+01)
6859176 particles (mass 5.999999e-04) within 0 steps

End of insertion:
Step Atoms KinEng rke ts[1] ts[2] Volume
750000 6859176 9.6815265e-14 3.7654498e-11 0.29253689 0.094693257 3.461211e-05

As you can see I've inserted all the particles expected. But analysing the particle distribution in the output file I clearly get a different shape of the distribution size than the one I declare in the input file.

Input file
https://s26.postimg.org/mgxyfe4s9/PSD.jpg
Output
https://s26.postimg.org/tqjiy3jcp/PSD_Paraview.jpg

Best regards
Matteo

Omid dorostkar | Fri, 09/01/2017 - 11:15

Ok I see what you mean. Have you tried to plat with parameters in fix ins nve_group insert/stream?
Like
maxattempt 100 mass 0.000600 massrate 40.000000
insertion_face inlet extrude_length 0.00035

Did you try different numbers and/or keywords?

OD

Matteo | Fri, 09/01/2017 - 11:31

Sorry, I haven't tried that. I think it would take a bit of time to randomly change parameters hoping to get something different without knowing the exact reason.
Again, I think what you suggest would help in case I don't get all the particles inserted? I don't see how those parameters could affect the insertion of the smaller particles. I think the main problem I have is due to the insertion of fewer small particles than expected, even if the total number of particles inserted is reached. This brings me to think that LIGGGHTS interprets in a different way the command particledistribution/discrete/numberbased. The manual says it works on number % but maybe it works in a different way?

Matteo

Omid dorostkar | Fri, 09/01/2017 - 12:57

what I remember from my simulations was that I had to put the number of particles to be inserted 3 times more than what I needed, so yes, it does not insert all you ask for one reason or another. Also, if you change insertion rate, mass rate and time steps you get another number of particles.
OD

Matteo | Fri, 09/01/2017 - 13:21

I think this should be reported as a bug then. Maybe someone from the development team can confirm...hope they read this topic

Matteo

Matteo | Fri, 09/01/2017 - 14:04

In the meanwhile I'll try increasing the number of bins from 20 to 40 and see if this helps in inserting a bit more small particles.

Matteo | Fri, 09/01/2017 - 15:46

I've noticed this wired thing in the log file. During insertion it seems that LIGGGHTS for some reasons inserts well beyond the mass required.

INFO: Particle insertion ins: inserted 16121 particle templates (mass 2.964017e-06) at step 207804
- a total of 6829550 particle templates (mass 1.401157e-03) inserted so far

The mass required in the input file is 6e-4
INFO: Particle insertion ins: 2006460597.290217 particles every 10937 steps - particle rate 458640531519.204773 (mass rate 4.000000e+01)
6879607 particles (mass 5.999999e-04) within 0 steps

This thing looks definitely a bug.

Matteo | Fri, 09/01/2017 - 17:37

Increasing the number of bins didn't help. I'm now trying using micro scale instead of SI but now I get a negative particle insertion
INFO: Particle insertion ins: -9849230.417475 particles every -2147483648 steps - particle rate 11466.013288 (mass rate 1.000000e+09)
6879607 particles (mass 5.999999e+11) within 0 steps

Which makes my simulation crash.
Of course I've converted all the units from sI to micro. Is there any suggestion to fix this problem? If I decrease the insertion mass rate LIGGGHTS complains saying it would take too long to insert all the particles. But I want to insert exactly the same number of particles as before.

Matteo | Mon, 09/04/2017 - 10:11

OK, I forgot to convert the time step from SI to micro units.
But the problem remains, it seems that LIGGGHTS inserts more particle than needed. I am asking to insert 6e11 picograms and looking at the log file LIGGGHTS keeps inserting particle even after reaching the mass desired.

INFO: Particle insertion ins: 171990199.319702 particles every 18750 steps - particle rate 22932.026576 (mass rate 2.000000e+09)
6879607 particles (mass 5.999999e+11) within 0 steps
Memory usage per processor = 18.1547 Mbytes
Step Atoms KinEng rke ts[1] ts[2] Volume
0 0 0 0 0 0 3.461211e+13
INFO: Particle insertion ins: inserted 1287434 particle templates (mass 2.650220e+11) at step 1
- a total of 1287434 particle templates (mass 2.650220e+11) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
1 1287434 8.4807046e+08 0 0 0 3.461211e+13
Loop time of 0.575096 on 1152 procs for 1 steps with 1287434 atoms, finish time Mon Sep 4 08:20:53 2017

Pair time (%) = 4.82096e-05 (0.00838287)
Neigh time (%) = 0.0019409 (0.337492)
Comm time (%) = 0.0107761 (1.87379)
Outpt time (%) = 0.0660829 (11.4908)
Modfy time (%) = 0.486145 (84.5329)
Other time (%) = 0.0101027 (1.7567)
[...]
Fix ins insert/stream time (%) = 0.485477 (84.4166)
Fix release_fix_insert_stream property/atom time (%) = 5.32157e-07 (9.25337e-05)
Fix integr nve/sphere time (%) = 2.49765e-05 (0.00434302)
Fix ts check/timestep/gran time (%) = 1.37898e-07 (2.39782e-05)
Fix contacthistory contacthistory time (%) = 1.31461e-05 (0.00228589)

Nlocal: 1117.56 ave 4009 max 0 min
Histogram: 768 24 0 0 0 0 0 7 243 110
Nghost: 208.82 ave 755 max 0 min
Histogram: 708 36 35 13 4 17 4 51 234 50
Neighs: 764.942 ave 3204 max 0 min
Histogram: 792 0 0 0 0 5 73 181 86 15

Total # of neighbors = 881213
Ave neighs/atom = 0.684472
Neighbor list builds = 1
Dangerous builds = 0
Setting up run at Mon Sep 4 08:20:53 2017

Memory usage per processor = 23.0697 Mbytes
Step Atoms KinEng rke ts[1] ts[2] Volume
1 1287434 8.4807046e+08 0 0 0 3.461211e+13
INFO: Particle insertion ins: inserted 1092080 particle templates (mass 2.211203e+11) at step 18751
- a total of 2379514 particle templates (mass 4.861423e+11) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 917243 particle templates (mass 1.826612e+11) at step 37501
- a total of 3296757 particle templates (mass 6.688035e+11) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 755373 particle templates (mass 1.485169e+11) at step 56251
- a total of 4052130 particle templates (mass 8.173204e+11) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 614003 particle templates (mass 1.193613e+11) at step 75001
- a total of 4666133 particle templates (mass 9.366818e+11) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 493234 particle templates (mass 9.492550e+10) at step 93751
- a total of 5159367 particle templates (mass 1.031607e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
WARNING: time-step is 12.113862 % of rayleigh time (../fix_check_timestep_gran.cpp:200)
100000 5159367 6.7940435e+09 24164224 0.12113862 0.046320196 3.461211e+13
INFO: Particle insertion ins: inserted 391848 particle templates (mass 7.483786e+10) at step 112501
- a total of 5551215 particle templates (mass 1.106445e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 305511 particle templates (mass 5.812783e+10) at step 131251
- a total of 5856726 particle templates (mass 1.164573e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 239366 particle templates (mass 4.523673e+10) at step 150001
- a total of 6096092 particle templates (mass 1.209810e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 185468 particle templates (mass 3.485070e+10) at step 168751
- a total of 6281560 particle templates (mass 1.244660e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 142545 particle templates (mass 2.670359e+10) at step 187501
- a total of 6424105 particle templates (mass 1.271364e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
WARNING: time-step is 12.113862 % of rayleigh time (../fix_check_timestep_gran.cpp:200)
200000 6424105 1.7963646e+09 10317461 0.12113862 0.045741457 3.461211e+13
INFO: Particle insertion ins: inserted 109234 particle templates (mass 2.040748e+10) at step 206251
- a total of 6533339 particle templates (mass 1.291771e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 83618 particle templates (mass 1.556558e+10) at step 225001
- a total of 6616957 particle templates (mass 1.307337e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
INFO: Particle insertion ins: inserted 63574 particle templates (mass 1.182152e+10) at step 243751
- a total of 6680531 particle templates (mass 1.319159e+12) inserted so far.
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)

Anyone knows how to fix this problem? I guess this might be the problem of getting a different particle size than the one expected.

Best regards
Matteo

Matteo | Mon, 09/04/2017 - 14:06

Problem solved!!!
OD was right, I had to play with the parameters of the
insert/stream
In particular I had to increase the extrude_length and decrease the mass rate. This seems helped LIGGGHTS in controlling the quantity and of particles inserted without passing beyond the mass target set in the input file.

Best regards
Matteo

Daniel Queteschiner's picture

Daniel Queteschiner | Fri, 09/08/2017 - 10:10

As I have already mentioned several times on this forum: As soon as you get the warning
WARNING: Particle insertion: Less insertions than requested (../fix_insert.cpp:807)
the actual size distribution in the simulation will differ from the one specified in the input script.
For each insertion step, LIGGGHTS inserts particles from largest to smallest. If at any point during this procedure the insertion of a particle fails (because no appropriate/empty space is found), insertion stops for that insertion step, also skipping any remaining smaller particles in the queue.

Fabeeha | Thu, 08/09/2018 - 18:00

WARNING: time-step is 28.194306 % of rayleigh time (../fix_check_timestep_gran.cpp:200)
WARNING: time-step is 14.155515 % of hertz time (../fix_check_timestep_gran.cpp:208)

I can't help me solving this problem with help of other discussions on forum related to this concern. Can anyone kindly help me with this problem in simpler way..?

jsams | Fri, 08/10/2018 - 01:31

It is generally recommended to keep the time-step under 20% of the rayleigh time, though it is situation dependent. Do you notice any strange behaviour in your simulation? If not, you might be able to get away with 28% of the rayleigh time. However, to be safe, I would probably still try to reduce the time-step so that the rayleigh time is under 20%.

You can find more information about how the times are calculated in the documentation of the fix check/timestep/gran command.

mtennant | Sun, 02/10/2019 - 14:22

Hi, I have a similar issue however my time step seems to be under the rayleigh time. When I run my simulation the particles start to move correctly but then fall and disappear from the boundary. I am assuming this is to do with the travel distance issue. Does anyone have any ideas how to fix this problem? Thanks, errors as follows:

WARNING: time-step is 80.660394 % of hertz time (../fix_check_timestep_gran.cpp:208)
WARNING: time step too large or skin too small - particles may relatively travel a distance of 52696.742607 per time-step, but skin is 30.000000 (../fix_check_timestep_gran.cpp:217)

arnom's picture

arnom | Thu, 02/21/2019 - 11:25

WARNING: time step too large or skin too small

Already tells you that you should lower your timestep. It should be < 10% of the hertz time

DCS team member & LIGGGHTS(R) core developer