|
[Sponsors] |
May 27, 2012, 12:11 |
display data in UDF
|
#1 |
New Member
Join Date: May 2012
Posts: 8
Rep Power: 14 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing profile data from a UDF | ral007 | Fluent UDF and Scheme Programming | 1 | October 14, 2015 10:21 |
I/O of a real value by "DEFINE_RW_FILE" (UDF) | Pietro Asinari | Fluent UDF and Scheme Programming | 1 | August 15, 2015 20:08 |
UDF save data to a file!! | spk | Fluent UDF and Scheme Programming | 34 | July 17, 2013 15:03 |
Discrete Data into a UDF | Ginger_Giant | Fluent UDF and Scheme Programming | 0 | April 26, 2011 12:10 |
UDF for Species Mass Fraction Gradient *IN SPECIFIC ZONE * -- e.g. along axis of sym. | ksiegs2 | Fluent UDF and Scheme Programming | 0 | February 27, 2011 13:55 |