|
[Sponsors] |
February 7, 2008, 19:49 |
help for UDF
|
#1 |
Guest
Posts: n/a
|
Hi everybody, I have a problem with my UDF program, if someone could help me, I would really appreciate. I am trying to set up a velocity which is egal to a constant(1.6) plus a random number (r). When I load this program on fluent, it tells me that "srand: undeclared variable". I don't know how to declare srand.
#include "udf.h" DEFINE_PROFILE(random_velocity,thread,position) { face_t f; int seed; double r; seed=1000; srand(seed); begin_f_loop(f,thread) { r=( (double)rand()/((double)(RAND_MAX)+(double)(1))); F_PROFILE(f,thread,position)=1.6 +r; } end_f_loop(f,thread) } |
|
February 8, 2008, 12:24 |
Re: help for UDF
|
#2 |
Guest
Posts: n/a
|
even all the functions of "stdlib.h" like abs(),exit() dosen't work & will show the same error as shown in your case.
Actually I was advised to load VC++ compiler into the system.....really don't know whether it works. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|