Hi Heather,
First, I note that DEMdemo_GRCPrep_Part1 uses some randomness in generating each batch of particles instantiated into the simulation. Although I have yet to encounter it, I imagine it is possible that two large particles are generated so close together that there is an initial penetration, and the simulation crashes due to the subsequent large velocity. If your simulations did crash exactly after frame 10 and frame 60, then since they should be the frames right after a new batch of particles are added into the simulation, this appears to be more likely.
There are a few things you can do:
1. Increase the initial separation in the sampler. In line 103, you can change the separation to be something like 2.5*
scales.at(0). This reduces the risk of initial penetration. Although I would indeed be a bit surprised that this consistently happens in your simulations twice.
2. Relax the physics as suggested. You can change the CoR of all the materials to something like 0.1. It increases the damping and should not change the final settling result, just makes the contact easier to calculate. Again, I feel doubt since it never happens to me.
3. The hanging problem could also be related to large velocities, or not enough memory. If everything in the simulation is moving large velocity (meaning the simulation probably already diverges), then a lot of false positive contacts could be detected and the long contact array could eat all the memory. This is by far the most common cause of hanging. I don't know if you indeed modified the max error-out velocity in your second try (using SetErrorOutVelocity) so it went longer than the first try: You can try doing that, but regardless, you should ensure enough memory is available. For example, do not run it on an ancient graphic card (I don't think you are though...), and if it is on a cluster, make sure the job you submitted requests enough (host) memory, like "--mem=10GB", or something like that.
4. Due to what I said above, sharing the GPU you used and a rendering of the frames before the crash can help us understand what the exact problem is.
Thank you,
Ruochun