Sampling from Random Number Distributions
Certain physics features in the Granular Flow interface such as the grain features utilize internal random number generators to sample the grain positions, release times, distributions of grain types, and initial values of auxiliary dependent variables. To be more specific, most of the time the above features depend on pseudorandom number generation (PRNG) rather than truly random number generation (RNG). The key difference is that RNG is based on a real source of entropy, such as radioactive decay, whereas in PRNG the numbers are obtained according to an algorithm.
Pseudorandom Number Generation
Even though pseudorandomly generated numbers are not truly random, in the sense that an observer with a perfect knowledge of the algorithm could predict the next number in a sequence given the previous numbers, from a practical standpoint PRNG is usually sufficient.
The pseudorandom numbers used in the Granular Flow Module are generally obtained from an internal implementation of a PRNG that is instantiated using a seed value. Controlling this seed can directly influence the behavior of the PRNG and hence the reproducibility of the model. This seed can be controlled by the Seeds for random number generation list in the physics interface Advanced Settings section.
The following options are available:
Unique is the default option. When this option is selected, the seed is set to a predetermined value internally.
When Random is selected, the seed is itself randomly generated every time the study is run. This will ensure that the solution is not reproducible when running a study multiple times.
When User defined is selected, additional text fields appear in the settings windows for all nodes that use random numbers. The seed value can be provided directly by the user. A set of distinct solutions can be obtained by running a Parametric Sweep over several values of this argument.
For simple models, the Unique and User defined options may make the solution reproducible when rerunning the study multiple times. Reproducibility is somewhat easier to achieve when using a manual time step size. However, the results may not be 100% reproducible because even the slightest change in the time step size, down to machine precision, will cause different pseudorandom numbers to be generated. This can have a snowballing effect where the different solution values cause subsequent time steps to take on different sizes, leading to different pseudorandom numbers in all ensuing time steps. The Random option is never expected to make the solution reproducible across multiple runs of the study.