CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF for reading dat files

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2009, 17:11
Default UDF for reading dat files
Join Date: Jun 2009
Posts: 31
Rep Power: 15
mrestrepo30 is on a distinguished road
I wrote a UDF to read some velocity values from a .dat file, and the values are represented in 3 columns for each one of the XYZ components. In the UDF I'm using standard C functions (fopen, fscanf, etc).
When I execute the UDF (on demand) in Fluent, I can read up to the row number 1169 (out of 3800); however, when I get to the line 1170, I get the following message:

-************************************************** *******
/homPlease include this information with any bug report you file on this issue!
================================================== ========
/home/local/Fluent.Inc/fluent6.3.26/bin/fluent: line 4820: 4012 Segmentation fault $NO_RUN $EXE_CMD $CX_FLAGS
The fluent process could not be started.
-************************************************** *******

Furthermore, in the line 1130 I get always the message:

************************************************** ********
Stack backtrace generated for process id 4012 on signal 1 :
************************************************** ********

Does anyone knows why I keep getting the error and maybe has any suggestion to what should I implement in order to avoid this and read the whole *.dat file???

mrestrepo30 is offline   Reply With Quote

Old   July 9, 2009, 16:38
New Member
Join Date: Apr 2009
Posts: 19
Rep Power: 15
shankara.2 is on a distinguished road

I've encountered this error so many times over the last 3 months and finally managed to solve it. I'm just telling you what I've gathered so far about this error.
There's usually no specific reason that causes this error. It could be anything from whether you are compiling your udf or interpreting it, whether you have the right zone id, right domain number. Also, depends on whether you are using parallel or serial solver because if you're using parallel solver, you need #if RP_HOST and # endif commands to enclose the working section of your udf. Most importantly, what is changing between the lines 1169 and 1700? I'm no expert but if your problem physics and UDF are correct, it's usually one of the things that I mentioned above. Good luck.
shankara.2 is offline   Reply With Quote

Old   July 9, 2009, 16:47
Join Date: Jun 2009
Posts: 31
Rep Power: 15
mrestrepo30 is on a distinguished road
Thanks shankara.2!

Actually I solved the problem by just increasing the size of the array where I'm saving the velocities from the dat file... Now the size is larger than what I needed in first place. But thanks again for your response.
mrestrepo30 is offline   Reply With Quote


dat files, fault, fscanf, segmanetation, stack backtrace

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 10:46
Associating profile files for the UDS though a UDF Bharath FLUENT 0 December 1, 2006 15:58
[making animations] fclose fails to close files? Mika FLUENT 0 March 30, 2001 08:19
UDF files don joe FLUENT 0 March 13, 2001 13:42

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