|
[Sponsors] |
April 1, 2004, 22:40 |
how to call the random function in Fluent
|
#1 |
Guest
Posts: n/a
|
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.
|
|
April 4, 2004, 14:19 |
Re: how to call the random function in Fluent
|
#2 |
Guest
Posts: n/a
|
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 |
|
April 4, 2004, 14:21 |
Re: how to call the random function in Fluent
|
#3 |
Guest
Posts: n/a
|
I forgot to say, you need to include stdlib.h
#include <stdlib.h> and use compiled UDF. Hi ap |
|
April 6, 2004, 04:52 |
Re: how to call the random function in Fluent
|
#4 |
Guest
Posts: n/a
|
Hi, ap, I got it. Thank you very much.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fluent UDF - Random Noise | Tanner | FLUENT | 2 | May 29, 2014 04:27 |
LiencubiclowRemodel | nzy102 | OpenFOAM Bugs | 14 | January 10, 2012 09:53 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |