CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   random number generator in CFX (https://www.cfd-online.com/Forums/main/77140-random-number-generator-cfx.html)

yanboda June 14, 2010 16:45

random number generator in CFX
 
Hi CFX users,
I'm trying to give a white noise to a fluid flow inlet velocity profile, I'm wondering if you guys have wrote any fortran subroutine that generates random number every time step. If someone can show me how to do that, that would be really appreciated.

RobertB June 15, 2010 07:41

1 Attachment(s)
The SLATEC Fortran library has a random number generator in it called rrand.f, which I have attached.

I am not sure how good it is but it may serve your purposes.

yanboda June 15, 2010 10:03

Quote:

Originally Posted by RobertB (Post 263081)
The SLATEC Fortran library has a random number generator in it called rrand.f, which I have attached.

I am not sure how good it is but it may serve your purposes.

Do you know how to write the CEL command and get a random number every time step?


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