|
[Sponsors] |
July 11, 2005, 09:26 |
Initialize and read a file contents
|
#1 |
Guest
Posts: n/a
|
Hi,
I have wrote below udf to read some data from a file. I got error. What is wrong? I think file doesn't open. ----------------------------- #include "udf.h" real inlet[2000][2]; int NI; char *fname1="d:\\prj\\unsteady\\rpm3500\\inlet.dat"; DEFINE_INIT(initializ,d) { FILE *fp; int i; fp=fopen(fname1,"r"); fscanf(fp,"%d\n",NI); fscanf(fp,"%f %f\n",&inlet[i][1],&inlet[i][2]); printf("NI=%d\n",NI); fclose(fp); } ------------------------------ |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluent 12.1, batch mode in linux | sakalido | FLUENT | 13 | September 27, 2017 09:55 |
Initialize a volScalarFiedl with wordList of patch types | tgillebaart | OpenFOAM Programming & Development | 0 | February 9, 2011 09:34 |
Changing the grid on the same set-up | Katya | FLUENT | 7 | October 8, 2009 17:31 |
a question about initialize in fluent | zhaopu | FLUENT | 0 | December 29, 2008 06:52 |
On how to initialize a UDS | Angelo Sozzi | FLUENT | 2 | November 19, 2003 17:31 |