how to call the random function in Fluent
hello, I don't know how to call random generator in Fluent by using UDF. I found this function in random.h that locate in fluent\src folder. If you know the answer, please reply. Thanks in advance.
|
Re: how to call the random function in Fluent
You can use the random generator functions of the C compiler:
The function randomize(); initializes the random number generator, while the function random(int n); generates a random number between 0 and n-1. Look on google for further details. Here there is an example (if you remove random.html, you have access to a guide to C): http://www.phanderson.com/C/random.html Hi :) ap |
Re: how to call the random function in Fluent
I forgot to say, you need to include stdlib.h
#include <stdlib.h> and use compiled UDF. Hi :) ap |
Re: how to call the random function in Fluent
Hi, ap, I got it. Thank you very much.
|
All times are GMT -4. The time now is 23:15. |