CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   display data in UDF (http://www.cfd-online.com/Forums/fluent-udf/102535-display-data-udf.html)

fleure_Jasmin May 27, 2012 11:11

display data in UDF
 
Hello :)
I managed to read discrete data from a txt file in UDF but the problem is how to display these data as fluent is interpreting the source file, to check if it is realy the same external data.
here is the UDF:

#include"udf.h"
DEFINE_ON_DEMAND(pt_source,c)

{
FILE *finp;
real xs[841],ys[841],zs[841];
real T[841][3];

int i,j,k;


finp=fopen("C:\\...\\source.txt","r");

for(i=1;i<841;i++)
fscanf(finp,"%f%f%f\n",&xs[i],&ys[i],&zs[i]);

fclose(finp);

for(i=1;i<841;i++)
{
T[i][0]=xs[i];
T[i][1]=ys[i];
T[i][2]=zs[i];

}
}
Do you have an idea about what should I add to achieve this?
Thanks for the help.


All times are GMT -4. The time now is 12:11.