|
[Sponsors] |
April 10, 2004, 17:33 |
File operation in UDF
|
#1 |
Guest
Posts: n/a
|
Hi All,
I need to read in 7 different values at every time step into my UDF my txt file has all the data in 7 columns and 100 rows . I need to read the first row at the first time iteration and then the second row and so on. Fseek doesnt work with interpreted UDF. I wanted to know how i can accomplish the tasks I am illustrating my data here time r theta z Re concentration shear 11 12 13 14 15 16 17 21 22 23 24 25 26 27 ..................................... etc part of my UDF DEFINE_EXECUTE_AT_END (exec_at_end) { FILE *fptr; fptr = fopen("pthc.10_1_10c.txt","r")); fseek(fptr,f_counter,SEEK_SET); fscanf("%f %f %f %f %f %f %f ",&time,&r,&theta,&z,&rno,&cdom,&shear); fclosef(fptr); f_counter=f_counter+70; } How to do it without using Fseek ? thanks Ajay |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 14:43 |
[OpenFOAM] Paraview command not found | hardy | ParaView | 7 | September 18, 2008 05:59 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |