Wrong amount of mass inserted with fix insert/stream

Submitted by cgrohs on Mon, 01/13/2014 - 11:12

I'm trying to simulate a particle size distribution. Using the attached file (with 8 cpus) leads to the wrong amount of overall mass (0.445609 instead of 0.360).

At first the number of 6755 particles (mass 0.359951) is calculated, which is ok. But then only 3904 particle templates (mass 0.293721) can be inserted at step 1. This leads to "WARNING: Particle insertion: Less insertions than requested (fix_insert.cpp:622)". Later on: "inserted 2851 particle templates (mass 0.151888) at step 33334 - a total of 6755 particle templates (mass 0.445609) inserted so far."

This means that the number of particles (6755) is correct but does not match the formerly calculated mass (0.359951).

Two workarounds would give the correct mass (but both are not always feasible):
-) When the extrude_length is extended (e.g. to 0.08) all particles are inserted at once which gives the correct mass
-) When only 1 cpu is used also all particles are inserted at once which gives the correct mass

It seems that the number of particles calculated in advance is based on different assumptions than the requirements for particle insertion. Maybe it would be possible to check that the mass inserted is not (much) larger than the desired mass?

Regards,
Christian

AttachmentSize
Plain text icon in.insertion.txt7.21 KB
Plain text icon platte.stl_.txt443 bytes