CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Help please!!! Urgent!!! (

emma chen November 24, 2003 05:54

Help please!!! Urgent!!!
Hi, there!

I wrote one UDF, in which a "*.dat" file is called. This .dat file is the result of MATLAB/SIMULINK, I just saved it as one dat file. The original form of the variables in this dat file is "array". After I press the "solve-->initialise" in fluent, it shows the error message: Error: cx-set-real-entry: wta[2](float) Error Object: -1.#inf

Hier I Would like to attach my UDF.

#include "udf.h" double value[600];

DEFINE_PROFILE(coupling_velocity, thread, iv) /* iv---index of the velocity variables. */ { face_t f; real x[ND_ND]; FILE *stream; int i; real j;

/*---------read the velocity input file--------*/

if ((stream = fopen("velocity.dat","r")) == NULL)


printf("Wrong in reading the velocity input file!\n");



for (i = 1; i < 599; i++)


j = fscanf(stream, "%1f\n", &value[i]);



i = 0;



i = i+1;


F_PROFILE(f,thread,iv) = value[i];


end_f_loop(f,thread) }

/*------------end of reading the velocity input file---------------*/

I have no idea about what is wrong with this UDF. Any advice would be very appreciated!!!

Regards, Emma

All times are GMT -4. The time now is 23:30.