CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Is there a 'best' uniform random number generator? (https://www.cfd-online.com/Forums/main/11117-there-best-uniform-random-number-generator.html)

LEAF March 28, 2006 11:37

Is there a 'best' uniform random number generator?
 
Hi, Everybody:

Is there a 'best' uniform random number generator? or less better? I need some fortran code to generate randam number at some mesh point. Independency and ramdomness of these number are required.

Thank you! Best Wishes!


Ford Prefect March 29, 2006 03:52

Re: Is there a 'best' uniform random number genera
 
Ah, random numbers...

If we define random to exist if we can perform two identical experiments that will yield different results then how about the following:

Up to this day we can not make two experimental setups that are identical. Just consider how to measure if two setups are identical, on a quantum level we will probably change the results just by looking, right? (like the electron scattering experiments) I is also really difficult to perform two experiments at the same spacial coordinates unless they are performed at different times, yielding another problem... time conformity. Ok so maybe it is not possible to "prove" that random exists. Well if it doesn't there might (should) be an equation governing everything. So all of you that thought you had an own free will, think again =)

On topic: Random number generators based on time, and say, mouse position should be fairly random (you could add almost anything to this, decreasing the risk of ever drawing the same seed number twice in your lifetime, translating this into a number is of course another question). One more thing you could do is use an existing database containing a few years of lottery numbers and use them as seed, picking a new draw each time.

/F.P.

buch April 20, 2006 08:23

Re: Is there a 'best' uniform random number genera
 
Hi

Check this out : http://www.library.cornell.edu/nr/cbookfpdf.html

Regards


All times are GMT -4. The time now is 13:18.