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 02:12. |